} List of rendered nodes.\n * @internal\n */\n dangerouslyRenderMarkup: function (markupList) {\n !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString for server rendering.') : invariant(false) : undefined;\n var nodeName;\n var markupByNodeName = {};\n // Group markup by `nodeName` if a wrap is necessary, else by '*'.\n for (var i = 0; i < markupList.length; i++) {\n !markupList[i] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : undefined;\n nodeName = getNodeName(markupList[i]);\n nodeName = getMarkupWrap(nodeName) ? nodeName : '*';\n markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];\n markupByNodeName[nodeName][i] = markupList[i];\n }\n var resultList = [];\n var resultListAssignmentCount = 0;\n for (nodeName in markupByNodeName) {\n if (!markupByNodeName.hasOwnProperty(nodeName)) {\n continue;\n }\n var markupListByNodeName = markupByNodeName[nodeName];\n\n // This for-in loop skips the holes of the sparse array. The order of\n // iteration should follow the order of assignment, which happens to match\n // numerical index order, but we don't rely on that.\n var resultIndex;\n for (resultIndex in markupListByNodeName) {\n if (markupListByNodeName.hasOwnProperty(resultIndex)) {\n var markup = markupListByNodeName[resultIndex];\n\n // Push the requested markup with an additional RESULT_INDEX_ATTR\n // attribute. If the markup does not start with a < character, it\n // will be discarded below (with an appropriate console.error).\n markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP,\n // This index will be parsed back out below.\n '$1 ' + RESULT_INDEX_ATTR + '=\"' + resultIndex + '\" ');\n }\n }\n\n // Render each group of markup with similar wrapping `nodeName`.\n var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with ';\n domainInput = '';\n }\n return '\\n \\n \\n \\n \\n \\n ' + domainScript + '\\n \\n \\n \\n \\n \\n ';\n },\n\n render: function render() {\n return _react2['default'].createElement(\n 'span',\n { style: { position: 'relative', zIndex: 0 } },\n _react2['default'].createElement('iframe', { ref: 'iframe',\n onLoad: this.onLoad,\n style: iframeStyle }),\n this.props.children\n );\n },\n\n initIframeSrc: function initIframeSrc() {\n if (this.domain) {\n this.getIframeNode().src = 'javascript:void((function(){\\n var d = document;\\n d.open();\\n d.domain=\\'' + this.domain + '\\';\\n d.write(\\'\\');\\n d.close();\\n })())';\n }\n },\n\n initIframe: function initIframe() {\n var iframeNode = this.getIframeNode();\n var win = iframeNode.contentWindow;\n var doc = undefined;\n this.domain = this.domain || '';\n this.initIframeSrc();\n try {\n doc = win.document;\n } catch (e) {\n this.domain = document.domain;\n this.initIframeSrc();\n win = iframeNode.contentWindow;\n doc = win.document;\n }\n doc.open('text/html', 'replace');\n doc.write(this.getIframeHTML(this.domain));\n doc.close();\n this.getFormInputNode().onchange = this.onChange;\n },\n\n enableIframe: function enableIframe() {\n this.loading = false;\n this.getIframeNode().style.display = '';\n },\n\n disabledIframe: function disabledIframe() {\n this.loading = true;\n this.getIframeNode().style.display = 'none';\n },\n\n updateIframeWH: function updateIframeWH() {\n var rootNode = _react2['default'].findDOMNode(this);\n var iframeNode = this.getIframeNode();\n iframeNode.style.height = rootNode.offsetHeight + 'px';\n iframeNode.style.width = rootNode.offsetWidth + 'px';\n }\n});\n\nexports['default'] = IframeUploader;\nmodule.exports = exports['default'];\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/rc-upload/lib/IframeUploader.js\n ** module id = 612\n ** module chunks = 0\n **/","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || (/^[s\\W]*$/).test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/rc-upload/~/warning/browser.js\n ** module id = 613\n ** module chunks = 0\n **/","import React from 'react';\nimport Animate from 'rc-animate';\nimport Icon from '../iconfont';\nconst prefixCls = 'ant-upload';\nimport { Line } from '../progress';\n\nexport default React.createClass({\n getDefaultProps() {\n return {\n items: [],\n progressAttr: {\n strokeWidth: 3,\n showInfo: false\n }\n };\n },\n handleClose(file) {\n this.props.onRemove(file);\n },\n render() {\n let list = this.props.items.map((file) => {\n let progress;\n let infoUploadingClass = '';\n if (file.status === 'uploading') {\n progress = \n \n
;\n infoUploadingClass = ' ' + prefixCls + '-list-item-uploading';\n }\n return (\n \n
\n \n {file.name}\n \n
\n { progress }\n
\n );\n });\n return ;\n }\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/upload/uploadList.jsx\n **/","export default function getFileItem(file, fileList) {\n let matchWay = (!file.uid) ? 'byName' : 'byUid';\n let target = fileList.filter((item) => {\n if (matchWay === 'byName') {\n return item.name === file.name;\n } else {\n return item.uid === file.uid;\n }\n })[0];\n return target;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/upload/getFileItem.js\n **/","import React, { cloneElement } from 'react';\nconst prefixCls = 'ant-badge';\n\nclass AntBadge extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n if (this.props.dot) {\n return \n {this.props.children}\n \n ;\n }\n let count = this.props.count;\n if (!count) {\n return cloneElement(this.props.children);\n } else {\n count = count >= 100 ? '99+' : count;\n return (\n \n {this.props.children}\n {count}\n \n );\n }\n }\n}\n\nAntBadge.defaultProps = {\n prefixCls: prefixCls,\n count: null,\n dot: false\n};\n\nAntBadge.propTypes = {\n count: React.PropTypes.oneOfType([\n React.PropTypes.string,\n React.PropTypes.number\n ]),\n dot: React.PropTypes.bool\n};\n\nexport default AntBadge;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/badge/index.jsx\n **/","import React from 'react';\nimport Menu from 'rc-menu';\nimport animation from '../common/openAnimation';\n\nconst AntMenu = React.createClass({\n getDefaultProps() {\n return {\n prefixCls: 'ant-menu'\n };\n },\n render() {\n let openAnimation = '';\n switch (this.props.mode) {\n case 'horizontal':\n openAnimation = 'slide-up';\n break;\n case 'vertical':\n openAnimation = 'zoom-big';\n break;\n case 'inline':\n openAnimation = animation;\n break;\n default:\n }\n if (this.props.mode === 'inline') {\n return ;\n } else {\n return ;\n }\n }\n});\n\nAntMenu.Divider = Menu.Divider;\nAntMenu.Item = Menu.Item;\nAntMenu.SubMenu = Menu.SubMenu;\n\nexport default AntMenu;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/menu/index.jsx\n **/","import React from 'react';\n\nlet Timeline = React.createClass({\n getDefaultProps() {\n return {\n prefixCls: 'ant-timeline'\n };\n },\n render() {\n let children = this.props.children;\n return (\n \n {React.Children.map(children, function (ele, idx) {\n let np = {\n timelineLast: idx === children.length - 1,\n pending: this.props.pending\n };\n return React.cloneElement(ele, np);\n }, this)}\n
\n );\n }\n});\n\nTimeline.Item = React.createClass({\n getDefaultProps() {\n return {\n prefixCls: 'ant-timeline',\n color: 'blue',\n pending: false\n };\n },\n render() {\n let props = this.props;\n let prefixCls = props.prefixCls;\n let color = props.color;\n let pending = props.pending;\n let timelineLast = props.timelineLast;\n let endCls = pending && timelineLast ? prefixCls + '-item-last' : '';\n let last = pending && timelineLast ? : null;\n let lastTailShow = (timelineLast && !pending) ? 'none' : 'block';\n\n return (\n \n \n \n {props.children}
\n {last}\n \n );\n }\n});\n\nexport default Timeline;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/timeline/index.jsx\n **/","import Row from './row';\nimport Col from './col';\n\nexport {\n Row,\n Col,\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/layout/index.jsx\n **/","import React from 'react';\nimport rcUtil from 'rc-util';\n\nconst Row = React.createClass({\n propTypes: {\n type: React.PropTypes.string,\n align: React.PropTypes.string,\n justify: React.PropTypes.string,\n className: React.PropTypes.string,\n children: React.PropTypes.node,\n },\n render() {\n const { type, justify, align, className, ...others } = this.props;\n const classes = rcUtil.classSet({\n 'row': true,\n ['row-' + type]: type,\n ['row-' + type + '-' + justify]: justify,\n ['row-' + type + '-' + align]: align,\n [className]: className,\n });\n return { this.props.children }
;\n },\n});\n\nexport default Row;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/layout/row.jsx\n **/","import React from 'react';\nimport rcUtil from 'rc-util';\n\nconst Col = React.createClass({\n propTypes: {\n span: React.PropTypes.string,\n order: React.PropTypes.string,\n offset: React.PropTypes.string,\n push: React.PropTypes.string,\n pull: React.PropTypes.string,\n className: React.PropTypes.string,\n children: React.PropTypes.node,\n },\n render() {\n const {span, order, offset, push, pull, className, ...others} = this.props;\n const classes = rcUtil.classSet({\n ['col-' + span]: span,\n ['col-order-' + order]: order,\n ['col-offset-' + offset]: offset,\n ['col-push-' + push]: push,\n ['col-pull-' + pull]: pull,\n [className]: className,\n });\n return { this.props.children }
;\n },\n});\n\nexport default Col;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/layout/col.jsx\n **/","import Form from './Form';\nimport FormItem from './FormItem';\nimport ValueMixin from './ValueMixin';\nimport Input from './Input';\n\nForm.Item = FormItem;\nForm.ValueMixin = ValueMixin;\nexport default {\n Form,\n Input\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/form/index.jsx\n **/","import React from 'react';\nimport rcUtil from 'rc-util';\n\nconst cx = rcUtil.classSet;\n\nclass Form extends React.Component {\n render() {\n const prefixCls = this.props.prefixCls;\n const formClassName = {\n [`${prefixCls}-horizontal`]: this.props.horizontal,\n [`${prefixCls}-inline`]: this.props.inline,\n };\n const classes = cx(formClassName);\n\n return (\n \n );\n }\n}\n\nForm.propTypes = {\n prefixCls: React.PropTypes.string,\n horizontal: React.PropTypes.bool,\n inline: React.PropTypes.bool,\n children: React.PropTypes.any,\n onSubmit: React.PropTypes.func,\n};\n\nForm.defaultProps = {\n prefixCls: 'ant-form',\n};\n\nmodule.exports = Form;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/form/Form.jsx\n **/","import React from 'react';\nimport rcUtil from 'rc-util';\n\nconst cx = rcUtil.classSet;\n\nfunction prefixClsFn(prefixCls, ...args) {\n return args.map((s)=> {\n return prefixCls + '-' + s;\n }).join(' ');\n}\n\nclass FormItem extends React.Component {\n _getLayoutClass(colDef) {\n if (!colDef) {\n return '';\n }\n const {span, offset} = colDef;\n const col = span ? 'col-' + span : '';\n const offsetCol = offset ? ' col-offset-' + offset : '';\n return col + offsetCol;\n }\n\n renderHelp() {\n const prefixCls = this.props.prefixCls;\n return (\n \n {this.props.help}\n
\n );\n }\n\n renderValidateWrapper(c1, c2) {\n let classes = '';\n if (this.props.validateStatus) {\n classes = cx(\n {\n 'has-feedback': this.props.hasFeedback,\n 'has-success': this.props.validateStatus === 'success',\n 'has-warning': this.props.validateStatus === 'warning',\n 'has-error': this.props.validateStatus === 'error',\n 'is-validating': this.props.validateStatus === 'validating',\n }\n );\n }\n return (\n \n {c1} {c2}\n
\n );\n }\n\n renderWrapper(children) {\n const wrapperCol = this.props.wrapperCol;\n return (\n \n {children}\n
\n );\n }\n\n renderLabel() {\n const labelCol = this.props.labelCol;\n const required = this.props.required ? 'required' : '';\n\n return this.props.label ? (\n \n ) : null;\n }\n\n renderChildren() {\n return [\n this.renderLabel(),\n this.renderWrapper(\n this.renderValidateWrapper(\n this.props.children,\n this.renderHelp()\n )\n ),\n ];\n }\n\n // 判断是否要 `.ant-form-item-compact` 样式类\n _isCompact(children) {\n const compactControls = ['checkbox', 'radio', 'radio-group', 'static', 'file'];\n let isCompact = false;\n\n if (!Array.isArray(children)) {\n children = [children];\n }\n children.map((child, i) => {\n const type = child.props && child.props.type;\n let prefixCls = child.props && child.props.prefixCls;\n prefixCls = prefixCls ? prefixCls.substring(prefixCls.indexOf('-') + 1) : '';\n\n if ((type && compactControls.indexOf(type) > -1) || (prefixCls && compactControls.indexOf(prefixCls) > -1)) {\n isCompact = true;\n } else if (child.props && typeof child.props.children === 'object') {\n isCompact = this._isCompact(child.props.children);\n }\n });\n\n return isCompact;\n }\n\n renderFormItem(children) {\n const props = this.props;\n const prefixCls = props.prefixCls;\n const itemClassName = {\n [`${prefixCls}-item`]: true,\n [`${prefixCls}-item-compact`]: this._isCompact(props.children),\n };\n\n return (\n \n {children}\n
\n );\n }\n\n render() {\n const children = this.renderChildren();\n return this.renderFormItem(children);\n }\n}\n\nFormItem.propTypes = {\n prefixCls: React.PropTypes.string,\n label: React.PropTypes.node,\n labelCol: React.PropTypes.object,\n help: React.PropTypes.node,\n validateStatus: React.PropTypes.oneOf(['', 'success', 'warning', 'error', 'validating']),\n hasFeedback: React.PropTypes.bool,\n wrapperCol: React.PropTypes.object,\n className: React.PropTypes.string,\n children: React.PropTypes.node,\n};\n\nFormItem.defaultProps = {\n hasFeedback: false,\n required: false,\n prefixCls: 'ant-form',\n};\n\nmodule.exports = FormItem;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/form/FormItem.jsx\n **/","function merge() {\n const ret = {};\n const args = [].slice.call(arguments, 0);\n args.forEach((a)=> {\n Object.keys(a).forEach((k)=> {\n ret[k] = a[k];\n });\n });\n return ret;\n}\n\nconst ValueMixin = {\n setValue(field, e) {\n let v = e;\n const target = e && e.target;\n if (target) {\n if ((target.nodeName + '').toLowerCase() === 'input' &&\n target.type === 'checkbox') {\n v = target.checked;\n } else {\n v = e.target.value;\n }\n }\n const newFormData = {};\n newFormData[field] = v;\n this.setState({\n formData: merge(this.state.formData, newFormData),\n });\n },\n};\n\nexport default ValueMixin;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/form/ValueMixin.jsx\n **/","import React from 'react';\n\nfunction prefixClsFn(prefixCls, ...args) {\n return args.map((s)=> {\n return prefixCls + '-' + s;\n }).join(' ');\n}\n\nclass Group extends React.Component {\n render() {\n return (\n \n {this.props.children}\n
\n );\n }\n}\n\nGroup.propTypes = {\n className: React.PropTypes.string,\n children: React.PropTypes.any,\n};\n\nGroup.defaultProps = {\n className: 'ant-input-group',\n};\n\n\nclass Input extends React.Component {\n renderLabledInput(children) {\n const props = this.props;\n const wrapperClassName = prefixClsFn(props.prefixCls, 'input-group');\n const addonClassName = prefixClsFn(wrapperClassName, 'addon');\n const addonBefore = props.addonBefore ? (\n \n {props.addonBefore}\n \n ) : null;\n\n const addonAfter = props.addonAfter ? (\n \n {props.addonAfter}\n \n ) : null;\n\n return (\n \n {addonBefore}\n {children}\n {addonAfter}\n
\n );\n }\n\n renderInput() {\n const props = this.props;\n const prefixCls = props.prefixCls;\n let inputClassName = prefixClsFn(prefixCls, 'input');\n if (!props.type) {\n return props.children;\n }\n\n switch (props.size) {\n case 'small': inputClassName = prefixClsFn(prefixCls, 'input', 'input-sm'); break;\n case 'large': inputClassName = prefixClsFn(prefixCls, 'input', 'input-lg'); break;\n default:\n }\n\n switch (props.type) {\n case 'textarea':\n return ;\n default:\n inputClassName = props.className ? props.className : inputClassName;\n return ;\n }\n }\n\n render() {\n return this.renderLabledInput(this.renderInput());\n }\n}\n\nInput.propTypes = {\n type: React.PropTypes.string,\n id: React.PropTypes.oneOfType([\n React.PropTypes.string,\n React.PropTypes.number,\n ]),\n size: React.PropTypes.oneOf(['small', 'default', 'large']),\n disabled: React.PropTypes.bool,\n value: React.PropTypes.any,\n defaultValue: React.PropTypes.any,\n className: React.PropTypes.string,\n addonBefore: React.PropTypes.node,\n addonAfter: React.PropTypes.node,\n prefixCls: React.PropTypes.string,\n};\n\nInput.defaultProps = {\n defaultValue: '',\n disabled: false,\n prefixCls: 'ant',\n type: 'text',\n};\n\nmodule.exports = Input;\nmodule.exports.Group = Group;\n\n\n\n/** WEBPACK FOOTER **\n ** ./components/form/Input.jsx\n **/","module.exports = {\n\t\"name\": \"antd\",\n\t\"version\": \"0.10.0-beta16\",\n\t\"stableVersion\": \"0.9.4\",\n\t\"title\": \"Ant Design\",\n\t\"description\": \"一个 UI 设计语言\",\n\t\"homepage\": \"http://ant.design/\",\n\t\"keywords\": [\n\t\t\"ant\",\n\t\t\"design\",\n\t\t\"react\",\n\t\t\"react-component\",\n\t\t\"component\",\n\t\t\"components\",\n\t\t\"ui\",\n\t\t\"framework\",\n\t\t\"frontend\"\n\t],\n\t\"contributors\": [\n\t\t\"ant\"\n\t],\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/ant-design/ant-design\"\n\t},\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/ant-design/ant-design/issues\"\n\t},\n\t\"main\": \"lib/index\",\n\t\"files\": [\n\t\t\"lib\",\n\t\t\"style\"\n\t],\n\t\"license\": \"MIT\",\n\t\"dependencies\": {\n\t\t\"css-animation\": \"1.1.x\",\n\t\t\"gregorian-calendar\": \"~4.0.1\",\n\t\t\"gregorian-calendar-format\": \"~4.0.4\",\n\t\t\"object-assign\": \"~4.0.1\",\n\t\t\"rc-animate\": \"~2.0.0\",\n\t\t\"rc-calendar\": \"4.0.0-alpha10\",\n\t\t\"rc-checkbox\": \"~1.1.1\",\n\t\t\"rc-collapse\": \"~1.4.0\",\n\t\t\"rc-dialog\": \"~5.1.0\",\n\t\t\"rc-dropdown\": \"~1.4.3\",\n\t\t\"rc-form-validation\": \"~2.4.7\",\n\t\t\"rc-input-number\": \"~2.3.0\",\n\t\t\"rc-menu\": \"~4.7.0\",\n\t\t\"rc-notification\": \"~1.2.0\",\n\t\t\"rc-pagination\": \"~1.1.0\",\n\t\t\"rc-progress\": \"~1.0.0\",\n\t\t\"rc-queue-anim\": \"~0.10.5\",\n\t\t\"rc-radio\": \"~2.0.0\",\n\t\t\"rc-select\": \"~5.0.0\",\n\t\t\"rc-slider\": \"~2.0.0\",\n\t\t\"rc-steps\": \"~1.4.0\",\n\t\t\"rc-switch\": \"~1.2.0\",\n\t\t\"rc-table\": \"~3.5.0\",\n\t\t\"rc-tabs\": \"~5.4.3\",\n\t\t\"rc-tooltip\": \"~3.1.0\",\n\t\t\"rc-tree\": \"~0.18.1\",\n\t\t\"rc-upload\": \"~1.6.4\",\n\t\t\"rc-util\": \"~2.0.3\",\n\t\t\"react-slick\": \"~0.8.0\",\n\t\t\"reqwest\": \"~2.0.5\",\n\t\t\"semver\": \"~5.0.3\",\n\t\t\"util-deprecate\": \"~1.0.1\",\n\t\t\"velocity-animate\": \"~1.2.2\",\n\t\t\"warning\": \"~2.1.0\"\n\t},\n\t\"devDependencies\": {\n\t\t\"autoprefixer-loader\": \"^3.1.0\",\n\t\t\"babel\": \"^5.8.29\",\n\t\t\"babel-core\": \"^5.8.29\",\n\t\t\"babel-eslint\": \"^4.1.0\",\n\t\t\"babel-jest\": \"^5.3.0\",\n\t\t\"babel-loader\": \"^5.3.2\",\n\t\t\"busboy\": \"^0.2.9\",\n\t\t\"chalk\": \"^1.1.0\",\n\t\t\"clipboard\": \"~1.5.3\",\n\t\t\"css-loader\": \"^0.14.1\",\n\t\t\"eslint\": \"^1.1.0\",\n\t\t\"eslint-config-airbnb\": \"^0.1.0\",\n\t\t\"eslint-plugin-babel\": \"^2.1.1\",\n\t\t\"eslint-plugin-react\": \"^3.3.1\",\n\t\t\"extract-text-webpack-plugin\": \"^0.8.1\",\n\t\t\"gh-pages\": \"^0.3.1\",\n\t\t\"jest-cli\": \"~0.6.1\",\n\t\t\"json-loader\": \"^0.5.1\",\n\t\t\"less-loader\": \"^2.2.0\",\n\t\t\"lodash\": \"^3.10.0\",\n\t\t\"nico-jsx\": \"~0.6.0\",\n\t\t\"precommit-hook\": \"^1.0.7\",\n\t\t\"react\": \"~0.14.1\",\n\t\t\"react-addons-test-utils\": \"~0.14.1\",\n\t\t\"react-dom\": \"~0.14.1\",\n\t\t\"react-router\": \"1.0.0-rc3\",\n\t\t\"webpack\": \"^1.10.1\",\n\t\t\"webpack-babel-jest\": \"^1.0.0\",\n\t\t\"webpack-dev-middleware\": \"^1.2.0\"\n\t},\n\t\"scripts\": {\n\t\t\"babel\": \"babel components index.js --out-dir lib\",\n\t\t\"start\": \"npm run clean && nico server --watch\",\n\t\t\"clean\": \"rm -rf _site dist\",\n\t\t\"deploy\": \"rm -rf node_modules && node scripts/install.js && npm run just-deploy\",\n\t\t\"just-deploy\": \"npm run clean && webpack --config webpack.deploy.config.js && NODE_ENV=PRODUCTION nico build && node scripts/deploy.js\",\n\t\t\"lint\": \"eslint components index.js --ext '.js,.jsx'\",\n\t\t\"test\": \"npm run lint && webpack && npm run jest\",\n\t\t\"jest\": \"jest\",\n\t\t\"pub\": \"sh ./scripts/publish.sh\",\n\t\t\"webpack\": \"webpack\",\n\t\t\"beta\": \"sh ./scripts/publish.sh --tag beta\"\n\t},\n\t\"jest\": {\n\t\t\"moduleFileExtensions\": [\n\t\t\t\"js\",\n\t\t\t\"jsx\",\n\t\t\t\"json\"\n\t\t],\n\t\t\"unmockedModulePathPatterns\": [\n\t\t\t\"/node_modules/*\"\n\t\t],\n\t\t\"testPathIgnorePatterns\": [\n\t\t\t\"/node_modules/\",\n\t\t\t\"/_site/\"\n\t\t],\n\t\t\"scriptPreprocessor\": \"/node_modules/webpack-babel-jest\",\n\t\t\"testDirectoryName\": \"tests\",\n\t\t\"preprocessCachingDisabled\": false\n\t},\n\t\"precommit\": [\n\t\t\"lint\"\n\t]\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./package.json\n ** module id = 627\n ** module chunks = 0\n **/","exports = module.exports = SemVer;\n\n// The debug function is excluded entirely from the minified version.\n/* nomin */ var debug;\n/* nomin */ if (typeof process === 'object' &&\n /* nomin */ process.env &&\n /* nomin */ process.env.NODE_DEBUG &&\n /* nomin */ /\\bsemver\\b/i.test(process.env.NODE_DEBUG))\n /* nomin */ debug = function() {\n /* nomin */ var args = Array.prototype.slice.call(arguments, 0);\n /* nomin */ args.unshift('SEMVER');\n /* nomin */ console.log.apply(console, args);\n /* nomin */ };\n/* nomin */ else\n /* nomin */ debug = function() {};\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0';\n\nvar MAX_LENGTH = 256;\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;\n\n// The actual regexps go on exports.re\nvar re = exports.re = [];\nvar src = exports.src = [];\nvar R = 0;\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\nvar NUMERICIDENTIFIER = R++;\nsrc[NUMERICIDENTIFIER] = '0|[1-9]\\\\d*';\nvar NUMERICIDENTIFIERLOOSE = R++;\nsrc[NUMERICIDENTIFIERLOOSE] = '[0-9]+';\n\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\nvar NONNUMERICIDENTIFIER = R++;\nsrc[NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*';\n\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\nvar MAINVERSION = R++;\nsrc[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')';\n\nvar MAINVERSIONLOOSE = R++;\nsrc[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')';\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\nvar PRERELEASEIDENTIFIER = R++;\nsrc[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +\n '|' + src[NONNUMERICIDENTIFIER] + ')';\n\nvar PRERELEASEIDENTIFIERLOOSE = R++;\nsrc[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +\n '|' + src[NONNUMERICIDENTIFIER] + ')';\n\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\nvar PRERELEASE = R++;\nsrc[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIER] + ')*))';\n\nvar PRERELEASELOOSE = R++;\nsrc[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\nvar BUILDIDENTIFIER = R++;\nsrc[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\nvar BUILD = R++;\nsrc[BUILD] = '(?:\\\\+(' + src[BUILDIDENTIFIER] +\n '(?:\\\\.' + src[BUILDIDENTIFIER] + ')*))';\n\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\nvar FULL = R++;\nvar FULLPLAIN = 'v?' + src[MAINVERSION] +\n src[PRERELEASE] + '?' +\n src[BUILD] + '?';\n\nsrc[FULL] = '^' + FULLPLAIN + '$';\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\nvar LOOSEPLAIN = '[v=\\\\s]*' + src[MAINVERSIONLOOSE] +\n src[PRERELEASELOOSE] + '?' +\n src[BUILD] + '?';\n\nvar LOOSE = R++;\nsrc[LOOSE] = '^' + LOOSEPLAIN + '$';\n\nvar GTLT = R++;\nsrc[GTLT] = '((?:<|>)?=?)';\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\nvar XRANGEIDENTIFIERLOOSE = R++;\nsrc[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*';\nvar XRANGEIDENTIFIER = R++;\nsrc[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\\\*';\n\nvar XRANGEPLAIN = R++;\nsrc[XRANGEPLAIN] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:' + src[PRERELEASE] + ')?' +\n src[BUILD] + '?' +\n ')?)?';\n\nvar XRANGEPLAINLOOSE = R++;\nsrc[XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[PRERELEASELOOSE] + ')?' +\n src[BUILD] + '?' +\n ')?)?';\n\nvar XRANGE = R++;\nsrc[XRANGE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAIN] + '$';\nvar XRANGELOOSE = R++;\nsrc[XRANGELOOSE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAINLOOSE] + '$';\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\nvar LONETILDE = R++;\nsrc[LONETILDE] = '(?:~>?)';\n\nvar TILDETRIM = R++;\nsrc[TILDETRIM] = '(\\\\s*)' + src[LONETILDE] + '\\\\s+';\nre[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');\nvar tildeTrimReplace = '$1~';\n\nvar TILDE = R++;\nsrc[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';\nvar TILDELOOSE = R++;\nsrc[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\nvar LONECARET = R++;\nsrc[LONECARET] = '(?:\\\\^)';\n\nvar CARETTRIM = R++;\nsrc[CARETTRIM] = '(\\\\s*)' + src[LONECARET] + '\\\\s+';\nre[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');\nvar caretTrimReplace = '$1^';\n\nvar CARET = R++;\nsrc[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';\nvar CARETLOOSE = R++;\nsrc[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\nvar COMPARATORLOOSE = R++;\nsrc[COMPARATORLOOSE] = '^' + src[GTLT] + '\\\\s*(' + LOOSEPLAIN + ')$|^$';\nvar COMPARATOR = R++;\nsrc[COMPARATOR] = '^' + src[GTLT] + '\\\\s*(' + FULLPLAIN + ')$|^$';\n\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\nvar COMPARATORTRIM = R++;\nsrc[COMPARATORTRIM] = '(\\\\s*)' + src[GTLT] +\n '\\\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';\n\n// this one has to use the /g flag\nre[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');\nvar comparatorTrimReplace = '$1$2$3';\n\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\nvar HYPHENRANGE = R++;\nsrc[HYPHENRANGE] = '^\\\\s*(' + src[XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAIN] + ')' +\n '\\\\s*$';\n\nvar HYPHENRANGELOOSE = R++;\nsrc[HYPHENRANGELOOSE] = '^\\\\s*(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$';\n\n// Star ranges basically just allow anything at all.\nvar STAR = R++;\nsrc[STAR] = '(<|>)?=?\\\\s*\\\\*';\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i]);\n if (!re[i])\n re[i] = new RegExp(src[i]);\n}\n\nexports.parse = parse;\nfunction parse(version, loose) {\n if (version instanceof SemVer)\n return version;\n\n if (typeof version !== 'string')\n return null;\n\n if (version.length > MAX_LENGTH)\n return null;\n\n var r = loose ? re[LOOSE] : re[FULL];\n if (!r.test(version))\n return null;\n\n try {\n return new SemVer(version, loose);\n } catch (er) {\n return null;\n }\n}\n\nexports.valid = valid;\nfunction valid(version, loose) {\n var v = parse(version, loose);\n return v ? v.version : null;\n}\n\n\nexports.clean = clean;\nfunction clean(version, loose) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), loose);\n return s ? s.version : null;\n}\n\nexports.SemVer = SemVer;\n\nfunction SemVer(version, loose) {\n if (version instanceof SemVer) {\n if (version.loose === loose)\n return version;\n else\n version = version.version;\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version);\n }\n\n if (version.length > MAX_LENGTH)\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n\n if (!(this instanceof SemVer))\n return new SemVer(version, loose);\n\n debug('SemVer', version, loose);\n this.loose = loose;\n var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);\n\n if (!m)\n throw new TypeError('Invalid Version: ' + version);\n\n this.raw = version;\n\n // these are actually numbers\n this.major = +m[1];\n this.minor = +m[2];\n this.patch = +m[3];\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0)\n throw new TypeError('Invalid major version')\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)\n throw new TypeError('Invalid minor version')\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)\n throw new TypeError('Invalid patch version')\n\n // numberify any prerelease numeric ids\n if (!m[4])\n this.prerelease = [];\n else\n this.prerelease = m[4].split('.').map(function(id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER)\n return num\n }\n return id;\n });\n\n this.build = m[5] ? m[5].split('.') : [];\n this.format();\n}\n\nSemVer.prototype.format = function() {\n this.version = this.major + '.' + this.minor + '.' + this.patch;\n if (this.prerelease.length)\n this.version += '-' + this.prerelease.join('.');\n return this.version;\n};\n\nSemVer.prototype.inspect = function() {\n return '';\n};\n\nSemVer.prototype.toString = function() {\n return this.version;\n};\n\nSemVer.prototype.compare = function(other) {\n debug('SemVer.compare', this.version, this.loose, other);\n if (!(other instanceof SemVer))\n other = new SemVer(other, this.loose);\n\n return this.compareMain(other) || this.comparePre(other);\n};\n\nSemVer.prototype.compareMain = function(other) {\n if (!(other instanceof SemVer))\n other = new SemVer(other, this.loose);\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch);\n};\n\nSemVer.prototype.comparePre = function(other) {\n if (!(other instanceof SemVer))\n other = new SemVer(other, this.loose);\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length)\n return -1;\n else if (!this.prerelease.length && other.prerelease.length)\n return 1;\n else if (!this.prerelease.length && !other.prerelease.length)\n return 0;\n\n var i = 0;\n do {\n var a = this.prerelease[i];\n var b = other.prerelease[i];\n debug('prerelease compare', i, a, b);\n if (a === undefined && b === undefined)\n return 0;\n else if (b === undefined)\n return 1;\n else if (a === undefined)\n return -1;\n else if (a === b)\n continue;\n else\n return compareIdentifiers(a, b);\n } while (++i);\n};\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function(release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc('pre', identifier);\n break;\n case 'preminor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc('pre', identifier);\n break;\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0;\n this.inc('patch', identifier);\n this.inc('pre', identifier);\n break;\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0)\n this.inc('patch', identifier);\n this.inc('pre', identifier);\n break;\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)\n this.major++;\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0)\n this.minor++;\n this.patch = 0;\n this.prerelease = [];\n break;\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0)\n this.patch++;\n this.prerelease = [];\n break;\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0)\n this.prerelease = [0];\n else {\n var i = this.prerelease.length;\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++;\n i = -2;\n }\n }\n if (i === -1) // didn't increment anything\n this.prerelease.push(0);\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1]))\n this.prerelease = [identifier, 0];\n } else\n this.prerelease = [identifier, 0];\n }\n break;\n\n default:\n throw new Error('invalid increment argument: ' + release);\n }\n this.format();\n this.raw = this.version;\n return this;\n};\n\nexports.inc = inc;\nfunction inc(version, release, loose, identifier) {\n if (typeof(loose) === 'string') {\n identifier = loose;\n loose = undefined;\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version;\n } catch (er) {\n return null;\n }\n}\n\nexports.diff = diff;\nfunction diff(version1, version2) {\n if (eq(version1, version2)) {\n return null;\n } else {\n var v1 = parse(version1);\n var v2 = parse(version2);\n if (v1.prerelease.length || v2.prerelease.length) {\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return 'pre'+key;\n }\n }\n }\n return 'prerelease';\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return key;\n }\n }\n }\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers;\n\nvar numeric = /^[0-9]+$/;\nfunction compareIdentifiers(a, b) {\n var anum = numeric.test(a);\n var bnum = numeric.test(b);\n\n if (anum && bnum) {\n a = +a;\n b = +b;\n }\n\n return (anum && !bnum) ? -1 :\n (bnum && !anum) ? 1 :\n a < b ? -1 :\n a > b ? 1 :\n 0;\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers;\nfunction rcompareIdentifiers(a, b) {\n return compareIdentifiers(b, a);\n}\n\nexports.major = major;\nfunction major(a, loose) {\n return new SemVer(a, loose).major;\n}\n\nexports.minor = minor;\nfunction minor(a, loose) {\n return new SemVer(a, loose).minor;\n}\n\nexports.patch = patch;\nfunction patch(a, loose) {\n return new SemVer(a, loose).patch;\n}\n\nexports.compare = compare;\nfunction compare(a, b, loose) {\n return new SemVer(a, loose).compare(b);\n}\n\nexports.compareLoose = compareLoose;\nfunction compareLoose(a, b) {\n return compare(a, b, true);\n}\n\nexports.rcompare = rcompare;\nfunction rcompare(a, b, loose) {\n return compare(b, a, loose);\n}\n\nexports.sort = sort;\nfunction sort(list, loose) {\n return list.sort(function(a, b) {\n return exports.compare(a, b, loose);\n });\n}\n\nexports.rsort = rsort;\nfunction rsort(list, loose) {\n return list.sort(function(a, b) {\n return exports.rcompare(a, b, loose);\n });\n}\n\nexports.gt = gt;\nfunction gt(a, b, loose) {\n return compare(a, b, loose) > 0;\n}\n\nexports.lt = lt;\nfunction lt(a, b, loose) {\n return compare(a, b, loose) < 0;\n}\n\nexports.eq = eq;\nfunction eq(a, b, loose) {\n return compare(a, b, loose) === 0;\n}\n\nexports.neq = neq;\nfunction neq(a, b, loose) {\n return compare(a, b, loose) !== 0;\n}\n\nexports.gte = gte;\nfunction gte(a, b, loose) {\n return compare(a, b, loose) >= 0;\n}\n\nexports.lte = lte;\nfunction lte(a, b, loose) {\n return compare(a, b, loose) <= 0;\n}\n\nexports.cmp = cmp;\nfunction cmp(a, op, b, loose) {\n var ret;\n switch (op) {\n case '===':\n if (typeof a === 'object') a = a.version;\n if (typeof b === 'object') b = b.version;\n ret = a === b;\n break;\n case '!==':\n if (typeof a === 'object') a = a.version;\n if (typeof b === 'object') b = b.version;\n ret = a !== b;\n break;\n case '': case '=': case '==': ret = eq(a, b, loose); break;\n case '!=': ret = neq(a, b, loose); break;\n case '>': ret = gt(a, b, loose); break;\n case '>=': ret = gte(a, b, loose); break;\n case '<': ret = lt(a, b, loose); break;\n case '<=': ret = lte(a, b, loose); break;\n default: throw new TypeError('Invalid operator: ' + op);\n }\n return ret;\n}\n\nexports.Comparator = Comparator;\nfunction Comparator(comp, loose) {\n if (comp instanceof Comparator) {\n if (comp.loose === loose)\n return comp;\n else\n comp = comp.value;\n }\n\n if (!(this instanceof Comparator))\n return new Comparator(comp, loose);\n\n debug('comparator', comp, loose);\n this.loose = loose;\n this.parse(comp);\n\n if (this.semver === ANY)\n this.value = '';\n else\n this.value = this.operator + this.semver.version;\n\n debug('comp', this);\n}\n\nvar ANY = {};\nComparator.prototype.parse = function(comp) {\n var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];\n var m = comp.match(r);\n\n if (!m)\n throw new TypeError('Invalid comparator: ' + comp);\n\n this.operator = m[1];\n if (this.operator === '=')\n this.operator = '';\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2])\n this.semver = ANY;\n else\n this.semver = new SemVer(m[2], this.loose);\n};\n\nComparator.prototype.inspect = function() {\n return '';\n};\n\nComparator.prototype.toString = function() {\n return this.value;\n};\n\nComparator.prototype.test = function(version) {\n debug('Comparator.test', version, this.loose);\n\n if (this.semver === ANY)\n return true;\n\n if (typeof version === 'string')\n version = new SemVer(version, this.loose);\n\n return cmp(version, this.operator, this.semver, this.loose);\n};\n\n\nexports.Range = Range;\nfunction Range(range, loose) {\n if ((range instanceof Range) && range.loose === loose)\n return range;\n\n if (!(this instanceof Range))\n return new Range(range, loose);\n\n this.loose = loose;\n\n // First, split based on boolean or ||\n this.raw = range;\n this.set = range.split(/\\s*\\|\\|\\s*/).map(function(range) {\n return this.parseRange(range.trim());\n }, this).filter(function(c) {\n // throw out any that are not relevant for whatever reason\n return c.length;\n });\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + range);\n }\n\n this.format();\n}\n\nRange.prototype.inspect = function() {\n return '';\n};\n\nRange.prototype.format = function() {\n this.range = this.set.map(function(comps) {\n return comps.join(' ').trim();\n }).join('||').trim();\n return this.range;\n};\n\nRange.prototype.toString = function() {\n return this.range;\n};\n\nRange.prototype.parseRange = function(range) {\n var loose = this.loose;\n range = range.trim();\n debug('range', range, loose);\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];\n range = range.replace(hr, hyphenReplace);\n debug('hyphen replace', range);\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);\n debug('comparator trim', range, re[COMPARATORTRIM]);\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[TILDETRIM], tildeTrimReplace);\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[CARETTRIM], caretTrimReplace);\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ');\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];\n var set = range.split(' ').map(function(comp) {\n return parseComparator(comp, loose);\n }).join(' ').split(/\\s+/);\n if (this.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function(comp) {\n return !!comp.match(compRe);\n });\n }\n set = set.map(function(comp) {\n return new Comparator(comp, loose);\n });\n\n return set;\n};\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators;\nfunction toComparators(range, loose) {\n return new Range(range, loose).set.map(function(comp) {\n return comp.map(function(c) {\n return c.value;\n }).join(' ').trim().split(' ');\n });\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator(comp, loose) {\n debug('comp', comp);\n comp = replaceCarets(comp, loose);\n debug('caret', comp);\n comp = replaceTildes(comp, loose);\n debug('tildes', comp);\n comp = replaceXRanges(comp, loose);\n debug('xrange', comp);\n comp = replaceStars(comp, loose);\n debug('stars', comp);\n return comp;\n}\n\nfunction isX(id) {\n return !id || id.toLowerCase() === 'x' || id === '*';\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes(comp, loose) {\n return comp.trim().split(/\\s+/).map(function(comp) {\n return replaceTilde(comp, loose);\n }).join(' ');\n}\n\nfunction replaceTilde(comp, loose) {\n var r = loose ? re[TILDELOOSE] : re[TILDE];\n return comp.replace(r, function(_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr);\n var ret;\n\n if (isX(M))\n ret = '';\n else if (isX(m))\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';\n else if (isX(p))\n // ~1.2 == >=1.2.0- <1.3.0-\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';\n else if (pr) {\n debug('replaceTilde pr', pr);\n if (pr.charAt(0) !== '-')\n pr = '-' + pr;\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + M + '.' + (+m + 1) + '.0';\n } else\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0';\n\n debug('tilde return', ret);\n return ret;\n });\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets(comp, loose) {\n return comp.trim().split(/\\s+/).map(function(comp) {\n return replaceCaret(comp, loose);\n }).join(' ');\n}\n\nfunction replaceCaret(comp, loose) {\n debug('caret', comp, loose);\n var r = loose ? re[CARETLOOSE] : re[CARET];\n return comp.replace(r, function(_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr);\n var ret;\n\n if (isX(M))\n ret = '';\n else if (isX(m))\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';\n else if (isX(p)) {\n if (M === '0')\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';\n else\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';\n } else if (pr) {\n debug('replaceCaret pr', pr);\n if (pr.charAt(0) !== '-')\n pr = '-' + pr;\n if (M === '0') {\n if (m === '0')\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + M + '.' + m + '.' + (+p + 1);\n else\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + M + '.' + (+m + 1) + '.0';\n } else\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + (+M + 1) + '.0.0';\n } else {\n debug('no pr');\n if (M === '0') {\n if (m === '0')\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1);\n else\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0';\n } else\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0';\n }\n\n debug('caret return', ret);\n return ret;\n });\n}\n\nfunction replaceXRanges(comp, loose) {\n debug('replaceXRanges', comp, loose);\n return comp.split(/\\s+/).map(function(comp) {\n return replaceXRange(comp, loose);\n }).join(' ');\n}\n\nfunction replaceXRange(comp, loose) {\n comp = comp.trim();\n var r = loose ? re[XRANGELOOSE] : re[XRANGE];\n return comp.replace(r, function(ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr);\n var xM = isX(M);\n var xm = xM || isX(m);\n var xp = xm || isX(p);\n var anyX = xp;\n\n if (gtlt === '=' && anyX)\n gtlt = '';\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0';\n } else {\n // nothing is forbidden\n ret = '*';\n }\n } else if (gtlt && anyX) {\n // replace X with 0\n if (xm)\n m = 0;\n if (xp)\n p = 0;\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>=';\n if (xm) {\n M = +M + 1;\n m = 0;\n p = 0;\n } else if (xp) {\n m = +m + 1;\n p = 0;\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm)\n M = +M + 1\n else\n m = +m + 1\n }\n\n ret = gtlt + M + '.' + m + '.' + p;\n } else if (xm) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';\n }\n\n debug('xRange return', ret);\n\n return ret;\n });\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars(comp, loose) {\n debug('replaceStars', comp, loose);\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[STAR], '');\n}\n\n// This function is passed to string.replace(re[HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n\n if (isX(fM))\n from = '';\n else if (isX(fm))\n from = '>=' + fM + '.0.0';\n else if (isX(fp))\n from = '>=' + fM + '.' + fm + '.0';\n else\n from = '>=' + from;\n\n if (isX(tM))\n to = '';\n else if (isX(tm))\n to = '<' + (+tM + 1) + '.0.0';\n else if (isX(tp))\n to = '<' + tM + '.' + (+tm + 1) + '.0';\n else if (tpr)\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;\n else\n to = '<=' + to;\n\n return (from + ' ' + to).trim();\n}\n\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function(version) {\n if (!version)\n return false;\n\n if (typeof version === 'string')\n version = new SemVer(version, this.loose);\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version))\n return true;\n }\n return false;\n};\n\nfunction testSet(set, version) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version))\n return false;\n }\n\n if (version.prerelease.length) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (var i = 0; i < set.length; i++) {\n debug(set[i].semver);\n if (set[i].semver === ANY)\n continue;\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver;\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch)\n return true;\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false;\n }\n\n return true;\n}\n\nexports.satisfies = satisfies;\nfunction satisfies(version, range, loose) {\n try {\n range = new Range(range, loose);\n } catch (er) {\n return false;\n }\n return range.test(version);\n}\n\nexports.maxSatisfying = maxSatisfying;\nfunction maxSatisfying(versions, range, loose) {\n return versions.filter(function(version) {\n return satisfies(version, range, loose);\n }).sort(function(a, b) {\n return rcompare(a, b, loose);\n })[0] || null;\n}\n\nexports.validRange = validRange;\nfunction validRange(range, loose) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, loose).range || '*';\n } catch (er) {\n return null;\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr;\nfunction ltr(version, range, loose) {\n return outside(version, range, '<', loose);\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr;\nfunction gtr(version, range, loose) {\n return outside(version, range, '>', loose);\n}\n\nexports.outside = outside;\nfunction outside(version, range, hilo, loose) {\n version = new SemVer(version, loose);\n range = new Range(range, loose);\n\n var gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case '>':\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = '>';\n ecomp = '>=';\n break;\n case '<':\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = '<';\n ecomp = '<=';\n break;\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"');\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, loose)) {\n return false;\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i];\n\n var high = null;\n var low = null;\n\n comparators.forEach(function(comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, loose)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, loose)) {\n low = comparator;\n }\n });\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false;\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false;\n }\n }\n return true;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/semver/semver.js\n ** module id = 628\n ** module chunks = 0\n **/"],"sourceRoot":""}
\ No newline at end of file
diff --git a/package.json b/package.json
index 9902d07d5..03154e6ab 100644
--- a/package.json
+++ b/package.json
@@ -77,6 +77,7 @@
"babel-loader": "^5.3.2",
"busboy": "^0.2.9",
"chalk": "^1.1.0",
+ "clipboard": "~1.5.3",
"css-loader": "^0.14.1",
"eslint": "^1.1.0",
"eslint-config-airbnb": "^0.1.0",
@@ -87,13 +88,11 @@
"jest-cli": "~0.6.1",
"json-loader": "^0.5.1",
"less-loader": "^2.2.0",
- "lesslint": "^0.1.7",
"lodash": "^3.10.0",
"nico-jsx": "~0.6.0",
"precommit-hook": "^1.0.7",
"react": "~0.14.1",
"react-addons-test-utils": "~0.14.1",
- "react-clip": "^0.1.4",
"react-dom": "~0.14.1",
"react-router": "1.0.0-rc3",
"webpack": "^1.10.1",
@@ -107,7 +106,6 @@
"deploy": "rm -rf node_modules && node scripts/install.js && npm run just-deploy",
"just-deploy": "npm run clean && webpack --config webpack.deploy.config.js && NODE_ENV=PRODUCTION nico build && node scripts/deploy.js",
"lint": "eslint components index.js --ext '.js,.jsx'",
- "lesslint": "lesslint style",
"test": "npm run lint && webpack && npm run jest",
"jest": "jest",
"pub": "sh ./scripts/publish.sh",
diff --git a/scripts/clip.js b/scripts/clip.js
new file mode 100644
index 000000000..a6b9f9f27
--- /dev/null
+++ b/scripts/clip.js
@@ -0,0 +1,75 @@
+import React from 'react';
+import Clipboard from 'clipboard';
+
+let counter = 0;
+
+class Clip extends React.Component {
+ static propTypes: {
+ options: React.PropTypes.object,
+ }
+
+ /* Returns a object with all props that fulfill a certain naming pattern
+ *
+ * @param {RegExp} regexp - Regular expression representing which pattern
+ * you'll be searching for.
+ * @param {Boolean} remove - Determines if the regular expression should be
+ * removed when transmitting the key from the props
+ * to the new object.
+ *
+ * e.g:
+ *
+ * // Considering:
+ * // this.props = {option-foo: 1, onBar: 2, data-foobar: 3 data-baz: 4};
+ *
+ * // *RegExps not using // so that this comment doesn't break up
+ * this.propsWith(option-*, true); // returns {foo: 1}
+ * this.propsWith(on*, true); // returns {Bar: 2}
+ * this.propsWith(data-*); // returns {data-foobar: 1, data-baz: 4}
+ */
+ propsWith(regexp, remove=false) {
+ let object = {};
+
+ Object.keys(this.props).forEach(function(key) {
+ if (key.search(regexp) !== -1) {
+ let objectKey = remove ? key.replace(regexp, '') : key;
+ object[objectKey] = this.props[key];
+ }
+ }, this);
+
+ return object;
+ }
+
+ constructor(props) {
+ super(props);
+ this.id = `__react_clipboard_${counter++}__`;
+ }
+
+ componentDidMount() {
+ // Support old API by trying to assign this.props.options first;
+ let options = this.props.options || this.propsWith(/^option-/, true);
+ this.clipboard = new Clipboard(`#${this.id}`, options);
+
+ let callbacks = this.propsWith(/^on/, true);
+ Object.keys(callbacks).forEach(function(callback) {
+ this.clipboard.on(callback.toLowerCase(), this.props['on' + callback]);
+ }, this);
+ }
+
+ render() {
+ let dataAttributes = this.propsWith(/^data-/);
+ let attributes = this.propsWith(/^span-/, true);
+ return (
+
+ {this.props.children}
+
+ );
+ }
+}
+
+export default Clip;
diff --git a/scripts/demo.js b/scripts/demo.js
index eeaf59d85..08e3594c2 100644
--- a/scripts/demo.js
+++ b/scripts/demo.js
@@ -1,6 +1,7 @@
window['css-animation'] = require('css-animation');
window['react-router'] = require('react-router');
-window.Clip = require('react-clip');
+window.Clipboard = require('clipboard');
+window.Clip = require('./clip');
var antd = require('../index');
var React = require('react');
var ReactDOM = require('react-dom');
diff --git a/spec/colors.html b/spec/colors.html
index 4727faccf..0d468a8bb 100644
--- a/spec/colors.html
+++ b/spec/colors.html
@@ -528,17 +528,17 @@ var TintShadeTool = React.createClass({
null,
React.createElement(
Clip,
- { onSuccess: this.copySuccess, 'data-clipboard-text': this.state.result, style: { border: 0, background: '#fff' } },
- React.createElement('div', { style: { width: 60, borderRadius: 6, height: 28, backgroundColor: this.state.result, display: 'inline-block', verticalAlign: 'middle', marginRight: 8 } })
+ { onSuccess: this.copySuccess, 'data-clipboard-text': this.state.result, style: { border: 0, background: '#fff', cursor: 'pointer' } },
+ React.createElement(
+ Tooltip,
+ { title: '点击色块复制色值' },
+ React.createElement('div', { style: { width: 60, borderRadius: 6, height: 28, backgroundColor: this.state.result, display: 'inline-block', verticalAlign: 'middle', marginRight: 8 } })
+ )
),
React.createElement(
- Tooltip,
- { title: '点击左边色块复制色值' },
- React.createElement(
- 'span',
- { style: { marginRight: 140, fontFamily: 'Consolas' } },
- this.state.result
- )
+ 'span',
+ { style: { marginRight: 140, fontFamily: 'Consolas' } },
+ this.state.result
),
React.createElement('input', { className: 'ant-input', style: { width: 80, color: this.state.color, marginRight: 8 }, value: this.state.color, onChange: this.handleChangeColor }),
React.createElement(InputNumber, { style: { width: 70 }, value: this.state.value, onChange: this.handleChangeValue, min: -100, max: 100, step: 5 }),