UNPKG

13.9 kBJavaScriptView Raw
1module.exports =
2/******/ (function(modules) { // webpackBootstrap
3/******/ // The module cache
4/******/ var installedModules = {};
5
6/******/ // The require function
7/******/ function __webpack_require__(moduleId) {
8
9/******/ // Check if module is in cache
10/******/ if(installedModules[moduleId])
11/******/ return installedModules[moduleId].exports;
12
13/******/ // Create a new module (and put it into the cache)
14/******/ var module = installedModules[moduleId] = {
15/******/ exports: {},
16/******/ id: moduleId,
17/******/ loaded: false
18/******/ };
19
20/******/ // Execute the module function
21/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
23/******/ // Flag the module as loaded
24/******/ module.loaded = true;
25
26/******/ // Return the exports of the module
27/******/ return module.exports;
28/******/ }
29
30
31/******/ // expose the modules object (__webpack_modules__)
32/******/ __webpack_require__.m = modules;
33
34/******/ // expose the module cache
35/******/ __webpack_require__.c = installedModules;
36
37/******/ // __webpack_public_path__
38/******/ __webpack_require__.p = "/";
39
40/******/ // Load entry module and return exports
41/******/ return __webpack_require__(0);
42/******/ })
43/************************************************************************/
44/******/ ([
45/* 0 */
46/***/ function(module, exports, __webpack_require__) {
47
48 "use strict";
49
50 var React = __webpack_require__(1);
51 var cx = __webpack_require__(2);
52
53 module.exports = React.createClass({
54 displayName: "exports",
55
56 prevent: false,
57 propTypes: {
58 show: React.PropTypes.bool.isRequired,
59 onClose: React.PropTypes.func.isRequired
60 },
61 componentWillMount: function componentWillMount() {
62 __webpack_require__(3);
63 },
64 close: function close() {
65 if (this.prevent) {
66 this.prevent = false;
67 return;
68 }
69 this.props.onClose();
70 },
71 stopClose: function stopClose(event) {
72 this.prevent = true;
73 },
74 render: function render() {
75 return React.createElement(
76 "div",
77 { className: cx("component-modal", { visible: this.props.show }), onClick: this.close },
78 React.createElement(
79 "div",
80 { className: "modal", onClick: this.stopClose },
81 React.createElement(
82 "div",
83 { className: "close pointer", onClick: this.close },
84 "×"
85 ),
86 this.props.children
87 )
88 );
89 }
90 });
91
92/***/ },
93/* 1 */
94/***/ function(module, exports) {
95
96 module.exports = require("react");
97
98/***/ },
99/* 2 */
100/***/ function(module, exports) {
101
102 module.exports = require("classnames");
103
104/***/ },
105/* 3 */
106/***/ function(module, exports, __webpack_require__) {
107
108 // style-loader: Adds some css to the DOM by adding a <style> tag
109
110 // load the styles
111 var content = __webpack_require__(4);
112 if(typeof content === 'string') content = [[module.id, content, '']];
113 // add the styles to the DOM
114 var update = __webpack_require__(6)(content, {});
115 if(content.locals) module.exports = content.locals;
116 // Hot Module Replacement
117 if(false) {
118 // When the styles change, update the <style> tags
119 if(!content.locals) {
120 module.hot.accept("!!./../../node_modules/css-loader/index.js!./../../node_modules/sass-loader/index.js!./style.scss", function() {
121 var newContent = require("!!./../../node_modules/css-loader/index.js!./../../node_modules/sass-loader/index.js!./style.scss");
122 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
123 update(newContent);
124 });
125 }
126 // When the module is disposed, remove the <style> tags
127 module.hot.dispose(function() { update(); });
128 }
129
130/***/ },
131/* 4 */
132/***/ function(module, exports, __webpack_require__) {
133
134 exports = module.exports = __webpack_require__(5)();
135 // imports
136
137
138 // module
139 exports.push([module.id, ".component-modal {\n position: fixed;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n color: #14083f;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s;\n z-index: 6000; }\n .component-modal.visible {\n opacity: 1;\n pointer-events: initial; }\n .component-modal .close {\n cursor: pointer;\n position: absolute;\n right: 10px;\n top: 10px; }\n .component-modal .component-button {\n margin: 10px; }\n .component-modal .modal {\n position: relative;\n padding: 30px 20px;\n text-align: center;\n width: 512px;\n background-color: white;\n box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.25); }\n", ""]);
140
141 // exports
142
143
144/***/ },
145/* 5 */
146/***/ function(module, exports) {
147
148 /*
149 MIT License http://www.opensource.org/licenses/mit-license.php
150 Author Tobias Koppers @sokra
151 */
152 // css base code, injected by the css-loader
153 module.exports = function() {
154 var list = [];
155
156 // return the list of modules as css string
157 list.toString = function toString() {
158 var result = [];
159 for(var i = 0; i < this.length; i++) {
160 var item = this[i];
161 if(item[2]) {
162 result.push("@media " + item[2] + "{" + item[1] + "}");
163 } else {
164 result.push(item[1]);
165 }
166 }
167 return result.join("");
168 };
169
170 // import a list of modules into the list
171 list.i = function(modules, mediaQuery) {
172 if(typeof modules === "string")
173 modules = [[null, modules, ""]];
174 var alreadyImportedModules = {};
175 for(var i = 0; i < this.length; i++) {
176 var id = this[i][0];
177 if(typeof id === "number")
178 alreadyImportedModules[id] = true;
179 }
180 for(i = 0; i < modules.length; i++) {
181 var item = modules[i];
182 // skip already imported module
183 // this implementation is not 100% perfect for weird media query combinations
184 // when a module is imported multiple times with different media queries.
185 // I hope this will never occur (Hey this way we have smaller bundles)
186 if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
187 if(mediaQuery && !item[2]) {
188 item[2] = mediaQuery;
189 } else if(mediaQuery) {
190 item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
191 }
192 list.push(item);
193 }
194 }
195 };
196 return list;
197 };
198
199
200/***/ },
201/* 6 */
202/***/ function(module, exports, __webpack_require__) {
203
204 /*
205 MIT License http://www.opensource.org/licenses/mit-license.php
206 Author Tobias Koppers @sokra
207 */
208 var stylesInDom = {},
209 memoize = function(fn) {
210 var memo;
211 return function () {
212 if (typeof memo === "undefined") memo = fn.apply(this, arguments);
213 return memo;
214 };
215 },
216 isOldIE = memoize(function() {
217 return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
218 }),
219 getHeadElement = memoize(function () {
220 return document.head || document.getElementsByTagName("head")[0];
221 }),
222 singletonElement = null,
223 singletonCounter = 0,
224 styleElementsInsertedAtTop = [];
225
226 module.exports = function(list, options) {
227 if(false) {
228 if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
229 }
230
231 options = options || {};
232 // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
233 // tags it will allow on a page
234 if (typeof options.singleton === "undefined") options.singleton = isOldIE();
235
236 // By default, add <style> tags to the bottom of <head>.
237 if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
238
239 var styles = listToStyles(list);
240 addStylesToDom(styles, options);
241
242 return function update(newList) {
243 var mayRemove = [];
244 for(var i = 0; i < styles.length; i++) {
245 var item = styles[i];
246 var domStyle = stylesInDom[item.id];
247 domStyle.refs--;
248 mayRemove.push(domStyle);
249 }
250 if(newList) {
251 var newStyles = listToStyles(newList);
252 addStylesToDom(newStyles, options);
253 }
254 for(var i = 0; i < mayRemove.length; i++) {
255 var domStyle = mayRemove[i];
256 if(domStyle.refs === 0) {
257 for(var j = 0; j < domStyle.parts.length; j++)
258 domStyle.parts[j]();
259 delete stylesInDom[domStyle.id];
260 }
261 }
262 };
263 }
264
265 function addStylesToDom(styles, options) {
266 for(var i = 0; i < styles.length; i++) {
267 var item = styles[i];
268 var domStyle = stylesInDom[item.id];
269 if(domStyle) {
270 domStyle.refs++;
271 for(var j = 0; j < domStyle.parts.length; j++) {
272 domStyle.parts[j](item.parts[j]);
273 }
274 for(; j < item.parts.length; j++) {
275 domStyle.parts.push(addStyle(item.parts[j], options));
276 }
277 } else {
278 var parts = [];
279 for(var j = 0; j < item.parts.length; j++) {
280 parts.push(addStyle(item.parts[j], options));
281 }
282 stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
283 }
284 }
285 }
286
287 function listToStyles(list) {
288 var styles = [];
289 var newStyles = {};
290 for(var i = 0; i < list.length; i++) {
291 var item = list[i];
292 var id = item[0];
293 var css = item[1];
294 var media = item[2];
295 var sourceMap = item[3];
296 var part = {css: css, media: media, sourceMap: sourceMap};
297 if(!newStyles[id])
298 styles.push(newStyles[id] = {id: id, parts: [part]});
299 else
300 newStyles[id].parts.push(part);
301 }
302 return styles;
303 }
304
305 function insertStyleElement(options, styleElement) {
306 var head = getHeadElement();
307 var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
308 if (options.insertAt === "top") {
309 if(!lastStyleElementInsertedAtTop) {
310 head.insertBefore(styleElement, head.firstChild);
311 } else if(lastStyleElementInsertedAtTop.nextSibling) {
312 head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
313 } else {
314 head.appendChild(styleElement);
315 }
316 styleElementsInsertedAtTop.push(styleElement);
317 } else if (options.insertAt === "bottom") {
318 head.appendChild(styleElement);
319 } else {
320 throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
321 }
322 }
323
324 function removeStyleElement(styleElement) {
325 styleElement.parentNode.removeChild(styleElement);
326 var idx = styleElementsInsertedAtTop.indexOf(styleElement);
327 if(idx >= 0) {
328 styleElementsInsertedAtTop.splice(idx, 1);
329 }
330 }
331
332 function createStyleElement(options) {
333 var styleElement = document.createElement("style");
334 styleElement.type = "text/css";
335 insertStyleElement(options, styleElement);
336 return styleElement;
337 }
338
339 function createLinkElement(options) {
340 var linkElement = document.createElement("link");
341 linkElement.rel = "stylesheet";
342 insertStyleElement(options, linkElement);
343 return linkElement;
344 }
345
346 function addStyle(obj, options) {
347 var styleElement, update, remove;
348
349 if (options.singleton) {
350 var styleIndex = singletonCounter++;
351 styleElement = singletonElement || (singletonElement = createStyleElement(options));
352 update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
353 remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
354 } else if(obj.sourceMap &&
355 typeof URL === "function" &&
356 typeof URL.createObjectURL === "function" &&
357 typeof URL.revokeObjectURL === "function" &&
358 typeof Blob === "function" &&
359 typeof btoa === "function") {
360 styleElement = createLinkElement(options);
361 update = updateLink.bind(null, styleElement);
362 remove = function() {
363 removeStyleElement(styleElement);
364 if(styleElement.href)
365 URL.revokeObjectURL(styleElement.href);
366 };
367 } else {
368 styleElement = createStyleElement(options);
369 update = applyToTag.bind(null, styleElement);
370 remove = function() {
371 removeStyleElement(styleElement);
372 };
373 }
374
375 update(obj);
376
377 return function updateStyle(newObj) {
378 if(newObj) {
379 if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
380 return;
381 update(obj = newObj);
382 } else {
383 remove();
384 }
385 };
386 }
387
388 var replaceText = (function () {
389 var textStore = [];
390
391 return function (index, replacement) {
392 textStore[index] = replacement;
393 return textStore.filter(Boolean).join('\n');
394 };
395 })();
396
397 function applyToSingletonTag(styleElement, index, remove, obj) {
398 var css = remove ? "" : obj.css;
399
400 if (styleElement.styleSheet) {
401 styleElement.styleSheet.cssText = replaceText(index, css);
402 } else {
403 var cssNode = document.createTextNode(css);
404 var childNodes = styleElement.childNodes;
405 if (childNodes[index]) styleElement.removeChild(childNodes[index]);
406 if (childNodes.length) {
407 styleElement.insertBefore(cssNode, childNodes[index]);
408 } else {
409 styleElement.appendChild(cssNode);
410 }
411 }
412 }
413
414 function applyToTag(styleElement, obj) {
415 var css = obj.css;
416 var media = obj.media;
417
418 if(media) {
419 styleElement.setAttribute("media", media)
420 }
421
422 if(styleElement.styleSheet) {
423 styleElement.styleSheet.cssText = css;
424 } else {
425 while(styleElement.firstChild) {
426 styleElement.removeChild(styleElement.firstChild);
427 }
428 styleElement.appendChild(document.createTextNode(css));
429 }
430 }
431
432 function updateLink(linkElement, obj) {
433 var css = obj.css;
434 var sourceMap = obj.sourceMap;
435
436 if(sourceMap) {
437 // http://stackoverflow.com/a/26603875
438 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
439 }
440
441 var blob = new Blob([css], { type: "text/css" });
442
443 var oldSrc = linkElement.href;
444
445 linkElement.href = URL.createObjectURL(blob);
446
447 if(oldSrc)
448 URL.revokeObjectURL(oldSrc);
449 }
450
451
452/***/ }
453/******/ ]);
\No newline at end of file