UNPKG

19.4 kBJavaScriptView Raw
1/******/ (function(modules) { // webpackBootstrap
2/******/ // The module cache
3/******/ var installedModules = {};
4/******/
5/******/ // The require function
6/******/ function __webpack_require__(moduleId) {
7/******/
8/******/ // Check if module is in cache
9/******/ if(installedModules[moduleId]) {
10/******/ return installedModules[moduleId].exports;
11/******/ }
12/******/ // Create a new module (and put it into the cache)
13/******/ var module = installedModules[moduleId] = {
14/******/ i: moduleId,
15/******/ l: false,
16/******/ exports: {}
17/******/ };
18/******/
19/******/ // Execute the module function
20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ // Flag the module as loaded
23/******/ module.l = true;
24/******/
25/******/ // Return the exports of the module
26/******/ return module.exports;
27/******/ }
28/******/
29/******/
30/******/ // expose the modules object (__webpack_modules__)
31/******/ __webpack_require__.m = modules;
32/******/
33/******/ // expose the module cache
34/******/ __webpack_require__.c = installedModules;
35/******/
36/******/ // define getter function for harmony exports
37/******/ __webpack_require__.d = function(exports, name, getter) {
38/******/ if(!__webpack_require__.o(exports, name)) {
39/******/ Object.defineProperty(exports, name, {
40/******/ configurable: false,
41/******/ enumerable: true,
42/******/ get: getter
43/******/ });
44/******/ }
45/******/ };
46/******/
47/******/ // getDefaultExport function for compatibility with non-harmony modules
48/******/ __webpack_require__.n = function(module) {
49/******/ var getter = module && module.__esModule ?
50/******/ function getDefault() { return module['default']; } :
51/******/ function getModuleExports() { return module; };
52/******/ __webpack_require__.d(getter, 'a', getter);
53/******/ return getter;
54/******/ };
55/******/
56/******/ // Object.prototype.hasOwnProperty.call
57/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58/******/
59/******/ // __webpack_public_path__
60/******/ __webpack_require__.p = "";
61/******/
62/******/ // Load entry module and return exports
63/******/ return __webpack_require__(__webpack_require__.s = 0);
64/******/ })
65/************************************************************************/
66/******/ ([
67/* 0 */
68/***/ (function(module, exports, __webpack_require__) {
69
70// style-loader: Adds some css to the DOM by adding a <style> tag
71
72// load the styles
73var content = __webpack_require__(1);
74if(typeof content === 'string') content = [[module.i, content, '']];
75// Prepare cssTransformation
76var transform;
77
78var options = {}
79options.transform = transform
80// add the styles to the DOM
81var update = __webpack_require__(3)(content, options);
82if(content.locals) module.exports = content.locals;
83// Hot Module Replacement
84if(false) {
85 // When the styles change, update the <style> tags
86 if(!content.locals) {
87 module.hot.accept("!!../node_modules/css-loader/index.js!./style.css", function() {
88 var newContent = require("!!../node_modules/css-loader/index.js!./style.css");
89 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
90 update(newContent);
91 });
92 }
93 // When the module is disposed, remove the <style> tags
94 module.hot.dispose(function() { update(); });
95}
96
97/***/ }),
98/* 1 */
99/***/ (function(module, exports, __webpack_require__) {
100
101exports = module.exports = __webpack_require__(2)(undefined);
102// imports
103
104
105// module
106exports.push([module.i, "/* imported from Handler.css */\n\n.Handler__handler___1Y841 {\n position: absolute;\n top: 0px; left: -1px;\n width: 7px; height: 50px;\n\n background: #d7d7d7;\n border-radius: 4px;\n\n transition: background .2s linear;\n -webkit-transition: background .4s linear;\n -moz-transition: background .2s linear;\n -ms-transition: background .2s linear;\n -o-transition: background .2s linear;\n}\n\n.Handler__hover___2edsf, .Handler__dragging___3Cd15 {\n background: #909090;\n}\n/* imported from ScrollArea.css */\n\n.ScrollArea__outer___37v-o {\n overflow: hidden;\n position: relative;\n\n width: 100%;\n height: 100%;\n}\n\n.ScrollArea__overflow___3EGck {\n position: relative;\n overflow-y: scroll;\n overflow-x: hidden;\n\n height: 100%;\n\n margin-right: -30px;\n padding-right: 30px;\n}\n\n.ScrollArea__inner___34zZx {\n position: relative;\n}\n\n.ScrollArea__inner___34zZx:before,\n.ScrollArea__inner___34zZx:after {\n content: \" \";\n display: table;\n}\n\n .ScrollArea__inner___34zZx:after {\n clear: both;\n}\n/* imported from Track.css */\n\n.Track__track___UisIH {\n position: absolute;\n top: 0px; right: 2px;\n width: 7px;\n height: 100%;\n\n padding: 0;\n\n border-radius: 4px;\n\n opacity: 1;\n\n pointer-events: none;\n\n transition: opacity .4s linear;\n -webkit-transition: opacity .4s linear;\n -moz-transition: opacity .4s linear;\n -ms-transition: opacity .4s linear;\n -o-transition: opacity .4s linear;\n}\n\n.Track__hidden___ZW_yW {\n opacity: 0;\n}\n", ""]);
107
108// exports
109
110
111/***/ }),
112/* 2 */
113/***/ (function(module, exports) {
114
115/*
116 MIT License http://www.opensource.org/licenses/mit-license.php
117 Author Tobias Koppers @sokra
118*/
119// css base code, injected by the css-loader
120module.exports = function(useSourceMap) {
121 var list = [];
122
123 // return the list of modules as css string
124 list.toString = function toString() {
125 return this.map(function (item) {
126 var content = cssWithMappingToString(item, useSourceMap);
127 if(item[2]) {
128 return "@media " + item[2] + "{" + content + "}";
129 } else {
130 return content;
131 }
132 }).join("");
133 };
134
135 // import a list of modules into the list
136 list.i = function(modules, mediaQuery) {
137 if(typeof modules === "string")
138 modules = [[null, modules, ""]];
139 var alreadyImportedModules = {};
140 for(var i = 0; i < this.length; i++) {
141 var id = this[i][0];
142 if(typeof id === "number")
143 alreadyImportedModules[id] = true;
144 }
145 for(i = 0; i < modules.length; i++) {
146 var item = modules[i];
147 // skip already imported module
148 // this implementation is not 100% perfect for weird media query combinations
149 // when a module is imported multiple times with different media queries.
150 // I hope this will never occur (Hey this way we have smaller bundles)
151 if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
152 if(mediaQuery && !item[2]) {
153 item[2] = mediaQuery;
154 } else if(mediaQuery) {
155 item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
156 }
157 list.push(item);
158 }
159 }
160 };
161 return list;
162};
163
164function cssWithMappingToString(item, useSourceMap) {
165 var content = item[1] || '';
166 var cssMapping = item[3];
167 if (!cssMapping) {
168 return content;
169 }
170
171 if (useSourceMap && typeof btoa === 'function') {
172 var sourceMapping = toComment(cssMapping);
173 var sourceURLs = cssMapping.sources.map(function (source) {
174 return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
175 });
176
177 return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
178 }
179
180 return [content].join('\n');
181}
182
183// Adapted from convert-source-map (MIT)
184function toComment(sourceMap) {
185 // eslint-disable-next-line no-undef
186 var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
187 var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
188
189 return '/*# ' + data + ' */';
190}
191
192
193/***/ }),
194/* 3 */
195/***/ (function(module, exports, __webpack_require__) {
196
197/*
198 MIT License http://www.opensource.org/licenses/mit-license.php
199 Author Tobias Koppers @sokra
200*/
201
202var stylesInDom = {};
203
204var memoize = function (fn) {
205 var memo;
206
207 return function () {
208 if (typeof memo === "undefined") memo = fn.apply(this, arguments);
209 return memo;
210 };
211};
212
213var isOldIE = memoize(function () {
214 // Test for IE <= 9 as proposed by Browserhacks
215 // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
216 // Tests for existence of standard globals is to allow style-loader
217 // to operate correctly into non-standard environments
218 // @see https://github.com/webpack-contrib/style-loader/issues/177
219 return window && document && document.all && !window.atob;
220});
221
222var getElement = (function (fn) {
223 var memo = {};
224
225 return function(selector) {
226 if (typeof memo[selector] === "undefined") {
227 memo[selector] = fn.call(this, selector);
228 }
229
230 return memo[selector]
231 };
232})(function (target) {
233 return document.querySelector(target)
234});
235
236var singleton = null;
237var singletonCounter = 0;
238var stylesInsertedAtTop = [];
239
240var fixUrls = __webpack_require__(4);
241
242module.exports = function(list, options) {
243 if (typeof DEBUG !== "undefined" && DEBUG) {
244 if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
245 }
246
247 options = options || {};
248
249 options.attrs = typeof options.attrs === "object" ? options.attrs : {};
250
251 // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
252 // tags it will allow on a page
253 if (!options.singleton) options.singleton = isOldIE();
254
255 // By default, add <style> tags to the <head> element
256 if (!options.insertInto) options.insertInto = "head";
257
258 // By default, add <style> tags to the bottom of the target
259 if (!options.insertAt) options.insertAt = "bottom";
260
261 var styles = listToStyles(list, options);
262
263 addStylesToDom(styles, options);
264
265 return function update (newList) {
266 var mayRemove = [];
267
268 for (var i = 0; i < styles.length; i++) {
269 var item = styles[i];
270 var domStyle = stylesInDom[item.id];
271
272 domStyle.refs--;
273 mayRemove.push(domStyle);
274 }
275
276 if(newList) {
277 var newStyles = listToStyles(newList, options);
278 addStylesToDom(newStyles, options);
279 }
280
281 for (var i = 0; i < mayRemove.length; i++) {
282 var domStyle = mayRemove[i];
283
284 if(domStyle.refs === 0) {
285 for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
286
287 delete stylesInDom[domStyle.id];
288 }
289 }
290 };
291};
292
293function addStylesToDom (styles, options) {
294 for (var i = 0; i < styles.length; i++) {
295 var item = styles[i];
296 var domStyle = stylesInDom[item.id];
297
298 if(domStyle) {
299 domStyle.refs++;
300
301 for(var j = 0; j < domStyle.parts.length; j++) {
302 domStyle.parts[j](item.parts[j]);
303 }
304
305 for(; j < item.parts.length; j++) {
306 domStyle.parts.push(addStyle(item.parts[j], options));
307 }
308 } else {
309 var parts = [];
310
311 for(var j = 0; j < item.parts.length; j++) {
312 parts.push(addStyle(item.parts[j], options));
313 }
314
315 stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
316 }
317 }
318}
319
320function listToStyles (list, options) {
321 var styles = [];
322 var newStyles = {};
323
324 for (var i = 0; i < list.length; i++) {
325 var item = list[i];
326 var id = options.base ? item[0] + options.base : item[0];
327 var css = item[1];
328 var media = item[2];
329 var sourceMap = item[3];
330 var part = {css: css, media: media, sourceMap: sourceMap};
331
332 if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
333 else newStyles[id].parts.push(part);
334 }
335
336 return styles;
337}
338
339function insertStyleElement (options, style) {
340 var target = getElement(options.insertInto)
341
342 if (!target) {
343 throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
344 }
345
346 var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
347
348 if (options.insertAt === "top") {
349 if (!lastStyleElementInsertedAtTop) {
350 target.insertBefore(style, target.firstChild);
351 } else if (lastStyleElementInsertedAtTop.nextSibling) {
352 target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
353 } else {
354 target.appendChild(style);
355 }
356 stylesInsertedAtTop.push(style);
357 } else if (options.insertAt === "bottom") {
358 target.appendChild(style);
359 } else {
360 throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
361 }
362}
363
364function removeStyleElement (style) {
365 if (style.parentNode === null) return false;
366 style.parentNode.removeChild(style);
367
368 var idx = stylesInsertedAtTop.indexOf(style);
369 if(idx >= 0) {
370 stylesInsertedAtTop.splice(idx, 1);
371 }
372}
373
374function createStyleElement (options) {
375 var style = document.createElement("style");
376
377 options.attrs.type = "text/css";
378
379 addAttrs(style, options.attrs);
380 insertStyleElement(options, style);
381
382 return style;
383}
384
385function createLinkElement (options) {
386 var link = document.createElement("link");
387
388 options.attrs.type = "text/css";
389 options.attrs.rel = "stylesheet";
390
391 addAttrs(link, options.attrs);
392 insertStyleElement(options, link);
393
394 return link;
395}
396
397function addAttrs (el, attrs) {
398 Object.keys(attrs).forEach(function (key) {
399 el.setAttribute(key, attrs[key]);
400 });
401}
402
403function addStyle (obj, options) {
404 var style, update, remove, result;
405
406 // If a transform function was defined, run it on the css
407 if (options.transform && obj.css) {
408 result = options.transform(obj.css);
409
410 if (result) {
411 // If transform returns a value, use that instead of the original css.
412 // This allows running runtime transformations on the css.
413 obj.css = result;
414 } else {
415 // If the transform function returns a falsy value, don't add this css.
416 // This allows conditional loading of css
417 return function() {
418 // noop
419 };
420 }
421 }
422
423 if (options.singleton) {
424 var styleIndex = singletonCounter++;
425
426 style = singleton || (singleton = createStyleElement(options));
427
428 update = applyToSingletonTag.bind(null, style, styleIndex, false);
429 remove = applyToSingletonTag.bind(null, style, styleIndex, true);
430
431 } else if (
432 obj.sourceMap &&
433 typeof URL === "function" &&
434 typeof URL.createObjectURL === "function" &&
435 typeof URL.revokeObjectURL === "function" &&
436 typeof Blob === "function" &&
437 typeof btoa === "function"
438 ) {
439 style = createLinkElement(options);
440 update = updateLink.bind(null, style, options);
441 remove = function () {
442 removeStyleElement(style);
443
444 if(style.href) URL.revokeObjectURL(style.href);
445 };
446 } else {
447 style = createStyleElement(options);
448 update = applyToTag.bind(null, style);
449 remove = function () {
450 removeStyleElement(style);
451 };
452 }
453
454 update(obj);
455
456 return function updateStyle (newObj) {
457 if (newObj) {
458 if (
459 newObj.css === obj.css &&
460 newObj.media === obj.media &&
461 newObj.sourceMap === obj.sourceMap
462 ) {
463 return;
464 }
465
466 update(obj = newObj);
467 } else {
468 remove();
469 }
470 };
471}
472
473var replaceText = (function () {
474 var textStore = [];
475
476 return function (index, replacement) {
477 textStore[index] = replacement;
478
479 return textStore.filter(Boolean).join('\n');
480 };
481})();
482
483function applyToSingletonTag (style, index, remove, obj) {
484 var css = remove ? "" : obj.css;
485
486 if (style.styleSheet) {
487 style.styleSheet.cssText = replaceText(index, css);
488 } else {
489 var cssNode = document.createTextNode(css);
490 var childNodes = style.childNodes;
491
492 if (childNodes[index]) style.removeChild(childNodes[index]);
493
494 if (childNodes.length) {
495 style.insertBefore(cssNode, childNodes[index]);
496 } else {
497 style.appendChild(cssNode);
498 }
499 }
500}
501
502function applyToTag (style, obj) {
503 var css = obj.css;
504 var media = obj.media;
505
506 if(media) {
507 style.setAttribute("media", media)
508 }
509
510 if(style.styleSheet) {
511 style.styleSheet.cssText = css;
512 } else {
513 while(style.firstChild) {
514 style.removeChild(style.firstChild);
515 }
516
517 style.appendChild(document.createTextNode(css));
518 }
519}
520
521function updateLink (link, options, obj) {
522 var css = obj.css;
523 var sourceMap = obj.sourceMap;
524
525 /*
526 If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
527 and there is no publicPath defined then lets turn convertToAbsoluteUrls
528 on by default. Otherwise default to the convertToAbsoluteUrls option
529 directly
530 */
531 var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
532
533 if (options.convertToAbsoluteUrls || autoFixUrls) {
534 css = fixUrls(css);
535 }
536
537 if (sourceMap) {
538 // http://stackoverflow.com/a/26603875
539 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
540 }
541
542 var blob = new Blob([css], { type: "text/css" });
543
544 var oldSrc = link.href;
545
546 link.href = URL.createObjectURL(blob);
547
548 if(oldSrc) URL.revokeObjectURL(oldSrc);
549}
550
551
552/***/ }),
553/* 4 */
554/***/ (function(module, exports) {
555
556
557/**
558 * When source maps are enabled, `style-loader` uses a link element with a data-uri to
559 * embed the css on the page. This breaks all relative urls because now they are relative to a
560 * bundle instead of the current page.
561 *
562 * One solution is to only use full urls, but that may be impossible.
563 *
564 * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
565 *
566 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
567 *
568 */
569
570module.exports = function (css) {
571 // get current location
572 var location = typeof window !== "undefined" && window.location;
573
574 if (!location) {
575 throw new Error("fixUrls requires window.location");
576 }
577
578 // blank or null?
579 if (!css || typeof css !== "string") {
580 return css;
581 }
582
583 var baseUrl = location.protocol + "//" + location.host;
584 var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
585
586 // convert each url(...)
587 /*
588 This regular expression is just a way to recursively match brackets within
589 a string.
590
591 /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
592 ( = Start a capturing group
593 (?: = Start a non-capturing group
594 [^)(] = Match anything that isn't a parentheses
595 | = OR
596 \( = Match a start parentheses
597 (?: = Start another non-capturing groups
598 [^)(]+ = Match anything that isn't a parentheses
599 | = OR
600 \( = Match a start parentheses
601 [^)(]* = Match anything that isn't a parentheses
602 \) = Match a end parentheses
603 ) = End Group
604 *\) = Match anything and then a close parens
605 ) = Close non-capturing group
606 * = Match anything
607 ) = Close capturing group
608 \) = Match a close parens
609
610 /gi = Get all matches, not the first. Be case insensitive.
611 */
612 var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
613 // strip quotes (if they exist)
614 var unquotedOrigUrl = origUrl
615 .trim()
616 .replace(/^"(.*)"$/, function(o, $1){ return $1; })
617 .replace(/^'(.*)'$/, function(o, $1){ return $1; });
618
619 // already a full url? no change
620 if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
621 return fullMatch;
622 }
623
624 // convert the url to a full url
625 var newUrl;
626
627 if (unquotedOrigUrl.indexOf("//") === 0) {
628 //TODO: should we add protocol?
629 newUrl = unquotedOrigUrl;
630 } else if (unquotedOrigUrl.indexOf("/") === 0) {
631 // path should be relative to the base url
632 newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
633 } else {
634 // path should be relative to current directory
635 newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
636 }
637
638 // send back the fixed url(...)
639 return "url(" + JSON.stringify(newUrl) + ")";
640 });
641
642 // send back the fixed css
643 return fixedCss;
644};
645
646
647/***/ })
648/******/ ]);
\No newline at end of file