diff --git a/.ahoy/docker.ahoy.yml b/.ahoy/docker.ahoy.yml
index b599cc3..a5bedb3 100644
--- a/.ahoy/docker.ahoy.yml
+++ b/.ahoy/docker.ahoy.yml
@@ -158,6 +158,11 @@ commands:
fi
echo "Lighthouse has been started. It's running on port 8080"
+ backstop:
+ usage: Run backstop.
+ cmd: |
+ docker run --rm -v $(pwd):/src backstopjs/backstopjs $1
+
hostfile:
usage: Write entries in host file.
cmd: |
diff --git a/backstop.json b/backstop.json
new file mode 100644
index 0000000..26d89bb
--- /dev/null
+++ b/backstop.json
@@ -0,0 +1,59 @@
+{
+ "id": "backstop_default",
+ "viewports": [
+ {
+ "label": "phone",
+ "width": 320,
+ "height": 480
+ },
+ {
+ "label": "tablet",
+ "width": 1024,
+ "height": 768
+ },
+ {
+ "label": "laptop",
+ "width": 1920,
+ "height": 1080
+ }
+ ],
+ "onBeforeScript": "puppet/onBefore.js",
+ "onReadyScript": "puppet/onReady.js",
+ "scenarios": [
+ {
+ "label": "Google Homepage",
+ "cookiePath": "backstop_data/engine_scripts/cookies.json",
+ "url": "https://garris.github.io/BackstopJS/",
+ "referenceUrl": "https://garris.github.io/BackstopJS/",
+ "readyEvent": "",
+ "readySelector": "",
+ "delay": 0,
+ "hideSelectors": [],
+ "removeSelectors": [],
+ "hoverSelector": "",
+ "clickSelector": "",
+ "postInteractionWait": 0,
+ "selectors": [],
+ "selectorExpansion": true,
+ "expect": 0,
+ "misMatchThreshold" : 0.1,
+ "requireSameDimensions": true
+ }
+ ],
+ "paths": {
+ "bitmaps_reference": "backstop_data/bitmaps_reference",
+ "bitmaps_test": "backstop_data/bitmaps_test",
+ "engine_scripts": "backstop_data/engine_scripts",
+ "html_report": "backstop_data/html_report",
+ "ci_report": "backstop_data/ci_report"
+ },
+ "report": ["browser"],
+ "engine": "puppeteer",
+ "engineOptions": {
+ "args": ["--no-sandbox"]
+ },
+ "asyncCaptureLimit": 5,
+ "asyncCompareLimit": 50,
+ "debug": false,
+ "debugWindow": false
+}
diff --git a/backstop_data/bitmaps_reference/.gitkeep b/backstop_data/bitmaps_reference/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/backstop_data/bitmaps_test/.gitkeep b/backstop_data/bitmaps_test/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/backstop_data/engine_scripts/casper/clickAndHoverHelper.js b/backstop_data/engine_scripts/casper/clickAndHoverHelper.js
new file mode 100644
index 0000000..27406ec
--- /dev/null
+++ b/backstop_data/engine_scripts/casper/clickAndHoverHelper.js
@@ -0,0 +1,25 @@
+var WAIT_TIMEOUT = 5000;
+
+module.exports = function (casper, scenario) {
+ var waitFor = require('./waitForHelperHelper')(casper, WAIT_TIMEOUT);
+ var hoverSelector = scenario.hoverSelector;
+ var clickSelector = scenario.clickSelector;
+ var postInteractionWait = scenario.postInteractionWait;
+
+ if (hoverSelector) {
+ waitFor(hoverSelector);
+ casper.then(function () {
+ casper.mouse.move(hoverSelector);
+ });
+ }
+
+ if (clickSelector) {
+ waitFor(clickSelector);
+ casper.then(function () {
+ casper.click(clickSelector);
+ });
+ }
+
+ // TODO: if postInteractionWait === integer then do ==> wait(postInteractionWait) || elsevvv
+ waitFor(postInteractionWait);
+};
diff --git a/backstop_data/engine_scripts/casper/loadCookies.js b/backstop_data/engine_scripts/casper/loadCookies.js
new file mode 100644
index 0000000..3c1ad0e
--- /dev/null
+++ b/backstop_data/engine_scripts/casper/loadCookies.js
@@ -0,0 +1,15 @@
+var fs = require('fs');
+
+module.exports = function (casper, scenario) {
+ var cookies = [];
+ var cookiePath = scenario.cookiePath;
+
+ // READ COOKIES FROM FILE IF EXISTS
+ if (fs.exists(cookiePath)) {
+ cookies = JSON.parse(fs.read(cookiePath));
+ }
+
+ casper.page.cookies = cookies;
+ console.log('Cookie state restored with cookies:', JSON.stringify(cookies, null, 2));
+ casper.userAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36');
+};
diff --git a/backstop_data/engine_scripts/casper/onBefore.js b/backstop_data/engine_scripts/casper/onBefore.js
new file mode 100644
index 0000000..785c4ec
--- /dev/null
+++ b/backstop_data/engine_scripts/casper/onBefore.js
@@ -0,0 +1,4 @@
+module.exports = function (casper, scenario, vp) {
+ require('./loadCookies')(casper, scenario);
+ casper.userAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36');
+};
diff --git a/backstop_data/engine_scripts/casper/onReady.js b/backstop_data/engine_scripts/casper/onReady.js
new file mode 100644
index 0000000..959a443
--- /dev/null
+++ b/backstop_data/engine_scripts/casper/onReady.js
@@ -0,0 +1,5 @@
+module.exports = function (casper, scenario, vp) {
+ console.log('SCENARIO> ' + scenario.label);
+ require('./clickAndHoverHelper')(casper, scenario);
+ // add more helpers here...
+};
diff --git a/backstop_data/engine_scripts/casper/waitForHelperHelper.js b/backstop_data/engine_scripts/casper/waitForHelperHelper.js
new file mode 100644
index 0000000..682eb3b
--- /dev/null
+++ b/backstop_data/engine_scripts/casper/waitForHelperHelper.js
@@ -0,0 +1,18 @@
+var TIMEOUT_DEFAULT = 2000;
+
+module.exports = function (casper, timeout) {
+ var TIMEOUT = timeout || TIMEOUT_DEFAULT;
+
+ return function waitFor (selector) {
+ if (selector) {
+ casper.waitForSelector(
+ selector,
+ function () {},
+ function () {
+ console.error('NOT FOUND > ' + selector);
+ },
+ TIMEOUT
+ );
+ }
+ };
+};
diff --git a/backstop_data/engine_scripts/chromy/clickAndHoverHelper.js b/backstop_data/engine_scripts/chromy/clickAndHoverHelper.js
new file mode 100644
index 0000000..7966103
--- /dev/null
+++ b/backstop_data/engine_scripts/chromy/clickAndHoverHelper.js
@@ -0,0 +1,34 @@
+module.exports = function (chromy, scenario) {
+ var hoverSelector = scenario.hoverSelectors || scenario.hoverSelector;
+ var clickSelector = scenario.clickSelectors || scenario.clickSelector;
+ var scrollToSelector = scenario.scrollToSelectors || scenario.scrollToSelector;
+ var postInteractionWait = scenario.postInteractionWait; // selector [str] | ms [int]
+
+ if (hoverSelector) {
+ chromy
+ .wait(hoverSelector)
+ .rect(hoverSelector)
+ .result(function (rect) {
+ chromy.mouseMoved(rect.left, rect.top);
+ });
+ }
+
+ if (clickSelector) {
+ chromy
+ .wait(clickSelector)
+ .click(clickSelector);
+ }
+
+ if (postInteractionWait) {
+ chromy.wait(postInteractionWait);
+ }
+
+ if (scrollToSelector) {
+ chromy
+ .wait(scrollToSelector)
+ .evaluate(`window._scrollToSelector = '${scrollToSelector}'`)
+ .evaluate(function () {
+ document.querySelector(window._scrollToSelector).scrollIntoView();
+ });
+ }
+};
diff --git a/backstop_data/engine_scripts/chromy/loadCookies.js b/backstop_data/engine_scripts/chromy/loadCookies.js
new file mode 100644
index 0000000..7d5a165
--- /dev/null
+++ b/backstop_data/engine_scripts/chromy/loadCookies.js
@@ -0,0 +1,22 @@
+var fs = require('fs');
+
+module.exports = function (chromy, scenario) {
+ var cookies = [];
+ var cookiePath = scenario.cookiePath;
+
+ // READ COOKIES FROM FILE IF EXISTS
+ if (fs.existsSync(cookiePath)) {
+ cookies = JSON.parse(fs.readFileSync(cookiePath));
+ }
+
+ // MUNGE COOKIE DOMAIN FOR CHROMY USAGE
+ cookies = cookies.map(cookie => {
+ cookie.url = 'https://' + cookie.domain;
+ delete cookie.domain;
+ return cookie;
+ });
+
+ // SET COOKIES VIA CHROMY
+ chromy.setCookie(cookies);
+ console.log('Cookie state restored with:', JSON.stringify(cookies, null, 2));
+};
diff --git a/backstop_data/engine_scripts/chromy/onBefore.js b/backstop_data/engine_scripts/chromy/onBefore.js
new file mode 100644
index 0000000..e174ef8
--- /dev/null
+++ b/backstop_data/engine_scripts/chromy/onBefore.js
@@ -0,0 +1,6 @@
+module.exports = function (chromy, scenario, vp) {
+ require('./loadCookies')(chromy, scenario);
+
+ // IGNORE ANY CERT WARNINGS
+ chromy.ignoreCertificateErrors();
+};
diff --git a/backstop_data/engine_scripts/chromy/onReady.js b/backstop_data/engine_scripts/chromy/onReady.js
new file mode 100644
index 0000000..6238af8
--- /dev/null
+++ b/backstop_data/engine_scripts/chromy/onReady.js
@@ -0,0 +1,5 @@
+module.exports = function (chromy, scenario, vp) {
+ console.log('SCENARIO > ' + scenario.label);
+ require('./clickAndHoverHelper')(chromy, scenario);
+ // add more ready handlers here...
+};
diff --git a/backstop_data/engine_scripts/cookies.json b/backstop_data/engine_scripts/cookies.json
new file mode 100644
index 0000000..b59400d
--- /dev/null
+++ b/backstop_data/engine_scripts/cookies.json
@@ -0,0 +1,14 @@
+[
+ {
+ "domain": ".www.yourdomain.com",
+ "path": "/",
+ "name": "yourCookieName",
+ "value": "yourCookieValue",
+ "expirationDate": 1798790400,
+ "hostOnly": false,
+ "httpOnly": false,
+ "secure": false,
+ "session": false,
+ "sameSite": "no_restriction"
+ }
+]
diff --git a/backstop_data/engine_scripts/imageStub.jpg b/backstop_data/engine_scripts/imageStub.jpg
new file mode 100644
index 0000000..3e526b4
Binary files /dev/null and b/backstop_data/engine_scripts/imageStub.jpg differ
diff --git a/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js b/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js
new file mode 100644
index 0000000..81e0c9b
--- /dev/null
+++ b/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js
@@ -0,0 +1,31 @@
+module.exports = async (page, scenario) => {
+ var hoverSelector = scenario.hoverSelectors || scenario.hoverSelector;
+ var clickSelector = scenario.clickSelectors || scenario.clickSelector;
+ var scrollToSelector = scenario.scrollToSelector;
+ var postInteractionWait = scenario.postInteractionWait; // selector [str] | ms [int]
+
+ if (hoverSelector) {
+ for (const hoverSelectorIndex of [].concat(hoverSelector)) {
+ await page.waitFor(hoverSelectorIndex);
+ await page.hover(hoverSelectorIndex);
+ }
+ }
+
+ if (clickSelector) {
+ for (const clickSelectorIndex of [].concat(clickSelector)) {
+ await page.waitFor(clickSelectorIndex);
+ await page.click(clickSelectorIndex);
+ }
+ }
+
+ if (postInteractionWait) {
+ await page.waitFor(postInteractionWait);
+ }
+
+ if (scrollToSelector) {
+ await page.waitFor(scrollToSelector);
+ await page.evaluate(scrollToSelector => {
+ document.querySelector(scrollToSelector).scrollIntoView();
+ }, scrollToSelector);
+ }
+};
diff --git a/backstop_data/engine_scripts/puppet/ignoreCSP.js b/backstop_data/engine_scripts/puppet/ignoreCSP.js
new file mode 100644
index 0000000..5e4f141
--- /dev/null
+++ b/backstop_data/engine_scripts/puppet/ignoreCSP.js
@@ -0,0 +1,65 @@
+/**
+ * IGNORE CSP HEADERS
+ * Listen to all requests. If a request matches scenario.url
+ * then fetch the request again manually, strip out CSP headers
+ * and respond to the original request without CSP headers.
+ * Allows `ignoreHTTPSErrors: true` BUT... requires `debugWindow: true`
+ *
+ * see https://github.com/GoogleChrome/puppeteer/issues/1229#issuecomment-380133332
+ * this is the workaround until Page.setBypassCSP lands... https://github.com/GoogleChrome/puppeteer/pull/2324
+ *
+ * @param {REQUEST} request
+ * @return {VOID}
+ *
+ * Use this in an onBefore script E.G.
+ ```
+ module.exports = async function(page, scenario) {
+ require('./removeCSP')(page, scenario);
+ }
+ ```
+ *
+ */
+
+const fetch = require('node-fetch');
+const https = require('https');
+const agent = new https.Agent({
+ rejectUnauthorized: false
+});
+
+module.exports = async function (page, scenario) {
+ const intercept = async (request, targetUrl) => {
+ const requestUrl = request.url();
+
+ // FIND TARGET URL REQUEST
+ if (requestUrl === targetUrl) {
+ const cookiesList = await page.cookies(requestUrl);
+ const cookies = cookiesList.map(cookie => `${cookie.name}=${cookie.value}`).join('; ');
+ const headers = Object.assign(request.headers(), {cookie: cookies});
+ const options = {
+ headers: headers,
+ body: request.postData(),
+ method: request.method(),
+ follow: 20,
+ agent
+ };
+
+ const result = await fetch(requestUrl, options);
+
+ const buffer = await result.buffer();
+ let cleanedHeaders = result.headers._headers || {};
+ cleanedHeaders['content-security-policy'] = '';
+ await request.respond({
+ body: buffer,
+ headers: cleanedHeaders,
+ status: result.status
+ });
+ } else {
+ request.continue();
+ }
+ };
+
+ await page.setRequestInterception(true);
+ page.on('request', req => {
+ intercept(req, scenario.url);
+ });
+};
diff --git a/backstop_data/engine_scripts/puppet/interceptImages.js b/backstop_data/engine_scripts/puppet/interceptImages.js
new file mode 100644
index 0000000..c6c5ed3
--- /dev/null
+++ b/backstop_data/engine_scripts/puppet/interceptImages.js
@@ -0,0 +1,37 @@
+/**
+ * INTERCEPT IMAGES
+ * Listen to all requests. If a request matches IMAGE_URL_RE
+ * then stub the image with data from IMAGE_STUB_URL
+ *
+ * Use this in an onBefore script E.G.
+ ```
+ module.exports = async function(page, scenario) {
+ require('./interceptImages')(page, scenario);
+ }
+ ```
+ *
+ */
+
+const fs = require('fs');
+const path = require('path');
+
+const IMAGE_URL_RE = /\.gif|\.jpg|\.png/i;
+const IMAGE_STUB_URL = path.resolve(__dirname, '../../imageStub.jpg');
+const IMAGE_DATA_BUFFER = fs.readFileSync(IMAGE_STUB_URL);
+const HEADERS_STUB = {};
+
+module.exports = async function (page, scenario) {
+ const intercept = async (request, targetUrl) => {
+ if (IMAGE_URL_RE.test(request.url())) {
+ await request.respond({
+ body: IMAGE_DATA_BUFFER,
+ headers: HEADERS_STUB,
+ status: 200
+ });
+ } else {
+ request.continue();
+ }
+ };
+ await page.setRequestInterception(true);
+ page.on('request', intercept);
+};
diff --git a/backstop_data/engine_scripts/puppet/loadCookies.js b/backstop_data/engine_scripts/puppet/loadCookies.js
new file mode 100644
index 0000000..db848a7
--- /dev/null
+++ b/backstop_data/engine_scripts/puppet/loadCookies.js
@@ -0,0 +1,29 @@
+var fs = require('fs');
+
+module.exports = async (page, scenario) => {
+ var cookies = [];
+ var cookiePath = scenario.cookiePath;
+
+ // READ COOKIES FROM FILE IF EXISTS
+ if (fs.existsSync(cookiePath)) {
+ cookies = JSON.parse(fs.readFileSync(cookiePath));
+ }
+
+ // MUNGE COOKIE DOMAIN
+ cookies = cookies.map(cookie => {
+ cookie.url = 'https://' + cookie.domain;
+ delete cookie.domain;
+ return cookie;
+ });
+
+ // SET COOKIES
+ const setCookies = async () => {
+ return Promise.all(
+ cookies.map(async (cookie) => {
+ await page.setCookie(cookie);
+ })
+ );
+ };
+ await setCookies();
+ console.log('Cookie state restored with:', JSON.stringify(cookies, null, 2));
+};
diff --git a/backstop_data/engine_scripts/puppet/onBefore.js b/backstop_data/engine_scripts/puppet/onBefore.js
new file mode 100644
index 0000000..a1c374c
--- /dev/null
+++ b/backstop_data/engine_scripts/puppet/onBefore.js
@@ -0,0 +1,3 @@
+module.exports = async (page, scenario, vp) => {
+ await require('./loadCookies')(page, scenario);
+};
diff --git a/backstop_data/engine_scripts/puppet/onReady.js b/backstop_data/engine_scripts/puppet/onReady.js
new file mode 100644
index 0000000..517c0e4
--- /dev/null
+++ b/backstop_data/engine_scripts/puppet/onReady.js
@@ -0,0 +1,6 @@
+module.exports = async (page, scenario, vp) => {
+ console.log('SCENARIO > ' + scenario.label);
+ await require('./clickAndHoverHelper')(page, scenario);
+
+ // add more ready handlers here...
+};
diff --git a/backstop_data/html_report/.gitkeep b/backstop_data/html_report/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/backstop_data/html_report/assets/fonts/Lato-Bold.ttf b/backstop_data/html_report/assets/fonts/Lato-Bold.ttf
new file mode 100755
index 0000000..7434369
Binary files /dev/null and b/backstop_data/html_report/assets/fonts/Lato-Bold.ttf differ
diff --git a/backstop_data/html_report/assets/fonts/Lato-Regular.ttf b/backstop_data/html_report/assets/fonts/Lato-Regular.ttf
new file mode 100755
index 0000000..04ea8ef
Binary files /dev/null and b/backstop_data/html_report/assets/fonts/Lato-Regular.ttf differ
diff --git a/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff b/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff
new file mode 100755
index 0000000..d02221d
Binary files /dev/null and b/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff differ
diff --git a/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff2 b/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff2
new file mode 100755
index 0000000..d330650
Binary files /dev/null and b/backstop_data/html_report/assets/fonts/lato-bold-webfont.woff2 differ
diff --git a/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff b/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff
new file mode 100755
index 0000000..af2064a
Binary files /dev/null and b/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff differ
diff --git a/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff2 b/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff2
new file mode 100755
index 0000000..0e58138
Binary files /dev/null and b/backstop_data/html_report/assets/fonts/lato-regular-webfont.woff2 differ
diff --git a/backstop_data/html_report/b815e28b1e230cff6e9d7b749edcd562.png b/backstop_data/html_report/b815e28b1e230cff6e9d7b749edcd562.png
new file mode 100644
index 0000000..f3e4785
Binary files /dev/null and b/backstop_data/html_report/b815e28b1e230cff6e9d7b749edcd562.png differ
diff --git a/backstop_data/html_report/config.js b/backstop_data/html_report/config.js
new file mode 100644
index 0000000..7e8e0a8
--- /dev/null
+++ b/backstop_data/html_report/config.js
@@ -0,0 +1,80 @@
+report({
+ "testSuite": "BackstopJS",
+ "tests": [
+ {
+ "pair": {
+ "reference": "../bitmaps_reference/backstop_default_Google_Homepage_0_document_0_phone.png",
+ "test": "../bitmaps_test/20181002-234418/backstop_default_Google_Homepage_0_document_0_phone.png",
+ "selector": "document",
+ "fileName": "backstop_default_Google_Homepage_0_document_0_phone.png",
+ "label": "Google Homepage",
+ "requireSameDimensions": true,
+ "misMatchThreshold": 0.1,
+ "url": "https://www.google.com/?hl=en",
+ "referenceUrl": "https://www.google.de/?hl=en",
+ "expect": 0,
+ "viewportLabel": "phone",
+ "diff": {
+ "isSameDimensions": true,
+ "dimensionDifference": {
+ "width": 0,
+ "height": 0
+ },
+ "misMatchPercentage": "0.00",
+ "analysisTime": 121
+ }
+ },
+ "status": "pass"
+ },
+ {
+ "pair": {
+ "reference": "../bitmaps_reference/backstop_default_Google_Homepage_0_document_1_tablet.png",
+ "test": "../bitmaps_test/20181002-234418/backstop_default_Google_Homepage_0_document_1_tablet.png",
+ "selector": "document",
+ "fileName": "backstop_default_Google_Homepage_0_document_1_tablet.png",
+ "label": "Google Homepage",
+ "requireSameDimensions": true,
+ "misMatchThreshold": 0.1,
+ "url": "https://www.google.com/?hl=en",
+ "referenceUrl": "https://www.google.de/?hl=en",
+ "expect": 0,
+ "viewportLabel": "tablet",
+ "diff": {
+ "isSameDimensions": true,
+ "dimensionDifference": {
+ "width": 0,
+ "height": 0
+ },
+ "misMatchPercentage": "0.00",
+ "analysisTime": 76
+ }
+ },
+ "status": "pass"
+ },
+ {
+ "pair": {
+ "reference": "../bitmaps_reference/backstop_default_Google_Homepage_0_document_2_laptop.png",
+ "test": "../bitmaps_test/20181002-234418/backstop_default_Google_Homepage_0_document_2_laptop.png",
+ "selector": "document",
+ "fileName": "backstop_default_Google_Homepage_0_document_2_laptop.png",
+ "label": "Google Homepage",
+ "requireSameDimensions": true,
+ "misMatchThreshold": 0.1,
+ "url": "https://www.google.com/?hl=en",
+ "referenceUrl": "https://www.google.de/?hl=en",
+ "expect": 0,
+ "viewportLabel": "laptop",
+ "diff": {
+ "isSameDimensions": true,
+ "dimensionDifference": {
+ "width": 0,
+ "height": 0
+ },
+ "misMatchPercentage": "0.00"
+ }
+ },
+ "status": "pass"
+ }
+ ],
+ "id": "backstop_default"
+});
\ No newline at end of file
diff --git a/backstop_data/html_report/index_bundle.js b/backstop_data/html_report/index_bundle.js
new file mode 100644
index 0000000..bcd3bd1
--- /dev/null
+++ b/backstop_data/html_report/index_bundle.js
@@ -0,0 +1,36322 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 111);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports) {
+
+// shim for using process in browser
+var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things. But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals. It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+}
+(function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+} ())
+function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+}
+function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+process.prependListener = noop;
+process.prependOnceListener = noop;
+
+process.listeners = function (name) { return [] }
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var validateFormat = function validateFormat(format) {};
+
+if (process.env.NODE_ENV !== 'production') {
+ validateFormat = function validateFormat(format) {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+ validateFormat(format);
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(format.replace(/%s/g, function () {
+ return args[argIndex++];
+ }));
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+}
+
+module.exports = invariant;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+module.exports = __webpack_require__(21);
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var emptyFunction = __webpack_require__(12);
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = emptyFunction;
+
+if (process.env.NODE_ENV !== 'production') {
+ var printWarning = function printWarning(format) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ var argIndex = 0;
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ };
+
+ warning = function warning(condition, format) {
+ if (format === undefined) {
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+ }
+
+ if (format.indexOf('Failed Composite propType: ') === 0) {
+ return; // Ignore CompositeComponent proptype check.
+ }
+
+ if (!condition) {
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+ args[_key2 - 2] = arguments[_key2];
+ }
+
+ printWarning.apply(undefined, [format].concat(args));
+ }
+ };
+}
+
+module.exports = warning;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+
+/**
+ * WARNING: DO NOT manually require this module.
+ * This is a replacement for `invariant(...)` used by the error code system
+ * and will _only_ be required by the corresponding babel pass.
+ * It always throws.
+ */
+
+function reactProdInvariant(code) {
+ var argCount = arguments.length - 1;
+
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
+
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
+ }
+
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
+
+ var error = new Error(message);
+ error.name = 'Invariant Violation';
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
+
+ throw error;
+}
+
+module.exports = reactProdInvariant;
+
+/***/ }),
+/* 5 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+/* WEBPACK VAR INJECTION */(function(process, module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyframes", function() { return keyframes; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "injectGlobal", function() { return injectGlobal; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThemeProvider", function() { return ThemeProvider; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withTheme", function() { return wrapWithTheme; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerStyleSheet", function() { return ServerStyleSheet; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StyleSheetManager", function() { return StyleSheetManager; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_plain_object__ = __webpack_require__(245);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_plain_object___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_plain_object__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_stylis__ = __webpack_require__(247);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_stylis___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_stylis__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(2);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(18);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = __webpack_require__(248);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__);
+
+
+
+
+
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+var _uppercasePattern = /([A-Z])/g;
+
+/**
+ * Hyphenates a camelcased string, for example:
+ *
+ * > hyphenate('backgroundColor')
+ * < "background-color"
+ *
+ * For CSS style names, use `hyphenateStyleName` instead which works properly
+ * with all vendor prefixes, including `ms`.
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function hyphenate$2(string) {
+ return string.replace(_uppercasePattern, '-$1').toLowerCase();
+}
+
+var hyphenate_1 = hyphenate$2;
+
+var hyphenate = hyphenate_1;
+
+var msPattern = /^ms-/;
+
+/**
+ * Hyphenates a camelcased CSS property name, for example:
+ *
+ * > hyphenateStyleName('backgroundColor')
+ * < "background-color"
+ * > hyphenateStyleName('MozTransition')
+ * < "-moz-transition"
+ * > hyphenateStyleName('msTransition')
+ * < "-ms-transition"
+ *
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
+ * is converted to `-ms-`.
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function hyphenateStyleName(string) {
+ return hyphenate(string).replace(msPattern, '-ms-');
+}
+
+var hyphenateStyleName_1 = hyphenateStyleName;
+
+//
+var objToCss = function objToCss(obj, prevKey) {
+ var css = Object.keys(obj).filter(function (key) {
+ var chunk = obj[key];
+ return chunk !== undefined && chunk !== null && chunk !== false && chunk !== '';
+ }).map(function (key) {
+ if (__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(obj[key])) return objToCss(obj[key], key);
+ return hyphenateStyleName_1(key) + ': ' + obj[key] + ';';
+ }).join(' ');
+ return prevKey ? prevKey + ' {\n ' + css + '\n}' : css;
+};
+
+var flatten = function flatten(chunks, executionContext) {
+ return chunks.reduce(function (ruleSet, chunk) {
+ /* Remove falsey values */
+ if (chunk === undefined || chunk === null || chunk === false || chunk === '') {
+ return ruleSet;
+ }
+ /* Flatten ruleSet */
+ if (Array.isArray(chunk)) {
+ return [].concat(ruleSet, flatten(chunk, executionContext));
+ }
+
+ /* Handle other components */
+ if (chunk.hasOwnProperty('styledComponentId')) {
+ // $FlowFixMe not sure how to make this pass
+ return [].concat(ruleSet, ['.' + chunk.styledComponentId]);
+ }
+
+ /* Either execute or defer the function */
+ if (typeof chunk === 'function') {
+ return executionContext ? ruleSet.concat.apply(ruleSet, flatten([chunk(executionContext)], executionContext)) : ruleSet.concat(chunk);
+ }
+
+ /* Handle objects */
+ return ruleSet.concat(
+ // $FlowFixMe have to add %checks somehow to isPlainObject
+ __WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(chunk) ? objToCss(chunk) : chunk.toString());
+ }, []);
+};
+
+//
+var stylis = new __WEBPACK_IMPORTED_MODULE_1_stylis___default.a({
+ global: false,
+ cascade: true,
+ keyframe: false,
+ prefix: true,
+ compress: false,
+ semicolon: true
+});
+
+var stringifyRules = function stringifyRules(rules, selector, prefix) {
+ var flatCSS = rules.join('').replace(/^\s*\/\/.*$/gm, ''); // replace JS comments
+
+ var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
+
+ return stylis(prefix || !selector ? '' : selector, cssStr);
+};
+
+//
+var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
+var charsLength = chars.length;
+
+/* Some high number, usually 9-digit base-10. Map it to base-😎 */
+var generateAlphabeticName = function generateAlphabeticName(code) {
+ var name = '';
+ var x = void 0;
+
+ for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
+ name = chars[x % charsLength] + name;
+ }
+
+ return chars[x % charsLength] + name;
+};
+
+//
+
+
+var interleave = (function (strings, interpolations) {
+ return interpolations.reduce(function (array, interp, i) {
+ return array.concat(interp, strings[i + 1]);
+ }, [strings[0]]);
+});
+
+//
+var css = (function (strings) {
+ for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ interpolations[_key - 1] = arguments[_key];
+ }
+
+ return flatten(interleave(strings, interpolations));
+});
+
+//
+var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s+(\S+)\s+\*\//gm;
+
+var extractCompsFromCSS = (function (maybeCSS) {
+ var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
+ var existingComponents = [];
+ css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
+ existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
+ return match;
+ });
+ return existingComponents.map(function (_ref, i) {
+ var componentId = _ref.componentId,
+ matchIndex = _ref.matchIndex;
+
+ var nextComp = existingComponents[i + 1];
+ var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
+ return { componentId: componentId, cssFromDOM: cssFromDOM };
+ });
+});
+
+//
+/* eslint-disable camelcase, no-undef */
+
+var getNonce = (function () {
+ return true ? __webpack_require__.nc : null;
+});
+
+var classCallCheck = function (instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+};
+
+var createClass = function () {
+ function defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ 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);
+ }
+ }
+
+ return function (Constructor, protoProps, staticProps) {
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) defineProperties(Constructor, staticProps);
+ return Constructor;
+ };
+}();
+
+
+
+
+
+
+
+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;
+};
+
+
+
+var inherits = function (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;
+};
+
+
+
+
+
+
+
+
+
+var objectWithoutProperties = function (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;
+};
+
+var possibleConstructorReturn = function (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;
+};
+
+//
+/* eslint-disable no-underscore-dangle */
+/*
+ * Browser Style Sheet with Rehydration
+ *
+ *
+ *
+ * Note: replace · with * in the above snippet.
+ * */
+var COMPONENTS_PER_TAG = 40;
+
+var BrowserTag = function () {
+ function BrowserTag(el, isLocal) {
+ var existingSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
+ classCallCheck(this, BrowserTag);
+
+ this.el = el;
+ this.isLocal = isLocal;
+ this.ready = false;
+
+ var extractedComps = extractCompsFromCSS(existingSource);
+
+ this.size = extractedComps.length;
+ this.components = extractedComps.reduce(function (acc, obj) {
+ acc[obj.componentId] = obj; // eslint-disable-line no-param-reassign
+ return acc;
+ }, {});
+ }
+
+ BrowserTag.prototype.isFull = function isFull() {
+ return this.size >= COMPONENTS_PER_TAG;
+ };
+
+ BrowserTag.prototype.addComponent = function addComponent(componentId) {
+ if (!this.ready) this.replaceElement();
+ if (process.env.NODE_ENV !== 'production' && this.components[componentId]) {
+ throw new Error('Trying to add Component \'' + componentId + '\' twice!');
+ }
+
+ var comp = { componentId: componentId, textNode: document.createTextNode('') };
+ this.el.appendChild(comp.textNode);
+
+ this.size += 1;
+ this.components[componentId] = comp;
+ };
+
+ BrowserTag.prototype.inject = function inject(componentId, css, name) {
+ if (!this.ready) this.replaceElement();
+ var comp = this.components[componentId];
+
+ if (process.env.NODE_ENV !== 'production' && !comp) {
+ throw new Error('Must add a new component before you can inject css into it');
+ }
+ if (comp.textNode.data === '') {
+ comp.textNode.appendData('\n/* sc-component-id: ' + componentId + ' */\n');
+ }
+
+ comp.textNode.appendData(css);
+ if (name) {
+ var existingNames = this.el.getAttribute(SC_ATTR);
+ this.el.setAttribute(SC_ATTR, existingNames ? existingNames + ' ' + name : name);
+ }
+
+ var nonce = getNonce();
+
+ if (nonce) {
+ this.el.setAttribute('nonce', nonce);
+ }
+ };
+
+ BrowserTag.prototype.toHTML = function toHTML() {
+ return this.el.outerHTML;
+ };
+
+ BrowserTag.prototype.toReactElement = function toReactElement() {
+ throw new Error("BrowserTag doesn't implement toReactElement!");
+ };
+
+ BrowserTag.prototype.clone = function clone() {
+ throw new Error('BrowserTag cannot be cloned!');
+ };
+
+ /* Because we care about source order, before we can inject anything we need to
+ * create a text node for each component and replace the existing CSS. */
+
+
+ BrowserTag.prototype.replaceElement = function replaceElement() {
+ var _this = this;
+
+ this.ready = true;
+ // We have nothing to inject. Use the current el.
+ if (this.size === 0) return;
+
+ // Build up our replacement style tag
+ var newEl = this.el.cloneNode();
+ newEl.appendChild(document.createTextNode('\n'));
+
+ Object.keys(this.components).forEach(function (key) {
+ var comp = _this.components[key];
+
+ // eslint-disable-next-line no-param-reassign
+ comp.textNode = document.createTextNode(comp.cssFromDOM);
+ newEl.appendChild(comp.textNode);
+ });
+
+ if (!this.el.parentNode) {
+ throw new Error("Trying to replace an element that wasn't mounted!");
+ }
+
+ // The ol' switcheroo
+ this.el.parentNode.replaceChild(newEl, this.el);
+ this.el = newEl;
+ };
+
+ return BrowserTag;
+}();
+
+/* Factory function to separate DOM operations from logical ones*/
+
+
+var BrowserStyleSheet = {
+ create: function create() {
+ var tags = [];
+ var names = {};
+
+ /* Construct existing state from DOM */
+ var nodes = document.querySelectorAll('[' + SC_ATTR + ']');
+ var nodesLength = nodes.length;
+
+ for (var i = 0; i < nodesLength; i += 1) {
+ var el = nodes[i];
+
+ tags.push(new BrowserTag(el, el.getAttribute(LOCAL_ATTR) === 'true', el.innerHTML));
+
+ var attr = el.getAttribute(SC_ATTR);
+ if (attr) {
+ attr.trim().split(/\s+/).forEach(function (name) {
+ names[name] = true;
+ });
+ }
+ }
+
+ /* Factory for making more tags */
+ var tagConstructor = function tagConstructor(isLocal) {
+ var el = document.createElement('style');
+ el.type = 'text/css';
+ el.setAttribute(SC_ATTR, '');
+ el.setAttribute(LOCAL_ATTR, isLocal ? 'true' : 'false');
+ if (!document.head) throw new Error('Missing document
');
+ document.head.appendChild(el);
+ return new BrowserTag(el, isLocal);
+ };
+
+ return new StyleSheet(tagConstructor, tags, names);
+ }
+};
+
+//
+var SC_ATTR = 'data-styled-components';
+var LOCAL_ATTR = 'data-styled-components-is-local';
+var CONTEXT_KEY = '__styled-components-stylesheet__';
+
+/* eslint-disable flowtype/object-type-delimiter */
+
+/* eslint-enable flowtype/object-type-delimiter */
+
+var instance = null;
+// eslint-disable-next-line no-use-before-define
+var clones = [];
+
+var StyleSheet = function () {
+ function StyleSheet(tagConstructor) {
+ var tags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+ var names = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ classCallCheck(this, StyleSheet);
+ this.hashes = {};
+ this.deferredInjections = {};
+ this.stylesCacheable = typeof document !== 'undefined';
+
+ this.tagConstructor = tagConstructor;
+ this.tags = tags;
+ this.names = names;
+ this.constructComponentTagMap();
+ }
+
+ // helper for `ComponentStyle` to know when it cache static styles.
+ // staticly styled-component can not safely cache styles on the server
+ // without all `ComponentStyle` instances saving a reference to the
+ // the styleSheet instance they last rendered with,
+ // or listening to creation / reset events. otherwise you might create
+ // a component with one stylesheet and render it another api response
+ // with another, losing styles on from your server-side render.
+
+
+ StyleSheet.prototype.constructComponentTagMap = function constructComponentTagMap() {
+ var _this = this;
+
+ this.componentTags = {};
+
+ this.tags.forEach(function (tag) {
+ Object.keys(tag.components).forEach(function (componentId) {
+ _this.componentTags[componentId] = tag;
+ });
+ });
+ };
+
+ /* Best level of caching—get the name from the hash straight away. */
+
+
+ StyleSheet.prototype.getName = function getName(hash) {
+ return this.hashes[hash.toString()];
+ };
+
+ /* Second level of caching—if the name is already in the dom, don't
+ * inject anything and record the hash for getName next time. */
+
+
+ StyleSheet.prototype.alreadyInjected = function alreadyInjected(hash, name) {
+ if (!this.names[name]) return false;
+
+ this.hashes[hash.toString()] = name;
+ return true;
+ };
+
+ /* Third type of caching—don't inject components' componentId twice. */
+
+
+ StyleSheet.prototype.hasInjectedComponent = function hasInjectedComponent(componentId) {
+ return !!this.componentTags[componentId];
+ };
+
+ StyleSheet.prototype.deferredInject = function deferredInject(componentId, isLocal, css) {
+ if (this === instance) {
+ clones.forEach(function (clone) {
+ clone.deferredInject(componentId, isLocal, css);
+ });
+ }
+
+ this.getOrCreateTag(componentId, isLocal);
+ this.deferredInjections[componentId] = css;
+ };
+
+ StyleSheet.prototype.inject = function inject(componentId, isLocal, css, hash, name) {
+ if (this === instance) {
+ clones.forEach(function (clone) {
+ clone.inject(componentId, isLocal, css);
+ });
+ }
+
+ var tag = this.getOrCreateTag(componentId, isLocal);
+
+ var deferredInjection = this.deferredInjections[componentId];
+ if (deferredInjection) {
+ tag.inject(componentId, deferredInjection);
+ delete this.deferredInjections[componentId];
+ }
+
+ tag.inject(componentId, css, name);
+
+ if (hash && name) {
+ this.hashes[hash.toString()] = name;
+ }
+ };
+
+ StyleSheet.prototype.toHTML = function toHTML() {
+ return this.tags.map(function (tag) {
+ return tag.toHTML();
+ }).join('');
+ };
+
+ StyleSheet.prototype.toReactElements = function toReactElements() {
+ return this.tags.map(function (tag, i) {
+ return tag.toReactElement('sc-' + i);
+ });
+ };
+
+ StyleSheet.prototype.getOrCreateTag = function getOrCreateTag(componentId, isLocal) {
+ var existingTag = this.componentTags[componentId];
+ if (existingTag) {
+ return existingTag;
+ }
+
+ var lastTag = this.tags[this.tags.length - 1];
+ var componentTag = !lastTag || lastTag.isFull() || lastTag.isLocal !== isLocal ? this.createNewTag(isLocal) : lastTag;
+ this.componentTags[componentId] = componentTag;
+ componentTag.addComponent(componentId);
+ return componentTag;
+ };
+
+ StyleSheet.prototype.createNewTag = function createNewTag(isLocal) {
+ var newTag = this.tagConstructor(isLocal);
+ this.tags.push(newTag);
+ return newTag;
+ };
+
+ StyleSheet.reset = function reset(isServer) {
+ instance = StyleSheet.create(isServer);
+ };
+
+ /* We can make isServer totally implicit once Jest 20 drops and we
+ * can change environment on a per-test basis. */
+
+
+ StyleSheet.create = function create() {
+ var isServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : typeof document === 'undefined';
+
+ return (isServer ? ServerStyleSheet : BrowserStyleSheet).create();
+ };
+
+ StyleSheet.clone = function clone(oldSheet) {
+ var newSheet = new StyleSheet(oldSheet.tagConstructor, oldSheet.tags.map(function (tag) {
+ return tag.clone();
+ }), _extends({}, oldSheet.names));
+
+ newSheet.hashes = _extends({}, oldSheet.hashes);
+ newSheet.deferredInjections = _extends({}, oldSheet.deferredInjections);
+ clones.push(newSheet);
+
+ return newSheet;
+ };
+
+ createClass(StyleSheet, null, [{
+ key: 'instance',
+ get: function get$$1() {
+ return instance || (instance = StyleSheet.create());
+ }
+ }]);
+ return StyleSheet;
+}();
+
+var _StyleSheetManager$ch;
+
+//
+var StyleSheetManager = function (_Component) {
+ inherits(StyleSheetManager, _Component);
+
+ function StyleSheetManager() {
+ classCallCheck(this, StyleSheetManager);
+ return possibleConstructorReturn(this, _Component.apply(this, arguments));
+ }
+
+ StyleSheetManager.prototype.getChildContext = function getChildContext() {
+ var _ref;
+
+ return _ref = {}, _ref[CONTEXT_KEY] = this.props.sheet, _ref;
+ };
+
+ StyleSheetManager.prototype.render = function render() {
+ /* eslint-disable react/prop-types */
+ // Flow v0.43.1 will report an error accessing the `children` property,
+ // but v0.47.0 will not. It is necessary to use a type cast instead of
+ // a "fixme" comment to satisfy both Flow versions.
+ return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children);
+ };
+
+ return StyleSheetManager;
+}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);
+
+StyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch);
+
+StyleSheetManager.propTypes = {
+ sheet: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired
+};
+
+//
+/* eslint-disable no-underscore-dangle */
+var ServerTag = function () {
+ function ServerTag(isLocal) {
+ classCallCheck(this, ServerTag);
+
+ this.isLocal = isLocal;
+ this.components = {};
+ this.size = 0;
+ this.names = [];
+ }
+
+ ServerTag.prototype.isFull = function isFull() {
+ return false;
+ };
+
+ ServerTag.prototype.addComponent = function addComponent(componentId) {
+ if (process.env.NODE_ENV !== 'production' && this.components[componentId]) {
+ throw new Error('Trying to add Component \'' + componentId + '\' twice!');
+ }
+ this.components[componentId] = { componentId: componentId, css: '' };
+ this.size += 1;
+ };
+
+ ServerTag.prototype.concatenateCSS = function concatenateCSS() {
+ var _this = this;
+
+ return Object.keys(this.components).reduce(function (styles, k) {
+ return styles + _this.components[k].css;
+ }, '');
+ };
+
+ ServerTag.prototype.inject = function inject(componentId, css, name) {
+ var comp = this.components[componentId];
+
+ if (process.env.NODE_ENV !== 'production' && !comp) {
+ throw new Error('Must add a new component before you can inject css into it');
+ }
+ if (comp.css === '') comp.css = '/* sc-component-id: ' + componentId + ' */\n';
+
+ comp.css += css.replace(/\n*$/, '\n');
+
+ if (name) this.names.push(name);
+ };
+
+ ServerTag.prototype.toHTML = function toHTML() {
+ var attrs = ['type="text/css"', SC_ATTR + '="' + this.names.join(' ') + '"', LOCAL_ATTR + '="' + (this.isLocal ? 'true' : 'false') + '"'];
+
+ var nonce = getNonce();
+
+ if (nonce) {
+ attrs.push('nonce="' + nonce + '"');
+ }
+
+ return '';
+ };
+
+ ServerTag.prototype.toReactElement = function toReactElement(key) {
+ var _attrs;
+
+ var attrs = (_attrs = {}, _attrs[SC_ATTR] = this.names.join(' '), _attrs[LOCAL_ATTR] = this.isLocal.toString(), _attrs);
+
+ var nonce = getNonce();
+
+ if (nonce) {
+ attrs.nonce = nonce;
+ }
+
+ return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('style', _extends({
+ key: key,
+ type: 'text/css'
+ }, attrs, {
+ dangerouslySetInnerHTML: { __html: this.concatenateCSS() }
+ }));
+ };
+
+ ServerTag.prototype.clone = function clone() {
+ var _this2 = this;
+
+ var copy = new ServerTag(this.isLocal);
+ copy.names = [].concat(this.names);
+ copy.size = this.size;
+ copy.components = Object.keys(this.components).reduce(function (acc, key) {
+ acc[key] = _extends({}, _this2.components[key]); // eslint-disable-line no-param-reassign
+ return acc;
+ }, {});
+
+ return copy;
+ };
+
+ return ServerTag;
+}();
+
+var ServerStyleSheet = function () {
+ function ServerStyleSheet() {
+ classCallCheck(this, ServerStyleSheet);
+
+ this.instance = StyleSheet.clone(StyleSheet.instance);
+ }
+
+ ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
+ if (this.closed) {
+ throw new Error("Can't collect styles once you've called getStyleTags!");
+ }
+ return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(
+ StyleSheetManager,
+ { sheet: this.instance },
+ children
+ );
+ };
+
+ ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
+ if (!this.closed) {
+ clones.splice(clones.indexOf(this.instance), 1);
+ this.closed = true;
+ }
+
+ return this.instance.toHTML();
+ };
+
+ ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
+ if (!this.closed) {
+ clones.splice(clones.indexOf(this.instance), 1);
+ this.closed = true;
+ }
+
+ return this.instance.toReactElements();
+ };
+
+ ServerStyleSheet.create = function create() {
+ return new StyleSheet(function (isLocal) {
+ return new ServerTag(isLocal);
+ });
+ };
+
+ return ServerStyleSheet;
+}();
+
+//
+
+var LIMIT = 200;
+
+var createWarnTooManyClasses = (function (displayName) {
+ var generatedClasses = {};
+ var warningSeen = false;
+
+ return function (className) {
+ if (!warningSeen) {
+ generatedClasses[className] = true;
+ if (Object.keys(generatedClasses).length >= LIMIT) {
+ // Unable to find latestRule in test environment.
+ /* eslint-disable no-console, prefer-template */
+ console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs({\n' + ' style: ({ background }) => ({\n' + ' background,\n' + ' }),\n' + ' })`width: 100%;`\n\n' + ' ');
+ warningSeen = true;
+ generatedClasses = {};
+ }
+ }
+ };
+});
+
+//
+/* eslint-disable max-len */
+/**
+ * Trying to avoid the unknown-prop errors on styled components by filtering by
+ * React's attribute whitelist.
+ *
+ * To regenerate this regex:
+ *
+ * 1. `npm i -g regexgen` (https://github.com/devongovett/regexgen)
+ * 2. Run `regexgen` with the list of space-separated words below as input
+ * 3. Surround the emitted regex with this: `/^(GENERATED_REGEX)$/` -- this will ensure a full string match
+ * and no false positives from partials
+ **/
+/*
+children dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan
+*/
+/* eslint-enable max-len */
+
+var ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|(?:attribute|glyph)Nam|playsInlin|(?:formE|e)ncTyp|(?:writing|input|edge)Mod|(?:xlinkTy|itemSco|keyTy|slo)p|(?:amplitu|mo)d|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ntrol|ord)s|o(?:lor(?:Interpolation)?|ntent)|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|o(?:ntextMenu|ls)|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|(?:rossOrigi|olSpa)n|apHeight|lip(?:Path)?|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|autoFocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|formActio|zoomAndPa|onFocusI|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveA(?:spectRatio|lpha)|ointsAt[X-Z]|anose1)|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:gradientT|patternT|t)ransform|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:strokeMiterlimi|(?:specularConsta|repeatCou|fontVaria)n|(?:(?:specularE|e)xpon|renderingInt|asc)en|d(?:iffuseConsta|esce)n|(?:fontSizeAdju|lengthAdju|manife)s|baselineShif|vectorEffec|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|a(?:utoCorrec|bou)|markerStar|onFocusOu|in(?:tercep|lis)|restar|forma|heigh|lis)t|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|m(?:arkerMi|etho)|preloa|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:allowFullScre|hidd)en|strokeDasharray|systemLanguage|(?:strokeLineca|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|(?:pointerEve|keyPoi)nts|unicodeRange|(?:(?:allowReord|placehold|frameBord|paintOrd|post|ord)e|repeatDu|d(?:efe|u))r|mathematical|(?:vI|i)deographic|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|vAlphabetic|mediaGroup|spellCheck|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|(?:xmlnsXl|valueL)ink|a(?:rabicForm|l(?:phabetic|t)|sync)|pathLength|(?:text|m(?:in|ax))Length|innerHTML|xlinkShow|(?:xlinkHr|glyphR)ef|r(?:e(?:quired|sult|f))?|o(?:verflow|pen)|(?:tabInde|(?:sand|b)bo|viewBo)x|(?:(?:href|xml|src)La|kerni)ng|f(?:o(?:ntSize|rm)|il(?:ter|l))|autoPlay|unicode|p(?:attern|oints)|t(?:arget[XY]|o)|i(?:temRef|n2|s)|divisor|d(?:efault|ata|ir)?|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|(?:width|size)s|(?:stri|la)ng|prefix|itemID|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|s)|t(?:arget|ype)|typeof|width|value|x(?:mlns)?|label|m(?:edia|a(?:sk|x)|in)|size|href|k(?:ey)?|end|low|x[12]|i[dn]|y[12]|g[12]|by|f[xy]|[yz])$/;
+
+/* From DOMProperty */
+var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
+var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
+var isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));
+
+var validAttr = (function (name) {
+ return ATTRIBUTE_REGEX.test(name) || isCustomAttribute(name.toLowerCase());
+});
+
+//
+
+
+function isTag(target) /* : %checks */{
+ return typeof target === 'string';
+}
+
+//
+
+
+function isStyledComponent(target) /* : %checks */{
+ return typeof target === 'function' && typeof target.styledComponentId === 'string';
+}
+
+//
+
+/* eslint-disable no-undef */
+function getComponentName(target) {
+ return target.displayName || target.name || 'Component';
+}
+
+//
+
+
+var determineTheme = (function (props, fallbackTheme, defaultProps) {
+ // Props should take precedence over ThemeProvider, which should take precedence over
+ // defaultProps, but React automatically puts defaultProps on props.
+
+ /* eslint-disable react/prop-types */
+ var isDefaultTheme = defaultProps && props.theme === defaultProps.theme;
+ var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme;
+ /* eslint-enable */
+
+ return theme;
+});
+
+//
+var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
+var dashesAtEnds = /(^-|-$)/g;
+
+/**
+ * TODO: Explore using CSS.escape when it becomes more available
+ * in evergreen browsers.
+ */
+function escape(str) {
+ return str
+ // Replace all possible CSS selectors
+ .replace(escapeRegex, '-')
+
+ // Remove extraneous hyphens at the start and end
+ .replace(dashesAtEnds, '');
+}
+
+//
+/**
+ * Creates a broadcast that can be listened to, i.e. simple event emitter
+ *
+ * @see https://github.com/ReactTraining/react-broadcast
+ */
+
+var createBroadcast = function createBroadcast(initialState) {
+ var listeners = {};
+ var id = 0;
+ var state = initialState;
+
+ function publish(nextState) {
+ state = nextState;
+
+ // eslint-disable-next-line guard-for-in, no-restricted-syntax
+ for (var key in listeners) {
+ var listener = listeners[key];
+ if (listener === undefined) {
+ // eslint-disable-next-line no-continue
+ continue;
+ }
+
+ listener(state);
+ }
+ }
+
+ function subscribe(listener) {
+ var currentId = id;
+ listeners[currentId] = listener;
+ id += 1;
+ listener(state);
+ return currentId;
+ }
+
+ function unsubscribe(unsubID) {
+ listeners[unsubID] = undefined;
+ }
+
+ return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe };
+};
+
+//
+// Helper to call a given function, only once
+var once = (function (cb) {
+ var called = false;
+
+ return function () {
+ if (!called) {
+ called = true;
+ cb();
+ }
+ };
+});
+
+var _ThemeProvider$childC;
+var _ThemeProvider$contex;
+
+//
+/* globals React$Element */
+// NOTE: DO NOT CHANGE, changing this is a semver major change!
+var CHANNEL = '__styled-components__';
+var CHANNEL_NEXT = CHANNEL + 'next__';
+
+var CONTEXT_CHANNEL_SHAPE = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({
+ getTheme: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
+ subscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
+ unsubscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func
+});
+
+var warnChannelDeprecated = void 0;
+if (process.env.NODE_ENV !== 'production') {
+ warnChannelDeprecated = once(function () {
+ // eslint-disable-next-line no-console
+ console.error('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.');
+ });
+}
+
+var isFunction = function isFunction(test) {
+ return typeof test === 'function';
+};
+
+/**
+ * Provide a theme to an entire react component tree via context and event listeners (have to do
+ * both context and event emitter as pure components block context updates)
+ */
+
+var ThemeProvider = function (_Component) {
+ inherits(ThemeProvider, _Component);
+
+ function ThemeProvider() {
+ classCallCheck(this, ThemeProvider);
+
+ var _this = possibleConstructorReturn(this, _Component.call(this));
+
+ _this.unsubscribeToOuterId = -1;
+
+ _this.getTheme = _this.getTheme.bind(_this);
+ return _this;
+ }
+
+ ThemeProvider.prototype.componentWillMount = function componentWillMount() {
+ var _this2 = this;
+
+ // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme
+ // with the outer theme
+ var outerContext = this.context[CHANNEL_NEXT];
+ if (outerContext !== undefined) {
+ this.unsubscribeToOuterId = outerContext.subscribe(function (theme) {
+ _this2.outerTheme = theme;
+ });
+ }
+ this.broadcast = createBroadcast(this.getTheme());
+ };
+
+ ThemeProvider.prototype.getChildContext = function getChildContext() {
+ var _this3 = this,
+ _babelHelpers$extends;
+
+ return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = {
+ getTheme: this.getTheme,
+ subscribe: this.broadcast.subscribe,
+ unsubscribe: this.broadcast.unsubscribe
+ }, _babelHelpers$extends[CHANNEL] = function (subscriber) {
+ if (process.env.NODE_ENV !== 'production') {
+ warnChannelDeprecated();
+ }
+
+ // Patch the old `subscribe` provide via `CHANNEL` for older clients.
+ var unsubscribeId = _this3.broadcast.subscribe(subscriber);
+ return function () {
+ return _this3.broadcast.unsubscribe(unsubscribeId);
+ };
+ }, _babelHelpers$extends));
+ };
+
+ ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (this.props.theme !== nextProps.theme) {
+ this.broadcast.publish(this.getTheme(nextProps.theme));
+ }
+ };
+
+ ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() {
+ if (this.unsubscribeToOuterId !== -1) {
+ this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId);
+ }
+ };
+
+ // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation
+
+
+ ThemeProvider.prototype.getTheme = function getTheme(passedTheme) {
+ var theme = passedTheme || this.props.theme;
+ if (isFunction(theme)) {
+ var mergedTheme = theme(this.outerTheme);
+ if (process.env.NODE_ENV !== 'production' && !__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(mergedTheme)) {
+ throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');
+ }
+ return mergedTheme;
+ }
+ if (!__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(theme)) {
+ throw new Error('[ThemeProvider] Please make your theme prop a plain object');
+ }
+ return _extends({}, this.outerTheme, theme);
+ };
+
+ ThemeProvider.prototype.render = function render() {
+ if (!this.props.children) {
+ return null;
+ }
+ return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children);
+ };
+
+ return ThemeProvider;
+}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);
+
+ThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _ThemeProvider$childC[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$childC);
+ThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex);
+
+//
+
+// HACK for generating all static styles without needing to allocate
+// an empty execution context every single time...
+var STATIC_EXECUTION_CONTEXT = {};
+
+var _StyledComponent = (function (ComponentStyle, constructWithOptions) {
+ var identifiers = {};
+
+ /* We depend on components having unique IDs */
+ var generateId = function generateId(_displayName, parentComponentId) {
+ var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
+
+ var componentId = void 0;
+
+ /**
+ * only fall back to hashing the component injection order if
+ * a proper displayName isn't provided by the babel plugin
+ */
+ if (!_displayName) {
+ var nr = (identifiers[displayName] || 0) + 1;
+ identifiers[displayName] = nr;
+
+ componentId = displayName + '-' + ComponentStyle.generateName(displayName + nr);
+ } else {
+ componentId = displayName + '-' + ComponentStyle.generateName(displayName);
+ }
+
+ return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId;
+ };
+
+ var BaseStyledComponent = function (_Component) {
+ inherits(BaseStyledComponent, _Component);
+
+ function BaseStyledComponent() {
+ var _temp, _this, _ret;
+
+ classCallCheck(this, BaseStyledComponent);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = {
+ theme: null,
+ generatedClassName: ''
+ }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);
+ }
+
+ BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() {
+ if (this.unsubscribeId !== -1) {
+ this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);
+ }
+ };
+
+ BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) {
+ var attrs = this.constructor.attrs;
+
+ var context = _extends({}, props, { theme: theme });
+ if (attrs === undefined) {
+ return context;
+ }
+
+ this.attrs = Object.keys(attrs).reduce(function (acc, key) {
+ var attr = attrs[key];
+ // eslint-disable-next-line no-param-reassign
+ acc[key] = typeof attr === 'function' ? attr(context) : attr;
+ return acc;
+ }, {});
+
+ return _extends({}, context, this.attrs);
+ };
+
+ BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
+ var _constructor = this.constructor,
+ attrs = _constructor.attrs,
+ componentStyle = _constructor.componentStyle,
+ warnTooManyClasses = _constructor.warnTooManyClasses;
+
+ var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance;
+
+ // staticaly styled-components don't need to build an execution context object,
+ // and shouldn't be increasing the number of class names
+ if (componentStyle.isStatic && attrs === undefined) {
+ return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet);
+ } else {
+ var executionContext = this.buildExecutionContext(theme, props);
+ var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet);
+
+ if (process.env.NODE_ENV !== 'production' && warnTooManyClasses !== undefined) {
+ warnTooManyClasses(className);
+ }
+
+ return className;
+ }
+ };
+
+ BaseStyledComponent.prototype.componentWillMount = function componentWillMount() {
+ var _this2 = this;
+
+ var componentStyle = this.constructor.componentStyle;
+
+ var styledContext = this.context[CHANNEL_NEXT];
+
+ // If this is a staticaly-styled component, we don't need to the theme
+ // to generate or build styles.
+ if (componentStyle.isStatic) {
+ var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props);
+ this.setState({ generatedClassName: generatedClassName });
+ // If there is a theme in the context, subscribe to the event emitter. This
+ // is necessary due to pure components blocking context updates, this circumvents
+ // that by updating when an event is emitted
+ } else if (styledContext !== undefined) {
+ var subscribe = styledContext.subscribe;
+
+ this.unsubscribeId = subscribe(function (nextTheme) {
+ // This will be called once immediately
+ var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps);
+ var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props);
+
+ _this2.setState({ theme: theme, generatedClassName: generatedClassName });
+ });
+ } else {
+ // eslint-disable-next-line react/prop-types
+ var theme = this.props.theme || {};
+ var _generatedClassName = this.generateAndInjectStyles(theme, this.props);
+ this.setState({ theme: theme, generatedClassName: _generatedClassName });
+ }
+ };
+
+ BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ var _this3 = this;
+
+ // If this is a staticaly-styled component, we don't need to listen to
+ // props changes to update styles
+ var componentStyle = this.constructor.componentStyle;
+
+ if (componentStyle.isStatic) {
+ return;
+ }
+
+ this.setState(function (oldState) {
+ var theme = determineTheme(nextProps, oldState.theme, _this3.constructor.defaultProps);
+ var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps);
+
+ return { theme: theme, generatedClassName: generatedClassName };
+ });
+ };
+
+ BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.unsubscribeFromContext();
+ };
+
+ BaseStyledComponent.prototype.render = function render() {
+ var _this4 = this;
+
+ // eslint-disable-next-line react/prop-types
+ var innerRef = this.props.innerRef;
+ var generatedClassName = this.state.generatedClassName;
+ var _constructor2 = this.constructor,
+ styledComponentId = _constructor2.styledComponentId,
+ target = _constructor2.target;
+
+
+ var isTargetTag = isTag(target);
+
+ var className = [
+ // eslint-disable-next-line react/prop-types
+ this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' ');
+
+ var baseProps = _extends({}, this.attrs, {
+ className: className
+ });
+
+ if (isStyledComponent(target)) {
+ baseProps.innerRef = innerRef;
+ } else {
+ baseProps.ref = innerRef;
+ }
+
+ var propsForElement = Object.keys(this.props).reduce(function (acc, propName) {
+ // Don't pass through non HTML tags through to HTML elements
+ // always omit innerRef
+ if (propName !== 'innerRef' && propName !== 'className' && (!isTargetTag || validAttr(propName))) {
+ // eslint-disable-next-line no-param-reassign
+ acc[propName] = _this4.props[propName];
+ }
+
+ return acc;
+ }, baseProps);
+
+ return Object(__WEBPACK_IMPORTED_MODULE_2_react__["createElement"])(target, propsForElement);
+ };
+
+ return BaseStyledComponent;
+ }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);
+
+ var createStyledComponent = function createStyledComponent(target, options, rules) {
+ var _StyledComponent$cont;
+
+ var _options$displayName = options.displayName,
+ displayName = _options$displayName === undefined ? isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')' : _options$displayName,
+ _options$componentId = options.componentId,
+ componentId = _options$componentId === undefined ? generateId(options.displayName, options.parentComponentId) : _options$componentId,
+ _options$ParentCompon = options.ParentComponent,
+ ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon,
+ extendingRules = options.rules,
+ attrs = options.attrs;
+
+
+ var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : componentId;
+
+ var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId);
+
+ var StyledComponent = function (_ParentComponent) {
+ inherits(StyledComponent, _ParentComponent);
+
+ function StyledComponent() {
+ classCallCheck(this, StyledComponent);
+ return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments));
+ }
+
+ StyledComponent.withComponent = function withComponent(tag) {
+ var previousComponentId = options.componentId,
+ optionsToCopy = objectWithoutProperties(options, ['componentId']);
+
+
+ var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
+
+ var newOptions = _extends({}, optionsToCopy, {
+ componentId: newComponentId,
+ ParentComponent: StyledComponent
+ });
+
+ return createStyledComponent(tag, newOptions, rules);
+ };
+
+ createClass(StyledComponent, null, [{
+ key: 'extend',
+ get: function get$$1() {
+ var rulesFromOptions = options.rules,
+ parentComponentId = options.componentId,
+ optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']);
+
+
+ var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules);
+
+ var newOptions = _extends({}, optionsToCopy, {
+ rules: newRules,
+ parentComponentId: parentComponentId,
+ ParentComponent: StyledComponent
+ });
+
+ return constructWithOptions(createStyledComponent, target, newOptions);
+ }
+ }]);
+ return StyledComponent;
+ }(ParentComponent);
+
+ StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _StyledComponent$cont[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _StyledComponent$cont[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]), _StyledComponent$cont);
+ StyledComponent.displayName = displayName;
+ StyledComponent.styledComponentId = styledComponentId;
+ StyledComponent.attrs = attrs;
+ StyledComponent.componentStyle = componentStyle;
+ StyledComponent.target = target;
+
+
+ if (process.env.NODE_ENV !== 'production') {
+ StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
+ }
+
+ return StyledComponent;
+ };
+
+ return createStyledComponent;
+});
+
+// murmurhash2 via https://gist.github.com/raycmorgan/588423
+
+function doHash(str, seed) {
+ var m = 0x5bd1e995;
+ var r = 24;
+ var h = seed ^ str.length;
+ var length = str.length;
+ var currentIndex = 0;
+
+ while (length >= 4) {
+ var k = UInt32(str, currentIndex);
+
+ k = Umul32(k, m);
+ k ^= k >>> r;
+ k = Umul32(k, m);
+
+ h = Umul32(h, m);
+ h ^= k;
+
+ currentIndex += 4;
+ length -= 4;
+ }
+
+ switch (length) {
+ case 3:
+ h ^= UInt16(str, currentIndex);
+ h ^= str.charCodeAt(currentIndex + 2) << 16;
+ h = Umul32(h, m);
+ break;
+
+ case 2:
+ h ^= UInt16(str, currentIndex);
+ h = Umul32(h, m);
+ break;
+
+ case 1:
+ h ^= str.charCodeAt(currentIndex);
+ h = Umul32(h, m);
+ break;
+ }
+
+ h ^= h >>> 13;
+ h = Umul32(h, m);
+ h ^= h >>> 15;
+
+ return h >>> 0;
+}
+
+function UInt32(str, pos) {
+ return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24);
+}
+
+function UInt16(str, pos) {
+ return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8);
+}
+
+function Umul32(n, m) {
+ n = n | 0;
+ m = m | 0;
+ var nlo = n & 0xffff;
+ var nhi = n >>> 16;
+ var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0;
+ return res;
+}
+
+//
+var isStaticRules = function isStaticRules(rules, attrs) {
+ for (var i = 0; i < rules.length; i += 1) {
+ var rule = rules[i];
+
+ // recursive case
+ if (Array.isArray(rule) && !isStaticRules(rule)) {
+ return false;
+ } else if (typeof rule === 'function' && !isStyledComponent(rule)) {
+ // functions are allowed to be static if they're just being
+ // used to get the classname of a nested styled copmonent
+ return false;
+ }
+ }
+
+ if (attrs !== undefined) {
+ // eslint-disable-next-line guard-for-in, no-restricted-syntax
+ for (var key in attrs) {
+ var value = attrs[key];
+ if (typeof value === 'function') {
+ return false;
+ }
+ }
+ }
+
+ return true;
+};
+
+var isHRMEnabled = typeof module !== 'undefined' && module.hot && process.env.NODE_ENV !== 'production';
+
+/*
+ ComponentStyle is all the CSS-specific stuff, not
+ the React-specific stuff.
+ */
+var _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) {
+ var ComponentStyle = function () {
+ function ComponentStyle(rules, attrs, componentId) {
+ classCallCheck(this, ComponentStyle);
+
+ this.rules = rules;
+ this.isStatic = !isHRMEnabled && isStaticRules(rules, attrs);
+ this.componentId = componentId;
+ if (!StyleSheet.instance.hasInjectedComponent(this.componentId)) {
+ var placeholder = process.env.NODE_ENV !== 'production' ? '.' + componentId + ' {}' : '';
+ StyleSheet.instance.deferredInject(componentId, true, placeholder);
+ }
+ }
+
+ /*
+ * Flattens a rule set into valid CSS
+ * Hashes it, wraps the whole chunk in a .hash1234 {}
+ * Returns the hash to be injected on render()
+ * */
+
+
+ ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
+ var isStatic = this.isStatic,
+ lastClassName = this.lastClassName;
+
+ if (isStatic && lastClassName !== undefined) {
+ return lastClassName;
+ }
+
+ var flatCSS = flatten(this.rules, executionContext);
+ var hash = doHash(this.componentId + flatCSS.join(''));
+
+ var existingName = styleSheet.getName(hash);
+ if (existingName !== undefined) {
+ if (styleSheet.stylesCacheable) {
+ this.lastClassName = existingName;
+ }
+ return existingName;
+ }
+
+ var name = nameGenerator(hash);
+ if (styleSheet.stylesCacheable) {
+ this.lastClassName = existingName;
+ }
+ if (styleSheet.alreadyInjected(hash, name)) {
+ return name;
+ }
+
+ var css = '\n' + stringifyRules(flatCSS, '.' + name);
+ // NOTE: this can only be set when we inject the class-name.
+ // For some reason, presumably due to how css is stringifyRules behaves in
+ // differently between client and server, styles break.
+ styleSheet.inject(this.componentId, true, css, hash, name);
+ return name;
+ };
+
+ ComponentStyle.generateName = function generateName(str) {
+ return nameGenerator(doHash(str));
+ };
+
+ return ComponentStyle;
+ }();
+
+ return ComponentStyle;
+});
+
+//
+// Thanks to ReactDOMFactories for this handy list!
+
+var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',
+
+// SVG
+'circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
+
+//
+
+var _styled = (function (styledComponent, constructWithOptions) {
+ var styled = function styled(tag) {
+ return constructWithOptions(styledComponent, tag);
+ };
+
+ // Shorthands for all valid HTML Elements
+ domElements.forEach(function (domElement) {
+ styled[domElement] = styled(domElement);
+ });
+
+ return styled;
+});
+
+//
+var replaceWhitespace = function replaceWhitespace(str) {
+ return str.replace(/\s|\\n/g, '');
+};
+
+var _keyframes = (function (nameGenerator, stringifyRules, css) {
+ return function (strings) {
+ for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ interpolations[_key - 1] = arguments[_key];
+ }
+
+ var rules = css.apply(undefined, [strings].concat(interpolations));
+ var hash = doHash(replaceWhitespace(JSON.stringify(rules)));
+
+ var existingName = StyleSheet.instance.getName(hash);
+ if (existingName) return existingName;
+
+ var name = nameGenerator(hash);
+ if (StyleSheet.instance.alreadyInjected(hash, name)) return name;
+
+ var generatedCSS = stringifyRules(rules, name, '@keyframes');
+ StyleSheet.instance.inject('sc-keyframes-' + name, true, generatedCSS, hash, name);
+ return name;
+ };
+});
+
+//
+var _injectGlobal = (function (stringifyRules, css) {
+ var injectGlobal = function injectGlobal(strings) {
+ for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ interpolations[_key - 1] = arguments[_key];
+ }
+
+ var rules = css.apply(undefined, [strings].concat(interpolations));
+ var hash = doHash(JSON.stringify(rules));
+
+ var componentId = 'sc-global-' + hash;
+ if (StyleSheet.instance.hasInjectedComponent(componentId)) return;
+
+ StyleSheet.instance.inject(componentId, false, stringifyRules(rules));
+ };
+
+ return injectGlobal;
+});
+
+//
+
+
+var _constructWithOptions = (function (css) {
+ var constructWithOptions = function constructWithOptions(componentConstructor, tag) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+ if (process.env.NODE_ENV !== 'production' && typeof tag !== 'string' && typeof tag !== 'function') {
+ // $FlowInvalidInputTest
+ throw new Error('Cannot create styled-component for component: ' + tag);
+ }
+
+ /* This is callable directly as a template function */
+ var templateFunction = function templateFunction(strings) {
+ for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ interpolations[_key - 1] = arguments[_key];
+ }
+
+ return componentConstructor(tag, options, css.apply(undefined, [strings].concat(interpolations)));
+ };
+
+ /* If config methods are called, wrap up a new template function and merge options */
+ templateFunction.withConfig = function (config) {
+ return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
+ };
+ templateFunction.attrs = function (attrs) {
+ return constructWithOptions(componentConstructor, tag, _extends({}, options, {
+ attrs: _extends({}, options.attrs || {}, attrs)
+ }));
+ };
+
+ return templateFunction;
+ };
+
+ return constructWithOptions;
+});
+
+//
+/* globals ReactClass */
+
+var wrapWithTheme = function wrapWithTheme(Component$$1) {
+ var _WithTheme$contextTyp;
+
+ var componentName = Component$$1.displayName || Component$$1.name || 'Component';
+
+ var shouldSetInnerRef = isStyledComponent(Component$$1) ||
+ // NOTE: We can't pass a ref to a stateless functional component
+ typeof Component$$1 === 'function' && !(Component$$1.prototype && 'isReactComponent' in Component$$1.prototype);
+
+ var WithTheme = function (_React$Component) {
+ inherits(WithTheme, _React$Component);
+
+ function WithTheme() {
+ var _temp, _this, _ret;
+
+ classCallCheck(this, WithTheme);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {}, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);
+ }
+
+ // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping
+
+
+ WithTheme.prototype.componentWillMount = function componentWillMount() {
+ var _this2 = this;
+
+ var defaultProps = this.constructor.defaultProps;
+
+ var styledContext = this.context[CHANNEL_NEXT];
+ var themeProp = determineTheme(this.props, undefined, defaultProps);
+ if (styledContext === undefined && themeProp === undefined && process.env.NODE_ENV !== 'production') {
+ // eslint-disable-next-line no-console
+ console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps');
+ } else if (styledContext === undefined && themeProp !== undefined) {
+ this.setState({ theme: themeProp });
+ } else {
+ var subscribe = styledContext.subscribe;
+
+ this.unsubscribeId = subscribe(function (nextTheme) {
+ var theme = determineTheme(_this2.props, nextTheme, defaultProps);
+ _this2.setState({ theme: theme });
+ });
+ }
+ };
+
+ WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ var defaultProps = this.constructor.defaultProps;
+
+ this.setState(function (oldState) {
+ var theme = determineTheme(nextProps, oldState.theme, defaultProps);
+
+ return { theme: theme };
+ });
+ };
+
+ WithTheme.prototype.componentWillUnmount = function componentWillUnmount() {
+ if (this.unsubscribeId !== -1) {
+ this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);
+ }
+ };
+
+ WithTheme.prototype.render = function render() {
+ // eslint-disable-next-line react/prop-types
+ var innerRef = this.props.innerRef;
+ var theme = this.state.theme;
+
+
+ return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(Component$$1, _extends({
+ theme: theme
+ }, this.props, {
+ innerRef: shouldSetInnerRef ? innerRef : undefined,
+ ref: shouldSetInnerRef ? undefined : innerRef
+ }));
+ };
+
+ return WithTheme;
+ }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
+
+ WithTheme.displayName = 'WithTheme(' + componentName + ')';
+ WithTheme.styledComponentId = 'withTheme';
+ WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _WithTheme$contextTyp[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _WithTheme$contextTyp);
+
+
+ return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(WithTheme, Component$$1);
+};
+
+//
+
+/* Import singletons */
+/* Import singleton constructors */
+/* Import components */
+/* Import Higher Order Components */
+/* Instantiate singletons */
+var ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules);
+var constructWithOptions = _constructWithOptions(css);
+var StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions);
+
+/* Instantiate exported singletons */
+var keyframes = _keyframes(generateAlphabeticName, stringifyRules, css);
+var injectGlobal = _injectGlobal(stringifyRules, css);
+var styled = _styled(StyledComponent, constructWithOptions);
+
+/* harmony default export */ __webpack_exports__["default"] = (styled);
+
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0), __webpack_require__(99)(module)))
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var colors = exports.colors = {
+ primaryText: '#4A4A4A',
+ bodyColor: '#E2E7EA',
+ secondaryText: '#787878',
+ borderGray: '#D1D9DD',
+ green: '#8BC34A',
+ red: '#F44336',
+ white: '#FFFFFF',
+ cardWhite: '#FAFAFA',
+ lightGray: '#EEEEEE'
+};
+
+var fonts = exports.fonts = {
+ latoRegular: 'latoregular',
+ latoBold: 'latobold',
+ arial: 'Arial'
+};
+
+var shadows = exports.shadows = {
+ shadow01: '0 3px 6px 0 rgba(0,0,0,0.16)',
+ shadow02: '0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3)'
+};
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(4);
+
+var DOMProperty = __webpack_require__(17);
+var ReactDOMComponentFlags = __webpack_require__(70);
+
+var invariant = __webpack_require__(1);
+
+var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
+var Flags = ReactDOMComponentFlags;
+
+var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
+
+/**
+ * Check if a given node should be cached.
+ */
+function shouldPrecacheNode(node, nodeID) {
+ return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
+}
+
+/**
+ * Drill down (through composites and empty components) until we get a host or
+ * host text component.
+ *
+ * This is pretty polymorphic but unavoidable with the current structure we have
+ * for `_renderedChildren`.
+ */
+function getRenderedHostOrTextFromComponent(component) {
+ var rendered;
+ while (rendered = component._renderedComponent) {
+ component = rendered;
+ }
+ return component;
+}
+
+/**
+ * Populate `_hostNode` on the rendered host/text component with the given
+ * DOM node. The passed `inst` can be a composite.
+ */
+function precacheNode(inst, node) {
+ var hostInst = getRenderedHostOrTextFromComponent(inst);
+ hostInst._hostNode = node;
+ node[internalInstanceKey] = hostInst;
+}
+
+function uncacheNode(inst) {
+ var node = inst._hostNode;
+ if (node) {
+ delete node[internalInstanceKey];
+ inst._hostNode = null;
+ }
+}
+
+/**
+ * Populate `_hostNode` on each child of `inst`, assuming that the children
+ * match up with the DOM (element) children of `node`.
+ *
+ * We cache entire levels at once to avoid an n^2 problem where we access the
+ * children of a node sequentially and have to walk from the start to our target
+ * node every time.
+ *
+ * Since we update `_renderedChildren` and the actual DOM at (slightly)
+ * different times, we could race here and see a newer `_renderedChildren` than
+ * the DOM nodes we see. To avoid this, ReactMultiChild calls
+ * `prepareToManageChildren` before we change `_renderedChildren`, at which
+ * time the container's child nodes are always cached (until it unmounts).
+ */
+function precacheChildNodes(inst, node) {
+ if (inst._flags & Flags.hasCachedChildNodes) {
+ return;
+ }
+ var children = inst._renderedChildren;
+ var childNode = node.firstChild;
+ outer: for (var name in children) {
+ if (!children.hasOwnProperty(name)) {
+ continue;
+ }
+ var childInst = children[name];
+ var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
+ if (childID === 0) {
+ // We're currently unmounting this child in ReactMultiChild; skip it.
+ continue;
+ }
+ // We assume the child nodes are in the same order as the child instances.
+ for (; childNode !== null; childNode = childNode.nextSibling) {
+ if (shouldPrecacheNode(childNode, childID)) {
+ precacheNode(childInst, childNode);
+ continue outer;
+ }
+ }
+ // We reached the end of the DOM children without finding an ID match.
+ true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
+ }
+ inst._flags |= Flags.hasCachedChildNodes;
+}
+
+/**
+ * Given a DOM node, return the closest ReactDOMComponent or
+ * ReactDOMTextComponent instance ancestor.
+ */
+function getClosestInstanceFromNode(node) {
+ if (node[internalInstanceKey]) {
+ return node[internalInstanceKey];
+ }
+
+ // Walk up the tree until we find an ancestor whose instance we have cached.
+ var parents = [];
+ while (!node[internalInstanceKey]) {
+ parents.push(node);
+ if (node.parentNode) {
+ node = node.parentNode;
+ } else {
+ // Top of the tree. This node must not be part of a React tree (or is
+ // unmounted, potentially).
+ return null;
+ }
+ }
+
+ var closest;
+ var inst;
+ for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
+ closest = inst;
+ if (parents.length) {
+ precacheChildNodes(inst, node);
+ }
+ }
+
+ return closest;
+}
+
+/**
+ * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
+ * instance, or null if the node was not rendered by this React.
+ */
+function getInstanceFromNode(node) {
+ var inst = getClosestInstanceFromNode(node);
+ if (inst != null && inst._hostNode === node) {
+ return inst;
+ } else {
+ return null;
+ }
+}
+
+/**
+ * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
+ * DOM node.
+ */
+function getNodeFromInstance(inst) {
+ // Without this first invariant, passing a non-DOM-component triggers the next
+ // invariant for a missing parent, which is super confusing.
+ !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
+
+ if (inst._hostNode) {
+ return inst._hostNode;
+ }
+
+ // Walk up the tree until we find an ancestor whose DOM node we have cached.
+ var parents = [];
+ while (!inst._hostNode) {
+ parents.push(inst);
+ !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
+ inst = inst._hostParent;
+ }
+
+ // Now parents contains each ancestor that does *not* have a cached native
+ // node, and `inst` is the deepest ancestor that does.
+ for (; parents.length; inst = parents.pop()) {
+ precacheChildNodes(inst, inst._hostNode);
+ }
+
+ return inst._hostNode;
+}
+
+var ReactDOMComponentTree = {
+ getClosestInstanceFromNode: getClosestInstanceFromNode,
+ getInstanceFromNode: getInstanceFromNode,
+ getNodeFromInstance: getNodeFromInstance,
+ precacheChildNodes: precacheChildNodes,
+ precacheNode: precacheNode,
+ uncacheNode: uncacheNode
+};
+
+module.exports = ReactDOMComponentTree;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+
+/**
+ * Simple, lightweight module assisting with the detection and context of
+ * Worker. Helps avoid circular dependencies and allows code to reason about
+ * whether or not they are in a Worker, even if they never include the main
+ * `ReactWorker` dependency.
+ */
+var ExecutionEnvironment = {
+
+ canUseDOM: canUseDOM,
+
+ canUseWorkers: typeof Worker !== 'undefined',
+
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
+
+ canUseViewport: canUseDOM && !!window.screen,
+
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
+
+};
+
+module.exports = ExecutionEnvironment;
+
+/***/ }),
+/* 10 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(212);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(96);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(217);
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["b"]; });
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; });
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__["a"]; });
+/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; });
+
+
+
+
+
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(22);
+
+var ReactCurrentOwner = __webpack_require__(14);
+
+var invariant = __webpack_require__(1);
+var warning = __webpack_require__(3);
+
+function isNative(fn) {
+ // Based on isNative() from Lodash
+ var funcToString = Function.prototype.toString;
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var reIsNative = RegExp('^' + funcToString
+ // Take an example native function source for comparison
+ .call(hasOwnProperty
+ // Strip regex characters so we can use it for regex
+ ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
+ // Remove hasOwnProperty from the template to make it generic
+ ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
+ try {
+ var source = funcToString.call(fn);
+ return reIsNative.test(source);
+ } catch (err) {
+ return false;
+ }
+}
+
+var canUseCollections =
+// Array.from
+typeof Array.from === 'function' &&
+// Map
+typeof Map === 'function' && isNative(Map) &&
+// Map.prototype.keys
+Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
+// Set
+typeof Set === 'function' && isNative(Set) &&
+// Set.prototype.keys
+Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
+
+var setItem;
+var getItem;
+var removeItem;
+var getItemIDs;
+var addRoot;
+var removeRoot;
+var getRootIDs;
+
+if (canUseCollections) {
+ var itemMap = new Map();
+ var rootIDSet = new Set();
+
+ setItem = function (id, item) {
+ itemMap.set(id, item);
+ };
+ getItem = function (id) {
+ return itemMap.get(id);
+ };
+ removeItem = function (id) {
+ itemMap['delete'](id);
+ };
+ getItemIDs = function () {
+ return Array.from(itemMap.keys());
+ };
+
+ addRoot = function (id) {
+ rootIDSet.add(id);
+ };
+ removeRoot = function (id) {
+ rootIDSet['delete'](id);
+ };
+ getRootIDs = function () {
+ return Array.from(rootIDSet.keys());
+ };
+} else {
+ var itemByKey = {};
+ var rootByKey = {};
+
+ // Use non-numeric keys to prevent V8 performance issues:
+ // https://github.com/facebook/react/pull/7232
+ var getKeyFromID = function (id) {
+ return '.' + id;
+ };
+ var getIDFromKey = function (key) {
+ return parseInt(key.substr(1), 10);
+ };
+
+ setItem = function (id, item) {
+ var key = getKeyFromID(id);
+ itemByKey[key] = item;
+ };
+ getItem = function (id) {
+ var key = getKeyFromID(id);
+ return itemByKey[key];
+ };
+ removeItem = function (id) {
+ var key = getKeyFromID(id);
+ delete itemByKey[key];
+ };
+ getItemIDs = function () {
+ return Object.keys(itemByKey).map(getIDFromKey);
+ };
+
+ addRoot = function (id) {
+ var key = getKeyFromID(id);
+ rootByKey[key] = true;
+ };
+ removeRoot = function (id) {
+ var key = getKeyFromID(id);
+ delete rootByKey[key];
+ };
+ getRootIDs = function () {
+ return Object.keys(rootByKey).map(getIDFromKey);
+ };
+}
+
+var unmountedIDs = [];
+
+function purgeDeep(id) {
+ var item = getItem(id);
+ if (item) {
+ var childIDs = item.childIDs;
+
+ removeItem(id);
+ childIDs.forEach(purgeDeep);
+ }
+}
+
+function describeComponentFrame(name, source, ownerName) {
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
+}
+
+function getDisplayName(element) {
+ if (element == null) {
+ return '#empty';
+ } else if (typeof element === 'string' || typeof element === 'number') {
+ return '#text';
+ } else if (typeof element.type === 'string') {
+ return element.type;
+ } else {
+ return element.type.displayName || element.type.name || 'Unknown';
+ }
+}
+
+function describeID(id) {
+ var name = ReactComponentTreeHook.getDisplayName(id);
+ var element = ReactComponentTreeHook.getElement(id);
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
+ var ownerName;
+ if (ownerID) {
+ ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
+ }
+ process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
+ return describeComponentFrame(name, element && element._source, ownerName);
+}
+
+var ReactComponentTreeHook = {
+ onSetChildren: function (id, nextChildIDs) {
+ var item = getItem(id);
+ !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
+ item.childIDs = nextChildIDs;
+
+ for (var i = 0; i < nextChildIDs.length; i++) {
+ var nextChildID = nextChildIDs[i];
+ var nextChild = getItem(nextChildID);
+ !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
+ !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
+ !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
+ if (nextChild.parentID == null) {
+ nextChild.parentID = id;
+ // TODO: This shouldn't be necessary but mounting a new root during in
+ // componentWillMount currently causes not-yet-mounted components to
+ // be purged from our tree data so their parent id is missing.
+ }
+ !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
+ }
+ },
+ onBeforeMountComponent: function (id, element, parentID) {
+ var item = {
+ element: element,
+ parentID: parentID,
+ text: null,
+ childIDs: [],
+ isMounted: false,
+ updateCount: 0
+ };
+ setItem(id, item);
+ },
+ onBeforeUpdateComponent: function (id, element) {
+ var item = getItem(id);
+ if (!item || !item.isMounted) {
+ // We may end up here as a result of setState() in componentWillUnmount().
+ // In this case, ignore the element.
+ return;
+ }
+ item.element = element;
+ },
+ onMountComponent: function (id) {
+ var item = getItem(id);
+ !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
+ item.isMounted = true;
+ var isRoot = item.parentID === 0;
+ if (isRoot) {
+ addRoot(id);
+ }
+ },
+ onUpdateComponent: function (id) {
+ var item = getItem(id);
+ if (!item || !item.isMounted) {
+ // We may end up here as a result of setState() in componentWillUnmount().
+ // In this case, ignore the element.
+ return;
+ }
+ item.updateCount++;
+ },
+ onUnmountComponent: function (id) {
+ var item = getItem(id);
+ if (item) {
+ // We need to check if it exists.
+ // `item` might not exist if it is inside an error boundary, and a sibling
+ // error boundary child threw while mounting. Then this instance never
+ // got a chance to mount, but it still gets an unmounting event during
+ // the error boundary cleanup.
+ item.isMounted = false;
+ var isRoot = item.parentID === 0;
+ if (isRoot) {
+ removeRoot(id);
+ }
+ }
+ unmountedIDs.push(id);
+ },
+ purgeUnmountedComponents: function () {
+ if (ReactComponentTreeHook._preventPurging) {
+ // Should only be used for testing.
+ return;
+ }
+
+ for (var i = 0; i < unmountedIDs.length; i++) {
+ var id = unmountedIDs[i];
+ purgeDeep(id);
+ }
+ unmountedIDs.length = 0;
+ },
+ isMounted: function (id) {
+ var item = getItem(id);
+ return item ? item.isMounted : false;
+ },
+ getCurrentStackAddendum: function (topElement) {
+ var info = '';
+ if (topElement) {
+ var name = getDisplayName(topElement);
+ var owner = topElement._owner;
+ info += describeComponentFrame(name, topElement._source, owner && owner.getName());
+ }
+
+ var currentOwner = ReactCurrentOwner.current;
+ var id = currentOwner && currentOwner._debugID;
+
+ info += ReactComponentTreeHook.getStackAddendumByID(id);
+ return info;
+ },
+ getStackAddendumByID: function (id) {
+ var info = '';
+ while (id) {
+ info += describeID(id);
+ id = ReactComponentTreeHook.getParentID(id);
+ }
+ return info;
+ },
+ getChildIDs: function (id) {
+ var item = getItem(id);
+ return item ? item.childIDs : [];
+ },
+ getDisplayName: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (!element) {
+ return null;
+ }
+ return getDisplayName(element);
+ },
+ getElement: function (id) {
+ var item = getItem(id);
+ return item ? item.element : null;
+ },
+ getOwnerID: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (!element || !element._owner) {
+ return null;
+ }
+ return element._owner._debugID;
+ },
+ getParentID: function (id) {
+ var item = getItem(id);
+ return item ? item.parentID : null;
+ },
+ getSource: function (id) {
+ var item = getItem(id);
+ var element = item ? item.element : null;
+ var source = element != null ? element._source : null;
+ return source;
+ },
+ getText: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (typeof element === 'string') {
+ return element;
+ } else if (typeof element === 'number') {
+ return '' + element;
+ } else {
+ return null;
+ }
+ },
+ getUpdateCount: function (id) {
+ var item = getItem(id);
+ return item ? item.updateCount : 0;
+ },
+
+
+ getRootIDs: getRootIDs,
+ getRegisteredIDs: getItemIDs,
+
+ pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
+ if (typeof console.reactStack !== 'function') {
+ return;
+ }
+
+ var stack = [];
+ var currentOwner = ReactCurrentOwner.current;
+ var id = currentOwner && currentOwner._debugID;
+
+ try {
+ if (isCreatingElement) {
+ stack.push({
+ name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
+ fileName: currentSource ? currentSource.fileName : null,
+ lineNumber: currentSource ? currentSource.lineNumber : null
+ });
+ }
+
+ while (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ var parentID = ReactComponentTreeHook.getParentID(id);
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
+ var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
+ var source = element && element._source;
+ stack.push({
+ name: ownerName,
+ fileName: source ? source.fileName : null,
+ lineNumber: source ? source.lineNumber : null
+ });
+ id = parentID;
+ }
+ } catch (err) {
+ // Internal state is messed up.
+ // Stop building the stack (it's just a nice to have).
+ }
+
+ console.reactStack(stack);
+ },
+ popNonStandardWarningStack: function () {
+ if (typeof console.reactStackEnd !== 'function') {
+ return;
+ }
+ console.reactStackEnd();
+ }
+};
+
+module.exports = ReactComponentTreeHook;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+function makeEmptyFunction(arg) {
+ return function () {
+ return arg;
+ };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+ return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+ return arg;
+};
+
+module.exports = emptyFunction;
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2016-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+
+
+// Trust the developer to only use ReactInstrumentation with a __DEV__ check
+
+var debugTool = null;
+
+if (process.env.NODE_ENV !== 'production') {
+ var ReactDebugTool = __webpack_require__(137);
+ debugTool = ReactDebugTool;
+}
+
+module.exports = { debugTool: debugTool };
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+
+
+/**
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
+ */
+var ReactCurrentOwner = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+module.exports = ReactCurrentOwner;
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(4),
+ _assign = __webpack_require__(8);
+
+var CallbackQueue = __webpack_require__(74);
+var PooledClass = __webpack_require__(20);
+var ReactFeatureFlags = __webpack_require__(75);
+var ReactReconciler = __webpack_require__(23);
+var Transaction = __webpack_require__(34);
+
+var invariant = __webpack_require__(1);
+
+var dirtyComponents = [];
+var updateBatchNumber = 0;
+var asapCallbackQueue = CallbackQueue.getPooled();
+var asapEnqueued = false;
+
+var batchingStrategy = null;
+
+function ensureInjected() {
+ !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
+}
+
+var NESTED_UPDATES = {
+ initialize: function () {
+ this.dirtyComponentsLength = dirtyComponents.length;
+ },
+ close: function () {
+ if (this.dirtyComponentsLength !== dirtyComponents.length) {
+ // Additional updates were enqueued by componentDidUpdate handlers or
+ // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
+ // these new updates so that if A's componentDidUpdate calls setState on
+ // B, B will update before the callback A's updater provided when calling
+ // setState.
+ dirtyComponents.splice(0, this.dirtyComponentsLength);
+ flushBatchedUpdates();
+ } else {
+ dirtyComponents.length = 0;
+ }
+ }
+};
+
+var UPDATE_QUEUEING = {
+ initialize: function () {
+ this.callbackQueue.reset();
+ },
+ close: function () {
+ this.callbackQueue.notifyAll();
+ }
+};
+
+var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
+
+function ReactUpdatesFlushTransaction() {
+ this.reinitializeTransaction();
+ this.dirtyComponentsLength = null;
+ this.callbackQueue = CallbackQueue.getPooled();
+ this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
+ /* useCreateElement */true);
+}
+
+_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
+ getTransactionWrappers: function () {
+ return TRANSACTION_WRAPPERS;
+ },
+
+ destructor: function () {
+ this.dirtyComponentsLength = null;
+ CallbackQueue.release(this.callbackQueue);
+ this.callbackQueue = null;
+ ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
+ this.reconcileTransaction = null;
+ },
+
+ perform: function (method, scope, a) {
+ // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
+ // with this transaction's wrappers around it.
+ return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
+ }
+});
+
+PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
+
+function batchedUpdates(callback, a, b, c, d, e) {
+ ensureInjected();
+ return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
+}
+
+/**
+ * Array comparator for ReactComponents by mount ordering.
+ *
+ * @param {ReactComponent} c1 first component you're comparing
+ * @param {ReactComponent} c2 second component you're comparing
+ * @return {number} Return value usable by Array.prototype.sort().
+ */
+function mountOrderComparator(c1, c2) {
+ return c1._mountOrder - c2._mountOrder;
+}
+
+function runBatchedUpdates(transaction) {
+ var len = transaction.dirtyComponentsLength;
+ !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
+
+ // Since reconciling a component higher in the owner hierarchy usually (not
+ // always -- see shouldComponentUpdate()) will reconcile children, reconcile
+ // them before their children by sorting the array.
+ dirtyComponents.sort(mountOrderComparator);
+
+ // Any updates enqueued while reconciling must be performed after this entire
+ // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
+ // C, B could update twice in a single batch if C's render enqueues an update
+ // to B (since B would have already updated, we should skip it, and the only
+ // way we can know to do so is by checking the batch counter).
+ updateBatchNumber++;
+
+ for (var i = 0; i < len; i++) {
+ // If a component is unmounted before pending changes apply, it will still
+ // be here, but we assume that it has cleared its _pendingCallbacks and
+ // that performUpdateIfNecessary is a noop.
+ var component = dirtyComponents[i];
+
+ // If performUpdateIfNecessary happens to enqueue any new updates, we
+ // shouldn't execute the callbacks until the next render happens, so
+ // stash the callbacks first
+ var callbacks = component._pendingCallbacks;
+ component._pendingCallbacks = null;
+
+ var markerName;
+ if (ReactFeatureFlags.logTopLevelRenders) {
+ var namedComponent = component;
+ // Duck type TopLevelWrapper. This is probably always true.
+ if (component._currentElement.type.isReactTopLevelWrapper) {
+ namedComponent = component._renderedComponent;
+ }
+ markerName = 'React update: ' + namedComponent.getName();
+ console.time(markerName);
+ }
+
+ ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
+
+ if (markerName) {
+ console.timeEnd(markerName);
+ }
+
+ if (callbacks) {
+ for (var j = 0; j < callbacks.length; j++) {
+ transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
+ }
+ }
+ }
+}
+
+var flushBatchedUpdates = function () {
+ // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
+ // array and perform any updates enqueued by mount-ready handlers (i.e.,
+ // componentDidUpdate) but we need to check here too in order to catch
+ // updates enqueued by setState callbacks and asap calls.
+ while (dirtyComponents.length || asapEnqueued) {
+ if (dirtyComponents.length) {
+ var transaction = ReactUpdatesFlushTransaction.getPooled();
+ transaction.perform(runBatchedUpdates, null, transaction);
+ ReactUpdatesFlushTransaction.release(transaction);
+ }
+
+ if (asapEnqueued) {
+ asapEnqueued = false;
+ var queue = asapCallbackQueue;
+ asapCallbackQueue = CallbackQueue.getPooled();
+ queue.notifyAll();
+ CallbackQueue.release(queue);
+ }
+ }
+};
+
+/**
+ * Mark a component as needing a rerender, adding an optional callback to a
+ * list of functions which will be executed once the rerender occurs.
+ */
+function enqueueUpdate(component) {
+ ensureInjected();
+
+ // Various parts of our code (such as ReactCompositeComponent's
+ // _renderValidatedComponent) assume that calls to render aren't nested;
+ // verify that that's the case. (This is called by each top-level update
+ // function, like setState, forceUpdate, etc.; creation and
+ // destruction of top-level components is guarded in ReactMount.)
+
+ if (!batchingStrategy.isBatchingUpdates) {
+ batchingStrategy.batchedUpdates(enqueueUpdate, component);
+ return;
+ }
+
+ dirtyComponents.push(component);
+ if (component._updateBatchNumber == null) {
+ component._updateBatchNumber = updateBatchNumber + 1;
+ }
+}
+
+/**
+ * Enqueue a callback to be run at the end of the current batching cycle. Throws
+ * if no updates are currently being performed.
+ */
+function asap(callback, context) {
+ invariant(batchingStrategy.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context where" + 'updates are not being batched.');
+ asapCallbackQueue.enqueue(callback, context);
+ asapEnqueued = true;
+}
+
+var ReactUpdatesInjection = {
+ injectReconcileTransaction: function (ReconcileTransaction) {
+ !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
+ ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
+ },
+
+ injectBatchingStrategy: function (_batchingStrategy) {
+ !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
+ !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
+ !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
+ batchingStrategy = _batchingStrategy;
+ }
+};
+
+var ReactUpdates = {
+ /**
+ * React references `ReactReconcileTransaction` using this property in order
+ * to allow dependency injection.
+ *
+ * @internal
+ */
+ ReactReconcileTransaction: null,
+
+ batchedUpdates: batchedUpdates,
+ enqueueUpdate: enqueueUpdate,
+ flushBatchedUpdates: flushBatchedUpdates,
+ injection: ReactUpdatesInjection,
+ asap: asap
+};
+
+module.exports = ReactUpdates;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var _assign = __webpack_require__(8);
+
+var PooledClass = __webpack_require__(20);
+
+var emptyFunction = __webpack_require__(12);
+var warning = __webpack_require__(3);
+
+var didWarnForAddedNewProperty = false;
+var isProxySupported = typeof Proxy === 'function';
+
+var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
+
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+var EventInterface = {
+ type: null,
+ target: null,
+ // currentTarget is set when dispatching; no use in copying it here
+ currentTarget: emptyFunction.thatReturnsNull,
+ eventPhase: null,
+ bubbles: null,
+ cancelable: null,
+ timeStamp: function (event) {
+ return event.timeStamp || Date.now();
+ },
+ defaultPrevented: null,
+ isTrusted: null
+};
+
+/**
+ * Synthetic events are dispatched by event plugins, typically in response to a
+ * top-level event delegation handler.
+ *
+ * These systems should generally use pooling to reduce the frequency of garbage
+ * collection. The system should check `isPersistent` to determine whether the
+ * event should be released into the pool after being dispatched. Users that
+ * need a persisted event should invoke `persist`.
+ *
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
+ * DOM interface; custom application-specific events can also subclass this.
+ *
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
+ * @param {*} targetInst Marker identifying the event target.
+ * @param {object} nativeEvent Native browser event.
+ * @param {DOMEventTarget} nativeEventTarget Target node.
+ */
+function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
+ if (process.env.NODE_ENV !== 'production') {
+ // these have a getter/setter for warnings
+ delete this.nativeEvent;
+ delete this.preventDefault;
+ delete this.stopPropagation;
+ }
+
+ this.dispatchConfig = dispatchConfig;
+ this._targetInst = targetInst;
+ this.nativeEvent = nativeEvent;
+
+ var Interface = this.constructor.Interface;
+ for (var propName in Interface) {
+ if (!Interface.hasOwnProperty(propName)) {
+ continue;
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ delete this[propName]; // this has a getter/setter for warnings
+ }
+ var normalize = Interface[propName];
+ if (normalize) {
+ this[propName] = normalize(nativeEvent);
+ } else {
+ if (propName === 'target') {
+ this.target = nativeEventTarget;
+ } else {
+ this[propName] = nativeEvent[propName];
+ }
+ }
+ }
+
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
+ if (defaultPrevented) {
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
+ } else {
+ this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
+ }
+ this.isPropagationStopped = emptyFunction.thatReturnsFalse;
+ return this;
+}
+
+_assign(SyntheticEvent.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ var event = this.nativeEvent;
+ if (!event) {
+ return;
+ }
+
+ if (event.preventDefault) {
+ event.preventDefault();
+ // eslint-disable-next-line valid-typeof
+ } else if (typeof event.returnValue !== 'unknown') {
+ event.returnValue = false;
+ }
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
+ },
+
+ stopPropagation: function () {
+ var event = this.nativeEvent;
+ if (!event) {
+ return;
+ }
+
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ // eslint-disable-next-line valid-typeof
+ } else if (typeof event.cancelBubble !== 'unknown') {
+ // The ChangeEventPlugin registers a "propertychange" event for
+ // IE. This event does not support bubbling or cancelling, and
+ // any references to cancelBubble throw "Member not found". A
+ // typeof check of "unknown" circumvents this issue (and is also
+ // IE specific).
+ event.cancelBubble = true;
+ }
+
+ this.isPropagationStopped = emptyFunction.thatReturnsTrue;
+ },
+
+ /**
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
+ * them back into the pool. This allows a way to hold onto a reference that
+ * won't be added back into the pool.
+ */
+ persist: function () {
+ this.isPersistent = emptyFunction.thatReturnsTrue;
+ },
+
+ /**
+ * Checks if this event should be released back into the pool.
+ *
+ * @return {boolean} True if this should not be released, false otherwise.
+ */
+ isPersistent: emptyFunction.thatReturnsFalse,
+
+ /**
+ * `PooledClass` looks for `destructor` on each instance it releases.
+ */
+ destructor: function () {
+ var Interface = this.constructor.Interface;
+ for (var propName in Interface) {
+ if (process.env.NODE_ENV !== 'production') {
+ Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
+ } else {
+ this[propName] = null;
+ }
+ }
+ for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
+ this[shouldBeReleasedProperties[i]] = null;
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
+ Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
+ Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
+ }
+ }
+});
+
+SyntheticEvent.Interface = EventInterface;
+
+/**
+ * Helper to reduce boilerplate when creating subclasses.
+ *
+ * @param {function} Class
+ * @param {?object} Interface
+ */
+SyntheticEvent.augmentClass = function (Class, Interface) {
+ var Super = this;
+
+ var E = function () {};
+ E.prototype = Super.prototype;
+ var prototype = new E();
+
+ _assign(prototype, Class.prototype);
+ Class.prototype = prototype;
+ Class.prototype.constructor = Class;
+
+ Class.Interface = _assign({}, Super.Interface, Interface);
+ Class.augmentClass = Super.augmentClass;
+
+ PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
+};
+
+/** Proxying after everything set on SyntheticEvent
+ * to resolve Proxy issue on some WebKit browsers
+ * in which some Event properties are set to undefined (GH#10010)
+ */
+if (process.env.NODE_ENV !== 'production') {
+ if (isProxySupported) {
+ /*eslint-disable no-func-assign */
+ SyntheticEvent = new Proxy(SyntheticEvent, {
+ construct: function (target, args) {
+ return this.apply(target, Object.create(target.prototype), args);
+ },
+ apply: function (constructor, that, args) {
+ return new Proxy(constructor.apply(that, args), {
+ set: function (target, prop, value) {
+ if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
+ process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
+ didWarnForAddedNewProperty = true;
+ }
+ target[prop] = value;
+ return true;
+ }
+ });
+ }
+ });
+ /*eslint-enable no-func-assign */
+ }
+}
+
+PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
+
+module.exports = SyntheticEvent;
+
+/**
+ * Helper to nullify syntheticEvent instance properties when destructing
+ *
+ * @param {object} SyntheticEvent
+ * @param {String} propName
+ * @return {object} defineProperty object
+ */
+function getPooledWarningPropertyDefinition(propName, getVal) {
+ var isFunction = typeof getVal === 'function';
+ return {
+ configurable: true,
+ set: set,
+ get: get
+ };
+
+ function set(val) {
+ var action = isFunction ? 'setting the method' : 'setting the property';
+ warn(action, 'This is effectively a no-op');
+ return val;
+ }
+
+ function get() {
+ var action = isFunction ? 'accessing the method' : 'accessing the property';
+ var result = isFunction ? 'This is a no-op function' : 'This is set to null';
+ warn(action, result);
+ return getVal;
+ }
+
+ function warn(action, result) {
+ var warningCondition = false;
+ process.env.NODE_ENV !== 'production' ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
+ }
+}
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(4);
+
+var invariant = __webpack_require__(1);
+
+function checkMask(value, bitmask) {
+ return (value & bitmask) === bitmask;
+}
+
+var DOMPropertyInjection = {
+ /**
+ * Mapping from normalized, camelcased property names to a configuration that
+ * specifies how the associated DOM property should be accessed or rendered.
+ */
+ MUST_USE_PROPERTY: 0x1,
+ HAS_BOOLEAN_VALUE: 0x4,
+ HAS_NUMERIC_VALUE: 0x8,
+ HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
+ HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
+
+ /**
+ * Inject some specialized knowledge about the DOM. This takes a config object
+ * with the following properties:
+ *
+ * isCustomAttribute: function that given an attribute name will return true
+ * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
+ * attributes where it's impossible to enumerate all of the possible
+ * attribute names,
+ *
+ * Properties: object mapping DOM property name to one of the
+ * DOMPropertyInjection constants or null. If your attribute isn't in here,
+ * it won't get written to the DOM.
+ *
+ * DOMAttributeNames: object mapping React attribute name to the DOM
+ * attribute name. Attribute names not specified use the **lowercase**
+ * normalized name.
+ *
+ * DOMAttributeNamespaces: object mapping React attribute name to the DOM
+ * attribute namespace URL. (Attribute names not specified use no namespace.)
+ *
+ * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
+ * Property names not specified use the normalized name.
+ *
+ * DOMMutationMethods: Properties that require special mutation methods. If
+ * `value` is undefined, the mutation method should unset the property.
+ *
+ * @param {object} domPropertyConfig the config as described above.
+ */
+ injectDOMPropertyConfig: function (domPropertyConfig) {
+ var Injection = DOMPropertyInjection;
+ var Properties = domPropertyConfig.Properties || {};
+ var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
+ var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
+ var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
+ var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
+
+ if (domPropertyConfig.isCustomAttribute) {
+ DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
+ }
+
+ for (var propName in Properties) {
+ !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
+
+ var lowerCased = propName.toLowerCase();
+ var propConfig = Properties[propName];
+
+ var propertyInfo = {
+ attributeName: lowerCased,
+ attributeNamespace: null,
+ propertyName: propName,
+ mutationMethod: null,
+
+ mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
+ hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
+ hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
+ hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
+ hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
+ };
+ !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
+
+ if (process.env.NODE_ENV !== 'production') {
+ DOMProperty.getPossibleStandardName[lowerCased] = propName;
+ }
+
+ if (DOMAttributeNames.hasOwnProperty(propName)) {
+ var attributeName = DOMAttributeNames[propName];
+ propertyInfo.attributeName = attributeName;
+ if (process.env.NODE_ENV !== 'production') {
+ DOMProperty.getPossibleStandardName[attributeName] = propName;
+ }
+ }
+
+ if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
+ propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
+ }
+
+ if (DOMPropertyNames.hasOwnProperty(propName)) {
+ propertyInfo.propertyName = DOMPropertyNames[propName];
+ }
+
+ if (DOMMutationMethods.hasOwnProperty(propName)) {
+ propertyInfo.mutationMethod = DOMMutationMethods[propName];
+ }
+
+ DOMProperty.properties[propName] = propertyInfo;
+ }
+ }
+};
+
+/* eslint-disable max-len */
+var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
+/* eslint-enable max-len */
+
+/**
+ * DOMProperty exports lookup objects that can be used like functions:
+ *
+ * > DOMProperty.isValid['id']
+ * true
+ * > DOMProperty.isValid['foobar']
+ * undefined
+ *
+ * Although this may be confusing, it performs better in general.
+ *
+ * @see http://jsperf.com/key-exists
+ * @see http://jsperf.com/key-missing
+ */
+var DOMProperty = {
+ ID_ATTRIBUTE_NAME: 'data-reactid',
+ ROOT_ATTRIBUTE_NAME: 'data-reactroot',
+
+ ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
+ ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
+
+ /**
+ * Map from property "standard name" to an object with info about how to set
+ * the property in the DOM. Each object contains:
+ *
+ * attributeName:
+ * Used when rendering markup or with `*Attribute()`.
+ * attributeNamespace
+ * propertyName:
+ * Used on DOM node instances. (This includes properties that mutate due to
+ * external factors.)
+ * mutationMethod:
+ * If non-null, used instead of the property or `setAttribute()` after
+ * initial render.
+ * mustUseProperty:
+ * Whether the property must be accessed and mutated as an object property.
+ * hasBooleanValue:
+ * Whether the property should be removed when set to a falsey value.
+ * hasNumericValue:
+ * Whether the property must be numeric or parse as a numeric and should be
+ * removed when set to a falsey value.
+ * hasPositiveNumericValue:
+ * Whether the property must be positive numeric or parse as a positive
+ * numeric and should be removed when set to a falsey value.
+ * hasOverloadedBooleanValue:
+ * Whether the property can be used as a flag as well as with a value.
+ * Removed when strictly equal to false; present without a value when
+ * strictly equal to true; present with a value otherwise.
+ */
+ properties: {},
+
+ /**
+ * Mapping from lowercase property names to the properly cased version, used
+ * to warn in the case of missing properties. Available only in __DEV__.
+ *
+ * autofocus is predefined, because adding it to the property whitelist
+ * causes unintended side effects.
+ *
+ * @type {Object}
+ */
+ getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null,
+
+ /**
+ * All of the isCustomAttribute() functions that have been injected.
+ */
+ _isCustomAttributeFunctions: [],
+
+ /**
+ * Checks whether a property name is a custom attribute.
+ * @method
+ */
+ isCustomAttribute: function (attributeName) {
+ for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
+ var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
+ if (isCustomAttributeFn(attributeName)) {
+ return true;
+ }
+ }
+ return false;
+ },
+
+ injection: DOMPropertyInjection
+};
+
+module.exports = DOMProperty;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+if (process.env.NODE_ENV !== 'production') {
+ var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+ Symbol.for &&
+ Symbol.for('react.element')) ||
+ 0xeac7;
+
+ var isValidElement = function(object) {
+ return typeof object === 'object' &&
+ object !== null &&
+ object.$$typeof === REACT_ELEMENT_TYPE;
+ };
+
+ // By explicitly using `prop-types` you are opting into new development behavior.
+ // http://fb.me/prop-types-in-prod
+ var throwOnDirectAccess = true;
+ module.exports = __webpack_require__(68)(isValidElement, throwOnDirectAccess);
+} else {
+ // By explicitly using `prop-types` you are opting into new production behavior.
+ // http://fb.me/prop-types-in-prod
+ module.exports = __webpack_require__(213)();
+}
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var _assign = __webpack_require__(39);
+
+var ReactCurrentOwner = __webpack_require__(14);
+
+var warning = __webpack_require__(3);
+var canDefineProperty = __webpack_require__(30);
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+var REACT_ELEMENT_TYPE = __webpack_require__(64);
+
+var RESERVED_PROPS = {
+ key: true,
+ ref: true,
+ __self: true,
+ __source: true
+};
+
+var specialPropKeyWarningShown, specialPropRefWarningShown;
+
+function hasValidRef(config) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (hasOwnProperty.call(config, 'ref')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.ref !== undefined;
+}
+
+function hasValidKey(config) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (hasOwnProperty.call(config, 'key')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.key !== undefined;
+}
+
+function defineKeyPropWarningGetter(props, displayName) {
+ var warnAboutAccessingKey = function () {
+ if (!specialPropKeyWarningShown) {
+ specialPropKeyWarningShown = true;
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
+ }
+ };
+ warnAboutAccessingKey.isReactWarning = true;
+ Object.defineProperty(props, 'key', {
+ get: warnAboutAccessingKey,
+ configurable: true
+ });
+}
+
+function defineRefPropWarningGetter(props, displayName) {
+ var warnAboutAccessingRef = function () {
+ if (!specialPropRefWarningShown) {
+ specialPropRefWarningShown = true;
+ process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
+ }
+ };
+ warnAboutAccessingRef.isReactWarning = true;
+ Object.defineProperty(props, 'ref', {
+ get: warnAboutAccessingRef,
+ configurable: true
+ });
+}
+
+/**
+ * Factory method to create a new React element. This no longer adheres to
+ * the class pattern, so do not use new to call it. Also, no instanceof check
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
+ * if something is a React Element.
+ *
+ * @param {*} type
+ * @param {*} key
+ * @param {string|object} ref
+ * @param {*} self A *temporary* helper to detect places where `this` is
+ * different from the `owner` when React.createElement is called, so that we
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
+ * functions, and as long as `this` and owner are the same, there will be no
+ * change in behavior.
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
+ * indicating filename, line number, and/or other information.
+ * @param {*} owner
+ * @param {*} props
+ * @internal
+ */
+var ReactElement = function (type, key, ref, self, source, owner, props) {
+ var element = {
+ // This tag allow us to uniquely identify this as a React Element
+ $$typeof: REACT_ELEMENT_TYPE,
+
+ // Built-in properties that belong on the element
+ type: type,
+ key: key,
+ ref: ref,
+ props: props,
+
+ // Record the component responsible for creating this element.
+ _owner: owner
+ };
+
+ if (process.env.NODE_ENV !== 'production') {
+ // The validation flag is currently mutative. We put it on
+ // an external backing store so that we can freeze the whole object.
+ // This can be replaced with a WeakMap once they are implemented in
+ // commonly used development environments.
+ element._store = {};
+
+ // To make comparing ReactElements easier for testing purposes, we make
+ // the validation flag non-enumerable (where possible, which should
+ // include every environment we run tests in), so the test framework
+ // ignores it.
+ if (canDefineProperty) {
+ Object.defineProperty(element._store, 'validated', {
+ configurable: false,
+ enumerable: false,
+ writable: true,
+ value: false
+ });
+ // self and source are DEV only properties.
+ Object.defineProperty(element, '_self', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: self
+ });
+ // Two elements created in two different places should be considered
+ // equal for testing purposes and therefore we hide it from enumeration.
+ Object.defineProperty(element, '_source', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: source
+ });
+ } else {
+ element._store.validated = false;
+ element._self = self;
+ element._source = source;
+ }
+ if (Object.freeze) {
+ Object.freeze(element.props);
+ Object.freeze(element);
+ }
+ }
+
+ return element;
+};
+
+/**
+ * Create and return a new ReactElement of the given type.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
+ */
+ReactElement.createElement = function (type, config, children) {
+ var propName;
+
+ // Reserved names are extracted
+ var props = {};
+
+ var key = null;
+ var ref = null;
+ var self = null;
+ var source = null;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ ref = config.ref;
+ }
+ if (hasValidKey(config)) {
+ key = '' + config.key;
+ }
+
+ self = config.__self === undefined ? null : config.__self;
+ source = config.__source === undefined ? null : config.__source;
+ // Remaining properties are added to a new props object
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ props[propName] = config[propName];
+ }
+ }
+ }
+
+ // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (Object.freeze) {
+ Object.freeze(childArray);
+ }
+ }
+ props.children = childArray;
+ }
+
+ // Resolve default props
+ if (type && type.defaultProps) {
+ var defaultProps = type.defaultProps;
+ for (propName in defaultProps) {
+ if (props[propName] === undefined) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (key || ref) {
+ if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
+ if (key) {
+ defineKeyPropWarningGetter(props, displayName);
+ }
+ if (ref) {
+ defineRefPropWarningGetter(props, displayName);
+ }
+ }
+ }
+ }
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
+};
+
+/**
+ * Return a function that produces ReactElements of a given type.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
+ */
+ReactElement.createFactory = function (type) {
+ var factory = ReactElement.createElement.bind(null, type);
+ // Expose the type on the factory and the prototype so that it can be
+ // easily accessed on elements. E.g. `.type === Foo`.
+ // This should not be named `constructor` since this may not be the function
+ // that created the element, and it may not even be a constructor.
+ // Legacy hook TODO: Warn if this is accessed
+ factory.type = type;
+ return factory;
+};
+
+ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
+
+ return newElement;
+};
+
+/**
+ * Clone and return a new ReactElement using element as the starting point.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
+ */
+ReactElement.cloneElement = function (element, config, children) {
+ var propName;
+
+ // Original props are copied
+ var props = _assign({}, element.props);
+
+ // Reserved names are extracted
+ var key = element.key;
+ var ref = element.ref;
+ // Self is preserved since the owner is preserved.
+ var self = element._self;
+ // Source is preserved since cloneElement is unlikely to be targeted by a
+ // transpiler, and the original source is probably a better indicator of the
+ // true owner.
+ var source = element._source;
+
+ // Owner will be preserved, unless ref is overridden
+ var owner = element._owner;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ // Silently steal the ref from the parent.
+ ref = config.ref;
+ owner = ReactCurrentOwner.current;
+ }
+ if (hasValidKey(config)) {
+ key = '' + config.key;
+ }
+
+ // Remaining properties override existing props
+ var defaultProps;
+ if (element.type && element.type.defaultProps) {
+ defaultProps = element.type.defaultProps;
+ }
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ if (config[propName] === undefined && defaultProps !== undefined) {
+ // Resolve default props
+ props[propName] = defaultProps[propName];
+ } else {
+ props[propName] = config[propName];
+ }
+ }
+ }
+ }
+
+ // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+ props.children = childArray;
+ }
+
+ return ReactElement(element.type, key, ref, self, source, owner, props);
+};
+
+/**
+ * Verifies the object is a ReactElement.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
+ * @param {?object} object
+ * @return {boolean} True if `object` is a valid component.
+ * @final
+ */
+ReactElement.isValidElement = function (object) {
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
+};
+
+module.exports = ReactElement;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(4);
+
+var invariant = __webpack_require__(1);
+
+/**
+ * Static poolers. Several custom versions for each potential number of
+ * arguments. A completely generic pooler is easy to implement, but would
+ * require accessing the `arguments` object. In each of these, `this` refers to
+ * the Class itself, not an instance. If any others are needed, simply add them
+ * here, or in their own files.
+ */
+var oneArgumentPooler = function (copyFieldsFrom) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, copyFieldsFrom);
+ return instance;
+ } else {
+ return new Klass(copyFieldsFrom);
+ }
+};
+
+var twoArgumentPooler = function (a1, a2) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2);
+ return instance;
+ } else {
+ return new Klass(a1, a2);
+ }
+};
+
+var threeArgumentPooler = function (a1, a2, a3) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3);
+ }
+};
+
+var fourArgumentPooler = function (a1, a2, a3, a4) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3, a4);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3, a4);
+ }
+};
+
+var standardReleaser = function (instance) {
+ var Klass = this;
+ !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
+ instance.destructor();
+ if (Klass.instancePool.length < Klass.poolSize) {
+ Klass.instancePool.push(instance);
+ }
+};
+
+var DEFAULT_POOL_SIZE = 10;
+var DEFAULT_POOLER = oneArgumentPooler;
+
+/**
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
+ * you give this may have a `poolSize` property, and will look for a
+ * prototypical `destructor` on instances.
+ *
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
+ * @param {Function} pooler Customizable pooler.
+ */
+var addPoolingTo = function (CopyConstructor, pooler) {
+ // Casting as any so that flow ignores the actual implementation and trusts
+ // it to match the type we declared
+ var NewKlass = CopyConstructor;
+ NewKlass.instancePool = [];
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
+ if (!NewKlass.poolSize) {
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
+ }
+ NewKlass.release = standardReleaser;
+ return NewKlass;
+};
+
+var PooledClass = {
+ addPoolingTo: addPoolingTo,
+ oneArgumentPooler: oneArgumentPooler,
+ twoArgumentPooler: twoArgumentPooler,
+ threeArgumentPooler: threeArgumentPooler,
+ fourArgumentPooler: fourArgumentPooler
+};
+
+module.exports = PooledClass;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var _assign = __webpack_require__(39);
+
+var ReactBaseClasses = __webpack_require__(62);
+var ReactChildren = __webpack_require__(112);
+var ReactDOMFactories = __webpack_require__(116);
+var ReactElement = __webpack_require__(19);
+var ReactPropTypes = __webpack_require__(120);
+var ReactVersion = __webpack_require__(123);
+
+var createReactClass = __webpack_require__(124);
+var onlyChild = __webpack_require__(126);
+
+var createElement = ReactElement.createElement;
+var createFactory = ReactElement.createFactory;
+var cloneElement = ReactElement.cloneElement;
+
+if (process.env.NODE_ENV !== 'production') {
+ var lowPriorityWarning = __webpack_require__(40);
+ var canDefineProperty = __webpack_require__(30);
+ var ReactElementValidator = __webpack_require__(66);
+ var didWarnPropTypesDeprecated = false;
+ createElement = ReactElementValidator.createElement;
+ createFactory = ReactElementValidator.createFactory;
+ cloneElement = ReactElementValidator.cloneElement;
+}
+
+var __spread = _assign;
+var createMixin = function (mixin) {
+ return mixin;
+};
+
+if (process.env.NODE_ENV !== 'production') {
+ var warnedForSpread = false;
+ var warnedForCreateMixin = false;
+ __spread = function () {
+ lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
+ warnedForSpread = true;
+ return _assign.apply(null, arguments);
+ };
+
+ createMixin = function (mixin) {
+ lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
+ warnedForCreateMixin = true;
+ return mixin;
+ };
+}
+
+var React = {
+ // Modern
+
+ Children: {
+ map: ReactChildren.map,
+ forEach: ReactChildren.forEach,
+ count: ReactChildren.count,
+ toArray: ReactChildren.toArray,
+ only: onlyChild
+ },
+
+ Component: ReactBaseClasses.Component,
+ PureComponent: ReactBaseClasses.PureComponent,
+
+ createElement: createElement,
+ cloneElement: cloneElement,
+ isValidElement: ReactElement.isValidElement,
+
+ // Classic
+
+ PropTypes: ReactPropTypes,
+ createClass: createReactClass,
+ createFactory: createFactory,
+ createMixin: createMixin,
+
+ // This looks DOM specific but these are actually isomorphic helpers
+ // since they are just generating DOM strings.
+ DOM: ReactDOMFactories,
+
+ version: ReactVersion,
+
+ // Deprecated hook for JSX spread, don't use this for anything.
+ __spread: __spread
+};
+
+if (process.env.NODE_ENV !== 'production') {
+ var warnedForCreateClass = false;
+ if (canDefineProperty) {
+ Object.defineProperty(React, 'PropTypes', {
+ get: function () {
+ lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
+ didWarnPropTypesDeprecated = true;
+ return ReactPropTypes;
+ }
+ });
+
+ Object.defineProperty(React, 'createClass', {
+ get: function () {
+ lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
+ warnedForCreateClass = true;
+ return createReactClass;
+ }
+ });
+ }
+
+ // React.DOM factories are deprecated. Wrap these methods so that
+ // invocations of the React.DOM namespace and alert users to switch
+ // to the `react-dom-factories` package.
+ React.DOM = {};
+ var warnedForFactories = false;
+ Object.keys(ReactDOMFactories).forEach(function (factory) {
+ React.DOM[factory] = function () {
+ if (!warnedForFactories) {
+ lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
+ warnedForFactories = true;
+ }
+ return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
+ };
+ });
+}
+
+module.exports = React;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ *
+ */
+
+
+/**
+ * WARNING: DO NOT manually require this module.
+ * This is a replacement for `invariant(...)` used by the error code system
+ * and will _only_ be required by the corresponding babel pass.
+ * It always throws.
+ */
+
+function reactProdInvariant(code) {
+ var argCount = arguments.length - 1;
+
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
+
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
+ }
+
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
+
+ var error = new Error(message);
+ error.name = 'Invariant Violation';
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
+
+ throw error;
+}
+
+module.exports = reactProdInvariant;
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var ReactRef = __webpack_require__(135);
+var ReactInstrumentation = __webpack_require__(13);
+
+var warning = __webpack_require__(3);
+
+/**
+ * Helper to call ReactRef.attachRefs with this composite component, split out
+ * to avoid allocations in the transaction mount-ready queue.
+ */
+function attachRefs() {
+ ReactRef.attachRefs(this, this._currentElement);
+}
+
+var ReactReconciler = {
+ /**
+ * Initializes the component, renders markup, and registers event listeners.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
+ * @param {?object} the containing host component instance
+ * @param {?object} info about the host container
+ * @return {?string} Rendered markup to be inserted into the DOM.
+ * @final
+ * @internal
+ */
+ mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
+ {
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
+ }
+ }
+ var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
+ if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
+ }
+ }
+ return markup;
+ },
+
+ /**
+ * Returns a value that can be passed to
+ * ReactComponentEnvironment.replaceNodeWithMarkup.
+ */
+ getHostNode: function (internalInstance) {
+ return internalInstance.getHostNode();
+ },
+
+ /**
+ * Releases any resources allocated by `mountComponent`.
+ *
+ * @final
+ * @internal
+ */
+ unmountComponent: function (internalInstance, safely) {
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
+ }
+ }
+ ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
+ internalInstance.unmountComponent(safely);
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Update a component using a new element.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactElement} nextElement
+ * @param {ReactReconcileTransaction} transaction
+ * @param {object} context
+ * @internal
+ */
+ receiveComponent: function (internalInstance, nextElement, transaction, context) {
+ var prevElement = internalInstance._currentElement;
+
+ if (nextElement === prevElement && context === internalInstance._context) {
+ // Since elements are immutable after the owner is rendered,
+ // we can do a cheap identity compare here to determine if this is a
+ // superfluous reconcile. It's possible for state to be mutable but such
+ // change should trigger an update of the owner which would recreate
+ // the element. We explicitly check for the existence of an owner since
+ // it's possible for an element created outside a composite to be
+ // deeply mutated and reused.
+
+ // TODO: Bailing out early is just a perf optimization right?
+ // TODO: Removing the return statement should affect correctness?
+ return;
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
+ }
+ }
+
+ var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
+
+ if (refsChanged) {
+ ReactRef.detachRefs(internalInstance, prevElement);
+ }
+
+ internalInstance.receiveComponent(nextElement, transaction, context);
+
+ if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Flush any dirty changes in a component.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ */
+ performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
+ if (internalInstance._updateBatchNumber !== updateBatchNumber) {
+ // The component's enqueued batch number should always be the current
+ // batch or the following one.
+ process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
+ return;
+ }
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
+ }
+ }
+ internalInstance.performUpdateIfNecessary(transaction);
+ if (process.env.NODE_ENV !== 'production') {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ }
+};
+
+module.exports = ReactReconciler;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2015-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+var DOMNamespaces = __webpack_require__(48);
+var setInnerHTML = __webpack_require__(36);
+
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(49);
+var setTextContent = __webpack_require__(79);
+
+var ELEMENT_NODE_TYPE = 1;
+var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
+
+/**
+ * In IE (8-11) and Edge, appending nodes with no children is dramatically
+ * faster than appending a full subtree, so we essentially queue up the
+ * .appendChild calls here and apply them so each node is added to its parent
+ * before any children are added.
+ *
+ * In other browsers, doing so is slower or neutral compared to the other order
+ * (in Firefox, twice as slow) so we only do this inversion in IE.
+ *
+ * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
+ */
+var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
+
+function insertTreeChildren(tree) {
+ if (!enableLazy) {
+ return;
+ }
+ var node = tree.node;
+ var children = tree.children;
+ if (children.length) {
+ for (var i = 0; i < children.length; i++) {
+ insertTreeBefore(node, children[i], null);
+ }
+ } else if (tree.html != null) {
+ setInnerHTML(node, tree.html);
+ } else if (tree.text != null) {
+ setTextContent(node, tree.text);
+ }
+}
+
+var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
+ // DocumentFragments aren't actually part of the DOM after insertion so
+ // appending children won't update the DOM. We need to ensure the fragment
+ // is properly populated first, breaking out of our lazy approach for just
+ // this level. Also, some