毛主义与法国的六十年代:评沃林的《东风》 (评论: 东风)

毛主义与法国的六十年代:评沃林的《东风》 (评论: 东风)


Levis

评论
东风


3
2021-02-15 23:54:26

这篇书评可能有关键情节透露


« , »

« , »

« , »

« ].join(«  »);$(« body »).delegate(« a.create-review, .top-tab .btn », »click »,function(e){e.preventDefault();var o=$(this),a=o;if(o.hasClass(« cls_abnormal »)&&window._USER_ABNORMAL)return void(show_abnormal&&show_abnormal());o.attr(« href »)||(a=o.find(« a »));var n=$(« div.popup-container »),t=a.attr(« data-isverify »),r=a.attr(« data-verify-url »);if(t&& »false »!=t.toLowerCase())if($(« .topic-block »).length){var l=document.createElement(« div »);l.id= »gallery-topics-selection »,document.body.appendChild(l),window.renderGalleryTopicsSelection()}else location.href=a.attr(« href »);else n.size()
‘).appendTo(« body »);o[0].submit()}})}();;
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var t={};return n.m=e,n.c=t,n.p= » »,n(0)}(function(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))switch(typeof e[n]){case »function »:break;case »object »:e[n]=function(n){var t=n.slice(1),r=e[n[0]];return function(e,n,o){r.apply(this,[e,n,o].concat(t))}}(e[n]);break;default:e[n]=e[e[n]]}return e}([function(module,exports,__webpack_require__){eval(« ‘use strict’;nnvar _vote = __webpack_require__(64);nnvar _vote2 = _interopRequireDefault(_vote);nnvar _comment = __webpack_require__(62);nnvar _comment2 = _interopRequireDefault(_comment);nnvar _ad_insert = __webpack_require__(65);nnvar _ad_insert2 = _interopRequireDefault(_ad_insert);nnfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }nn(function () {n var adInsert = new _ad_insert2.default();n if (document.readyState !== ‘loading’) {n (0, _vote2.default)(document);n window.reviewObj && (0, _comment2.default)(document);n } else if (document.addEventListener) {n document.addEventListener(‘DOMContentLoaded’, function () {n (0, _vote2.default)(document);n window.reviewObj && (0, _comment2.default)(document);n $(‘.comment-item’).each(function (index, ele) {n // 长评回复 4 位展示信息流广告n if (index === 2) {n $(ele).after(adInsert.html());n }n });n }, false);n } else {n window.attachEvent(‘onreadystatechange’, function () {n if (document.readyState !== ‘loading’) {n (0, _vote2.default)(document);n window.reviewObj && (0, _comment2.default)(document);n }n });n }n window.onload = function () {n adInsert.getAd();n };n})(); /* global reviewObj */nn// index page jsnn//////////////////n// WEBPACK FOOTERn// ./src/js/review.jsn// module id = 0n// module chunks = 0n//# sourceURL=webpack:///./src/js/review.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnif (false) {n module.exports = require(‘./cjs/react.production.min.js’);n} else {n module.exports = __webpack_require__(110);n}nnn//////////////////n// WEBPACK FOOTERn// ./~/react/index.jsn// module id = 1n// module chunks = 0n//# sourceURL=webpack:///./~/react/index.js? »)},function(module,exports){eval(« ‘use strict’;nnfunction unwrapExports (x) {ntreturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, ‘default’) ? x[‘default’] : x;n}nnfunction createCommonjsModule(fn, module) {ntreturn module = { exports: {} }, fn(module, module.exports), module.exports;n}nnvar _global = createCommonjsModule(function (module) {n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028nvar global = module.exports = typeof window != ‘undefined’ && window.Math == Mathn ? window : typeof self != ‘undefined’ && self.Math == Math ? selfn // eslint-disable-next-line no-new-funcn : Function(‘return this’)();nif (typeof __g == ‘number’) __g = global; // eslint-disable-line no-undefn});nnvar _core = createCommonjsModule(function (module) {nvar core = module.exports = { version: ‘2.6.8’ };nif (typeof __e == ‘number’) __e = core; // eslint-disable-line no-undefn});nvar _core_1 = _core.version;nnvar _aFunction = function (it) {n if (typeof it != ‘function’) throw TypeError(it + ‘ is not a function!’);n return it;n};nn// optional / simple context bindingnnvar _ctx = function (fn, that, length) {n _aFunction(fn);n if (that === undefined) return fn;n switch (length) {n case 1: return function (a) {n return fn.call(that, a);n };n case 2: return function (a, b) {n return fn.call(that, a, b);n };n case 3: return function (a, b, c) {n return fn.call(that, a, b, c);n };n }n return function (/* …args */) {n return fn.apply(that, arguments);n };n};nnvar _isObject = function (it) {n return typeof it === ‘object’ ? it !== null : typeof it === ‘function’;n};nnvar _anObject = function (it) {n if (!_isObject(it)) throw TypeError(it + ‘ is not an object!’);n return it;n};nnvar _fails = function (exec) {n try {n return !!exec();n } catch (e) {n return true;n }n};nn// Thank’s IE8 for his funny definePropertynvar _descriptors = !_fails(function () {n return Object.defineProperty({}, ‘a’, { get: function () { return 7; } }).a != 7;n});nnvar document$1 = _global.document;n// typeof document.createElement is ‘object’ in old IEnvar is = _isObject(document$1) && _isObject(document$1.createElement);nvar _domCreate = function (it) {n return is ? document$1.createElement(it) : {};n};nnvar _ie8DomDefine = !_descriptors && !_fails(function () {n return Object.defineProperty(_domCreate(‘div’), ‘a’, { get: function () { return 7; } }).a != 7;n});nn// 7.1.1 ToPrimitive(input [, PreferredType])nn// instead of the ES6 spec version, we didn’t implement @@toPrimitive casen// and the second argument – flag – preferred type is a stringnvar _toPrimitive = function (it, S) {n if (!_isObject(it)) return it;n var fn, val;n if (S && typeof (fn = it.toString) == ‘function’ && !_isObject(val = fn.call(it))) return val;n if (typeof (fn = it.valueOf) == ‘function’ && !_isObject(val = fn.call(it))) return val;n if (!S && typeof (fn = it.toString) == ‘function’ && !_isObject(val = fn.call(it))) return val;n throw TypeError(« Can’t convert object to primitive value »);n};nnvar dP = Object.defineProperty;nnvar f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {n _anObject(O);n P = _toPrimitive(P, true);n _anObject(Attributes);n if (_ie8DomDefine) try {n return dP(O, P, Attributes);n } catch (e) { /* empty */ }n if (‘get’ in Attributes || ‘set’ in Attributes) throw TypeError(‘Accessors not supported!’);n if (‘value’ in Attributes) O[P] = Attributes.value;n return O;n};nnvar _objectDp = {ntf: fn};nnvar _propertyDesc = function (bitmap, value) {n return {n enumerable: !(bitmap & 1),n configurable: !(bitmap & 2),n writable: !(bitmap & 4),n value: valuen };n};nnvar _hide = _descriptors ? function (object, key, value) {n return _objectDp.f(object, key, _propertyDesc(1, value));n} : function (object, key, value) {n object[key] = value;n return object;n};nnvar hasOwnProperty = {}.hasOwnProperty;nvar _has = function (it, key) {n return hasOwnProperty.call(it, key);n};nnvar PROTOTYPE = ‘prototype’;nnvar $export = function (type, name, source) {n var IS_FORCED = type & $export.F;n var IS_GLOBAL = type & $export.G;n var IS_STATIC = type & $export.S;n var IS_PROTO = type & $export.P;n var IS_BIND = type & $export.B;n var IS_WRAP = type & $export.W;n var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});n var expProto = exports[PROTOTYPE];n var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] : (_global[name] || {})[PROTOTYPE];n var key, own, out;n if (IS_GLOBAL) source = name;n for (key in source) {n // contains in nativen own = !IS_FORCED && target && target[key] !== undefined;n if (own && _has(exports, key)) continue;n // export native or passedn out = own ? target[key] : source[key];n // prevent global pollution for namespacesn exports[key] = IS_GLOBAL && typeof target[key] != ‘function’ ? source[key]n // bind timers to global for call from export contextn : IS_BIND && own ? _ctx(out, _global)n // wrap global constructors for prevent change them in libraryn : IS_WRAP && target[key] == out ? (function (C) {n var F = function (a, b, c) {n if (this instanceof C) {n switch (arguments.length) {n case 0: return new C();n case 1: return new C(a);n case 2: return new C(a, b);n } return new C(a, b, c);n } return C.apply(this, arguments);n };n F[PROTOTYPE] = C[PROTOTYPE];n return F;n // make static versions for prototype methodsn })(out) : IS_PROTO && typeof out == ‘function’ ? _ctx(Function.call, out) : out;n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%n if (IS_PROTO) {n (exports.virtual || (exports.virtual = {}))[key] = out;n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%n if (type & $export.R && expProto && !expProto[key]) _hide(expProto, key, out);n }n }n};n// type bitmapn$export.F = 1; // forcedn$export.G = 2; // globaln$export.S = 4; // staticn$export.P = 8; // proton$export.B = 16; // bindn$export.W = 32; // wrapn$export.U = 64; // safen$export.R = 128; // real proto method for `library`nvar _export = $export;nnvar toString = {}.toString;nnvar _cof = function (it) {n return toString.call(it).slice(8, -1);n};nn// fallback for non-array-like ES3 and non-enumerable old V8 stringsnn// eslint-disable-next-line no-prototype-builtinsnvar _iobject = Object(‘z’).propertyIsEnumerable(0) ? Object : function (it) {n return _cof(it) == ‘String’ ? it.split( ») : Object(it);n};nn// 7.2.1 RequireObjectCoercible(argument)nvar _defined = function (it) {n if (it == undefined) throw TypeError(« Can’t call method on  » + it);n return it;n};nn// to indexed object, toObject with fallback for non-array-like ES3 stringsnnnvar _toIobject = function (it) {n return _iobject(_defined(it));n};nn// 7.1.4 ToIntegernvar ceil = Math.ceil;nvar floor = Math.floor;nvar _toInteger = function (it) {n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);n};nn// 7.1.15 ToLengthnnvar min = Math.min;nvar _toLength = function (it) {n return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) – 1 == 9007199254740991n};nnvar max = Math.max;nvar min$1 = Math.min;nvar _toAbsoluteIndex = function (index, length) {n index = _toInteger(index);n return index Array#indexOfn// true -> Array#includesnnnnvar _arrayIncludes = function (IS_INCLUDES) {n return function ($this, el, fromIndex) {n var O = _toIobject($this);n var length = _toLength(O.length);n var index = _toAbsoluteIndex(fromIndex, length);n var value;n // Array#includes uses SameValueZero equality algorithmn // eslint-disable-next-line no-self-comparen if (IS_INCLUDES && el != el) while (length > index) {n value = O[index++];n // eslint-disable-next-line no-self-comparen if (value != value) return true;n // Array#indexOf ignores holes, Array#includes – notn } else for (;length > index; index++) if (IS_INCLUDES || index in O) {n if (O[index] === el) return IS_INCLUDES || index || 0;n } return !IS_INCLUDES && -1;n };n};nnvar _library = true;nnvar _shared = createCommonjsModule(function (module) {nvar SHARED = ‘__core-js_shared__’;nvar store = _global[SHARED] || (_global[SHARED] = {});nn(module.exports = function (key, value) {n return store[key] || (store[key] = value !== undefined ? value : {});n})(‘versions’, []).push({n version: _core.version,n mode: ‘pure’,n copyright: ‘© 2019 Denis Pushkarev (zloirock.ru)’n});n});nnvar id = 0;nvar px = Math.random();nvar _uid = function (key) {n return ‘Symbol(‘.concat(key === undefined ?  » : key, ‘)_’, (++id + px).toString(36));n};nnvar shared = _shared(‘keys’);nnvar _sharedKey = function (key) {n return shared[key] || (shared[key] = _uid(key));n};nnvar arrayIndexOf = _arrayIncludes(false);nvar IE_PROTO = _sharedKey(‘IE_PROTO’);nnvar _objectKeysInternal = function (object, names) {n var O = _toIobject(object);n var i = 0;n var result = [];n var key;n for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key);n // Don’t enum bug & hidden keysn while (names.length > i) if (_has(O, key = names[i++])) {n ~arrayIndexOf(result, key) || result.push(key);n }n return result;n};nn// IE 8- don’t enum bug keysnvar _enumBugKeys = (n ‘constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf’n).split(‘,’);nn// 19.1.2.14 / 15.2.3.14 Object.keys(O)nnnnvar _objectKeys = Object.keys || function keys(O) {n return _objectKeysInternal(O, _enumBugKeys);n};nnvar _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {n _anObject(O);n var keys = _objectKeys(Properties);n var length = keys.length;n var i = 0;n var P;n while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);n return O;n};nnvar document$2 = _global.document;nvar _html = document$2 && document$2.documentElement;nn// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])nnnnvar IE_PROTO$1 = _sharedKey(‘IE_PROTO’);nvar Empty = function () { /* empty */ };nvar PROTOTYPE$1 = ‘prototype’;nn// Create object with fake `null` prototype: use iframe Object with cleared prototypenvar createDict = function () {n // Thrash, waste and sodomy: IE GC bugn var iframe = _domCreate(‘iframe’);n var i = _enumBugKeys.length;n var lt =  »;n var iframeDocument;n iframe.style.display = ‘none’;n _html.appendChild(iframe);n iframe.src = ‘javascript:’; // eslint-disable-line no-script-urln // createDict = iframe.contentWindow.Object;n // html.removeChild(iframe);n iframeDocument = iframe.contentWindow.document;n iframeDocument.open();n iframeDocument.write(lt + ‘script’ + gt + ‘document.F=Object’ + lt + ‘/script’ + gt);n iframeDocument.close();n createDict = iframeDocument.F;n while (i–) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];n return createDict();n};nnvar _objectCreate = Object.create || function create(O, Properties) {n var result;n if (O !== null) {n Empty[PROTOTYPE$1] = _anObject(O);n result = new Empty();n Empty[PROTOTYPE$1] = null;n // add « __proto__ » for Object.getPrototypeOf polyfilln result[IE_PROTO$1] = O;n } else result = createDict();n return Properties === undefined ? result : _objectDps(result, Properties);n};nn// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])n_export(_export.S, ‘Object’, { create: _objectCreate });nnvar $Object = _core.Object;nvar create = function create(P, D) {n return $Object.create(P, D);n};nnvar create$1 = create;nnfunction _inheritsLoose(subClass, superClass) {n subClass.prototype = create$1(superClass.prototype);n subClass.prototype.constructor = subClass;n subClass.__proto__ = superClass;n}nnvar inheritsLoose = _inheritsLoose;nnfunction styleInject(css, ref) {n if ( ref === void 0 ) ref = {};n var insertAt = ref.insertAt;nn if (!css || typeof document === ‘undefined’) { return; }nn var head = document.head || document.getElementsByTagName(‘head’)[0];n var style = document.createElement(‘style’);n style.type = ‘text/css’;nn if (insertAt === ‘top’) {n if (head.firstChild) {n head.insertBefore(style, head.firstChild);n } else {n head.appendChild(style);n }n } else {n head.appendChild(style);n }nn if (style.styleSheet) {n style.styleSheet.cssText = css;n } else {n style.appendChild(document.createTextNode(css));n }n}nnvar reactIs_development = createCommonjsModule(function (module, exports) {nnnn{n (function() {nnObject.defineProperty(exports, ‘__esModule’, { value: true });nn// The Symbol used to tag the ReactElement-like types. If there is no native Symboln// nor polyfill, then a plain number is used for performance.nvar hasSymbol = typeof Symbol === ‘function’ && Symbol.for;nnvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for(‘react.element’) : 0xeac7;nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for(‘react.portal’) : 0xeaca;nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for(‘react.fragment’) : 0xeacb;nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for(‘react.strict_mode’) : 0xeacc;nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for(‘react.profiler’) : 0xead2;nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for(‘react.provider’) : 0xeacd;nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for(‘react.context’) : 0xeace;nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for(‘react.async_mode’) : 0xeacf;nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for(‘react.concurrent_mode’) : 0xeacf;nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for(‘react.forward_ref’) : 0xead0;nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for(‘react.suspense’) : 0xead1;nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for(‘react.memo’) : 0xead3;nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for(‘react.lazy’) : 0xead4;nnfunction isValidElementType(type) {n return typeof type === ‘string’ || typeof type === ‘function’ ||n // Note: its typeof might be other than ‘symbol’ or ‘number’ if it’s a polyfill.n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === ‘object’ && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);n}nn/**n * Forked from fbjs/warning:n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.jsn *n * Only change is we use console.warn instead of console.error,n * and do nothing when ‘console’ is not supported.n * This really simplifies the code.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 criticaln * paths. Removing the logging code for production environments will keep then * same logic and follow the same code paths.n */nnvar lowPriorityWarning = function () {};nn{n var printWarning = function (format) {n for (var _len = arguments.length, args = Array(_len > 1 ? _len – 1 : 0), _key = 1; _key 2 ? _len2 – 2 : 0), _key2 = 2; _key2 >’;nn // Important!n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.n var ReactPropTypes = {n array: createPrimitiveTypeChecker(‘array’),n bool: createPrimitiveTypeChecker(‘boolean’),n func: createPrimitiveTypeChecker(‘function’),n number: createPrimitiveTypeChecker(‘number’),n object: createPrimitiveTypeChecker(‘object’),n string: createPrimitiveTypeChecker(‘string’),n symbol: createPrimitiveTypeChecker(‘symbol’),nn any: createAnyTypeChecker(),n arrayOf: createArrayOfTypeChecker,n element: createElementTypeChecker(),n elementType: createElementTypeTypeChecker(),n instanceOf: createInstanceTypeChecker,n node: createNodeChecker(),n objectOf: createObjectOfTypeChecker,n oneOf: createEnumTypeChecker,n oneOfType: createUnionTypeChecker,n shape: createShapeTypeChecker,n exact: createStrictShapeTypeChecker,n };nn /**n * inlined Object.is polyfill to avoid requiring consumers ship their ownn * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isn */n /*eslint-disable no-self-compare*/n function is(x, y) {n // SameValue algorithmn if (x === y) {n // Steps 1-5, 7-10n // Steps 6.b-6.e: +0 != -0n return x !== 0 || 1 / x === 1 / y;n } else {n // Step 6.a: NaN == NaNn return x !== x && y !== y;n }n }n /*eslint-enable no-self-compare*/nn /**n * We use an Error-like object for backward compatibility as people may calln * PropTypes directly and inspect their output. However, we don’t use realn * Errors anymore. We don’t inspect their stack anyway, and creating themn * is prohibitively expensive if they are created too often, such as whatn * happens in oneOfType() for any type before the one that matched.n */n function PropTypeError(message) {n this.message = message;n this.stack =  »;n }n // Make `instanceof Error` still work for returned errors.n PropTypeError.prototype = Error.prototype;nn function createChainableTypeChecker(validate) {n {n var manualPropTypeCallCache = {};n var manualPropTypeWarningCount = 0;n }n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {n componentName = componentName || ANONYMOUS;n propFullName = propFullName || propName;nn if (secret !== ReactPropTypesSecret_1) {n if (throwOnDirectAccess) {n // New behavior only for users of `prop-types` packagen var err = new Error(n ‘Calling PropTypes validators directly is not supported by the `prop-types` package. ‘ +n ‘Use `PropTypes.checkPropTypes()` to call them. ‘ +n ‘Read more at http://fb.me/use-check-prop-types’n );n err.name = ‘Invariant Violation’;n throw err;n } else if (typeof console !== ‘undefined’) {n // Old behavior for people using React.PropTypesn var cacheKey = componentName + ‘:’ + propName;n if (n !manualPropTypeCallCache[cacheKey] &&n // Avoid spamming the console because they are often not actionable except for lib authorsn manualPropTypeWarningCount 1) {n printWarning$1(n ‘Invalid arguments supplied to oneOf, expected an array, got ‘ + arguments.length + ‘ arguments. ‘ +n ‘A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).’n );n } else {n printWarning$1(‘Invalid argument supplied to oneOf, expected an array.’);n }n }n return emptyFunctionThatReturnsNull;n }nn function validate(props, propName, componentName, location, propFullName) {n var propValue = props[propName];n for (var i = 0; i undefinedn * typeof document -> undefinedn *n * react-native:n * navigator.product -> ‘ReactNative’n */nfunction isStandardBrowserEnv() {n if (typeof navigator !== ‘undefined’ && navigator.product === ‘ReactNative’) {n return false;n }n return (n typeof window !== ‘undefined’ &&n typeof document !== ‘undefined’n );n}nn/**n * Iterate over an Array or an Object invoking a function for each item.n *n * If `obj` is an Array callback will be called passingn * the value, index, and complete array for each item.n *n * If ‘obj’ is an Object callback will be called passingn * the value, key, and complete object for each property.n *n * @param {Object|Array} obj The object to iteraten * @param {Function} fn The callback to invoke for each itemn */nfunction forEach(obj, fn) {n // Don’t bother if no value providedn if (obj === null || typeof obj === ‘undefined’) {n return;n }nn // Force an array if not already something iterablen if (typeof obj !== ‘object’) {n /*eslint no-param-reassign:0*/n obj = [obj];n }nn if (isArray(obj)) {n // Iterate over array valuesn for (var i = 0, l = obj.length; i index) {n var S = __chunk_1.IObject(arguments[index++]);n var keys = getSymbols ? __chunk_1.$keys(S).concat(getSymbols(S)) : __chunk_1.$keys(S);n var length = keys.length;n var j = 0;n var key;n while (length > j) {n key = keys[j++];n if (!__chunk_1.DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];n }n } return T;n} : $assign;nn// 19.1.3.1 Object.assign(target, source)nnn__chunk_1.$export(__chunk_1.$export.S + __chunk_1.$export.F, ‘Object’, { assign: _objectAssign });nnvar assign = __chunk_1.require$$1.Object.assign;nnvar assign$1 = assign;nn// most Object methods by ES6 should accept primitivesnnnnvar _objectSap = function (KEY, exec) {n var fn = (__chunk_1.require$$1.Object || {})[KEY] || Object[KEY];n var exp = {};n exp[KEY] = exec(fn);n __chunk_1.$export(__chunk_1.$export.S + __chunk_1.$export.F * __chunk_1.fails(function () { fn(1); }), ‘Object’, exp);n};nn// 19.1.2.14 Object.keys(O)nnnn_objectSap(‘keys’, function () {n return function keys(it) {n return __chunk_1.$keys(_toObject(it));n };n});nnvar keys = __chunk_1.require$$1.Object.keys;nnvar keys$1 = keys;nnexports._Object$assign = assign$1;nexports._Object$keys = keys$1;nexports.assign = assign$1;nexports.toObject = _toObject;n//# sourceMappingURL=chunk-c68ec227.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-c68ec227.jsn// module id = 6n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-c68ec227.js? »)},function(module,exports){eval(« var cid = 1;nnfunction buildParams(params) {n var result = [];nn for (var i in params) {n result.push(encodeURIComponent(i) + ‘=’ + encodeURIComponent(params[i]));n }nn return result.join(‘&’);n}nnmodule.exports = function jsonpAdapter(config) {n return new Promise(function(resolve, reject) {n var script = document.createElement(‘script’);n var src = config.url;nn if (config.params) {n var params = buildParams(config.params);nn if (params) {n src += (src.indexOf(‘?’) >= 0 ? ‘&’ : ‘?’) + params;n }n }nn script.async = true;nn function remove() {n if (script) {n script.onload = script.onreadystatechange = script.onerror = null;nn if (script.parentNode) {n script.parentNode.removeChild(script);n }nn script = null;n }n }nn var jsonp = ‘axiosJsonpCallback’ + cid++;n var old = window[jsonp];n var isAbort = false;nn window[jsonp] = function(responseData) {n window[jsonp] = old;nn if (isAbort) {n return;n }n n var response = {n data: responseData,n status: 200n }nn resolve(response);n };nn var additionalParams = {n _: (new Date().getTime())n };n n additionalParams[config.callbackParamName || ‘callback’] = jsonp;nn src += (src.indexOf(‘?’) >= 0 ? ‘&’ : ‘?’) + buildParams(additionalParams);nn script.onload = script.onreadystatechange = function() {n if (!script.readyState || /loaded|complete/.test(script.readyState)) {n remove();n }n };nn script.onerror = function() {n remove();nn reject(new Error(‘Network Error’));n };nn if (config.cancelToken) {n config.cancelToken.promise.then(function(cancel) {n if (!script) {n return;n }nn isAbort = true;nn reject(cancel);n });n } nn script.src = src;nn document.head.appendChild(script);n });n};nn//////////////////n// WEBPACK FOOTERn// ./~/axios-jsonp/lib/index.jsn// module id = 7n// module chunks = 0n//# sourceURL=webpack:///./~/axios-jsonp/lib/index.js? »)},function(module,exports,__webpack_require__){eval(« /* WEBPACK VAR INJECTION */(function(process) {‘use strict’;nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‘object’) && ‘default’ in ex) ? ex[‘default’] : ex; }nnvar __chunk_1 = __webpack_require__(2);nvar __chunk_2 = __webpack_require__(6);nvar feUtils = __webpack_require__(10);nvar Cookies = _interopDefault(__webpack_require__(5));nvar jsonpAdapter = _interopDefault(__webpack_require__(7));nn// 7.2.2 IsArray(argument)nnvar _isArray = Array.isArray || function isArray(arg) {n return __chunk_1.require$$1$1(arg) == ‘Array’;n};nn// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)nnn__chunk_1.$export(__chunk_1.$export.S, ‘Array’, { isArray: _isArray });nnvar isArray = __chunk_1.require$$1.Array.isArray;nnvar isArray$1 = isArray;nn// true -> String#atn// false -> String#codePointAtnvar _stringAt = function (TO_STRING) {n return function (that, pos) {n var s = String(__chunk_1.defined(that));n var i = __chunk_1.toInteger(pos);n var l = s.length;n var a, b;n if (i = l) return TO_STRING ?  » : undefined;n a = s.charCodeAt(i);n return a 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) 0xdfffn ? TO_STRING ? s.charAt(i) : an : TO_STRING ? s.slice(i, i + 2) : (a – 0xd800 = O.length) return { value: undefined, done: true };n point = $at(O, index);n this._i += point.length;n return { value: point, done: false };n});nnvar _iterStep = function (done, value) {n return { value: value, done: !!done };n};nn// 22.1.3.4 Array.prototype.entries()n// 22.1.3.13 Array.prototype.keys()n// 22.1.3.29 Array.prototype.values()n// 22.1.3.30 Array.prototype[@@iterator]()nvar es6_array_iterator = _iterDefine(Array, ‘Array’, function (iterated, kind) {n this._t = __chunk_1.toIObject(iterated); // targetn this._i = 0; // next indexn this._k = kind; // kindn// 22.1.5.2.1 %ArrayIteratorPrototype%.next()n}, function () {n var O = this._t;n var kind = this._k;n var index = this._i++;n if (!O || index >= O.length) {n this._t = undefined;n return _iterStep(1);n }n if (kind == ‘keys’) return _iterStep(0, index);n if (kind == ‘values’) return _iterStep(0, O[index]);n return _iterStep(0, [index, O[index]]);n}, ‘values’);nn// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)n_iterators.Arguments = _iterators.Array;nnvar TO_STRING_TAG = _wks(‘toStringTag’);nnvar DOMIterables = (‘CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,’ +n ‘DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,’ +n ‘MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,’ +n ‘SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,’ +n ‘TextTrackList,TouchList’).split(‘,’);nnfor (var i = 0; i index; index++) {n result = entries ? f(__chunk_1.anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);n if (result === BREAK || result === RETURN) return result;n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {n result = _iterCall(iterator, f, step.value, entries);n if (result === BREAK || result === RETURN) return result;n }n};nexports.BREAK = BREAK;nexports.RETURN = RETURN;n});nn// 7.3.20 SpeciesConstructor(O, defaultConstructor)nnnvar SPECIES = _wks(‘species’);nvar _speciesConstructor = function (O, D) {n var C = __chunk_1.anObject(O).constructor;n var S;n return C === undefined || (S = __chunk_1.anObject(C)[SPECIES]) == undefined ? D : __chunk_1.aFunction(S);n};nn// fast apply, http://jsperf.lnkit.com/fast-apply/5nvar _invoke = function (fn, args, that) {n var un = that === undefined;n switch (args.length) {n case 0: return un ? fn()n : fn.call(that);n case 1: return un ? fn(args[0])n : fn.call(that, args[0]);n case 2: return un ? fn(args[0], args[1])n : fn.call(that, args[0], args[1]);n case 3: return un ? fn(args[0], args[1], args[2])n : fn.call(that, args[0], args[1], args[2]);n case 4: return un ? fn(args[0], args[1], args[2], args[3])n : fn.call(that, args[0], args[1], args[2], args[3]);n } return fn.apply(that, args);n};nnvar process$1 = __chunk_1.global.process;nvar setTask = __chunk_1.global.setImmediate;nvar clearTask = __chunk_1.global.clearImmediate;nvar MessageChannel = __chunk_1.global.MessageChannel;nvar Dispatch = __chunk_1.global.Dispatch;nvar counter = 0;nvar queue = {};nvar ONREADYSTATECHANGE = ‘onreadystatechange’;nvar defer, channel, port;nvar run = function () {n var id = +this;n // eslint-disable-next-line no-prototype-builtinsn if (queue.hasOwnProperty(id)) {n var fn = queue[id];n delete queue[id];n fn();n }n};nvar listener = function (event) {n run.call(event.data);n};n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:nif (!setTask || !clearTask) {n setTask = function setImmediate(fn) {n var args = [];n var i = 1;n while (arguments.length > i) args.push(arguments[i++]);n queue[++counter] = function () {n // eslint-disable-next-line no-new-funcn _invoke(typeof fn == ‘function’ ? fn : Function(fn), args);n };n defer(counter);n return counter;n };n clearTask = function clearImmediate(id) {n delete queue[id];n };n // Node.js 0.8-n if (__chunk_1.require$$1$1(process$1) == ‘process’) {n defer = function (id) {n process$1.nextTick(__chunk_1.ctx(run, id, 1));n };n // Sphere (JS game engine) Dispatch APIn } else if (Dispatch && Dispatch.now) {n defer = function (id) {n Dispatch.now(__chunk_1.ctx(run, id, 1));n };n // Browsers with MessageChannel, includes WebWorkersn } else if (MessageChannel) {n channel = new MessageChannel();n port = channel.port2;n channel.port1.onmessage = listener;n defer = __chunk_1.ctx(port.postMessage, port, 1);n // Browsers with postMessage, skip WebWorkersn // IE8 has postMessage, but it’s sync & typeof its postMessage is ‘object’n } else if (__chunk_1.global.addEventListener && typeof postMessage == ‘function’ && !__chunk_1.global.importScripts) {n defer = function (id) {n __chunk_1.global.postMessage(id +  », ‘*’);n };n __chunk_1.global.addEventListener(‘message’, listener, false);n // IE8-n } else if (ONREADYSTATECHANGE in __chunk_1.cel(‘script’)) {n defer = function (id) {n __chunk_1.html.appendChild(__chunk_1.cel(‘script’))[ONREADYSTATECHANGE] = function () {n __chunk_1.html.removeChild(this);n run.call(id);n };n };n // Rest old browsersn } else {n defer = function (id) {n setTimeout(__chunk_1.ctx(run, id, 1), 0);n };n }n}nvar _task = {n set: setTask,n clear: clearTaskn};nnvar macrotask = _task.set;nvar Observer = __chunk_1.global.MutationObserver || __chunk_1.global.WebKitMutationObserver;nvar process$2 = __chunk_1.global.process;nvar Promise = __chunk_1.global.Promise;nvar isNode = __chunk_1.require$$1$1(process$2) == ‘process’;nnvar _microtask = function () {n var head, last, notify;nn var flush = function () {n var parent, fn;n if (isNode && (parent = process$2.domain)) parent.exit();n while (head) {n fn = head.fn;n head = head.next;n try {n fn();n } catch (e) {n if (head) notify();n else last = undefined;n throw e;n }n } last = undefined;n if (parent) parent.enter();n };nn // Node.jsn if (isNode) {n notify = function () {n process$2.nextTick(flush);n };n // browsers with MutationObserver, except iOS Safari – https://github.com/zloirock/core-js/issues/339n } else if (Observer && !(__chunk_1.global.navigator && __chunk_1.global.navigator.standalone)) {n var toggle = true;n var node = document.createTextNode( »);n new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-newn notify = function () {n node.data = toggle = !toggle;n };n // environments with maybe non-completely correct, but existent Promisen } else if (Promise && Promise.resolve) {n // Promise.resolve without an argument throws an error in LG WebOS 2n var promise = Promise.resolve(undefined);n notify = function () {n promise.then(flush);n };n // for other environments – macrotask based on:n // – setImmediaten // – MessageChanneln // – window.postMessagn // – onreadystatechangen // – setTimeoutn } else {n notify = function () {n // strange IE + webpack dev server bug – use .call(global)n macrotask.call(__chunk_1.global, flush);n };n }nn return function (fn) {n var task = { fn: fn, next: undefined };n if (last) last.next = task;n if (!head) {n head = task;n notify();n } last = task;n };n};nn// 25.4.1.5 NewPromiseCapability(C)nnnfunction PromiseCapability(C) {n var resolve, reject;n this.promise = new C(function ($$resolve, $$reject) {n if (resolve !== undefined || reject !== undefined) throw TypeError(‘Bad Promise constructor’);n resolve = $$resolve;n reject = $$reject;n });n this.resolve = __chunk_1.aFunction(resolve);n this.reject = __chunk_1.aFunction(reject);n}nnvar f = function (C) {n return new PromiseCapability(C);n};nnvar _newPromiseCapability = {ntf: fn};nnvar _perform = function (exec) {n try {n return { e: false, v: exec() };n } catch (e) {n return { e: true, v: e };n }n};nnvar navigator = __chunk_1.global.navigator;nnvar _userAgent = navigator && navigator.userAgent ||  »;nnvar _promiseResolve = function (C, x) {n __chunk_1.anObject(C);n if (__chunk_1.isObject(x) && x.constructor === C) return x;n var promiseCapability = _newPromiseCapability.f(C);n var resolve = promiseCapability.resolve;n resolve(x);n return promiseCapability.promise;n};nnvar _redefineAll = function (target, src, safe) {n for (var key in src) {n if (safe && target[key]) target[key] = src[key];n else __chunk_1.hide(target, key, src[key]);n } return target;n};nnvar SPECIES$1 = _wks(‘species’);nnvar _setSpecies = function (KEY) {n var C = typeof __chunk_1.require$$1[KEY] == ‘function’ ? __chunk_1.require$$1[KEY] : __chunk_1.global[KEY];n if (__chunk_1.DESCRIPTORS && C && !C[SPECIES$1]) __chunk_1.dP.f(C, SPECIES$1, {n configurable: true,n get: function () { return this; }n });n};nnvar ITERATOR$3 = _wks(‘iterator’);nvar SAFE_CLOSING = false;nntry {n var riter = [7][ITERATOR$3]();n riter[‘return’] = function () { SAFE_CLOSING = true; };n} catch (e) { /* empty */ }nnvar _iterDetect = function (exec, skipClosing) {n if (!skipClosing && !SAFE_CLOSING) return false;n var safe = false;n try {n var arr = [7];n var iter = arr[ITERATOR$3]();n iter.next = function () { return { done: safe = true }; };n arr[ITERATOR$3] = function () { return iter; };n exec(arr);n } catch (e) { /* empty */ }n return safe;n};nnvar task = _task.set;nvar microtask = _microtask();nnnnnvar PROMISE = ‘Promise’;nvar TypeError$1 = __chunk_1.global.TypeError;nvar process$3 = __chunk_1.global.process;nvar versions = process$3 && process$3.versions;nvar v8 = versions && versions.v8 ||  »;nvar $Promise = __chunk_1.global[PROMISE];nvar isNode$1 = _classof(process$3) == ‘process’;nvar empty = function () { /* empty */ };nvar Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;nvar newPromiseCapability = newGenericPromiseCapability = _newPromiseCapability.f;nnvar USE_NATIVE = !!function () {n try {n // correct subclassing with @@species supportn var promise = $Promise.resolve(1);n var FakePromise = (promise.constructor = {})[_wks(‘species’)] = function (exec) {n exec(empty, empty);n };n // unhandled rejections tracking support, NodeJS Promise without it fails @@species testn return (isNode$1 || typeof PromiseRejectionEvent == ‘function’)n && promise.then(empty) instanceof FakePromisen // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenablesn // https://bugs.chromium.org/p/chromium/issues/detail?id=830565n // we can’t detect it synchronously, so just check versionsn && v8.indexOf(‘6.6’) !== 0n && _userAgent.indexOf(‘Chrome/66’) === -1;n } catch (e) { /* empty */ }n}();nn// helpersnvar isThenable = function (it) {n var then;n return __chunk_1.isObject(it) && typeof (then = it.then) == ‘function’ ? then : false;n};nvar notify = function (promise, isReject) {n if (promise._n) return;n promise._n = true;n var chain = promise._c;n microtask(function () {n var value = promise._v;n var ok = promise._s == 1;n var i = 0;n var run = function (reaction) {n var handler = ok ? reaction.ok : reaction.fail;n var resolve = reaction.resolve;n var reject = reaction.reject;n var domain = reaction.domain;n var result, then, exited;n try {n if (handler) {n if (!ok) {n if (promise._h == 2) onHandleUnhandled(promise);n promise._h = 1;n }n if (handler === true) result = value;n else {n if (domain) domain.enter();n result = handler(value); // may thrown if (domain) {n domain.exit();n exited = true;n }n }n if (result === reaction.promise) {n reject(TypeError$1(‘Promise-chain cycle’));n } else if (then = isThenable(result)) {n then.call(result, resolve, reject);n } else resolve(result);n } else reject(value);n } catch (e) {n if (domain && !exited) domain.exit();n reject(e);n }n };n while (chain.length > i) run(chain[i++]); // variable length – can’t use forEachn promise._c = [];n promise._n = false;n if (isReject && !promise._h) onUnhandled(promise);n });n};nvar onUnhandled = function (promise) {n task.call(__chunk_1.global, function () {n var value = promise._v;n var unhandled = isUnhandled(promise);n var result, handler, console;n if (unhandled) {n result = _perform(function () {n if (isNode$1) {n process$3.emit(‘unhandledRejection’, value, promise);n } else if (handler = __chunk_1.global.onunhandledrejection) {n handler({ promise: promise, reason: value });n } else if ((console = __chunk_1.global.console) && console.error) {n console.error(‘Unhandled promise rejection’, value);n }n });n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS – shouldn promise._h = isNode$1 || isUnhandled(promise) ? 2 : 1;n } promise._a = undefined;n if (unhandled && result.e) throw result.v;n });n};nvar isUnhandled = function (promise) {n return promise._h !== 1 && (promise._a || promise._c).length === 0;n};nvar onHandleUnhandled = function (promise) {n task.call(__chunk_1.global, function () {n var handler;n if (isNode$1) {n process$3.emit(‘rejectionHandled’, promise);n } else if (handler = __chunk_1.global.onrejectionhandled) {n handler({ promise: promise, reason: promise._v });n }n });n};nvar $reject = function (value) {n var promise = this;n if (promise._d) return;n promise._d = true;n promise = promise._w || promise; // unwrapn promise._v = value;n promise._s = 2;n if (!promise._a) promise._a = promise._c.slice();n notify(promise, true);n};nvar $resolve = function (value) {n var promise = this;n var then;n if (promise._d) return;n promise._d = true;n promise = promise._w || promise; // unwrapn try {n if (promise === value) throw TypeError$1(« Promise can’t be resolved itself »);n if (then = isThenable(value)) {n microtask(function () {n var wrapper = { _w: promise, _d: false }; // wrapn try {n then.call(value, __chunk_1.ctx($resolve, wrapper, 1), __chunk_1.ctx($reject, wrapper, 1));n } catch (e) {n $reject.call(wrapper, e);n }n });n } else {n promise._v = value;n promise._s = 1;n notify(promise, false);n }n } catch (e) {n $reject.call({ _w: promise, _d: false }, e); // wrapn }n};nn// constructor polyfillnif (!USE_NATIVE) {n // 25.4.3.1 Promise(executor)n $Promise = function Promise(executor) {n _anInstance(this, $Promise, PROMISE, ‘_h’);n __chunk_1.aFunction(executor);n Internal.call(this);n try {n executor(__chunk_1.ctx($resolve, this, 1), __chunk_1.ctx($reject, this, 1));n } catch (err) {n $reject.call(this, err);n }n };n // eslint-disable-next-line no-unused-varsn Internal = function Promise(executor) {n this._c = []; // /g, ‘>’).replace(/ »/g, ‘ »‘);n}nfunction encodeURIStr(str) {n // eslint-disable-next-line no-array-constructorn var regexs = new Array(new RegExp(‘%’, ‘g’), new RegExp(‘,’, ‘g’), new RegExp(‘/’, ‘g’), new RegExp(‘\\?’, ‘g’), new RegExp(‘:’, ‘g’), new RegExp(‘@’, ‘g’), new RegExp(‘&’, ‘g’), new RegExp(‘=’, ‘g’), new RegExp(‘\\+’, ‘g’), new RegExp(‘\\$’, ‘g’), new RegExp(‘#’, ‘g’)); // eslint-disable-next-line no-array-constructornn var replaces = new Array(‘%25’, ‘%2C’, ‘%2F’, ‘%3F’, ‘%3A’, ‘%40’, ‘%26’, ‘%3D’, ‘%2B’, ‘%24’, ‘%23’);n regexs.forEach(function (reg, index) {n str = str.replace(reg, replaces[index]);n });n return str;n}nfunction extractText(text, entities, needEscape) {n if (needEscape === void 0) {n needEscape = true;n }nn var urls = entities.urls;n var userMentions = entities.user_mentions;n var topics = entities.topics;n var htmlList = [];n var entityList = [];n var result_text =  »;n var start = 0;n var end = 0;n var begin = 0;n var plaintext =  »;nn var renderUserMentionsTpl = function renderUserMentionsTpl(entity) {n var uid = entity.uid,n screen_name = entity.screen_name;nn var _screen_name = needEscape ? escapeHTML(screen_name) : screen_name;nn var tmpl =  »
 » + _screen_name + « « ;n return tmpl;n };nn var renderUrlsTpl = function renderUrlsTpl(entity) {n var url = entity.url,n expanded_url = entity.expanded_url;nn var _url = (needEscape ? escapeHTML(url) : url) || expanded_url;nn var tmpl =  »
 » + _url + « « ;n return tmpl;n };nn var renderTopicTpl = function renderTopicTpl(entity) {n var encoded_text = entity.encoded_text;nn var _encoded_text = encoded_text || (needEscape ? escapeHTML(text) : text);nn var tmpl =  »
 » + _encoded_text + « « ;n return tmpl;n };nn if (urls && isArray$1(urls)) {n entityList = urls;n }nn if (userMentions && isArray$1(userMentions)) {n entityList = entityList.concat(userMentions);n }nn if (topics && isArray$1(topics)) {n entityList = entityList.concat(topics);n }nn entityList.sort(function (a, b) {n return a.indices[0] – b.indices[0];n });nn if (entityList.length === 0) {n return needEscape ? escapeHTML(text) : text;n }nn entityList.forEach(function (entity, index) {n if (entity.uid) {n htmlList[index] = renderUserMentionsTpl(entity);n } else if (entity.url) {n htmlList[index] = renderUrlsTpl(entity);n } else {n entity.encoded_text = entity.encoded_text || encodeURIStr(needEscape ? escapeHTML(entity.text) : entity.text);n htmlList[index] = renderTopicTpl(entity);n }nn begin = index ? end : 0; // eslint-disable-next-line prefer-destructuringnn start = entity.indices[0]; // eslint-disable-next-line prefer-destructuringnn end = entity.indices[1];n plaintext = text.substring(begin, start);n result_text = result_text + (needEscape ? escapeHTML(plaintext) : plaintext) + htmlList[index];nn if (index === entityList.length – 1) {n result_text += needEscape ? escapeHTML(text.substring(end)) : text.substring(end);n }n });n return result_text;n}nnexports.CommentsAPI = CommentsAPI;nexports.IS_DEV = IS_DEV;nexports.extractText = extractText;n//# sourceMappingURL=chunk-f3ec1daa.js.mapnn/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)))nn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-f3ec1daa.jsn// module id = 8n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-f3ec1daa.js? »);
},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnvar __chunk_1 = __webpack_require__(2);nnvar $JSON = __chunk_1.require$$1.JSON || (__chunk_1.require$$1.JSON = { stringify: JSON.stringify });nvar stringify = function stringify(it) { // eslint-disable-line no-unused-varsn return $JSON.stringify.apply($JSON, arguments);n};nnvar stringify$1 = stringify;nnexports._JSON$stringify = stringify$1;n//# sourceMappingURL=chunk-fb5b8d32.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-fb5b8d32.jsn// module id = 9n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-fb5b8d32.js? »)},function(module,exports,__webpack_require__){eval(‘ »use strict »;nfunction __export(m) {n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];n}nObject.defineProperty(exports, « __esModule », { value: true });n__export(__webpack_require__(79));n__export(__webpack_require__(87));n__export(__webpack_require__(22));n//# sourceMappingURL=index.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/index.jsn// module id = 10n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/index.js?’)},function(module,exports){eval(« ‘use strict’;nn/*n * @Author: hanjiyunn * @Date: 2020-08-04 09:58:04n * @Last Modified by: hanjiyunn * @Last Modified time: 2020-08-04 16:12:44n */nvar MAX_STATUS_LENGTH = 140; // 转发到广播时,最多 140 字nnvar MAX_STATUS_COMMENTS_LENGTH = 280; // 广播下的回复,最多 280 字nnvar STATUS = ‘status’;nvar HTTPS_SHORT_DOUBAN = ‘https://douc.cc’;nvar URL_RE = /(http|https):\/\/[-._/a-zA-Z0-9~?%#=@:&;*+]+\b[?#/*]*/;nn/*n * @Author: hanjiyunn * @Date: 2019-05-27 00:45:09n * @Last Modified by: hanjiyunn * @Last Modified time: 2019-05-27 00:45:43n */nvar DEFAULT = ‘default’;nvar PENDING = ‘pending’;nvar FAIL = ‘fail’;nvar SUCCESS = ‘success’;nnexports.DEFAULT = DEFAULT;nexports.FAIL = FAIL;nexports.HTTPS_SHORT_DOUBAN = HTTPS_SHORT_DOUBAN;nexports.MAX_STATUS_COMMENTS_LENGTH = MAX_STATUS_COMMENTS_LENGTH;nexports.MAX_STATUS_LENGTH = MAX_STATUS_LENGTH;nexports.PENDING = PENDING;nexports.STATUS = STATUS;nexports.SUCCESS = SUCCESS;nexports.URL_RE = URL_RE;n//# sourceMappingURL=chunk-8d7443f9.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/chunk-8d7443f9.jsn// module id = 11n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/chunk-8d7443f9.js? »)},function(module,exports,__webpack_require__){eval( »use strict’;nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‘object’) && ‘default’ in ex) ? ex[‘default’] : ex; }nnvar __chunk_1 = __webpack_require__(2);nvar React = __webpack_require__(1);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);nvar __chunk_5 = __webpack_require__(9);nvar __chunk_6 = __webpack_require__(8);nnfunction _assertThisInitialized(self) {n if (self === void 0) {n throw new ReferenceError(« this hasn’t been initialised – super() hasn’t been called »);n }nn return self;n}nnvar assertThisInitialized = _assertThisInitialized;nnvar css = « .form-input-wrapper {\n position: relative;\n border: 1px solid #D9D9D9;\n border-radius: 3px; }\n\n.suggest-wrap {\n position: absolute;\n top: 30px;\n min-width: 120px;\n border: 1px solid #c5c7d2;\n border-radius: 3px;\n font-size: 13px;\n background: #fff;\n display: none;\n z-index: 99; }\n .suggest-wrap.show {\n display: block; }\n .suggest-wrap ul {\n padding: 3px 0;\n margin: 0; }\n .suggest-wrap li {\n padding: 5px 7px;\n line-height: 20px;\n cursor: pointer;\n text-align: left; }\n .suggest-wrap li a {\n color: #333; }\n .suggest-wrap li a:hover {\n background: transparent; }\n .suggest-wrap li.on {\n background: #e9f0f8; }\n .suggest-wrap li img {\n height: 20px;\n width: 20px;\n float: left;\n margin-right: 5px;\n vertical-align: middle; }\n\n.form-pre {\n position: absolute;\n opacity: 0;\n top: 0;\n left: 0;\n padding: 10px 8px;\n margin: 0;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n z-index: -1;\n font: 13px Helvetica, Arial, sans-serif;\n color: #f00; }\n .form-pre code {\n font: 13px Helvetica, Arial, sans-serif; }\n\n.form-area {\n display: block;\n width: 100%;\n border: 0;\n box-sizing: border-box;\n margin: 0;\n padding: 10px 8px;\n outline: none;\n font-size: 13px; }\n\n.form-input {\n border: 0;\n padding: 0;\n flex: 1;\n outline: none;\n font-size: 13px; }\n\n.img-uploader-wrapper {\n cursor: pointer;\n margin: 10px;\n line-height: 1; }\n .img-uploader-wrapper .upload-icon {\n display: inline-block;\n width: 18px;\n vertical-align: middle; }\n .img-uploader-wrapper label {\n display: inline-block;\n vertical-align: middle;\n margin-left: 4px;\n font-size: 13px;\n color: #999;\n line-height: 18px;\n cursor: pointer; }\n .img-uploader-wrapper .img-upload-input {\n position: absolute;\n left: 0;\n width: 80px;\n opacity: 0;\n z-index: 2; }\n .img-uploader-wrapper .remove-img {\n vertical-align: middle;\n color: #999; }\n .img-uploader-wrapper .img-preview {\n display: inline-block;\n margin-right: 5px;\n overflow: hidden;\n vertical-align: middle; }\n .img-uploader-wrapper .img-preview img {\n max-height: 48px;\n max-width: 48px;\n vertical-align: middle; }\n »;n__chunk_1.styleInject(css);nnvar userSelectPropTypes = {n type: __chunk_1.PropTypes.string,n inputType: __chunk_1.PropTypes.string,n text: __chunk_1.PropTypes.string,n maxLength: __chunk_1.PropTypes.number,n username: __chunk_1.PropTypes.string,n canAtSb: __chunk_1.PropTypes.bool,n replyUsers: __chunk_1.PropTypes.array,n handleChange: __chunk_1.PropTypes.funcn};nvar userSelectDefaultProps = {n type: ‘comment’,n //区分是comment回复还是reply回复n inputType: ‘input’,n //区分是input=text 还是用的textarean text:  »,n maxLength: 0,n // 最长回复,为 0 时不限制长度n username:  »,n //input=text需要知道用户名n canAtSb: false,n //是否能at某个人,目前仅话题可以n replyUsers: [],n //at某人时供选择的已过滤的用户列表n handleSelectUser: function handleSelectUser() {}n};nnvar UserSelect =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(UserSelect, _Component);nn function UserSelect(props) {n var _this;nn _this = _Component.call(this, props) || this;n _this.state = {n text: props.text,n // 文本框输入内容n cursor_text:  »,n // 光标之前的文本,n isShowTag: false,n // @用户时,是否显示用户列表内容n focusedIndex: 0,n // @用户时,当前选中的用户n replyUsers: props.replyUsers,n // @用户时,用户列表n objUsers: {},n // 存放@用户的uid及次数、用户名n pre_html: ‘
 ‘,n // 内容同输入框内容,主要获取当前鼠标位置n posStyle: {n // @用户时,用户列表的位置n top: 0,n left: 0n },n uploaded: props.uploaded,n // 是否已经上传n preview_img:  » // 上传图片后的预览图nn };n _this.setWrapperRef = _this.setWrapperRef.bind(assertThisInitialized(_this));n _this.handleClickOutside = _this.handleClickOutside.bind(assertThisInitialized(_this));n return _this;n }nn var _proto = UserSelect.prototype;nn _proto.componentDidMount = function componentDidMount() {n document.addEventListener(‘mousedown’, this.handleClickOutside); // 自动 focus 输入框nn if (this.props.type === ‘reply’) {n this._input.focus();n }n };nn _proto.componentWillUnmount = function componentWillUnmount() {n document.removeEventListener(‘mousedown’, this.handleClickOutside);n };nn _proto.componentDidUpdate = function componentDidUpdate(prevProps) {n if (this.props.text !== prevProps.text) {n this.setSelectPos();n }n };nn _proto.setWrapperRef = function setWrapperRef(node) {n this.wrapperRef = node;n };nn _proto.setSelectPos = function setSelectPos() {n var pos_top, pos_left, pre_top;n var preEl = this.refs.preRef;n var code = preEl && preEl.querySelector(‘code’);n var inputEl = this._input;n pos_top = code && code.offsetTop || 0;n pos_left = code && code.offsetLeft || 0;n pre_top = inputEl && inputEl.scrollTop;n var max_width = inputEl && inputEl.offsetWidth;nn if (max_width – pos_left   » + val.slice(cur_pos)n });nn if (cursor_text.split(‘ ‘).pop().indexOf(‘@’) 1) {n if (!canRequest) {n this.setState({n isShowTag: false,n canRequest: truen });n return;n }nn var search_text = val.slice(last_leadChar_pos + 1, cur_pos);n var obj = {n word: search_text,n count: 5,n alt: ‘xd’n };n __chunk_6.CommentsAPI.getShuo(obj).then(function (res) {n var reg_btag = //g;n var users = res.users;n var new_users = users.map(function (user) {n return JSON.parse(__chunk_5._JSON$stringify(user).replace(reg_btag,  »));n });nn if (users.length > 0) {n _this3.setState({n isShowTag: true,n replyUsers: new_users,n search_text: search_textn });n } else {n _this3.setState({n canRequest: false,n isShowTag: falsen });n }n }).catch(function (err) {n console.log(err);n });n }n }n };nn _proto.handleKeyDown = function handleKeyDown(e) {n var _this4 = this;nn var _this$state3 = this.state,n text = _this$state3.text,n replyUsers = _this$state3.replyUsers,n isShowTag = _this$state3.isShowTag,n objUsers = _this$state3.objUsers;n var focusedIndex = this.state.focusedIndex;n var newIndex = 0,n t;nn if (replyUsers.length 0) {n newIndex = focusedIndex – 1;n } else {n newIndex = replyUsers.length – 1;n }nn _this4.setState({n focusedIndex: newIndexn });n }nn break;n // down arrownn case 40:n if (isShowTag) {n e.preventDefault();nn if (focusedIndex -1);n var keyIsESC = event.keyCode && event.keyCode === 27;n var selectedSomething = window.getSelection().toString().length > 0;nn if (this.valueIsEmpty() && (isClickingBlank && !selectedSomething || keyIsESC)) {n handleHideReplyEditor();n }n };nn _proto.handleAddReply = function handleAddReply(e) {n var _this2 = this;nn e.preventDefault();n e.stopPropagation();n var _this$state = this.state,n value = _this$state.value,n objUsers = _this$state.objUsers,n showCaptcha = _this$state.showCaptcha,n captchaObj = _this$state.captchaObj,n captchaSolution = _this$state.captchaSolution,n submittingStatus = _this$state.submittingStatus;n var _this$props = this.props,n id = _this$props.id,n handleAddReply = _this$props.handleAddReply;nn if (submittingStatus === __chunk_4.PENDING) {n return;n }nn this.setState({n submittingStatus: __chunk_4.PENDINGn });n /*n * 这里注释掉并且只保留了一个空的 successCallback 是因为n * 提交成功后,整个 ReplyEditor 就消失了, unmount 了,组件里面的 state 被销毁了,n * 再 setState 也没意义了,而且可能会报错。n */nn var successCallback = function successCallback() {// 提交成功后,清空输入框、清空验证码相关、清空之前勾选的「转发到广播」n // this.setState({n // value:  »,n // showCaptcha: false, //n // captchaObj: null,n // captchaErrorMsg:  »,n // captchaSolution:  »,n // checked: falsen // })n };nn var failCallback = function failCallback(code, data, errorMsg) {n if (code === 1001 && data) {n _this2.setState({n submittingStatus: __chunk_4.FAIL,n showCaptcha: true,n captchaObj: data,n captchaErrorMsg: errorMsg === ‘验证码错误’ ?  » : errorMsgn });n } else {n _this2.setState({n submittingStatus: __chunk_4.FAILn });n }n };nn var submit_text = value;nn for (var k in objUsers) {n submit_text = submit_text.replace(new RegExp(« @ » + objUsers[k].username +  » « , ‘g’), « @ » + k +  » « );n }nn var newRelpy = {n rv_comment: submit_text,n ref_cid: id,n // 被回应的 idn sync_to_mb: false // 是否用同步到广播n // 如果需要输入验证码,则附上验证码的输入结果和相应的 idnn };nn if (captchaObj || showCaptcha) {n newRelpy[‘captcha-id’] = captchaObj.captcha_id;n newRelpy[‘captcha-solution’] = captchaSolution;n }nn handleAddReply(newRelpy, successCallback, failCallback);n };nn _proto.handleChange = function handleChange(val, objUsers) {n this.setState({n value: val,n objUsers: objUsers,n textWithTinyUrl: val && val.replace(new RegExp(__chunk_4.URL_RE, ‘gm’), __chunk_4.HTTPS_SHORT_DOUBAN + « XXXXXX ») ||  »n });n };nn _proto.valueIsEmpty = function valueIsEmpty() {n var value = this.state.value;n return !value || value.trim().length === 0;n };nn _proto.handleCaptchaSolutionChange = function handleCaptchaSolutionChange(e) {n this.setState({n captchaSolution: e.target.valuen });n };nn _proto.render = function render() {n var _this$state2 = this.state,n value = _this$state2.value,n textWithTinyUrl = _this$state2.textWithTinyUrl,n showCaptcha = _this$state2.showCaptcha,n captchaObj = _this$state2.captchaObj,n captchaSolution = _this$state2.captchaSolution,n captchaErrorMsg = _this$state2.captchaErrorMsg,n submittingStatus = _this$state2.submittingStatus,n isShowTag = _this$state2.isShowTag,n replyUsers = _this$state2.replyUsers,n focusedIndex = _this$state2.focusedIndex;n var _this$props2 = this.props,n btnText = _this$props2.btnText,n username = _this$props2.username,n type = _this$props2.type,n canAtSb = _this$props2.canAtSb,n config = _this$props2.config,n maxLength = _this$props2.maxLength;n var cls = __chunk_3.classnames(‘reply-editor’, {n ‘show-captcha’: showCaptcha && captchaObjn });n var submitBtn = React__default.createElement(« button », {n type: « submit »,n disabled: submittingStatus === __chunk_4.PENDING,n className: __chunk_3.classnames(‘comment-form-btn’, {n disabled: submittingStatus === __chunk_4.PENDINGn })n }, submittingStatus === __chunk_4.PENDING ? ‘提交中’ : btnText);n var maxLen = 0; // 广播下的回复字数最多 280,其他的不限字数nn if (config.service && config.service === __chunk_4.STATUS) {n maxLen = __chunk_4.MAX_STATUS_COMMENTS_LENGTH;n } else {n maxLen = maxLength;n }nn return React__default.createElement(« div », {n className: clsn }, React__default.createElement(« form », {n onSubmit: this.handleAddReply.bind(this)n }, React__default.createElement(userSelect.UserSelect, {n type: type,n inputType: « text »,n text: value,n username: username,n replyUsers: replyUsers,n maxLength: maxLen,n canAtSb: canAtSb,n handleChange: this.handleChange.bind(this)n }), showCaptcha && captchaObj ? React__default.createElement(« div », {n className: « reply-form-foot »n }, React__default.createElement(« div », {n className: « captcha-wrapper »n }, React__default.createElement(« img », {n className: « captcha-img »,n src: captchaObj.captcha_img,n onClick: this.handleAddReply.bind(this)n }), React__default.createElement(« input », {n type: « text »,n placeholder: « \u8BF7\u8F93\u5165\u5DE6\u56FE\u7684\u9A8C\u8BC1\u7801 »,n value: captchaSolution,n className: « captcha-input »,n onChange: this.handleCaptchaSolutionChange.bind(this)n }), React__default.createElement(« div », {n className: « captcha-error-msg »n }, captchaErrorMsg ? « * » + captchaErrorMsg :  »)), submitBtn) : submitBtn, maxLen && maxLen – textWithTinyUrl.length = maxLenn })n }, textWithTinyUrl.length, « / », maxLen) : null));n };nn return ReplyEditor;n}(React.Component);nnReplyEditor.propTypes = replyEditorPropTypes;nReplyEditor.defaultProps = replyEditorDefaultProps;nnexports.default = ReplyEditor;nexports.replyEditorDefaultProps = replyEditorDefaultProps;nexports.replyEditorPropTypes = replyEditorPropTypes;n//# sourceMappingURL=reply-editor.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/reply-editor.jsn// module id = 14n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/reply-editor.js? »);
},function(module,exports,__webpack_require__){eval( »use strict’;nnObject.defineProperty(exports, ‘__esModule’, { value: true });nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‘object’) && ‘default’ in ex) ? ex[‘default’] : ex; }nnvar __chunk_1 = __webpack_require__(2);n__webpack_require__(6);n__webpack_require__(10);nvar React = __webpack_require__(1);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);n__webpack_require__(5);n__webpack_require__(12);nvar replyEditor = __webpack_require__(14);n__webpack_require__(11);n__webpack_require__(9);nvar __chunk_6 = __webpack_require__(8);n__webpack_require__(7);nnvar css = « @charset \ »UTF-8\ »;\n/**\n * @Desc 评论的相关操作动作,包括:回应、删除、投诉\n *\n * @Author wangyanhong\n * @Date 2019-05-15\n */\n.comment-action-bar {\n color: #bbb;\n font-size: 13px;\n text-align: right;\n min-height: 21px; }\n\n.comment-source,\n.dev .comment-source {\n float: left; }\n .comment-source a:link,\n .dev .comment-source a:link {\n color: #bbb; }\n .comment-source a:visited,\n .dev .comment-source a:visited {\n color: #bbb; }\n .comment-source a:hover,\n .dev .comment-source a:hover {\n background: #bbb;\n color: #fff; }\n\n.action-bar-group,\n.dev .action-bar-group {\n visibility: hidden; }\n .action-bar-group.hover,\n .dev .action-bar-group.hover {\n visibility: visible; }\n .action-bar-group a:link,\n .dev .action-bar-group a:link {\n margin-left: 10px;\n color: #bbb;\n cursor: pointer; }\n .action-bar-group a:hover,\n .dev .action-bar-group a:hover {\n color: #fff;\n background: #bbb; }\n »;n__chunk_1.styleInject(css);nnvar commentActionsPropTypes = {n config: __chunk_1.PropTypes.object,n comment: __chunk_1.PropTypes.object.isRequired,n type: __chunk_1.PropTypes.string,n isHovering: __chunk_1.PropTypes.bool,n replyEditorVisible: __chunk_1.PropTypes.bool,n canAtSb: __chunk_1.PropTypes.bool,n maxLength: __chunk_1.PropTypes.number,n replyUsers: __chunk_1.PropTypes.array,n handleHideReplyEditor: __chunk_1.PropTypes.func,n handleShowReplyEditor: __chunk_1.PropTypes.func,n handleDeleteComment: __chunk_1.PropTypes.func,n handleAddReply: __chunk_1.PropTypes.func,n handleShowReportDialog: __chunk_1.PropTypes.funcn};nvar commentActionsDefaultProps = {n config: null,n comment: null,n type: ‘comment’,n // ‘comment’ 或者 ‘reply’,默认 ‘comment’n isHovering: false,n replyEditorVisible: true,n canAtSb: false,n maxLength: 0,n replyUsers: [],n handleHideReplyEditor: function handleHideReplyEditor() {},n handleShowReplyEditor: function handleShowReplyEditor() {},n handleDeleteComment: function handleDeleteComment() {},n handleAddReply: function handleAddReply() {},n handleShowReportDialog: function handleShowReportDialog() {}n};nnvar ActionBar =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(ActionBar, _Component);nn function ActionBar() {n return _Component.apply(this, arguments) || this;n }nn var _proto = ActionBar.prototype;nn _proto.handleShowReportDialog = function handleShowReportDialog(e) {n e.preventDefault();n var _this$props = this.props,n handleShowReportDialog = _this$props.handleShowReportDialog,n id = _this$props.comment.id;n handleShowReportDialog(id);n };nn _proto.handleDeleteComment = function handleDeleteComment(e) {n var _this$props2 = this.props,n handleDeleteComment = _this$props2.handleDeleteComment,n id = _this$props2.comment.id;n handleDeleteComment(id);n };nn _proto.render = function render() {n var _this$props3 = this.props,n config = _this$props3.config,n comment = _this$props3.comment,n isHovering = _this$props3.isHovering,n replyEditorVisible = _this$props3.replyEditorVisible,n canAtSb = _this$props3.canAtSb,n replyUsers = _this$props3.replyUsers,n handleShowReplyEditor = _this$props3.handleShowReplyEditor,n handleHideReplyEditor = _this$props3.handleHideReplyEditor,n handleAddReply = _this$props3.handleAddReply,n type = _this$props3.type,n maxLength = _this$props3.maxLength;nn if (!comment || !config) {n return null;n } // 用户未登录,不显示操作按钮nnn var user = __chunk_6.IS_DEV ? config.user : window._COMMENTS_CONFIG ? window._COMMENTS_CONFIG.user : null;n var author = comment.author,n id = comment.id;n var replyLimit = __chunk_6.IS_DEV ? config.target.reply_limit : window._COMMENTS_CONFIG.target.reply_limit;n var canAddComment = __chunk_6.IS_DEV ? config.target.can_add_comment : window._COMMENTS_CONFIG.target.can_add_comment;n return React__default.createElement(« div », {n className: « comment-action-bar »n }, comment.from ? React__default.createElement(« span », {n className: « comment-source »n }, « \u6765\u81EA », ‘ ‘, React__default.createElement(« a », {n href: comment.from[1],n target: « _blank »,n title: comment.from[0]n }, comment.from[0])) : null, user ? React__default.createElement(« div », {n className: __chunk_3.classnames(‘action-bar-group’, {n hover: isHoveringn })n }, !canAddComment ? replyLimit === ‘F’ && !author.is_friend ? React__default.createElement(« span », null, « \uFF08\u4EC5\u5141\u8BB8\u53D1\u5E03\u8005\u5173\u6CE8\u4EBA\u56DE\u5E94\uFF09 ») : React__default.createElement(« span », null, « \uFF08\u5DF2\u7ECF\u7981\u6B62\u56DE\u5E94\uFF09 ») : React__default.createElement(« a », {n rel: « nofollow »,n title: « \u56DE\u5E94 » + author.name,n href: « javascript:; »,n style: {n display: replyEditorVisible ? ‘none’ : ‘inline’n },n onClick: handleShowReplyEditorn }, « \u56DE\u5E94 »), user.is_admin || user.id === author.id || user.can_delete_all_comments ? React__default.createElement(« a », {n rel: « nofollow »,n title: « \u5220\u9664 »,n href: « javascript:; »,n onClick: this.handleDeleteComment.bind(this)n }, « \u5220\u9664 ») : null, React__default.createElement(« a », {n rel: « nofollow »,n « data-cid »: comment.id,n title: « \u6295\u8BC9 »,n href: « javascript:; »,n className: « report-comment-btn »,n onClick: this.handleShowReportDialog.bind(this)n }, « \u6295\u8BC9″)) : null, replyEditorVisible ? React__default.createElement(replyEditor.default, {n id: id.toString(),n config: config,n username: author.name,n type: type,n canAtSb: canAtSb,n maxLength: maxLength,n replyUsers: replyUsers,n handleHideReplyEditor: handleHideReplyEditor,n handleAddReply: handleAddReplyn }) : null);n };nn return ActionBar;n}(React.Component);nnActionBar.propTypes = commentActionsPropTypes;nActionBar.defaultProps = commentActionsDefaultProps;nnexports.commentActionsDefaultProps = commentActionsDefaultProps;nexports.commentActionsPropTypes = commentActionsPropTypes;nexports.default = ActionBar;n//# sourceMappingURL=action-bar.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/action-bar.jsn// module id = 15n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/action-bar.js?’)},function(module,exports,__webpack_require__){eval( »use strict’;nnObject.defineProperty(exports, ‘__esModule’, { value: true });nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‘object’) && ‘default’ in ex) ? ex[‘default’] : ex; }nnvar __chunk_1 = __webpack_require__(2);n__webpack_require__(6);n__webpack_require__(10);nvar React = __webpack_require__(1);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);nvar actionBar = __webpack_require__(15);n__webpack_require__(5);n__webpack_require__(12);n__webpack_require__(14);n__webpack_require__(11);nvar __chunk_5 = __webpack_require__(9);nvar __chunk_6 = __webpack_require__(8);n__webpack_require__(7);nnvar css = « @charset \ »UTF-8\ »;\n/*\n* @Author: hanjiyun\n* @Date: 2019-05-13 22:55:26\n* @Last Modified by: hanjiyun\n* @Last Modified time: 2019-06-19 21:00:10\n*/\n/*\n* @Author: hanjiyun\n* @Date: 2019-05-14 21:32:06\n* @Last Modified by: hanjiyun\n* @Last Modified time: 2019-05-31 15:19:58\n*/\n/* 验证码 */\n.captcha-wrapper {\n position: relative;\n display: flex; }\n .captcha-wrapper img {\n display: block;\n height: 30px;\n cursor: pointer; }\n .captcha-wrapper .captcha-input {\n margin-left: 5px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n padding: 6px 10px;\n line-height: 16px;\n font-size: 13px;\n outline: none; }\n .captcha-wrapper .captcha-error-msg {\n position: absolute;\n right: 0;\n top: 35px;\n color: #c34; }\n\n/* 提交按钮 */\n.comment-form-btn {\n height: 30px;\n line-height: 28px;\n padding: 0;\n width: 66px;\n border-radius: 3px;\n border: 1px solid #c0c0c0;\n background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fcfcfc), color-stop(1, #e9e9e9));\n outline: none; }\n .comment-form-btn:hover {\n opacity: .8; }\n .comment-form-btn:active {\n border: 1px solid #b4b4b4;\n background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #f6f6f6), color-stop(1, #dfdfdf)); }\n .comment-form-btn.disabled, .comment-form-btn:disabled {\n background: #dfdfdf; }\n\n.comment-item .reply-item {\n padding-top: 5px; }\n .comment-item .reply-item .avatar-small {\n height: 24px;\n width: 24px;\n margin-right: 10px; }\n .comment-item .reply-item .meta-header {\n background: none;\n padding: 3px 0;\n margin-bottom: 0; }\n .comment-item .reply-item .mention-user {\n margin-right: 5px; }\n »;n__chunk_1.styleInject(css);nnvar replyItemPropTypes = {n config: __chunk_1.PropTypes.object,n commentId: __chunk_1.PropTypes.string,n type: __chunk_1.PropTypes.string,n target: __chunk_1.PropTypes.object,n reply: __chunk_1.PropTypes.object,n canAtSb: __chunk_1.PropTypes.bool,n replyUsers: __chunk_1.PropTypes.array,n handleAddReply: __chunk_1.PropTypes.func,n handleDeleteReply: __chunk_1.PropTypes.func,n handleShowReportDialog: __chunk_1.PropTypes.func,n needEscape: __chunk_1.PropTypes.booln};nvar replyItemDefaultProps = {n config: null,n commentId:  »,n type: ‘reply’,n target: null,n reply: null,n canAtSb: false,n replyUsers: [],n handleAddReply: function handleAddReply() {},n handleDeleteReply: function handleDeleteReply() {},n handleShowReportDialog: function handleShowReportDialog() {},n needEscape: truen};nnvar ReplyItem =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(ReplyItem, _Component);nn function ReplyItem(props) {n var _this;nn _this = _Component.call(this, props) || this;n _this.state = {n reply: props.reply,n isShowActions: true,n isHover: false,n replyEditorVisible: false,n addedNewItem: false,n // 一级评论下是否添加了新的二级回应n isFolded: props.reply && props.reply.is_folded // 是否展开被折叠的评论nn };n return _this;n }nn ReplyItem.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {n if (__chunk_5._JSON$stringify(nextProps.reply) !== __chunk_5._JSON$stringify(prevState.reply)) {n return {n reply: nextProps.replyn };n }nn return null;n };nn var _proto = ReplyItem.prototype;nn _proto.handleShowReplyEditor = function handleShowReplyEditor() {n this.setState({n replyEditorVisible: truen });n };nn _proto.handleHideReplyEditor = function handleHideReplyEditor() {n this.setState({n replyEditorVisible: falsen });n } // 添加回应n // 隐藏输入框,附带上当前回应列表所属的 comment id ,传给上级n ;nn _proto.handleAddReply = function handleAddReply(newRelpy, successCallback, failCallback) {n var _this2 = this;nn var handleAddReply = this.props.handleAddReply;nn var hideReplyListEditorCallback = function hideReplyListEditorCallback() {n _this2.handleHideReplyEditor();n };nn handleAddReply(newRelpy, successCallback, failCallback, hideReplyListEditorCallback);n };nn _proto.handleDeleteComment = function handleDeleteComment() {n var reply = this.state.reply;n var handleDeleteReply = this.props.handleDeleteReply;nn if (window.confirm(« \u771F\u7684\u8981\u5220\u9664 » + reply.author.name + « \u7684\u8FD9\u6761\u56DE\u5E94\u5417\uFF1F »)) {n handleDeleteReply(reply.id);n this.setState({n isShowActions: falsen });n }n };nn _proto.handleHover = function handleHover(e) {n e.stopPropagation();n this.setState({n isHover: truen });n };nn _proto.handleLeave = function handleLeave(e) {n e.stopPropagation();n this.setState({n isHover: falsen });n };nn _proto.handleFold = function handleFold() {n this.setState({n isFolded: falsen });n };nn _proto.render = function render() {n var _this$props = this.props,n target = _this$props.target,n commentId = _this$props.commentId,n needEscape = _this$props.needEscape;n var _this$state = this.state,n reply = _this$state.reply,n isFolded = _this$state.isFolded;nn if (!reply) {n return null;n }nn var text = reply.text,n create_time = reply.create_time,n is_folded = reply.is_folded,n author = reply.author,n has_ref = reply.has_ref,n ref_comment = reply.ref_comment,n entities = reply.entities;n var cls = __chunk_3.classnames(‘item’, ‘reply-item’, {n ‘latest-reply’: reply.is_latestn }); // data-*的作用用于 antispam获取值,https://github.intra.douban.com/antispam/hyjal/blob/master/static/js/app/raikiri/comment.js#L187nn return React__default.createElement(« div », {n className: cls,n « data-cid »: reply.id,n « data-target_id »: target.id,n « data-target_kind »: target.kindn }, React__default.createElement(« div », {n className: « comment-item-body »,n onMouseOver: this.handleHover.bind(this),n onMouseOut: this.handleLeave.bind(this)n }, React__default.createElement(« div », {n className: « author-avatar avatar-small »n }, React__default.createElement(« a », {n href: author.url,n title: author.namen }, React__default.createElement(« img », {n src: author.avatar,n alt: author.namen }))), React__default.createElement(« div », {n className: « comment-main »n }, React__default.createElement(« div », {n className: « meta-header »n }, React__default.createElement(« a », {n href: author.url,n title: author.namen }, author.name), author.signature ? React__default.createElement(« span », null, « ( » + author.signature + « ) ») : null, React__default.createElement(« time », {n dateTime: create_timen }, create_time)), React__default.createElement(« div », {n className: __chunk_3.classnames(« comment-content », {n hide: isFoldedn })n }, ref_comment && ref_comment.author && ref_comment.id !== commentId && !reply.is_deleted ? React__default.createElement(« a », {n href: ref_comment.author.url,n title: ref_comment.author.name,n className: « mention-user »n }, « @ », ref_comment.author.name) : null, !reply.is_deleted ? React__default.createElement(« span », {n dangerouslySetInnerHTML: {n __html: __chunk_6.extractText(text, entities, needEscape)n }n }) : ‘「该回应已被删除」’, is_folded ? React__default.createElement(« div », {n className: « folded-text »n }, « \u300C\u8BE5\u56DE\u5E94\u5DF2\u88AB\u591A\u4EBA\u6295\u8BC9\u300D ») : null), isFolded ? React__default.createElement(« p », {n className: « comment-folded »n }, React__default.createElement(« span », null, « \u300C\u8BE5\u56DE\u5E94\u5DF2\u88AB\u591A\u4EBA\u6295\u8BC9\u300D »), React__default.createElement(« a », {n href: « javascript:; »,n onClick: this.handleFold.bind(this)n }, « \u5C55\u5F00 »)) : null, this.renderActions())));n };nn _proto.renderActions = function renderActions() {n var _this$state2 = this.state,n isHover = _this$state2.isHover,n replyEditorVisible = _this$state2.replyEditorVisible,n isShowActions = _this$state2.isShowActions,n reply = _this$state2.reply;n var _this$props2 = this.props,n config = _this$props2.config,n type = _this$props2.type,n canAtSb = _this$props2.canAtSb,n replyUsers = _this$props2.replyUsers,n handleShowReportDialog = _this$props2.handleShowReportDialog;nn if (!isShowActions || reply.is_folded || reply.is_deleted) {n return null;n }nn return React__default.createElement(actionBar.default, {n config: config,n type: type,n isHovering: isHover,n comment: reply,n replyEditorVisible: replyEditorVisible,n canAtSb: canAtSb,n replyUsers: replyUsers,n handleHideReplyEditor: this.handleHideReplyEditor.bind(this),n handleShowReplyEditor: this.handleShowReplyEditor.bind(this),n handleDeleteComment: this.handleDeleteComment.bind(this),n handleAddReply: this.handleAddReply.bind(this),n handleShowReportDialog: handleShowReportDialogn });n };nn return ReplyItem;n}(React.Component);nnReplyItem.propTypes = replyItemPropTypes;nReplyItem.defaultProps = replyItemDefaultProps;nnexports.default = ReplyItem;nexports.replyItemDefaultProps = replyItemDefaultProps;nexports.replyItemPropTypes = replyItemPropTypes;n//# sourceMappingURL=reply-item.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/reply-item.jsn// module id = 16n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/reply-item.js?’)},function(module,exports,__webpack_require__){eval(« var ReactDOM = __webpack_require__(13);nvar scroll = __webpack_require__(115);nnfunction calculateScrollOffset(element, offset, alignment) {n var body = document.body,n html = document.documentElement;n var elementRect = element.getBoundingClientRect();n var clientHeight = html.clientHeight;n var documentHeight = Math.max( body.scrollHeight, body.offsetHeight, n html.clientHeight, html.scrollHeight, html.offsetHeight );n offset = offset || 0; // additional offset to topn var scrollPosition;n switch(alignment) {n case ‘top’: scrollPosition = elementRect.top; break;n case ‘middle’: scrollPosition = elementRect.bottom – clientHeight / 2 – elementRect.height / 2; break;n case ‘bottom’: scrollPosition = elementRect.bottom – clientHeight; break;n default: scrollPosition = elementRect.bottom – clientHeight / 2 – elementRect.height / 2; break; //defaul to middlen }n var maxScrollPosition = documentHeight – clientHeight;n return Math.min(scrollPosition + offset + window.pageYOffset,n maxScrollPosition);n}nnmodule.exports = function (ref, options) {n options = options || {n offset: 0,n align: ‘middle’n };n var element = ReactDOM.findDOMNode(ref);n if (element === null) return 0;n return scroll(0, calculateScrollOffset(element, options.offset, options.align), options);n};nn//////////////////n// WEBPACK FOOTERn// ./~/react-scroll-to-component/index.jsn// module id = 17n// module chunks = 0n//# sourceURL=webpack:///./~/react-scroll-to-component/index.js? »)},function(module,exports,__webpack_require__){eval(‘(function webpackUniversalModuleDefinition(root, factory) {ntif(true)nttmodule.exports = factory(__webpack_require__(1), __webpack_require__(13));ntelse if(typeof define === ‘function’ && define.amd)nttdefine([« React », « ReactDOM »], factory);ntelse if(typeof exports === ‘object’)nttexports[« react-visibility-sensor »] = factory(require(« react »), require(« react-dom »));ntelsenttroot[« react-visibility-sensor »] = factory(root[« React »], root[« ReactDOM »]);n})(this, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__2__) {nreturn /******/ (function(modules) { // webpackBootstrapn/******/ t// The module cachen/******/ tvar installedModules = {};n/******/n/******/ t// The require functionn/******/ tfunction __webpack_require__(moduleId) {n/******/n/******/ tt// Check if module is in cachen/******/ ttif(installedModules[moduleId]) {n/******/ tttreturn installedModules[moduleId].exports;n/******/ tt}n/******/ tt// Create a new module (and put it into the cache)n/******/ ttvar module = installedModules[moduleId] = {n/******/ ttti: moduleId,n/******/ tttl: false,n/******/ tttexports: {}n/******/ tt};n/******/n/******/ tt// Execute the module functionn/******/ ttmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);n/******/n/******/ tt// Flag the module as loadedn/******/ ttmodule.l = true;n/******/n/******/ tt// Return the exports of the modulen/******/ ttreturn module.exports;n/******/ t}n/******/n/******/n/******/ t// expose the modules object (__webpack_modules__)n/******/ t__webpack_require__.m = modules;n/******/n/******/ t// expose the module cachen/******/ t__webpack_require__.c = installedModules;n/******/n/******/ t// define getter function for harmony exportsn/******/ t__webpack_require__.d = function(exports, name, getter) {n/******/ ttif(!__webpack_require__.o(exports, name)) {n/******/ tttObject.defineProperty(exports, name, { enumerable: true, get: getter });n/******/ tt}n/******/ t};n/******/n/******/ t// define __esModule on exportsn/******/ t__webpack_require__.r = function(exports) {n/******/ ttif(typeof Symbol !== ‘undefined’ && Symbol.toStringTag) {n/******/ tttObject.defineProperty(exports, Symbol.toStringTag, { value: ‘Module’ });n/******/ tt}n/******/ ttObject.defineProperty(exports, ‘__esModule’, { value: true });n/******/ t};n/******/n/******/ t// create a fake namespace objectn/******/ t// mode & 1: value is a module id, require itn/******/ t// mode & 2: merge all properties of value into the nsn/******/ t// mode & 4: return value when already ns objectn/******/ t// mode & 8|1: behave like requiren/******/ t__webpack_require__.t = function(value, mode) {n/******/ ttif(mode & 1) value = __webpack_require__(value);n/******/ ttif(mode & 8) return value;n/******/ ttif((mode & 4) && typeof value === ‘object’ && value && value.__esModule) return value;n/******/ ttvar ns = Object.create(null);n/******/ tt__webpack_require__.r(ns);n/******/ ttObject.defineProperty(ns, ‘default’, { enumerable: true, value: value });n/******/ ttif(mode & 2 && typeof value != ‘string’) for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));n/******/ ttreturn ns;n/******/ t};n/******/n/******/ t// getDefaultExport function for compatibility with non-harmony modulesn/******/ t__webpack_require__.n = function(module) {n/******/ ttvar getter = module && module.__esModule ?n/******/ tttfunction getDefault() { return module[‘default’]; } :n/******/ tttfunction getModuleExports() { return module; };n/******/ tt__webpack_require__.d(getter, ‘a’, getter);n/******/ ttreturn getter;n/******/ t};n/******/n/******/ t// Object.prototype.hasOwnProperty.calln/******/ t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };n/******/n/******/ t// __webpack_public_path__n/******/ t__webpack_require__.p = «  »;n/******/n/******/n/******/ t// Load entry module and return exportsn/******/ treturn __webpack_require__(__webpack_require__.s = 4);n/******/ })n/************************************************************************/n/******/ ([n/* 0 */n/***/ (function(module, exports, __webpack_require__) {nn/**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nnif (false) { var throwOnDirectAccess, ReactIs; } else {n // By explicitly using `prop-types` you are opting into new production behavior.n // http://fb.me/prop-types-in-prodn module.exports = __webpack_require__(5)();n}nnn/***/ }),n/* 1 */n/***/ (function(module, exports) {nnmodule.exports = __WEBPACK_EXTERNAL_MODULE__1__;nn/***/ }),n/* 2 */n/***/ (function(module, exports) {nnmodule.exports = __WEBPACK_EXTERNAL_MODULE__2__;nn/***/ }),n/* 3 */n/***/ (function(module, exports) {nn// Tell whether the rect is visible, given an offsetn//n// return: booleannmodule.exports = function (offset, rect, containmentRect) {n var offsetDir = offset.direction;n var offsetVal = offset.value; // Rules for checking different kind of offsets. In example if the element isn // 90px below viewport and offsetTop is 100, it is considered visible.nn switch (offsetDir) {n case ‘top’:n return containmentRect.top + offsetVal rect.bottom && containmentRect.left rect.right;nn case ‘left’:n return containmentRect.left + offsetVal rect.bottom && containmentRect.top rect.right;nn case ‘bottom’:n return containmentRect.bottom – offsetVal > rect.bottom && containmentRect.left rect.right && containmentRect.top rect.right && containmentRect.left rect.bottom;n }n};nn/***/ }),n/* 4 */n/***/ (function(module, __webpack_exports__, __webpack_require__) {nn »use strict »;n__webpack_require__.r(__webpack_exports__);n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, « default », function() { return VisibilitySensor; });n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);n/* harmony import */ var _lib_is_visible_with_offset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);n/* harmony import */ var _lib_is_visible_with_offset__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lib_is_visible_with_offset__WEBPACK_IMPORTED_MODULE_3__);nnnfunction _typeof(obj) { if (typeof Symbol === « function » && typeof Symbol.iterator === « symbol ») { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === « function » && obj.constructor === Symbol && obj !== Symbol.prototype ? « symbol » : typeof obj; }; } return _typeof(obj); }nnfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(« Cannot call a class as a function »); } }nnfunction _defineProperties(target, props) { for (var i = 0; i -1) {n func = function func() {n if (!timeout) {n timeout = setTimeout(later, throttle || 0);n }n };n } else {n func = function func() {n clearTimeout(timeout);n timeout = setTimeout(later, delay || 0);n };n }nn var info = {n target: target,n fn: func,n getLastTimeout: function getLastTimeout() {n return timeout;n }n };n target.addEventListener(event, info.fn);n _this.debounceCheck[event] = info;n });nn _defineProperty(_assertThisInitialized(_this), « startWatching », function () {n if (_this.debounceCheck || _this.interval) {n return;n }nn if (_this.props.intervalCheck) {n _this.interval = setInterval(_this.check, _this.props.intervalDelay);n }nn if (_this.props.scrollCheck) {n _this.addEventListener(_this.getContainer(), « scroll », _this.props.scrollDelay, _this.props.scrollThrottle);n }nn if (_this.props.resizeCheck) {n _this.addEventListener(window, « resize », _this.props.resizeDelay, _this.props.resizeThrottle);n } // if dont need delayed call, check on load ( before the first interval fires )nnn !_this.props.delayedCall && _this.check();n });nn _defineProperty(_assertThisInitialized(_this), « stopWatching », function () {n if (_this.debounceCheck) {n // clean up event listeners and their debounce callersn for (var debounceEvent in _this.debounceCheck) {n if (_this.debounceCheck.hasOwnProperty(debounceEvent)) {n var debounceInfo = _this.debounceCheck[debounceEvent];n clearTimeout(debounceInfo.getLastTimeout());n debounceInfo.target.removeEventListener(debounceEvent, debounceInfo.fn);n _this.debounceCheck[debounceEvent] = null;n }n }n }nn _this.debounceCheck = null;nn if (_this.interval) {n _this.interval = clearInterval(_this.interval);n }n });nn _defineProperty(_assertThisInitialized(_this), « check », function () {n var el = _this.node;n var rect;n var containmentRect; // if the component has rendered to null, dont update visibilitynn if (!el) {n return _this.state;n }nn rect = normalizeRect(_this.roundRectDown(el.getBoundingClientRect()));nn if (_this.props.containment) {n var containmentDOMRect = _this.props.containment.getBoundingClientRect();nn containmentRect = {n top: containmentDOMRect.top,n left: containmentDOMRect.left,n bottom: containmentDOMRect.bottom,n right: containmentDOMRect.rightn };n } else {n containmentRect = {n top: 0,n left: 0,n bottom: window.innerHeight || document.documentElement.clientHeight,n right: window.innerWidth || document.documentElement.clientWidthn };n } // Check if visibility is wanted via offset?nnn var offset = _this.props.offset || {};n var hasValidOffset = _typeof(offset) === « object »;nn if (hasValidOffset) {n containmentRect.top += offset.top || 0;n containmentRect.left += offset.left || 0;n containmentRect.bottom -= offset.bottom || 0;n containmentRect.right -= offset.right || 0;n }nn var visibilityRect = {n top: rect.top >= containmentRect.top,n left: rect.left >= containmentRect.left,n bottom: rect.bottom 0 && rect.width > 0;n var isVisible = hasSize && visibilityRect.top && visibilityRect.left && visibilityRect.bottom && visibilityRect.right; // check for partial visibilitynn if (hasSize && _this.props.partialVisibility) {n var partialVisible = rect.top = containmentRect.top && rect.left = containmentRect.left; // account for partial visibility on a single edgenn if (typeof _this.props.partialVisibility === « string ») {n partialVisible = visibilityRect[_this.props.partialVisibility];n } // if we have minimum top visibility set by props, lets check, if it meets the passed valuen // so if for instance element is at least 200px in viewport, then show it.nnn isVisible = _this.props.minTopValue ? partialVisible && rect.top = truncation && remaining > 0 || foldRepliesBtnVisible ? React__default.createElement(VisibilitySensor, {n onChange: this.listControlBarInViewport.bind(this)n }, React__default.createElement(« div », {n className: « replies-list-control »,n ref: function ref(ele) {n _this2.controlBarRef = ele;n }n }, isLoadingReplies ? React__default.createElement(« div », null, « \u52A0\u8F7D\u4E2D ») : this.renderRepliesLoader(), foldRepliesBtnVisible && replies.length > upThreshold ? React__default.createElement(« button », {n className: __chunk_3.classnames(‘fold-btn’, {n // 如果按钮没有隐藏,且没在窗口内,并且没有被滚动出顶部(在窗口底部以下)n fixed: foldRepliesBtnVisible && !foldRepliesBtnOutofViewport && this.controlBarRef && this.controlBarRef.getBoundingClientRect().top > 0n }),n style: {n left: this.controlBarRef ? this.controlBarRef.getBoundingClientRect().left + this.controlBarRef.getBoundingClientRect().width – 90 : 0 // 90 是按钮自身的宽度nn },n onClick: this.handleFoldReplies.bind(this)n }, « \u6536\u8D77\u56DE\u5E94 ») : null)) : null);n };nn _proto.renderList = function renderList() {n var _this3 = this;nn var _this$props2 = this.props,n config = _this$props2.config,n commentId = _this$props2.commentId,n target = _this$props2.target,n replies = _this$props2.replies,n canAtSb = _this$props2.canAtSb,n replyUsers = _this$props2.replyUsers,n upThreshold = _this$props2.upThreshold,n downThreshold = _this$props2.downThreshold,n handleAddReply = _this$props2.handleAddReply,n handleShowReportDialog = _this$props2.handleShowReportDialog,n needEscape = _this$props2.needEscape;n return replies.map(function (reply, index) {n // 监测第 5 、 11 条的显示状态n var isScrollUpSensorItem = index + 1 === upThreshold;n var isScrollDownSensorItem = index + 1 === downThreshold;nn if (isScrollUpSensorItem || isScrollDownSensorItem) {n var onChange = isScrollUpSensorItem ? _this3.upSensorItemInViewport.bind(_this3, reply) : isScrollDownSensorItem ? _this3.downSensorItemInViewport.bind(_this3, reply) : function () {};n return React__default.createElement(VisibilitySensor, {n key: « _comment_ » + index,n onChange: onChangen }, React__default.createElement(replyItem.default, {n config: config,n commentId: commentId,n ref: isScrollDownSensorItem ? _this3.downSensorItemRef : null,n key: « _ » + reply.id + « _reply_ » + index,n type: « reply »,n target: target,n reply: reply,n canAtSb: canAtSb,n replyUsers: replyUsers,n handleAddReply: handleAddReply,n handleShowReportDialog: handleShowReportDialog,n handleDeleteReply: _this3.handleDeleteReply.bind(_this3),n needEscape: needEscapen }));n }nn return React__default.createElement(replyItem.default, {n config: config,n commentId: commentId,n type: « reply »,n key: « _ » + reply.id + « _reply_ » + index,n target: target,n reply: reply,n canAtSb: canAtSb,n replyUsers: replyUsers,n handleAddReply: handleAddReply,n handleDeleteReply: _this3.handleDeleteReply.bind(_this3),n handleShowReportDialog: handleShowReportDialog,n needEscape: needEscapen });n });n } // 计算回应列表的高度n ;nn _proto.geListDomHeight = function geListDomHeight() {n return this.listRef ? ReactDOM.findDOMNode(this.listRef).getBoundingClientRect().height : 0;n } // TODO 需要优化n // 计算当前回应列表中有多少条没有被删除的回应n ;nn _proto.getSurvivedReplisNum = function getSurvivedReplisNum() {n var _this$state2 = this.state,n total = _this$state2.total,n repliesStart = _this$state2.repliesStart;n var _this$props3 = this.props,n replies = _this$props3.replies,n truncation = _this$props3.truncation;n var deleted = replies.filter(function (reply) {n return reply.is_deleted;n }).length;n return total + deleted – repliesStart;n } // 删除某条回应后,需要重新计算「展开更多 n 条」回应n ;nn _proto.handleDeleteReply = function handleDeleteReply(id) {n var _this$state3 = this.state,n total = _this$state3.total,n repliesStart = _this$state3.repliesStart;n var _this$props4 = this.props,n handleDelete = _this$props4.handleDelete,n commentId = _this$props4.commentId,n count = _this$props4.count;n var parentCommentId = commentId;n handleDelete(id, parentCommentId);n } // 渲染「展开更多 n 条回应」按钮n ;nn _proto.renderRepliesLoader = function renderRepliesLoader() {n var count = this.props.count;n var remaining = this.state.remaining;n var cls = __chunk_3.classnames(‘give-me-more’, {n invisible: remaining 0) {n this.setState({n foldRepliesBtnVisible: falsen });n }n };nn return ReplyList;n}(React.Component);nnReplyList.propTypes = replyListPropTypes;nReplyList.defaultProps = replyListDefaultProps;nnexports.default = ReplyList;nexports.replyListDefaultProps = replyListDefaultProps;nexports.replyListPropTypes = replyListPropTypes;n//# sourceMappingURL=reply-list.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/reply-list.jsn// module id = 19n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/reply-list.js?’)},function(module,exports,__webpack_require__){eval(« /* WEBPACK VAR INJECTION */(function(process) {‘use strict’;nnvar utils = __webpack_require__(3);nvar normalizeHeaderName = __webpack_require__(58);nnvar DEFAULT_CONTENT_TYPE = {n ‘Content-Type’: ‘application/x-www-form-urlencoded’n};nnfunction setContentTypeIfUnset(headers, value) {n if (!utils.isUndefined(headers) && utils.isUndefined(headers[‘Content-Type’])) {n headers[‘Content-Type’] = value;n }n}nnfunction getDefaultAdapter() {n var adapter;n if (typeof XMLHttpRequest !== ‘undefined’) {n // For browsers use XHR adaptern adapter = __webpack_require__(27);n } else if (typeof process !== ‘undefined’) {n // For node use HTTP adaptern adapter = __webpack_require__(27);n }n return adapter;n}nnvar defaults = {n adapter: getDefaultAdapter(),nn transformRequest: [function transformRequest(data, headers) {n normalizeHeaderName(headers, ‘Content-Type’);n if (utils.isFormData(data) ||n utils.isArrayBuffer(data) ||n utils.isBuffer(data) ||n utils.isStream(data) ||n utils.isFile(data) ||n utils.isBlob(data)n ) {n return data;n }n if (utils.isArrayBufferView(data)) {n return data.buffer;n }n if (utils.isURLSearchParams(data)) {n setContentTypeIfUnset(headers, ‘application/x-www-form-urlencoded;charset=utf-8’);n return data.toString();n }n if (utils.isObject(data)) {n setContentTypeIfUnset(headers, ‘application/json;charset=utf-8’);n return JSON.stringify(data);n }n return data;n }],nn transformResponse: [function transformResponse(data) {n /*eslint no-param-reassign:0*/n if (typeof data === ‘string’) {n try {n data = JSON.parse(data);n } catch (e) { /* Ignore */ }n }n return data;n }],nn /**n * A timeout in milliseconds to abort a request. If set to 0 (default) an * timeout is not created.n */n timeout: 0,nn xsrfCookieName: ‘XSRF-TOKEN’,n xsrfHeaderName: ‘X-XSRF-TOKEN’,nn maxContentLength: -1,nn validateStatus: function validateStatus(status) {n return status >= 200 && status String#trimLeftn// 2 -> String#trimRightn// 3 -> String#trimnvar trim = exporter.trim = function (string, TYPE) {n string = String(__chunk_1.defined(string));n if (TYPE & 1) string = string.replace(ltrim,  »);n if (TYPE & 2) string = string.replace(rtrim,  »);n return string;n};nnvar _stringTrim = exporter;nnvar $parseInt = __chunk_1.global.parseInt;nvar $trim = _stringTrim.trim;nnvar hex = /^[-+]?0[xX]/;nnvar _parseInt = $parseInt(_stringWs + ’08’) !== 8 || $parseInt(_stringWs + ‘0x16’) !== 22 ? function parseInt(str, radix) {n var string = $trim(String(str), 3);n return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));n} : $parseInt;nn// 18.2.5 parseInt(string, radix)n__chunk_1.$export(__chunk_1.$export.G + __chunk_1.$export.F * (parseInt != _parseInt), { parseInt: _parseInt });nnvar _parseInt$1 = __chunk_1.require$$1.parseInt;nnvar _parseInt$2 = _parseInt$1;nnvar css = « @charset \ »UTF-8\ »;\n/*\n* @Author: hanjiyun\n* @Date: 2019-05-13 22:55:26\n * @Last Modified by: jinan\n * @Last Modified time: 2020-01-20 15:06:30\n*/\n/*\n* @Author: hanjiyun\n* @Date: 2019-05-14 21:32:06\n* @Last Modified by: hanjiyun\n* @Last Modified time: 2019-05-31 15:19:58\n*/\n/* 验证码 */\n.captcha-wrapper {\n position: relative;\n display: flex; }\n .captcha-wrapper img {\n display: block;\n height: 30px;\n cursor: pointer; }\n .captcha-wrapper .captcha-input {\n margin-left: 5px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n padding: 6px 10px;\n line-height: 16px;\n font-size: 13px;\n outline: none; }\n .captcha-wrapper .captcha-error-msg {\n position: absolute;\n right: 0;\n top: 35px;\n color: #c34; }\n\n/* 提交按钮 */\n.comment-form-btn {\n height: 30px;\n line-height: 28px;\n padding: 0;\n width: 66px;\n border-radius: 3px;\n border: 1px solid #c0c0c0;\n background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fcfcfc), color-stop(1, #e9e9e9));\n outline: none; }\n .comment-form-btn:hover {\n opacity: .8; }\n .comment-form-btn:active {\n border: 1px solid #b4b4b4;\n background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #f6f6f6), color-stop(1, #dfdfdf)); }\n .comment-form-btn.disabled, .comment-form-btn:disabled {\n background: #dfdfdf; }\n\n.comment-item-body {\n display: flex; }\n .comment-item-body img {\n display: block;\n max-width: 100%; }\n .comment-item-body .comment-content {\n padding: 5px 0;\n word-wrap: break-word;\n word-break: break-word;\n white-space: pre-wrap; }\n .comment-item-body .comment-content .folded-text {\n padding: 5px 0;\n color: #c0c0c0; }\n .comment-item-body .comment-folded {\n margin-top: 10px; }\n .comment-item-body .comment-folded a {\n color: #c0c0c0;\n float: right; }\n\n.comment-item {\n margin-bottom: 15px;\n overflow: visible; }\n .comment-item .author-avatar {\n width: 48px;\n height: 48px;\n margin-right: 20px; }\n .comment-item .author-avatar img {\n display: block;\n max-width: 100%; }\n\n.comment-main {\n flex: 1; }\n\n.meta-header {\n background: #F3F5F7;\n padding: 3px 5px;\n margin-bottom: 5px;\n color: #999; }\n .meta-header span,\n .meta-header time {\n padding-left: 8px; }\n .meta-header time {\n font-size: 12px; }\n »;n__chunk_1.styleInject(css);nnvar baseItemPropTypes = {n config: __chunk_1.PropTypes.object,n bgColor: __chunk_1.PropTypes.string,n type: __chunk_1.PropTypes.string,n target: __chunk_1.PropTypes.object,n comment: __chunk_1.PropTypes.object,n canAtSb: __chunk_1.PropTypes.bool,n maxLength: __chunk_1.PropTypes.number,n replyUsers: __chunk_1.PropTypes.array,n handleAddReply: __chunk_1.PropTypes.func,n handleDelete: __chunk_1.PropTypes.func,n handleLoadMoreReplies: __chunk_1.PropTypes.func,n handleShowReportDialog: __chunk_1.PropTypes.func,n needEscape: __chunk_1.PropTypes.booln};nvar baseItemDefaultProps = {n config: null,n bgColor:  »,n type: ‘comment’,n target: null,n comment: null,n canAtSb: false,n maxLength: 0,n replyUsers: [],n handleAddReply: function handleAddReply() {},n handleDelete: function handleDelete() {},n handleLoadMoreReplies: function handleLoadMoreReplies() {},n handleShowReportDialog: function handleShowReportDialog() {},n needEscape: truen};nnvar BaseItem =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(BaseItem, _Component);nn function BaseItem(props) {n var _this;nn _this = _Component.call(this, props) || this;n _this.replyListRef = React__default.createRef();n _this.state = {n comment: props.comment,n isShowActions: true,n isHover: false,n replyEditorVisible: false,n isFolded: props.comment && props.comment.is_folded // 是否展开被折叠的评论nn };n return _this;n }nn var _proto = BaseItem.prototype;nn _proto.handleShowReplyEditor = function handleShowReplyEditor() {n this.setState({n replyEditorVisible: truen });n };nn _proto.handleHideReplyEditor = function handleHideReplyEditor() {n this.setState({n replyEditorVisible: falsen });n } // 滚动定位到刚刚发布那条二级回应n ;nn _proto.scrollToLatestReply = function scrollToLatestReply() {n var replyListNode = ReactDOM.findDOMNode(this.replyListRef.current);nn if (replyListNode instanceof HTMLElement) {n var latestReplyNode = replyListNode.querySelector(‘.latest-reply’);n scrollToComponent(latestReplyNode, {n // offset: -20, // 再补上 -20 距离n align: ‘middle’,n duration: 400n });n }n };nn _proto.handleAddReply = function handleAddReply(newRelpy, successCallback, failCallback, hideReplyListEditorCallback) {n var _this2 = this;nn var _this$props = this.props,n handleAddReply = _this$props.handleAddReply,n comment = _this$props.comment;n var commentId = comment.id; // 用于提交成功后隐藏输入框的回调nn var hideReplyEditorCallback = function hideReplyEditorCallback() {n _this2.handleHideReplyEditor(); // 如果需要隐藏回应列表中的输入框n // eslint-disable-next-line no-unused-expressionsnnn hideReplyListEditorCallback && hideReplyListEditorCallback();n }; // 用于滚动定位到刚刚发布那条二级回应的回调nnn var scrollToLatestReplyCallback = function scrollToLatestReplyCallback() {// this.scrollToLatestReply()n };nn handleAddReply(newRelpy, successCallback, failCallback, commentId, hideReplyEditorCallback, scrollToLatestReplyCallback);n };nn _proto.handleDeleteComment = function handleDeleteComment() {n var _this$props2 = this.props,n comment = _this$props2.comment,n handleDelete = _this$props2.handleDelete;nn if (window.confirm(« \u771F\u7684\u8981\u5220\u9664 » + comment.author.name + « \u7684\u8FD9\u6761\u56DE\u5E94\u5417\uFF1F »)) {n handleDelete(comment.id);n }n };nn _proto.handleHover = function handleHover(e) {n e.stopPropagation();n this.setState({n isHover: truen });n };nn _proto.handleLeave = function handleLeave(e) {n e.stopPropagation();n this.setState({n isHover: falsen });n };nn _proto.handleFold = function handleFold() {n this.setState({n isFolded: falsen });n };nn _proto.render = function render() {n var isFolded = this.state.isFolded;n var _this$props3 = this.props,n target = _this$props3.target,n comment = _this$props3.comment,n bgColor = _this$props3.bgColor,n needEscape = _this$props3.needEscape; // 被标记为了已删除,并且下面没有 replis, 不显示nn if (!comment || comment.is_deleted && comment.total_replies === 0 && comment.replies.length === 0) {n return null;n }nn var text = comment.text,n create_time = comment.create_time,n is_folded = comment.is_folded,n author = comment.author,n ref_comment = comment.ref_comment,n entities = comment.entities;n var cls = __chunk_3.classnames(‘item’, ‘comment-item’, {n ‘latest-comment’: comment.is_latestn }); // data-*的作用用于 antispam获取值,https://github.intra.douban.com/antispam/hyjal/blob/master/static/js/app/raikiri/comment.js#L187nn return React__default.createElement(« div », {n className: cls,n « data-cid »: comment.id,n « data-target_id »: target.id,n « data-target_kind »: target.kindn }, React__default.createElement(« div », {n className: « comment-item-body »,n onMouseOver: this.handleHover.bind(this),n onMouseOut: this.handleLeave.bind(this)n }, React__default.createElement(« div », {n className: « author-avatar »n }, React__default.createElement(« a », {n href: author.url,n title: author.namen }, React__default.createElement(« img », {n src: author.avatar,n alt: author.namen }))), React__default.createElement(« div », {n className: « comment-main »n }, React__default.createElement(« div », {n className: « meta-header »,n style: {n backgroundColor: bgColorn }n }, React__default.createElement(« a », {n href: « https://www.douban.com/people/ » + author.id,n title: author.namen }, author.name), author.signature ? React__default.createElement(« span », null, « ( » + author.signature + « ) ») : null, React__default.createElement(« time », {n dateTime: create_timen }, create_time)), React__default.createElement(« div », {n className: __chunk_3.classnames(« comment-content », {n hide: isFoldedn })n }, ref_comment && ref_comment.author ? React__default.createElement(« a », {n href: ref_comment.author.url,n title: ref_comment.author.name,n className: « mention-user »n }, « @ », ref_comment.author.name) : null, !comment.is_deleted ? React__default.createElement(« span », {n dangerouslySetInnerHTML: {n __html: __chunk_6.extractText(text, entities, needEscape)n }n }) : ‘「该回应已被删除」’, is_folded ? React__default.createElement(« div », {n className: « folded-text »n }, « \u300C\u8BE5\u56DE\u5E94\u5DF2\u88AB\u591A\u4EBA\u6295\u8BC9\u300D ») : null), isFolded ? React__default.createElement(« p », {n className: « comment-folded »n }, React__default.createElement(« span », null, « \u300C\u8BE5\u56DE\u5E94\u5DF2\u88AB\u591A\u4EBA\u6295\u8BC9\u300D »), React__default.createElement(« a », {n href: « javascript:; »,n onClick: this.handleFold.bind(this)n }, « \u5C55\u5F00″)) : null, this.renderActions())), this.renderReplyList());n };nn _proto.renderActions = function renderActions() {n var _this$state = this.state,n isHover = _this$state.isHover,n replyEditorVisible = _this$state.replyEditorVisible,n isShowActions = _this$state.isShowActions;n var _this$props4 = this.props,n config = _this$props4.config,n type = _this$props4.type,n handleShowReportDialog = _this$props4.handleShowReportDialog,n comment = _this$props4.comment,n canAtSb = _this$props4.canAtSb,n replyUsers = _this$props4.replyUsers,n maxLength = _this$props4.maxLength;nn if (!isShowActions || comment.is_folded || comment.is_deleted) {n return null;n }nn return React__default.createElement(actionBar.default, {n config: config,n type: type,n isHovering: isHover,n comment: comment,n replyEditorVisible: replyEditorVisible,n canAtSb: canAtSb,n maxLength: maxLength,n replyUsers: replyUsers,n handleHideReplyEditor: this.handleHideReplyEditor.bind(this),n handleShowReplyEditor: this.handleShowReplyEditor.bind(this),n handleDeleteComment: this.handleDeleteComment.bind(this),n handleAddReply: this.handleAddReply.bind(this),n handleShowReportDialog: handleShowReportDialogn });n };nn _proto.renderReplyList = function renderReplyList() {n var _this$props5 = this.props,n config = _this$props5.config,n target = _this$props5.target,n comment = _this$props5.comment,n truncation = _this$props5.truncation,n type = _this$props5.type,n canAtSb = _this$props5.canAtSb,n replyUsers = _this$props5.replyUsers,n handleDelete = _this$props5.handleDelete,n handleLoadMoreReplies = _this$props5.handleLoadMoreReplies,n handleFoldReplies = _this$props5.handleFoldReplies,n handleShowReportDialog = _this$props5.handleShowReportDialog,n needEscape = _this$props5.needEscape;nn if (type === ‘reply’) {n return null;n }nn return React__default.createElement(replyList.default, {n config: config,n ref: this.replyListRef,n commentId: comment.id.toString(),n target: target,n replies: comment.replies,n truncation: truncation,n total: _parseInt$2(comment.total_replies, 10),n canAtSb: canAtSb,n replyUsers: replyUsers,n handleAddReply: this.handleAddReply.bind(this),n handleDelete: handleDelete,n handleFoldReplies: handleFoldReplies,n handleLoadMoreReplies: handleLoadMoreReplies,n handleShowReportDialog: handleShowReportDialog,n needEscape: needEscapen });n };nn return BaseItem;n}(React.Component);nnBaseItem.propTypes = baseItemPropTypes;nBaseItem.defaultProps = baseItemDefaultProps;nnexports.baseItemDefaultProps = baseItemDefaultProps;nexports.baseItemPropTypes = baseItemPropTypes;nexports.default = BaseItem;n//# sourceMappingURL=base-item.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/base-item.jsn// module id = 21n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/base-item.js?’);
},function(module,exports,__webpack_require__){eval(‘ »use strict »;nfunction __export(m) {n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];n}nObject.defineProperty(exports, « __esModule », { value: true });n__export(__webpack_require__(100));n__export(__webpack_require__(96));n__export(__webpack_require__(98));n__export(__webpack_require__(99));n__export(__webpack_require__(97));n__export(__webpack_require__(95));n//# sourceMappingURL=index.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/index.jsn// module id = 22n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/index.js?’)},function(module,exports){eval(« /*nobject-assignn(c) Sindre Sorhusn@license MITn*/nn’use strict’;n/* eslint-disable no-unused-vars */nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;nvar hasOwnProperty = Object.prototype.hasOwnProperty;nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;nnfunction toObject(val) {ntif (val === null || val === undefined) {nttthrow new TypeError(‘Object.assign cannot be called with null or undefined’);nt}nntreturn Object(val);n}nnfunction shouldUseNative() {nttry {nttif (!Object.assign) {ntttreturn false;ntt}nntt// Detect buggy property enumeration order in older V8 versions.nntt// https://bugs.chromium.org/p/v8/issues/detail?id=4118nttvar test1 = new String(‘abc’); // eslint-disable-line no-new-wrappersntttest1[5] = ‘de’;nttif (Object.getOwnPropertyNames(test1)[0] === ‘5’) {ntttreturn false;ntt}nntt// https://bugs.chromium.org/p/v8/issues/detail?id=3056nttvar test2 = {};nttfor (var i = 0; i 1) {n for (var i = 1; i \u6211\u6765\u56DE\u5E94 »);n }nn var submitBtn = React__default.createElement(« button », {n type: « submit »,n disabled: submittingStatus === __chunk_4.PENDING,n className: __chunk_3.classnames(‘comment-form-btn’, {n disabled: submittingStatus === __chunk_4.PENDINGn })n }, submittingStatus === __chunk_4.PENDING ? ‘提交中’ : btnText);n var maxLen = 0; // 如果要转发到广播,最多 140nn if (checked) {n maxLen = __chunk_4.MAX_STATUS_LENGTH; // 广播下的回复字数最多 280,其他的不限字数n } else if (config.service && config.service === __chunk_4.STATUS) {n maxLen = __chunk_4.MAX_STATUS_COMMENTS_LENGTH;n } else {n maxLen = maxLength;n }nn return React__default.createElement(« div », {n className: « comment-editor »n }, React__default.createElement(Avatar, {n url: « https://www.douban.com/people/ » + user.id,n avatar: user.avatar,n size: 48n }), canComment ? React__default.createElement(« form », {n className: « form-field »,n onSubmit: this.handleAddComment.bind(this)n }, React__default.createElement(userSelect.UserSelect, {n inputType: « area »,n text: text,n maxLength: maxLen,n uploadFile: upload_file,n uploaded: uploaded,n replyUsers: replyUsers,n canAtSb: canAtSb,n canUploadFile: canUploadFile,n handleChange: this.handleChange.bind(this),n handleChangeFile: this.handleChangeFile.bind(this)n }), React__default.createElement(« div », {n className: « form-foot »n }, React__default.createElement(« div », {n className: « form-foot-item »n }, enableSyncToStatus ? React__default.createElement(« label », null, React__default.createElement(« input », {n type: « checkbox »,n name: « sync_to_mb »,n checked: checked,n onChange: function onChange() {n return _this3.handleChecked();n }n }), « \u8F6C\u53D1\u5230\u5E7F\u64AD ») : null), React__default.createElement(« div », {n className: __chunk_3.classnames(‘form-foot-item’, ‘limit-count’, {n overflow: text.length >= maxLenn })n }, maxLen && maxLen – textWithTinyUrl.length ‘n};nnvar Paginator =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(Paginator, _Component);nn function Paginator() {n return _Component.apply(this, arguments) || this;n }nn var _proto = Paginator.prototype;nn _proto.getTotalPages = function getTotalPages() {n var _this$props = this.props,n count = _this$props.count,n total = _this$props.total;n return Math.floor(total / count) + (total % count > 0 ? 1 : 0);n };nn _proto.updateUrl = function updateUrl(newPage) {n var location = window.location;n var origin = location.origin;n var pathname = location.pathname;n var hash = location.hash;n return «  » + origin + pathname + « ?start= » + newPage + (hash ? hash : ‘#comments’);n };nn _proto.renderItem = function renderItem(page) {n var count = this.props.count; // TODO:n // 1. 可以根据 app 和 service 组合出 url,但要考虑到有的业务线 app 名称不是直接用做二级域名n // 小组: https://www.douban.com/group/topic/111111n // 相册: https://www.douban.com/photos/album/68394634/?start=18n // 2. query 可以用 getQuery() 动态获取后设置,而不是像这样写死,比如可能会有其他的参数n // 长评: https://movie.douban.com/review/9832773/?tab=comments#commentsnn var pageLink = this.updateUrl((page – 1) * count);n return React__default.createElement(« a », {n href: pageLink,n key: « _page_ » + pagen }, page);n };nn _proto.renderItems = function renderItems(currentPage) {n var winglen = 4;n var total = this.getTotalPages();n var break1 = currentPage > winglen * 2 + 2;n var break2 = total – currentPage > winglen * 2 + 1;n var start = break1 ? Math.min(currentPage – winglen, total – winglen * 2) : 1;n var end = break2 ? Math.max(currentPage + winglen, winglen * 2 + 1) : total;n var pageItemList = [];nn if (break1) {n pageItemList.push(this.renderItem(1));n pageItemList.push(this.renderItem(2));n pageItemList.push(React__default.createElement(« span », {n className: « break »,n key: « break_1″n }, « … »));n }nn for (var i = start; i = total) {n current = total;n } // TODO: use getQuery()nnn var prevLink = this.updateUrl((current – 2) * count);n var nextLink = this.updateUrl(current * count);n return React__default.createElement(« div », {n className: « paginator »n }, current !== 1 ? React__default.createElement(« a », {n className: « prev »,n href: prevLinkn }, prevText) : React__default.createElement(« span », {n className: « prev »n }, prevText), this.renderItems(current), current !== total ? React__default.createElement(« a », {n className: « next »,n href: nextLinkn }, nextText) : React__default.createElement(« span », {n className: « next »n }, nextText));n };nn return Paginator;n}(React.Component);nnPaginator.propTypes = paginatorPropTypes;nPaginator.defaultProps = paginatorDefaultProps;nnexports.default = Paginator;nexports.paginatorDefaultProps = paginatorDefaultProps;nexports.paginatorPropTypes = paginatorPropTypes;n//# sourceMappingURL=paginator.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/paginator.jsn// module id = 35n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/paginator.js?’)},function(module,exports,__webpack_require__){eval( »use strict’;nnObject.defineProperty(exports, ‘__esModule’, { value: true });nnfunction _interopDefault (ex) { return (ex && (typeof ex === ‘object’) && ‘default’ in ex) ? ex[‘default’] : ex; }nnvar __chunk_1 = __webpack_require__(2);nvar __chunk_2 = __webpack_require__(6);nvar React = __webpack_require__(1);nvar React__default = _interopDefault(React);nvar __chunk_3 = __webpack_require__(4);nnvar css = « @charset \ »UTF-8\ »;\n/**\n * @Desc 投诉弹窗\n *\n * @Author wangyanhong\n * @Date 2019-05-15\n */\n.report-dialog {\n width: 380px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 999; }\n .report-dialog-shd {\n border-radius: 5px;\n position: absolute;\n left: -8px;\n top: -8px;\n width: 100%;\n height: 100%;\n padding: 8px;\n background: #666;\n opacity: .4; }\n .report-dialog-content {\n position: relative;\n z-index: 2;\n background: #fff;\n border: 1px solid #bbb;\n border-radius: 4px; }\n .report-dialog-close {\n position: absolute;\n top: 13px;\n right: 12px;\n padding: 0 3px;\n z-index: 1;\n font: 11px/1.2 \ »Comic Sans MS\ », sans-serif; }\n\n.report-hd {\n padding: 10px 10px 6px;\n background: #ebf5eb;\n font-size: 14px;\n -moz-border-radius: 4px;\n border-radius: 4px 4px 0 0; }\n .report-hd h3 {\n margin: 0;\n line-height: 1.8;\n color: #072;\n font-size: 15px;\n font-weight: normal;\n background: none; }\n\n.report-bd {\n padding: 20px 20px 20px 40px;\n font-size: 13px;\n color: #0E0E0E; }\n .report-bd ul, .report-bd li {\n padding: 0;\n margin: 0; }\n .report-bd a {\n text-decoration: none; }\n .report-bd a:hover {\n background: transparent; }\n .report-bd .extra-options {\n border-top: 1px solid #dfdfdf;\n margin-top: 16px;\n padding-top: 16px; }\n .report-bd .extra-options .link {\n color: #0E0E0E;\n font-size: 13px;\n height: 18px;\n line-height: 18px; }\n .report-bd .extra-options .link:after {\n content:  »;\n display: inline-block;\n vertical-align: middle;\n width: 18px;\n height: 18px;\n margin-top: -1px;\n margin-left: 4px;\n background: url(\ »https://img9.doubanio.com/f/shire/c0c3478524c9338ace2ea316b6a74d1dc493d748/pics/icon/more@2x.png\ ») no-repeat center;\n background-size: contain; }\n .report-bd .extra-options .desc {\n font-size: 13px;\n color: #9B9B9B; }\n\n.report .bn-flat {\n text-align: center; }\n .report .bn-flat .btn-report {\n display: inline-block;\n height: 25px;\n border-width: 1px;\n border-style: solid;\n border-color: #bbb #bbb #999;\n padding: 0 14px;\n color: #333;\n font-size: 12px;\n line-height: 25px;\n cursor: pointer;\n border-radius: 3px;\n -webkit-appearance: none;\n background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fcfcfc), color-stop(1, #e9e9e9)); }\n »;n__chunk_1.styleInject(css);nnvar reportPropTypes = {n isShowDialog: __chunk_1.PropTypes.bool,n handleHideReportDialog: __chunk_1.PropTypes.func,n handleSubmitReport: __chunk_1.PropTypes.funcn};nvar reportDefaultProps = {n isShowDialog: false,n handleHideReportDialog: function handleHideReportDialog() {},n handleSubmitReport: function handleSubmitReport() {}n};nnvar Report =n/*#__PURE__*/nfunction (_Component) {n __chunk_1._inheritsLoose(Report, _Component);nn function Report() {n var _this;nn for (var _len = arguments.length, args = new Array(_len), _key = 0; _key -1) {n REASONS = __chunk_2._Object$assign(REASONS, {n 11: ‘与作品或讨论区主题无关’n });n }nn var showableReasons = __chunk_2._Object$keys(REASONS).sort(function (k_a, k_b) {n var i_a = REASON_SORT_BY.indexOf(Number(k_a));n var i_b = REASON_SORT_BY.indexOf(Number(k_b));nn if (i_a === -1) {n return 1;n } else if (i_b === -1) {n return -1;n } else {n return i_a – i_b;n }n }).map(function (key) {n return {n name: REASONS[key],n key: keyn };n }).concat({n name: ‘其他原因’,n key: ‘other’n });nn return React__default.createElement(« ul », null, showableReasons.map(function (reason) {n return React__default.createElement(« li », {n key: reason.keyn }, React__default.createElement(« label », null, React__default.createElement(« input », {n type: « radio »,n name: « reason »,n value: reason.key,n checked: _this2.state.selected == reason.key,n onChange: function onChange(e) {n return _this2.handleChange(e);n }n }), reason.name));n }));n };nn _proto.renderReportSuccess = function renderReportSuccess() {n return React__default.createElement(« div », null, « \u6295\u8BC9\u5DF2\u7ECF\u63D0\u4EA4\u7ED9\u7BA1\u7406\u5458\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u5904\u7406\u3002 »);n };nn _proto.render = function render() {n var _this3 = this;nn var _this$props = this.props,n isShowDialog = _this$props.isShowDialog,n isReported = _this$props.isReported,n handleHideReportDialog = _this$props.handleHideReportDialog;n return React__default.createElement(« div », {n className: __chunk_3.classnames(‘report-dialog’, {n hide: !isShowDialogn })n }, React__default.createElement(« span », {n className: « report-dialog-shd »n }), React__default.createElement(« div », {n className: « report-dialog-content »n }, React__default.createElement(« a », {n href: « javascript:; »,n className: « report-dialog-close »,n onClick: handleHideReportDialogn }, « X »), React__default.createElement(« div », {n className: « report-hd »n }, React__default.createElement(« h3 », null, isReported ? ‘提交成功’ : ‘选择投诉原因’)), React__default.createElement(« div », {n className: « report-bd »n }, isReported ? this.renderReportSuccess() : React__default.createElement(« form », {n onSubmit: function onSubmit(e) {n return _this3.handleSubmitReport(e);n }n }, this.renderReportHtml(), React__default.createElement(« div », {n className: « extra-options »n }, React__default.createElement(« a », {n href: « https://help.douban.com/complaint/ »,n target: « _blank »,n className: « link »n }, « \u4FB5\u72AF\u6211\u7684\u6743\u76CA »), React__default.createElement(« p », {n className: « desc »n }, « \u6284\u88AD\u6216\u672A\u7ECF\u6388\u6743\u8F6C\u8F7D\u6211\u7684\u5185\u5BB9\u3001\u4FB5\u72AF\u6211\u7684\u4E2A\u4EBA\u6743\u76CA\u3001\u4FB5\u72AF\u6211\u7684\u4F01\u4E1A\u6743\u76CA »)), React__default.createElement(« div », {n className: « report-btns »n }, React__default.createElement(« button », {n className: « report-btn comment-form-btn »n }, « \u6295\u8BC9 »))))));n };nn return Report;n}(React.Component);nnReport.propTypes = reportPropTypes;nReport.defaultProps = reportDefaultProps;nnexports.default = Report;nexports.reportDefaultProps = reportDefaultProps;nexports.reportPropTypes = reportPropTypes;n//# sourceMappingURL=report.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/report.jsn// module id = 36n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/report.js?’)},function(module,exports){eval(« /**n * toString ref.n */nnvar toString = Object.prototype.toString;nn/**n * Return the type of `val`.n *n * @param {Mixed} valn * @return {String}n * @api publicn */nnmodule.exports = function(val){n switch (toString.call(val)) {n case ‘[object Date]’: return ‘date’;n case ‘[object RegExp]’: return ‘regexp’;n case ‘[object Arguments]’: return ‘arguments’;n case ‘[object Array]’: return ‘array’;n case ‘[object Error]’: return ‘error’;n }nn if (val === null) return ‘null’;n if (val === undefined) return ‘undefined’;n if (val !== val) return ‘nan’;n if (val && val.nodeType === 1) return ‘element’;nn if (isBuffer(val)) return ‘buffer’;nn val = val.valueOfn ? val.valueOf()n : Object.prototype.valueOf.apply(val);nn return typeof val;n};nn// code borrowed from https://github.com/feross/is-buffer/blob/master/index.jsnfunction isBuffer(obj) {n return !!(obj != null &&n (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)n (obj.constructor &&n typeof obj.constructor.isBuffer === ‘function’ &&n obj.constructor.isBuffer(obj))n ))n}nnn//////////////////n// WEBPACK FOOTERn// ./~/component-clone/~/component-type/index.jsn// module id = 37n// module chunks = 0n//# sourceURL=webpack:///./~/component-clone/~/component-type/index.js? »)},function(module,exports){eval(«  »use strict »;nObject.defineProperty(exports, « __esModule », { value: true });nexports.DEFAULT = ‘default’;nexports.PENDING = ‘pending’;nexports.FAIL = ‘fail’;nexports.SUCCESS = ‘success’;nexports.ASYNC_STATUS = [exports.DEFAULT, exports.PENDING, exports.FAIL, exports.SUCCESS];nexports.AsyncStatus = {n DEFAULT: exports.DEFAULT,n PENDING: exports.PENDING,n FAIL: exports.FAIL,n SUCCESS: exports.SUCCESS,n};n//# sourceMappingURL=async-status.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/async/async-status.jsn// module id = 38n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/async/async-status.js? »)},function(module,exports,__webpack_require__){eval(« /**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nnif (true) {n var ReactIs = __webpack_require__(41);nn // By explicitly using `prop-types` you are opting into new development behavior.n // http://fb.me/prop-types-in-prodn var throwOnDirectAccess = true;n module.exports = __webpack_require__(105)(ReactIs.isElement, throwOnDirectAccess);n} else {n // By explicitly using `prop-types` you are opting into new production behavior.n // http://fb.me/prop-types-in-prodn module.exports = require(‘./factoryWithThrowingShims’)();n}nnn//////////////////n// WEBPACK FOOTERn// ./~/prop-types/index.jsn// module id = 39n// module chunks = 0n//# sourceURL=webpack:///./~/prop-types/index.js? »)},function(module,exports){eval(« /**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict’;nnvar ReactPropTypesSecret = ‘SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED’;nnmodule.exports = ReactPropTypesSecret;nnn//////////////////n// WEBPACK FOOTERn// ./~/prop-types/lib/ReactPropTypesSecret.jsn// module id = 40n// module chunks = 0n//# sourceURL=webpack:///./~/prop-types/lib/ReactPropTypesSecret.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnif (false) {n module.exports = require(‘./cjs/react-is.production.min.js’);n} else {n module.exports = __webpack_require__(107);n}nnn//////////////////n// WEBPACK FOOTERn// ./~/react-is/index.jsn// module id = 41n// module chunks = 0n//# sourceURL=webpack:///./~/react-is/index.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnObject.defineProperty(exports, « __esModule », {n value: truen});nnvar _notification = __webpack_require__(43);nnObject.defineProperty(exports, ‘Notification’, {n enumerable: true,n get: function get() {n return _interopRequireDefault(_notification).default;n }n});nnvar _notificationStack = __webpack_require__(108);nnObject.defineProperty(exports, ‘NotificationStack’, {n enumerable: true,n get: function get() {n return _interopRequireDefault(_notificationStack).default;n }n});nnfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }nn//////////////////n// WEBPACK FOOTERn// ./~/react-notification/dist/index.jsn// module id = 42n// module chunks = 0n//# sourceURL=webpack:///./~/react-notification/dist/index.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnObject.defineProperty(exports, « __esModule », {n value: truen});nnvar _extends = Object.assign || function (target) { for (var i = 1; i :// » or « // » (protocol-relative URL).n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followedn // by any combination of letters, digits, plus, period, or hyphen.n return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/isAbsoluteURL.jsn// module id = 56n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/isAbsoluteURL.js?’)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnvar utils = __webpack_require__(3);nnmodule.exports = (n utils.isStandardBrowserEnv() ?nn // Standard browser envs have full support of the APIs needed to testn // whether the request URL is of the same origin as current location.n (function standardBrowserEnv() {n var msie = /(msie|trident)/i.test(navigator.userAgent);n var urlParsingNode = document.createElement(‘a’);n var originURL;nn /**n * Parse a URL to discover it’s componentsn *n * @param {String} url The URL to be parsedn * @returns {Object}n */n function resolveURL(url) {n var href = url;nn if (msie) {n // IE needs attribute set twice to normalize propertiesn urlParsingNode.setAttribute(‘href’, href);n href = urlParsingNode.href;n }nn urlParsingNode.setAttribute(‘href’, href);nn // urlParsingNode provides the UrlUtils interface – http://url.spec.whatwg.org/#urlutilsn return {n href: urlParsingNode.href,n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/,  ») :  »,n host: urlParsingNode.host,n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/,  ») :  »,n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/,  ») :  »,n hostname: urlParsingNode.hostname,n port: urlParsingNode.port,n pathname: (urlParsingNode.pathname.charAt(0) === ‘/’) ?n urlParsingNode.pathname :n ‘/’ + urlParsingNode.pathnamen };n }nn originURL = resolveURL(window.location.href);nn /**n * Determine if a URL shares the same origin as the current locationn *n * @param {String} requestURL The URL to testn * @returns {boolean} True if URL shares the same origin, otherwise falsen */n return function isURLSameOrigin(requestURL) {n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;n return (parsed.protocol === originURL.protocol &&n parsed.host === originURL.host);n };n })() :nn // Non standard browser envs (web workers, react-native) lack needed support.n (function nonStandardBrowserEnv() {n return function isURLSameOrigin() {n return true;n };n })()n);nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/isURLSameOrigin.jsn// module id = 57n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/isURLSameOrigin.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnvar utils = __webpack_require__(3);nnmodule.exports = function normalizeHeaderName(headers, normalizedName) {n utils.forEach(headers, function processHeader(value, name) {n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {n headers[normalizedName] = value;n delete headers[name];n }n });n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/normalizeHeaderName.jsn// module id = 58n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/normalizeHeaderName.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnvar utils = __webpack_require__(3);nn// Headers whose duplicates are ignored by noden// c.f. https://nodejs.org/api/http.html#http_message_headersnvar ignoreDuplicateOf = [n ‘age’, ‘authorization’, ‘content-length’, ‘content-type’, ‘etag’,n ‘expires’, ‘from’, ‘host’, ‘if-modified-since’, ‘if-unmodified-since’,n ‘last-modified’, ‘location’, ‘max-forwards’, ‘proxy-authorization’,n ‘referer’, ‘retry-after’, ‘user-agent’n];nn/**n * Parse headers into an objectn *n * « `n * Date: Wed, 27 Aug 2014 08:58:49 GMTn * Content-Type: application/jsonn * Connection: keep-aliven * Transfer-Encoding: chunkedn * « `n *n * @param {String} headers Headers needing to be parsedn * @returns {Object} Headers parsed into an objectn */nmodule.exports = function parseHeaders(headers) {n var parsed = {};n var key;n var val;n var i;nn if (!headers) { return parsed; }nn utils.forEach(headers.split(‘\n’), function parser(line) {n i = line.indexOf(‘:’);n key = utils.trim(line.substr(0, i)).toLowerCase();n val = utils.trim(line.substr(i + 1));nn if (key) {n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {n return;n }n if (key === ‘set-cookie’) {n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);n } else {n parsed[key] = parsed[key] ? parsed[key] + ‘, ‘ + val : val;n }n }n });nn return parsed;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/parseHeaders.jsn// module id = 59n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/parseHeaders.js? »)},function(module,exports){eval(« ‘use strict’;nn/**n * Syntactic sugar for invoking a function and expanding an array for arguments.n *n * Common use case would be to use `Function.prototype.apply`.n *n * « `jsn * function f(x, y, z) {}n * var args = [1, 2, 3];n * f.apply(null, args);n * « `n *n * With `spread` this example can be re-written.n *n * « `jsn * spread(function(x, y, z) {})([1, 2, 3]);n * « `n *n * @param {Function} callbackn * @returns {Function}n */nmodule.exports = function spread(callback) {n return function wrap(arr) {n return callback.apply(null, arr);n };n};nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/lib/helpers/spread.jsn// module id = 60n// module chunks = 0n//# sourceURL=webpack:///./~/axios/lib/helpers/spread.js? »)},function(module,exports){eval(« /*!n * Determine if an object is a Buffern *n * @author Feross Aboukhadijeh
n * @license MITn */nnmodule.exports = function isBuffer (obj) {n return obj != null && obj.constructor != null &&n typeof obj.constructor.isBuffer === ‘function’ && obj.constructor.isBuffer(obj)n}nnn//////////////////n// WEBPACK FOOTERn// ./~/axios/~/is-buffer/index.jsn// module id = 61n// module chunks = 0n//# sourceURL=webpack:///./~/axios/~/is-buffer/index.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnvar _react = __webpack_require__(1);nnvar _react2 = _interopRequireDefault(_react);nnvar _reactDom = __webpack_require__(13);nnvar _reactDom2 = _interopRequireDefault(_reactDom);nnvar _comments = __webpack_require__(71);nnfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }nnmodule.exports = function () {n if (window._COMMENTS_CONFIG) {n _reactDom2.default.render(_react2.default.createElement(_comments.CommentApp, { config: window._COMMENTS_CONFIG || {} }), document.getElementById(‘comments’));n }n};nn//////////////////n// WEBPACK FOOTERn// ./src/js/_comment.jsn// module id = 62n// module chunks = 0n//# sourceURL=webpack:///./src/js/_comment.js? »)},,function(module,exports){eval(« ‘use strict’;nn/* global $, alert, get_cookie */nnvar initVote = function initVote() {n var CONST_REVIEW_VOTE = {n ‘useful_count’: [‘有用’, ‘/j/review/{REVIEW_ID}/useful’],n ‘useless_count’: [‘没用’, ‘/j/review/{REVIEW_ID}/useless’],n ‘spoiler’: [‘剧透提醒已提交,谢谢’, ‘/j/review/{REVIEW_ID}/spoiler’]n };nn var regDisabled = /disabled/,n regVoteType = /(\w+_count)/,n regSpoiler = /spoiler/,n ck = get_cookie(‘ck’);nn var votePanels = document.querySelectorAll(‘.main-panel-useful’),n votePanel = null,n rid =  »;nn var isAuthor = function isAuthor(votePanel) {n return votePanel && votePanel.getAttribute(‘data-is_owner’) === ‘true’;n };nn var canVote = function canVote(votePanel) {n return votePanel && votePanel.getAttribute(‘data-can_vote’) === ‘true’;n };nn var isTV = function isTV(votePanel) {n return votePanel && votePanel.getAttribute(‘data-is_tv’) === ‘true’;n };nn var handleVote = function handleVote(e) {n if (!ck) {n return;n }n e.stopPropagation();n if (window._USER_ABNORMAL) {n window.show_abnormal && window.show_abnormal();n return;n }nn var target = e.target;n var cn = target.className;n var match = cn.match(regVoteType) || cn.match(regSpoiler);n var type =  »;n var API_VOTE =  »;n var voteTxt =  »;nn if (cn.match(regDisabled)) {n return;n }nn if (match) {n if (isAuthor(e.currentTarget)) {n return alert(‘不能给自己投票噢’);n }nn if (!canVote(e.currentTarget)) {n var txt = isTV(e.currentTarget) ? ‘该剧尚未播出,不能投票噢’ : ‘该电影还未上映,不能投票噢’;n return alert(txt);n }nn type = match[0]; // ‘useful’, ‘useless’, ‘spoiler’n voteTxt = CONST_REVIEW_VOTE[type][0];n API_VOTE = CONST_REVIEW_VOTE[type][1];n rid = e.currentTarget.getAttribute(‘data-rid’);n API_VOTE = API_VOTE.replace(‘{REVIEW_ID}’, rid);n } else if (!match || !rid) {n return;n }nn var voteReq = $.post(API_VOTE, { ‘ck’: ck }, function (res) {n if (res.r == 0) {n if (type === ‘spoiler’) {n return handleSpoiler();n }n countVote(res, type);n }n });nn voteReq.fail(function () {n alert(‘网络错误’);n }).always(function () {n // console.log(‘vote ‘)n });n };nn var handleSpoiler = function handleSpoiler(type) {n // 在 列表 中,通过 `review-${rid}-content` 寻找对应的节点n var reviewElem = document.getElementById(‘review-‘ + rid + ‘-content’) || document.getElementById(rid);n var spoilerElem = reviewElem.querySelector(‘.spoiler’);n spoilerElem.innerText = CONST_REVIEW_VOTE[‘spoiler’][0];n spoilerElem.className = spoilerElem.className.replace(‘not-reported’, ‘disabled’);n };nn var countVote = function countVote(res, type) {n var reviewElem = document.getElementById(‘review-‘ + rid + ‘-content’) || document.getElementById(rid);n for (var i in CONST_REVIEW_VOTE) {n if (res[i] !== undefined) {n var countTxt = CONST_REVIEW_VOTE[i][0] + ‘ ‘ + res[i];n var countElem = reviewElem.querySelector(‘.’ + i);n var _cn = countElem.className;nn // 从没投过票 || 已经投票过n if (i === type) {n countElem.classList.add(‘disabled’);n } else {n countElem.classList.remove(‘disabled’);n }n countElem.innerHTML = countTxt;n }n }n };nn var len = votePanels.length;n if (len === 1) {n votePanel = votePanels[0];n rid = votePanel.getAttribute(‘data-rid’);n votePanel && votePanel.addEventListener(‘click’, handleVote, false);n } else {n for (var i = 0; i 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_CONFIG;nn _classCallCheck(this, AdInsert);nn var name = config.name,n slots = config.slots;nn this.current = slots[0];n this.name = name;n this.slots = slots || [];n }nn _createClass(AdInsert, [{n key: ‘html’,n value: function html() {n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};n var _config$tag = config.tag,n tag = _config$tag === undefined ? ‘div’ : _config$tag,n _config$className = config.className,n className = _config$className === undefined ? ‘Theme-item Advertisement’ : _config$className,n _config$style = config.style,n style = _config$style === undefined ?  » : _config$style,n _config$postFix = config.postFix,n postFix = _config$postFix === undefined ?  » : _config$postFix;nn var slotName = this.current;n var slotDiv =  » + tag + ‘>’;n return slotDiv;n }n }, {n key: ‘getAd’,n value: function getAd() {n var slotName = this.current;n if (window.getDoubanAD) {n try {n var slots = this.slots;n var slotNameIndex = slots.indexOf(slotName);n var nextSlotIndex = slots.length > slotNameIndex + 1 ? slotNameIndex + 1 : 0;n var nextSlotName = slots[nextSlotIndex];n window.getDoubanAD(slotName);n this.current = nextSlotName;n } catch (e) {n console && console.log(e);n }n }n }n }]);nn return AdInsert;n}();nnexports.default = AdInsert;nn//////////////////n// WEBPACK FOOTERn// ./src/js/ad_insert.jsn// module id = 65n// module chunks = 0n//# sourceURL=webpack:///./src/js/ad_insert.js? »)},function(module,exports){eval(« ‘use strict’nnexports.byteLength = byteLengthnexports.toByteArray = toByteArraynexports.fromByteArray = fromByteArraynnvar lookup = []nvar revLookup = []nvar Arr = typeof Uint8Array !== ‘undefined’ ? Uint8Array : Arraynnvar code = ‘ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/’nfor (var i = 0, len = code.length; i 0) {n throw new Error(‘Invalid string. Length must be a multiple of 4’)n }nn // Trim off extra bytes after placeholder bytes are foundn // See: https://github.com/beatgammit/base64-js/issues/42n var validLen = b64.indexOf(‘=’)n if (validLen === -1) validLen = lennn var placeHoldersLen = validLen === lenn ? 0n : 4 – (validLen % 4)nn return [validLen, placeHoldersLen]n}nn// base64 is 4/3 + up to two characters of the original datanfunction byteLength (b64) {n var lens = getLens(b64)n var validLen = lens[0]n var placeHoldersLen = lens[1]n return ((validLen + placeHoldersLen) * 3 / 4) – placeHoldersLenn}nnfunction _byteLength (b64, validLen, placeHoldersLen) {n return ((validLen + placeHoldersLen) * 3 / 4) – placeHoldersLenn}nnfunction toByteArray (b64) {n var tmpn var lens = getLens(b64)n var validLen = lens[0]n var placeHoldersLen = lens[1]nn var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))nn var curByte = 0nn // if there are placeholders, only get up to the last complete 4 charsn var len = placeHoldersLen > 0n ? validLen – 4n : validLennn for (var i = 0; i > 16) & 0xFFn arr[curByte++] = (tmp >> 8) & 0xFFn arr[curByte++] = tmp & 0xFFn }nn if (placeHoldersLen === 2) {n tmp =n (revLookup[b64.charCodeAt(i)] > 4)n arr[curByte++] = tmp & 0xFFn }nn if (placeHoldersLen === 1) {n tmp =n (revLookup[b64.charCodeAt(i)] > 2)n arr[curByte++] = (tmp >> 8) & 0xFFn arr[curByte++] = tmp & 0xFFn }nn return arrn}nnfunction tripletToBase64 (num) {n return lookup[num >> 18 & 0x3F] +n lookup[num >> 12 & 0x3F] +n lookup[num >> 6 & 0x3F] +n lookup[num & 0x3F]n}nnfunction encodeChunk (uint8, start, end) {n var tmpn var output = []n for (var i = start; i len2 ? len2 : (i + maxChunkLength)n ))n }nn // pad the end with zeros, but make sure to not forget the extra bytesn if (extraBytes === 1) {n tmp = uint8[len – 1]n parts.push(n lookup[tmp >> 2] +n lookup[(tmp > 10] +n lookup[(tmp >> 4) & 0x3F] +n lookup[(tmp n * @license MITn */n/* eslint-disable no-proto */nn’use strict’nnvar base64 = __webpack_require__(66)nvar ieee754 = __webpack_require__(101)nvar isArray = __webpack_require__(103)nnexports.Buffer = Buffernexports.SlowBuffer = SlowBuffernexports.INSPECT_MAX_BYTES = 50nn/**n * If `Buffer.TYPED_ARRAY_SUPPORT`:n * === true Use Uint8Array implementation (fastest)n * === false Use Object implementation (most compatible, even IE6)n *n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,n * Opera 11.6+, iOS 4.2+.n *n * Due to various browser bugs, sometimes the Object implementation will be used evenn * when the browser supports typed arrays.n *n * Note:n *n * – Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.n *n * – Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.n *n * – IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays ofn * incorrect length in some situations.nn * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so theyn * get the Object implementation, which is slower but behaves correctly.n */nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefinedn ? global.TYPED_ARRAY_SUPPORTn : typedArraySupport()nn/*n * Export kMaxLength after typed array support is determined.n */nexports.kMaxLength = kMaxLength()nnfunction typedArraySupport () {n try {n var arr = new Uint8Array(1)n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}n return arr.foo() === 42 && // typed array instances can be augmentedn typeof arr.subarray === ‘function’ && // chrome 9-10 lack `subarray`n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`n } catch (e) {n return falsen }n}nnfunction kMaxLength () {n return Buffer.TYPED_ARRAY_SUPPORTn ? 0x7fffffffn : 0x3fffffffn}nnfunction createBuffer (that, length) {n if (kMaxLength() = kMaxLength()) {n throw new RangeError(‘Attempt to allocate Buffer larger than maximum ‘ +n ‘size: 0x’ + kMaxLength().toString(16) + ‘ bytes’)n }n return length | 0n}nnfunction SlowBuffer (length) {n if (+length != length) { // eslint-disable-line eqeqeqn length = 0n }n return Buffer.alloc(+length)n}nnBuffer.isBuffer = function isBuffer (b) {n return !!(b != null && b._isBuffer)n}nnBuffer.compare = function compare (a, b) {n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {n throw new TypeError(‘Arguments must be Buffers’)n }nn if (a === b) return 0nn var x = a.lengthn var y = b.lengthnn for (var i = 0, len = Math.min(x, y); i >> 1n case ‘base64’:n return base64ToBytes(string).lengthn default:n if (loweredCase) return utf8ToBytes(string).length // assume utf8n encoding = ( » + encoding).toLowerCase()n loweredCase = truen }n }n}nBuffer.byteLength = byteLengthnnfunction slowToString (encoding, start, end) {n var loweredCase = falsenn // No need to verify that « this.length this.length. Done here to prevent potential uint32n // coercion fail below.n if (start > this.length) {n return  »n }nn if (end === undefined || end > this.length) {n end = this.lengthn }nn if (end >>= 0n start >>>= 0nn if (end 0) {n str = this.toString(‘hex’, 0, max).match(/.{2}/g).join(‘ ‘)n if (this.length > max) str += ‘ … ‘n }n return  »n}nnBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {n if (!Buffer.isBuffer(target)) {n throw new TypeError(‘Argument must be a Buffer’)n }nn if (start === undefined) {n start = 0n }n if (end === undefined) {n end = target ? target.length : 0n }n if (thisStart === undefined) {n thisStart = 0n }n if (thisEnd === undefined) {n thisEnd = this.lengthn }nn if (start target.length || thisStart this.length) {n throw new RangeError(‘out of range index’)n }nn if (thisStart >= thisEnd && start >= end) {n return 0n }n if (thisStart >= thisEnd) {n return -1n }n if (start >= end) {n return 1n }nn start >>>= 0n end >>>= 0n thisStart >>>= 0n thisEnd >>>= 0nn if (this === target) return 0nn var x = thisEnd – thisStartn var y = end – startn var len = Math.min(x, y)nn var thisCopy = this.slice(thisStart, thisEnd)n var targetCopy = target.slice(start, end)nn for (var i = 0; i = `byteOffset`,n// OR the last index of `val` in `buffer` at offset 0x7fffffff) {n byteOffset = 0x7fffffffn } else if (byteOffset = buffer.length) {n if (dir) return -1n else byteOffset = buffer.length – 1n } else if (byteOffset arrLength) byteOffset = arrLength – valLengthn for (i = byteOffset; i >= 0; i–) {n var found = truen for (var j = 0; j remaining) {n length = remainingn }n }nn // must be an even number of digitsn var strLen = string.lengthn if (strLen % 2 !== 0) throw new TypeError(‘Invalid hex string’)nn if (length > strLen / 2) {n length = strLen / 2n }n for (var i = 0; i remaining) length = remainingnn if ((string.length > 0 && (length this.length) {n throw new RangeError(‘Attempt to write outside buffer bounds’)n }nn if (!encoding) encoding = ‘utf8’nn var loweredCase = falsen for (;;) {n switch (encoding) {n case ‘hex’:n return hexWrite(this, string, offset, length)nn case ‘utf8’:n case ‘utf-8’:n return utf8Write(this, string, offset, length)nn case ‘ascii’:n return asciiWrite(this, string, offset, length)nn case ‘latin1’:n case ‘binary’:n return latin1Write(this, string, offset, length)nn case ‘base64’:n // Warning: maxLength not taken into account in base64Writen return base64Write(this, string, offset, length)nn case ‘ucs2’:n case ‘ucs-2’:n case ‘utf16le’:n case ‘utf-16le’:n return ucs2Write(this, string, offset, length)nn default:n if (loweredCase) throw new TypeError(‘Unknown encoding: ‘ + encoding)n encoding = ( » + encoding).toLowerCase()n loweredCase = truen }n }n}nnBuffer.prototype.toJSON = function toJSON () {n return {n type: ‘Buffer’,n data: Array.prototype.slice.call(this._arr || this, 0)n }n}nnfunction base64Slice (buf, start, end) {n if (start === 0 && end === buf.length) {n return base64.fromByteArray(buf)n } else {n return base64.fromByteArray(buf.slice(start, end))n }n}nnfunction utf8Slice (buf, start, end) {n end = Math.min(buf.length, end)n var res = []nn var i = startn while (i 0xEF) ? 4n : (firstByte > 0xDF) ? 3n : (firstByte > 0xBF) ? 2n : 1nn if (i + bytesPerSequence 0x7F) {n codePoint = tempCodePointn }n }n breakn case 3:n secondByte = buf[i + 1]n thirdByte = buf[i + 2]n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {n tempCodePoint = (firstByte & 0xF) 0x7FF && (tempCodePoint 0xDFFF)) {n codePoint = tempCodePointn }n }n breakn case 4:n secondByte = buf[i + 1]n thirdByte = buf[i + 2]n fourthByte = buf[i + 3]n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {n tempCodePoint = (firstByte & 0xF) 0xFFFF && tempCodePoint 0xFFFF) {n // encode to utf16 (surrogate pair dance)n codePoint -= 0x10000n res.push(codePoint >>> 10 & 0x3FF | 0xD800)n codePoint = 0xDC00 | codePoint & 0x3FFn }nn res.push(codePoint)n i += bytesPerSequencen }nn return decodeCodePointsArray(res)n}nn// Based on http://stackoverflow.com/a/22747272/680742, the browser withn// the lowest limit is Chrome, with 0x10000 args.n// We go 1 magnitude less, for safetynvar MAX_ARGUMENTS_LENGTH = 0x1000nnfunction decodeCodePointsArray (codePoints) {n var len = codePoints.lengthn if (len len) end = lennn var out =  »n for (var i = start; i len) {n start = lenn }nn if (end len) {n end = lenn }nn if (end length) throw new RangeError(‘Trying to access beyond buffer length’)n}nnBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {n offset = offset | 0n byteLength = byteLength | 0n if (!noAssert) checkOffset(offset, byteLength, this.length)nn var val = this[offset]n var mul = 1n var i = 0n while (++i 0 && (mul *= 0x100)) {n val += this[offset + –byteLength] * muln }nn return valn}nnBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {n if (!noAssert) checkOffset(offset, 1, this.length)n return this[offset]n}nnBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {n if (!noAssert) checkOffset(offset, 2, this.length)n return this[offset] | (this[offset + 1] = mul) val -= Math.pow(2, 8 * byteLength)nn return valn}nnBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {n offset = offset | 0n byteLength = byteLength | 0n if (!noAssert) checkOffset(offset, byteLength, this.length)nn var i = byteLengthn var mul = 1n var val = this[offset + –i]n while (i > 0 && (mul *= 0x100)) {n val += this[offset + –i] * muln }n mul *= 0x80nn if (val >= mul) val -= Math.pow(2, 8 * byteLength)nn return valn}nnBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {n if (!noAssert) checkOffset(offset, 1, this.length)n if (!(this[offset] & 0x80)) return (this[offset])n return ((0xff – this[offset] + 1) * -1)n}nnBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {n if (!noAssert) checkOffset(offset, 2, this.length)n var val = this[offset] | (this[offset + 1] max || value buf.length) throw new RangeError(‘Index out of range’)n}nnBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {n value = +valuen offset = offset | 0n byteLength = byteLength | 0n if (!noAssert) {n var maxBytes = Math.pow(2, 8 * byteLength) – 1n checkInt(this, value, offset, byteLength, maxBytes, 0)n }nn var mul = 1n var i = 0n this[offset] = value & 0xFFn while (++i = 0 && (mul *= 0x100)) {n this[offset + i] = (value / mul) & 0xFFn }nn return offset + byteLengthn}nnBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)n this[offset] = (value & 0xff)n return offset + 1n}nnfunction objectWriteUInt16 (buf, value, offset, littleEndian) {n if (value >>n (littleEndian ? i : 1 – i) * 8n }n}nnBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value & 0xff)n this[offset + 1] = (value >>> 8)n } else {n objectWriteUInt16(this, value, offset, true)n }n return offset + 2n}nnBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value >>> 8)n this[offset + 1] = (value & 0xff)n } else {n objectWriteUInt16(this, value, offset, false)n }n return offset + 2n}nnfunction objectWriteUInt32 (buf, value, offset, littleEndian) {n if (value >> (littleEndian ? i : 3 – i) * 8) & 0xffn }n}nnBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset + 3] = (value >>> 24)n this[offset + 2] = (value >>> 16)n this[offset + 1] = (value >>> 8)n this[offset] = (value & 0xff)n } else {n objectWriteUInt32(this, value, offset, true)n }n return offset + 4n}nnBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value >>> 24)n this[offset + 1] = (value >>> 16)n this[offset + 2] = (value >>> 8)n this[offset + 3] = (value & 0xff)n } else {n objectWriteUInt32(this, value, offset, false)n }n return offset + 4n}nnBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) {n var limit = Math.pow(2, 8 * byteLength – 1)nn checkInt(this, value, offset, byteLength, limit – 1, -limit)n }nn var i = 0n var mul = 1n var sub = 0n this[offset] = value & 0xFFn while (++i > 0) – sub & 0xFFn }nn return offset + byteLengthn}nnBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) {n var limit = Math.pow(2, 8 * byteLength – 1)nn checkInt(this, value, offset, byteLength, limit – 1, -limit)n }nn var i = byteLength – 1n var mul = 1n var sub = 0n this[offset + i] = value & 0xFFn while (–i >= 0 && (mul *= 0x100)) {n if (value > 0) – sub & 0xFFn }nn return offset + byteLengthn}nnBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)n if (value >> 8)n } else {n objectWriteUInt16(this, value, offset, true)n }n return offset + 2n}nnBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value >>> 8)n this[offset + 1] = (value & 0xff)n } else {n objectWriteUInt16(this, value, offset, false)n }n return offset + 2n}nnBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)n if (Buffer.TYPED_ARRAY_SUPPORT) {n this[offset] = (value & 0xff)n this[offset + 1] = (value >>> 8)n this[offset + 2] = (value >>> 16)n this[offset + 3] = (value >>> 24)n } else {n objectWriteUInt32(this, value, offset, true)n }n return offset + 4n}nnBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {n value = +valuen offset = offset | 0n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)n if (value >> 24)n this[offset + 1] = (value >>> 16)n this[offset + 2] = (value >>> 8)n this[offset + 3] = (value & 0xff)n } else {n objectWriteUInt32(this, value, offset, false)n }n return offset + 4n}nnfunction checkIEEE754 (buf, value, offset, ext, max, min) {n if (offset + ext > buf.length) throw new RangeError(‘Index out of range’)n if (offset = target.length) targetStart = target.lengthn if (!targetStart) targetStart = 0n if (end > 0 && end = this.length) throw new RangeError(‘sourceStart out of bounds’)n if (end this.length) end = this.lengthn if (target.length – targetStart = 0; –i) {n target[i + targetStart] = this[i + start]n }n } else if (len >> 0n end = end === undefined ? this.length : end >>> 0nn if (!val) val = 0nn var in if (typeof val === ‘number’) {n for (i = start; i 0xD7FF && codePoint 0xDBFF) {n // unexpected trailn if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)n continuen } else if (i + 1 === length) {n // unpaired leadn if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)n continuen }nn // valid leadn leadSurrogate = codePointnn continuen }nn // 2 leads in a rown if (codePoint -1) bytes.push(0xEF, 0xBF, 0xBD)n leadSurrogate = codePointn continuen }nn // valid surrogate pairn codePoint = (leadSurrogate – 0xD800 -1) bytes.push(0xEF, 0xBF, 0xBD)n }nn leadSurrogate = nullnn // encode utf8n if (codePoint > 0x6 | 0xC0,n codePoint & 0x3F | 0x80n )n } else if (codePoint > 0xC | 0xE0,n codePoint >> 0x6 & 0x3F | 0x80,n codePoint & 0x3F | 0x80n )n } else if (codePoint > 0x12 | 0xF0,n codePoint >> 0xC & 0x3F | 0x80,n codePoint >> 0x6 & 0x3F | 0x80,n codePoint & 0x3F | 0x80n )n } else {n throw new Error(‘Invalid code point’)n }n }nn return bytesn}nnfunction asciiToBytes (str) {n var byteArray = []n for (var i = 0; i > 8n lo = c % 256n byteArray.push(lo)n byteArray.push(hi)n }nn return byteArrayn}nnfunction base64ToBytes (str) {n return base64.toByteArray(base64clean(str))n}nnfunction blitBuffer (src, dst, offset, length) {n for (var i = 0; i = dst.length) || (i >= src.length)) breakn dst[i + offset] = src[i]n }n return in}nnfunction isnan (val) {n return val !== val // eslint-disable-line no-self-comparen}nn/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))nn//////////////////n// WEBPACK FOOTERn// ./~/buffer/index.jsn// module id = 67n// module chunks = 0n//# sourceURL=webpack:///./~/buffer/index.js? »);
},function(module,exports,__webpack_require__){eval(« var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!n Copyright (c) 2017 Jed Watson.n Licensed under the MIT License (MIT), seen http://jedwatson.github.io/classnamesn*/n/* global define */nn(function () {nt’use strict’;nntvar hasOwn = {}.hasOwnProperty;nntfunction classNames () {nttvar classes = [];nnttfor (var i = 0; i {n // this.setState({n // reportHtml: respn // })n // })n };nn _proto.handleHideReportDialog = function handleHideReportDialog() {n clearTimeout(this.timer);n this.setState({n isShowDialog: false,n isReported: falsen });n };nn _proto.handleHideNotification = function handleHideNotification() {n this.setState({n notificationVisible: falsen });n };nn _proto.handleSubmitReport = function handleSubmitReport(reason) {n var _this2 = this;nn // 因调用的接口返回的是html页,暂无法判断失败的情况n var _this$state = this.state,n reportId = _this$state.reportId,n submitReportStatus = _this$state.submitReportStatus;nn if (submitReportStatus === __chunk_4.PENDING) {n return;n } // TODO: 提交投诉数据nnn var reportObj = {n url: «  » + window.location.origin + window.location.pathname + « ?comment_id= » + reportId,n reason: reason,n extra_msg:  »n };n __chunk_6.CommentsAPI.submitReport(reportObj).then(function (resp) {n _this2.setState({n isReported: truen });nn _this2.timer = setTimeout(function () {n _this2.handleHideReportDialog();n }, 3000);n });n } // 新增一级回应n ;nn _proto.handleAddComment = function handleAddComment(newComment, successCallback, failCallback) {n var _this3 = this;nn // 需要知道回应的上层id,及回应内容n var count = this.props.count;n var _this$state2 = this.state,n comments = _this$state2.comments,n addCommentStatus = _this$state2.addCommentStatus;nn if (addCommentStatus === __chunk_4.PENDING) {n return;n }nn if (window._USER_ABNORMAL) {n // eslint-disable-next-line no-unused-expressionsn window.show_abnormal && window.show_abnormal();n return;n }nn __chunk_6.CommentsAPI.addComment(newComment).then(function (resp) {n // 提交成功n if (resp.code === 0) {n // 标记为最新回应,用于滚动定位n // 不过暂时没有用到,因为一级回应的输入框在最下面n // 提交后结果马上就出现在输入框上方n var latestComment = resp.data;n latestComment.is_latest = true; // 清除列表中其他的 is_latest 标记nn var _comments = comments.map(function (comment) {n var _comment = _extends_1({}, comment);nn delete _comment.is_latest;n return _comment;n }).concat(latestComment);nn _this3.setState({n addCommentStatus: __chunk_4.SUCCESS,n comments: _commentsn });nn if (typeof successCallback === ‘function’) {n successCallback();n }nn if (_comments.length > count) ; // TODO: 自动跳到下一页n // 1001 需要输入验证码nn } else if (resp.code === 1001) {n _this3.setState({n addCommentStatus: __chunk_4.FAILn });nn if (typeof failCallback === ‘function’) {n failCallback(resp.code, resp.data, resp.msg);n } // 1002 需要跳转到审核页面nn } else if (resp.code === 1002) {n _this3.setState({n addCommentStatus: __chunk_4.FAILn });nn setTimeout(function () {n window.location.href = resp.data.url;n }, 500); // 1000 回应内容不能为空 || 回应包含被禁止的内容n // 1003 没有回应权限n } else {n if (typeof failCallback === ‘function’) {n failCallback(resp.code, resp.data, resp.msg);n }nn throw resp.msg;n }n }).catch(function (error) {n console.error(‘出错了!’, error);nn if (typeof failCallback === ‘function’) {n failCallback(error);n }nn _this3.setState({n addCommentStatus: __chunk_4.FAIL,n notificationVisible: true,n notificationMsg: typeof error === ‘string’ ? error : ‘添加回应出错了’n });n });n } // 新增二级回应n // 如果有 commentId ,说明新增的 reply 是针对 comment 的回应,n // 而不是针对comment 下面 reply 的回应n ;nn _proto.handleAddReply = function handleAddReply(newReply, successCallback, failCallback, commentId, hideReplyEditorCallback, scrollToLatestReplyCallback) {n var _this4 = this;nn var _this$state3 = this.state,n addReplyStatus = _this$state3.addReplyStatus,n comments = _this$state3.comments;nn if (addReplyStatus === __chunk_4.PENDING) {n return;n }nn if (window._USER_ABNORMAL) {n if (typeof window.show_abnormal === ‘function’) {n window.show_abnormal();n }nn return;n }nn __chunk_6.CommentsAPI.addReply(newReply).then(function (resp) {n // 提交成功n if (resp.code === 0) {n // 提交成功后,刷新页面n // 标记为最新回应,用于滚动定位n var latestReply = resp.data;n latestReply.is_latest = true; // 暂时占位用nn latestReply.is_temporary = true;nn var _comments = comments.map(function (comment, index) {n // 先全部清除一遍标记n comment.replies.map(function (reply) {n var _reply = _extends_1({}, reply);nn delete _reply.is_latest;n return _reply;n }); // 再添加nn if (comment.id === commentId) {n comment.replies.push(latestReply);n return comment;n }nn return comment;n });nn _this4.setState({n addReplyStatus: __chunk_4.SUCCESS,n comments: _commentsn });nn if (typeof successCallback === ‘function’) {n successCallback();n }nn if (typeof hideReplyEditorCallback === ‘function’) {n hideReplyEditorCallback();n } // 不再定位到最后的回复n // setTimeout(() => {n // if (typeof scrollToLatestReplyCallback === ‘function’) {n // scrollToLatestReplyCallback()n // }n // }, 400)n // 1001 需要输入验证码nn } else if (resp.code === 1001) {n _this4.setState({n addReplyStatus: __chunk_4.FAILn });nn console.warn(‘出错了’, resp.msg);nn if (typeof failCallback === ‘function’) {n failCallback(resp.code, resp.data, resp.msg);n } // 1002 需要跳转到审核页面nn } else if (resp.code === 1002) {n console.warn(‘出错了’, resp.msg);nn _this4.setState({n addReplyStatus: __chunk_4.FAILn });nn setTimeout(function () {n window.location.href = resp.data.url;n }, 500); // 1000 回应内容不能为空 || 回应包含被禁止的内容n // 1003 没有回应权限n } else {n console.warn(‘出错了’, resp.msg);nn if (typeof failCallback === ‘function’) {n failCallback(resp.code, resp.data, resp.msg);n }nn throw resp.msg;n }n }).catch(function (error) {n console.error(‘出错了!’, error);nn if (typeof failCallback === ‘function’) {n failCallback(error);n }nn _this4.setState({n addReplyStatus: __chunk_4.FAIL,n notificationVisible: true,n notificationMsg: typeof error === ‘string’ ? error : ‘添加回应出错了’n });n });n } // 删除一级和二级回应, 如果有 parentCommentId ,说明删除的是二级回应 replyn ;nn _proto.handleDelete = function handleDelete(id, parentCommentId) {n var _this5 = this;nn var _this$state4 = this.state,n comments = _this$state4.comments,n truncation = _this$state4.truncation;nn if (window._USER_ABNORMAL && typeof window.show_abnormal === ‘function’) {n window.show_abnormal();n return;n }nn __chunk_6.CommentsAPI.delete({n cid: idn }).then(function (resp) {n // 新版接口都是返回 code,这个接口是旧的,返回的还是 resp.r, 所以做下兼容处理n if (resp.code === 0 || resp.r === 0) {n var _comments = comments;nn if (!parentCommentId) {n _comments = comments.map(function (comment) {n var _comment = _extends_1({}, comment);nn if (_comment.id === id) {n if (comment.total_replies > 0) {n _comment.text = ‘「该回应已被删除」’;n }nn _comment.is_deleted = true;n return _comment;n }nn return _comment;n });n } else {n _comments = comments.map(function (comment) {n if (comment.id === parentCommentId) {n var _replies = comment.replies.map(function (reply) {n var _reply = _extends_1({}, reply);nn if (_reply.id === id) {n // 不管这条回应有没有被再次回应过,都直接删掉n // reply.text = ‘「该回应已被删除」’n _reply.is_deleted = true;n }nn return _reply;n });nn comment.replies = cloneDeep(_replies);n return comment;n }nn return comment;n });n }nn _this5.setState({n comments: _comments,n truncation: truncation – 1n });n }n }).catch(function (error) {n console.error(‘删除失败’, error);nn _this5.setState({n notificationVisible: true,n notificationMsg: typeof error === ‘string’ ? error : ‘删除出错了’n });n });n } // 收起回应n ;nn _proto.handleFoldReplies = function handleFoldReplies(commentId, callback) {n var _this$state5 = this.state,n comments = _this$state5.comments,n truncation = _this$state5.truncation;nn var _comments = comments.map(function (comment) {n var _comment = _extends_1({}, comment);nn if (_comment.id === commentId) {n // 重新回到 3 条n _comment.replies = _comment.replies.slice(0, truncation);n return _comment;n }nn return _comment;n });nn this.setState({n comments: _commentsn });nn if (typeof callback === ‘function’) {n callback();n }n } // 展开更多回应n ;nn _proto.handleLoadMoreReplies = function handleLoadMoreReplies(commentId, params, successCallback, failCallback) {n var _this6 = this;nn var comments = this.state.comments;n __chunk_6.CommentsAPI.getReplies(_extends_1({n commentId: commentIdn }, params)).then(function (data) {n // 这个接口没有返回 code,所以直接判断 data 了n if (data) {n var _comments = comments.map(function (comment) {n var _comment = _extends_1({}, comment);nn if (_comment.id === commentId) {n // TODO: 如果之前新增了回应,需要把刚拿到的 replies 插入到新增回应的上方,以保持新增回应一直在最下。(好像是有这么个需求??)nn /*n * 有这么一个情况:n * 如果有「展开更多」时,添加了的回应,然后再n * 点击「展开更多」拿到新的数据后,需要把之前添加的回应从旧的 repliesn * 列表里过滤掉,否则旧的里有刚加的回应、新数据n * 也里有刚加的回应,就重复了。n */n _comment.replies = _comment.replies.filter(function (reply) {n return !reply.is_temporary;n }).concat(data.replies);n return _comment;n }nn return _comment;n });nn _this6.setState({n comments: _commentsn });nn successCallback(data);n }n }).catch(function (error) {n console.error(‘请求更多回应时加载失败’, error);nn _this6.setState({n notificationVisible: true,n notificationMsg: typeof error === ‘string’ ? error : ‘请求出错了’n });nn failCallback(error);n });n };nn _proto.render = function render() {n var config = this.props.config;n var _this$state6 = this.state,n comments = _this$state6.comments,n truncation = _this$state6.truncation,n isShowDialog = _this$state6.isShowDialog,n isReported = _this$state6.isReported,n notificationVisible = _this$state6.notificationVisible,n notificationMsg = _this$state6.notificationMsg,n reportHtml = _this$state6.reportHtml;nn if (!config) {n return null;n }nn var app = config.app,n service = config.service,n total = config.total,n start = config.start,n count = config.count,n target = config.target,n options = config.options,n needEscape = config.needEscape;n var defaultBgColor = {n note: ‘f1faf1’,n movie: ‘#f3f5f7’,n book: ‘#f8f8f4’,n music: ‘#f4f7f3’n };n var bgColor = options.bg_color ? options.bg_color : defaultBgColor[app] || ‘#f3f5f7’;n return React__default.createElement(« div », {n className: __chunk_3.classnames(‘comments-app-wrapper’, {n dev: __chunk_6.IS_DEVn })n }, target.hidden_nonfriend_comments ? React__default.createElement(« div », {n className: « comment-tips »n }, « \u7531\u4E8E\u53D1\u5E03\u8005\u7684\u8BBE\u7F6E\uFF0C\u4E0D\u5C55\u793A\u6240\u6709\u4EBA\u7684\u56DE\u5E94 ») : null, React__default.createElement(commentList.default, {n config: config,n bgColor: bgColor,n target: target,n comments: comments,n needEscape: needEscape,n canAtSb: options.can_at_sb,n maxLength: options.max_length,n replyUsers: this.getReplyUsers(),n truncation: truncation,n handleAddComment: this.handleAddComment.bind(this),n handleAddReply: this.handleAddReply.bind(this),n handleDelete: this.handleDelete.bind(this),n handleFoldReplies: this.handleFoldReplies.bind(this),n handleLoadMoreReplies: this.handleLoadMoreReplies.bind(this),n handleShowReportDialog: this.handleShowReportDialog.bind(this)n }), total > count ? React__default.createElement(paginator.default, {n app: app,n service: service,n total: total,n start: start,n count: countn }) : null, this.renderCommentEditor(), React__default.createElement(report.default, {n reportHtml: reportHtml,n isShowDialog: isShowDialog,n isReported: isReported,n reportType: options.report_type || ‘comment’,n handleHideReportDialog: this.handleHideReportDialog.bind(this),n handleSubmitReport: this.handleSubmitReport.bind(this)n }), React__default.createElement(reactNotification.Notification, {n style: false,n className: « comment-notification-bar »,n activeClassName: « actived »,n action: «  »,n isActive: notificationVisible,n message: typeof notificationMsg === ‘string’ ? notificationMsg : ‘服务器开小差’,n dismissAfter: 1500,n title: «  »,n onDismiss: this.handleHideNotification.bind(this)n }));n };nn _proto.renderCommentEditor = function renderCommentEditor() {n var config = this.props.config;n var total = config.total,n start = config.start,n count = config.count,n user = config.user,n author = config.author,n target = config.target,n options = config.options;n var currentPage = Math.floor(start / count) + 1; // 当前页数nn var totalPage = Math.floor(total / count) + (total % count > 0 ? 1 : 0); // 总页数nn var currentPageIsTheEndPage = currentPage >= totalPage; // 如果设置了只在末页显示输入框,但当前页并不是末页,则不显示输入框nn if (options.only_comment_at_the_end_of_pages && !currentPageIsTheEndPage) {n return null;n }nn return React__default.createElement(commentEditor.default, {n config: config,n author: author,n enableSyncToStatus: options.enable_comment_sync_to_status,n user: user,n maxLength: options.max_length || 0,n canComment: target.can_add_comment,n canAtSb: options.can_at_sb,n replyUsers: this.getReplyUsers(),n onlyFriendCanComment: target.reply_limit === ‘F’,n canUploadFile: options.can_upload_file,n handleAddComment: this.handleAddComment.bind(this)n });n };nn _proto.getReplyUsers = function getReplyUsers() {n var _this$props$config = this.props.config,n user = _this$props$config.user,n comments = _this$props$config.comments;nn if (!user || !comments) {n return [];n }nn var replyUsers = [];n var pushed = {};n var userItem;n pushed[user.uid] = 1;n comments.forEach(function (comment) {n // comment = comments[index]n if (replyUsers.length > 5) return;n userItem = comment.author;nn if (userItem) {n var _userItem = userItem,n uid = _userItem.uid,n name = _userItem.name,n avatar = _userItem.avatar;nn if (!(uid in pushed)) {n replyUsers.push({n uid: uid,n username: name,n avatar: avatarn });n pushed[uid] = 1;n }n }n });n return replyUsers;n };nn return CommentApp;n}(React.Component);nnCommentApp.propTypes = commentAppPropTypes;nCommentApp.defaultProps = commentAppDefaultProps;nnexports.commentAppDefaultProps = commentAppDefaultProps;nexports.commentAppPropTypes = commentAppPropTypes;nexports.default = CommentApp;n//# sourceMappingURL=comment-app.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/comment-app.jsn// module id = 70n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/comment-app.js? »)},function(module,exports,__webpack_require__){eval(« ‘use strict’;nnObject.defineProperty(exports, ‘__esModule’, { value: true });nn__webpack_require__(2);n__webpack_require__(6);nvar commentApp = __webpack_require__(70);n__webpack_require__(10);n__webpack_require__(1);n__webpack_require__(4);n__webpack_require__(32);n__webpack_require__(42);nvar commentList = __webpack_require__(34);nvar baseItem = __webpack_require__(21);n__webpack_require__(13);n__webpack_require__(17);nvar actionBar = __webpack_require__(15);n__webpack_require__(5);nvar userSelect = __webpack_require__(12);nvar replyEditor = __webpack_require__(14);n__webpack_require__(11);n__webpack_require__(9);n__webpack_require__(8);n__webpack_require__(7);nvar replyList = __webpack_require__(19);n__webpack_require__(18);nvar replyItem = __webpack_require__(16);nvar commentEditor = __webpack_require__(33);nvar paginator = __webpack_require__(35);nvar report = __webpack_require__(36);nn/*n * @Author: hanjiyunn * @Date: 2019-05-13 12:48:47n * @Last Modified by: hanjiyunn * @Last Modified time: 2019-05-26 04:23:37n */nnexports.CommentApp = commentApp.default;nexports.commentAppDefaultProps = commentApp.commentAppDefaultProps;nexports.commentAppPropTypes = commentApp.commentAppPropTypes;nexports.CommentList = commentList.default;nexports.commentListDefaultProps = commentList.commentListDefaultProps;nexports.commentListPropTypes = commentList.commentListPropTypes;nexports.BaseItem = baseItem.default;nexports.baseItemDefaultProps = baseItem.baseItemDefaultProps;nexports.baseItemPropTypes = baseItem.baseItemPropTypes;nexports.ActionBar = actionBar.default;nexports.commentActionsDefaultProps = actionBar.commentActionsDefaultProps;nexports.commentActionsPropTypes = actionBar.commentActionsPropTypes;nexports.UserSelect = userSelect.UserSelect;nexports.userSelectDefaultProps = userSelect.userSelectDefaultProps;nexports.userSelectPropTypes = userSelect.userSelectPropTypes;nexports.ReplyEditor = replyEditor.default;nexports.replyEditorDefaultProps = replyEditor.replyEditorDefaultProps;nexports.replyEditorPropTypes = replyEditor.replyEditorPropTypes;nexports.ReplyList = replyList.default;nexports.replyListDefaultProps = replyList.replyListDefaultProps;nexports.replyListPropTypes = replyList.replyListPropTypes;nexports.ReplyItem = replyItem.default;nexports.replyItemDefaultProps = replyItem.replyItemDefaultProps;nexports.replyItemPropTypes = replyItem.replyItemPropTypes;nexports.CommentEditor = commentEditor.default;nexports.commentEditorDefaultProps = commentEditor.commentEditorDefaultProps;nexports.commentEditorPropTypes = commentEditor.commentEditorPropTypes;nexports.Paginator = paginator.default;nexports.paginatorDefaultProps = paginator.paginatorDefaultProps;nexports.paginatorPropTypes = paginator.paginatorPropTypes;nexports.Report = report.default;nexports.reportDefaultProps = report.reportDefaultProps;nexports.reportPropTypes = report.reportPropTypes;n//# sourceMappingURL=index.js.mapnnn//////////////////n// WEBPACK FOOTERn// ./~/comments/lib/index.jsn// module id = 71n// module chunks = 0n//# sourceURL=webpack:///./~/comments/lib/index.js? »)},function(module,exports,__webpack_require__){eval(« /**n * Module dependencies.n */nnvar type;ntry {n type = __webpack_require__(37);n} catch (_) {n type = __webpack_require__(37);n}nn/**n * Module exports.n */nnmodule.exports = clone;nn/**n * Clones objects.n *n * @param {Mixed} any objectn * @api publicn */nnfunction clone(obj){n switch (type(obj)) {n case ‘object’:n var copy = {};n for (var key in obj) {n if (obj.hasOwnProperty(key)) {n copy[key] = clone(obj[key]);n }n }n return copy;nn case ‘array’:n var copy = new Array(obj.length);n for (var i = 0, l = obj.length; i = duration;nn // completen if (done) {n this._from = this._to;n this._update(this._to);n this._done = true;n this.emit(‘end’);n return this;n }nn // tweenn var from = this._from;n var to = this._to;n var curr = this._curr;n var fn = this._ease;n var p = (now – this._start) / duration;n var n = fn(p);nn // arrayn if (this.isArray) {n for (var i = 0; i = 0 ? __assign({}, params) : __assign({}, data);n _url = Object.keys(_data).reduce(function (r, k) {n if (_data[k] === undefined ||n _data[k] === null ||n (typeof (_data[k]) !== ‘string’ && typeof (_data[k]) !== ‘number’)) {n return r;n }n var reg = new RegExp(« : » + k, ‘g’);n if (!r.match(reg)) {n return r;n }n // remove kn var val = _data[k];n delete _data[k];n return r.replace(reg, val);n }, _url);n var _conf = __assign({}, conf);n _conf.url = _url;n if ([‘get’, ‘delete’].indexOf(_method) >= 0) {n _conf.params = _data;n }n else {n _conf.data = _data;n }n return _conf;n};n//# sourceMappingURL=restful-transform.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/dom/axios/interceptors/restful-transform.jsn// module id = 84n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/dom/axios/interceptors/restful-transform.js? »)},function(module,exports,__webpack_require__){eval(«  »use strict »;nvar __importDefault = (this && this.__importDefault) || function (mod) {n return (mod && mod.__esModule) ? mod : { « default »: mod };n};nObject.defineProperty(exports, « __esModule », { value: true });nvar classnames_1 = __importDefault(__webpack_require__(68));n/**n * 创建一个带前缀的 classnames, 返回一个功能和 classnames 完全一致但是每个类名会带一个前缀, 可以通过在类名前加 ! 取消前缀n * @param prefixesn * @examplen *n * let cx = classNameBuilder(‘prefix1’, ‘prefix2’)n * cx(‘aa’, ‘bb’) // => `prefix1-prefix2-aa prefix1-prefix2-bb`n * cx(‘aa’, ‘!bb’) // => `prefix1-prefix2-aa bb`n */nfunction classNameBuilder() {n var prefixes = [];n for (var _i = 0; _i ‘/category/277’n *n * compileUrl(‘/category/:id?type=:type’,{id:277, type: ‘movie’})n * => ‘/category/277?type=movie’n */nexports.compileUrl = function (url, data) {n url = url.replace(/(\/|=|\&|\?)\:([\w]+)/g, function (_, prefix, key) {n return prefix + (lang_1.isNil(data[key]) ?  » : data[key]);n });n return url;n};n/**n * URL 不支持简写的形式,这里把域名和协议都填上n * @param urln */nfunction normalizeUrl(url) {n if (!/^\w+:/.test(url)) {n if (/^\/\//.test(url)) {n return location.protocol + url;n }n else if (/^\/\w+/.test(url)) {n return location.origin + url;n }n }n return url;n}n/**n * 从 url 中解析出 query 对象, 如果 key 出现多次只返回第一次n * @param urln */nfunction getQuery(url) {n url = normalizeUrl(url);n var urlObj = new URL(url);n var query = {};n urlObj.searchParams.forEach(function (v, k) {n if (!(k in query)) {n query[k] = v;n }n });n return query;n}nexports.getQuery = getQuery;n/**n * 从 url 中解析出 query 对象, 如果 key 出现多次则返回一个字符串数组n * @param urln */nfunction getQueryAll(url) {n url = normalizeUrl(url);n var urlObj = new URL(url);n var query = {};n urlObj.searchParams.forEach(function (v, k) {n query[k] = query[k] || [];n query[k].push(v);n });n return query;n}nexports.getQueryAll = getQueryAll;nfunction setQuery(url, name, value) {n url = normalizeUrl(url);n var urlObj = new URL(url);n if (lang_1.isStr(name)) {n if (!lang_1.isEmpty(value)) {n urlObj.searchParams.set(name, String(value));n }n }n else {n for (var _i = 0, _a = Object.keys(name); _i {n * return val && val.trim()n * },n * message: ‘请填写名称’n * },n * index: {n * validator: (val) => {n * return val && /^\d+$/gi,n * },n * message: ‘请填写正确的索引值’n * }n * }n * validate(formData, rules)n */nfunction validate(formData, rules) {n var result = true;n var error =  »;n var key =  »;n for (var k in rules) {n var rule = rules[k];n if (rule) {n var val = formData[k];n var validator = rule.validator;n var _validator = typeof validator === ‘string’ ? HELPERS[validator] : validator;n var r = _validator(val);n if (!r) {n result = false;n error = rule.message;n key = k;n return [result, key, error];n }n }n }n return [result, key, error];n}nexports.validate = validate;n//# sourceMappingURL=validate.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/dom/validate.jsn// module id = 94n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/dom/validate.js? »);
},function(module,exports){eval(‘ »use strict »;nObject.defineProperty(exports, « __esModule », { value: true });n/**n * 将一个元素变成只有一个元素的数组,如果该元素已经是数组则直接返回n * @param arrn * @examplen *n * arrify(1) // => [1]n * arrify([1]) // => [1]n */nfunction arrify(arr) {n if (Array.isArray(arr))n return arr;n return [arr];n}nexports.arrify = arrify;n/**n * 将一个嵌套数组扁平化一层,n * @param arrn * @examplen * flatten([[1], 2, 3]) // => [1, 2, 3]n * flatten([1, [2], 3]) // => [1, 2, 3]n * flatten([1, 2, 3]) // => [1, 2, 3]n *n */nfunction flatten(arr) {n var _a;n return (_a = []).concat.apply(_a, arr);n}nexports.flatten = flatten;n/**n * 将一个数组分组n *n * @param arrn * @param fnn * @examplen *n * groupBy([1, 2, 3, 4], t => t % 2) // => {0: [2, 4], 1: [1, 3]}n */nfunction groupBy(arr, fn) {n var group = {};n for (var i = 0; i 3) // => [[1,2,3],[4]]n *n */nfunction chunkBy(arr, count) {n if (arr.length ‘\[lodash\]\(https://lodash\.com/\)’n */nfunction escapeRegExp(string) {n return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, ‘\\$&’) : string;n}nexports.escapeRegExp = escapeRegExp;n//# sourceMappingURL=escape-regexp.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/escape-regexp.jsn// module id = 97n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/escape-regexp.js?’)},function(module,exports){eval(«  »use strict »;nObject.defineProperty(exports, « __esModule », { value: true });n/**n * is primitive numbern * @param valn */nfunction isNum(val) {n return typeof val === ‘number’;n}nexports.isNum = isNum;n/**n * is object (not null)n * @param valn */nfunction isObj(val) {n return typeof val === ‘object’ && val !== null;n}nexports.isObj = isObj;n/**n * is primitive stringn * @param valn */nfunction isStr(val) {n return typeof val === ‘string’;n}nexports.isStr = isStr;n/**n * is nulln * @param valn */nfunction isNull(val) {n return val === null;n}nexports.isNull = isNull;n/**n * is undefinedn * @param valn */nfunction isUndefined(val) {n return typeof val === ‘undefined’;n}nexports.isUndefined = isUndefined;n/**n * is null or undefinedn * @param valn */nfunction isNil(val) {n return isNull(val) || isUndefined(val);n}nexports.isNil = isNil;n/**n * is primitive booleann * @param valn */nfunction isBool(val) {n return typeof val === ‘boolean’;n}nexports.isBool = isBool;n/**n * is primitive functionn * @param valn */nfunction isFn(val) {n return typeof val === ‘function’;n}nexports.isFn = isFn;n/**n * is empty string/array or null or undefinedn * @param valn */nfunction isEmpty(val) {n if (exports.isArray(val) || isStr(val)) {n return !val.length;n }n else if (isNil(val)) {n return true;n }n return false;n}nexports.isEmpty = isEmpty;n/**n * alias to Array.isArrayn */nexports.isArray = Array.isArray;nexports.Is = {n isArray: exports.isArray,n isNum: isNum,n isObj: isObj,n isStr: isStr,n isNull: isNull,n isUndefined: isUndefined,n isNil: isNil,n isBool: isBool,n isEmpty: isEmpty,n isFn: isFn,n};n//# sourceMappingURL=is.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/is.jsn// module id = 98n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/is.js? »)},function(module,exports){eval(‘ »use strict »;nObject.defineProperty(exports, « __esModule », { value: true });n/**n * 用一个范围生成数组n * @param startn * @param endn * @param stepn * @param optionsn * @examplen * range(1, 3) // => [1,2,3]n */nfunction range(start, end, step, _a) {n if (step === void 0) { step = 1; }n var _b = (_a === void 0 ? {} : _a).includeEnd, includeEnd = _b === void 0 ? true : _b;n var result = [];n for (var i = start; includeEnd ? i FooBarn * foo-bar => fooBarn * –foo–bar => FooBarn * __foo__bar => FooBarn * @param namen */nfunction camelCase(name) {n var camelPattern = /[-_\s]+([a-zA-Z])/gi;n return namen .replace(camelPattern, function (_, c) { return c.toUpperCase(); });n}nexports.camelCase = camelCase;n/**n * 把单词变成首字母大写其余字母小写的形式n * @param strn */nfunction capitalize(str) {n return str[0].toUpperCase() + str.slice(1).toLowerCase();n}nexports.capitalize = capitalize;n//# sourceMappingURL=words.js.mapnn//////////////////n// WEBPACK FOOTERn// ./~/fe-utils/lib/lang/words.jsn// module id = 100n// module chunks = 0n//# sourceURL=webpack:///./~/fe-utils/lib/lang/words.js?’)},function(module,exports){eval(« exports.read = function (buffer, offset, isLE, mLen, nBytes) {n var e, mn var eLen = (nBytes * 8) – mLen – 1n var eMax = (1 > 1n var nBits = -7n var i = isLE ? (nBytes – 1) : 0n var d = isLE ? -1 : 1n var s = buffer[offset + i]nn i += dnn e = s & ((1 >= (-nBits)n nBits += eLenn for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}nn m = e & ((1 >= (-nBits)n nBits += mLenn for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}nn if (e === 0) {n e = 1 – eBiasn } else if (e === eMax) {n return m ? NaN : ((s ? -1 : 1) * Infinity)n } else {n m = m + Math.pow(2, mLen)n e = e – eBiasn }n return (s ? -1 : 1) * m * Math.pow(2, e – mLen)n}nnexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {n var e, m, cn var eLen = (nBytes * 8) – mLen – 1n var eMax = (1 > 1n var rt = (mLen === 23 ? Math.pow(2, -24) – Math.pow(2, -77) : 0)n var i = isLE ? 0 : (nBytes – 1)n var d = isLE ? 1 : -1n var s = value = 1) {n value += rt / cn } else {n value += rt * Math.pow(2, 1 – eBias)n }n if (value * c >= 2) {n e++n c /= 2n }nn if (e + eBias >= eMax) {n m = 0n e = eMaxn } else if (e + eBias >= 1) {n m = ((value * c) – 1) * Math.pow(2, mLen)n e = e + eBiasn } else {n m = value * Math.pow(2, eBias – 1) * Math.pow(2, mLen)n e = 0n }n }nn for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}nn e = (e 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}nn buffer[offset + i – d] |= s * 128n}nnn//////////////////n// WEBPACK FOOTERn// ./~/ieee754/index.jsn// module id = 101n// module chunks = 0n//# sourceURL=webpack:///./~/ieee754/index.js? »)},function(module,exports,__webpack_require__){eval(« /*!n * is-plain-object n *n * Copyright (c) 2014-2017, Jon Schlinkert.n * Released under the MIT License.n */nn’use strict’;nnvar isObject = __webpack_require__(104);nnfunction isObjectObject(o) {n return isObject(o) === truen && Object.prototype.toString.call(o) === ‘[object Object]’;n}nnmodule.exports = function isPlainObject(o) {n var ctor,prot;nn if (isObjectObject(o) === false) return false;nn // If has modified constructorn ctor = o.constructor;n if (typeof ctor !== ‘function’) return false;nn // If has modified prototypen prot = ctor.prototype;n if (isObjectObject(prot) === false) return false;nn // If constructor does not have an Object-specific methodn if (prot.hasOwnProperty(‘isPrototypeOf’) === false) {n return false;n }nn // Most likely a plain Objectn return true;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/is-plain-object/index.jsn// module id = 102n// module chunks = 0n//# sourceURL=webpack:///./~/is-plain-object/index.js? »)},function(module,exports){eval(« var toString = {}.toString;nnmodule.exports = Array.isArray || function (arr) {n return toString.call(arr) == ‘[object Array]’;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/isarray/index.jsn// module id = 103n// module chunks = 0n//# sourceURL=webpack:///./~/isarray/index.js? »)},function(module,exports){eval(« /*!n * isobject n *n * Copyright (c) 2014-2017, Jon Schlinkert.n * Released under the MIT License.n */nn’use strict’;nnmodule.exports = function isObject(val) {n return val != null && typeof val === ‘object’ && Array.isArray(val) === false;n};nnn//////////////////n// WEBPACK FOOTERn// ./~/isobject/index.jsn// module id = 104n// module chunks = 0n//# sourceURL=webpack:///./~/isobject/index.js? »)},function(module,exports,__webpack_require__){eval(« /**n * Copyright (c) 2013-present, Facebook, Inc.n *n * This source code is licensed under the MIT license found in then * LICENSE file in the root directory of this source tree.n */nn’use strict’;nnvar ReactIs = __webpack_require__(41);nvar assign = __webpack_require__(23);nnvar ReactPropTypesSecret = __webpack_require__(40);nvar checkPropTypes = __webpack_require__(25);nnvar has = Function.call.bind(Object.prototype.hasOwnProperty);nvar printWarning = function() {};nnif (true) {n printWarning = function(text) {n var message = ‘Warning: ‘ + text;n if (typeof console !== ‘undefined’) {n console.error(message);n }n try {n // — Welcome to debugging React —n // This error was thrown as a convenience so that you can use this stackn // to find the callsite that caused this warning to fire.n throw new Error(message);n } catch (x) {}n };n}nnfunction emptyFunctionThatReturnsNull() {n return null;n}nnmodule.exports = function(isValidElement, throwOnDirectAccess) {n /* global Symbol */n var ITERATOR_SYMBOL = typeof Symbol === ‘function’ && Symbol.iterator;n var FAUX_ITERATOR_SYMBOL = ‘@@iterator’; // Before Symbol spec.nn /**n * Returns the iterator method function contained on the iterable object.n *n * Be sure to invoke the function with the iterable as context:n *n * var iteratorFn = getIteratorFn(myIterable);n * if (iteratorFn) {n * var iterator = iteratorFn.call(myIterable);n * …n * }n *n * @param {?object} maybeIterablen * @return {?function}n */n function getIteratorFn(maybeIterable) {n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);n if (typeof iteratorFn === ‘function’) {n return iteratorFn;n }n }nn /**n * Collection of methods that allow declaration and validation of props that aren * supplied to React components. Example usage:n *n * var Props = require(‘ReactPropTypes’);n * var MyArticle = React.createClass({n * propTypes: {n * // An optional string prop named « description ».n * description: Props.string,n *n * // A required enum prop named « category ».n * category: Props.oneOf([‘News’,’Photos’]).isRequired,n *n * // A prop named « dialog » that requires an instance of Dialog.n * dialog: Props.instanceOf(Dialog).isRequiredn * },n * render: function() { … }n * });n *n * A more formal specification of how these methods are used:n *n * type := array|bool|func|object|number|string|oneOf([…])|instanceOf(…)n * decl := ReactPropTypes.{type}(.isRequired)?n *n * Each and every declaration produces a function with the same signature. Thisn * allows the creation of custom validation functions. For example:n *n * var MyLink = React.createClass({n * propTypes: {n * // An optional string or URI prop named « href ».n * href: function(props, propName, componentName) {n * var propValue = props[propName];n * if (propValue != null && typeof propValue !== ‘string’ &&n * !(propValue instanceof URI)) {n * return new Error(n * ‘Expected a string or an URI for ‘ + propName + ‘ in ‘ +n * componentNamen * );n * }n * }n * },n * render: function() {…}n * });n *n * @internaln */nn var ANONYMOUS = ‘>’;nn // Important!n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.n var ReactPropTypes = {n array: createPrimitiveTypeChecker(‘array’),n bool: createPrimitiveTypeChecker(‘boolean’),n func: createPrimitiveTypeChecker(‘function’),n number: createPrimitiveTypeChecker(‘number’),n object: createPrimitiveTypeChecker(‘object’),n string: createPrimitiveTypeChecker(‘string’),n symbol: createPrimitiveTypeChecker(‘symbol’),nn any: createAnyTypeChecker(),n arrayOf: createArrayOfTypeChecker,n element: createElementTypeChecker(),n elementType: createElementTypeTypeChecker(),n instanceOf: createInstanceTypeChecker,n node: createNodeChecker(),n objectOf: createObjectOfTypeChecker,n oneOf: createEnumTypeChecker,n oneOfType: createUnionTypeChecker,n shape: createShapeTypeChecker,n exact: createStrictShapeTypeChecker,n };nn /**n * inlined Object.is polyfill to avoid requiring consumers ship their ownn * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isn */n /*eslint-disable no-self-compare*/n function is(x, y) {n // SameValue algorithmn if (x === y) {n // Steps 1-5, 7-10n // Steps 6.b-6.e: +0 != -0n return x !== 0 || 1 / x === 1 / y;n } else {n // Step 6.a: NaN == NaNn return x !== x && y !== y;n }n }n /*eslint-enable no-self-compare*/nn /**n * We use an Error-like object for backward compatibility as people may calln * PropTypes directly and inspect their output. However, we don’t use realn * Errors anymore. We don’t inspect their stack anyway, and creating themn * is prohibitively expensive if they are created too often, such as whatn * happens in oneOfType() for any type before the one that matched.n */n function PropTypeError(message) {n this.message = message;n this.stack =  »;n }n // Make `instanceof Error` still work for returned errors.n PropTypeError.prototype = Error.prototype;nn function createChainableTypeChecker(validate) {n if (true) {n var manualPropTypeCallCache = {};n var manualPropTypeWarningCount = 0;n }n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {n componentName = componentName || ANONYMOUS;n propFullName = propFullName || propName;nn if (secret !== ReactPropTypesSecret) {n if (throwOnDirectAccess) {n // New behavior only for users of `prop-types` packagen var err = new Error(n ‘Calling PropTypes validators directly is not supported by the `prop-types` package. ‘ +n ‘Use `PropTypes.checkPropTypes()` to call them. ‘ +n ‘Read more at http://fb.me/use-check-prop-types’n );n err.name = ‘Invariant Violation’;n throw err;n } else if ((« process.env.NODE_ENV ») !== ‘production’ && typeof console !== ‘undefined’) {n // Old behavior for people using React.PropTypesn var cacheKey = componentName + ‘:’ + propName;n if (n !manualPropTypeCallCache[cacheKey] &&n // Avoid spamming the console because they are often not actionable except for lib authorsn manualPropTypeWarningCount 1) {n printWarning(n ‘Invalid arguments supplied to oneOf, expected an array, got ‘ + arguments.length + ‘ arguments. ‘ +n ‘A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).’n );n } else {n printWarning(‘Invalid argument supplied to oneOf, expected an array.’);n }n }n return emptyFunctionThatReturnsNull;n }nn function validate(props, propName, componentName, location, propFullName) {n var propValue = props[propName];n for (var i = 0; i 1 ? _len – 1 : 0), _key = 1; _key 1 ? _len2 – 1 : 0), _key2 = 1; _key2 0 && typeof args[args.length – 1] === ‘string’ && args[args.length – 1].indexOf(‘\n in’) === 0;nn if (!hasExistingStack) {n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;n var stack = ReactDebugCurrentFrame.getStackAddendum();nn if (stack !==  ») {n format += ‘%s’;n args = args.concat([stack]);n }n }nn var argsWithFormat = args.map(function (item) {n return  » + item;n }); // Careful: RN currently depends on this prefixnn argsWithFormat.unshift(‘Warning: ‘ + format); // We intentionally don’t use spread (or .apply) directly because itn // breaks IE9: https://github.com/facebook/react/issues/13610n // eslint-disable-next-line react-internal/no-production-loggingnn Function.prototype.apply.call(console[level], console, argsWithFormat);nn try {n // — Welcome to debugging React —n // This error was thrown as a convenience so that you can use this stackn // to find the callsite that caused this warning to fire.n var argIndex = 0;n var message = ‘Warning: ‘ + format.replace(/%s/g, function () {n return args[argIndex++];n });n throw new Error(message);n } catch (x) {}n }n}nnif (!React) {n {n throw Error( « ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM. » );n }n}nnvar invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {n var funcArgs = Array.prototype.slice.call(arguments, 3);nn try {n func.apply(context, funcArgs);n } catch (error) {n this.onError(error);n }n};nn{n // In DEV mode, we swap out invokeGuardedCallback for a special versionn // that plays more nicely with the browser’s DevTools. The idea is to preserven // « Pause on exceptions » behavior. Because React wraps all user-providedn // functions in invokeGuardedCallback, and the production version ofn // invokeGuardedCallback uses a try-catch, all user exceptions are treatedn // like caught exceptions, and the DevTools won’t pause unless the developern // takes the extra step of enabling pause on caught exceptions. This isn // unintuitive, though, because even though React has caught the error, fromn // the developer’s perspective, the error is uncaught.n //n // To preserve the expected « Pause on exceptions » behavior, we don’t use an // try-catch in DEV. Instead, we synchronously dispatch a fake event to a faken // DOM node, and call the user-provided callback from inside an event handlern // for that fake event. If the callback throws, the error is « captured » usingn // a global event handler. But because the error happens in a differentn // event loop context, it does not interrupt the normal program flow.n // Effectively, this gives us try-catch behavior without actually usingn // try-catch. Neat!n // Check that the browser supports the APIs we need to implement our specialn // DEV version of invokeGuardedCallbackn if (typeof window !== ‘undefined’ && typeof window.dispatchEvent === ‘function’ && typeof document !== ‘undefined’ && typeof document.createEvent === ‘function’) {n var fakeNode = document.createElement(‘react’);nn var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {n // If document doesn’t exist we know for sure we will crash in this methodn // when we call document.createEvent(). However this can cause confusingn // errors: https://github.com/facebookincubator/create-react-app/issues/3482n // So we preemptively throw with a better message instead.n if (!(typeof document !== ‘undefined’)) {n {n throw Error( « The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous. » );n }n }nn var evt = document.createEvent(‘Event’); // Keeps track of whether the user-provided callback threw an error. Wen // set this to true at the beginning, then set it to false right aftern // calling the function. If the function errors, `didError` will never ben // set to false. This strategy works even if the browser is flaky andn // fails to call our global error handler, because it doesn’t rely onn // the error event at all.nn var didError = true; // Keeps track of the value of window.event so that we can reset itn // during the callback to let user code access window.event in then // browsers that support it.nn var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after eventn // dispatching: https://github.com/facebook/react/issues/13688nn var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, ‘event’); // Create an event handler for our fake event. We will synchronouslyn // dispatch our fake event using `dispatchEvent`. Inside the handler, wen // call the user-provided callback.nn var funcArgs = Array.prototype.slice.call(arguments, 3);nn function callCallback() {n // We immediately remove the callback from event listeners so thatn // nested `invokeGuardedCallback` calls do not clash. Otherwise, an // nested call would trigger the fake event handlers of any call highern // in the stack.n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty(‘event’) to prevent then // window.event assignment in both IE -1)) {n {n throw Error( « EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, ` » + pluginName + « `. » );n }n }nn if (plugins[pluginIndex]) {n continue;n }nn if (!pluginModule.extractEvents) {n {n throw Error( « EventPluginRegistry: Event plugins must implement an `extractEvents` method, but ` » + pluginName + « ` does not. » );n }n }nn plugins[pluginIndex] = pluginModule;n var publishedEvents = pluginModule.eventTypes;nn for (var eventName in publishedEvents) {n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {n {n throw Error( « EventPluginRegistry: Failed to publish event ` » + eventName + « ` for plugin ` » + pluginName + « `. » );n }n }n }n }n}n/**n * Publishes an event so that it can be dispatched by the supplied plugin.n *n * @param {object} dispatchConfig Dispatch configuration for the event.n * @param {object} PluginModule Plugin publishing the event.n * @return {boolean} True if the event was successfully published.n * @privaten */nnnfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {n if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {n {n throw Error( « EventPluginRegistry: More than one plugin attempted to publish the same event name, ` » + eventName + « `. » );n }n }nn eventNameDispatchConfigs[eventName] = dispatchConfig;n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;nn if (phasedRegistrationNames) {n for (var phaseName in phasedRegistrationNames) {n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {n var phasedRegistrationName = phasedRegistrationNames[phaseName];n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);n }n }nn return true;n } else if (dispatchConfig.registrationName) {n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);n return true;n }nn return false;n}n/**n * Publishes a registration name that is used to identify dispatched events.n *n * @param {string} registrationName Registration name to add.n * @param {object} PluginModule Plugin publishing the event.n * @privaten */nnnfunction publishRegistrationName(registrationName, pluginModule, eventName) {n if (!!registrationNameModules[registrationName]) {n {n throw Error( « EventPluginRegistry: More than one plugin attempted to publish the same registration name, ` » + registrationName + « `. » );n }n }nn registrationNameModules[registrationName] = pluginModule;n registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;nn {n var lowerCasedName = registrationName.toLowerCase();n possibleRegistrationNames[lowerCasedName] = registrationName;nn if (registrationName === ‘onDoubleClick’) {n possibleRegistrationNames.ondblclick = registrationName;n }n }n}n/**n * Registers plugins so that they can extract and dispatch events.n */nn/**n * Ordered list of injected plugins.n */nnnvar plugins = [];n/**n * Mapping from event name to dispatch confign */nnvar eventNameDispatchConfigs = {};n/**n * Mapping from registration name to plugin modulen */nnvar registrationNameModules = {};n/**n * Mapping from registration name to event namen */nnvar registrationNameDependencies = {};n/**n * Mapping from lowercase registration names to the properly cased version,n * used to warn in the case of missing event handlers. Availablen * only in true.n * @type {Object}n */nnvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in truenn/**n * Injects an ordering of plugins (by plugin name). This allows the orderingn * to be decoupled from injection of the actual plugins so that ordering isn * always deterministic regardless of packaging, on-the-fly injection, etc.n *n * @param {array} InjectedEventPluginOrdern * @internaln */nnfunction injectEventPluginOrder(injectedEventPluginOrder) {n if (!!eventPluginOrder) {n {n throw Error( « EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React. » );n }n } // Clone the ordering so it cannot be dynamically mutated.nnn eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);n recomputePluginOrdering();n}n/**n * Injects plugins to be used by plugin event system. The plugin names must ben * in the ordering injected by `injectEventPluginOrder`.n *n * Plugins can be injected as part of page initialization or on-the-fly.n *n * @param {object} injectedNamesToPlugins Map from names to plugin modules.n * @internaln */nnfunction injectEventPluginsByName(injectedNamesToPlugins) {n var isOrderingDirty = false;nn for (var pluginName in injectedNamesToPlugins) {n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {n continue;n }nn var pluginModule = injectedNamesToPlugins[pluginName];nn if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {n if (!!namesToPlugins[pluginName]) {n {n throw Error( « EventPluginRegistry: Cannot inject two different event plugins using the same name, ` » + pluginName + « `. » );n }n }nn namesToPlugins[pluginName] = pluginModule;n isOrderingDirty = true;n }n }nn if (isOrderingDirty) {n recomputePluginOrdering();n }n}nnvar canUseDOM = !!(typeof window !== ‘undefined’ && typeof window.document !== ‘undefined’ && typeof window.document.createElement !== ‘undefined’);nnvar PLUGIN_EVENT_SYSTEM = 1;nvar IS_REPLAYED = 1 2 && (name[0] === ‘o’ || name[0] === ‘O’) && (name[1] === ‘n’ || name[1] === ‘N’)) {n return true;n }nn return false;n}nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {n if (propertyInfo !== null && propertyInfo.type === RESERVED) {n return false;n }nn switch (typeof value) {n case ‘function’: // $FlowIssue symbol is perfectly valid herenn case ‘symbol’:n // eslint-disable-linen return true;nn case ‘boolean’:n {n if (isCustomComponentTag) {n return false;n }nn if (propertyInfo !== null) {n return !propertyInfo.acceptsBooleans;n } else {n var prefix = name.toLowerCase().slice(0, 5);n return prefix !== ‘data-‘ && prefix !== ‘aria-‘;n }n }nn default:n return false;n }n}nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {n if (value === null || typeof value === ‘undefined’) {n return true;n }nn if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {n return true;n }nn if (isCustomComponentTag) {n return false;n }nn if (propertyInfo !== null) {n switch (propertyInfo.type) {n case BOOLEAN:n return !value;nn case OVERLOADED_BOOLEAN:n return value === false;nn case NUMERIC:n return isNaN(value);nn case POSITIVE_NUMERIC:n return isNaN(value) || value import(‘./MyComponent’)) », moduleObject);n }n }nn lazyComponent._status = Resolved;n lazyComponent._result = defaultExport;n }n }, function (error) {n if (lazyComponent._status === Pending) {n lazyComponent._status = Rejected;n lazyComponent._result = error;n }n });n }n}nnfunction getWrappedName(outerType, innerType, wrapperName) {n var functionName = innerType.displayName || innerType.name ||  »;n return outerType.displayName || (functionName !==  » ? wrapperName + « ( » + functionName + « ) » : wrapperName);n}nnfunction getComponentName(type) {n if (type == null) {n // Host root, text node or just invalid type.n return null;n }nn {n if (typeof type.tag === ‘number’) {n error(‘Received an unexpected object in getComponentName(). ‘ + ‘This is likely a bug in React. Please file an issue.’);n }n }nn if (typeof type === ‘function’) {n return type.displayName || type.name || null;n }nn if (typeof type === ‘string’) {n return type;n }nn switch (type) {n case REACT_FRAGMENT_TYPE:n return ‘Fragment’;nn case REACT_PORTAL_TYPE:n return ‘Portal’;nn case REACT_PROFILER_TYPE:n return « Profiler »;nn case REACT_STRICT_MODE_TYPE:n return ‘StrictMode’;nn case REACT_SUSPENSE_TYPE:n return ‘Suspense’;nn case REACT_SUSPENSE_LIST_TYPE:n return ‘SuspenseList’;n }nn if (typeof type === ‘object’) {n switch (type.$$typeof) {n case REACT_CONTEXT_TYPE:n return ‘Context.Consumer’;nn case REACT_PROVIDER_TYPE:n return ‘Context.Provider’;nn case REACT_FORWARD_REF_TYPE:n return getWrappedName(type, type.render, ‘ForwardRef’);nn case REACT_MEMO_TYPE:n return getComponentName(type.type);nn case REACT_BLOCK_TYPE:n return getComponentName(type.render);nn case REACT_LAZY_TYPE:n {n var thenable = type;n var resolvedThenable = refineResolvedLazyComponent(thenable);nn if (resolvedThenable) {n return getComponentName(resolvedThenable);n }nn break;n }n }n }nn return null;n}nnvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;nnfunction describeFiber(fiber) {n switch (fiber.tag) {n case HostRoot:n case HostPortal:n case HostText:n case Fragment:n case ContextProvider:n case ContextConsumer:n return  »;nn default:n var owner = fiber._debugOwner;n var source = fiber._debugSource;n var name = getComponentName(fiber.type);n var ownerName = null;nn if (owner) {n ownerName = getComponentName(owner.type);n }nn return describeComponentFrame(name, source, ownerName);n }n}nnfunction getStackByFiberInDevAndProd(workInProgress) {n var info =  »;n var node = workInProgress;nn do {n info += describeFiber(node);n node = node.return;n } while (node);nn return info;n}nvar current = null;nvar isRendering = false;nfunction getCurrentFiberOwnerNameInDevOrNull() {n {n if (current === null) {n return null;n }nn var owner = current._debugOwner;nn if (owner !== null && typeof owner !== ‘undefined’) {n return getComponentName(owner.type);n }n }nn return null;n}nfunction getCurrentFiberStackInDev() {n {n if (current === null) {n return  »;n } // Safe because if current fiber exists, we are reconciling,n // and it is guaranteed to be the work-in-progress version.nnn return getStackByFiberInDevAndProd(current);n }n}nfunction resetCurrentFiber() {n {n ReactDebugCurrentFrame$1.getCurrentStack = null;n current = null;n isRendering = false;n }n}nfunction setCurrentFiber(fiber) {n {n ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;n current = fiber;n isRendering = false;n }n}nfunction setIsRendering(rendering) {n {n isRendering = rendering;n }n}nn// Flow does not allow string concatenation of most non-string types. To workn// around this limitation, we use an opaque type that can only be obtained byn// passing the value through getToStringValue first.nfunction toString(value) {n return  » + value;n}nfunction getToStringValue(value) {n switch (typeof value) {n case ‘boolean’:n case ‘number’:n case ‘object’:n case ‘string’:n case ‘undefined’:n return value;nn default:n // function, symbol are assigned as empty stringsn return  »;n }n}nnvar ReactDebugCurrentFrame$2 = null;nvar ReactControlledValuePropTypes = {n checkPropTypes: nulln};nn{n ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;n var hasReadOnlyValue = {n button: true,n checkbox: true,n image: true,n hidden: true,n radio: true,n reset: true,n submit: truen };n var propTypes = {n value: function (props, propName, componentName) {n if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {n return null;n }nn return new Error(‘You provided a `value` prop to a form field without an ‘ + ‘`onChange` handler. This will render a read-only field. If ‘ + ‘the field should be mutable use `defaultValue`. Otherwise, ‘ + ‘set either `onChange` or `readOnly`.’);n },n checked: function (props, propName, componentName) {n if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {n return null;n }nn return new Error(‘You provided a `checked` prop to a form field without an ‘ + ‘`onChange` handler. This will render a read-only field. If ‘ + ‘the field should be mutable use `defaultChecked`. Otherwise, ‘ + ‘set either `onChange` or `readOnly`.’);n }n };n /**n * Provide a linked `value` attribute for controlled forms. You should not usen * this outside of the ReactDOM controlled form components.n */nn ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {n checkPropTypes(propTypes, props, ‘prop’, tagName, ReactDebugCurrentFrame$2.getStackAddendum);n };n}nnfunction isCheckable(elem) {n var type = elem.type;n var nodeName = elem.nodeName;n return nodeName && nodeName.toLowerCase() === ‘input’ && (type === ‘checkbox’ || type === ‘radio’);n}nnfunction getTracker(node) {n return node._valueTracker;n}nnfunction detachTracker(node) {n node._valueTracker = null;n}nnfunction getValueFromNode(node) {n var value =  »;nn if (!node) {n return value;n }nn if (isCheckable(node)) {n value = node.checked ? ‘true’ : ‘false’;n } else {n value = node.value;n }nn return value;n}nnfunction trackValueOnNode(node) {n var valueField = isCheckable(node) ? ‘checked’ : ‘value’;n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);n var currentValue =  » + node[valueField]; // if someone has already defined a value or Safari, then bailn // and don’t track value will cause over reporting of changes,n // but it’s better then a hard failuren // (needed for certain tests that spyOn input values and Safari)nn if (node.hasOwnProperty(valueField) || typeof descriptor === ‘undefined’ || typeof descriptor.get !== ‘function’ || typeof descriptor.set !== ‘function’) {n return;n }nn var get = descriptor.get,n set = descriptor.set;n Object.defineProperty(node, valueField, {n configurable: true,n get: function () {n return get.call(this);n },n set: function (value) {n currentValue =  » + value;n set.call(this, value);n }n }); // We could’ve passed this the first timen // but it triggers a bug in IE11 and Edge 14/15.n // Calling defineProperty() again should be equivalent.n // https://github.com/facebook/react/issues/11768nn Object.defineProperty(node, valueField, {n enumerable: descriptor.enumerablen });n var tracker = {n getValue: function () {n return currentValue;n },n setValue: function (value) {n currentValue =  » + value;n },n stopTracking: function () {n detachTracker(node);n delete node[valueField];n }n };n return tracker;n}nnfunction track(node) {n if (getTracker(node)) {n return;n } // TODO: Once it’s just Fiber we can move this to node._wrapperStatennn node._valueTracker = trackValueOnNode(node);n}nfunction updateValueIfChanged(node) {n if (!node) {n return false;n }nn var tracker = getTracker(node); // if there is no tracker at this point it’s unlikelyn // that trying again will succeednn if (!tracker) {n return true;n }nn var lastValue = tracker.getValue();n var nextValue = getValueFromNode(node);nn if (nextValue !== lastValue) {n tracker.setValue(nextValue);n return true;n }nn return false;n}nnvar didWarnValueDefaultValue = false;nvar didWarnCheckedDefaultChecked = false;nvar didWarnControlledToUncontrolled = false;nvar didWarnUncontrolledToControlled = false;nnfunction isControlled(props) {n var usesChecked = props.type === ‘checkbox’ || props.type === ‘radio’;n return usesChecked ? props.checked != null : props.value != null;n}n/**n * Implements an host component that allows setting these optionaln * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.n *n * If `checked` or `value` are not supplied (or null/undefined), user actionsn * that affect the checked state or value will trigger updates to the element.n *n * If they are supplied (and not null/undefined), the rendered element will notn * trigger updates to the element. Instead, the props must change in order forn * the rendered element to be updated.n *n * The rendered element will be initialized as unchecked (or `defaultChecked`)n * with an empty value (or `defaultValue`).n *n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.htmln */nnnfunction getHostProps(element, props) {n var node = element;n var checked = props.checked;nn var hostProps = _assign({}, props, {n defaultChecked: undefined,n defaultValue: undefined,n value: undefined,n checked: checked != null ? checked : node._wrapperState.initialCheckedn });nn return hostProps;n}nfunction initWrapperState(element, props) {n {n ReactControlledValuePropTypes.checkPropTypes(‘input’, props);nn if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {n error(‘%s contains an input of type %s with both checked and defaultChecked props. ‘ + ‘Input elements must be either controlled or uncontrolled ‘ + ‘(specify either the checked prop, or the defaultChecked prop, but not ‘ + ‘both). Decide between using a controlled or uncontrolled input ‘ + ‘element and remove one of these props. More info: ‘ + ‘https://fb.me/react-controlled-components’, getCurrentFiberOwnerNameInDevOrNull() || ‘A component’, props.type);nn didWarnCheckedDefaultChecked = true;n }nn if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {n error(‘%s contains an input of type %s with both value and defaultValue props. ‘ + ‘Input elements must be either controlled or uncontrolled ‘ + ‘(specify either the value prop, or the defaultValue prop, but not ‘ + ‘both). Decide between using a controlled or uncontrolled input ‘ + ‘element and remove one of these props. More info: ‘ + ‘https://fb.me/react-controlled-components’, getCurrentFiberOwnerNameInDevOrNull() || ‘A component’, props.type);nn didWarnValueDefaultValue = true;n }n }nn var node = element;n var defaultValue = props.defaultValue == null ?  » : props.defaultValue;n node._wrapperState = {n initialChecked: props.checked != null ? props.checked : props.defaultChecked,n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),n controlled: isControlled(props)n };n}nfunction updateChecked(element, props) {n var node = element;n var checked = props.checked;nn if (checked != null) {n setValueForProperty(node, ‘checked’, checked, false);n }n}nfunction updateWrapper(element, props) {n var node = element;nn {n var controlled = isControlled(props);nn if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {n error(‘A component is changing an uncontrolled input of type %s to be controlled. ‘ + ‘Input elements should not switch from uncontrolled to controlled (or vice versa). ‘ + ‘Decide between using a controlled or uncontrolled input ‘ + ‘element for the lifetime of the component. More info: https://fb.me/react-controlled-components’, props.type);nn didWarnUncontrolledToControlled = true;n }nn if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {n error(‘A component is changing a controlled input of type %s to be uncontrolled. ‘ + ‘Input elements should not switch from controlled to uncontrolled (or vice versa). ‘ + ‘Decide between using a controlled or uncontrolled input ‘ + ‘element for the lifetime of the component. More info: https://fb.me/react-controlled-components’, props.type);nn didWarnControlledToUncontrolled = true;n }n }nn updateChecked(element, props);n var value = getToStringValue(props.value);n var type = props.type;nn if (value != null) {n if (type === ‘number’) {n if (value === 0 && node.value ===  » || // We explicitly want to coerce to number here if possible.n // eslint-disable-next-linen node.value != value) {n node.value = toString(value);n }n } else if (node.value !== toString(value)) {n node.value = toString(value);n }n } else if (type === ‘submit’ || type === ‘reset’) {n // Submit/reset inputs need the attribute removed completely to avoidn // blank-text buttons.n node.removeAttribute(‘value’);n return;n }nn {n // When syncing the value attribute, the value comes from a cascade ofn // properties:n // 1. The value React propertyn // 2. The defaultValue React propertyn // 3. Otherwise there should be no changen if (props.hasOwnProperty(‘value’)) {n setDefaultValue(node, props.type, value);n } else if (props.hasOwnProperty(‘defaultValue’)) {n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));n }n }nn {n // When syncing the checked attribute, it only changes when it needsn // to be removed, such as transitioning from a checkbox into a text inputn if (props.checked == null && props.defaultChecked != null) {n node.defaultChecked = !!props.defaultChecked;n }n }n}nfunction postMountWrapper(element, props, isHydrating) {n var node = element; // Do not assign value if it is already set. This prevents user text inputn // from being lost during SSR hydration.nn if (props.hasOwnProperty(‘value’) || props.hasOwnProperty(‘defaultValue’)) {n var type = props.type;n var isButton = type === ‘submit’ || type === ‘reset’; // Avoid setting value attribute on submit/reset inputs as it overrides then // default value provided by the browser. See: #12872nn if (isButton && (props.value === undefined || props.value === null)) {n return;n }nn var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text inputn // from being lost during SSR hydration.nn if (!isHydrating) {n {n // When syncing the value attribute, the value property should usen // the wrapperState._initialValue property. This uses:n //n // 1. The value React property when presentn // 2. The defaultValue React property when presentn // 3. An empty stringn if (initialValue !== node.value) {n node.value = initialValue;n }n }n }nn {n // Otherwise, the value attribute is synchronized to the property,n // so we assign defaultValue to the same thing as the value propertyn // assignment step above.n node.defaultValue = initialValue;n }n } // Normally, we’d just do `node.checked = node.checked` upon initial mount, less this bugn // this is needed to work around a chrome bug where setting defaultCheckedn // will sometimes influence the value of checked (even after detachment).n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416n // We need to temporarily unset name to avoid disrupting radio button groups.nnn var name = node.name;nn if (name !==  ») {n node.name =  »;n }nn {n // When syncing the checked attribute, both the checked property andn // attribute are assigned at the same time using defaultChecked. This uses:n //n // 1. The checked React property when presentn // 2. The defaultChecked React property when presentn // 3. Otherwise, falsen node.defaultChecked = !node.defaultChecked;n node.defaultChecked = !!node._wrapperState.initialChecked;n }nn if (name !==  ») {n node.name = name;n }n}nfunction restoreControlledState(element, props) {n var node = element;n updateWrapper(node, props);n updateNamedCousins(node, props);n}nnfunction updateNamedCousins(rootNode, props) {n var name = props.name;nn if (props.type === ‘radio’ && name != null) {n var queryRoot = rootNode;nn while (queryRoot.parentNode) {n queryRoot = queryRoot.parentNode;n } // If `rootNode.form` was non-null, then we could try `form.elements`,n // but that sometimes behaves strangely in IE8. We could also try usingn // `form.getElementsByName`, but that will only return direct childrenn // and won’t include inputs that use the HTML5 `form=` attribute. Sincen // the input might not even be in a form. It might not even be in then // document. Let’s just use the local `querySelectorAll` to ensure we don’tn // miss anything.nnn var group = queryRoot.querySelectorAll(‘input[name=’ + JSON.stringify( » + name) + ‘][type= »radio »]’);nn for (var i = 0; i is not a valid email address ».n//n// Here we check to see if the defaultValue has actually changed, avoiding these problemsn// when the user is inputting textn//n// https://github.com/facebook/react/issues/7253nnnfunction setDefaultValue(node, type, value) {n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.jsn type !== ‘number’ || node.ownerDocument.activeElement !== node) {n if (value == null) {n node.defaultValue = toString(node._wrapperState.initialValue);n } else if (node.defaultValue !== toString(value)) {n node.defaultValue = toString(value);n }n }n}nnvar didWarnSelectedSetOnOption = false;nvar didWarnInvalidChild = false;nnfunction flattenChildren(children) {n var content =  »; // Flatten children. We’ll warn if they are invalidn // during validateProps() which runs for hydration too.n // Note that this would throw on non-element objects.n // Elements are stringified (which is normally irrelevantn // but matters for ).nn React.Children.forEach(children, function (child) {n if (child == null) {n return;n }nn content += child; // Note: we don’t warn about invalid children here.n // Instead, this is done separately below so thatn // it happens during the hydration codepath too.n });n return content;n}n/**n * Implements an host component that warns when `selected` is set.n */nnnfunction validateProps(element, props) {n {n // This mirrors the codepath above, but runs for hydration too.n // Warn about invalid children here so that client and hydration are consistent.n // TODO: this seems like it could cause a DEV-only throw for hydrationn // if children contains a non-element object. We should try to avoid that.n if (typeof props.children === ‘object’ && props.children !== null) {n React.Children.forEach(props.children, function (child) {n if (child == null) {n return;n }nn if (typeof child === ‘string’ || typeof child === ‘number’) {n return;n }nn if (typeof child.type !== ‘string’) {n return;n }nn if (!didWarnInvalidChild) {n didWarnInvalidChild = true;nn error(‘Only strings and numbers are supported as
children.’);n }n });n } // TODO: Remove support for `selected` in
.nnn if (props.selected != null && !didWarnSelectedSetOnOption) {n error(‘Use the `defaultValue` or `value` props on instead of ‘ + ‘setting `selected` on .’);nn didWarnSelectedSetOnOption = true;n }n }n}nfunction postMountWrapper$1(element, props) {n // value= » » should make a value attribute (#6219)n if (props.value != null) {n element.setAttribute(‘value’, toString(getToStringValue(props.value)));n }n}nfunction getHostProps$1(element, props) {n var hostProps = _assign({n children: undefinedn }, props);nn var content = flattenChildren(props.children);nn if (content) {n hostProps.children = content;n }nn return hostProps;n}nnvar didWarnValueDefaultValue$1;nn{n didWarnValueDefaultValue$1 = false;n}nnfunction getDeclarationErrorAddendum() {n var ownerName = getCurrentFiberOwnerNameInDevOrNull();nn if (ownerName) {n return ‘\n\nCheck the render method of `’ + ownerName + ‘`.’;n }nn return  »;n}nnvar valuePropNames = [‘value’, ‘defaultValue’];n/**n * Validation function for `value` and `defaultValue`.n */nnfunction checkSelectPropTypes(props) {n {n ReactControlledValuePropTypes.checkPropTypes(‘select’, props);nn for (var i = 0; i must be an array if ‘ + ‘`multiple` is true.%s’, propName, getDeclarationErrorAddendum());n } else if (!props.multiple && isArray) {n error(‘The `%s` prop supplied to must be a scalar ‘ + ‘value if `multiple` is false.%s’, propName, getDeclarationErrorAddendum());n }n }n }n}nnfunction updateOptions(node, multiple, propValue, setDefaultSelected) {n var options = node.options;nn if (multiple) {n var selectedValues = propValue;n var selectedValue = {};nn for (var i = 0; i host component that allows optionally setting then * props `value` and `defaultValue`. If `multiple` is false, the prop must be an * stringable. If `multiple` is true, the prop must be an array of stringables.n *n * If `value` is not supplied (or null/undefined), user actions that change then * selected option will trigger updates to the rendered options.n *n * If it is supplied (and not null/undefined), the rendered options will notn * update in response to user actions. Instead, the `value` prop must change inn * order for the rendered options to update.n *n * If `defaultValue` is provided, any options with the supplied values will ben * selected.n */nnnfunction getHostProps$2(element, props) {n return _assign({}, props, {n value: undefinedn });n}nfunction initWrapperState$1(element, props) {n var node = element;nn {n checkSelectPropTypes(props);n }nn node._wrapperState = {n wasMultiple: !!props.multiplen };nn {n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {n error(‘Select elements must be either controlled or uncontrolled ‘ + ‘(specify either the value prop, or the defaultValue prop, but not ‘ + ‘both). Decide between using a controlled or uncontrolled select ‘ + ‘element and remove one of these props. More info: ‘ + ‘https://fb.me/react-controlled-components’);nn didWarnValueDefaultValue$1 = true;n }n }n}nfunction postMountWrapper$2(element, props) {n var node = element;n node.multiple = !!props.multiple;n var value = props.value;nn if (value != null) {n updateOptions(node, !!props.multiple, value, false);n } else if (props.defaultValue != null) {n updateOptions(node, !!props.multiple, props.defaultValue, true);n }n}nfunction postUpdateWrapper(element, props) {n var node = element;n var wasMultiple = node._wrapperState.wasMultiple;n node._wrapperState.wasMultiple = !!props.multiple;n var value = props.value;nn if (value != null) {n updateOptions(node, !!props.multiple, value, false);n } else if (wasMultiple !== !!props.multiple) {n // For simplicity, reapply `defaultValue` if `multiple` is toggled.n if (props.defaultValue != null) {n updateOptions(node, !!props.multiple, props.defaultValue, true);n } else {n // Revert the select back to its default unselected state.n updateOptions(node, !!props.multiple, props.multiple ? [] :  », false);n }n }n}nfunction restoreControlledState$1(element, props) {n var node = element;n var value = props.value;nn if (value != null) {n updateOptions(node, !!props.multiple, value, false);n }n}nnvar didWarnValDefaultVal = false;nn/**n * Implements a

is invalid but we don’t warnn // because it still parses correctly; we do warn for other cases like nestedn //

tags where the beginning of the second element implicitly closes then // first, causing a confusing mess.n // https://html.spec.whatwg.org/multipage/syntax.html#specialn var specialTags = [‘address’, ‘applet’, ‘area’, ‘article’, ‘aside’, ‘base’, ‘basefont’, ‘bgsound’, ‘blockquote’, ‘body’, ‘br’, ‘button’, ‘caption’, ‘center’, ‘col’, ‘colgroup’, ‘dd’, ‘details’, ‘dir’, ‘div’, ‘dl’, ‘dt’, ’embed’, ‘fieldset’, ‘figcaption’, ‘figure’, ‘footer’, ‘form’, ‘frame’, ‘frameset’, ‘h1’, ‘h2’, ‘h3’, ‘h4’, ‘h5’, ‘h6’, ‘head’, ‘header’, ‘hgroup’, ‘hr’, ‘html’, ‘iframe’, ‘img’, ‘input’, ‘isindex’, ‘li’, ‘link’, ‘listing’, ‘main’, ‘marquee’, ‘menu’, ‘menuitem’, ‘meta’, ‘nav’, ‘noembed’, ‘noframes’, ‘noscript’, ‘object’, ‘ol’, ‘p’, ‘param’, ‘plaintext’, ‘pre’, ‘script’, ‘section’, ‘select’, ‘source’, ‘style’, ‘summary’, ‘table’, ‘tbody’, ‘td’, ‘template’, ‘textarea’, ‘tfoot’, ‘th’, ‘thead’, ‘title’, ‘tr’, ‘track’, ‘ul’, ‘wbr’, ‘xmp’]; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scopenn var inScopeTags = [‘applet’, ‘caption’, ‘html’, ‘table’, ‘td’, ‘th’, ‘marquee’, ‘object’, ‘template’, // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-pointn // TODO: Distinguish by namespace here — for

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

web-breaking-news will use the information you provide on this form to be in touch with you and to provide updates and marketing.