1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("react"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["react"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["Radium"] = factory(require("react"));
|
8 | else
|
9 | root["Radium"] = factory(root["React"]);
|
10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId])
|
20 | return installedModules[moduleId].exports;
|
21 |
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.i = function(value) { return value; };
|
48 |
|
49 |
|
50 | __webpack_require__.d = function(exports, name, getter) {
|
51 | if(!__webpack_require__.o(exports, name)) {
|
52 | Object.defineProperty(exports, name, {
|
53 | configurable: false,
|
54 | enumerable: true,
|
55 | get: getter
|
56 | /******/ });
|
57 | /******/ }
|
58 | /******/ };
|
59 | /******/
|
60 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
61 | /******/ __webpack_require__.n = function(module) {
|
62 | var getter = module && module.__esModule ?
|
63 | function getDefault() { return module['default']; } :
|
64 | function getModuleExports() { return module; };
|
65 | __webpack_require__.d(getter, 'a', getter);
|
66 | return getter;
|
67 | };
|
68 |
|
69 |
|
70 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
71 |
|
72 |
|
73 | __webpack_require__.p = "";
|
74 |
|
75 |
|
76 | return __webpack_require__(__webpack_require__.s = 64);
|
77 | })
|
78 |
|
79 | ([
|
80 |
|
81 | (function(module, exports, __webpack_require__) {
|
82 |
|
83 | "use strict";
|
84 |
|
85 |
|
86 |
|
87 | var process = module.exports = {};
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 | var cachedSetTimeout;
|
95 | var cachedClearTimeout;
|
96 |
|
97 | function defaultSetTimout() {
|
98 | throw new Error('setTimeout has not been defined');
|
99 | }
|
100 | function defaultClearTimeout() {
|
101 | throw new Error('clearTimeout has not been defined');
|
102 | }
|
103 | (function () {
|
104 | try {
|
105 | if (typeof setTimeout === 'function') {
|
106 | cachedSetTimeout = setTimeout;
|
107 | } else {
|
108 | cachedSetTimeout = defaultSetTimout;
|
109 | }
|
110 | } catch (e) {
|
111 | cachedSetTimeout = defaultSetTimout;
|
112 | }
|
113 | try {
|
114 | if (typeof clearTimeout === 'function') {
|
115 | cachedClearTimeout = clearTimeout;
|
116 | } else {
|
117 | cachedClearTimeout = defaultClearTimeout;
|
118 | }
|
119 | } catch (e) {
|
120 | cachedClearTimeout = defaultClearTimeout;
|
121 | }
|
122 | })();
|
123 | function runTimeout(fun) {
|
124 | if (cachedSetTimeout === setTimeout) {
|
125 |
|
126 | return setTimeout(fun, 0);
|
127 | }
|
128 |
|
129 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
130 | cachedSetTimeout = setTimeout;
|
131 | return setTimeout(fun, 0);
|
132 | }
|
133 | try {
|
134 |
|
135 | return cachedSetTimeout(fun, 0);
|
136 | } catch (e) {
|
137 | try {
|
138 |
|
139 | return cachedSetTimeout.call(null, fun, 0);
|
140 | } catch (e) {
|
141 |
|
142 | return cachedSetTimeout.call(this, fun, 0);
|
143 | }
|
144 | }
|
145 | }
|
146 | function runClearTimeout(marker) {
|
147 | if (cachedClearTimeout === clearTimeout) {
|
148 |
|
149 | return clearTimeout(marker);
|
150 | }
|
151 |
|
152 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
153 | cachedClearTimeout = clearTimeout;
|
154 | return clearTimeout(marker);
|
155 | }
|
156 | try {
|
157 |
|
158 | return cachedClearTimeout(marker);
|
159 | } catch (e) {
|
160 | try {
|
161 |
|
162 | return cachedClearTimeout.call(null, marker);
|
163 | } catch (e) {
|
164 |
|
165 |
|
166 | return cachedClearTimeout.call(this, marker);
|
167 | }
|
168 | }
|
169 | }
|
170 | var queue = [];
|
171 | var draining = false;
|
172 | var currentQueue;
|
173 | var queueIndex = -1;
|
174 |
|
175 | function cleanUpNextTick() {
|
176 | if (!draining || !currentQueue) {
|
177 | return;
|
178 | }
|
179 | draining = false;
|
180 | if (currentQueue.length) {
|
181 | queue = currentQueue.concat(queue);
|
182 | } else {
|
183 | queueIndex = -1;
|
184 | }
|
185 | if (queue.length) {
|
186 | drainQueue();
|
187 | }
|
188 | }
|
189 |
|
190 | function drainQueue() {
|
191 | if (draining) {
|
192 | return;
|
193 | }
|
194 | var timeout = runTimeout(cleanUpNextTick);
|
195 | draining = true;
|
196 |
|
197 | var len = queue.length;
|
198 | while (len) {
|
199 | currentQueue = queue;
|
200 | queue = [];
|
201 | while (++queueIndex < len) {
|
202 | if (currentQueue) {
|
203 | currentQueue[queueIndex].run();
|
204 | }
|
205 | }
|
206 | queueIndex = -1;
|
207 | len = queue.length;
|
208 | }
|
209 | currentQueue = null;
|
210 | draining = false;
|
211 | runClearTimeout(timeout);
|
212 | }
|
213 |
|
214 | process.nextTick = function (fun) {
|
215 | var args = new Array(arguments.length - 1);
|
216 | if (arguments.length > 1) {
|
217 | for (var i = 1; i < arguments.length; i++) {
|
218 | args[i - 1] = arguments[i];
|
219 | }
|
220 | }
|
221 | queue.push(new Item(fun, args));
|
222 | if (queue.length === 1 && !draining) {
|
223 | runTimeout(drainQueue);
|
224 | }
|
225 | };
|
226 |
|
227 |
|
228 | function Item(fun, array) {
|
229 | this.fun = fun;
|
230 | this.array = array;
|
231 | }
|
232 | Item.prototype.run = function () {
|
233 | this.fun.apply(null, this.array);
|
234 | };
|
235 | process.title = 'browser';
|
236 | process.browser = true;
|
237 | process.env = {};
|
238 | process.argv = [];
|
239 | process.version = '';
|
240 | process.versions = {};
|
241 |
|
242 | function noop() {}
|
243 |
|
244 | process.on = noop;
|
245 | process.addListener = noop;
|
246 | process.once = noop;
|
247 | process.off = noop;
|
248 | process.removeListener = noop;
|
249 | process.removeAllListeners = noop;
|
250 | process.emit = noop;
|
251 |
|
252 | process.binding = function (name) {
|
253 | throw new Error('process.binding is not supported');
|
254 | };
|
255 |
|
256 | process.cwd = function () {
|
257 | return '/';
|
258 | };
|
259 | process.chdir = function (dir) {
|
260 | throw new Error('process.chdir is not supported');
|
261 | };
|
262 | process.umask = function () {
|
263 | return 0;
|
264 | };
|
265 |
|
266 | }),
|
267 |
|
268 | (function(module, exports, __webpack_require__) {
|
269 |
|
270 | "use strict";
|
271 |
|
272 |
|
273 | Object.defineProperty(exports, "__esModule", {
|
274 | value: true
|
275 | });
|
276 |
|
277 | exports.default = function (prefixedValue, value, keepUnprefixed) {
|
278 | return keepUnprefixed ? [prefixedValue, value] : prefixedValue;
|
279 | };
|
280 |
|
281 | module.exports = exports["default"];
|
282 |
|
283 | }),
|
284 |
|
285 | (function(module, exports) {
|
286 |
|
287 | module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
|
288 |
|
289 | }),
|
290 |
|
291 | (function(module, exports, __webpack_require__) {
|
292 |
|
293 | "use strict";
|
294 |
|
295 |
|
296 | Object.defineProperty(exports, "__esModule", {
|
297 | value: true
|
298 | });
|
299 |
|
300 | function _defineProperty(obj, key, value) {
|
301 | if (key in obj) {
|
302 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
303 | } else {
|
304 | obj[key] = value;
|
305 | }return obj;
|
306 | }
|
307 |
|
308 |
|
309 |
|
310 | exports.default = function (property, value) {
|
311 | var replacer = arguments.length <= 2 || arguments[2] === undefined ? function (prefix, value) {
|
312 | return prefix + value;
|
313 | } : arguments[2];
|
314 | return _defineProperty({}, property, ['-webkit-', '-moz-', ''].map(function (prefix) {
|
315 | return replacer(prefix, value);
|
316 | }));
|
317 | };
|
318 |
|
319 | module.exports = exports['default'];
|
320 |
|
321 | }),
|
322 |
|
323 | (function(module, exports, __webpack_require__) {
|
324 |
|
325 | "use strict";
|
326 | (function(process) {
|
327 |
|
328 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 | if (process.env.NODE_ENV !== 'production') {
|
340 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element') || 0xeac7;
|
341 |
|
342 | var isValidElement = function isValidElement(object) {
|
343 | return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
344 | };
|
345 |
|
346 |
|
347 |
|
348 | var throwOnDirectAccess = true;
|
349 | module.exports = __webpack_require__(59)(isValidElement, throwOnDirectAccess);
|
350 | } else {
|
351 |
|
352 |
|
353 | module.exports = __webpack_require__(58)();
|
354 | }
|
355 | }.call(exports, __webpack_require__(0)))
|
356 |
|
357 | }),
|
358 |
|
359 | (function(module, exports, __webpack_require__) {
|
360 |
|
361 | "use strict";
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
|
375 | function makeEmptyFunction(arg) {
|
376 | return function () {
|
377 | return arg;
|
378 | };
|
379 | }
|
380 |
|
381 |
|
382 |
|
383 |
|
384 |
|
385 |
|
386 | var emptyFunction = function emptyFunction() {};
|
387 |
|
388 | emptyFunction.thatReturns = makeEmptyFunction;
|
389 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
390 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
391 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
392 | emptyFunction.thatReturnsThis = function () {
|
393 | return this;
|
394 | };
|
395 | emptyFunction.thatReturnsArgument = function (arg) {
|
396 | return arg;
|
397 | };
|
398 |
|
399 | module.exports = emptyFunction;
|
400 |
|
401 | }),
|
402 |
|
403 | (function(module, exports, __webpack_require__) {
|
404 |
|
405 | "use strict";
|
406 | (function(process) { |
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 | var validateFormat = function validateFormat(format) {};
|
430 |
|
431 | if (process.env.NODE_ENV !== 'production') {
|
432 | validateFormat = function validateFormat(format) {
|
433 | if (format === undefined) {
|
434 | throw new Error('invariant requires an error message argument');
|
435 | }
|
436 | };
|
437 | }
|
438 |
|
439 | function invariant(condition, format, a, b, c, d, e, f) {
|
440 | validateFormat(format);
|
441 |
|
442 | if (!condition) {
|
443 | var error;
|
444 | if (format === undefined) {
|
445 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
446 | } else {
|
447 | var args = [a, b, c, d, e, f];
|
448 | var argIndex = 0;
|
449 | error = new Error(format.replace(/%s/g, function () {
|
450 | return args[argIndex++];
|
451 | }));
|
452 | error.name = 'Invariant Violation';
|
453 | }
|
454 |
|
455 | error.framesToPop = 1;
|
456 | throw error;
|
457 | }
|
458 | }
|
459 |
|
460 | module.exports = invariant;
|
461 | }.call(exports, __webpack_require__(0)))
|
462 |
|
463 | }),
|
464 |
|
465 | (function(module, exports, __webpack_require__) {
|
466 |
|
467 | "use strict";
|
468 |
|
469 |
|
470 | Object.defineProperty(exports, "__esModule", {
|
471 | value: true
|
472 | });
|
473 |
|
474 |
|
475 | exports.default = function (str) {
|
476 | return str.charAt(0).toUpperCase() + str.slice(1);
|
477 | };
|
478 |
|
479 | module.exports = exports["default"];
|
480 |
|
481 | }),
|
482 |
|
483 | (function(module, exports, __webpack_require__) {
|
484 |
|
485 | "use strict";
|
486 |
|
487 |
|
488 | Object.defineProperty(exports, "__esModule", {
|
489 | value: true
|
490 | });
|
491 |
|
492 | exports.default = function (value) {
|
493 | if (Array.isArray(value)) value = value.join(',');
|
494 |
|
495 | return value.match(/-webkit-|-moz-|-ms-/) !== null;
|
496 | };
|
497 |
|
498 | module.exports = exports['default'];
|
499 |
|
500 | }),
|
501 |
|
502 | (function(module, exports, __webpack_require__) {
|
503 |
|
504 | "use strict";
|
505 |
|
506 |
|
507 | Object.defineProperty(exports, "__esModule", {
|
508 | value: true
|
509 | });
|
510 | exports.default = cssRuleSetToString;
|
511 |
|
512 | var _appendPxIfNeeded = __webpack_require__(21);
|
513 |
|
514 | var _appendPxIfNeeded2 = _interopRequireDefault(_appendPxIfNeeded);
|
515 |
|
516 | var _camelCasePropsToDashCase = __webpack_require__(62);
|
517 |
|
518 | var _camelCasePropsToDashCase2 = _interopRequireDefault(_camelCasePropsToDashCase);
|
519 |
|
520 | var _mapObject = __webpack_require__(24);
|
521 |
|
522 | var _mapObject2 = _interopRequireDefault(_mapObject);
|
523 |
|
524 | var _prefixer = __webpack_require__(10);
|
525 |
|
526 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
527 |
|
528 | function createMarkupForStyles(style) {
|
529 | return Object.keys(style).map(function (property) {
|
530 | return property + ': ' + style[property] + ';';
|
531 | }).join('\n');
|
532 | }
|
533 |
|
534 | function cssRuleSetToString(selector, rules, userAgent) {
|
535 | if (!rules) {
|
536 | return '';
|
537 | }
|
538 |
|
539 | var rulesWithPx = (0, _mapObject2.default)(rules, function (value, key) {
|
540 | return (0, _appendPxIfNeeded2.default)(key, value);
|
541 | });
|
542 | var prefixedRules = (0, _prefixer.getPrefixedStyle)(rulesWithPx, userAgent);
|
543 | var cssPrefixedRules = (0, _camelCasePropsToDashCase2.default)(prefixedRules);
|
544 | var serializedRules = createMarkupForStyles(cssPrefixedRules);
|
545 |
|
546 | return selector + '{' + serializedRules + '}';
|
547 | }
|
548 | module.exports = exports['default'];
|
549 |
|
550 | }),
|
551 |
|
552 | (function(module, exports, __webpack_require__) {
|
553 |
|
554 | "use strict";
|
555 | (function(global, process) {
|
556 |
|
557 | Object.defineProperty(exports, "__esModule", {
|
558 | value: true
|
559 | });
|
560 |
|
561 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
562 |
|
563 |
|
564 |
|
565 |
|
566 |
|
567 |
|
568 | exports.getPrefixedKeyframes = getPrefixedKeyframes;
|
569 | exports.getPrefixedStyle = getPrefixedStyle;
|
570 |
|
571 | var _inlineStylePrefixer = __webpack_require__(31);
|
572 |
|
573 | var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer);
|
574 |
|
575 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
576 |
|
577 | function transformValues(style) {
|
578 | return Object.keys(style).reduce(function (newStyle, key) {
|
579 | var value = style[key];
|
580 | if (Array.isArray(value)) {
|
581 | value = value.join(';' + key + ':');
|
582 | } else if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && typeof value.toString === 'function') {
|
583 | value = value.toString();
|
584 | }
|
585 |
|
586 | newStyle[key] = value;
|
587 | return newStyle;
|
588 | }, {});
|
589 | }
|
590 |
|
591 | var _hasWarnedAboutUserAgent = false;
|
592 | var _lastUserAgent = void 0;
|
593 | var _cachedPrefixer = void 0;
|
594 |
|
595 | function getPrefixer(userAgent) {
|
596 | var actualUserAgent = userAgent || global && global.navigator && global.navigator.userAgent;
|
597 |
|
598 | if (process.env.NODE_ENV !== 'production') {
|
599 | if (!actualUserAgent && !_hasWarnedAboutUserAgent) {
|
600 |
|
601 | console.warn('Radium: userAgent should be supplied for server-side rendering. See ' + 'https://github.com/FormidableLabs/radium/tree/master/docs/api#radium ' + 'for more information.');
|
602 |
|
603 | _hasWarnedAboutUserAgent = true;
|
604 | }
|
605 | }
|
606 |
|
607 | if (!_cachedPrefixer || actualUserAgent !== _lastUserAgent) {
|
608 | if (actualUserAgent === 'all') {
|
609 | _cachedPrefixer = {
|
610 | prefix: _inlineStylePrefixer2.default.prefixAll,
|
611 | prefixedKeyframes: 'keyframes'
|
612 | };
|
613 | } else {
|
614 | _cachedPrefixer = new _inlineStylePrefixer2.default({ userAgent: actualUserAgent });
|
615 | }
|
616 | _lastUserAgent = actualUserAgent;
|
617 | }
|
618 | return _cachedPrefixer;
|
619 | }
|
620 |
|
621 | function getPrefixedKeyframes(userAgent) {
|
622 | return getPrefixer(userAgent).prefixedKeyframes;
|
623 | }
|
624 |
|
625 |
|
626 |
|
627 | function getPrefixedStyle(style, userAgent) {
|
628 | var styleWithFallbacks = transformValues(style);
|
629 | var prefixer = getPrefixer(userAgent);
|
630 | var prefixedStyle = prefixer.prefix(styleWithFallbacks);
|
631 | return prefixedStyle;
|
632 | }
|
633 | }.call(exports, __webpack_require__(60), __webpack_require__(0)))
|
634 |
|
635 | }),
|
636 |
|
637 | (function(module, exports, __webpack_require__) {
|
638 |
|
639 | "use strict";
|
640 |
|
641 |
|
642 | Object.defineProperty(exports, "__esModule", {
|
643 | value: true
|
644 | });
|
645 |
|
646 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
647 |
|
648 | var StyleKeeper = function () {
|
649 | function StyleKeeper(userAgent) {
|
650 | _classCallCheck(this, StyleKeeper);
|
651 |
|
652 | this._userAgent = userAgent;
|
653 | this._listeners = [];
|
654 | this._cssSet = {};
|
655 | }
|
656 |
|
657 | StyleKeeper.prototype.subscribe = function subscribe(listener) {
|
658 | var _this = this;
|
659 |
|
660 | if (this._listeners.indexOf(listener) === -1) {
|
661 | this._listeners.push(listener);
|
662 | }
|
663 |
|
664 | return {
|
665 |
|
666 | remove: function remove() {
|
667 | var listenerIndex = _this._listeners.indexOf(listener);
|
668 | if (listenerIndex > -1) {
|
669 | _this._listeners.splice(listenerIndex, 1);
|
670 | }
|
671 | }
|
672 | };
|
673 | };
|
674 |
|
675 | StyleKeeper.prototype.addCSS = function addCSS(css) {
|
676 | var _this2 = this;
|
677 |
|
678 | if (!this._cssSet[css]) {
|
679 | this._cssSet[css] = true;
|
680 | this._emitChange();
|
681 | }
|
682 |
|
683 | return {
|
684 |
|
685 | remove: function remove() {
|
686 | delete _this2._cssSet[css];
|
687 | _this2._emitChange();
|
688 | }
|
689 | };
|
690 | };
|
691 |
|
692 | StyleKeeper.prototype.getCSS = function getCSS() {
|
693 | return Object.keys(this._cssSet).join('\n');
|
694 | };
|
695 |
|
696 | StyleKeeper.prototype._emitChange = function _emitChange() {
|
697 | this._listeners.forEach(function (listener) {
|
698 | return listener();
|
699 | });
|
700 | };
|
701 |
|
702 | return StyleKeeper;
|
703 | }();
|
704 |
|
705 | exports.default = StyleKeeper;
|
706 | module.exports = exports['default'];
|
707 |
|
708 | }),
|
709 |
|
710 | (function(module, exports, __webpack_require__) {
|
711 |
|
712 | "use strict";
|
713 | (function(process) {
|
714 |
|
715 | Object.defineProperty(exports, "__esModule", {
|
716 | value: true
|
717 | });
|
718 |
|
719 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
720 |
|
721 | exports.default = enhanceWithRadium;
|
722 |
|
723 | var _react = __webpack_require__(2);
|
724 |
|
725 | var _propTypes = __webpack_require__(4);
|
726 |
|
727 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
728 |
|
729 | var _styleKeeper = __webpack_require__(11);
|
730 |
|
731 | var _styleKeeper2 = _interopRequireDefault(_styleKeeper);
|
732 |
|
733 | var _resolveStyles = __webpack_require__(15);
|
734 |
|
735 | var _resolveStyles2 = _interopRequireDefault(_resolveStyles);
|
736 |
|
737 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
738 |
|
739 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
740 |
|
741 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
742 |
|
743 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
744 |
|
745 | var KEYS_TO_IGNORE_WHEN_COPYING_PROPERTIES = ['arguments', 'callee', 'caller', 'length', 'name', 'prototype', 'type'];
|
746 |
|
747 | function copyProperties(source, target) {
|
748 | Object.getOwnPropertyNames(source).forEach(function (key) {
|
749 | if (KEYS_TO_IGNORE_WHEN_COPYING_PROPERTIES.indexOf(key) < 0 && !target.hasOwnProperty(key)) {
|
750 | var descriptor = Object.getOwnPropertyDescriptor(source, key);
|
751 | Object.defineProperty(target, key, descriptor);
|
752 | }
|
753 | });
|
754 | }
|
755 |
|
756 | function isStateless(component) {
|
757 | return !component.render && !(component.prototype && component.prototype.render);
|
758 | }
|
759 |
|
760 | function enhanceWithRadium(configOrComposedComponent) {
|
761 | var _class, _temp;
|
762 |
|
763 | var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
764 |
|
765 | if (typeof configOrComposedComponent !== 'function') {
|
766 | var newConfig = _extends({}, config, configOrComposedComponent);
|
767 | return function (configOrComponent) {
|
768 | return enhanceWithRadium(configOrComponent, newConfig);
|
769 | };
|
770 | }
|
771 |
|
772 | var component = configOrComposedComponent;
|
773 | var ComposedComponent = component;
|
774 |
|
775 |
|
776 | if (isStateless(ComposedComponent)) {
|
777 | ComposedComponent = function (_Component) {
|
778 | _inherits(ComposedComponent, _Component);
|
779 |
|
780 | function ComposedComponent() {
|
781 | _classCallCheck(this, ComposedComponent);
|
782 |
|
783 | return _possibleConstructorReturn(this, _Component.apply(this, arguments));
|
784 | }
|
785 |
|
786 | ComposedComponent.prototype.render = function render() {
|
787 | return component(this.props, this.context);
|
788 | };
|
789 |
|
790 | return ComposedComponent;
|
791 | }(_react.Component);
|
792 | ComposedComponent.displayName = component.displayName || component.name;
|
793 | }
|
794 |
|
795 | var RadiumEnhancer = (_temp = _class = function (_ComposedComponent) {
|
796 | _inherits(RadiumEnhancer, _ComposedComponent);
|
797 |
|
798 | function RadiumEnhancer() {
|
799 | _classCallCheck(this, RadiumEnhancer);
|
800 |
|
801 | var _this2 = _possibleConstructorReturn(this, _ComposedComponent.apply(this, arguments));
|
802 |
|
803 | _this2.state = _this2.state || {};
|
804 | _this2.state._radiumStyleState = {};
|
805 | _this2._radiumIsMounted = true;
|
806 | return _this2;
|
807 | }
|
808 |
|
809 | RadiumEnhancer.prototype.componentWillUnmount = function componentWillUnmount() {
|
810 | if (_ComposedComponent.prototype.componentWillUnmount) {
|
811 | _ComposedComponent.prototype.componentWillUnmount.call(this);
|
812 | }
|
813 |
|
814 | this._radiumIsMounted = false;
|
815 |
|
816 | if (this._radiumMouseUpListener) {
|
817 | this._radiumMouseUpListener.remove();
|
818 | }
|
819 |
|
820 | if (this._radiumMediaQueryListenersByQuery) {
|
821 | Object.keys(this._radiumMediaQueryListenersByQuery).forEach(function (query) {
|
822 | this._radiumMediaQueryListenersByQuery[query].remove();
|
823 | }, this);
|
824 | }
|
825 | };
|
826 |
|
827 | RadiumEnhancer.prototype.getChildContext = function getChildContext() {
|
828 | var superChildContext = _ComposedComponent.prototype.getChildContext ? _ComposedComponent.prototype.getChildContext.call(this) : {};
|
829 |
|
830 | if (!this.props.radiumConfig) {
|
831 | return superChildContext;
|
832 | }
|
833 |
|
834 | var newContext = _extends({}, superChildContext);
|
835 |
|
836 | if (this.props.radiumConfig) {
|
837 | newContext._radiumConfig = this.props.radiumConfig;
|
838 | }
|
839 |
|
840 | return newContext;
|
841 | };
|
842 |
|
843 | RadiumEnhancer.prototype.render = function render() {
|
844 | var renderedElement = _ComposedComponent.prototype.render.call(this);
|
845 | var currentConfig = this.props.radiumConfig || this.context._radiumConfig || config;
|
846 |
|
847 | if (config && currentConfig !== config) {
|
848 | currentConfig = _extends({}, config, currentConfig);
|
849 | }
|
850 |
|
851 | return (0, _resolveStyles2.default)(this, renderedElement, currentConfig);
|
852 | };
|
853 |
|
854 | return RadiumEnhancer;
|
855 | }(ComposedComponent), _class._isRadiumEnhanced = true, _temp);
|
856 |
|
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 | copyProperties(component, RadiumEnhancer);
|
863 |
|
864 | if (process.env.NODE_ENV !== 'production') {
|
865 |
|
866 |
|
867 |
|
868 | copyProperties(ComposedComponent.prototype, RadiumEnhancer.prototype);
|
869 | }
|
870 |
|
871 | if (RadiumEnhancer.propTypes && RadiumEnhancer.propTypes.style) {
|
872 | RadiumEnhancer.propTypes = _extends({}, RadiumEnhancer.propTypes, {
|
873 | style: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.object])
|
874 | });
|
875 | }
|
876 |
|
877 | RadiumEnhancer.displayName = component.displayName || component.name || 'Component';
|
878 |
|
879 | RadiumEnhancer.contextTypes = _extends({}, RadiumEnhancer.contextTypes, {
|
880 | _radiumConfig: _propTypes2.default.object,
|
881 | _radiumStyleKeeper: _propTypes2.default.instanceOf(_styleKeeper2.default)
|
882 | });
|
883 |
|
884 | RadiumEnhancer.childContextTypes = _extends({}, RadiumEnhancer.childContextTypes, {
|
885 | _radiumConfig: _propTypes2.default.object,
|
886 | _radiumStyleKeeper: _propTypes2.default.instanceOf(_styleKeeper2.default)
|
887 | });
|
888 |
|
889 | return RadiumEnhancer;
|
890 | }
|
891 | module.exports = exports['default'];
|
892 | }.call(exports, __webpack_require__(0)))
|
893 |
|
894 | }),
|
895 |
|
896 | (function(module, exports, __webpack_require__) {
|
897 |
|
898 | "use strict";
|
899 |
|
900 |
|
901 | Object.defineProperty(exports, "__esModule", {
|
902 | value: true
|
903 | });
|
904 |
|
905 | var _getStateKey = __webpack_require__(22);
|
906 |
|
907 | var _getStateKey2 = _interopRequireDefault(_getStateKey);
|
908 |
|
909 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
910 |
|
911 | var getState = function getState(state, elementKey, value) {
|
912 | var key = (0, _getStateKey2.default)(elementKey);
|
913 |
|
914 | return !!state && !!state._radiumStyleState && !!state._radiumStyleState[key] && state._radiumStyleState[key][value];
|
915 | };
|
916 |
|
917 | exports.default = getState;
|
918 | module.exports = exports['default'];
|
919 |
|
920 | }),
|
921 |
|
922 | (function(module, exports, __webpack_require__) {
|
923 |
|
924 | "use strict";
|
925 |
|
926 |
|
927 | Object.defineProperty(exports, "__esModule", {
|
928 | value: true
|
929 | });
|
930 |
|
931 | var _checkPropsPlugin = __webpack_require__(66);
|
932 |
|
933 | var _checkPropsPlugin2 = _interopRequireDefault(_checkPropsPlugin);
|
934 |
|
935 | var _keyframesPlugin = __webpack_require__(67);
|
936 |
|
937 | var _keyframesPlugin2 = _interopRequireDefault(_keyframesPlugin);
|
938 |
|
939 | var _mergeStyleArrayPlugin = __webpack_require__(68);
|
940 |
|
941 | var _mergeStyleArrayPlugin2 = _interopRequireDefault(_mergeStyleArrayPlugin);
|
942 |
|
943 | var _prefixPlugin = __webpack_require__(70);
|
944 |
|
945 | var _prefixPlugin2 = _interopRequireDefault(_prefixPlugin);
|
946 |
|
947 | var _removeNestedStylesPlugin = __webpack_require__(71);
|
948 |
|
949 | var _removeNestedStylesPlugin2 = _interopRequireDefault(_removeNestedStylesPlugin);
|
950 |
|
951 | var _resolveInteractionStylesPlugin = __webpack_require__(72);
|
952 |
|
953 | var _resolveInteractionStylesPlugin2 = _interopRequireDefault(_resolveInteractionStylesPlugin);
|
954 |
|
955 | var _resolveMediaQueriesPlugin = __webpack_require__(73);
|
956 |
|
957 | var _resolveMediaQueriesPlugin2 = _interopRequireDefault(_resolveMediaQueriesPlugin);
|
958 |
|
959 | var _visitedPlugin = __webpack_require__(74);
|
960 |
|
961 | var _visitedPlugin2 = _interopRequireDefault(_visitedPlugin);
|
962 |
|
963 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
964 |
|
965 | exports.default = {
|
966 | checkProps: _checkPropsPlugin2.default,
|
967 | keyframes: _keyframesPlugin2.default,
|
968 | mergeStyleArray: _mergeStyleArrayPlugin2.default,
|
969 | prefix: _prefixPlugin2.default,
|
970 | removeNestedStyles: _removeNestedStylesPlugin2.default,
|
971 | resolveInteractionStyles: _resolveInteractionStylesPlugin2.default,
|
972 | resolveMediaQueries: _resolveMediaQueriesPlugin2.default,
|
973 | visited: _visitedPlugin2.default
|
974 | };
|
975 |
|
976 |
|
977 | module.exports = exports['default'];
|
978 |
|
979 | }),
|
980 |
|
981 | (function(module, exports, __webpack_require__) {
|
982 |
|
983 | "use strict";
|
984 | (function(process) {
|
985 |
|
986 | Object.defineProperty(exports, "__esModule", {
|
987 | value: true
|
988 | });
|
989 |
|
990 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
991 |
|
992 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
993 |
|
994 | var _appendImportantToEachValue = __webpack_require__(61);
|
995 |
|
996 | var _appendImportantToEachValue2 = _interopRequireDefault(_appendImportantToEachValue);
|
997 |
|
998 | var _cssRuleSetToString = __webpack_require__(9);
|
999 |
|
1000 | var _cssRuleSetToString2 = _interopRequireDefault(_cssRuleSetToString);
|
1001 |
|
1002 | var _getState = __webpack_require__(13);
|
1003 |
|
1004 | var _getState2 = _interopRequireDefault(_getState);
|
1005 |
|
1006 | var _getStateKey = __webpack_require__(22);
|
1007 |
|
1008 | var _getStateKey2 = _interopRequireDefault(_getStateKey);
|
1009 |
|
1010 | var _hash = __webpack_require__(23);
|
1011 |
|
1012 | var _hash2 = _interopRequireDefault(_hash);
|
1013 |
|
1014 | var _mergeStyles = __webpack_require__(65);
|
1015 |
|
1016 | var _plugins = __webpack_require__(14);
|
1017 |
|
1018 | var _plugins2 = _interopRequireDefault(_plugins);
|
1019 |
|
1020 | var _exenv = __webpack_require__(30);
|
1021 |
|
1022 | var _exenv2 = _interopRequireDefault(_exenv);
|
1023 |
|
1024 | var _react = __webpack_require__(2);
|
1025 |
|
1026 | var _react2 = _interopRequireDefault(_react);
|
1027 |
|
1028 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1029 |
|
1030 | var DEFAULT_CONFIG = {
|
1031 | plugins: [_plugins2.default.mergeStyleArray, _plugins2.default.checkProps, _plugins2.default.resolveMediaQueries, _plugins2.default.resolveInteractionStyles, _plugins2.default.keyframes, _plugins2.default.visited, _plugins2.default.removeNestedStyles, _plugins2.default.prefix, _plugins2.default.checkProps]
|
1032 | };
|
1033 |
|
1034 |
|
1035 | var globalState = {};
|
1036 |
|
1037 |
|
1038 | var resolveStyles = null;
|
1039 |
|
1040 | var _shouldResolveStyles = function _shouldResolveStyles(component) {
|
1041 | return component.type && !component.type._isRadiumEnhanced;
|
1042 | };
|
1043 |
|
1044 | var _resolveChildren = function _resolveChildren(_ref) {
|
1045 | var children = _ref.children,
|
1046 | component = _ref.component,
|
1047 | config = _ref.config,
|
1048 | existingKeyMap = _ref.existingKeyMap;
|
1049 |
|
1050 | if (!children) {
|
1051 | return children;
|
1052 | }
|
1053 |
|
1054 | var childrenType = typeof children === 'undefined' ? 'undefined' : _typeof(children);
|
1055 |
|
1056 | if (childrenType === 'string' || childrenType === 'number') {
|
1057 |
|
1058 | return children;
|
1059 | }
|
1060 |
|
1061 | if (childrenType === 'function') {
|
1062 |
|
1063 | return function () {
|
1064 | var result = children.apply(this, arguments);
|
1065 | if (_react2.default.isValidElement(result)) {
|
1066 | return resolveStyles(component, result, config, existingKeyMap, true);
|
1067 | }
|
1068 | return result;
|
1069 | };
|
1070 | }
|
1071 |
|
1072 | if (_react2.default.Children.count(children) === 1 && children.type) {
|
1073 |
|
1074 |
|
1075 | var onlyChild = _react2.default.Children.only(children);
|
1076 | return resolveStyles(component, onlyChild, config, existingKeyMap, true);
|
1077 | }
|
1078 |
|
1079 | return _react2.default.Children.map(children, function (child) {
|
1080 | if (_react2.default.isValidElement(child)) {
|
1081 | return resolveStyles(component, child, config, existingKeyMap, true);
|
1082 | }
|
1083 |
|
1084 | return child;
|
1085 | });
|
1086 | };
|
1087 |
|
1088 |
|
1089 | var _resolveProps = function _resolveProps(_ref2) {
|
1090 | var component = _ref2.component,
|
1091 | config = _ref2.config,
|
1092 | existingKeyMap = _ref2.existingKeyMap,
|
1093 | props = _ref2.props;
|
1094 |
|
1095 | var newProps = props;
|
1096 |
|
1097 | Object.keys(props).forEach(function (prop) {
|
1098 |
|
1099 | if (prop === 'children') {
|
1100 | return;
|
1101 | }
|
1102 |
|
1103 | var propValue = props[prop];
|
1104 | if (_react2.default.isValidElement(propValue)) {
|
1105 | newProps = _extends({}, newProps);
|
1106 | newProps[prop] = resolveStyles(component, propValue, config, existingKeyMap, true);
|
1107 | }
|
1108 | });
|
1109 |
|
1110 | return newProps;
|
1111 | };
|
1112 |
|
1113 | var _buildGetKey = function _buildGetKey(_ref3) {
|
1114 | var componentName = _ref3.componentName,
|
1115 | existingKeyMap = _ref3.existingKeyMap,
|
1116 | renderedElement = _ref3.renderedElement;
|
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 | var originalKey = typeof renderedElement.ref === 'string' ? renderedElement.ref : renderedElement.key;
|
1122 | var key = (0, _getStateKey2.default)(originalKey);
|
1123 |
|
1124 | var alreadyGotKey = false;
|
1125 | var getKey = function getKey() {
|
1126 | if (alreadyGotKey) {
|
1127 | return key;
|
1128 | }
|
1129 |
|
1130 | alreadyGotKey = true;
|
1131 |
|
1132 | if (existingKeyMap[key]) {
|
1133 | var elementName = void 0;
|
1134 | if (typeof renderedElement.type === 'string') {
|
1135 | elementName = renderedElement.type;
|
1136 | } else if (renderedElement.type.constructor) {
|
1137 | elementName = renderedElement.type.constructor.displayName || renderedElement.type.constructor.name;
|
1138 | }
|
1139 |
|
1140 | throw new Error('Radium requires each element with interactive styles to have a unique ' + 'key, set using either the ref or key prop. ' + (originalKey ? 'Key "' + originalKey + '" is a duplicate.' : 'Multiple elements have no key specified.') + ' ' + 'Component: "' + componentName + '". ' + (elementName ? 'Element: "' + elementName + '".' : ''));
|
1141 | }
|
1142 |
|
1143 | existingKeyMap[key] = true;
|
1144 |
|
1145 | return key;
|
1146 | };
|
1147 |
|
1148 | return getKey;
|
1149 | };
|
1150 |
|
1151 | var _setStyleState = function _setStyleState(component, key, stateKey, value) {
|
1152 | if (!component._radiumIsMounted) {
|
1153 | return;
|
1154 | }
|
1155 |
|
1156 | var existing = component._lastRadiumState || component.state && component.state._radiumStyleState || {};
|
1157 |
|
1158 | var state = { _radiumStyleState: _extends({}, existing) };
|
1159 | state._radiumStyleState[key] = _extends({}, state._radiumStyleState[key]);
|
1160 | state._radiumStyleState[key][stateKey] = value;
|
1161 |
|
1162 | component._lastRadiumState = state._radiumStyleState;
|
1163 | component.setState(state);
|
1164 | };
|
1165 |
|
1166 | var _runPlugins = function _runPlugins(_ref4) {
|
1167 | var component = _ref4.component,
|
1168 | config = _ref4.config,
|
1169 | existingKeyMap = _ref4.existingKeyMap,
|
1170 | props = _ref4.props,
|
1171 | renderedElement = _ref4.renderedElement;
|
1172 |
|
1173 |
|
1174 |
|
1175 | if (!_react2.default.isValidElement(renderedElement) || typeof renderedElement.type !== 'string' || !props.style) {
|
1176 | return props;
|
1177 | }
|
1178 |
|
1179 | var newProps = props;
|
1180 |
|
1181 | var plugins = config.plugins || DEFAULT_CONFIG.plugins;
|
1182 |
|
1183 | var componentName = component.constructor.displayName || component.constructor.name;
|
1184 | var getKey = _buildGetKey({
|
1185 | renderedElement: renderedElement,
|
1186 | existingKeyMap: existingKeyMap,
|
1187 | componentName: componentName
|
1188 | });
|
1189 | var getComponentField = function getComponentField(key) {
|
1190 | return component[key];
|
1191 | };
|
1192 | var getGlobalState = function getGlobalState(key) {
|
1193 | return globalState[key];
|
1194 | };
|
1195 | var componentGetState = function componentGetState(stateKey, elementKey) {
|
1196 | return (0, _getState2.default)(component.state, elementKey || getKey(), stateKey);
|
1197 | };
|
1198 | var setState = function setState(stateKey, value, elementKey) {
|
1199 | return _setStyleState(component, elementKey || getKey(), stateKey, value);
|
1200 | };
|
1201 |
|
1202 | var addCSS = function addCSS(css) {
|
1203 | var styleKeeper = component._radiumStyleKeeper || component.context._radiumStyleKeeper;
|
1204 | if (!styleKeeper) {
|
1205 | if (__isTestModeEnabled) {
|
1206 | return {
|
1207 | remove: function remove() {}
|
1208 | };
|
1209 | }
|
1210 |
|
1211 | throw new Error('To use plugins requiring `addCSS` (e.g. keyframes, media queries), ' + 'please wrap your application in the StyleRoot component. Component ' + 'name: `' + componentName + '`.');
|
1212 | }
|
1213 |
|
1214 | return styleKeeper.addCSS(css);
|
1215 | };
|
1216 |
|
1217 | var newStyle = props.style;
|
1218 |
|
1219 | plugins.forEach(function (plugin) {
|
1220 | var result = plugin({
|
1221 | ExecutionEnvironment: _exenv2.default,
|
1222 | addCSS: addCSS,
|
1223 | appendImportantToEachValue: _appendImportantToEachValue2.default,
|
1224 | componentName: componentName,
|
1225 | config: config,
|
1226 | cssRuleSetToString: _cssRuleSetToString2.default,
|
1227 | getComponentField: getComponentField,
|
1228 | getGlobalState: getGlobalState,
|
1229 | getState: componentGetState,
|
1230 | hash: _hash2.default,
|
1231 | mergeStyles: _mergeStyles.mergeStyles,
|
1232 | props: newProps,
|
1233 | setState: setState,
|
1234 | isNestedStyle: _mergeStyles.isNestedStyle,
|
1235 | style: newStyle
|
1236 | }) || {};
|
1237 |
|
1238 | newStyle = result.style || newStyle;
|
1239 |
|
1240 | newProps = result.props && Object.keys(result.props).length ? _extends({}, newProps, result.props) : newProps;
|
1241 |
|
1242 | var newComponentFields = result.componentFields || {};
|
1243 | Object.keys(newComponentFields).forEach(function (fieldName) {
|
1244 | component[fieldName] = newComponentFields[fieldName];
|
1245 | });
|
1246 |
|
1247 | var newGlobalState = result.globalState || {};
|
1248 | Object.keys(newGlobalState).forEach(function (key) {
|
1249 | globalState[key] = newGlobalState[key];
|
1250 | });
|
1251 | });
|
1252 |
|
1253 | if (newStyle !== props.style) {
|
1254 | newProps = _extends({}, newProps, { style: newStyle });
|
1255 | }
|
1256 |
|
1257 | return newProps;
|
1258 | };
|
1259 |
|
1260 |
|
1261 |
|
1262 |
|
1263 | var _cloneElement = function _cloneElement(renderedElement, newProps, newChildren) {
|
1264 |
|
1265 | if (typeof renderedElement.type === 'string') {
|
1266 | newProps = _extends({}, newProps, { 'data-radium': true });
|
1267 | }
|
1268 |
|
1269 | return _react2.default.cloneElement(renderedElement, newProps, newChildren);
|
1270 | };
|
1271 |
|
1272 |
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 |
|
1279 | resolveStyles = function resolveStyles(component, // ReactComponent, flow+eslint complaining
|
1280 | renderedElement) {
|
1281 | var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_CONFIG;
|
1282 | var existingKeyMap = arguments[3];
|
1283 | var shouldCheckBeforeResolve = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
1284 |
|
1285 |
|
1286 | existingKeyMap = existingKeyMap || {};
|
1287 | if (!renderedElement ||
|
1288 |
|
1289 |
|
1290 |
|
1291 |
|
1292 | renderedElement.props && renderedElement.props['data-radium'] ||
|
1293 |
|
1294 |
|
1295 | shouldCheckBeforeResolve && !_shouldResolveStyles(renderedElement)) {
|
1296 | return renderedElement;
|
1297 | }
|
1298 |
|
1299 | var newChildren = _resolveChildren({
|
1300 | children: renderedElement.props.children,
|
1301 | component: component,
|
1302 | config: config,
|
1303 | existingKeyMap: existingKeyMap
|
1304 | });
|
1305 |
|
1306 | var newProps = _resolveProps({
|
1307 | component: component,
|
1308 | config: config,
|
1309 | existingKeyMap: existingKeyMap,
|
1310 | props: renderedElement.props
|
1311 | });
|
1312 |
|
1313 | newProps = _runPlugins({
|
1314 | component: component,
|
1315 | config: config,
|
1316 | existingKeyMap: existingKeyMap,
|
1317 | props: newProps,
|
1318 | renderedElement: renderedElement
|
1319 | });
|
1320 |
|
1321 |
|
1322 |
|
1323 |
|
1324 | if (newChildren === renderedElement.props.children && newProps === renderedElement.props) {
|
1325 | return renderedElement;
|
1326 | }
|
1327 |
|
1328 | return _cloneElement(renderedElement, newProps !== renderedElement.props ? newProps : {}, newChildren);
|
1329 | };
|
1330 |
|
1331 |
|
1332 | var __isTestModeEnabled = false;
|
1333 | if (process.env.NODE_ENV !== 'production') {
|
1334 | resolveStyles.__clearStateForTests = function () {
|
1335 | globalState = {};
|
1336 | };
|
1337 | resolveStyles.__setTestMode = function (isEnabled) {
|
1338 | __isTestModeEnabled = isEnabled;
|
1339 | };
|
1340 | }
|
1341 |
|
1342 | exports.default = resolveStyles;
|
1343 | module.exports = exports['default'];
|
1344 | }.call(exports, __webpack_require__(0)))
|
1345 |
|
1346 | }),
|
1347 |
|
1348 | (function(module, exports, __webpack_require__) {
|
1349 |
|
1350 | "use strict";
|
1351 | (function(process) { |
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 |
|
1359 |
|
1360 |
|
1361 |
|
1362 |
|
1363 | var emptyFunction = __webpack_require__(5);
|
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 |
|
1369 |
|
1370 |
|
1371 |
|
1372 | var warning = emptyFunction;
|
1373 |
|
1374 | if (process.env.NODE_ENV !== 'production') {
|
1375 | (function () {
|
1376 | var printWarning = function printWarning(format) {
|
1377 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
1378 | args[_key - 1] = arguments[_key];
|
1379 | }
|
1380 |
|
1381 | var argIndex = 0;
|
1382 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
1383 | return args[argIndex++];
|
1384 | });
|
1385 | if (typeof console !== 'undefined') {
|
1386 | console.error(message);
|
1387 | }
|
1388 | try {
|
1389 |
|
1390 |
|
1391 |
|
1392 | throw new Error(message);
|
1393 | } catch (x) {}
|
1394 | };
|
1395 |
|
1396 | warning = function warning(condition, format) {
|
1397 | if (format === undefined) {
|
1398 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
1399 | }
|
1400 |
|
1401 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
1402 | return;
|
1403 | }
|
1404 |
|
1405 | if (!condition) {
|
1406 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
1407 | args[_key2 - 2] = arguments[_key2];
|
1408 | }
|
1409 |
|
1410 | printWarning.apply(undefined, [format].concat(args));
|
1411 | }
|
1412 | };
|
1413 | })();
|
1414 | }
|
1415 |
|
1416 | module.exports = warning;
|
1417 | }.call(exports, __webpack_require__(0)))
|
1418 |
|
1419 | }),
|
1420 |
|
1421 | (function(module, exports, __webpack_require__) {
|
1422 |
|
1423 | "use strict";
|
1424 |
|
1425 |
|
1426 | var uppercasePattern = /[A-Z]/g;
|
1427 | var msPattern = /^ms-/;
|
1428 | var cache = {};
|
1429 |
|
1430 | function hyphenateStyleName(string) {
|
1431 | return string in cache ? cache[string] : cache[string] = string.replace(uppercasePattern, '-$&').toLowerCase().replace(msPattern, '-ms-');
|
1432 | }
|
1433 |
|
1434 | module.exports = hyphenateStyleName;
|
1435 |
|
1436 | }),
|
1437 |
|
1438 | (function(module, exports, __webpack_require__) {
|
1439 |
|
1440 | "use strict";
|
1441 |
|
1442 |
|
1443 | Object.defineProperty(exports, "__esModule", {
|
1444 | value: true
|
1445 | });
|
1446 | exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } };
|
1447 | module.exports = exports["default"];
|
1448 |
|
1449 | }),
|
1450 |
|
1451 | (function(module, exports, __webpack_require__) {
|
1452 |
|
1453 | "use strict";
|
1454 |
|
1455 |
|
1456 | Object.defineProperty(exports, "__esModule", {
|
1457 | value: true
|
1458 | });
|
1459 | exports.default = sortPrefixedStyle;
|
1460 |
|
1461 | var _isPrefixedProperty = __webpack_require__(55);
|
1462 |
|
1463 | var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty);
|
1464 |
|
1465 | function _interopRequireDefault(obj) {
|
1466 | return obj && obj.__esModule ? obj : { default: obj };
|
1467 | }
|
1468 |
|
1469 | function sortPrefixedStyle(style) {
|
1470 | return Object.keys(style).sort(function (left, right) {
|
1471 | if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) {
|
1472 | return -1;
|
1473 | } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) {
|
1474 | return 1;
|
1475 | }
|
1476 | return 0;
|
1477 | }).reduce(function (sortedStyle, prop) {
|
1478 | sortedStyle[prop] = style[prop];
|
1479 | return sortedStyle;
|
1480 | }, {});
|
1481 | }
|
1482 | module.exports = exports['default'];
|
1483 |
|
1484 | }),
|
1485 |
|
1486 | (function(module, exports, __webpack_require__) {
|
1487 |
|
1488 | "use strict";
|
1489 |
|
1490 |
|
1491 |
|
1492 |
|
1493 |
|
1494 |
|
1495 |
|
1496 |
|
1497 |
|
1498 |
|
1499 |
|
1500 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
1501 |
|
1502 | module.exports = ReactPropTypesSecret;
|
1503 |
|
1504 | }),
|
1505 |
|
1506 | (function(module, exports, __webpack_require__) {
|
1507 |
|
1508 | "use strict";
|
1509 |
|
1510 |
|
1511 | Object.defineProperty(exports, "__esModule", {
|
1512 | value: true
|
1513 | });
|
1514 | exports.default = appendPxIfNeeded;
|
1515 |
|
1516 |
|
1517 |
|
1518 |
|
1519 |
|
1520 | var isUnitlessNumber = {
|
1521 | animationIterationCount: true,
|
1522 | boxFlex: true,
|
1523 | boxFlexGroup: true,
|
1524 | boxOrdinalGroup: true,
|
1525 | columnCount: true,
|
1526 | flex: true,
|
1527 | flexGrow: true,
|
1528 | flexPositive: true,
|
1529 | flexShrink: true,
|
1530 | flexNegative: true,
|
1531 | flexOrder: true,
|
1532 | gridRow: true,
|
1533 | gridColumn: true,
|
1534 | fontWeight: true,
|
1535 | lineClamp: true,
|
1536 | lineHeight: true,
|
1537 | opacity: true,
|
1538 | order: true,
|
1539 | orphans: true,
|
1540 | tabSize: true,
|
1541 | widows: true,
|
1542 | zIndex: true,
|
1543 | zoom: true,
|
1544 |
|
1545 |
|
1546 | fillOpacity: true,
|
1547 | stopOpacity: true,
|
1548 | strokeDashoffset: true,
|
1549 | strokeOpacity: true,
|
1550 | strokeWidth: true
|
1551 | };
|
1552 |
|
1553 | function appendPxIfNeeded(propertyName, value) {
|
1554 | var needsPxSuffix = !isUnitlessNumber[propertyName] && typeof value === 'number' && value !== 0;
|
1555 | return needsPxSuffix ? value + 'px' : value;
|
1556 | }
|
1557 | module.exports = exports['default'];
|
1558 |
|
1559 | }),
|
1560 |
|
1561 | (function(module, exports, __webpack_require__) {
|
1562 |
|
1563 | "use strict";
|
1564 |
|
1565 |
|
1566 | Object.defineProperty(exports, "__esModule", {
|
1567 | value: true
|
1568 | });
|
1569 | var getStateKey = function getStateKey(elementKey) {
|
1570 | return elementKey === null || elementKey === undefined ? 'main' : elementKey.toString();
|
1571 | };
|
1572 |
|
1573 | exports.default = getStateKey;
|
1574 | module.exports = exports['default'];
|
1575 |
|
1576 | }),
|
1577 |
|
1578 | (function(module, exports, __webpack_require__) {
|
1579 |
|
1580 | "use strict";
|
1581 |
|
1582 |
|
1583 | Object.defineProperty(exports, "__esModule", {
|
1584 | value: true
|
1585 | });
|
1586 | exports.default = hash;
|
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 | function hash(text) {
|
1593 | if (!text) {
|
1594 | return '';
|
1595 | }
|
1596 |
|
1597 | var hashValue = 5381;
|
1598 | var index = text.length - 1;
|
1599 |
|
1600 | while (index) {
|
1601 | hashValue = hashValue * 33 ^ text.charCodeAt(index);
|
1602 | index -= 1;
|
1603 | }
|
1604 |
|
1605 | return (hashValue >>> 0).toString(16);
|
1606 | }
|
1607 | module.exports = exports['default'];
|
1608 |
|
1609 | }),
|
1610 |
|
1611 | (function(module, exports, __webpack_require__) {
|
1612 |
|
1613 | "use strict";
|
1614 |
|
1615 |
|
1616 | Object.defineProperty(exports, "__esModule", {
|
1617 | value: true
|
1618 | });
|
1619 | exports.default = mapObject;
|
1620 | function mapObject(object, mapper) {
|
1621 | return Object.keys(object).reduce(function (result, key) {
|
1622 | result[key] = mapper(object[key], key);
|
1623 | return result;
|
1624 | }, {});
|
1625 | }
|
1626 | module.exports = exports["default"];
|
1627 |
|
1628 | }),
|
1629 |
|
1630 | (function(module, exports) {
|
1631 |
|
1632 | (function(__webpack_amd_options__) {
|
1633 | module.exports = __webpack_amd_options__;
|
1634 |
|
1635 | }.call(exports, {}))
|
1636 |
|
1637 | }),
|
1638 |
|
1639 | (function(module, exports, __webpack_require__) {
|
1640 |
|
1641 | "use strict";
|
1642 |
|
1643 |
|
1644 | Object.defineProperty(exports, "__esModule", {
|
1645 | value: true
|
1646 | });
|
1647 |
|
1648 | var _react = __webpack_require__(2);
|
1649 |
|
1650 | var _react2 = _interopRequireDefault(_react);
|
1651 |
|
1652 | var _propTypes = __webpack_require__(4);
|
1653 |
|
1654 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
1655 |
|
1656 | var _enhancer = __webpack_require__(12);
|
1657 |
|
1658 | var _enhancer2 = _interopRequireDefault(_enhancer);
|
1659 |
|
1660 | var _styleKeeper = __webpack_require__(11);
|
1661 |
|
1662 | var _styleKeeper2 = _interopRequireDefault(_styleKeeper);
|
1663 |
|
1664 | var _styleSheet = __webpack_require__(63);
|
1665 |
|
1666 | var _styleSheet2 = _interopRequireDefault(_styleSheet);
|
1667 |
|
1668 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1669 |
|
1670 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
1671 |
|
1672 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
1673 |
|
1674 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
1675 |
|
1676 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
1677 |
|
1678 | function _getStyleKeeper(instance) {
|
1679 | if (!instance._radiumStyleKeeper) {
|
1680 | var userAgent = instance.props.radiumConfig && instance.props.radiumConfig.userAgent || instance.context._radiumConfig && instance.context._radiumConfig.userAgent;
|
1681 | instance._radiumStyleKeeper = new _styleKeeper2.default(userAgent);
|
1682 | }
|
1683 |
|
1684 | return instance._radiumStyleKeeper;
|
1685 | }
|
1686 |
|
1687 | var StyleRoot = function (_PureComponent) {
|
1688 | _inherits(StyleRoot, _PureComponent);
|
1689 |
|
1690 | function StyleRoot() {
|
1691 | _classCallCheck(this, StyleRoot);
|
1692 |
|
1693 | var _this = _possibleConstructorReturn(this, _PureComponent.apply(this, arguments));
|
1694 |
|
1695 | _getStyleKeeper(_this);
|
1696 | return _this;
|
1697 | }
|
1698 |
|
1699 | StyleRoot.prototype.getChildContext = function getChildContext() {
|
1700 | return { _radiumStyleKeeper: _getStyleKeeper(this) };
|
1701 | };
|
1702 |
|
1703 | StyleRoot.prototype.render = function render() {
|
1704 |
|
1705 |
|
1706 | var _props = this.props,
|
1707 | radiumConfig = _props.radiumConfig,
|
1708 | otherProps = _objectWithoutProperties(_props, ['radiumConfig']);
|
1709 |
|
1710 |
|
1711 | return _react2.default.createElement(
|
1712 | 'div',
|
1713 | otherProps,
|
1714 | this.props.children,
|
1715 | _react2.default.createElement(_styleSheet2.default, null)
|
1716 | );
|
1717 | };
|
1718 |
|
1719 | return StyleRoot;
|
1720 | }(_react.PureComponent);
|
1721 |
|
1722 | StyleRoot.contextTypes = {
|
1723 | _radiumConfig: _propTypes2.default.object,
|
1724 | _radiumStyleKeeper: _propTypes2.default.instanceOf(_styleKeeper2.default)
|
1725 | };
|
1726 |
|
1727 | StyleRoot.childContextTypes = {
|
1728 | _radiumStyleKeeper: _propTypes2.default.instanceOf(_styleKeeper2.default)
|
1729 | };
|
1730 |
|
1731 | StyleRoot = (0, _enhancer2.default)(StyleRoot);
|
1732 |
|
1733 | exports.default = StyleRoot;
|
1734 | module.exports = exports['default'];
|
1735 |
|
1736 | }),
|
1737 |
|
1738 | (function(module, exports, __webpack_require__) {
|
1739 |
|
1740 | "use strict";
|
1741 |
|
1742 |
|
1743 | Object.defineProperty(exports, "__esModule", {
|
1744 | value: true
|
1745 | });
|
1746 |
|
1747 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
1748 |
|
1749 | var _class, _temp;
|
1750 |
|
1751 | var _cssRuleSetToString = __webpack_require__(9);
|
1752 |
|
1753 | var _cssRuleSetToString2 = _interopRequireDefault(_cssRuleSetToString);
|
1754 |
|
1755 | var _react = __webpack_require__(2);
|
1756 |
|
1757 | var _react2 = _interopRequireDefault(_react);
|
1758 |
|
1759 | var _propTypes = __webpack_require__(4);
|
1760 |
|
1761 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
1762 |
|
1763 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1764 |
|
1765 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
1766 |
|
1767 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
1768 |
|
1769 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
1770 |
|
1771 | var Style = (_temp = _class = function (_PureComponent) {
|
1772 | _inherits(Style, _PureComponent);
|
1773 |
|
1774 | function Style() {
|
1775 | _classCallCheck(this, Style);
|
1776 |
|
1777 | return _possibleConstructorReturn(this, _PureComponent.apply(this, arguments));
|
1778 | }
|
1779 |
|
1780 | Style.prototype._buildStyles = function _buildStyles(styles) {
|
1781 | var _this2 = this;
|
1782 |
|
1783 | var userAgent = this.props.radiumConfig && this.props.radiumConfig.userAgent || this.context && this.context._radiumConfig && this.context._radiumConfig.userAgent;
|
1784 |
|
1785 | var scopeSelector = this.props.scopeSelector;
|
1786 |
|
1787 | var rootRules = Object.keys(styles).reduce(function (accumulator, selector) {
|
1788 | if (_typeof(styles[selector]) !== 'object') {
|
1789 | accumulator[selector] = styles[selector];
|
1790 | }
|
1791 |
|
1792 | return accumulator;
|
1793 | }, {});
|
1794 | var rootStyles = Object.keys(rootRules).length ? (0, _cssRuleSetToString2.default)(scopeSelector || '', rootRules, userAgent) : '';
|
1795 |
|
1796 | return rootStyles + Object.keys(styles).reduce(function (accumulator, selector) {
|
1797 | var rules = styles[selector];
|
1798 |
|
1799 | if (selector === 'mediaQueries') {
|
1800 | accumulator += _this2._buildMediaQueryString(rules);
|
1801 | } else if (_typeof(styles[selector]) === 'object') {
|
1802 | var completeSelector = scopeSelector ? selector.split(',').map(function (part) {
|
1803 | return scopeSelector + ' ' + part.trim();
|
1804 | }).join(',') : selector;
|
1805 |
|
1806 | accumulator += (0, _cssRuleSetToString2.default)(completeSelector, rules, userAgent);
|
1807 | }
|
1808 |
|
1809 | return accumulator;
|
1810 | }, '');
|
1811 | };
|
1812 |
|
1813 | Style.prototype._buildMediaQueryString = function _buildMediaQueryString(stylesByMediaQuery) {
|
1814 | var _this3 = this;
|
1815 |
|
1816 | var mediaQueryString = '';
|
1817 |
|
1818 | Object.keys(stylesByMediaQuery).forEach(function (query) {
|
1819 | mediaQueryString += '@media ' + query + '{' + _this3._buildStyles(stylesByMediaQuery[query]) + '}';
|
1820 | });
|
1821 |
|
1822 | return mediaQueryString;
|
1823 | };
|
1824 |
|
1825 | Style.prototype.render = function render() {
|
1826 | if (!this.props.rules) {
|
1827 | return null;
|
1828 | }
|
1829 |
|
1830 | var styles = this._buildStyles(this.props.rules);
|
1831 |
|
1832 | return _react2.default.createElement('style', { dangerouslySetInnerHTML: { __html: styles } });
|
1833 | };
|
1834 |
|
1835 | return Style;
|
1836 | }(_react.PureComponent), _class.propTypes = {
|
1837 | radiumConfig: _propTypes2.default.object,
|
1838 | rules: _propTypes2.default.object,
|
1839 | scopeSelector: _propTypes2.default.string
|
1840 | }, _class.contextTypes = {
|
1841 | _radiumConfig: _propTypes2.default.object
|
1842 | }, _class.defaultProps = {
|
1843 | scopeSelector: ''
|
1844 | }, _temp);
|
1845 | exports.default = Style;
|
1846 | module.exports = exports['default'];
|
1847 |
|
1848 | }),
|
1849 |
|
1850 | (function(module, exports, __webpack_require__) {
|
1851 |
|
1852 | "use strict";
|
1853 |
|
1854 |
|
1855 | Object.defineProperty(exports, "__esModule", {
|
1856 | value: true
|
1857 | });
|
1858 | exports.default = keyframes;
|
1859 |
|
1860 | var _cssRuleSetToString = __webpack_require__(9);
|
1861 |
|
1862 | var _cssRuleSetToString2 = _interopRequireDefault(_cssRuleSetToString);
|
1863 |
|
1864 | var _hash = __webpack_require__(23);
|
1865 |
|
1866 | var _hash2 = _interopRequireDefault(_hash);
|
1867 |
|
1868 | var _prefixer = __webpack_require__(10);
|
1869 |
|
1870 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1871 |
|
1872 | function keyframes(keyframeRules, name) {
|
1873 | return {
|
1874 | __radiumKeyframes: true,
|
1875 | __process: function __process(userAgent) {
|
1876 | var keyframesPrefixed = (0, _prefixer.getPrefixedKeyframes)(userAgent);
|
1877 | var rules = Object.keys(keyframeRules).map(function (percentage) {
|
1878 | return (0, _cssRuleSetToString2.default)(percentage, keyframeRules[percentage], userAgent);
|
1879 | }).join('\n');
|
1880 | var animationName = (name ? name + '-' : '') + 'radium-animation-' + (0, _hash2.default)(rules);
|
1881 | var css = '@' + keyframesPrefixed + ' ' + animationName + ' {\n' + rules + '\n}\n';
|
1882 | return { css: css, animationName: animationName };
|
1883 | }
|
1884 | };
|
1885 | }
|
1886 |
|
1887 | module.exports = exports['default'];
|
1888 |
|
1889 | }),
|
1890 |
|
1891 | (function(module, exports, __webpack_require__) {
|
1892 |
|
1893 | "use strict";
|
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 | !function (root, name, definition) {
|
1903 | if (typeof module != 'undefined' && module.exports) module.exports = definition();else if (true) __webpack_require__(75)(name, definition);else root[name] = definition();
|
1904 | }(undefined, 'bowser', function () {
|
1905 | |
1906 |
|
1907 |
|
1908 |
|
1909 | var t = true;
|
1910 |
|
1911 | function detect(ua) {
|
1912 |
|
1913 | function getFirstMatch(regex) {
|
1914 | var match = ua.match(regex);
|
1915 | return match && match.length > 1 && match[1] || '';
|
1916 | }
|
1917 |
|
1918 | function getSecondMatch(regex) {
|
1919 | var match = ua.match(regex);
|
1920 | return match && match.length > 1 && match[2] || '';
|
1921 | }
|
1922 |
|
1923 | var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase(),
|
1924 | likeAndroid = /like android/i.test(ua),
|
1925 | android = !likeAndroid && /android/i.test(ua),
|
1926 | nexusMobile = /nexus\s*[0-6]\s*/i.test(ua),
|
1927 | nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua),
|
1928 | chromeos = /CrOS/.test(ua),
|
1929 | silk = /silk/i.test(ua),
|
1930 | sailfish = /sailfish/i.test(ua),
|
1931 | tizen = /tizen/i.test(ua),
|
1932 | webos = /(web|hpw)os/i.test(ua),
|
1933 | windowsphone = /windows phone/i.test(ua),
|
1934 | samsungBrowser = /SamsungBrowser/i.test(ua),
|
1935 | windows = !windowsphone && /windows/i.test(ua),
|
1936 | mac = !iosdevice && !silk && /macintosh/i.test(ua),
|
1937 | linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua),
|
1938 | edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i),
|
1939 | versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i),
|
1940 | tablet = /tablet/i.test(ua),
|
1941 | mobile = !tablet && /[^-]mobi/i.test(ua),
|
1942 | xbox = /xbox/i.test(ua),
|
1943 | result;
|
1944 |
|
1945 | if (/opera/i.test(ua)) {
|
1946 |
|
1947 | result = {
|
1948 | name: 'Opera',
|
1949 | opera: t,
|
1950 | version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)
|
1951 | };
|
1952 | } else if (/opr|opios/i.test(ua)) {
|
1953 |
|
1954 | result = {
|
1955 | name: 'Opera',
|
1956 | opera: t,
|
1957 | version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier
|
1958 | };
|
1959 | } else if (/SamsungBrowser/i.test(ua)) {
|
1960 | result = {
|
1961 | name: 'Samsung Internet for Android',
|
1962 | samsungBrowser: t,
|
1963 | version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)
|
1964 | };
|
1965 | } else if (/coast/i.test(ua)) {
|
1966 | result = {
|
1967 | name: 'Opera Coast',
|
1968 | coast: t,
|
1969 | version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i)
|
1970 | };
|
1971 | } else if (/yabrowser/i.test(ua)) {
|
1972 | result = {
|
1973 | name: 'Yandex Browser',
|
1974 | yandexbrowser: t,
|
1975 | version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)
|
1976 | };
|
1977 | } else if (/ucbrowser/i.test(ua)) {
|
1978 | result = {
|
1979 | name: 'UC Browser',
|
1980 | ucbrowser: t,
|
1981 | version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)
|
1982 | };
|
1983 | } else if (/mxios/i.test(ua)) {
|
1984 | result = {
|
1985 | name: 'Maxthon',
|
1986 | maxthon: t,
|
1987 | version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)
|
1988 | };
|
1989 | } else if (/epiphany/i.test(ua)) {
|
1990 | result = {
|
1991 | name: 'Epiphany',
|
1992 | epiphany: t,
|
1993 | version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)
|
1994 | };
|
1995 | } else if (/puffin/i.test(ua)) {
|
1996 | result = {
|
1997 | name: 'Puffin',
|
1998 | puffin: t,
|
1999 | version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)
|
2000 | };
|
2001 | } else if (/sleipnir/i.test(ua)) {
|
2002 | result = {
|
2003 | name: 'Sleipnir',
|
2004 | sleipnir: t,
|
2005 | version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)
|
2006 | };
|
2007 | } else if (/k-meleon/i.test(ua)) {
|
2008 | result = {
|
2009 | name: 'K-Meleon',
|
2010 | kMeleon: t,
|
2011 | version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)
|
2012 | };
|
2013 | } else if (windowsphone) {
|
2014 | result = {
|
2015 | name: 'Windows Phone',
|
2016 | windowsphone: t
|
2017 | };
|
2018 | if (edgeVersion) {
|
2019 | result.msedge = t;
|
2020 | result.version = edgeVersion;
|
2021 | } else {
|
2022 | result.msie = t;
|
2023 | result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i);
|
2024 | }
|
2025 | } else if (/msie|trident/i.test(ua)) {
|
2026 | result = {
|
2027 | name: 'Internet Explorer',
|
2028 | msie: t,
|
2029 | version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)
|
2030 | };
|
2031 | } else if (chromeos) {
|
2032 | result = {
|
2033 | name: 'Chrome',
|
2034 | chromeos: t,
|
2035 | chromeBook: t,
|
2036 | chrome: t,
|
2037 | version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
|
2038 | };
|
2039 | } else if (/chrome.+? edge/i.test(ua)) {
|
2040 | result = {
|
2041 | name: 'Microsoft Edge',
|
2042 | msedge: t,
|
2043 | version: edgeVersion
|
2044 | };
|
2045 | } else if (/vivaldi/i.test(ua)) {
|
2046 | result = {
|
2047 | name: 'Vivaldi',
|
2048 | vivaldi: t,
|
2049 | version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier
|
2050 | };
|
2051 | } else if (sailfish) {
|
2052 | result = {
|
2053 | name: 'Sailfish',
|
2054 | sailfish: t,
|
2055 | version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i)
|
2056 | };
|
2057 | } else if (/seamonkey\//i.test(ua)) {
|
2058 | result = {
|
2059 | name: 'SeaMonkey',
|
2060 | seamonkey: t,
|
2061 | version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)
|
2062 | };
|
2063 | } else if (/firefox|iceweasel|fxios/i.test(ua)) {
|
2064 | result = {
|
2065 | name: 'Firefox',
|
2066 | firefox: t,
|
2067 | version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)
|
2068 | };
|
2069 | if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) {
|
2070 | result.firefoxos = t;
|
2071 | }
|
2072 | } else if (silk) {
|
2073 | result = {
|
2074 | name: 'Amazon Silk',
|
2075 | silk: t,
|
2076 | version: getFirstMatch(/silk\/(\d+(\.\d+)?)/i)
|
2077 | };
|
2078 | } else if (/phantom/i.test(ua)) {
|
2079 | result = {
|
2080 | name: 'PhantomJS',
|
2081 | phantom: t,
|
2082 | version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i)
|
2083 | };
|
2084 | } else if (/slimerjs/i.test(ua)) {
|
2085 | result = {
|
2086 | name: 'SlimerJS',
|
2087 | slimer: t,
|
2088 | version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i)
|
2089 | };
|
2090 | } else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) {
|
2091 | result = {
|
2092 | name: 'BlackBerry',
|
2093 | blackberry: t,
|
2094 | version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i)
|
2095 | };
|
2096 | } else if (webos) {
|
2097 | result = {
|
2098 | name: 'WebOS',
|
2099 | webos: t,
|
2100 | version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)
|
2101 | };
|
2102 | /touchpad\
|
2103 | } else if (/bada/i.test(ua)) {
|
2104 | result = {
|
2105 | name: 'Bada',
|
2106 | bada: t,
|
2107 | version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i)
|
2108 | };
|
2109 | } else if (tizen) {
|
2110 | result = {
|
2111 | name: 'Tizen',
|
2112 | tizen: t,
|
2113 | version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier
|
2114 | };
|
2115 | } else if (/qupzilla/i.test(ua)) {
|
2116 | result = {
|
2117 | name: 'QupZilla',
|
2118 | qupzilla: t,
|
2119 | version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier
|
2120 | };
|
2121 | } else if (/chromium/i.test(ua)) {
|
2122 | result = {
|
2123 | name: 'Chromium',
|
2124 | chromium: t,
|
2125 | version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier
|
2126 | };
|
2127 | } else if (/chrome|crios|crmo/i.test(ua)) {
|
2128 | result = {
|
2129 | name: 'Chrome',
|
2130 | chrome: t,
|
2131 | version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
|
2132 | };
|
2133 | } else if (android) {
|
2134 | result = {
|
2135 | name: 'Android',
|
2136 | version: versionIdentifier
|
2137 | };
|
2138 | } else if (/safari|applewebkit/i.test(ua)) {
|
2139 | result = {
|
2140 | name: 'Safari',
|
2141 | safari: t
|
2142 | };
|
2143 | if (versionIdentifier) {
|
2144 | result.version = versionIdentifier;
|
2145 | }
|
2146 | } else if (iosdevice) {
|
2147 | result = {
|
2148 | name: iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'
|
2149 | };
|
2150 |
|
2151 | if (versionIdentifier) {
|
2152 | result.version = versionIdentifier;
|
2153 | }
|
2154 | } else if (/googlebot/i.test(ua)) {
|
2155 | result = {
|
2156 | name: 'Googlebot',
|
2157 | googlebot: t,
|
2158 | version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier
|
2159 | };
|
2160 | } else {
|
2161 | result = {
|
2162 | name: getFirstMatch(/^(.*)\/(.*) /),
|
2163 | version: getSecondMatch(/^(.*)\/(.*) /)
|
2164 | };
|
2165 | }
|
2166 |
|
2167 |
|
2168 | if (!result.msedge && /(apple)?webkit/i.test(ua)) {
|
2169 | if (/(apple)?webkit\/537\.36/i.test(ua)) {
|
2170 | result.name = result.name || "Blink";
|
2171 | result.blink = t;
|
2172 | } else {
|
2173 | result.name = result.name || "Webkit";
|
2174 | result.webkit = t;
|
2175 | }
|
2176 | if (!result.version && versionIdentifier) {
|
2177 | result.version = versionIdentifier;
|
2178 | }
|
2179 | } else if (!result.opera && /gecko\//i.test(ua)) {
|
2180 | result.name = result.name || "Gecko";
|
2181 | result.gecko = t;
|
2182 | result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i);
|
2183 | }
|
2184 |
|
2185 |
|
2186 | if (!result.windowsphone && !result.msedge && (android || result.silk)) {
|
2187 | result.android = t;
|
2188 | } else if (!result.windowsphone && !result.msedge && iosdevice) {
|
2189 | result[iosdevice] = t;
|
2190 | result.ios = t;
|
2191 | } else if (mac) {
|
2192 | result.mac = t;
|
2193 | } else if (xbox) {
|
2194 | result.xbox = t;
|
2195 | } else if (windows) {
|
2196 | result.windows = t;
|
2197 | } else if (linux) {
|
2198 | result.linux = t;
|
2199 | }
|
2200 |
|
2201 |
|
2202 | var osVersion = '';
|
2203 | if (result.windowsphone) {
|
2204 | osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);
|
2205 | } else if (iosdevice) {
|
2206 | osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);
|
2207 | osVersion = osVersion.replace(/[_\s]/g, '.');
|
2208 | } else if (android) {
|
2209 | osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i);
|
2210 | } else if (result.webos) {
|
2211 | osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);
|
2212 | } else if (result.blackberry) {
|
2213 | osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i);
|
2214 | } else if (result.bada) {
|
2215 | osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i);
|
2216 | } else if (result.tizen) {
|
2217 | osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);
|
2218 | }
|
2219 | if (osVersion) {
|
2220 | result.osversion = osVersion;
|
2221 | }
|
2222 |
|
2223 |
|
2224 | var osMajorVersion = osVersion.split('.')[0];
|
2225 | if (tablet || nexusTablet || iosdevice == 'ipad' || android && (osMajorVersion == 3 || osMajorVersion >= 4 && !mobile) || result.silk) {
|
2226 | result.tablet = t;
|
2227 | } else if (mobile || iosdevice == 'iphone' || iosdevice == 'ipod' || android || nexusMobile || result.blackberry || result.webos || result.bada) {
|
2228 | result.mobile = t;
|
2229 | }
|
2230 |
|
2231 |
|
2232 |
|
2233 | if (result.msedge || result.msie && result.version >= 10 || result.yandexbrowser && result.version >= 15 || result.vivaldi && result.version >= 1.0 || result.chrome && result.version >= 20 || result.samsungBrowser && result.version >= 4 || result.firefox && result.version >= 20.0 || result.safari && result.version >= 6 || result.opera && result.version >= 10.0 || result.ios && result.osversion && result.osversion.split(".")[0] >= 6 || result.blackberry && result.version >= 10.1 || result.chromium && result.version >= 20) {
|
2234 | result.a = t;
|
2235 | } else if (result.msie && result.version < 10 || result.chrome && result.version < 20 || result.firefox && result.version < 20.0 || result.safari && result.version < 6 || result.opera && result.version < 10.0 || result.ios && result.osversion && result.osversion.split(".")[0] < 6 || result.chromium && result.version < 20) {
|
2236 | result.c = t;
|
2237 | } else result.x = t;
|
2238 |
|
2239 | return result;
|
2240 | }
|
2241 |
|
2242 | var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '');
|
2243 |
|
2244 | bowser.test = function (browserList) {
|
2245 | for (var i = 0; i < browserList.length; ++i) {
|
2246 | var browserItem = browserList[i];
|
2247 | if (typeof browserItem === 'string') {
|
2248 | if (browserItem in bowser) {
|
2249 | return true;
|
2250 | }
|
2251 | }
|
2252 | }
|
2253 | return false;
|
2254 | };
|
2255 |
|
2256 | |
2257 |
|
2258 |
|
2259 |
|
2260 |
|
2261 |
|
2262 |
|
2263 |
|
2264 |
|
2265 | function getVersionPrecision(version) {
|
2266 | return version.split(".").length;
|
2267 | }
|
2268 |
|
2269 | |
2270 |
|
2271 |
|
2272 |
|
2273 |
|
2274 |
|
2275 |
|
2276 | function map(arr, iterator) {
|
2277 | var result = [],
|
2278 | i;
|
2279 | if (Array.prototype.map) {
|
2280 | return Array.prototype.map.call(arr, iterator);
|
2281 | }
|
2282 | for (i = 0; i < arr.length; i++) {
|
2283 | result.push(iterator(arr[i]));
|
2284 | }
|
2285 | return result;
|
2286 | }
|
2287 |
|
2288 | |
2289 |
|
2290 |
|
2291 |
|
2292 |
|
2293 |
|
2294 |
|
2295 |
|
2296 |
|
2297 |
|
2298 |
|
2299 |
|
2300 | function compareVersions(versions) {
|
2301 |
|
2302 | var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));
|
2303 | var chunks = map(versions, function (version) {
|
2304 | var delta = precision - getVersionPrecision(version);
|
2305 |
|
2306 |
|
2307 | version = version + new Array(delta + 1).join(".0");
|
2308 |
|
2309 |
|
2310 | return map(version.split("."), function (chunk) {
|
2311 | return new Array(20 - chunk.length).join("0") + chunk;
|
2312 | }).reverse();
|
2313 | });
|
2314 |
|
2315 |
|
2316 | while (--precision >= 0) {
|
2317 |
|
2318 | if (chunks[0][precision] > chunks[1][precision]) {
|
2319 | return 1;
|
2320 | } else if (chunks[0][precision] === chunks[1][precision]) {
|
2321 | if (precision === 0) {
|
2322 |
|
2323 | return 0;
|
2324 | }
|
2325 | } else {
|
2326 | return -1;
|
2327 | }
|
2328 | }
|
2329 | }
|
2330 |
|
2331 | |
2332 |
|
2333 |
|
2334 |
|
2335 |
|
2336 |
|
2337 |
|
2338 |
|
2339 |
|
2340 |
|
2341 |
|
2342 |
|
2343 |
|
2344 |
|
2345 |
|
2346 |
|
2347 |
|
2348 |
|
2349 | function isUnsupportedBrowser(minVersions, strictMode, ua) {
|
2350 | var _bowser = bowser;
|
2351 |
|
2352 |
|
2353 | if (typeof strictMode === 'string') {
|
2354 | ua = strictMode;
|
2355 | strictMode = void 0;
|
2356 | }
|
2357 |
|
2358 | if (strictMode === void 0) {
|
2359 | strictMode = false;
|
2360 | }
|
2361 | if (ua) {
|
2362 | _bowser = detect(ua);
|
2363 | }
|
2364 |
|
2365 | var version = "" + _bowser.version;
|
2366 | for (var browser in minVersions) {
|
2367 | if (minVersions.hasOwnProperty(browser)) {
|
2368 | if (_bowser[browser]) {
|
2369 | if (typeof minVersions[browser] !== 'string') {
|
2370 | throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));
|
2371 | }
|
2372 |
|
2373 |
|
2374 | return compareVersions([version, minVersions[browser]]) < 0;
|
2375 | }
|
2376 | }
|
2377 | }
|
2378 |
|
2379 | return strictMode;
|
2380 | }
|
2381 |
|
2382 | |
2383 |
|
2384 |
|
2385 |
|
2386 |
|
2387 |
|
2388 |
|
2389 |
|
2390 | function check(minVersions, strictMode, ua) {
|
2391 | return !isUnsupportedBrowser(minVersions, strictMode, ua);
|
2392 | }
|
2393 |
|
2394 | bowser.isUnsupportedBrowser = isUnsupportedBrowser;
|
2395 | bowser.compareVersions = compareVersions;
|
2396 | bowser.check = check;
|
2397 |
|
2398 | |
2399 |
|
2400 |
|
2401 |
|
2402 |
|
2403 | bowser._detect = detect;
|
2404 |
|
2405 | return bowser;
|
2406 | });
|
2407 |
|
2408 | }),
|
2409 |
|
2410 | (function(module, exports, __webpack_require__) {
|
2411 |
|
2412 | "use strict";
|
2413 | var __WEBPACK_AMD_DEFINE_RESULT__;
|
2414 |
|
2415 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
2416 |
|
2417 |
|
2418 |
|
2419 |
|
2420 |
|
2421 |
|
2422 |
|
2423 |
|
2424 | (function () {
|
2425 | 'use strict';
|
2426 |
|
2427 | var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
2428 |
|
2429 | var ExecutionEnvironment = {
|
2430 |
|
2431 | canUseDOM: canUseDOM,
|
2432 |
|
2433 | canUseWorkers: typeof Worker !== 'undefined',
|
2434 |
|
2435 | canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
|
2436 |
|
2437 | canUseViewport: canUseDOM && !!window.screen
|
2438 |
|
2439 | };
|
2440 |
|
2441 | if ("function" === 'function' && _typeof(__webpack_require__(25)) === 'object' && __webpack_require__(25)) {
|
2442 | !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {
|
2443 | return ExecutionEnvironment;
|
2444 | }.call(exports, __webpack_require__, exports, module),
|
2445 | __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
2446 | } else if (typeof module !== 'undefined' && module.exports) {
|
2447 | module.exports = ExecutionEnvironment;
|
2448 | } else {
|
2449 | window.ExecutionEnvironment = ExecutionEnvironment;
|
2450 | }
|
2451 | })();
|
2452 |
|
2453 | }),
|
2454 |
|
2455 | (function(module, exports, __webpack_require__) {
|
2456 |
|
2457 | "use strict";
|
2458 |
|
2459 |
|
2460 | Object.defineProperty(exports, "__esModule", {
|
2461 | value: true
|
2462 | });
|
2463 |
|
2464 | var _createClass = function () {
|
2465 | function defineProperties(target, props) {
|
2466 | for (var i = 0; i < props.length; i++) {
|
2467 | var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);
|
2468 | }
|
2469 | }return function (Constructor, protoProps, staticProps) {
|
2470 | if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;
|
2471 | };
|
2472 | }();
|
2473 |
|
2474 |
|
2475 |
|
2476 | var _prefixAll2 = __webpack_require__(52);
|
2477 |
|
2478 | var _prefixAll3 = _interopRequireDefault(_prefixAll2);
|
2479 |
|
2480 | var _getBrowserInformation = __webpack_require__(53);
|
2481 |
|
2482 | var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation);
|
2483 |
|
2484 | var _getPrefixedKeyframes = __webpack_require__(54);
|
2485 |
|
2486 | var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes);
|
2487 |
|
2488 | var _capitalizeString = __webpack_require__(7);
|
2489 |
|
2490 | var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
|
2491 |
|
2492 | var _sortPrefixedStyle = __webpack_require__(19);
|
2493 |
|
2494 | var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle);
|
2495 |
|
2496 | var _prefixProps = __webpack_require__(42);
|
2497 |
|
2498 | var _prefixProps2 = _interopRequireDefault(_prefixProps);
|
2499 |
|
2500 | var _position = __webpack_require__(38);
|
2501 |
|
2502 | var _position2 = _interopRequireDefault(_position);
|
2503 |
|
2504 | var _calc = __webpack_require__(32);
|
2505 |
|
2506 | var _calc2 = _interopRequireDefault(_calc);
|
2507 |
|
2508 | var _zoomCursor = __webpack_require__(41);
|
2509 |
|
2510 | var _zoomCursor2 = _interopRequireDefault(_zoomCursor);
|
2511 |
|
2512 | var _grabCursor = __webpack_require__(36);
|
2513 |
|
2514 | var _grabCursor2 = _interopRequireDefault(_grabCursor);
|
2515 |
|
2516 | var _flex = __webpack_require__(33);
|
2517 |
|
2518 | var _flex2 = _interopRequireDefault(_flex);
|
2519 |
|
2520 | var _sizing = __webpack_require__(39);
|
2521 |
|
2522 | var _sizing2 = _interopRequireDefault(_sizing);
|
2523 |
|
2524 | var _gradient = __webpack_require__(37);
|
2525 |
|
2526 | var _gradient2 = _interopRequireDefault(_gradient);
|
2527 |
|
2528 | var _transition = __webpack_require__(40);
|
2529 |
|
2530 | var _transition2 = _interopRequireDefault(_transition);
|
2531 |
|
2532 | var _flexboxIE = __webpack_require__(34);
|
2533 |
|
2534 | var _flexboxIE2 = _interopRequireDefault(_flexboxIE);
|
2535 |
|
2536 | var _flexboxOld = __webpack_require__(35);
|
2537 |
|
2538 | var _flexboxOld2 = _interopRequireDefault(_flexboxOld);
|
2539 |
|
2540 | function _interopRequireDefault(obj) {
|
2541 | return obj && obj.__esModule ? obj : { default: obj };
|
2542 | }
|
2543 |
|
2544 | function _classCallCheck(instance, Constructor) {
|
2545 | if (!(instance instanceof Constructor)) {
|
2546 | throw new TypeError("Cannot call a class as a function");
|
2547 | }
|
2548 | }
|
2549 |
|
2550 | var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default,
|
2551 |
|
2552 | _flex2.default];
|
2553 |
|
2554 | var Prefixer = function () {
|
2555 | |
2556 |
|
2557 |
|
2558 |
|
2559 |
|
2560 |
|
2561 | function Prefixer() {
|
2562 | var _this = this;
|
2563 |
|
2564 | var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
2565 |
|
2566 | _classCallCheck(this, Prefixer);
|
2567 |
|
2568 | var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined;
|
2569 |
|
2570 | this._userAgent = options.userAgent || defaultUserAgent;
|
2571 | this._keepUnprefixed = options.keepUnprefixed || false;
|
2572 |
|
2573 | this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent);
|
2574 |
|
2575 |
|
2576 | if (this._browserInfo && this._browserInfo.prefix) {
|
2577 |
|
2578 | this.cssPrefix = this._browserInfo.prefix.css;
|
2579 | this.jsPrefix = this._browserInfo.prefix.inline;
|
2580 | this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo);
|
2581 | } else {
|
2582 | this._usePrefixAllFallback = true;
|
2583 | return false;
|
2584 | }
|
2585 |
|
2586 | var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser];
|
2587 | if (data) {
|
2588 | this._requiresPrefix = Object.keys(data).filter(function (key) {
|
2589 | return data[key] >= _this._browserInfo.version;
|
2590 | }).reduce(function (result, name) {
|
2591 | result[name] = true;
|
2592 | return result;
|
2593 | }, {});
|
2594 | this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0;
|
2595 | } else {
|
2596 | this._usePrefixAllFallback = true;
|
2597 | }
|
2598 | }
|
2599 |
|
2600 | |
2601 |
|
2602 |
|
2603 |
|
2604 |
|
2605 |
|
2606 | _createClass(Prefixer, [{
|
2607 | key: 'prefix',
|
2608 | value: function prefix(styles) {
|
2609 | var _this2 = this;
|
2610 |
|
2611 |
|
2612 | if (this._usePrefixAllFallback) {
|
2613 | return (0, _prefixAll3.default)(styles);
|
2614 | }
|
2615 |
|
2616 |
|
2617 | if (!this._hasPropsRequiringPrefix) {
|
2618 | return styles;
|
2619 | }
|
2620 |
|
2621 | Object.keys(styles).forEach(function (property) {
|
2622 | var value = styles[property];
|
2623 | if (value instanceof Object && !Array.isArray(value)) {
|
2624 |
|
2625 | styles[property] = _this2.prefix(value);
|
2626 | } else {
|
2627 |
|
2628 | if (_this2._requiresPrefix[property]) {
|
2629 | styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value;
|
2630 | if (!_this2._keepUnprefixed) {
|
2631 | delete styles[property];
|
2632 | }
|
2633 | }
|
2634 | }
|
2635 | });
|
2636 |
|
2637 | Object.keys(styles).forEach(function (property) {
|
2638 | [].concat(styles[property]).forEach(function (value) {
|
2639 |
|
2640 | plugins.forEach(function (plugin) {
|
2641 |
|
2642 | assignStyles(styles, plugin({
|
2643 | property: property,
|
2644 | value: value,
|
2645 | styles: styles,
|
2646 | browserInfo: _this2._browserInfo,
|
2647 | prefix: {
|
2648 | js: _this2.jsPrefix,
|
2649 | css: _this2.cssPrefix,
|
2650 | keyframes: _this2.prefixedKeyframes
|
2651 | },
|
2652 | keepUnprefixed: _this2._keepUnprefixed,
|
2653 | requiresPrefix: _this2._requiresPrefix
|
2654 | }), value, _this2._keepUnprefixed);
|
2655 | });
|
2656 | });
|
2657 | });
|
2658 |
|
2659 | return (0, _sortPrefixedStyle2.default)(styles);
|
2660 | }
|
2661 |
|
2662 | |
2663 |
|
2664 |
|
2665 |
|
2666 |
|
2667 |
|
2668 | }], [{
|
2669 | key: 'prefixAll',
|
2670 | value: function prefixAll(styles) {
|
2671 | return (0, _prefixAll3.default)(styles);
|
2672 | }
|
2673 | }]);
|
2674 |
|
2675 | return Prefixer;
|
2676 | }();
|
2677 |
|
2678 | exports.default = Prefixer;
|
2679 |
|
2680 | function assignStyles(base) {
|
2681 | var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
2682 | var value = arguments[2];
|
2683 | var keepUnprefixed = arguments[3];
|
2684 |
|
2685 | Object.keys(extend).forEach(function (property) {
|
2686 | var baseValue = base[property];
|
2687 | if (Array.isArray(baseValue)) {
|
2688 | [].concat(extend[property]).forEach(function (val) {
|
2689 | if (base[property].indexOf(val) === -1) {
|
2690 | base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val);
|
2691 | }
|
2692 | });
|
2693 | } else {
|
2694 | base[property] = extend[property];
|
2695 | }
|
2696 | });
|
2697 | }
|
2698 | module.exports = exports['default'];
|
2699 |
|
2700 | }),
|
2701 |
|
2702 | (function(module, exports, __webpack_require__) {
|
2703 |
|
2704 | "use strict";
|
2705 |
|
2706 |
|
2707 | Object.defineProperty(exports, "__esModule", {
|
2708 | value: true
|
2709 | });
|
2710 | exports.default = calc;
|
2711 |
|
2712 | var _getPrefixedValue = __webpack_require__(1);
|
2713 |
|
2714 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
2715 |
|
2716 | function _interopRequireDefault(obj) {
|
2717 | return obj && obj.__esModule ? obj : { default: obj };
|
2718 | }
|
2719 |
|
2720 | function _defineProperty(obj, key, value) {
|
2721 | if (key in obj) {
|
2722 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
2723 | } else {
|
2724 | obj[key] = value;
|
2725 | }return obj;
|
2726 | }
|
2727 |
|
2728 | function calc(_ref) {
|
2729 | var property = _ref.property;
|
2730 | var value = _ref.value;
|
2731 | var _ref$browserInfo = _ref.browserInfo;
|
2732 | var browser = _ref$browserInfo.browser;
|
2733 | var version = _ref$browserInfo.version;
|
2734 | var css = _ref.prefix.css;
|
2735 | var keepUnprefixed = _ref.keepUnprefixed;
|
2736 |
|
2737 | if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) {
|
2738 | return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed));
|
2739 | }
|
2740 | }
|
2741 | module.exports = exports['default'];
|
2742 |
|
2743 | }),
|
2744 |
|
2745 | (function(module, exports, __webpack_require__) {
|
2746 |
|
2747 | "use strict";
|
2748 |
|
2749 |
|
2750 | Object.defineProperty(exports, "__esModule", {
|
2751 | value: true
|
2752 | });
|
2753 | exports.default = flex;
|
2754 |
|
2755 | var _getPrefixedValue = __webpack_require__(1);
|
2756 |
|
2757 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
2758 |
|
2759 | function _interopRequireDefault(obj) {
|
2760 | return obj && obj.__esModule ? obj : { default: obj };
|
2761 | }
|
2762 |
|
2763 | var values = { flex: true, 'inline-flex': true };
|
2764 |
|
2765 | function flex(_ref) {
|
2766 | var property = _ref.property;
|
2767 | var value = _ref.value;
|
2768 | var _ref$browserInfo = _ref.browserInfo;
|
2769 | var browser = _ref$browserInfo.browser;
|
2770 | var version = _ref$browserInfo.version;
|
2771 | var css = _ref.prefix.css;
|
2772 | var keepUnprefixed = _ref.keepUnprefixed;
|
2773 |
|
2774 | if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) {
|
2775 | return {
|
2776 | display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
|
2777 | };
|
2778 | }
|
2779 | }
|
2780 | module.exports = exports['default'];
|
2781 |
|
2782 | }),
|
2783 |
|
2784 | (function(module, exports, __webpack_require__) {
|
2785 |
|
2786 | "use strict";
|
2787 |
|
2788 |
|
2789 | Object.defineProperty(exports, "__esModule", {
|
2790 | value: true
|
2791 | });
|
2792 | exports.default = flexboxIE;
|
2793 |
|
2794 | var _getPrefixedValue = __webpack_require__(1);
|
2795 |
|
2796 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
2797 |
|
2798 | function _interopRequireDefault(obj) {
|
2799 | return obj && obj.__esModule ? obj : { default: obj };
|
2800 | }
|
2801 |
|
2802 | function _defineProperty(obj, key, value) {
|
2803 | if (key in obj) {
|
2804 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
2805 | } else {
|
2806 | obj[key] = value;
|
2807 | }return obj;
|
2808 | }
|
2809 |
|
2810 | var alternativeValues = {
|
2811 | 'space-around': 'distribute',
|
2812 | 'space-between': 'justify',
|
2813 | 'flex-start': 'start',
|
2814 | 'flex-end': 'end',
|
2815 | flex: 'flexbox',
|
2816 | 'inline-flex': 'inline-flexbox'
|
2817 | };
|
2818 | var alternativeProps = {
|
2819 | alignContent: 'msFlexLinePack',
|
2820 | alignSelf: 'msFlexItemAlign',
|
2821 | alignItems: 'msFlexAlign',
|
2822 | justifyContent: 'msFlexPack',
|
2823 | order: 'msFlexOrder',
|
2824 | flexGrow: 'msFlexPositive',
|
2825 | flexShrink: 'msFlexNegative',
|
2826 | flexBasis: 'msPreferredSize'
|
2827 | };
|
2828 |
|
2829 | function flexboxIE(_ref) {
|
2830 | var property = _ref.property;
|
2831 | var value = _ref.value;
|
2832 | var styles = _ref.styles;
|
2833 | var _ref$browserInfo = _ref.browserInfo;
|
2834 | var browser = _ref$browserInfo.browser;
|
2835 | var version = _ref$browserInfo.version;
|
2836 | var css = _ref.prefix.css;
|
2837 | var keepUnprefixed = _ref.keepUnprefixed;
|
2838 |
|
2839 | if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) {
|
2840 | if (!keepUnprefixed && !Array.isArray(styles[property])) {
|
2841 | delete styles[property];
|
2842 | }
|
2843 | if (property === 'display' && alternativeValues[value]) {
|
2844 | return {
|
2845 | display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
|
2846 | };
|
2847 | }
|
2848 | if (alternativeProps[property]) {
|
2849 | return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
|
2850 | }
|
2851 | }
|
2852 | }
|
2853 | module.exports = exports['default'];
|
2854 |
|
2855 | }),
|
2856 |
|
2857 | (function(module, exports, __webpack_require__) {
|
2858 |
|
2859 | "use strict";
|
2860 |
|
2861 |
|
2862 | Object.defineProperty(exports, "__esModule", {
|
2863 | value: true
|
2864 | });
|
2865 | exports.default = flexboxOld;
|
2866 |
|
2867 | var _getPrefixedValue = __webpack_require__(1);
|
2868 |
|
2869 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
2870 |
|
2871 | function _interopRequireDefault(obj) {
|
2872 | return obj && obj.__esModule ? obj : { default: obj };
|
2873 | }
|
2874 |
|
2875 | function _defineProperty(obj, key, value) {
|
2876 | if (key in obj) {
|
2877 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
2878 | } else {
|
2879 | obj[key] = value;
|
2880 | }return obj;
|
2881 | }
|
2882 |
|
2883 | var alternativeValues = {
|
2884 | 'space-around': 'justify',
|
2885 | 'space-between': 'justify',
|
2886 | 'flex-start': 'start',
|
2887 | 'flex-end': 'end',
|
2888 | 'wrap-reverse': 'multiple',
|
2889 | wrap: 'multiple',
|
2890 | flex: 'box',
|
2891 | 'inline-flex': 'inline-box'
|
2892 | };
|
2893 |
|
2894 | var alternativeProps = {
|
2895 | alignItems: 'WebkitBoxAlign',
|
2896 | justifyContent: 'WebkitBoxPack',
|
2897 | flexWrap: 'WebkitBoxLines'
|
2898 | };
|
2899 |
|
2900 | var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection'];
|
2901 | var properties = Object.keys(alternativeProps).concat(otherProps);
|
2902 |
|
2903 | function flexboxOld(_ref) {
|
2904 | var property = _ref.property;
|
2905 | var value = _ref.value;
|
2906 | var styles = _ref.styles;
|
2907 | var _ref$browserInfo = _ref.browserInfo;
|
2908 | var browser = _ref$browserInfo.browser;
|
2909 | var version = _ref$browserInfo.version;
|
2910 | var css = _ref.prefix.css;
|
2911 | var keepUnprefixed = _ref.keepUnprefixed;
|
2912 |
|
2913 | if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
|
2914 | if (!keepUnprefixed && !Array.isArray(styles[property])) {
|
2915 | delete styles[property];
|
2916 | }
|
2917 | if (property === 'flexDirection' && typeof value === 'string') {
|
2918 | return {
|
2919 | WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal',
|
2920 | WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal'
|
2921 | };
|
2922 | }
|
2923 | if (property === 'display' && alternativeValues[value]) {
|
2924 | return {
|
2925 | display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
|
2926 | };
|
2927 | }
|
2928 | if (alternativeProps[property]) {
|
2929 | return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
|
2930 | }
|
2931 | }
|
2932 | }
|
2933 | module.exports = exports['default'];
|
2934 |
|
2935 | }),
|
2936 |
|
2937 | (function(module, exports, __webpack_require__) {
|
2938 |
|
2939 | "use strict";
|
2940 |
|
2941 |
|
2942 | Object.defineProperty(exports, "__esModule", {
|
2943 | value: true
|
2944 | });
|
2945 | exports.default = grabCursor;
|
2946 |
|
2947 | var _getPrefixedValue = __webpack_require__(1);
|
2948 |
|
2949 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
2950 |
|
2951 | function _interopRequireDefault(obj) {
|
2952 | return obj && obj.__esModule ? obj : { default: obj };
|
2953 | }
|
2954 |
|
2955 | var values = { grab: true, grabbing: true };
|
2956 |
|
2957 | function grabCursor(_ref) {
|
2958 | var property = _ref.property;
|
2959 | var value = _ref.value;
|
2960 | var browser = _ref.browserInfo.browser;
|
2961 | var css = _ref.prefix.css;
|
2962 | var keepUnprefixed = _ref.keepUnprefixed;
|
2963 |
|
2964 |
|
2965 | if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) {
|
2966 | return {
|
2967 | cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
|
2968 | };
|
2969 | }
|
2970 | }
|
2971 | module.exports = exports['default'];
|
2972 |
|
2973 | }),
|
2974 |
|
2975 | (function(module, exports, __webpack_require__) {
|
2976 |
|
2977 | "use strict";
|
2978 |
|
2979 |
|
2980 | Object.defineProperty(exports, "__esModule", {
|
2981 | value: true
|
2982 | });
|
2983 | exports.default = gradient;
|
2984 |
|
2985 | var _getPrefixedValue = __webpack_require__(1);
|
2986 |
|
2987 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
2988 |
|
2989 | function _interopRequireDefault(obj) {
|
2990 | return obj && obj.__esModule ? obj : { default: obj };
|
2991 | }
|
2992 |
|
2993 | function _defineProperty(obj, key, value) {
|
2994 | if (key in obj) {
|
2995 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
2996 | } else {
|
2997 | obj[key] = value;
|
2998 | }return obj;
|
2999 | }
|
3000 |
|
3001 | var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
|
3002 |
|
3003 | function gradient(_ref) {
|
3004 | var property = _ref.property;
|
3005 | var value = _ref.value;
|
3006 | var _ref$browserInfo = _ref.browserInfo;
|
3007 | var browser = _ref$browserInfo.browser;
|
3008 | var version = _ref$browserInfo.version;
|
3009 | var css = _ref.prefix.css;
|
3010 | var keepUnprefixed = _ref.keepUnprefixed;
|
3011 |
|
3012 | if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
|
3013 | return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
|
3014 | }
|
3015 | }
|
3016 | module.exports = exports['default'];
|
3017 |
|
3018 | }),
|
3019 |
|
3020 | (function(module, exports, __webpack_require__) {
|
3021 |
|
3022 | "use strict";
|
3023 |
|
3024 |
|
3025 | Object.defineProperty(exports, "__esModule", {
|
3026 | value: true
|
3027 | });
|
3028 | exports.default = position;
|
3029 |
|
3030 | var _getPrefixedValue = __webpack_require__(1);
|
3031 |
|
3032 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
3033 |
|
3034 | function _interopRequireDefault(obj) {
|
3035 | return obj && obj.__esModule ? obj : { default: obj };
|
3036 | }
|
3037 |
|
3038 | function _defineProperty(obj, key, value) {
|
3039 | if (key in obj) {
|
3040 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
3041 | } else {
|
3042 | obj[key] = value;
|
3043 | }return obj;
|
3044 | }
|
3045 |
|
3046 | function position(_ref) {
|
3047 | var property = _ref.property;
|
3048 | var value = _ref.value;
|
3049 | var browser = _ref.browserInfo.browser;
|
3050 | var css = _ref.prefix.css;
|
3051 | var keepUnprefixed = _ref.keepUnprefixed;
|
3052 |
|
3053 | if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) {
|
3054 | return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
|
3055 | }
|
3056 | }
|
3057 | module.exports = exports['default'];
|
3058 |
|
3059 | }),
|
3060 |
|
3061 | (function(module, exports, __webpack_require__) {
|
3062 |
|
3063 | "use strict";
|
3064 |
|
3065 |
|
3066 | Object.defineProperty(exports, "__esModule", {
|
3067 | value: true
|
3068 | });
|
3069 | exports.default = sizing;
|
3070 |
|
3071 | var _getPrefixedValue = __webpack_require__(1);
|
3072 |
|
3073 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
3074 |
|
3075 | function _interopRequireDefault(obj) {
|
3076 | return obj && obj.__esModule ? obj : { default: obj };
|
3077 | }
|
3078 |
|
3079 | function _defineProperty(obj, key, value) {
|
3080 | if (key in obj) {
|
3081 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
3082 | } else {
|
3083 | obj[key] = value;
|
3084 | }return obj;
|
3085 | }
|
3086 |
|
3087 | var properties = {
|
3088 | maxHeight: true,
|
3089 | maxWidth: true,
|
3090 | width: true,
|
3091 | height: true,
|
3092 | columnWidth: true,
|
3093 | minWidth: true,
|
3094 | minHeight: true
|
3095 | };
|
3096 | var values = {
|
3097 | 'min-content': true,
|
3098 | 'max-content': true,
|
3099 | 'fill-available': true,
|
3100 | 'fit-content': true,
|
3101 | 'contain-floats': true
|
3102 | };
|
3103 |
|
3104 | function sizing(_ref) {
|
3105 | var property = _ref.property;
|
3106 | var value = _ref.value;
|
3107 | var css = _ref.prefix.css;
|
3108 | var keepUnprefixed = _ref.keepUnprefixed;
|
3109 |
|
3110 |
|
3111 |
|
3112 | if (properties[property] && values[value]) {
|
3113 | return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
|
3114 | }
|
3115 | }
|
3116 | module.exports = exports['default'];
|
3117 |
|
3118 | }),
|
3119 |
|
3120 | (function(module, exports, __webpack_require__) {
|
3121 |
|
3122 | "use strict";
|
3123 |
|
3124 |
|
3125 | var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
3126 |
|
3127 | Object.defineProperty(exports, "__esModule", {
|
3128 | value: true
|
3129 | });
|
3130 |
|
3131 | var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
|
3132 | return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
|
3133 | } : function (obj) {
|
3134 | return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
|
3135 | };
|
3136 |
|
3137 | exports.default = transition;
|
3138 |
|
3139 | var _hyphenateStyleName = __webpack_require__(17);
|
3140 |
|
3141 | var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);
|
3142 |
|
3143 | var _unprefixProperty = __webpack_require__(56);
|
3144 |
|
3145 | var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty);
|
3146 |
|
3147 | function _interopRequireDefault(obj) {
|
3148 | return obj && obj.__esModule ? obj : { default: obj };
|
3149 | }
|
3150 |
|
3151 | function _defineProperty(obj, key, value) {
|
3152 | if (key in obj) {
|
3153 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
3154 | } else {
|
3155 | obj[key] = value;
|
3156 | }return obj;
|
3157 | }
|
3158 |
|
3159 | var properties = { transition: true, transitionProperty: true };
|
3160 |
|
3161 | function transition(_ref) {
|
3162 | var property = _ref.property;
|
3163 | var value = _ref.value;
|
3164 | var css = _ref.prefix.css;
|
3165 | var requiresPrefix = _ref.requiresPrefix;
|
3166 | var keepUnprefixed = _ref.keepUnprefixed;
|
3167 |
|
3168 |
|
3169 | var unprefixedProperty = (0, _unprefixProperty2.default)(property);
|
3170 |
|
3171 | if (typeof value === 'string' && properties[unprefixedProperty]) {
|
3172 | var _ret = function () {
|
3173 |
|
3174 | var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) {
|
3175 | return (0, _hyphenateStyleName2.default)(prop);
|
3176 | });
|
3177 |
|
3178 |
|
3179 | var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g);
|
3180 |
|
3181 | requiresPrefixDashCased.forEach(function (prop) {
|
3182 | multipleValues.forEach(function (val, index) {
|
3183 | if (val.indexOf(prop) > -1 && prop !== 'order') {
|
3184 | multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : '');
|
3185 | }
|
3186 | });
|
3187 | });
|
3188 |
|
3189 | return {
|
3190 | v: _defineProperty({}, property, multipleValues.join(','))
|
3191 | };
|
3192 | }();
|
3193 |
|
3194 | if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
|
3195 | }
|
3196 | }
|
3197 | module.exports = exports['default'];
|
3198 |
|
3199 | }),
|
3200 |
|
3201 | (function(module, exports, __webpack_require__) {
|
3202 |
|
3203 | "use strict";
|
3204 |
|
3205 |
|
3206 | Object.defineProperty(exports, "__esModule", {
|
3207 | value: true
|
3208 | });
|
3209 | exports.default = zoomCursor;
|
3210 |
|
3211 | var _getPrefixedValue = __webpack_require__(1);
|
3212 |
|
3213 | var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
|
3214 |
|
3215 | function _interopRequireDefault(obj) {
|
3216 | return obj && obj.__esModule ? obj : { default: obj };
|
3217 | }
|
3218 |
|
3219 | var values = { 'zoom-in': true, 'zoom-out': true };
|
3220 |
|
3221 | function zoomCursor(_ref) {
|
3222 | var property = _ref.property;
|
3223 | var value = _ref.value;
|
3224 | var _ref$browserInfo = _ref.browserInfo;
|
3225 | var browser = _ref$browserInfo.browser;
|
3226 | var version = _ref$browserInfo.version;
|
3227 | var css = _ref.prefix.css;
|
3228 | var keepUnprefixed = _ref.keepUnprefixed;
|
3229 |
|
3230 | if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) {
|
3231 | return {
|
3232 | cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
|
3233 | };
|
3234 | }
|
3235 | }
|
3236 | module.exports = exports['default'];
|
3237 |
|
3238 | }),
|
3239 |
|
3240 | (function(module, exports, __webpack_require__) {
|
3241 |
|
3242 | "use strict";
|
3243 |
|
3244 |
|
3245 | Object.defineProperty(exports, "__esModule", {
|
3246 | value: true
|
3247 | });
|
3248 | exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} };
|
3249 | module.exports = exports["default"];
|
3250 |
|
3251 | }),
|
3252 |
|
3253 | (function(module, exports, __webpack_require__) {
|
3254 |
|
3255 | "use strict";
|
3256 |
|
3257 |
|
3258 | Object.defineProperty(exports, "__esModule", {
|
3259 | value: true
|
3260 | });
|
3261 | exports.default = calc;
|
3262 |
|
3263 | var _joinPrefixedValue = __webpack_require__(3);
|
3264 |
|
3265 | var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
|
3266 |
|
3267 | var _isPrefixedValue = __webpack_require__(8);
|
3268 |
|
3269 | var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
|
3270 |
|
3271 | function _interopRequireDefault(obj) {
|
3272 | return obj && obj.__esModule ? obj : { default: obj };
|
3273 | }
|
3274 |
|
3275 | function calc(property, value) {
|
3276 | if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) {
|
3277 | return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) {
|
3278 | return value.replace(/calc\(/g, prefix + 'calc(');
|
3279 | });
|
3280 | }
|
3281 | }
|
3282 | module.exports = exports['default'];
|
3283 |
|
3284 | }),
|
3285 |
|
3286 | (function(module, exports, __webpack_require__) {
|
3287 |
|
3288 | "use strict";
|
3289 |
|
3290 |
|
3291 | Object.defineProperty(exports, "__esModule", {
|
3292 | value: true
|
3293 | });
|
3294 | exports.default = cursor;
|
3295 |
|
3296 | var _joinPrefixedValue = __webpack_require__(3);
|
3297 |
|
3298 | var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
|
3299 |
|
3300 | function _interopRequireDefault(obj) {
|
3301 | return obj && obj.__esModule ? obj : { default: obj };
|
3302 | }
|
3303 |
|
3304 | var values = {
|
3305 | 'zoom-in': true,
|
3306 | 'zoom-out': true,
|
3307 | grab: true,
|
3308 | grabbing: true
|
3309 | };
|
3310 |
|
3311 | function cursor(property, value) {
|
3312 | if (property === 'cursor' && values[value]) {
|
3313 | return (0, _joinPrefixedValue2.default)(property, value);
|
3314 | }
|
3315 | }
|
3316 | module.exports = exports['default'];
|
3317 |
|
3318 | }),
|
3319 |
|
3320 | (function(module, exports, __webpack_require__) {
|
3321 |
|
3322 | "use strict";
|
3323 |
|
3324 |
|
3325 | Object.defineProperty(exports, "__esModule", {
|
3326 | value: true
|
3327 | });
|
3328 | exports.default = flex;
|
3329 | var values = { flex: true, 'inline-flex': true };
|
3330 |
|
3331 | function flex(property, value) {
|
3332 | if (property === 'display' && values[value]) {
|
3333 | return {
|
3334 | display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value]
|
3335 | };
|
3336 | }
|
3337 | }
|
3338 | module.exports = exports['default'];
|
3339 |
|
3340 | }),
|
3341 |
|
3342 | (function(module, exports, __webpack_require__) {
|
3343 |
|
3344 | "use strict";
|
3345 |
|
3346 |
|
3347 | Object.defineProperty(exports, "__esModule", {
|
3348 | value: true
|
3349 | });
|
3350 | exports.default = flexboxIE;
|
3351 |
|
3352 | function _defineProperty(obj, key, value) {
|
3353 | if (key in obj) {
|
3354 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
3355 | } else {
|
3356 | obj[key] = value;
|
3357 | }return obj;
|
3358 | }
|
3359 |
|
3360 | var alternativeValues = {
|
3361 | 'space-around': 'distribute',
|
3362 | 'space-between': 'justify',
|
3363 | 'flex-start': 'start',
|
3364 | 'flex-end': 'end'
|
3365 | };
|
3366 | var alternativeProps = {
|
3367 | alignContent: 'msFlexLinePack',
|
3368 | alignSelf: 'msFlexItemAlign',
|
3369 | alignItems: 'msFlexAlign',
|
3370 | justifyContent: 'msFlexPack',
|
3371 | order: 'msFlexOrder',
|
3372 | flexGrow: 'msFlexPositive',
|
3373 | flexShrink: 'msFlexNegative',
|
3374 | flexBasis: 'msPreferredSize'
|
3375 | };
|
3376 |
|
3377 | function flexboxIE(property, value) {
|
3378 | if (alternativeProps[property]) {
|
3379 | return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
|
3380 | }
|
3381 | }
|
3382 | module.exports = exports['default'];
|
3383 |
|
3384 | }),
|
3385 |
|
3386 | (function(module, exports, __webpack_require__) {
|
3387 |
|
3388 | "use strict";
|
3389 |
|
3390 |
|
3391 | Object.defineProperty(exports, "__esModule", {
|
3392 | value: true
|
3393 | });
|
3394 | exports.default = flexboxOld;
|
3395 |
|
3396 | function _defineProperty(obj, key, value) {
|
3397 | if (key in obj) {
|
3398 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
3399 | } else {
|
3400 | obj[key] = value;
|
3401 | }return obj;
|
3402 | }
|
3403 |
|
3404 | var alternativeValues = {
|
3405 | 'space-around': 'justify',
|
3406 | 'space-between': 'justify',
|
3407 | 'flex-start': 'start',
|
3408 | 'flex-end': 'end',
|
3409 | 'wrap-reverse': 'multiple',
|
3410 | wrap: 'multiple'
|
3411 | };
|
3412 |
|
3413 | var alternativeProps = {
|
3414 | alignItems: 'WebkitBoxAlign',
|
3415 | justifyContent: 'WebkitBoxPack',
|
3416 | flexWrap: 'WebkitBoxLines'
|
3417 | };
|
3418 |
|
3419 | function flexboxOld(property, value) {
|
3420 | if (property === 'flexDirection' && typeof value === 'string') {
|
3421 | return {
|
3422 | WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal',
|
3423 | WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal'
|
3424 | };
|
3425 | }
|
3426 | if (alternativeProps[property]) {
|
3427 | return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
|
3428 | }
|
3429 | }
|
3430 | module.exports = exports['default'];
|
3431 |
|
3432 | }),
|
3433 |
|
3434 | (function(module, exports, __webpack_require__) {
|
3435 |
|
3436 | "use strict";
|
3437 |
|
3438 |
|
3439 | Object.defineProperty(exports, "__esModule", {
|
3440 | value: true
|
3441 | });
|
3442 | exports.default = gradient;
|
3443 |
|
3444 | var _joinPrefixedValue = __webpack_require__(3);
|
3445 |
|
3446 | var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
|
3447 |
|
3448 | var _isPrefixedValue = __webpack_require__(8);
|
3449 |
|
3450 | var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
|
3451 |
|
3452 | function _interopRequireDefault(obj) {
|
3453 | return obj && obj.__esModule ? obj : { default: obj };
|
3454 | }
|
3455 |
|
3456 | var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
|
3457 |
|
3458 | function gradient(property, value) {
|
3459 | if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) {
|
3460 | return (0, _joinPrefixedValue2.default)(property, value);
|
3461 | }
|
3462 | }
|
3463 | module.exports = exports['default'];
|
3464 |
|
3465 | }),
|
3466 |
|
3467 | (function(module, exports, __webpack_require__) {
|
3468 |
|
3469 | "use strict";
|
3470 |
|
3471 |
|
3472 | Object.defineProperty(exports, "__esModule", {
|
3473 | value: true
|
3474 | });
|
3475 | exports.default = position;
|
3476 | function position(property, value) {
|
3477 | if (property === 'position' && value === 'sticky') {
|
3478 | return { position: ['-webkit-sticky', 'sticky'] };
|
3479 | }
|
3480 | }
|
3481 | module.exports = exports['default'];
|
3482 |
|
3483 | }),
|
3484 |
|
3485 | (function(module, exports, __webpack_require__) {
|
3486 |
|
3487 | "use strict";
|
3488 |
|
3489 |
|
3490 | Object.defineProperty(exports, "__esModule", {
|
3491 | value: true
|
3492 | });
|
3493 | exports.default = sizing;
|
3494 |
|
3495 | var _joinPrefixedValue = __webpack_require__(3);
|
3496 |
|
3497 | var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
|
3498 |
|
3499 | function _interopRequireDefault(obj) {
|
3500 | return obj && obj.__esModule ? obj : { default: obj };
|
3501 | }
|
3502 |
|
3503 | var properties = {
|
3504 | maxHeight: true,
|
3505 | maxWidth: true,
|
3506 | width: true,
|
3507 | height: true,
|
3508 | columnWidth: true,
|
3509 | minWidth: true,
|
3510 | minHeight: true
|
3511 | };
|
3512 | var values = {
|
3513 | 'min-content': true,
|
3514 | 'max-content': true,
|
3515 | 'fill-available': true,
|
3516 | 'fit-content': true,
|
3517 | 'contain-floats': true
|
3518 | };
|
3519 |
|
3520 | function sizing(property, value) {
|
3521 | if (properties[property] && values[value]) {
|
3522 | return (0, _joinPrefixedValue2.default)(property, value);
|
3523 | }
|
3524 | }
|
3525 | module.exports = exports['default'];
|
3526 |
|
3527 | }),
|
3528 |
|
3529 | (function(module, exports, __webpack_require__) {
|
3530 |
|
3531 | "use strict";
|
3532 |
|
3533 |
|
3534 | Object.defineProperty(exports, "__esModule", {
|
3535 | value: true
|
3536 | });
|
3537 | exports.default = transition;
|
3538 |
|
3539 | var _hyphenateStyleName = __webpack_require__(17);
|
3540 |
|
3541 | var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);
|
3542 |
|
3543 | var _capitalizeString = __webpack_require__(7);
|
3544 |
|
3545 | var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
|
3546 |
|
3547 | var _isPrefixedValue = __webpack_require__(8);
|
3548 |
|
3549 | var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
|
3550 |
|
3551 | var _prefixProps = __webpack_require__(18);
|
3552 |
|
3553 | var _prefixProps2 = _interopRequireDefault(_prefixProps);
|
3554 |
|
3555 | function _interopRequireDefault(obj) {
|
3556 | return obj && obj.__esModule ? obj : { default: obj };
|
3557 | }
|
3558 |
|
3559 | function _defineProperty(obj, key, value) {
|
3560 | if (key in obj) {
|
3561 | Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
|
3562 | } else {
|
3563 | obj[key] = value;
|
3564 | }return obj;
|
3565 | }
|
3566 |
|
3567 | var properties = {
|
3568 | transition: true,
|
3569 | transitionProperty: true,
|
3570 | WebkitTransition: true,
|
3571 | WebkitTransitionProperty: true
|
3572 | };
|
3573 |
|
3574 | function transition(property, value) {
|
3575 |
|
3576 | if (typeof value === 'string' && properties[property]) {
|
3577 | var _ref2;
|
3578 |
|
3579 | var outputValue = prefixValue(value);
|
3580 | var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) {
|
3581 | return value.match(/-moz-|-ms-/) === null;
|
3582 | }).join(',');
|
3583 |
|
3584 |
|
3585 | if (property.indexOf('Webkit') > -1) {
|
3586 | return _defineProperty({}, property, webkitOutput);
|
3587 | }
|
3588 |
|
3589 | return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2;
|
3590 | }
|
3591 | }
|
3592 |
|
3593 | function prefixValue(value) {
|
3594 | if ((0, _isPrefixedValue2.default)(value)) {
|
3595 | return value;
|
3596 | }
|
3597 |
|
3598 |
|
3599 | var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g);
|
3600 |
|
3601 |
|
3602 |
|
3603 | multipleValues.forEach(function (val, index) {
|
3604 | multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) {
|
3605 | var dashCasePrefix = '-' + prefix.toLowerCase() + '-';
|
3606 |
|
3607 | Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) {
|
3608 | var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop);
|
3609 |
|
3610 | if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {
|
3611 |
|
3612 | out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out;
|
3613 | }
|
3614 | });
|
3615 | return out;
|
3616 | }, val);
|
3617 | });
|
3618 |
|
3619 | return multipleValues.join(',');
|
3620 | }
|
3621 | module.exports = exports['default'];
|
3622 |
|
3623 | }),
|
3624 |
|
3625 | (function(module, exports, __webpack_require__) {
|
3626 |
|
3627 | "use strict";
|
3628 |
|
3629 |
|
3630 | Object.defineProperty(exports, "__esModule", {
|
3631 | value: true
|
3632 | });
|
3633 | exports.default = prefixAll;
|
3634 |
|
3635 | var _prefixProps = __webpack_require__(18);
|
3636 |
|
3637 | var _prefixProps2 = _interopRequireDefault(_prefixProps);
|
3638 |
|
3639 | var _capitalizeString = __webpack_require__(7);
|
3640 |
|
3641 | var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
|
3642 |
|
3643 | var _sortPrefixedStyle = __webpack_require__(19);
|
3644 |
|
3645 | var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle);
|
3646 |
|
3647 | var _position = __webpack_require__(49);
|
3648 |
|
3649 | var _position2 = _interopRequireDefault(_position);
|
3650 |
|
3651 | var _calc = __webpack_require__(43);
|
3652 |
|
3653 | var _calc2 = _interopRequireDefault(_calc);
|
3654 |
|
3655 | var _cursor = __webpack_require__(44);
|
3656 |
|
3657 | var _cursor2 = _interopRequireDefault(_cursor);
|
3658 |
|
3659 | var _flex = __webpack_require__(45);
|
3660 |
|
3661 | var _flex2 = _interopRequireDefault(_flex);
|
3662 |
|
3663 | var _sizing = __webpack_require__(50);
|
3664 |
|
3665 | var _sizing2 = _interopRequireDefault(_sizing);
|
3666 |
|
3667 | var _gradient = __webpack_require__(48);
|
3668 |
|
3669 | var _gradient2 = _interopRequireDefault(_gradient);
|
3670 |
|
3671 | var _transition = __webpack_require__(51);
|
3672 |
|
3673 | var _transition2 = _interopRequireDefault(_transition);
|
3674 |
|
3675 | var _flexboxIE = __webpack_require__(46);
|
3676 |
|
3677 | var _flexboxIE2 = _interopRequireDefault(_flexboxIE);
|
3678 |
|
3679 | var _flexboxOld = __webpack_require__(47);
|
3680 |
|
3681 | var _flexboxOld2 = _interopRequireDefault(_flexboxOld);
|
3682 |
|
3683 | function _interopRequireDefault(obj) {
|
3684 | return obj && obj.__esModule ? obj : { default: obj };
|
3685 | }
|
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 | var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default];
|
3691 |
|
3692 |
|
3693 |
|
3694 |
|
3695 |
|
3696 |
|
3697 | function prefixAll(styles) {
|
3698 | Object.keys(styles).forEach(function (property) {
|
3699 | var value = styles[property];
|
3700 | if (value instanceof Object && !Array.isArray(value)) {
|
3701 |
|
3702 | styles[property] = prefixAll(value);
|
3703 | } else {
|
3704 | Object.keys(_prefixProps2.default).forEach(function (prefix) {
|
3705 | var properties = _prefixProps2.default[prefix];
|
3706 |
|
3707 | if (properties[property]) {
|
3708 | styles[prefix + (0, _capitalizeString2.default)(property)] = value;
|
3709 | }
|
3710 | });
|
3711 | }
|
3712 | });
|
3713 |
|
3714 | Object.keys(styles).forEach(function (property) {
|
3715 | [].concat(styles[property]).forEach(function (value, index) {
|
3716 |
|
3717 | plugins.forEach(function (plugin) {
|
3718 | return assignStyles(styles, plugin(property, value));
|
3719 | });
|
3720 | });
|
3721 | });
|
3722 |
|
3723 | return (0, _sortPrefixedStyle2.default)(styles);
|
3724 | }
|
3725 |
|
3726 | function assignStyles(base) {
|
3727 | var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
3728 |
|
3729 | Object.keys(extend).forEach(function (property) {
|
3730 | var baseValue = base[property];
|
3731 | if (Array.isArray(baseValue)) {
|
3732 | [].concat(extend[property]).forEach(function (value) {
|
3733 | var valueIndex = baseValue.indexOf(value);
|
3734 | if (valueIndex > -1) {
|
3735 | base[property].splice(valueIndex, 1);
|
3736 | }
|
3737 | base[property].push(value);
|
3738 | });
|
3739 | } else {
|
3740 | base[property] = extend[property];
|
3741 | }
|
3742 | });
|
3743 | }
|
3744 | module.exports = exports['default'];
|
3745 |
|
3746 | }),
|
3747 |
|
3748 | (function(module, exports, __webpack_require__) {
|
3749 |
|
3750 | "use strict";
|
3751 |
|
3752 |
|
3753 | Object.defineProperty(exports, "__esModule", {
|
3754 | value: true
|
3755 | });
|
3756 |
|
3757 | var _bowser = __webpack_require__(29);
|
3758 |
|
3759 | var _bowser2 = _interopRequireDefault(_bowser);
|
3760 |
|
3761 | function _interopRequireDefault(obj) {
|
3762 | return obj && obj.__esModule ? obj : { default: obj };
|
3763 | }
|
3764 |
|
3765 | var vendorPrefixes = {
|
3766 | Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'],
|
3767 | Moz: ['firefox', 'seamonkey', 'sailfish'],
|
3768 | ms: ['msie', 'msedge']
|
3769 | };
|
3770 | var browsers = {
|
3771 | chrome: [['chrome'], ['chromium']],
|
3772 | safari: [['safari']],
|
3773 | firefox: [['firefox']],
|
3774 | edge: [['msedge']],
|
3775 | opera: [['opera'], ['vivaldi']],
|
3776 | ios_saf: [['ios', 'mobile'], ['ios', 'tablet']],
|
3777 | ie: [['msie']],
|
3778 | op_mini: [['opera', 'mobile'], ['opera', 'tablet']],
|
3779 | and_uc: [['android', 'mobile'], ['android', 'tablet']],
|
3780 | android: [['android', 'mobile'], ['android', 'tablet']]
|
3781 | };
|
3782 |
|
3783 | var browserByInfo = function browserByInfo(info) {
|
3784 | if (info.firefox) {
|
3785 | return 'firefox';
|
3786 | }
|
3787 | var name = '';
|
3788 |
|
3789 | Object.keys(browsers).forEach(function (browser) {
|
3790 | browsers[browser].forEach(function (condition) {
|
3791 | var match = 0;
|
3792 | condition.forEach(function (single) {
|
3793 | if (info[single]) {
|
3794 | match += 1;
|
3795 | }
|
3796 | });
|
3797 | if (condition.length === match) {
|
3798 | name = browser;
|
3799 | }
|
3800 | });
|
3801 | });
|
3802 |
|
3803 | return name;
|
3804 | };
|
3805 |
|
3806 |
|
3807 |
|
3808 |
|
3809 |
|
3810 |
|
3811 |
|
3812 | exports.default = function (userAgent) {
|
3813 | if (!userAgent) {
|
3814 | return false;
|
3815 | }
|
3816 | var info = _bowser2.default._detect(userAgent);
|
3817 |
|
3818 | Object.keys(vendorPrefixes).forEach(function (prefix) {
|
3819 | vendorPrefixes[prefix].forEach(function (browser) {
|
3820 | if (info[browser]) {
|
3821 | info.prefix = {
|
3822 | inline: prefix,
|
3823 | css: '-' + prefix.toLowerCase() + '-'
|
3824 | };
|
3825 | }
|
3826 | });
|
3827 | });
|
3828 |
|
3829 | info.browser = browserByInfo(info);
|
3830 |
|
3831 |
|
3832 | info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10);
|
3833 | info.osversion = parseFloat(info.osversion);
|
3834 |
|
3835 |
|
3836 |
|
3837 |
|
3838 |
|
3839 | if (info.browser === 'ios_saf' && info.version > info.osversion) {
|
3840 | info.version = info.osversion;
|
3841 | info.safari = true;
|
3842 | }
|
3843 |
|
3844 |
|
3845 |
|
3846 | if (info.browser === 'android' && info.chrome && info.version > 37) {
|
3847 | info.browser = 'and_chr';
|
3848 | }
|
3849 |
|
3850 |
|
3851 |
|
3852 |
|
3853 | if (info.browser === 'android' && info.osversion < 5) {
|
3854 | info.version = info.osversion;
|
3855 | }
|
3856 |
|
3857 | return info;
|
3858 | };
|
3859 |
|
3860 | module.exports = exports['default'];
|
3861 |
|
3862 | }),
|
3863 |
|
3864 | (function(module, exports, __webpack_require__) {
|
3865 |
|
3866 | "use strict";
|
3867 |
|
3868 |
|
3869 | Object.defineProperty(exports, "__esModule", {
|
3870 | value: true
|
3871 | });
|
3872 |
|
3873 | exports.default = function (_ref) {
|
3874 | var browser = _ref.browser;
|
3875 | var version = _ref.version;
|
3876 | var prefix = _ref.prefix;
|
3877 |
|
3878 | var prefixedKeyframes = 'keyframes';
|
3879 |
|
3880 | if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') {
|
3881 | prefixedKeyframes = prefix.css + prefixedKeyframes;
|
3882 | }
|
3883 | return prefixedKeyframes;
|
3884 | };
|
3885 |
|
3886 | module.exports = exports['default'];
|
3887 |
|
3888 | }),
|
3889 |
|
3890 | (function(module, exports, __webpack_require__) {
|
3891 |
|
3892 | "use strict";
|
3893 |
|
3894 |
|
3895 | Object.defineProperty(exports, "__esModule", {
|
3896 | value: true
|
3897 | });
|
3898 |
|
3899 | exports.default = function (property) {
|
3900 | return property.match(/^(Webkit|Moz|O|ms)/) !== null;
|
3901 | };
|
3902 |
|
3903 | module.exports = exports["default"];
|
3904 |
|
3905 | }),
|
3906 |
|
3907 | (function(module, exports, __webpack_require__) {
|
3908 |
|
3909 | "use strict";
|
3910 |
|
3911 |
|
3912 | Object.defineProperty(exports, "__esModule", {
|
3913 | value: true
|
3914 | });
|
3915 |
|
3916 | exports.default = function (property) {
|
3917 | var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, '');
|
3918 | return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1);
|
3919 | };
|
3920 |
|
3921 | module.exports = exports['default'];
|
3922 |
|
3923 | }),
|
3924 |
|
3925 | (function(module, exports, __webpack_require__) {
|
3926 |
|
3927 | "use strict";
|
3928 | (function(process) { |
3929 |
|
3930 |
|
3931 |
|
3932 |
|
3933 |
|
3934 |
|
3935 |
|
3936 |
|
3937 |
|
3938 |
|
3939 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
3940 |
|
3941 | if (process.env.NODE_ENV !== 'production') {
|
3942 | var invariant = __webpack_require__(6);
|
3943 | var warning = __webpack_require__(16);
|
3944 | var ReactPropTypesSecret = __webpack_require__(20);
|
3945 | var loggedTypeFailures = {};
|
3946 | }
|
3947 |
|
3948 |
|
3949 |
|
3950 |
|
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 |
|
3957 |
|
3958 |
|
3959 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
3960 | if (process.env.NODE_ENV !== 'production') {
|
3961 | for (var typeSpecName in typeSpecs) {
|
3962 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
3963 | var error;
|
3964 |
|
3965 |
|
3966 |
|
3967 | try {
|
3968 |
|
3969 |
|
3970 | invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
|
3971 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
3972 | } catch (ex) {
|
3973 | error = ex;
|
3974 | }
|
3975 | warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error === 'undefined' ? 'undefined' : _typeof(error));
|
3976 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
3977 |
|
3978 |
|
3979 | loggedTypeFailures[error.message] = true;
|
3980 |
|
3981 | var stack = getStack ? getStack() : '';
|
3982 |
|
3983 | warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
3984 | }
|
3985 | }
|
3986 | }
|
3987 | }
|
3988 | }
|
3989 |
|
3990 | module.exports = checkPropTypes;
|
3991 | }.call(exports, __webpack_require__(0)))
|
3992 |
|
3993 | }),
|
3994 |
|
3995 | (function(module, exports, __webpack_require__) {
|
3996 |
|
3997 | "use strict";
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 | var emptyFunction = __webpack_require__(5);
|
4010 | var invariant = __webpack_require__(6);
|
4011 |
|
4012 | module.exports = function () {
|
4013 |
|
4014 |
|
4015 | function shim() {
|
4016 | invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
4017 | };
|
4018 | shim.isRequired = shim;
|
4019 | function getShim() {
|
4020 | return shim;
|
4021 | };
|
4022 | var ReactPropTypes = {
|
4023 | array: shim,
|
4024 | bool: shim,
|
4025 | func: shim,
|
4026 | number: shim,
|
4027 | object: shim,
|
4028 | string: shim,
|
4029 | symbol: shim,
|
4030 |
|
4031 | any: shim,
|
4032 | arrayOf: getShim,
|
4033 | element: shim,
|
4034 | instanceOf: getShim,
|
4035 | node: shim,
|
4036 | objectOf: getShim,
|
4037 | oneOf: getShim,
|
4038 | oneOfType: getShim,
|
4039 | shape: getShim
|
4040 | };
|
4041 |
|
4042 | ReactPropTypes.checkPropTypes = emptyFunction;
|
4043 | ReactPropTypes.PropTypes = ReactPropTypes;
|
4044 |
|
4045 | return ReactPropTypes;
|
4046 | };
|
4047 |
|
4048 | }),
|
4049 |
|
4050 | (function(module, exports, __webpack_require__) {
|
4051 |
|
4052 | "use strict";
|
4053 | (function(process) { |
4054 |
|
4055 |
|
4056 |
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 |
|
4064 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
4065 |
|
4066 | var emptyFunction = __webpack_require__(5);
|
4067 | var invariant = __webpack_require__(6);
|
4068 | var warning = __webpack_require__(16);
|
4069 |
|
4070 | var ReactPropTypesSecret = __webpack_require__(20);
|
4071 | var checkPropTypes = __webpack_require__(57);
|
4072 |
|
4073 | module.exports = function (isValidElement, throwOnDirectAccess) {
|
4074 |
|
4075 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
4076 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
4077 |
|
4078 | |
4079 |
|
4080 |
|
4081 |
|
4082 |
|
4083 |
|
4084 |
|
4085 |
|
4086 |
|
4087 |
|
4088 |
|
4089 |
|
4090 |
|
4091 |
|
4092 | function getIteratorFn(maybeIterable) {
|
4093 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
4094 | if (typeof iteratorFn === 'function') {
|
4095 | return iteratorFn;
|
4096 | }
|
4097 | }
|
4098 |
|
4099 | |
4100 |
|
4101 |
|
4102 |
|
4103 |
|
4104 |
|
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 |
|
4111 |
|
4112 |
|
4113 |
|
4114 |
|
4115 |
|
4116 |
|
4117 |
|
4118 |
|
4119 |
|
4120 |
|
4121 |
|
4122 |
|
4123 |
|
4124 |
|
4125 |
|
4126 |
|
4127 |
|
4128 |
|
4129 |
|
4130 |
|
4131 |
|
4132 |
|
4133 |
|
4134 |
|
4135 |
|
4136 |
|
4137 |
|
4138 |
|
4139 |
|
4140 |
|
4141 |
|
4142 |
|
4143 |
|
4144 |
|
4145 |
|
4146 | var ANONYMOUS = '<<anonymous>>';
|
4147 |
|
4148 |
|
4149 |
|
4150 | var ReactPropTypes = {
|
4151 | array: createPrimitiveTypeChecker('array'),
|
4152 | bool: createPrimitiveTypeChecker('boolean'),
|
4153 | func: createPrimitiveTypeChecker('function'),
|
4154 | number: createPrimitiveTypeChecker('number'),
|
4155 | object: createPrimitiveTypeChecker('object'),
|
4156 | string: createPrimitiveTypeChecker('string'),
|
4157 | symbol: createPrimitiveTypeChecker('symbol'),
|
4158 |
|
4159 | any: createAnyTypeChecker(),
|
4160 | arrayOf: createArrayOfTypeChecker,
|
4161 | element: createElementTypeChecker(),
|
4162 | instanceOf: createInstanceTypeChecker,
|
4163 | node: createNodeChecker(),
|
4164 | objectOf: createObjectOfTypeChecker,
|
4165 | oneOf: createEnumTypeChecker,
|
4166 | oneOfType: createUnionTypeChecker,
|
4167 | shape: createShapeTypeChecker
|
4168 | };
|
4169 |
|
4170 | |
4171 |
|
4172 |
|
4173 |
|
4174 |
|
4175 | function is(x, y) {
|
4176 |
|
4177 | if (x === y) {
|
4178 |
|
4179 |
|
4180 | return x !== 0 || 1 / x === 1 / y;
|
4181 | } else {
|
4182 |
|
4183 | return x !== x && y !== y;
|
4184 | }
|
4185 | }
|
4186 |
|
4187 |
|
4188 | |
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 | function PropTypeError(message) {
|
4196 | this.message = message;
|
4197 | this.stack = '';
|
4198 | }
|
4199 |
|
4200 | PropTypeError.prototype = Error.prototype;
|
4201 |
|
4202 | function createChainableTypeChecker(validate) {
|
4203 | if (process.env.NODE_ENV !== 'production') {
|
4204 | var manualPropTypeCallCache = {};
|
4205 | var manualPropTypeWarningCount = 0;
|
4206 | }
|
4207 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
4208 | componentName = componentName || ANONYMOUS;
|
4209 | propFullName = propFullName || propName;
|
4210 |
|
4211 | if (secret !== ReactPropTypesSecret) {
|
4212 | if (throwOnDirectAccess) {
|
4213 |
|
4214 | invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
4215 | } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
4216 |
|
4217 | var cacheKey = componentName + ':' + propName;
|
4218 | if (!manualPropTypeCallCache[cacheKey] &&
|
4219 |
|
4220 | manualPropTypeWarningCount < 3) {
|
4221 | warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName);
|
4222 | manualPropTypeCallCache[cacheKey] = true;
|
4223 | manualPropTypeWarningCount++;
|
4224 | }
|
4225 | }
|
4226 | }
|
4227 | if (props[propName] == null) {
|
4228 | if (isRequired) {
|
4229 | if (props[propName] === null) {
|
4230 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
4231 | }
|
4232 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
4233 | }
|
4234 | return null;
|
4235 | } else {
|
4236 | return validate(props, propName, componentName, location, propFullName);
|
4237 | }
|
4238 | }
|
4239 |
|
4240 | var chainedCheckType = checkType.bind(null, false);
|
4241 | chainedCheckType.isRequired = checkType.bind(null, true);
|
4242 |
|
4243 | return chainedCheckType;
|
4244 | }
|
4245 |
|
4246 | function createPrimitiveTypeChecker(expectedType) {
|
4247 | function validate(props, propName, componentName, location, propFullName, secret) {
|
4248 | var propValue = props[propName];
|
4249 | var propType = getPropType(propValue);
|
4250 | if (propType !== expectedType) {
|
4251 |
|
4252 |
|
4253 |
|
4254 | var preciseType = getPreciseType(propValue);
|
4255 |
|
4256 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
4257 | }
|
4258 | return null;
|
4259 | }
|
4260 | return createChainableTypeChecker(validate);
|
4261 | }
|
4262 |
|
4263 | function createAnyTypeChecker() {
|
4264 | return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
4265 | }
|
4266 |
|
4267 | function createArrayOfTypeChecker(typeChecker) {
|
4268 | function validate(props, propName, componentName, location, propFullName) {
|
4269 | if (typeof typeChecker !== 'function') {
|
4270 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
4271 | }
|
4272 | var propValue = props[propName];
|
4273 | if (!Array.isArray(propValue)) {
|
4274 | var propType = getPropType(propValue);
|
4275 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
4276 | }
|
4277 | for (var i = 0; i < propValue.length; i++) {
|
4278 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
4279 | if (error instanceof Error) {
|
4280 | return error;
|
4281 | }
|
4282 | }
|
4283 | return null;
|
4284 | }
|
4285 | return createChainableTypeChecker(validate);
|
4286 | }
|
4287 |
|
4288 | function createElementTypeChecker() {
|
4289 | function validate(props, propName, componentName, location, propFullName) {
|
4290 | var propValue = props[propName];
|
4291 | if (!isValidElement(propValue)) {
|
4292 | var propType = getPropType(propValue);
|
4293 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
4294 | }
|
4295 | return null;
|
4296 | }
|
4297 | return createChainableTypeChecker(validate);
|
4298 | }
|
4299 |
|
4300 | function createInstanceTypeChecker(expectedClass) {
|
4301 | function validate(props, propName, componentName, location, propFullName) {
|
4302 | if (!(props[propName] instanceof expectedClass)) {
|
4303 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
4304 | var actualClassName = getClassName(props[propName]);
|
4305 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
4306 | }
|
4307 | return null;
|
4308 | }
|
4309 | return createChainableTypeChecker(validate);
|
4310 | }
|
4311 |
|
4312 | function createEnumTypeChecker(expectedValues) {
|
4313 | if (!Array.isArray(expectedValues)) {
|
4314 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
4315 | return emptyFunction.thatReturnsNull;
|
4316 | }
|
4317 |
|
4318 | function validate(props, propName, componentName, location, propFullName) {
|
4319 | var propValue = props[propName];
|
4320 | for (var i = 0; i < expectedValues.length; i++) {
|
4321 | if (is(propValue, expectedValues[i])) {
|
4322 | return null;
|
4323 | }
|
4324 | }
|
4325 |
|
4326 | var valuesString = JSON.stringify(expectedValues);
|
4327 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
4328 | }
|
4329 | return createChainableTypeChecker(validate);
|
4330 | }
|
4331 |
|
4332 | function createObjectOfTypeChecker(typeChecker) {
|
4333 | function validate(props, propName, componentName, location, propFullName) {
|
4334 | if (typeof typeChecker !== 'function') {
|
4335 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
4336 | }
|
4337 | var propValue = props[propName];
|
4338 | var propType = getPropType(propValue);
|
4339 | if (propType !== 'object') {
|
4340 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
4341 | }
|
4342 | for (var key in propValue) {
|
4343 | if (propValue.hasOwnProperty(key)) {
|
4344 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
4345 | if (error instanceof Error) {
|
4346 | return error;
|
4347 | }
|
4348 | }
|
4349 | }
|
4350 | return null;
|
4351 | }
|
4352 | return createChainableTypeChecker(validate);
|
4353 | }
|
4354 |
|
4355 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
4356 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
4357 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
4358 | return emptyFunction.thatReturnsNull;
|
4359 | }
|
4360 |
|
4361 | function validate(props, propName, componentName, location, propFullName) {
|
4362 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
4363 | var checker = arrayOfTypeCheckers[i];
|
4364 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
4365 | return null;
|
4366 | }
|
4367 | }
|
4368 |
|
4369 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
4370 | }
|
4371 | return createChainableTypeChecker(validate);
|
4372 | }
|
4373 |
|
4374 | function createNodeChecker() {
|
4375 | function validate(props, propName, componentName, location, propFullName) {
|
4376 | if (!isNode(props[propName])) {
|
4377 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
4378 | }
|
4379 | return null;
|
4380 | }
|
4381 | return createChainableTypeChecker(validate);
|
4382 | }
|
4383 |
|
4384 | function createShapeTypeChecker(shapeTypes) {
|
4385 | function validate(props, propName, componentName, location, propFullName) {
|
4386 | var propValue = props[propName];
|
4387 | var propType = getPropType(propValue);
|
4388 | if (propType !== 'object') {
|
4389 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
4390 | }
|
4391 | for (var key in shapeTypes) {
|
4392 | var checker = shapeTypes[key];
|
4393 | if (!checker) {
|
4394 | continue;
|
4395 | }
|
4396 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
4397 | if (error) {
|
4398 | return error;
|
4399 | }
|
4400 | }
|
4401 | return null;
|
4402 | }
|
4403 | return createChainableTypeChecker(validate);
|
4404 | }
|
4405 |
|
4406 | function isNode(propValue) {
|
4407 | switch (typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue)) {
|
4408 | case 'number':
|
4409 | case 'string':
|
4410 | case 'undefined':
|
4411 | return true;
|
4412 | case 'boolean':
|
4413 | return !propValue;
|
4414 | case 'object':
|
4415 | if (Array.isArray(propValue)) {
|
4416 | return propValue.every(isNode);
|
4417 | }
|
4418 | if (propValue === null || isValidElement(propValue)) {
|
4419 | return true;
|
4420 | }
|
4421 |
|
4422 | var iteratorFn = getIteratorFn(propValue);
|
4423 | if (iteratorFn) {
|
4424 | var iterator = iteratorFn.call(propValue);
|
4425 | var step;
|
4426 | if (iteratorFn !== propValue.entries) {
|
4427 | while (!(step = iterator.next()).done) {
|
4428 | if (!isNode(step.value)) {
|
4429 | return false;
|
4430 | }
|
4431 | }
|
4432 | } else {
|
4433 |
|
4434 | while (!(step = iterator.next()).done) {
|
4435 | var entry = step.value;
|
4436 | if (entry) {
|
4437 | if (!isNode(entry[1])) {
|
4438 | return false;
|
4439 | }
|
4440 | }
|
4441 | }
|
4442 | }
|
4443 | } else {
|
4444 | return false;
|
4445 | }
|
4446 |
|
4447 | return true;
|
4448 | default:
|
4449 | return false;
|
4450 | }
|
4451 | }
|
4452 |
|
4453 | function isSymbol(propType, propValue) {
|
4454 |
|
4455 | if (propType === 'symbol') {
|
4456 | return true;
|
4457 | }
|
4458 |
|
4459 |
|
4460 | if (propValue['@@toStringTag'] === 'Symbol') {
|
4461 | return true;
|
4462 | }
|
4463 |
|
4464 |
|
4465 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
4466 | return true;
|
4467 | }
|
4468 |
|
4469 | return false;
|
4470 | }
|
4471 |
|
4472 |
|
4473 | function getPropType(propValue) {
|
4474 | var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
|
4475 | if (Array.isArray(propValue)) {
|
4476 | return 'array';
|
4477 | }
|
4478 | if (propValue instanceof RegExp) {
|
4479 |
|
4480 |
|
4481 |
|
4482 | return 'object';
|
4483 | }
|
4484 | if (isSymbol(propType, propValue)) {
|
4485 | return 'symbol';
|
4486 | }
|
4487 | return propType;
|
4488 | }
|
4489 |
|
4490 |
|
4491 |
|
4492 | function getPreciseType(propValue) {
|
4493 | var propType = getPropType(propValue);
|
4494 | if (propType === 'object') {
|
4495 | if (propValue instanceof Date) {
|
4496 | return 'date';
|
4497 | } else if (propValue instanceof RegExp) {
|
4498 | return 'regexp';
|
4499 | }
|
4500 | }
|
4501 | return propType;
|
4502 | }
|
4503 |
|
4504 |
|
4505 | function getClassName(propValue) {
|
4506 | if (!propValue.constructor || !propValue.constructor.name) {
|
4507 | return ANONYMOUS;
|
4508 | }
|
4509 | return propValue.constructor.name;
|
4510 | }
|
4511 |
|
4512 | ReactPropTypes.checkPropTypes = checkPropTypes;
|
4513 | ReactPropTypes.PropTypes = ReactPropTypes;
|
4514 |
|
4515 | return ReactPropTypes;
|
4516 | };
|
4517 | }.call(exports, __webpack_require__(0)))
|
4518 |
|
4519 | }),
|
4520 |
|
4521 | (function(module, exports, __webpack_require__) {
|
4522 |
|
4523 | "use strict";
|
4524 |
|
4525 |
|
4526 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
4527 |
|
4528 | var g;
|
4529 |
|
4530 |
|
4531 | g = function () {
|
4532 | return this;
|
4533 | }();
|
4534 |
|
4535 | try {
|
4536 |
|
4537 | g = g || Function("return this")() || (1, eval)("this");
|
4538 | } catch (e) {
|
4539 |
|
4540 | if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
|
4541 | }
|
4542 |
|
4543 |
|
4544 |
|
4545 |
|
4546 |
|
4547 | module.exports = g;
|
4548 |
|
4549 | }),
|
4550 |
|
4551 | (function(module, exports, __webpack_require__) {
|
4552 |
|
4553 | "use strict";
|
4554 |
|
4555 |
|
4556 | Object.defineProperty(exports, "__esModule", {
|
4557 | value: true
|
4558 | });
|
4559 | exports.default = appendImportantToEachValue;
|
4560 |
|
4561 | var _appendPxIfNeeded = __webpack_require__(21);
|
4562 |
|
4563 | var _appendPxIfNeeded2 = _interopRequireDefault(_appendPxIfNeeded);
|
4564 |
|
4565 | var _mapObject = __webpack_require__(24);
|
4566 |
|
4567 | var _mapObject2 = _interopRequireDefault(_mapObject);
|
4568 |
|
4569 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4570 |
|
4571 | function appendImportantToEachValue(style) {
|
4572 | return (0, _mapObject2.default)(style, function (result, key) {
|
4573 | return (0, _appendPxIfNeeded2.default)(key, style[key]) + ' !important';
|
4574 | });
|
4575 | }
|
4576 | module.exports = exports['default'];
|
4577 |
|
4578 | }),
|
4579 |
|
4580 | (function(module, exports, __webpack_require__) {
|
4581 |
|
4582 | "use strict";
|
4583 |
|
4584 |
|
4585 | Object.defineProperty(exports, "__esModule", {
|
4586 | value: true
|
4587 | });
|
4588 | var _camelCaseRegex = /([a-z])?([A-Z])/g;
|
4589 |
|
4590 | var _camelCaseReplacer = function _camelCaseReplacer(match, p1, p2) {
|
4591 | return (p1 || '') + '-' + p2.toLowerCase();
|
4592 | };
|
4593 |
|
4594 | var _camelCaseToDashCase = function _camelCaseToDashCase(s) {
|
4595 | return s.replace(_camelCaseRegex, _camelCaseReplacer);
|
4596 | };
|
4597 |
|
4598 | var camelCasePropsToDashCase = function camelCasePropsToDashCase(prefixedStyle) {
|
4599 |
|
4600 |
|
4601 | return Object.keys(prefixedStyle).reduce(function (result, key) {
|
4602 | var dashCaseKey = _camelCaseToDashCase(key);
|
4603 |
|
4604 |
|
4605 | if (/^ms-/.test(dashCaseKey)) {
|
4606 | dashCaseKey = '-' + dashCaseKey;
|
4607 | }
|
4608 |
|
4609 | result[dashCaseKey] = prefixedStyle[key];
|
4610 | return result;
|
4611 | }, {});
|
4612 | };
|
4613 |
|
4614 | exports.default = camelCasePropsToDashCase;
|
4615 | module.exports = exports['default'];
|
4616 |
|
4617 | }),
|
4618 |
|
4619 | (function(module, exports, __webpack_require__) {
|
4620 |
|
4621 | "use strict";
|
4622 |
|
4623 |
|
4624 | Object.defineProperty(exports, "__esModule", {
|
4625 | value: true
|
4626 | });
|
4627 | exports.default = undefined;
|
4628 |
|
4629 | var _class, _temp;
|
4630 |
|
4631 | var _react = __webpack_require__(2);
|
4632 |
|
4633 | var _react2 = _interopRequireDefault(_react);
|
4634 |
|
4635 | var _propTypes = __webpack_require__(4);
|
4636 |
|
4637 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
4638 |
|
4639 | var _styleKeeper = __webpack_require__(11);
|
4640 |
|
4641 | var _styleKeeper2 = _interopRequireDefault(_styleKeeper);
|
4642 |
|
4643 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4644 |
|
4645 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4646 |
|
4647 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
4648 |
|
4649 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
4650 |
|
4651 | var StyleSheet = (_temp = _class = function (_PureComponent) {
|
4652 | _inherits(StyleSheet, _PureComponent);
|
4653 |
|
4654 | function StyleSheet() {
|
4655 | _classCallCheck(this, StyleSheet);
|
4656 |
|
4657 | var _this = _possibleConstructorReturn(this, _PureComponent.apply(this, arguments));
|
4658 |
|
4659 | _this._onChange = function () {
|
4660 | setTimeout(function () {
|
4661 | _this._isMounted && _this.setState(_this._getCSSState());
|
4662 | }, 0);
|
4663 | };
|
4664 |
|
4665 | _this.state = _this._getCSSState();
|
4666 | return _this;
|
4667 | }
|
4668 |
|
4669 | StyleSheet.prototype.componentDidMount = function componentDidMount() {
|
4670 | this._isMounted = true;
|
4671 | this._subscription = this.context._radiumStyleKeeper.subscribe(this._onChange);
|
4672 | this._onChange();
|
4673 | };
|
4674 |
|
4675 | StyleSheet.prototype.componentWillUnmount = function componentWillUnmount() {
|
4676 | this._isMounted = false;
|
4677 | if (this._subscription) {
|
4678 | this._subscription.remove();
|
4679 | }
|
4680 | };
|
4681 |
|
4682 | StyleSheet.prototype._getCSSState = function _getCSSState() {
|
4683 | return { css: this.context._radiumStyleKeeper.getCSS() };
|
4684 | };
|
4685 |
|
4686 | StyleSheet.prototype.render = function render() {
|
4687 | return _react2.default.createElement('style', { dangerouslySetInnerHTML: { __html: this.state.css } });
|
4688 | };
|
4689 |
|
4690 | return StyleSheet;
|
4691 | }(_react.PureComponent), _class.contextTypes = {
|
4692 | _radiumStyleKeeper: _propTypes2.default.instanceOf(_styleKeeper2.default)
|
4693 | }, _temp);
|
4694 | exports.default = StyleSheet;
|
4695 | module.exports = exports['default'];
|
4696 |
|
4697 | }),
|
4698 |
|
4699 | (function(module, exports, __webpack_require__) {
|
4700 |
|
4701 | "use strict";
|
4702 | (function(process) {
|
4703 |
|
4704 | Object.defineProperty(exports, "__esModule", {
|
4705 | value: true
|
4706 | });
|
4707 |
|
4708 | var _enhancer = __webpack_require__(12);
|
4709 |
|
4710 | var _enhancer2 = _interopRequireDefault(_enhancer);
|
4711 |
|
4712 | var _plugins = __webpack_require__(14);
|
4713 |
|
4714 | var _plugins2 = _interopRequireDefault(_plugins);
|
4715 |
|
4716 | var _style = __webpack_require__(27);
|
4717 |
|
4718 | var _style2 = _interopRequireDefault(_style);
|
4719 |
|
4720 | var _styleRoot = __webpack_require__(26);
|
4721 |
|
4722 | var _styleRoot2 = _interopRequireDefault(_styleRoot);
|
4723 |
|
4724 | var _getState = __webpack_require__(13);
|
4725 |
|
4726 | var _getState2 = _interopRequireDefault(_getState);
|
4727 |
|
4728 | var _keyframes = __webpack_require__(28);
|
4729 |
|
4730 | var _keyframes2 = _interopRequireDefault(_keyframes);
|
4731 |
|
4732 | var _resolveStyles = __webpack_require__(15);
|
4733 |
|
4734 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4735 |
|
4736 | function Radium(ComposedComponent) {
|
4737 | return (0, _enhancer2.default)(ComposedComponent);
|
4738 | }
|
4739 |
|
4740 | Radium.Plugins = _plugins2.default;
|
4741 | Radium.Style = _style2.default;
|
4742 | Radium.StyleRoot = _styleRoot2.default;
|
4743 | Radium.getState = _getState2.default;
|
4744 | Radium.keyframes = _keyframes2.default;
|
4745 |
|
4746 | if (process.env.NODE_ENV !== 'production') {
|
4747 | Radium.TestMode = {
|
4748 | clearState: _resolveStyles.__clearStateForTests,
|
4749 | disable: _resolveStyles.__setTestMode.bind(null, false),
|
4750 | enable: _resolveStyles.__setTestMode.bind(null, true)
|
4751 | };
|
4752 | }
|
4753 |
|
4754 | exports.default = Radium;
|
4755 | module.exports = exports['default'];
|
4756 | }.call(exports, __webpack_require__(0)))
|
4757 |
|
4758 | }),
|
4759 |
|
4760 | (function(module, exports, __webpack_require__) {
|
4761 |
|
4762 | "use strict";
|
4763 |
|
4764 |
|
4765 | Object.defineProperty(exports, "__esModule", {
|
4766 | value: true
|
4767 | });
|
4768 |
|
4769 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
4770 |
|
4771 | exports.isNestedStyle = isNestedStyle;
|
4772 | exports.mergeStyles = mergeStyles;
|
4773 | function isNestedStyle(value) {
|
4774 |
|
4775 |
|
4776 | return value && value.constructor === Object && value.toString === Object.prototype.toString;
|
4777 | }
|
4778 |
|
4779 |
|
4780 | function mergeStyles(styles) {
|
4781 | var result = {};
|
4782 |
|
4783 | styles.forEach(function (style) {
|
4784 | if (!style || (typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') {
|
4785 | return;
|
4786 | }
|
4787 |
|
4788 | if (Array.isArray(style)) {
|
4789 | style = mergeStyles(style);
|
4790 | }
|
4791 |
|
4792 | Object.keys(style).forEach(function (key) {
|
4793 |
|
4794 | if (!isNestedStyle(style[key]) || !isNestedStyle(result[key])) {
|
4795 | result[key] = style[key];
|
4796 | return;
|
4797 | }
|
4798 |
|
4799 |
|
4800 |
|
4801 |
|
4802 |
|
4803 | if (key.indexOf('@media') === 0) {
|
4804 | var newKey = key;
|
4805 |
|
4806 | while (true) {
|
4807 | newKey += ' ';
|
4808 | if (!result[newKey]) {
|
4809 | result[newKey] = style[key];
|
4810 | return;
|
4811 | }
|
4812 | }
|
4813 | }
|
4814 |
|
4815 |
|
4816 | result[key] = mergeStyles([result[key], style[key]]);
|
4817 | });
|
4818 | });
|
4819 |
|
4820 | return result;
|
4821 | }
|
4822 |
|
4823 | }),
|
4824 |
|
4825 | (function(module, exports, __webpack_require__) {
|
4826 |
|
4827 | "use strict";
|
4828 | (function(process) {
|
4829 |
|
4830 | Object.defineProperty(exports, "__esModule", {
|
4831 | value: true
|
4832 | });
|
4833 |
|
4834 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
4835 |
|
4836 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
4837 |
|
4838 | var _checkProps = function checkProps() {};
|
4839 |
|
4840 | if (process.env.NODE_ENV !== 'production') {
|
4841 |
|
4842 |
|
4843 |
|
4844 |
|
4845 | var shorthandPropertyExpansions = {
|
4846 | background: ['backgroundAttachment', 'backgroundBlendMode', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPosition', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundRepeatX', 'backgroundRepeatY', 'backgroundSize'],
|
4847 | border: ['borderBottom', 'borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderColor', 'borderLeft', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRight', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderStyle', 'borderTop', 'borderTopColor', 'borderTopStyle', 'borderTopWidth', 'borderWidth'],
|
4848 | borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
|
4849 | borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
|
4850 | font: ['fontFamily', 'fontKerning', 'fontSize', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantLigatures', 'fontWeight', 'lineHeight'],
|
4851 | listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
|
4852 | margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
|
4853 | padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
|
4854 | transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction']
|
4855 | };
|
4856 |
|
4857 | _checkProps = function checkProps(config) {
|
4858 | var componentName = config.componentName,
|
4859 | style = config.style;
|
4860 |
|
4861 | if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object' || !style) {
|
4862 | return;
|
4863 | }
|
4864 |
|
4865 | var styleKeys = Object.keys(style);
|
4866 | styleKeys.forEach(function (styleKey) {
|
4867 | if (Array.isArray(shorthandPropertyExpansions[styleKey]) && shorthandPropertyExpansions[styleKey].some(function (sp) {
|
4868 | return styleKeys.indexOf(sp) !== -1;
|
4869 | })) {
|
4870 | if (process.env.NODE_ENV !== 'production') {
|
4871 |
|
4872 | console.warn('Radium: property "' + styleKey + '" in style object', style, ': do not mix longhand and ' + 'shorthand properties in the same style object. Check the render ' + 'method of ' + componentName + '.', 'See https://github.com/FormidableLabs/radium/issues/95 for more ' + 'information.');
|
4873 |
|
4874 | }
|
4875 | }
|
4876 | });
|
4877 |
|
4878 | styleKeys.forEach(function (k) {
|
4879 | return _checkProps(_extends({}, config, { style: style[k] }));
|
4880 | });
|
4881 | return;
|
4882 | };
|
4883 | }
|
4884 |
|
4885 | exports.default = _checkProps;
|
4886 | module.exports = exports['default'];
|
4887 | }.call(exports, __webpack_require__(0)))
|
4888 |
|
4889 | }),
|
4890 |
|
4891 | (function(module, exports, __webpack_require__) {
|
4892 |
|
4893 | "use strict";
|
4894 |
|
4895 |
|
4896 | Object.defineProperty(exports, "__esModule", {
|
4897 | value: true
|
4898 | });
|
4899 | exports.default = keyframesPlugin;
|
4900 | function keyframesPlugin(_ref) {
|
4901 | var addCSS = _ref.addCSS,
|
4902 | config = _ref.config,
|
4903 | style = _ref.style;
|
4904 |
|
4905 | var newStyle = Object.keys(style).reduce(function (newStyleInProgress, key) {
|
4906 | var value = style[key];
|
4907 | if (key === 'animationName' && value && value.__radiumKeyframes) {
|
4908 | var keyframesValue = value;
|
4909 |
|
4910 | var _keyframesValue$__pro = keyframesValue.__process(config.userAgent),
|
4911 | animationName = _keyframesValue$__pro.animationName,
|
4912 | css = _keyframesValue$__pro.css;
|
4913 |
|
4914 | addCSS(css);
|
4915 | value = animationName;
|
4916 | }
|
4917 |
|
4918 | newStyleInProgress[key] = value;
|
4919 | return newStyleInProgress;
|
4920 | }, {});
|
4921 | return { style: newStyle };
|
4922 | }
|
4923 | module.exports = exports['default'];
|
4924 |
|
4925 | }),
|
4926 |
|
4927 | (function(module, exports, __webpack_require__) {
|
4928 |
|
4929 | "use strict";
|
4930 |
|
4931 |
|
4932 | Object.defineProperty(exports, "__esModule", {
|
4933 | value: true
|
4934 | });
|
4935 |
|
4936 |
|
4937 |
|
4938 |
|
4939 | var mergeStyleArrayPlugin = function mergeStyleArrayPlugin(_ref) {
|
4940 | var style = _ref.style,
|
4941 | mergeStyles = _ref.mergeStyles;
|
4942 |
|
4943 |
|
4944 | var newStyle = Array.isArray(style) ? mergeStyles(style) : style;
|
4945 | return { style: newStyle };
|
4946 | };
|
4947 |
|
4948 | exports.default = mergeStyleArrayPlugin;
|
4949 | module.exports = exports['default'];
|
4950 |
|
4951 | }),
|
4952 |
|
4953 | (function(module, exports, __webpack_require__) {
|
4954 |
|
4955 | "use strict";
|
4956 |
|
4957 |
|
4958 | Object.defineProperty(exports, "__esModule", {
|
4959 | value: true
|
4960 | });
|
4961 | var _callbacks = [];
|
4962 | var _mouseUpListenerIsActive = false;
|
4963 |
|
4964 | function _handleMouseUp() {
|
4965 | _callbacks.forEach(function (callback) {
|
4966 | callback();
|
4967 | });
|
4968 | }
|
4969 |
|
4970 | var subscribe = function subscribe(callback) {
|
4971 | if (_callbacks.indexOf(callback) === -1) {
|
4972 | _callbacks.push(callback);
|
4973 | }
|
4974 |
|
4975 | if (!_mouseUpListenerIsActive) {
|
4976 | window.addEventListener('mouseup', _handleMouseUp);
|
4977 | _mouseUpListenerIsActive = true;
|
4978 | }
|
4979 |
|
4980 | return {
|
4981 | remove: function remove() {
|
4982 | var index = _callbacks.indexOf(callback);
|
4983 | _callbacks.splice(index, 1);
|
4984 |
|
4985 | if (_callbacks.length === 0 && _mouseUpListenerIsActive) {
|
4986 | window.removeEventListener('mouseup', _handleMouseUp);
|
4987 | _mouseUpListenerIsActive = false;
|
4988 | }
|
4989 | }
|
4990 | };
|
4991 | };
|
4992 |
|
4993 | exports.default = {
|
4994 | subscribe: subscribe,
|
4995 | __triggerForTests: _handleMouseUp
|
4996 | };
|
4997 | module.exports = exports['default'];
|
4998 |
|
4999 | }),
|
5000 |
|
5001 | (function(module, exports, __webpack_require__) {
|
5002 |
|
5003 | "use strict";
|
5004 |
|
5005 |
|
5006 | Object.defineProperty(exports, "__esModule", {
|
5007 | value: true
|
5008 | });
|
5009 | exports.default = prefixPlugin;
|
5010 |
|
5011 | var _prefixer = __webpack_require__(10);
|
5012 |
|
5013 | function prefixPlugin(_ref) {
|
5014 | var config = _ref.config,
|
5015 | style = _ref.style;
|
5016 |
|
5017 | var newStyle = (0, _prefixer.getPrefixedStyle)(style, config.userAgent);
|
5018 | return { style: newStyle };
|
5019 | }
|
5020 | module.exports = exports['default'];
|
5021 |
|
5022 | }),
|
5023 |
|
5024 | (function(module, exports, __webpack_require__) {
|
5025 |
|
5026 | "use strict";
|
5027 |
|
5028 |
|
5029 | Object.defineProperty(exports, "__esModule", {
|
5030 | value: true
|
5031 | });
|
5032 | exports.default = removeNestedStyles;
|
5033 | function removeNestedStyles(_ref) {
|
5034 | var isNestedStyle = _ref.isNestedStyle,
|
5035 | style = _ref.style;
|
5036 |
|
5037 |
|
5038 | var newStyle = Object.keys(style).reduce(function (newStyleInProgress, key) {
|
5039 | var value = style[key];
|
5040 | if (!isNestedStyle(value)) {
|
5041 | newStyleInProgress[key] = value;
|
5042 | }
|
5043 | return newStyleInProgress;
|
5044 | }, {});
|
5045 |
|
5046 | return {
|
5047 | style: newStyle
|
5048 | };
|
5049 | }
|
5050 |
|
5051 | module.exports = exports['default'];
|
5052 |
|
5053 | }),
|
5054 |
|
5055 | (function(module, exports, __webpack_require__) {
|
5056 |
|
5057 | "use strict";
|
5058 |
|
5059 |
|
5060 | Object.defineProperty(exports, "__esModule", {
|
5061 | value: true
|
5062 | });
|
5063 |
|
5064 | var _mouseUpListener = __webpack_require__(69);
|
5065 |
|
5066 | var _mouseUpListener2 = _interopRequireDefault(_mouseUpListener);
|
5067 |
|
5068 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5069 |
|
5070 | var _isInteractiveStyleField = function _isInteractiveStyleField(styleFieldName) {
|
5071 | return styleFieldName === ':hover' || styleFieldName === ':active' || styleFieldName === ':focus';
|
5072 | };
|
5073 |
|
5074 | var resolveInteractionStyles = function resolveInteractionStyles(config) {
|
5075 | var ExecutionEnvironment = config.ExecutionEnvironment,
|
5076 | getComponentField = config.getComponentField,
|
5077 | getState = config.getState,
|
5078 | mergeStyles = config.mergeStyles,
|
5079 | props = config.props,
|
5080 | setState = config.setState,
|
5081 | style = config.style;
|
5082 |
|
5083 |
|
5084 | var newComponentFields = {};
|
5085 | var newProps = {};
|
5086 |
|
5087 |
|
5088 | if (style[':hover']) {
|
5089 |
|
5090 |
|
5091 |
|
5092 | var existingOnMouseEnter = props.onMouseEnter;
|
5093 | newProps.onMouseEnter = function (e) {
|
5094 | existingOnMouseEnter && existingOnMouseEnter(e);
|
5095 | setState(':hover', true);
|
5096 | };
|
5097 |
|
5098 | var existingOnMouseLeave = props.onMouseLeave;
|
5099 | newProps.onMouseLeave = function (e) {
|
5100 | existingOnMouseLeave && existingOnMouseLeave(e);
|
5101 | setState(':hover', false);
|
5102 | };
|
5103 | }
|
5104 |
|
5105 | if (style[':active']) {
|
5106 | var existingOnMouseDown = props.onMouseDown;
|
5107 | newProps.onMouseDown = function (e) {
|
5108 | existingOnMouseDown && existingOnMouseDown(e);
|
5109 | newComponentFields._lastMouseDown = Date.now();
|
5110 | setState(':active', 'viamousedown');
|
5111 | };
|
5112 |
|
5113 | var existingOnKeyDown = props.onKeyDown;
|
5114 | newProps.onKeyDown = function (e) {
|
5115 | existingOnKeyDown && existingOnKeyDown(e);
|
5116 | if (e.key === ' ' || e.key === 'Enter') {
|
5117 | setState(':active', 'viakeydown');
|
5118 | }
|
5119 | };
|
5120 |
|
5121 | var existingOnKeyUp = props.onKeyUp;
|
5122 | newProps.onKeyUp = function (e) {
|
5123 | existingOnKeyUp && existingOnKeyUp(e);
|
5124 | if (e.key === ' ' || e.key === 'Enter') {
|
5125 | setState(':active', false);
|
5126 | }
|
5127 | };
|
5128 | }
|
5129 |
|
5130 | if (style[':focus']) {
|
5131 | var existingOnFocus = props.onFocus;
|
5132 | newProps.onFocus = function (e) {
|
5133 | existingOnFocus && existingOnFocus(e);
|
5134 | setState(':focus', true);
|
5135 | };
|
5136 |
|
5137 | var existingOnBlur = props.onBlur;
|
5138 | newProps.onBlur = function (e) {
|
5139 | existingOnBlur && existingOnBlur(e);
|
5140 | setState(':focus', false);
|
5141 | };
|
5142 | }
|
5143 |
|
5144 | if (style[':active'] && !getComponentField('_radiumMouseUpListener') && ExecutionEnvironment.canUseEventListeners) {
|
5145 | newComponentFields._radiumMouseUpListener = _mouseUpListener2.default.subscribe(function () {
|
5146 | Object.keys(getComponentField('state')._radiumStyleState).forEach(function (key) {
|
5147 | if (getState(':active', key) === 'viamousedown') {
|
5148 | setState(':active', false, key);
|
5149 | }
|
5150 | });
|
5151 | });
|
5152 | }
|
5153 |
|
5154 |
|
5155 | var interactionStyles = props.disabled ? [style[':disabled']] : Object.keys(style).filter(function (name) {
|
5156 | return _isInteractiveStyleField(name) && getState(name);
|
5157 | }).map(function (name) {
|
5158 | return style[name];
|
5159 | });
|
5160 |
|
5161 | var newStyle = mergeStyles([style].concat(interactionStyles));
|
5162 |
|
5163 |
|
5164 | newStyle = Object.keys(newStyle).reduce(function (styleWithoutInteractions, name) {
|
5165 | if (!_isInteractiveStyleField(name) && name !== ':disabled') {
|
5166 | styleWithoutInteractions[name] = newStyle[name];
|
5167 | }
|
5168 | return styleWithoutInteractions;
|
5169 | }, {});
|
5170 |
|
5171 | return {
|
5172 | componentFields: newComponentFields,
|
5173 | props: newProps,
|
5174 | style: newStyle
|
5175 | };
|
5176 | };
|
5177 |
|
5178 | exports.default = resolveInteractionStyles;
|
5179 | module.exports = exports['default'];
|
5180 |
|
5181 | }),
|
5182 |
|
5183 | (function(module, exports, __webpack_require__) {
|
5184 |
|
5185 | "use strict";
|
5186 |
|
5187 |
|
5188 | Object.defineProperty(exports, "__esModule", {
|
5189 | value: true
|
5190 | });
|
5191 |
|
5192 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
5193 |
|
5194 | exports.default = resolveMediaQueries;
|
5195 | var _windowMatchMedia = void 0;
|
5196 | function _getWindowMatchMedia(ExecutionEnvironment) {
|
5197 | if (_windowMatchMedia === undefined) {
|
5198 | _windowMatchMedia = !!ExecutionEnvironment.canUseDOM && !!window && !!window.matchMedia && function (mediaQueryString) {
|
5199 | return window.matchMedia(mediaQueryString);
|
5200 | } || null;
|
5201 | }
|
5202 | return _windowMatchMedia;
|
5203 | }
|
5204 |
|
5205 | function _filterObject(obj, predicate) {
|
5206 | return Object.keys(obj).filter(function (key) {
|
5207 | return predicate(obj[key], key);
|
5208 | }).reduce(function (result, key) {
|
5209 | result[key] = obj[key];
|
5210 | return result;
|
5211 | }, {});
|
5212 | }
|
5213 |
|
5214 | function _removeMediaQueries(style) {
|
5215 | return Object.keys(style).reduce(function (styleWithoutMedia, key) {
|
5216 | if (key.indexOf('@media') !== 0) {
|
5217 | styleWithoutMedia[key] = style[key];
|
5218 | }
|
5219 | return styleWithoutMedia;
|
5220 | }, {});
|
5221 | }
|
5222 |
|
5223 | function _topLevelRulesToCSS(_ref) {
|
5224 | var addCSS = _ref.addCSS,
|
5225 | appendImportantToEachValue = _ref.appendImportantToEachValue,
|
5226 | cssRuleSetToString = _ref.cssRuleSetToString,
|
5227 | hash = _ref.hash,
|
5228 | isNestedStyle = _ref.isNestedStyle,
|
5229 | style = _ref.style,
|
5230 | userAgent = _ref.userAgent;
|
5231 |
|
5232 | var className = '';
|
5233 | Object.keys(style).filter(function (name) {
|
5234 | return name.indexOf('@media') === 0;
|
5235 | }).map(function (query) {
|
5236 | var topLevelRules = appendImportantToEachValue(_filterObject(style[query], function (value) {
|
5237 | return !isNestedStyle(value);
|
5238 | }));
|
5239 |
|
5240 | if (!Object.keys(topLevelRules).length) {
|
5241 | return;
|
5242 | }
|
5243 |
|
5244 | var ruleCSS = cssRuleSetToString('', topLevelRules, userAgent);
|
5245 |
|
5246 |
|
5247 | var mediaQueryClassName = 'rmq-' + hash(query + ruleCSS);
|
5248 | var css = query + '{ .' + mediaQueryClassName + ruleCSS + '}';
|
5249 |
|
5250 | addCSS(css);
|
5251 |
|
5252 | className += (className ? ' ' : '') + mediaQueryClassName;
|
5253 | });
|
5254 | return className;
|
5255 | }
|
5256 |
|
5257 | function _subscribeToMediaQuery(_ref2) {
|
5258 | var listener = _ref2.listener,
|
5259 | listenersByQuery = _ref2.listenersByQuery,
|
5260 | matchMedia = _ref2.matchMedia,
|
5261 | mediaQueryListsByQuery = _ref2.mediaQueryListsByQuery,
|
5262 | query = _ref2.query;
|
5263 |
|
5264 | query = query.replace('@media ', '');
|
5265 |
|
5266 | var mql = mediaQueryListsByQuery[query];
|
5267 | if (!mql && matchMedia) {
|
5268 | mediaQueryListsByQuery[query] = mql = matchMedia(query);
|
5269 | }
|
5270 |
|
5271 | if (!listenersByQuery || !listenersByQuery[query]) {
|
5272 | mql.addListener(listener);
|
5273 |
|
5274 | listenersByQuery[query] = {
|
5275 | remove: function remove() {
|
5276 | mql.removeListener(listener);
|
5277 | }
|
5278 | };
|
5279 | }
|
5280 | return mql;
|
5281 | }
|
5282 |
|
5283 | function resolveMediaQueries(_ref3) {
|
5284 | var ExecutionEnvironment = _ref3.ExecutionEnvironment,
|
5285 | addCSS = _ref3.addCSS,
|
5286 | appendImportantToEachValue = _ref3.appendImportantToEachValue,
|
5287 | config = _ref3.config,
|
5288 | cssRuleSetToString = _ref3.cssRuleSetToString,
|
5289 | getComponentField = _ref3.getComponentField,
|
5290 | getGlobalState = _ref3.getGlobalState,
|
5291 | hash = _ref3.hash,
|
5292 | isNestedStyle = _ref3.isNestedStyle,
|
5293 | mergeStyles = _ref3.mergeStyles,
|
5294 | props = _ref3.props,
|
5295 | setState = _ref3.setState,
|
5296 | style = _ref3.style;
|
5297 |
|
5298 |
|
5299 | var newStyle = _removeMediaQueries(style);
|
5300 | var mediaQueryClassNames = _topLevelRulesToCSS({
|
5301 | addCSS: addCSS,
|
5302 | appendImportantToEachValue: appendImportantToEachValue,
|
5303 | cssRuleSetToString: cssRuleSetToString,
|
5304 | hash: hash,
|
5305 | isNestedStyle: isNestedStyle,
|
5306 | style: style,
|
5307 | userAgent: config.userAgent
|
5308 | });
|
5309 |
|
5310 | var newProps = mediaQueryClassNames ? {
|
5311 | className: mediaQueryClassNames + (props.className ? ' ' + props.className : '')
|
5312 | } : null;
|
5313 |
|
5314 | var matchMedia = config.matchMedia || _getWindowMatchMedia(ExecutionEnvironment);
|
5315 |
|
5316 | if (!matchMedia) {
|
5317 | return {
|
5318 | props: newProps,
|
5319 | style: newStyle
|
5320 | };
|
5321 | }
|
5322 |
|
5323 | var listenersByQuery = _extends({}, getComponentField('_radiumMediaQueryListenersByQuery'));
|
5324 | var mediaQueryListsByQuery = getGlobalState('mediaQueryListsByQuery') || {};
|
5325 |
|
5326 | Object.keys(style).filter(function (name) {
|
5327 | return name.indexOf('@media') === 0;
|
5328 | }).map(function (query) {
|
5329 | var nestedRules = _filterObject(style[query], isNestedStyle);
|
5330 |
|
5331 | if (!Object.keys(nestedRules).length) {
|
5332 | return;
|
5333 | }
|
5334 |
|
5335 | var mql = _subscribeToMediaQuery({
|
5336 | listener: function listener() {
|
5337 | return setState(query, mql.matches, '_all');
|
5338 | },
|
5339 | listenersByQuery: listenersByQuery,
|
5340 | matchMedia: matchMedia,
|
5341 | mediaQueryListsByQuery: mediaQueryListsByQuery,
|
5342 | query: query
|
5343 | });
|
5344 |
|
5345 |
|
5346 | if (mql.matches) {
|
5347 | newStyle = mergeStyles([newStyle, nestedRules]);
|
5348 | }
|
5349 | });
|
5350 |
|
5351 | return {
|
5352 | componentFields: {
|
5353 | _radiumMediaQueryListenersByQuery: listenersByQuery
|
5354 | },
|
5355 | globalState: { mediaQueryListsByQuery: mediaQueryListsByQuery },
|
5356 | props: newProps,
|
5357 | style: newStyle
|
5358 | };
|
5359 | }
|
5360 | module.exports = exports['default'];
|
5361 |
|
5362 | }),
|
5363 |
|
5364 | (function(module, exports, __webpack_require__) {
|
5365 |
|
5366 | "use strict";
|
5367 |
|
5368 |
|
5369 | Object.defineProperty(exports, "__esModule", {
|
5370 | value: true
|
5371 | });
|
5372 | exports.default = visited;
|
5373 | function visited(_ref) {
|
5374 | var addCSS = _ref.addCSS,
|
5375 | appendImportantToEachValue = _ref.appendImportantToEachValue,
|
5376 | config = _ref.config,
|
5377 | cssRuleSetToString = _ref.cssRuleSetToString,
|
5378 | hash = _ref.hash,
|
5379 | props = _ref.props,
|
5380 | style = _ref.style;
|
5381 |
|
5382 |
|
5383 | var className = props.className;
|
5384 |
|
5385 | var newStyle = Object.keys(style).reduce(function (newStyleInProgress, key) {
|
5386 | var value = style[key];
|
5387 | if (key === ':visited') {
|
5388 | value = appendImportantToEachValue(value);
|
5389 | var ruleCSS = cssRuleSetToString('', value, config.userAgent);
|
5390 | var visitedClassName = 'rad-' + hash(ruleCSS);
|
5391 | var css = '.' + visitedClassName + ':visited' + ruleCSS;
|
5392 |
|
5393 | addCSS(css);
|
5394 | className = (className ? className + ' ' : '') + visitedClassName;
|
5395 | } else {
|
5396 | newStyleInProgress[key] = value;
|
5397 | }
|
5398 |
|
5399 | return newStyleInProgress;
|
5400 | }, {});
|
5401 |
|
5402 | return {
|
5403 | props: className === props.className ? null : { className: className },
|
5404 | style: newStyle
|
5405 | };
|
5406 | }
|
5407 |
|
5408 | module.exports = exports['default'];
|
5409 |
|
5410 | }),
|
5411 |
|
5412 | (function(module, exports) {
|
5413 |
|
5414 | module.exports = function() {
|
5415 | throw new Error("define cannot be used indirect");
|
5416 | };
|
5417 |
|
5418 |
|
5419 | })
|
5420 | ]);
|
5421 | }); |
\ | No newline at end of file |