ph-cascade-selector
Version:
trade f2e project
672 lines (570 loc) • 40.5 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else {
var a = typeof exports === 'object' ? factory(require("react")) : factory(root["React"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1);
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _CascadeSelector2 = __webpack_require__(2);
var _CascadeSelector3 = _interopRequireDefault(_CascadeSelector2);
exports.CascadeSelector = _CascadeSelector3['default'];
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(3);
var _react2 = _interopRequireDefault(_react);
var _cssCascadeSelectorLess = __webpack_require__(4);
var _cssCascadeSelectorLess2 = _interopRequireDefault(_cssCascadeSelectorLess);
var CascadeSelector = (function (_Component) {
_inherits(CascadeSelector, _Component);
function CascadeSelector(props, context) {
_classCallCheck(this, CascadeSelector);
_Component.call(this, props, context);
this.state = {
tappedIndexArray: [],
hashKey: ''
};
var pathMap = {};
var selectorData = this.props.selectorData;
//this.generateTreePathMap('',selectorData,pathMap);
this.pathMap = pathMap;
this.hashId = this.uniqueId();
this.preHash = '';
}
CascadeSelector.prototype.preAndCurHashIndex = function preAndCurHashIndex() {
var self = this;
function calculateHashIndex(hash) {
var hashIndex = 0;
if (hash) {
var hashSegs = hash.split('_');
if (hashSegs.length > 1) {
if ('#' + self.hashId + '_' + hashSegs[1] == hash) {
hashIndex = hashSegs[1];
}
}
}
return hashIndex;
}
var preHash = self.preHash,
curHash = location.hash,
preHashIndex = calculateHashIndex(preHash),
curHashIndex = calculateHashIndex(curHash);
this.preHash = location.hash;
return {
preHashIndex: preHashIndex,
curHashIndex: curHashIndex
};
};
CascadeSelector.prototype.componentDidMount = function componentDidMount() {
var self = this;
window.onhashchange = function () {
var _self$preAndCurHashIndex = self.preAndCurHashIndex();
var preHashIndex = _self$preAndCurHashIndex.preHashIndex;
var curHashIndex = _self$preAndCurHashIndex.curHashIndex;
//console.log('p,c',preHashIndex,curHashIndex);
//用于处理用户点击返回按钮,这个时候需要监听hashChange事件,手动去设置hashKey和tappedIndexArray
if (preHashIndex - curHashIndex > 0) {
var tappedIndexArray = self.state.tappedIndexArray.slice();
tappedIndexArray.pop();
if (curHashIndex == 0) {
//当curHashIndex=0时,可能是用户点了会退按钮,pop不存在任何问题,当用户点击了子节点,会直接跳到0,
// 此时pop会存在删不干净的情况,需要手动置空tappedIndexArray
tappedIndexArray.length = 0;
}
//console.log(tappedIndexArray);
self.setState({
hashKey: curHashIndex,
tappedIndexArray: tappedIndexArray
});
}
};
};
CascadeSelector.prototype.uniqueId = function uniqueId() {
return new Date().getTime() + (Math.random() * 1e5).toFixed(0);
};
CascadeSelector.prototype.generateTreePathMap = function generateTreePathMap(path, list, pathMap) {
var self = this;
if (list && list.length) {
list.forEach(function (item, index) {
var currentPath = path,
itemChildren = item.children;
if (currentPath) {
currentPath = currentPath + ',' + index;
} else {
currentPath = '' + index;
}
var _self$props = self.props;
var itemKey = _self$props.itemKey;
var selectedId = _self$props.selectedId;
pathMap[item[itemKey]] = currentPath;
//if(selectedId&&item[itemKey]==selectedId){
// self.selectedItem=item;
//}
if (itemChildren && itemChildren.length) {
self.generateTreePathMap(currentPath, itemChildren, pathMap);
}
});
}
};
CascadeSelector.prototype.branchNodeClick = function branchNodeClick(item, index, selectorLevel) {
var _props$itemClick;
var tappedIndexArray = this.state.tappedIndexArray;
tappedIndexArray.push(index);
var hashKey = selectorLevel + 2;
this.setState({
tappedIndexArray: tappedIndexArray,
hashKey: hashKey
});
location.hash = '#' + this.hashId + '_' + hashKey;
this.props.itemClick && this.props.itemClick((_props$itemClick = {}, _props$itemClick[this.props.itemKey] = item[this.props.itemKey], _props$itemClick[this.props.itemValue] = item[this.props.itemValue], _props$itemClick[this.props.itemLevel] = item[this.props.itemLevel], _props$itemClick.nodeType = 'branch', _props$itemClick));
};
CascadeSelector.prototype.leafNodeClick = function leafNodeClick(item, index) {
var _props$itemClick2;
var preHashKey = this.state.hashKey;
//执行会退操作,hashChange会负责state的变化
this.selectedItem = item;
window.history.go(-preHashKey);
this.props.itemClick && this.props.itemClick((_props$itemClick2 = {}, _props$itemClick2[this.props.itemKey] = item[this.props.itemKey], _props$itemClick2[this.props.itemValue] = item[this.props.itemValue], _props$itemClick2[this.props.itemLevel] = item[this.props.itemLevel], _props$itemClick2.nodeType = 'leaf', _props$itemClick2));
};
CascadeSelector.prototype.render = function render() {
var self = this;
var selectorData = this.props.selectorData;
var _state = this.state;
var tappedIndexArray = _state.tappedIndexArray;
var hashKey = _state.hashKey;
var itemList = selectorData;
var panelList = [selectorData];
var curLabel = '';
var selectorDataEmpty = !(selectorData && selectorData.length);
for (var i = 0; i < tappedIndexArray.length; i++) {
panelList.push(itemList[tappedIndexArray[i]].children);
itemList = itemList[tappedIndexArray[i]].children;
}
//优先判断this中的selectedItem,没有的话再判断props中的selectdItem
if (self.selectedItem) {
curLabel = self.selectedItem[self.props.itemValue];
} else {
if (self.props.selectedItem) {
curLabel = self.props.selectedItem[self.props.itemValue];
}
}
return _react2['default'].createElement(
'div',
{ className: 'cascade-selector' },
hashKey == '' ? _react2['default'].createElement(
'div',
{ className: 'cs-item item-branch' + (selectorDataEmpty ? ' disabled' : ''),
onClick: function () {
if (selectorDataEmpty) {
self.props.emptyCallback && self.props.emptyCallback();
return;
}
self.setState({
hashKey: 1,
tappedIndexArray: []
});
location.hash = '#' + self.hashId + '_' + 1;
} },
this.props.label,
curLabel ? _react2['default'].createElement(
'span',
{ className: 'selected-content' },
curLabel
) : _react2['default'].createElement(
'span',
{ className: 'item-tip' },
'请选择'
)
) : panelList.map(function (itemList, selectorLevel) {
return _react2['default'].createElement(
'div',
{ key: 'selector-' + selectorLevel,
className: 'cs-panel',
style: { display: selectorLevel == tappedIndexArray.length ? 'block' : 'none' } },
itemList.map(function (item, itemIndex) {
return _react2['default'].createElement(
'div',
{ className: 'cs-item' + (item.children && item.children.length ? ' item-branch' : ' item-leaf') + (self.selectedItem && item[self.props.itemKey] == self.selectedItem[self.props.itemKey] ? ' active' : ''),
key: item[self.props.itemKey],
onClick: function () {
if (item.children && item.children.length) {
self.branchNodeClick(item, itemIndex, selectorLevel);
} else {
self.leafNodeClick(item, itemIndex, selectorLevel);
}
} },
_react2['default'].createElement('span', { className: 'checkbox' }),
_react2['default'].createElement(
'span',
{ className: 'item-content' },
item[self.props.itemValue]
)
);
})
);
})
);
};
_createClass(CascadeSelector, null, [{
key: 'defaultProps',
value: {
label: '级联选择',
itemKey: 'typeId',
itemValue: 'typeName',
itemLevel: 'level'
},
enumerable: true
}]);
return CascadeSelector;
})(_react.Component);
exports['default'] = CascadeSelector;
module.exports = exports['default'];
/***/ }),
/* 3 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(5);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(10)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!../node_modules/_css-loader@0.17.0@css-loader/index.js!../node_modules/_less-loader@2.2.3@less-loader/index.js!./CascadeSelector.less", function() {
var newContent = require("!!../node_modules/_css-loader@0.17.0@css-loader/index.js!../node_modules/_less-loader@2.2.3@less-loader/index.js!./CascadeSelector.less");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(6)();
// imports
// module
exports.push([module.id, ".translate--10 {\n -moz-transform: translate(-1000%);\n -webkit-transform: translate(-1000%);\n -ms-transform: translate(-1000%);\n -o-transform: translate(-1000%);\n transform: translate(-1000%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--9 {\n -moz-transform: translate(-900%);\n -webkit-transform: translate(-900%);\n -ms-transform: translate(-900%);\n -o-transform: translate(-900%);\n transform: translate(-900%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--8 {\n -moz-transform: translate(-800%);\n -webkit-transform: translate(-800%);\n -ms-transform: translate(-800%);\n -o-transform: translate(-800%);\n transform: translate(-800%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--7 {\n -moz-transform: translate(-700%);\n -webkit-transform: translate(-700%);\n -ms-transform: translate(-700%);\n -o-transform: translate(-700%);\n transform: translate(-700%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--6 {\n -moz-transform: translate(-600%);\n -webkit-transform: translate(-600%);\n -ms-transform: translate(-600%);\n -o-transform: translate(-600%);\n transform: translate(-600%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--5 {\n -moz-transform: translate(-500%);\n -webkit-transform: translate(-500%);\n -ms-transform: translate(-500%);\n -o-transform: translate(-500%);\n transform: translate(-500%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--4 {\n -moz-transform: translate(-400%);\n -webkit-transform: translate(-400%);\n -ms-transform: translate(-400%);\n -o-transform: translate(-400%);\n transform: translate(-400%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--3 {\n -moz-transform: translate(-300%);\n -webkit-transform: translate(-300%);\n -ms-transform: translate(-300%);\n -o-transform: translate(-300%);\n transform: translate(-300%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--2 {\n -moz-transform: translate(-200%);\n -webkit-transform: translate(-200%);\n -ms-transform: translate(-200%);\n -o-transform: translate(-200%);\n transform: translate(-200%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate--1 {\n -moz-transform: translate(-100%);\n -webkit-transform: translate(-100%);\n -ms-transform: translate(-100%);\n -o-transform: translate(-100%);\n transform: translate(-100%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-0 {\n -moz-transform: translate(0%);\n -webkit-transform: translate(0%);\n -ms-transform: translate(0%);\n -o-transform: translate(0%);\n transform: translate(0%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-1 {\n -moz-transform: translate(100%);\n -webkit-transform: translate(100%);\n -ms-transform: translate(100%);\n -o-transform: translate(100%);\n transform: translate(100%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-2 {\n -moz-transform: translate(200%);\n -webkit-transform: translate(200%);\n -ms-transform: translate(200%);\n -o-transform: translate(200%);\n transform: translate(200%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-3 {\n -moz-transform: translate(300%);\n -webkit-transform: translate(300%);\n -ms-transform: translate(300%);\n -o-transform: translate(300%);\n transform: translate(300%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-4 {\n -moz-transform: translate(400%);\n -webkit-transform: translate(400%);\n -ms-transform: translate(400%);\n -o-transform: translate(400%);\n transform: translate(400%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-5 {\n -moz-transform: translate(500%);\n -webkit-transform: translate(500%);\n -ms-transform: translate(500%);\n -o-transform: translate(500%);\n transform: translate(500%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-6 {\n -moz-transform: translate(600%);\n -webkit-transform: translate(600%);\n -ms-transform: translate(600%);\n -o-transform: translate(600%);\n transform: translate(600%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-7 {\n -moz-transform: translate(700%);\n -webkit-transform: translate(700%);\n -ms-transform: translate(700%);\n -o-transform: translate(700%);\n transform: translate(700%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-8 {\n -moz-transform: translate(800%);\n -webkit-transform: translate(800%);\n -ms-transform: translate(800%);\n -o-transform: translate(800%);\n transform: translate(800%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-9 {\n -moz-transform: translate(900%);\n -webkit-transform: translate(900%);\n -ms-transform: translate(900%);\n -o-transform: translate(900%);\n transform: translate(900%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.translate-10 {\n -moz-transform: translate(1000%);\n -webkit-transform: translate(1000%);\n -ms-transform: translate(1000%);\n -o-transform: translate(1000%);\n transform: translate(1000%);\n -moz-transition-duration: 500ms;\n -wekit-transition-duration: 500ms;\n -ms-transition-duration: 500ms;\n -o-transition-duration: 500ms;\n transition-duration: 500ms;\n}\n.cascade-selector .cs-panel {\n position: fixed;\n top: 0px;\n bottom: 0px;\n width: 100%;\n overflow-y: scroll;\n z-index: 500;\n background-color: #ffffff;\n}\n.cascade-selector .cs-item {\n padding: 15px;\n font-size: 13px;\n border-bottom: 1px solid #d7d7d7;\n position: relative;\n}\n.cascade-selector .cs-item.disabled {\n background-color: #f5f5f5;\n}\n.cascade-selector .cs-item .item-tip {\n color: #ccc;\n font-size: 12px;\n float: right;\n margin-right: 15px;\n}\n.cascade-selector .cs-item .selected-content {\n color: #333;\n margin-right: 15px;\n float: right;\n width: 150px;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n}\n.cascade-selector .cs-item.item-branch::after {\n content: '';\n display: inline-block;\n width: 7px;\n height: 13px;\n background-image: url(" + __webpack_require__(7) + ");\n background-size: 7px 13px ;\n position: absolute;\n right: 15px;\n}\n.cascade-selector .cs-item.item-leaf {\n position: relative;\n}\n.cascade-selector .cs-item.item-leaf .item-content {\n margin-left: 32px;\n}\n.cascade-selector .cs-item.item-leaf .checkbox {\n display: inline-block;\n width: 22px;\n height: 22px;\n background-image: url(" + __webpack_require__(8) + ");\n background-size: 22px 22px ;\n top: 11px;\n position: absolute;\n left: 15px;\n}\n.cascade-selector .cs-item.item-leaf.active .checkbox {\n background-image: url(" + __webpack_require__(9) + ");\n background-size: 22px 22px ;\n}\n", ""]);
// exports
/***/ }),
/* 6 */
/***/ (function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function() {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
var result = [];
for(var i = 0; i < this.length; i++) {
var item = this[i];
if(item[2]) {
result.push("@media " + item[2] + "{" + item[1] + "}");
} else {
result.push(item[1]);
}
}
return result.join("");
};
// import a list of modules into the list
list.i = function(modules, mediaQuery) {
if(typeof modules === "string")
modules = [[null, modules, ""]];
var alreadyImportedModules = {};
for(var i = 0; i < this.length; i++) {
var id = this[i][0];
if(typeof id === "number")
alreadyImportedModules[id] = true;
}
for(i = 0; i < modules.length; i++) {
var item = modules[i];
// skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
if(mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if(mediaQuery) {
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
}
list.push(item);
}
}
};
return list;
};
/***/ }),
/* 7 */
/***/ (function(module, exports) {
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAaCAYAAABozQZiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM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fap8tJX3RrNaepfPhgqNWKW5lfU81lRFnNAtBNj6bwb5B81Eo09eKvopkreIOxWohem1y/RacXAaYeX7yXBC/wswAHFf+UF+dUyPAAAAAElFTkSuQmCC"
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var stylesInDom = {},
memoize = function(fn) {
var memo;
return function () {
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
return memo;
};
},
isOldIE = memoize(function() {
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
}),
getHeadElement = memoize(function () {
return document.head || document.getElementsByTagName("head")[0];
}),
singletonElement = null,
singletonCounter = 0;
module.exports = function(list, options) {
if(false) {
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
}
options = options || {};
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
var styles = listToStyles(list);
addStylesToDom(styles, options);
return function update(newList) {
var mayRemove = [];
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
domStyle.refs--;
mayRemove.push(domStyle);
}
if(newList) {
var newStyles = listToStyles(newList);
addStylesToDom(newStyles, options);
}
for(var i = 0; i < mayRemove.length; i++) {
var domStyle = mayRemove[i];
if(domStyle.refs === 0) {
for(var j = 0; j < domStyle.parts.length; j++)
domStyle.parts[j]();
delete stylesInDom[domStyle.id];
}
}
};
}
function addStylesToDom(styles, options) {
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
if(domStyle) {
domStyle.refs++;
for(var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j](item.parts[j]);
}
for(; j < item.parts.length; j++) {
domStyle.parts.push(addStyle(item.parts[j], options));
}
} else {
var parts = [];
for(var j = 0; j < item.parts.length; j++) {
parts.push(addStyle(item.parts[j], options));
}
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
}
}
}
function listToStyles(list) {
var styles = [];
var newStyles = {};
for(var i = 0; i < list.length; i++) {
var item = list[i];
var id = item[0];
var css = item[1];
var media = item[2];
var sourceMap = item[3];
var part = {css: css, media: media, sourceMap: sourceMap};
if(!newStyles[id])
styles.push(newStyles[id] = {id: id, parts: [part]});
else
newStyles[id].parts.push(part);
}
return styles;
}
function createStyleElement() {
var styleElement = document.createElement("style");
var head = getHeadElement();
styleElement.type = "text/css";
head.appendChild(styleElement);
return styleElement;
}
function createLinkElement() {
var linkElement = document.createElement("link");
var head = getHeadElement();
linkElement.rel = "stylesheet";
head.appendChild(linkElement);
return linkElement;
}
function addStyle(obj, options) {
var styleElement, update, remove;
if (options.singleton) {
var styleIndex = singletonCounter++;
styleElement = singletonElement || (singletonElement = createStyleElement());
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
} else if(obj.sourceMap &&
typeof URL === "function" &&
typeof URL.createObjectURL === "function" &&
typeof URL.revokeObjectURL === "function" &&
typeof Blob === "function" &&
typeof btoa === "function") {
styleElement = createLinkElement();
update = updateLink.bind(null, styleElement);
remove = function() {
styleElement.parentNode.removeChild(styleElement);
if(styleElement.href)
URL.revokeObjectURL(styleElement.href);
};
} else {
styleElement = createStyleElement();
update = applyToTag.bind(null, styleElement);
remove = function() {
styleElement.parentNode.removeChild(styleElement);
};
}
update(obj);
return function updateStyle(newObj) {
if(newObj) {
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
return;
update(obj = newObj);
} else {
remove();
}
};
}
var replaceText = (function () {
var textStore = [];
return function (index, replacement) {
textStore[index] = replacement;
return textStore.filter(Boolean).join('\n');
};
})();
function applyToSingletonTag(styleElement, index, remove, obj) {
var css = remove ? "" : obj.css;
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = replaceText(index, css);
} else {
var cssNode = document.createTextNode(css);
var childNodes = styleElement.childNodes;
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
if (childNodes.length) {
styleElement.insertBefore(cssNode, childNodes[index]);
} else {
styleElement.appendChild(cssNode);
}
}
}
function applyToTag(styleElement, obj) {
var css = obj.css;
var media = obj.media;
var sourceMap = obj.sourceMap;
if(media) {
styleElement.setAttribute("media", media)
}
if(styleElement.styleSheet) {
styleElement.styleSheet.cssText = css;
} else {
while(styleElement.firstChild) {
styleElement.removeChild(styleElement.firstChild);
}
styleElement.appendChild(document.createTextNode(css));
}
}
function updateLink(linkElement, obj) {
var css = obj.css;
var media = obj.media;
var sourceMap = obj.sourceMap;
if(sourceMap) {
// http://stackoverflow.com/a/26603875
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
}
var blob = new Blob([css], { type: "text/css" });
var oldSrc = linkElement.href;
linkElement.href = URL.createObjectURL(blob);
if(oldSrc)
URL.revokeObjectURL(oldSrc);
}
/***/ })
/******/ ])
});
;