diff --git a/.babelrc b/.babelrc
deleted file mode 100644
index 0578679..0000000
--- a/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "presets": ["react", "es2015"]
-}
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..773ca2d
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,10 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 2
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+quote_type = single
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index f6daa6e..0000000
--- a/.eslintrc
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "ecmaFeatures": {
- "jsx": true,
- "modules": true
- },
- "env": {
- "browser": true,
- "node": true
- },
- "parser": "babel-eslint",
- "rules": {
- "quotes": [2, "single"],
- "strict": [2, "never"],
- "babel/generator-star-spacing": 1,
- "babel/new-cap": 1,
- "babel/object-shorthand": 1,
- "babel/arrow-parens": 1,
- "babel/no-await-in-loop": 1,
- "react/jsx-uses-react": 2,
- "react/jsx-uses-vars": 2,
- "react/react-in-jsx-scope": 2
- },
- "plugins": [
- "babel",
- "react"
- ]
-}
diff --git a/.gitignore b/.gitignore
index 6ee8ee4..3a7ba79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@ package-lock.json
node_modules/
npm-debug.*
.idea
+pnpm-lock.yaml
+dist
+build
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 986a726..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "6.10.2"
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..c566138
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,13 @@
+# Changelog
+
+## Unreleased
+
+- Added `AdSense` component
+- Added `AdSenseProvider` component
+- Added TypeScript support
+- Added ESM support
+
+**BREAKING CHANGE**:
+
+- Removed default export
+- Removed unimplemented `Baidu` component
diff --git a/README.md b/README.md
index 6f21701..7693405 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# react-adsense
-> react-adsense is a React-component for Google AdSense / Baidu advertisement.
+React components for Google AdSense.
[](https://travis-ci.org/hustcc/react-adsense)
[](https://www.npmjs.com/package/react-adsense)
@@ -8,32 +8,69 @@
[](https://www.npmjs.com/package/react-adsense)
[](http://git.hust.cc/react-adsense/)
+## Prepare
-# 1. Install
+First you need to open a Google AdSense account. You should get a script:
-> **npm install --save react-adsense**
+```html
+
+```
+
+Add it to your website's home page. Usually Google verify your website in two weeks. After the process is done, you will be able to create custom ad blocks.
+
+> **Note: Turn Off AdBlocker Before Continue!!!**
-Before use Google AdSense, you should add the `script` at the end of HTML.
+After creating an ad block, you should have a code snippet:
```html
-
+
+
+
+```
+
+We need `data-ad-*` attributes to use with react-adsense.
+
+## Install
+
+```bash
+npm install --save react-adsense
```
+## Usage
-# 2. Usage
+### Single Slot
+
+If you only have one ad slot, use `` component. `client` and `slot` are required.
```jsx
import React from 'react';
-import AdSense from 'react-adsense';
+import { AdSense } from 'react-adsense';
-// ads with no set-up
-
+;
+```
+
+You can also customize it:
+```jsx
// ads with custom format
-
// responsive and native ads
-
// auto full width responsive ads
-
```
+### Multiple Slots
+
+If you have many ad slots, you can use `` to define global parameters.
+
+```jsx
+import React from 'react';
+import { AdSense, AdSenseProvider } from 'react-adsense';
+
+
+
+
+
+;
+```
+
+## Props
+
+### `client`
+
+Related to `data-ad-client`. Required.
+
+### `slot`
+
+Related to `data-ad-slot`. Required.
+
+### `layout`
+
+Related to `data-ad-layout`. Optional.
+
+### `layout-key`
+
+Related to `data-ad-layout-key`. Optional.
+
+### `format`
+
+Related to `data-ad-format`. Optional.
-# 3. Props
+### `responsive`
- - Required props:
- - `client`
- - `slot`
- - Optional props:
- - `className`:
- - `style`:
- - `layout`:
- - `layoutKey`:
- - `format`:
- - `responsive`:
+Related to `data-ad-responsive`. Optional.
+### `className`
-# 4. TODO
+Optional.
- - `Baidu` advertisement supported.
+### `style`
+Optional.
# LICENSE
diff --git a/demo/App.tsx b/demo/App.tsx
new file mode 100644
index 0000000..3214467
--- /dev/null
+++ b/demo/App.tsx
@@ -0,0 +1,58 @@
+import { AdSense } from '../src';
+
+export default function App() {
+ console.log('haha');
+ return (
+
+
react-adsense: adsense for react
+
+ Project{' '}
+ react-adsense is a
+ React-component for Google AdSense / Baidu advertisement.
+
+
+
1. Install
+
npm install react-adsense
+
+
Then import it.
+
+ {
+ "//import library use script tag.\n\nimport AdSense from 'react-adsense';"
+ }
+
+
+
2. Usage
+
+ {
+ "import AdSense from 'react-adsense';\n\n"
+ }
+
+
+
3. default props
+
+
+
4. in-article layout
+
+
+
5. full-config Demo
+
+
+
+ );
+}
diff --git a/demo/dist/bundle.js b/demo/dist/bundle.js
deleted file mode 100644
index a947cca..0000000
--- a/demo/dist/bundle.js
+++ /dev/null
@@ -1,36 +0,0 @@
-!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=87)}([function(e,t){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?h=f.concat(h):v=-1,h.length&&s())}function s(){if(!m){var e=r(a);m=!0;for(var t=h.length;t;){for(f=h,h=[];++v1)for(var n=1;n1?t-1:0),o=1;o2?n-2:0),r=2;r1){for(var _=Array(E),b=0;b1){for(var E=Array(y),_=0;_-1||("production"!==t.env.NODE_ENV?s(!1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e):a("96",e)),!l.plugins[o]){n.extractEvents||("production"!==t.env.NODE_ENV?s(!1,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e):a("97",e)),l.plugins[o]=n;var i=n.eventTypes;for(var p in i)r(i[p],n,p)||("production"!==t.env.NODE_ENV?s(!1,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",p,e):a("98",p,e))}}}function r(e,n,o){l.eventNameDispatchConfigs.hasOwnProperty(o)&&("production"!==t.env.NODE_ENV?s(!1,"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",o):a("99",o)),l.eventNameDispatchConfigs[o]=e;var r=e.phasedRegistrationNames;if(r){for(var u in r)if(r.hasOwnProperty(u)){var c=r[u];i(c,n,o)}return!0}return!!e.registrationName&&(i(e.registrationName,n,o),!0)}function i(e,n,o){if(l.registrationNameModules[e]&&("production"!==t.env.NODE_ENV?s(!1,"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):a("100",e)),l.registrationNameModules[e]=n,l.registrationNameDependencies[e]=n.eventTypes[o].dependencies,"production"!==t.env.NODE_ENV){var r=e.toLowerCase();l.possibleRegistrationNames[r]=e,"onDoubleClick"===e&&(l.possibleRegistrationNames.ondblclick=e)}}var a=n(3),s=n(1),u=null,c={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:"production"!==t.env.NODE_ENV?{}:null,injectEventPluginOrder:function(e){u&&("production"!==t.env.NODE_ENV?s(!1,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):a("101")),u=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var n=!1;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];c.hasOwnProperty(r)&&c[r]===i||(c[r]&&("production"!==t.env.NODE_ENV?s(!1,"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",r):a("102",r)),c[r]=i,n=!0)}n&&o()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var r=l.registrationNameModules[n[o]];if(r)return r}}return null},_resetEventPlugins:function(){u=null;for(var e in c)c.hasOwnProperty(e)&&delete c[e];l.plugins.length=0;var n=l.eventNameDispatchConfigs;for(var o in n)n.hasOwnProperty(o)&&delete n[o];var r=l.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i];if("production"!==t.env.NODE_ENV){var a=l.possibleRegistrationNames;for(var s in a)a.hasOwnProperty(s)&&delete a[s]}}};e.exports=l}).call(t,n(0))},function(e,t,n){"use strict";function o(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=f++,p[e[m]]={}),p[e[m]]}var r,i=n(4),a=n(26),s=n(143),u=n(68),c=n(178),l=n(47),p={},d=!1,f=0,h={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,r=o(n),i=a.registrationNameDependencies[e],s=0;s]/;e.exports=r},function(e,t,n){"use strict";var o,r=n(6),i=n(36),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,u=n(43),c=u(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{o=o||document.createElement("div"),o.innerHTML="";for(var n=o.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(r.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t,n){"use strict";(function(t){var n=!1;if("production"!==t.env.NODE_ENV)try{Object.defineProperty({},"x",{get:function(){}}),n=!0}catch(e){}e.exports=n}).call(t,n(0))},function(e,t,n){"use strict";function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function r(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function i(e,n){var o=u.get(e);if(!o){if("production"!==t.env.NODE_ENV){var r=e.constructor;"production"!==t.env.NODE_ENV&&d(!n,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op. Please check the code for the %s component.",n,n,r&&(r.displayName||r.name)||"ReactClass")}return null}return"production"!==t.env.NODE_ENV&&"production"!==t.env.NODE_ENV&&d(null==s.current,"%s(...): Cannot update during an existing state transition (such as within `render` or another component's constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved to `componentWillMount`.",n),o}var a=n(3),s=n(11),u=n(22),c=n(8),l=n(10),p=n(1),d=n(2),f={isMounted:function(e){if("production"!==t.env.NODE_ENV){var n=s.current;null!==n&&("production"!==t.env.NODE_ENV&&d(n._warnedAboutRefsInRender,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",n.getName()||"A component"),n._warnedAboutRefsInRender=!0)}var o=u.get(e);return!!o&&!!o._renderedComponent},enqueueCallback:function(e,t,n){f.validateCallback(t,n);var r=i(e);if(!r)return null;r._pendingCallbacks?r._pendingCallbacks.push(t):r._pendingCallbacks=[t],o(r)},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],o(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,o(t))},enqueueReplaceState:function(e,t,n){var r=i(e,"replaceState");r&&(r._pendingStateQueue=[t],r._pendingReplaceState=!0,void 0!==n&&null!==n&&(f.validateCallback(n,"replaceState"),r._pendingCallbacks?r._pendingCallbacks.push(n):r._pendingCallbacks=[n]),o(r))},enqueueSetState:function(e,n){"production"!==t.env.NODE_ENV&&(c.debugTool.onSetState(),"production"!==t.env.NODE_ENV&&d(null!=n,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."));var r=i(e,"setState");if(r){(r._pendingStateQueue||(r._pendingStateQueue=[])).push(n),o(r)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,o(e)},validateCallback:function(e,n){e&&"function"!=typeof e&&("production"!==t.env.NODE_ENV?p(!1,"%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",n,r(e)):a("122",n,r(e)))}};e.exports=f}).call(t,n(0))},function(e,t,n){"use strict";var o=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,o,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,o,r)})}:e};e.exports=o},function(e,t,n){"use strict";function o(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}e.exports=o},function(e,t,n){"use strict";function o(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var o=i[e];return!!o&&!!n[o]}function r(e){return o}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t,n){"use strict";function o(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=o},function(e,t,n){"use strict";/**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @param {?boolean} capture Check if the capture phase is supported.
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
-function o(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,o=n in document;if(!o){var a=document.createElement("div");a.setAttribute(n,"return;"),o="function"==typeof a[n]}return!o&&r&&"wheel"===e&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var r,i=n(6);i.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=o},function(e,t,n){"use strict";function o(e,t){var n=null===e||!1===e,o=null===t||!1===t;if(n||o)return n===o;var r=typeof e,i=typeof t;return"string"===r||"number"===r?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=o},function(e,t,n){"use strict";(function(t){var o=n(4),r=n(9),i=n(2),a=r;if("production"!==t.env.NODE_ENV){var s=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],u=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],c=u.concat(["button"]),l=["dd","dt","li","option","optgroup","p","rp","rt"],p={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null},d=function(e,t,n){var r=o({},e||p),i={tag:t,instance:n};return-1!==u.indexOf(t)&&(r.aTagInScope=null,r.buttonTagInScope=null,r.nobrTagInScope=null),-1!==c.indexOf(t)&&(r.pTagInButtonScope=null),-1!==s.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(r.listItemTagAutoclosing=null,r.dlItemTagAutoclosing=null),r.current=i,"form"===t&&(r.formTag=i),"a"===t&&(r.aTagInScope=i),"button"===t&&(r.buttonTagInScope=i),"nobr"===t&&(r.nobrTagInScope=i),"p"===t&&(r.pTagInButtonScope=i),"li"===t&&(r.listItemTagAutoclosing=i),"dd"!==t&&"dt"!==t||(r.dlItemTagAutoclosing=i),r},f=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e;case"#document":return"html"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===l.indexOf(t);case"body":case"caption":case"col":case"colgroup":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0},h=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},m=function(e){if(!e)return[];var t=[];do{t.push(e)}while(e=e._currentElement._owner);return t.reverse(),t},v={};a=function(e,n,o,r){r=r||p;var a=r.current,s=a&&a.tag;null!=n&&("production"!==t.env.NODE_ENV&&i(null==e,"validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var u=f(e,s)?null:a,c=u?null:h(e,r),l=u||c;if(l){var d,g=l.tag,y=l.instance,E=o&&o._currentElement._owner,_=y&&y._currentElement._owner,b=m(E),N=m(_),C=Math.min(b.length,N.length),O=-1;for(d=0;d "),k=!!u+"|"+e+"|"+g+"|"+x;if(v[k])return;v[k]=!0;var T=e,I="";if("#text"===e?/\S/.test(n)?T="Text nodes":(T="Whitespace text nodes",I=" Make sure you don't have any extra whitespace between tags on each line of your source code."):T="<"+e+">",u){var S="";"table"===g&&"tr"===e&&(S+=" Add a to your code to match the DOM tree generated by the browser."),"production"!==t.env.NODE_ENV&&i(!1,"validateDOMNesting(...): %s cannot appear as a child of <%s>.%s See %s.%s",T,g,I,x,S)}else"production"!==t.env.NODE_ENV&&i(!1,"validateDOMNesting(...): %s cannot appear as a descendant of <%s>. See %s.",T,g,x)}},a.updatedAncestorInfo=d,a.isTagValidInContext=function(e,t){t=t||p;var n=t.current,o=n&&n.tag;return f(e,o)&&!h(e,t)}}e.exports=a}).call(t,n(0))},function(e,t,n){"use strict";(function(t){var n=function(){};if("production"!==t.env.NODE_ENV){var o=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o2?n-2:0),i=2;i1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o)}function y(e){function t(t,n,o,r,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[n],c=O(s);if("object"!==c)return new d("Invalid "+r+" `"+i+"` of type `"+c+"` supplied to `"+o+"`, expected an object.");for(var l in s)if(u(s,l)){var p=e(s,l,o,r,i+"."+l,a);if(p instanceof Error)return p}return null}return f(t)}function E(e){function n(t,n,o,r,i){for(var s=0;s>",S={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:function(){return f(o)}(),arrayOf:m,element:function(){function t(t,n,o,r,i){var a=t[n];if(!e(a)){return new d("Invalid "+r+" `"+i+"` of type `"+O(a)+"` supplied to `"+o+"`, expected a single ReactElement.")}return null}return f(t)}(),elementType:function(){function e(e,t,n,o,i){var a=e[t];if(!r.isValidElementType(a)){return new d("Invalid "+o+" `"+i+"` of type `"+O(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")}return null}return f(e)}(),instanceOf:v,node:function(){function e(e,t,n,o,r){return N(e[t])?null:new d("Invalid "+o+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:y,oneOf:g,oneOfType:E,shape:_,exact:b};return d.prototype=Error.prototype,S.checkPropTypes=s,S.resetWarningCache=s.resetWarningCache,S.PropTypes=S,S}}).call(t,n(0))},function(e,t,n){"use strict";function o(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){i.forEach(function(t){r[o(t,e)]=r[e]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:r,shorthandPropertyExpansions:a};e.exports=s},function(e,t,n){"use strict";(function(t){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(3),i=n(14),a=n(1),s=function(){function e(t){o(this,e),this._callbacks=null,this._contexts=null,this._arg=t}return e.prototype.enqueue=function(e,t){this._callbacks=this._callbacks||[],this._callbacks.push(e),this._contexts=this._contexts||[],this._contexts.push(t)},e.prototype.notifyAll=function(){var e=this._callbacks,n=this._contexts,o=this._arg;if(e&&n){e.length!==n.length&&("production"!==t.env.NODE_ENV?a(!1,"Mismatched list of contexts in callback queue"):r("24")),this._callbacks=null,this._contexts=null;for(var i=0;i must be an array if `multiple` is true.%s",a,r(o)):!n.multiple&&s&&"production"!==t.env.NODE_ENV&&d(!1,"The `%s` prop supplied to