├── public
├── favicon.ico
├── manifest.json
└── index.html
├── scripts
├── build.sh
├── docgen.js
└── readme.md
├── src
├── App.test.js
├── index.css
├── App.css
├── index.js
├── Dragger
│ ├── utils.js
│ ├── index.d.ts
│ └── index.js
├── App.js
├── registerServiceWorker.js
└── list.js
├── .gitignore
├── docs
├── main.f73ce32d.css
├── index.html
├── main.f73ce32d.css.map
└── main.ca19357e.js
├── package.json
└── README.md
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foveluy/Luy-dragger/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | npm run build
2 | rm -r docs/main.*
3 | rm docs/index.html
4 | cp build/index.html docs/
5 | cp -r build/static/js/main.* docs/
6 | cp -r build/static/css/main.* docs/
7 | rm -r build
--------------------------------------------------------------------------------
/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 |
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/docs/main.f73ce32d.css:
--------------------------------------------------------------------------------
1 | body{margin:0;padding:0;font-family:sans-serif}*{font-size:14px;color:rgba(80,80,80,.9)}html{background:#eee}.props-draggers{font-size:10px;width:200px;height:80px;border-radius:5px;display:-ms-flexbox;display:flex;left:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#fff}
2 | /*# sourceMappingURL=main.f73ce32d.css.map*/
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
7 | * {
8 | font-size: 14px;
9 | color: rgba(80, 80, 80, 0.9);
10 | }
11 |
12 | html {
13 | background: #eee;
14 | }
15 |
16 | .props-draggers {
17 | font-size: 10px;
18 | width: 200px;
19 | height: 80px;
20 | border-radius: 5px;
21 | display: flex;
22 | left: 0;
23 | align-items: center;
24 | justify-content: center;
25 | background: white;
26 | }
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-title {
18 | font-size: 1.5em;
19 | }
20 |
21 | .App-intro {
22 | font-size: large;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from { transform: rotate(0deg); }
27 | to { transform: rotate(360deg); }
28 | }
29 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
React App
--------------------------------------------------------------------------------
/scripts/docgen.js:
--------------------------------------------------------------------------------
1 | const ReactComponentJson = require('react-component-json');
2 | const fs = require('fs');
3 |
4 | const file = fs.readFileSync('./src/Dragger/index.js', 'utf8');
5 |
6 | const json = ReactComponentJson.json(file);
7 | const md = ReactComponentJson.md(json);
8 |
9 | const readme = fs.readFileSync('./scripts/readme.md', 'utf8');
10 |
11 | fs.writeFileSync('./README.md', readme + '\n' + md.md);
12 |
13 | const indexHtml = fs.readFileSync('./docs/index.html', 'utf8');
14 | const newHtml = indexHtml.replace('/static/css', '.').replace('/static/js', '.');
15 |
16 | fs.writeFileSync('./docs/index.html', newHtml);
17 |
--------------------------------------------------------------------------------
/scripts/readme.md:
--------------------------------------------------------------------------------
1 | # Props dragger
2 |
3 | 这是一款使用 `render props` 写成的拖拽组件,使得获取组件状态格外简单
4 |
5 | ## 安装
6 |
7 | ```js
8 | npm install props-dragger
9 | ```
10 |
11 | ## 最简单的例子
12 |
13 | ```js
14 | import React from 'react';
15 | import ReactDOM from 'react-dom';
16 | import Dragger from '@props/dragger';
17 |
18 | const Demo = () => {
19 | return (
20 |
21 | {({ style, handle }) => (
22 |
23 | 普通的拖拽组件
24 |
25 | )}
26 |
27 | );
28 | };
29 |
30 | ReactDOM.render(, document.getElementById('root'));
31 | ```
32 |
33 | ## API 和 Props
34 |
35 | [API and Props](https://github.com/Foveluy/Luy-dragger#api-%E6%8F%8F%E8%BF%B0)
36 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "props-dragger",
3 | "version": "1.0.0",
4 | "main": "./src/Dragger/index.js",
5 | "dependencies": {
6 | "classnames": "^2.2.6",
7 | "fast-deep-equal": "^2.0.1",
8 | "react": "^16.4.1",
9 | "react-dom": "^16.4.1",
10 | "react-scripts": "1.1.4"
11 | },
12 | "scripts": {
13 | "start": "react-scripts start",
14 | "build": "react-scripts build",
15 | "test": "react-scripts test --env=jsdom",
16 | "eject": "react-scripts eject",
17 | "docgen": "./scripts/build.sh && node ./scripts/docgen.js",
18 | "add": "git add ."
19 | },
20 | "devDependencies": {
21 | "pre-commit": "^1.2.2",
22 | "react-component-json": "^1.7.1"
23 | },
24 | "pre-commit": [
25 | "docgen",
26 | "add"
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/docs/main.f73ce32d.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["index.css"],"names":[],"mappings":"AAAA,KACI,SACA,UACA,sBAAwB,CAG5B,EACI,eACA,uBAA6B,CAGjC,KACI,eAAiB,CAGrB,gBACI,eACA,YACA,YACA,kBACA,oBACA,aACA,OACA,sBACI,mBACJ,qBACI,uBACJ,eAAkB","file":"static/css/main.f73ce32d.css","sourcesContent":["body {\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n}\n\n* {\n font-size: 14px;\n color: rgba(80, 80, 80, 0.9);\n}\n\nhtml {\n background: #eee;\n}\n\n.props-draggers {\n font-size: 10px;\n width: 200px;\n height: 80px;\n border-radius: 5px;\n display: -ms-flexbox;\n display: flex;\n left: 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n background: white;\n}\n\n\n// WEBPACK FOOTER //\n// ./src/index.css"],"sourceRoot":""}
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | // import App from './App';
5 | import registerServiceWorker from './registerServiceWorker';
6 | import List from './list';
7 |
8 | const Data = [];
9 |
10 | for (let index = 0; index < 20; index++) {
11 | Data.push({ name: index + 1, o: index });
12 | }
13 |
14 | class C extends React.Component {
15 | state = { horzontal: false, gap: 100 };
16 |
17 | render() {
18 | return (
19 |
20 |
30 | (
35 |
36 | {data.name}
37 |
38 | )}
39 | />
40 |
41 | );
42 | }
43 | }
44 |
45 | ReactDOM.render(, document.getElementById('root'));
46 | registerServiceWorker();
47 |
--------------------------------------------------------------------------------
/src/Dragger/utils.js:
--------------------------------------------------------------------------------
1 | export const int = (number) => {
2 | if (number === '') {
3 | return 0
4 | }
5 | return parseInt(number, 10)
6 | }
7 | export const innerWidth = (node) => {
8 | let width = node.clientWidth;
9 | const computedStyle = node.style
10 | width -= int(computedStyle.paddingLeft);
11 | width -= int(computedStyle.paddingRight);
12 | return width;
13 | }
14 |
15 | export const outerWidth = (node) => {
16 | let width = node.clientWidth;
17 | const computedStyle = node.style
18 | width += int(computedStyle.borderLeftWidth);
19 | width += int(computedStyle.borderRightWidth);
20 | return width;
21 | }
22 |
23 | export const innerHeight = (node) => {
24 | let height = node.clientHeight;
25 | const computedStyle = node.style
26 | height -= int(computedStyle.paddingTop);
27 | height -= int(computedStyle.paddingBottom);
28 | return height;
29 | }
30 |
31 | export const outerHeight = (node) => {
32 | let height = node.clientHeight;
33 | const computedStyle = node.style
34 | height += int(computedStyle.borderTopWidth);
35 | height += int(computedStyle.borderBottomWidth);
36 | return height;
37 | }
38 | export const parseBounds = (bounds) => {
39 | return {
40 | left: -bounds.left,
41 | top: -bounds.top,
42 | right: bounds.right,
43 | bottom: bounds.bottom
44 | }
45 | }
46 |
47 | export const isNumber = (things) => {
48 | return typeof things === 'number' ? true : false
49 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Props dragger
2 |
3 | 这是一款使用 `render props` 写成的拖拽组件,使得获取组件状态格外简单
4 |
5 | ## 安装
6 |
7 | ```js
8 | npm install props-dragger
9 | ```
10 |
11 | ## 最简单的例子
12 |
13 | ```js
14 | import React from 'react';
15 | import ReactDOM from 'react-dom';
16 | import Dragger from '@props/dragger';
17 |
18 | const Demo = () => {
19 | return (
20 |
21 | {({ style, handle }) => (
22 |
23 | 普通的拖拽组件
24 |
25 | )}
26 |
27 | );
28 | };
29 |
30 | ReactDOM.render(, document.getElementById('root'));
31 | ```
32 |
33 | ## API 和 Props
34 |
35 | [API and Props](https://github.com/Foveluy/Luy-dragger#api-%E6%8F%8F%E8%BF%B0)
36 |
37 |
38 | ## API 描述
39 | |名字| 描述|类型|是否需要|默认值|
40 | | ------------- |:-------------:|:-----:| -----:|-----:|
41 | |x|
给予元素一个x,y的初始位置,单位是px
|number|false|undefined|
42 | |y||number|false|undefined|
43 | |grid|
以网格的方式移动,每次移动并不是平滑的移动
[20,30],鼠标x轴方向移动了20 px ,y方向移动了30 px,整个子元素才会移动
|array|false|undefined|
44 | |allowX|只允许移动x轴 |bool|false|true|
45 | |allowY|只允许移动y轴 |bool|false|true|
46 | |isUserMove|
是否由用户移动
可能是通过外部props改变
|bool|false|undefined|
47 | |static|
是否静态
设置了就不可移动
|bool|false|undefined|
48 | |onDragStart|
开始拖拽
|func|false|undefined|
49 | |onDragMove|
正在拖拽
|func|false|undefined|
50 | |onDragEnd|
结束拖拽,鼠标弹开
|func|false|undefined|
51 | |onDragging|
受控函数
|func|false|undefined|
52 |
--------------------------------------------------------------------------------
/src/Dragger/index.d.ts:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | interface DraggerProps {
4 | /**
5 | * 给予元素一个x,y的初始位置,单位是px
6 | */
7 | x: Number;
8 | y: Number;
9 |
10 | /**
11 | * 以网格的方式移动,每次移动并不是平滑的移动
12 | * [20,30],鼠标x轴方向移动了20 px ,y方向移动了30 px,整个子元素才会移动
13 | */
14 | grid: Array;
15 |
16 | /**只允许移动x轴 */
17 | allowX: Boolean;
18 |
19 | /**只允许移动y轴 */
20 | allowY: Boolean;
21 |
22 | /**
23 | * 是否由用户移动
24 | * 可能是通过外部props改变
25 | */
26 | isUserMove: Boolean;
27 |
28 | /**
29 | * 是否静态
30 | * 设置了就不可移动
31 | */
32 | static: Boolean;
33 |
34 | /**
35 | * 开始拖拽
36 | */
37 | onDragStart: (event: any, x: Number, y: Number) => void;
38 | /**
39 | * 正在拖拽
40 | */
41 | onDragMove: (event: any, x: Number, y: Number) => void;
42 | /**
43 | * 结束拖拽,鼠标弹开
44 | */
45 | onDragEnd: (event: any) => void;
46 |
47 | /**
48 | * 受控函数
49 | */
50 | onDragging: (x: Number, y: Number) => void;
51 |
52 | /**
53 | * style 内部提供的属性,用于存放该组件是否可以移动
54 | * handle 推拽把手,是个函数,用法:{...handle()}
55 | * x 偏移原始位置 x坐标
56 | * y 偏移原始位置 y坐标
57 | * bound 有一个 instance 是给周围的边框的,style 也是给周围边框的
58 | * static 是否静态
59 | * dragging 是否在拖拽
60 | */
61 | children: (
62 | {
63 | style: any,
64 | handle: any,
65 | x: Number,
66 | y: Number,
67 | bound: { instance: any, style: any },
68 | static: Boolean,
69 | dragging: Boolean
70 | }
71 | ) => React.ReactNode;
72 | }
73 |
74 | export default class Dragger extends React.Component {}
75 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
23 | React App
24 |
25 |
26 |
27 |
30 |
31 |
41 |
42 |
60 |
61 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Dragger from "./Dragger";
3 |
4 | import "./index.css";
5 |
6 | export default class LayoutDemo extends React.Component {
7 | state = {
8 | x: 0,
9 | y: 0
10 | };
11 |
12 | render() {
13 | const name = "props-draggers";
14 |
15 | return (
16 |
17 |
{
21 | this.setState({
22 | x,
23 | y
24 | });
25 | }}
26 | >
27 | {({ style, handle }) => (
28 |
29 | 受控组件
30 |
31 | )}
32 |
33 |
34 | {({ style, handle }) => (
35 |
36 | 普通的拖拽组件
37 |
38 | )}
39 |
40 |
41 | {({ style, handle, dragging }) => (
42 |
50 | 拖动改变颜色
51 |
52 | )}
53 |
54 |
55 | {({ style, handle, x, y }) => (
56 |
57 | 相对x:
58 | {x}
59 | ,相对y:
60 | {y}
61 |
62 | )}
63 |
64 |
65 | {({ style, handle }) => (
66 |
67 | 不允许在y轴移动
68 |
69 | )}
70 |
71 |
72 | {({ style, handle }) => (
73 |
74 | 不允许在x轴移动
75 |
76 | )}
77 |
78 |
79 | {({ style, handle }) => (
80 |
81 |
92 | 拖拽把手
93 |
94 |
点把手拖拽
95 |
96 | )}
97 |
98 |
99 | {({ style, handle }) => (
100 |
101 | 网格移动,每次移动25px
102 |
103 | )}
104 |
105 |
106 | {({ style }) => (
107 |
111 | 静态,别想拖动我
112 |
113 | )}
114 |
115 |
116 | {({ style, handle, bound }) => (
117 |
127 |
132 | 不能离开框框的范围
133 |
134 |
135 | )}
136 |
137 |
138 | );
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/src/registerServiceWorker.js:
--------------------------------------------------------------------------------
1 | // In production, we register a service worker to serve assets from local cache.
2 |
3 | // This lets the app load faster on subsequent visits in production, and gives
4 | // it offline capabilities. However, it also means that developers (and users)
5 | // will only see deployed updates on the "N+1" visit to a page, since previously
6 | // cached resources are updated in the background.
7 |
8 | // To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
9 | // This link also includes instructions on opting out of this behavior.
10 |
11 | const isLocalhost = Boolean(
12 | window.location.hostname === 'localhost' ||
13 | // [::1] is the IPv6 localhost address.
14 | window.location.hostname === '[::1]' ||
15 | // 127.0.0.1/8 is considered localhost for IPv4.
16 | window.location.hostname.match(
17 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
18 | )
19 | );
20 |
21 | export default function register() {
22 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
23 | // The URL constructor is available in all browsers that support SW.
24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
25 | if (publicUrl.origin !== window.location.origin) {
26 | // Our service worker won't work if PUBLIC_URL is on a different origin
27 | // from what our page is served on. This might happen if a CDN is used to
28 | // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
29 | return;
30 | }
31 |
32 | window.addEventListener('load', () => {
33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
34 |
35 | if (isLocalhost) {
36 | // This is running on localhost. Lets check if a service worker still exists or not.
37 | checkValidServiceWorker(swUrl);
38 |
39 | // Add some additional logging to localhost, pointing developers to the
40 | // service worker/PWA documentation.
41 | navigator.serviceWorker.ready.then(() => {
42 | console.log(
43 | 'This web app is being served cache-first by a service ' +
44 | 'worker. To learn more, visit https://goo.gl/SC7cgQ'
45 | );
46 | });
47 | } else {
48 | // Is not local host. Just register service worker
49 | registerValidSW(swUrl);
50 | }
51 | });
52 | }
53 | }
54 |
55 | function registerValidSW(swUrl) {
56 | navigator.serviceWorker
57 | .register(swUrl)
58 | .then(registration => {
59 | registration.onupdatefound = () => {
60 | const installingWorker = registration.installing;
61 | installingWorker.onstatechange = () => {
62 | if (installingWorker.state === 'installed') {
63 | if (navigator.serviceWorker.controller) {
64 | // At this point, the old content will have been purged and
65 | // the fresh content will have been added to the cache.
66 | // It's the perfect time to display a "New content is
67 | // available; please refresh." message in your web app.
68 | console.log('New content is available; please refresh.');
69 | } else {
70 | // At this point, everything has been precached.
71 | // It's the perfect time to display a
72 | // "Content is cached for offline use." message.
73 | console.log('Content is cached for offline use.');
74 | }
75 | }
76 | };
77 | };
78 | })
79 | .catch(error => {
80 | console.error('Error during service worker registration:', error);
81 | });
82 | }
83 |
84 | function checkValidServiceWorker(swUrl) {
85 | // Check if the service worker can be found. If it can't reload the page.
86 | fetch(swUrl)
87 | .then(response => {
88 | // Ensure service worker exists, and that we really are getting a JS file.
89 | if (
90 | response.status === 404 ||
91 | response.headers.get('content-type').indexOf('javascript') === -1
92 | ) {
93 | // No service worker found. Probably a different app. Reload the page.
94 | navigator.serviceWorker.ready.then(registration => {
95 | registration.unregister().then(() => {
96 | window.location.reload();
97 | });
98 | });
99 | } else {
100 | // Service worker found. Proceed as normal.
101 | registerValidSW(swUrl);
102 | }
103 | })
104 | .catch(() => {
105 | console.log(
106 | 'No internet connection found. App is running in offline mode.'
107 | );
108 | });
109 | }
110 |
111 | export function unregister() {
112 | if ('serviceWorker' in navigator) {
113 | navigator.serviceWorker.ready.then(registration => {
114 | registration.unregister();
115 | });
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/src/list.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Dragger from './Dragger';
3 | import Equal from 'fast-deep-equal';
4 |
5 | /**
6 | * 2.4213xxx -> 2
7 | * 2.62xxx->3
8 | */
9 | const clamp = x => {
10 | const num = parseInt(x, 10);
11 | // 获得小数位
12 | const left = x - num;
13 | //看看到底是大于 0.5 小于 0.5,
14 | return left > 0.5 ? num + 1 : num;
15 | };
16 |
17 | /**
18 | * min {
21 | return Math.max(min, Math.min(num, max));
22 | };
23 |
24 | export default class SortList extends React.Component {
25 | constructor(props) {
26 | super(props);
27 |
28 | const data = props.data;
29 | this.state = {
30 | order: data,
31 | currentOrder: -1,
32 | autoScrolling: false
33 | };
34 | this.manager = {};
35 | this.timer = -1;
36 | this.currentX = 0;
37 | this.currentY = 0;
38 | }
39 |
40 | shouldComponentUpdate(nextProps, nextState) {
41 | return !Equal(this.props, nextProps) || !Equal(nextState, this.state);
42 | }
43 |
44 | static defaultProps = {
45 | gap: 80,
46 | horizontal: false,
47 | renderItem: () => null
48 | };
49 |
50 | dragging = (preOrder, x, y, event) => {
51 | this.currentX = x;
52 | this.currentY = y;
53 |
54 | const fixedDirection = this.props.horizontal ? x : y;
55 |
56 | const o = clamp(fixedDirection / this.getGap(preOrder.o));
57 | const max = this.state.order.length - 1;
58 | const newOrder = this.state.order.map(od => {
59 | if (o === od.o) {
60 | return { ...od, o: preOrder.o };
61 | }
62 | if (preOrder.o === od.o) {
63 | return { ...od, o: between(o, 0, max) };
64 | }
65 | return od;
66 | });
67 |
68 | console.log(fixedDirection);
69 |
70 | if (this.container.scrollTop + 300 - y < 100 && this.timer === -1) {
71 | /**
72 | * 当有已经有滚动的时候,我们需要减去自动滚动前的 scrolltop
73 | */
74 | const currentScrollTop = this.container.scrollTop;
75 | const scrollOffsetY = event.clientY / 80;
76 |
77 | this.timer = setInterval(() => {
78 | const max = this.state.order.length - 1;
79 | if (this.state.currentOrder >= max) {
80 | return;
81 | }
82 |
83 | const nextY =
84 | this.currentY + this.container.scrollTop - currentScrollTop;
85 |
86 | //自动滚动
87 | this.manager[preOrder.name].autoMove(this.currentX, nextY);
88 | //设置滚动
89 | this.container.scrollTop += scrollOffsetY;
90 |
91 | // console.log(y + this.container.scrollTop);
92 |
93 | const o = clamp(nextY / this.getGap(preOrder.o));
94 |
95 | // console.log(this.manager[preOrder.name]);
96 |
97 | const newOrder = this.state.order.map(od => {
98 | if (preOrder.name === od.name) {
99 | return { ...od, o: o };
100 | }
101 | if (preOrder.name !== od.name && o === od.o) {
102 | return { ...od, o: between(o - 1, 0, max) };
103 | }
104 | return od;
105 | });
106 |
107 | this.setState({
108 | currentOrder: o,
109 | order: newOrder,
110 | autoScrolling: true
111 | });
112 |
113 | if (
114 | nextY - this.container.scrollTop < 150 &&
115 | this.state.autoScrolling
116 | ) {
117 | clearInterval(this.timer);
118 |
119 | this.timer = -1;
120 | this.setState({
121 | autoScrolling: false
122 | });
123 | }
124 | }, 5);
125 | }
126 |
127 | if (!this.state.autoScrolling) {
128 | this.setState({
129 | currentOrder: preOrder.o,
130 | order: newOrder
131 | });
132 | }
133 | };
134 |
135 | dragEnd = () => {
136 | clearInterval(this.timer);
137 | this.timer = -1;
138 | this.setState({
139 | currentOrder: -1,
140 | autoScrolling: false
141 | });
142 | };
143 |
144 | getGap = () => {
145 | return this.props.gap;
146 | };
147 |
148 | render() {
149 | return (
150 | (this.container = node)}
152 | style={{ height: 300, overflow: 'scroll' }}
153 | >
154 |
155 | {this.state.order.map(order => {
156 | //获取当前的实际位置
157 | const delta = order.o * this.getGap(order.o);
158 | return (
159 |
(this.manager[order.name] = node)}
161 | parent={() => this.container}
162 | onDragMove={(event, x, y) => this.dragging(order, x, y, event)}
163 | key={order.name}
164 | x={this.props.horizontal ? delta : 0}
165 | controlled={this.state.currentOrder !== order.o}
166 | y={this.props.horizontal ? 0 : delta}
167 | onDragEnd={this.dragEnd}
168 | >
169 | {({ style, handle, dragging }) => (
170 |
178 | {this.props.renderItem(handle, order)}
179 |
180 | )}
181 |
182 | );
183 | })}
184 |
185 |
186 | );
187 | }
188 | }
189 |
--------------------------------------------------------------------------------
/src/Dragger/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import {
4 | int,
5 | innerHeight,
6 | innerWidth,
7 | outerHeight,
8 | outerWidth,
9 | parseBounds,
10 | isNumber
11 | } from './utils';
12 |
13 | import classNames from 'classnames';
14 |
15 | const doc = document;
16 |
17 | const noop = (x, y) => {};
18 |
19 | class Dragger extends React.Component {
20 | /**
21 | * 初始变量设置
22 | */
23 | static defaultProps = {
24 | allowX: true,
25 | allowY: true,
26 | x: void 666,
27 | y: void 666,
28 | onDragging: noop
29 | };
30 |
31 | shouldComponentUpdate(nextProps, nextState) {
32 | return (
33 | nextState !== this.state ||
34 | JSON.stringify(nextProps) !== JSON.stringify(this.props)
35 | );
36 | }
37 |
38 | state = {
39 | /** x轴位移,单位是px */
40 | x: 0,
41 | /** y轴位移,单位是px */
42 | y: 0,
43 | /**鼠标点击元素的原始位置,单位是px */
44 | originX: 0,
45 | originY: 0,
46 | /**已经移动的位移,单位是px */
47 | lastX: 0,
48 | lastY: 0,
49 | dragging: false,
50 | mouseInTarget: 0
51 | };
52 |
53 | getParent = node => {
54 | this.parent = node;
55 | };
56 |
57 | autoMove = (x, y) => {
58 | this.setState({
59 | x: x,
60 | y: y
61 | });
62 | };
63 |
64 | move = event => {
65 | /** 保证用户在移动元素的时候不会选择到元素内部的东西 */
66 | doc.body.style.userSelect = 'none';
67 |
68 | let { lastX, lastY } = this.state;
69 |
70 | /* event.client - this.state.origin 表示的是移动的距离,
71 | * elX表示的是原来已经有的位移
72 | */
73 | let deltaX = event.clientX - this.state.originX + lastX;
74 | let deltaY = event.clientY - this.state.originY + lastY;
75 |
76 | if (event.type === 'touchmove') {
77 | deltaX = event.touches[0].clientX - this.state.originX + lastX;
78 | deltaY = event.touches[0].clientY - this.state.originY + lastY;
79 | }
80 |
81 | /**
82 | * 网格式移动范围设定,永远移动 n 的倍数
83 | * 注意:设定移动范围的时候,一定要在判断bounds之前,否则会造成bounds不对齐
84 | */
85 | const { grid } = this.props;
86 | if (Array.isArray(grid) && grid.length === 2) {
87 | deltaX = Math.round(deltaX / grid[0]) * grid[0];
88 | deltaY = Math.round(deltaY / grid[1]) * grid[1];
89 | }
90 |
91 | const { bounds } = this.props;
92 | if (bounds) {
93 | /**
94 | * 如果用户指定一个边界,那么在这里处理
95 | */
96 | let NewBounds = bounds === true ? bounds : parseBounds(bounds);
97 |
98 | if (this.parent) {
99 | NewBounds = {
100 | left:
101 | int(this.parent.style.paddingLeft) +
102 | int(this.self.style.marginLeft) -
103 | this.self.offsetLeft,
104 | top:
105 | int(this.parent.style.paddingTop) +
106 | int(this.self.style.marginTop) -
107 | this.self.offsetTop,
108 | right:
109 | innerWidth(this.parent) -
110 | outerWidth(this.self) -
111 | this.self.offsetLeft +
112 | int(this.self.style.borderRight) -
113 | int(this.parent.style.paddingRight) -
114 | int(this.self.style.marginRight) -
115 | int(this.parent.style.borderRight),
116 | bottom:
117 | innerHeight(this.parent) -
118 | outerHeight(this.self) -
119 | this.self.offsetTop +
120 | int(this.parent.style.paddingBottom) -
121 | int(this.self.style.marginBottom)
122 | };
123 | }
124 |
125 | /**
126 | * 保证不超出右边界和底部
127 | *
128 | */
129 | if (isNumber(NewBounds.right)) deltaX = Math.min(deltaX, NewBounds.right);
130 | if (isNumber(NewBounds.bottom))
131 | deltaY = Math.min(deltaY, NewBounds.bottom);
132 |
133 | /**
134 | * 保证不超出左边和上边
135 | *
136 | */
137 | if (isNumber(NewBounds.left)) deltaX = Math.max(deltaX, NewBounds.left);
138 | if (isNumber(NewBounds.top)) deltaY = Math.max(deltaY, NewBounds.top);
139 | }
140 |
141 | /**如果设置了x,y限制 */
142 | deltaX = this.props.allowX ? deltaX : 0;
143 | deltaY = this.props.allowY ? deltaY : 0;
144 |
145 | /**移动时回调,用于外部控制 */
146 | this.props.onDragMove && this.props.onDragMove(event, deltaX, deltaY);
147 | this.props.onDragging(this.state.x, this.state.y);
148 |
149 | const ofy =
150 | event.clientY +
151 | this.props.parent().scrollTop -
152 | this.props.parent().getBoundingClientRect().top;
153 |
154 | this.setState({
155 | x: deltaX,
156 | y: ofy - this.state.mouseInTarget
157 | });
158 | };
159 |
160 | onDragStart = event => {
161 | if (this.props.static === true) return;
162 |
163 | /**
164 | * 把监听事件的回掉函数,绑定在document上
165 | * 当设置边界的时候,用户鼠标会离开元素的范围
166 | * 绑定在document上可以使得其依旧能够监听
167 | * 如果绑定在元素上,则鼠标离开元素,就不会再被监听了
168 | */
169 | doc.addEventListener('mousemove', this.move);
170 | doc.addEventListener('mouseup', this.onDragEnd);
171 |
172 | doc.addEventListener('touchmove', this.move);
173 | doc.addEventListener('touchend', this.onDragEnd);
174 |
175 | if (this.parent) {
176 | /**
177 | * 我们自己
178 | */
179 | this.self = event.currentTarget;
180 | }
181 |
182 | this.props.onDragStart &&
183 | this.props.onDragStart(event, this.state.x, this.state.y);
184 |
185 | this.props.onDragging(this.state.x, this.state.y);
186 |
187 | let deltaX = event.clientX;
188 | let deltaY = event.clientY;
189 |
190 | if (event.type === 'touchstart') {
191 | deltaX = event.touches[0].clientX;
192 | deltaY = event.touches[0].clientY;
193 | }
194 | this.setState({
195 | originX: deltaX,
196 | originY: deltaY,
197 | lastX: this.state.x,
198 | lastY: this.state.y,
199 | dragging: true,
200 | mouseInTarget: event.clientY - event.target.getBoundingClientRect().top
201 | });
202 | };
203 |
204 | setLastXandLastY = (x, y, originX, originY) => {
205 | this.setState({
206 | lastX: x,
207 | lastY: y,
208 | originY
209 | });
210 | };
211 |
212 | onDragEnd = event => {
213 | /** 取消用户选择限制,用户可以重新选择 */
214 | doc.body.style.userSelect = '';
215 |
216 | this.self = null;
217 | doc.removeEventListener('mousemove', this.move);
218 | doc.removeEventListener('mouseup', this.onDragEnd);
219 |
220 | doc.removeEventListener('touchmove', this.move);
221 | doc.removeEventListener('touchend', this.onDragEnd);
222 |
223 | this.props.onDragging(this.props.x, this.props.y);
224 | this.setState(
225 | {
226 | dragging: false
227 | },
228 | () => {
229 | if (this.props.onDragEnd) this.props.onDragEnd(event);
230 | }
231 | );
232 | };
233 |
234 | componentDidUpdate() {
235 | if (this.props.controlled) {
236 | if (this.props.x !== this.state.x || this.props.y !== this.state.y) {
237 | this.setState({
238 | x: this.props.x,
239 | y: this.props.y
240 | });
241 | }
242 | }
243 | }
244 |
245 | componentDidMount() {
246 | /**
247 | * 这个函数只会调用一次
248 | * 当外面的组件是受控组件的时候
249 | * 同于同步内外部的 x,y
250 | */
251 | if (typeof this.props.x === 'number' && typeof this.props.y === 'number') {
252 | this.setState({
253 | x: this.props.x,
254 | y: this.props.y
255 | });
256 | }
257 | }
258 |
259 | render() {
260 | const { x, y } = this.state;
261 | const { className, children, controlled } = this.props;
262 |
263 | let X = 0;
264 | let Y = 0;
265 | if (controlled) {
266 | X = this.props.x;
267 | Y = this.props.y;
268 | } else {
269 | X = x;
270 | Y = y;
271 | }
272 | // const X = this.props.x === void 666 ? x : this.props.x;
273 | // const Y = this.props.y === void 666 ? y : this.props.y;
274 |
275 | // /**主要是为了让用户定义自己的className去修改css */
276 | // const fixedClassName = classNames('WrapDragger', {
277 | // [className]: className !== void 666
278 | // });
279 |
280 | const getHandle = () => {
281 | return {
282 | onMouseDown: this.onDragStart,
283 | onMouseUp: this.onDragEnd,
284 | onTouchStart: this.onDragStart,
285 | onTouchEnd: this.onDragEnd
286 | };
287 | };
288 | const providedStyle = {
289 | touchAction: 'none!important',
290 | transform: `translate3d(${X}px,${Y}px,0)`
291 | };
292 | const bound = {
293 | instance: this.getParent,
294 | /**
295 | * 边框依赖 position 属性
296 | */
297 | style: { position: 'absolute' }
298 | };
299 |
300 | return children({
301 | style: providedStyle,
302 | handle: getHandle,
303 | x: X,
304 | y: Y,
305 | bound: bound,
306 | static: this.props.static,
307 | dragging: this.state.dragging
308 | });
309 | }
310 | }
311 |
312 | Dragger.propTypes = {
313 | /**
314 | * 给予元素一个x,y的初始位置,单位是px
315 | */
316 | x: PropTypes.number,
317 | y: PropTypes.number,
318 |
319 | /**
320 | * 以网格的方式移动,每次移动并不是平滑的移动
321 | * [20,30],鼠标x轴方向移动了20 px ,y方向移动了30 px,整个子元素才会移动
322 | */
323 | grid: PropTypes.arrayOf(PropTypes.number),
324 |
325 | /**只允许移动x轴 */
326 | allowX: PropTypes.bool,
327 |
328 | /**只允许移动y轴 */
329 | allowY: PropTypes.bool,
330 |
331 | /**
332 | * 是否由用户移动
333 | * 可能是通过外部props改变
334 | */
335 | isUserMove: PropTypes.bool,
336 |
337 | /**
338 | * 是否静态
339 | * 设置了就不可移动
340 | */
341 | static: PropTypes.bool,
342 |
343 | /**
344 | * 开始拖拽
345 | */
346 | onDragStart: PropTypes.func,
347 | /**
348 | * 正在拖拽
349 | */
350 | onDragMove: PropTypes.func,
351 | /**
352 | * 结束拖拽,鼠标弹开
353 | */
354 | onDragEnd: PropTypes.func,
355 |
356 | /**
357 | * 受控函数
358 | */
359 | onDragging: PropTypes.func
360 | };
361 |
362 | export default Dragger;
363 |
--------------------------------------------------------------------------------
/docs/main.ca19357e.js:
--------------------------------------------------------------------------------
1 | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},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=6)}([function(e,t,n){"use strict";e.exports=n(14)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=r(e),c=1;cc){for(var t=0,n=a.length-u;t-1?t:e}function p(e,t){t=t||{};var n=t.body;if(e instanceof p){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function m(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function y(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var g={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(g.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},w=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},g.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var _=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},f.call(p.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];y.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=p,e.Response=y,e.fetch=function(e,t){return new Promise(function(n,r){var o=new p(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:m(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new y(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&g.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});for(var a=n(0),l=n.n(a),u=n(15),c=n.n(u),s=n(23),f=(n.n(s),n(24)),d=n(25),p=(function(){function e(e,t){for(var n=0;nA.length&&A.push(e)}function d(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case x:a=!0}}if(a)return n(o,e,""===t?"."+p(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;lthis.eventPool.length&&this.eventPool.push(e)}function L(e){e.eventPool=[],e.getPooled=M,e.release=A}function z(e,t){switch(e){case"keyup":return-1!==xo.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function B(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function W(e,t){switch(e){case"compositionend":return B(t);case"keypress":return 32!==t.which?null:(No=!0,Po);case"textInput":return e=t.data,e===Po&&No?null:e;default:return null}}function V(e,t){if(Ro)return"compositionend"===e||!Eo&&z(e,t)?(e=D(),vo._root=null,vo._startText=null,vo._fallbackText=null,Ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function fe(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}function de(e){return e[1].toUpperCase()}function pe(e,t,n,r){var o=ni.hasOwnProperty(t)?ni[t]:null;(null!==o?0===o.type:!r&&(2Ni.length&&Ni.push(e)}}}function Ye(e){return Object.prototype.hasOwnProperty.call(e,ji)||(e[ji]=Di++,Ii[e[ji]]={}),Ii[e[ji]]}function qe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xe(e,t){var n=qe(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qe(n)}}function Ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Qe(e,t){if(Bi||null==Ai||Ai!==Lr())return null;var n=Ai;return"selectionStart"in n&&Ke(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,zi&&zr(zi,n)?null:(zi=n,e=F.getPooled(Mi.select,Li,e,t),e.type="select",e.target=Ai,O(e),e)}function Ge(e){var t="";return jr.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Je(e,t){return e=Mr({children:void 0},t),(t=Ge(t.children))&&(e.children=t),e}function Ze(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function rt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function ot(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function it(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?it(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function ut(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"===typeof i||""===i?"":r||"number"!==typeof i||0===i||ha.hasOwnProperty(o)&&ha[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function ct(e,t,n){t&&(ya[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function st(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ft(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ye(e);t=Kr[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function pt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function ht(e,t,n,r){var o=st(t,n);switch(t){case"iframe":case"object":We("load",e);var i=n;break;case"video":case"audio":for(i=0;iTa||(e.current=Ea[Ta],Ea[Ta]=null,Ta--)}function Tt(e,t){Ta++,Ea[Ta]=e.current,e.current=t}function Ct(e){return Pt(e)?Pa:Ca.current}function St(e,t){var n=e.type.contextTypes;if(!n)return Wr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pt(e){return 2===e.tag&&null!=e.type.childContextTypes}function Ot(e){Pt(e)&&(Et(Sa,e),Et(Ca,e))}function Nt(e){Et(Sa,e),Et(Ca,e)}function Rt(e,t,n){Ca.current!==Wr&&r("168"),Tt(Ca,t,e),Tt(Sa,n,e)}function Ut(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",ae(e)||"Unknown",i);return Mr({},t,n)}function It(e){if(!Pt(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Wr,Pa=Ca.current,Tt(Ca,t,e),Tt(Sa,Sa.current,e),!0}function Dt(e,t){var n=e.stateNode;if(n||r("169"),t){var o=Ut(e,Pa);n.__reactInternalMemoizedMergedChildContext=o,Et(Sa,e),Et(Ca,e),Tt(Ca,o,e)}else Et(Sa,e);Tt(Sa,t,e)}function jt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Ft(e,t,n){var r=e.alternate;return null===r?(r=new jt(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Mt(e,t,n){var o=e.type,i=e.key;if(e=e.props,"function"===typeof o)var a=o.prototype&&o.prototype.isReactComponent?2:0;else if("string"===typeof o)a=5;else switch(o){case Ho:return At(e.children,t,n,i);case Ko:a=11,t|=3;break;case $o:a=11,t|=2;break;case Yo:return o=new jt(15,e,i,4|t),o.type=Yo,o.expirationTime=n,o;case Go:a=16,t|=2;break;default:e:{switch("object"===typeof o&&null!==o?o.$$typeof:null){case qo:a=13;break e;case Xo:a=12;break e;case Qo:a=14;break e;default:r("130",null==o?o:typeof o,"")}a=void 0}}return t=new jt(a,e,i,t),t.type=o,t.expirationTime=n,t}function At(e,t,n,r){return e=new jt(10,e,r,t),e.expirationTime=n,e}function Lt(e,t,n){return e=new jt(6,e,null,t),e.expirationTime=n,e}function zt(e,t,n){return t=new jt(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bt(e,t,n){return t=new jt(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Wt(e){return function(t){try{return e(t)}catch(e){}}}function Vt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Oa=Wt(function(e){return t.onCommitFiberRoot(n,e)}),Na=Wt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function Ht(e){"function"===typeof Oa&&Oa(e)}function $t(e){"function"===typeof Na&&Na(e)}function Yt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function qt(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Xt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Kt(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Qt(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,i=null;null===o&&(o=e.updateQueue=Yt(e.memoizedState))}else o=e.updateQueue,i=r.updateQueue,null===o?null===i?(o=e.updateQueue=Yt(e.memoizedState),i=r.updateQueue=Yt(r.memoizedState)):o=e.updateQueue=qt(i):null===i&&(i=r.updateQueue=qt(o));null===i||o===i?Kt(o,t,n):null===o.lastUpdate||null===i.lastUpdate?(Kt(o,t,n),Kt(i,t,n)):(Kt(o,t,n),i.lastUpdate=t)}function Gt(e,t,n){var r=e.updateQueue;r=null===r?e.updateQueue=Yt(e.memoizedState):Jt(e,r),null===r.lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Jt(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=qt(t)),t}function Zt(e,t,n,r,o,i){switch(n.tag){case 1:return e=n.payload,"function"===typeof e?e.call(i,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=n.payload,null===(o="function"===typeof e?e.call(i,r,o):e)||void 0===o)break;return Mr({},r,o);case 2:Ra=!0}return r}function en(e,t,n,r,o){if(Ra=!1,!(0===t.expirationTime||t.expirationTime>o)){t=Jt(e,t);for(var i=t.baseState,a=null,l=0,u=t.firstUpdate,c=i;null!==u;){var s=u.expirationTime;s>o?(null===a&&(a=u,i=c),(0===l||l>s)&&(l=s)):(c=Zt(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(s=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>o?(null===s&&(s=u,null===a&&(i=c)),(0===l||l>f)&&(l=f)):(c=Zt(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===a&&(t.lastUpdate=null),null===s?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===s&&(i=c),t.baseState=i,t.firstUpdate=a,t.firstCapturedUpdate=s,t.expirationTime=l,e.memoizedState=c}}function tn(e,t){"function"!==typeof e&&r("191",e),e.call(t)}function nn(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,tn(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tn(t,n)),e=e.nextEffect}function rn(e,t){return{value:e,source:t,stack:le(t)}}function on(e){var t=e.type._context;Tt(Da,t._changedBits,e),Tt(Ia,t._currentValue,e),Tt(Ua,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function an(e){var t=Da.current,n=Ia.current;Et(Ua,e),Et(Ia,e),Et(Da,e),e=e.type._context,e._currentValue=n,e._changedBits=t}function ln(e){return e===ja&&r("174"),e}function un(e,t){Tt(Aa,t,e),Tt(Ma,e,e),Tt(Fa,ja,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=at(t,n)}Et(Fa,e),Tt(Fa,t,e)}function cn(e){Et(Fa,e),Et(Ma,e),Et(Aa,e)}function sn(e){Ma.current===e&&(Et(Fa,e),Et(Ma,e))}function fn(e,t,n){var r=e.memoizedState;t=t(n,r),r=null===t||void 0===t?r:Mr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function dn(e,t,n,r,o,i){var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,o,i):!e.prototype||!e.prototype.isPureReactComponent||(!zr(t,n)||!zr(r,o))}function pn(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&La.enqueueReplaceState(t,t.state,null)}function hn(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,i=Ct(e);r.props=o,r.state=e.memoizedState,r.refs=Wr,r.context=St(e,i),i=e.updateQueue,null!==i&&(en(e,i,o,r,t),r.state=e.memoizedState),i=e.type.getDerivedStateFromProps,"function"===typeof i&&(fn(e,i,o),r.state=e.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(n=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&La.enqueueReplaceState(r,r.state,null),null!==(i=e.updateQueue)&&(en(e,i,o,r,t),r.state=e.memoizedState)),"function"===typeof r.componentDidMount&&(e.effectTag|=4)}function mn(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var o=void 0;n&&(2!==n.tag&&r("110"),o=n.stateNode),o||r("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs===Wr?o.refs={}:o.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function yn(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function gn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return e=Ft(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,rm?(y=f,f=null):y=f.sibling;var g=p(r,f,l[m],u);if(null===g){null===f&&(f=y);break}e&&f&&null===g.alternate&&t(r,f),i=a(g,i,m),null===s?c=g:s.sibling=g,s=g,f=y}if(m===l.length)return n(r,f),c;if(null===f){for(;my?(g=m,m=null):g=m.sibling;var b=p(i,m,v.value,c);if(null===b){m||(m=g);break}e&&m&&null===b.alternate&&t(i,m),l=a(b,l,y),null===f?s=b:f.sibling=b,f=b,m=g}if(v.done)return n(i,m),s;if(null===m){for(;!v.done;y++,v=u.next())null!==(v=d(i,v.value,c))&&(l=a(v,l,y),null===f?s=v:f.sibling=v,f=v);return s}for(m=o(i,m);!v.done;y++,v=u.next())null!==(v=h(m,i,y,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?y:v.key),l=a(v,l,y),null===f?s=v:f.sibling=v,f=v);return e&&m.forEach(function(e){return t(i,e)}),s}return function(e,o,a,u){var c="object"===typeof a&&null!==a&&a.type===Ho&&null===a.key;c&&(a=a.props.children);var s="object"===typeof a&&null!==a;if(s)switch(a.$$typeof){case Wo:e:{for(s=a.key,c=o;null!==c;){if(c.key===s){if(10===c.tag?a.type===Ho:c.type===a.type){n(e,c.sibling),o=i(c,a.type===Ho?a.props.children:a.props,u),o.ref=mn(e,c,a),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===Ho?(o=At(a.props.children,e.mode,u,a.key),o.return=e,e=o):(u=Mt(a,e.mode,u),u.ref=mn(e,o,a),u.return=e,e=u)}return l(e);case Vo:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=zt(a,e.mode,u),o.return=e,e=o}return l(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a,u),o.return=e,e=o):(n(e,o),o=Lt(a,e.mode,u),o.return=e,e=o),l(e);if(za(a))return m(e,o,a,u);if(ie(a))return y(e,o,a,u);if(s&&yn(e,a),"undefined"===typeof a&&!c)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function vn(e,t){var n=new jt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function bn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function wn(e){if($a){var t=Ha;if(t){var n=t;if(!bn(e,t)){if(!(t=_t(n))||!bn(e,t))return e.effectTag|=2,$a=!1,void(Va=e);vn(Va,n)}Va=e,Ha=kt(t)}else e.effectTag|=2,$a=!1,Va=e}}function _n(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;Va=e}function kn(e){if(e!==Va)return!1;if(!$a)return _n(e),$a=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wt(t,e.memoizedProps))for(t=Ha;t;)vn(e,t),t=_t(t);return _n(e),Ha=Va?_t(e.stateNode):null,!0}function xn(){Ha=Va=null,$a=!1}function En(e,t,n){Tn(e,t,n,t.expirationTime)}function Tn(e,t,n,r){t.child=null===e?Wa(t,null,n,r):Ba(t,e.child,n,r)}function Cn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Sn(e,t,n,r,o){Cn(e,t);var i=0!==(64&t.effectTag);if(!n&&!i)return r&&Dt(t,!1),Rn(e,t);n=t.stateNode,zo.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(Tn(e,t,null,o),t.child=null),Tn(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Dt(t,!0),t.child}function Pn(e){var t=e.stateNode;t.pendingContext?Rt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rt(e,t.context,!1),un(e,t.containerInfo)}function On(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var i=0|o.stateNode;if(o.type===t&&0!==(i&n)){for(i=o;null!==i;){var a=i.alternate;if(0===i.expirationTime||i.expirationTime>r)i.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}i=i.return}i=null}else i=o.child;break;case 13:i=o.type===e.type?null:o.child;break;default:i=o.child}if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===e){i=null;break}if(null!==(o=i.sibling)){o.return=i.return,i=o;break}i=i.return}o=i}}function Nn(e,t,n){var r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=!0;if(Sa.current)a=!1;else if(i===o)return t.stateNode=0,on(t),Rn(e,t);var l=o.value;if(t.memoizedProps=o,null===i)l=1073741823;else if(i.value===o.value){if(i.children===o.children&&a)return t.stateNode=0,on(t),Rn(e,t);l=0}else{var u=i.value;if(u===l&&(0!==u||1/u===1/l)||u!==u&&l!==l){if(i.children===o.children&&a)return t.stateNode=0,on(t),Rn(e,t);l=0}else if(l="function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823,0===(l|=0)){if(i.children===o.children&&a)return t.stateNode=0,on(t),Rn(e,t)}else On(t,r,l,n)}return t.stateNode=l,on(t),En(e,t,o.children),t.child}function Rn(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=Ft(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=Ft(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function Un(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Pn(t);break;case 2:It(t);break;case 4:un(t,t.stateNode.containerInfo);break;case 13:on(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,a=Ct(t);return a=St(t,a),o=o(i,a),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,a=a.getDerivedStateFromProps,"function"===typeof a&&fn(t,a,i),i=It(t),o.updater=La,t.stateNode=o,o._reactInternalFiber=t,hn(t,n),e=Sn(e,t,!0,i,n)):(t.tag=1,En(e,t,o),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,n=t.pendingProps,Sa.current||t.memoizedProps!==n?(o=Ct(t),o=St(t,o),i=i(n,o),t.effectTag|=1,En(e,t,i),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 2:if(i=It(t),null===e)if(null===t.stateNode){var l=t.pendingProps,u=t.type;o=Ct(t);var c=2===t.tag&&null!=t.type.contextTypes;a=c?St(t,o):Wr,l=new u(l,a),t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,l.updater=La,t.stateNode=l,l._reactInternalFiber=t,c&&(c=t.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=o,c.__reactInternalMemoizedMaskedChildContext=a),hn(t,n),o=!0}else{u=t.type,o=t.stateNode,c=t.memoizedProps,a=t.pendingProps,o.props=c;var s=o.context;l=Ct(t),l=St(t,l);var f=u.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(c!==a||s!==l)&&pn(t,o,a,l),Ra=!1;var d=t.memoizedState;s=o.state=d;var p=t.updateQueue;null!==p&&(en(t,p,a,o,n),s=t.memoizedState),c!==a||d!==s||Sa.current||Ra?("function"===typeof f&&(fn(t,f,a),s=t.memoizedState),(c=Ra||dn(t,c,a,d,s,l))?(u||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.effectTag|=4)):("function"===typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=s),o.props=a,o.state=s,o.context=l,o=c):("function"===typeof o.componentDidMount&&(t.effectTag|=4),o=!1)}else u=t.type,o=t.stateNode,a=t.memoizedProps,c=t.pendingProps,o.props=a,s=o.context,l=Ct(t),l=St(t,l),f=u.getDerivedStateFromProps,(u="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==c||s!==l)&&pn(t,o,c,l),Ra=!1,s=t.memoizedState,d=o.state=s,p=t.updateQueue,null!==p&&(en(t,p,c,o,n),d=t.memoizedState),a!==c||s!==d||Sa.current||Ra?("function"===typeof f&&(fn(t,f,c),d=t.memoizedState),(f=Ra||dn(t,a,c,s,d,l))?(u||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(c,d,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(c,d,l)),"function"===typeof o.componentDidUpdate&&(t.effectTag|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),t.memoizedProps=c,t.memoizedState=d),o.props=c,o.state=d,o.context=l,o=f):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),o=!1);return Sn(e,t,o,i,n);case 3:return Pn(t),i=t.updateQueue,null!==i?(o=t.memoizedState,o=null!==o?o.element:null,en(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===o?(xn(),e=Rn(e,t)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(Ha=kt(t.stateNode.containerInfo),Va=t,o=$a=!0),o?(t.effectTag|=2,t.child=Wa(t,null,i,n)):(xn(),En(e,t,i)),e=t.child)):(xn(),e=Rn(e,t)),e;case 5:return ln(Aa.current),i=ln(Fa.current),o=at(i,t.type),i!==o&&(Tt(Ma,t,t),Tt(Fa,o,t)),null===e&&wn(t),i=t.type,c=t.memoizedProps,o=t.pendingProps,a=null!==e?e.memoizedProps:null,Sa.current||c!==o||((c=1&t.mode&&!!o.hidden)&&(t.expirationTime=1073741823),c&&1073741823===n)?(c=o.children,wt(i,o)?c=null:a&&wt(i,a)&&(t.effectTag|=16),Cn(e,t),1073741823!==n&&1&t.mode&&o.hidden?(t.expirationTime=1073741823,t.memoizedProps=o,e=null):(En(e,t,c),t.memoizedProps=o,e=t.child)):e=Rn(e,t),e;case 6:return null===e&&wn(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return un(t,t.stateNode.containerInfo),i=t.pendingProps,Sa.current||t.memoizedProps!==i?(null===e?t.child=Ba(t,null,i,n):En(e,t,i),t.memoizedProps=i,e=t.child):e=Rn(e,t),e;case 14:return i=t.type.render,n=t.pendingProps,o=t.ref,Sa.current||t.memoizedProps!==n||o!==(null!==e?e.ref:null)?(i=i(n,o),En(e,t,i),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 10:return n=t.pendingProps,Sa.current||t.memoizedProps!==n?(En(e,t,n),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 11:return n=t.pendingProps.children,Sa.current||null!==n&&t.memoizedProps!==n?(En(e,t,n),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=Rn(e,t):(En(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return Nn(e,t,n);case 12:e:if(o=t.type,a=t.pendingProps,c=t.memoizedProps,i=o._currentValue,l=o._changedBits,Sa.current||0!==l||c!==a){if(t.memoizedProps=a,u=a.unstable_observedBits,void 0!==u&&null!==u||(u=1073741823),t.stateNode=u,0!==(l&u))On(t,o,l,n);else if(c===a){e=Rn(e,t);break e}n=a.children,n=n(i),t.effectTag|=1,En(e,t,n),e=t.child}else e=Rn(e,t);return e;default:r("156")}}function In(e){e.effectTag|=4}function Dn(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return Ot(t),null;case 3:cn(t),Nt(t);var o=t.stateNode;return o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(kn(t),t.effectTag&=-3),Ya(t),null;case 5:sn(t),o=ln(Aa.current);var i=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,l=t.stateNode,u=ln(Fa.current);l=mt(l,i,a,n,o),qa(e,t,l,i,a,n,o,u),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=ln(Fa.current),kn(t))n=t.stateNode,i=t.type,a=t.memoizedProps,n[oo]=t,n[io]=a,o=gt(n,i,a,e,o),t.updateQueue=o,null!==o&&In(t);else{e=dt(i,n,o,e),e[oo]=t,e[io]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}ht(e,i,n,o),bt(i,n)&&In(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Xa(e,t,e.memoizedProps,n);else{if("string"!==typeof n)return null===t.stateNode&&r("166"),null;o=ln(Aa.current),ln(Fa.current),kn(t)?(o=t.stateNode,n=t.memoizedProps,o[oo]=t,vt(o,n)&&In(t)):(o=pt(n,o),o[oo]=t,t.stateNode=o)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return cn(t),Ya(t),null;case 13:return an(t),null;case 12:return null;case 0:r("167");default:r("156")}}function jn(e,t){var n=t.source;null===t.stack&&null!==n&&le(n),null!==n&&ae(n),t=t.value,null!==e&&2===e.tag&&ae(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Fn(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){Qn(e,t)}else t.current=null}function Mn(e){switch("function"===typeof $t&&$t(e),e.tag){case 2:Fn(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Qn(e,t)}break;case 5:Fn(e);break;case 4:zn(e)}}function An(e){return 5===e.tag||3===e.tag||4===e.tag}function Ln(e){e:{for(var t=e.return;null!==t;){if(An(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(lt(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||An(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(o){var a=t,l=i.stateNode,u=n;8===a.nodeType?a.parentNode.insertBefore(l,u):a.insertBefore(l,u)}else t.insertBefore(i.stateNode,n);else o?(a=t,l=i.stateNode,8===a.nodeType?a.parentNode.insertBefore(l,a):a.appendChild(l)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function zn(e){for(var t=e,n=!1,o=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:o=n.stateNode,i=!1;break e;case 3:case 4:o=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,l=a;;)if(Mn(l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===a)break;for(;null===l.sibling;){if(null===l.return||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(a=o,l=t.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):o.removeChild(t.stateNode)}else if(4===t.tag?o=t.stateNode.containerInfo:Mn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Bn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[io]=o,yt(n,a,i,e,o))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function Wn(e,t,n){n=Xt(n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hr(r),jn(e,t)},n}function Vn(e,t,n){n=Xt(n),n.tag=3;var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===cl?cl=new Set([this]):cl.add(this);var n=t.value,r=t.stack;jn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Hn(e,t,n,r,o,i){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=rn(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,r=Wn(e,r,i),void Gt(e,r,i);case 2:if(t=r,n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&(null===cl||!cl.has(n)))return e.effectTag|=1024,r=Vn(e,t,i),void Gt(e,r,i)}e=e.return}while(null!==e)}function $n(e){switch(e.tag){case 2:Ot(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return cn(e),Nt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return sn(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return cn(e),null;case 13:return an(e),null;default:return null}}function Yn(){if(null!==tl)for(var e=tl.return;null!==e;){var t=e;switch(t.tag){case 2:Ot(t);break;case 3:cn(t),Nt(t);break;case 5:sn(t);break;case 4:cn(t);break;case 13:an(t)}e=e.return}nl=null,rl=0,ol=-1,il=!1,tl=null,ul=!1}function qn(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=Dn(t,e,rl);var o=e;if(1073741823===rl||1073741823!==o.expirationTime){var i=0;switch(o.tag){case 3:case 2:var a=o.updateQueue;null!==a&&(i=a.expirationTime)}for(a=o.child;null!==a;)0!==a.expirationTime&&(0===i||i>a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1gl)&&(gl=e),e}function Zn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!el&&0!==rl&&tCl&&r("185")}e=e.return}}function er(){return Ga=_a()-Ka,Qa=2+(Ga/10|0)}function tr(e){var t=Za;Za=2+25*(1+((er()-2+500)/25|0));try{return e()}finally{Za=t}}function nr(e,t,n,r,o){var i=Za;Za=1;try{return e(t,n,r,o)}finally{Za=i}}function rr(e){if(0!==dl){if(e>dl)return;null!==pl&&xa(pl)}var t=_a()-Ka;dl=e,pl=ka(ar,{timeout:10*(e-2)-t})}function or(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===fl?(sl=fl=e,e.nextScheduledRoot=e):(fl=fl.nextScheduledRoot=e,fl.nextScheduledRoot=sl);else{var n=e.remainingExpirationTime;(0===n||t=yl)&&(!vl||er()>=yl);)er(),fr(ml,yl,!vl),ir();else for(;null!==ml&&0!==yl&&(0===e||e>=yl);)fr(ml,yl,!1),ir();null!==_l&&(dl=0,pl=null),0!==yl&&rr(yl),_l=null,vl=!1,sr()}function cr(e,t){hl&&r("253"),ml=e,yl=t,fr(e,t,!1),lr(),sr()}function sr(){if(Sl=0,null!==Tl){var e=Tl;Tl=null;for(var t=0;tb&&(w=b,b=C,C=w),w=Xe(E,C),_=Xe(E,b),w&&_&&(1!==T.rangeCount||T.anchorNode!==w.node||T.anchorOffset!==w.offset||T.focusNode!==_.node||T.focusOffset!==_.offset)&&(k=document.createRange(),k.setStart(w.node,w.offset),T.removeAllRanges(),C>b?(T.addRange(k),T.extend(_.node,_.offset)):(k.setEnd(_.node,_.offset),T.addRange(k))))),T=[];for(C=E;C=C.parentNode;)1===C.nodeType&&T.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof E.focus&&E.focus(),E=0;EPl)&&(vl=!0)}function hr(e){null===ml&&r("246"),ml.remainingExpirationTime=0,bl||(bl=!0,wl=e)}function mr(e){null===ml&&r("246"),ml.remainingExpirationTime=e}function yr(e,t){var n=kl;kl=!0;try{return e(t)}finally{(kl=n)||hl||lr()}}function gr(e,t){if(kl&&!xl){xl=!0;try{return e(t)}finally{xl=!1}}return e(t)}function vr(e,t){hl&&r("187");var n=kl;kl=!0;try{return nr(e,t)}finally{kl=n,lr()}}function br(e,t,n){if(El)return e(t,n);kl||hl||0===gl||(ur(gl,!1,null),gl=0);var r=El,o=kl;kl=El=!0;try{return e(t,n)}finally{El=r,(kl=o)||hl||lr()}}function wr(e){var t=kl;kl=!0;try{nr(e)}finally{(kl=t)||hl||ur(1,!1,null)}}function _r(e,t,n,o,i){var a=t.current;if(n){n=n._reactInternalFiber;var l;e:{for(2===Ie(n)&&2===n.tag||r("170"),l=n;3!==l.tag;){if(Pt(l)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}(l=l.return)||r("171")}l=l.stateNode.context}n=Pt(n)?Ut(n,l):l}else n=Wr;return null===t.context?t.context=n:t.pendingContext=n,t=i,i=Xt(o),i.payload={element:e},t=void 0===t?null:t,null!==t&&(i.callback=t),Qt(a,i,o),Zn(a,o),o}function kr(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Fe(t),null===e?null:e.stateNode}function xr(e,t,n,r){var o=t.current;return o=Jn(er(),o),_r(e,t,n,o,r)}function Er(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Tr(e){var t=e.findFiberByHostInstance;return Vt(Mr({},e,{findHostInstanceByFiber:function(e){return e=Fe(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function Cr(e,t,n){var r=3=To),Po=String.fromCharCode(32),Oo={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},No=!1,Ro=!1,Uo={eventTypes:Oo,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(Eo)e:{switch(e){case"compositionstart":o=Oo.compositionStart;break e;case"compositionend":o=Oo.compositionEnd;break e;case"compositionupdate":o=Oo.compositionUpdate;break e}o=void 0}else Ro?z(e,n)&&(o=Oo.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Oo.compositionStart);return o?(So&&(Ro||o!==Oo.compositionStart?o===Oo.compositionEnd&&Ro&&(i=D()):(vo._root=r,vo._startText=j(),Ro=!0)),o=_o.getPooled(o,t,n,r),i?o.data=i:null!==(i=B(n))&&(o.data=i),O(o),i=o):i=null,(e=Co?W(e,n):V(e,n))?(t=ko.getPooled(Oo.beforeInput,t,n,r),t.data=e,O(t)):t=null,null===i?t:null===t?i:[i,t]}},Io=null,Do={injectFiberControlledHostComponent:function(e){Io=e}},jo=null,Fo=null,Mo={injection:Do,enqueueStateRestore:$,needsStateRestore:Y,restoreStateIfNeeded:q},Ao=!1,Lo={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},zo=jr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bo="function"===typeof Symbol&&Symbol.for,Wo=Bo?Symbol.for("react.element"):60103,Vo=Bo?Symbol.for("react.portal"):60106,Ho=Bo?Symbol.for("react.fragment"):60107,$o=Bo?Symbol.for("react.strict_mode"):60108,Yo=Bo?Symbol.for("react.profiler"):60114,qo=Bo?Symbol.for("react.provider"):60109,Xo=Bo?Symbol.for("react.context"):60110,Ko=Bo?Symbol.for("react.async_mode"):60111,Qo=Bo?Symbol.for("react.forward_ref"):60112,Go=Bo?Symbol.for("react.timeout"):60113,Jo="function"===typeof Symbol&&Symbol.iterator,Zo=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ei={},ti={},ni={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ni[e]=new fe(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ni[t]=new fe(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ni[e]=new fe(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){ni[e]=new fe(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ni[e]=new fe(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ni[e]=new fe(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){ni[e]=new fe(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){ni[e]=new fe(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){ni[e]=new fe(e,5,!1,e.toLowerCase(),null)});var ri=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ri,de);ni[t]=new fe(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ri,de);ni[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ri,de);ni[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ni.tabIndex=new fe("tabIndex",1,!1,"tabindex",null);var oi={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},ii=null,ai=null,li=!1;Fr.canUseDOM&&(li=ee("input")&&(!document.documentMode||9=document.documentMode,Mi={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ai=null,Li=null,zi=null,Bi=!1,Wi={eventTypes:Mi,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Ye(i),o=Kr.onSelect;for(var a=0;at)){e=-1;for(var n=[],r=Ji;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||ot&&(t=8),ia=t"+t+"",t=da.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),ha={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},ma=["Webkit","ms","Moz","O"];Object.keys(ha).forEach(function(e){ma.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ha[t]=ha[e]})});var ya=Mr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ga=Ar.thatReturns(""),va={createElement:dt,createTextNode:pt,setInitialProperties:ht,diffProperties:mt,updateProperties:yt,diffHydratedProperties:gt,diffHydratedText:vt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ge(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t.5?t+1:t},p=function(e,t,n){return Math.max(t,Math.min(e,n))},h=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.dragging=function(e,t,r,o){n.currentX=t,n.currentY=r;var i=n.props.horizontal?t:r,a=d(i/n.getGap(e.o)),l=n.state.order.length-1,u=n.state.order.map(function(t){return a===t.o?Object.assign({},t,{o:e.o}):e.o===t.o?Object.assign({},t,{o:p(a,0,l)}):t});if(console.log(i),n.container.scrollTop+300-r<100&&-1===n.timer){var c=n.container.scrollTop,s=o.clientY/80;n.timer=setInterval(function(){var t=n.state.order.length-1;if(!(n.state.currentOrder>=t)){var r=n.currentY+n.container.scrollTop-c;n.manager[e.name].autoMove(n.currentX,r),n.container.scrollTop+=s;var o=d(r/n.getGap(e.o)),i=n.state.order.map(function(n){return e.name===n.name?Object.assign({},n,{o:o}):e.name!==n.name&&o===n.o?Object.assign({},n,{o:p(o-1,0,t)}):n});n.setState({currentOrder:o,order:i,autoScrolling:!0}),r-n.container.scrollTop<150&&n.state.autoScrolling&&(clearInterval(n.timer),n.timer=-1,n.setState({autoScrolling:!1}))}},5)}n.state.autoScrolling||n.setState({currentOrder:e.o,order:u})},n.dragEnd=function(){clearInterval(n.timer),n.timer=-1,n.setState({currentOrder:-1,autoScrolling:!1})},n.getGap=function(){return n.props.gap};var i=e.data;return n.state={order:i,currentOrder:-1,autoScrolling:!1},n.manager={},n.timer=-1,n.currentX=0,n.currentY=0,n}return i(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e,t){return!s()(this.props,e)||!s()(t,this.state)}},{key:"render",value:function(){var e=this;return l.a.createElement("div",{ref:function(t){return e.container=t},style:{height:300,overflow:"scroll"}},l.a.createElement("div",{style:{position:"relative",height:2e3}},this.state.order.map(function(t){var n=t.o*e.getGap(t.o);return l.a.createElement(u.a,{ref:function(n){return e.manager[t.name]=n},parent:function(){return e.container},onDragMove:function(n,r,o){return e.dragging(t,r,o,n)},key:t.name,x:e.props.horizontal?n:0,controlled:e.state.currentOrder!==t.o,y:e.props.horizontal?0:n,onDragEnd:e.dragEnd},function(n){var r=n.style,o=n.handle;n.dragging;return l.a.createElement("div",{style:Object.assign({},r,{position:"absolute",transition:e.state.currentOrder===t.o?"":"all 0.3s"})},e.props.renderItem(o,t))})})))}}]),t}(l.a.Component);h.defaultProps={gap:80,horizontal:!1,renderItem:function(){return null}},t.a=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),l=n.n(a),u=n(27),c=n.n(u),s=n(30),f=n(31),d=(n.n(f),function(){function e(e,t){for(var n=0;n