goj/document/Online Judge 是如何解决判题端安全性问题的? - 知乎_files/main_006.js
2021-08-24 10:03:45 +08:00

47 lines
1.6 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[44],Array(837).concat([function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return s}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create;function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function s(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}Object.create},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:V(e)}function r(e){return c(e)?e:q(e)}function o(e){return s(e)?e:H(e)}function a(e){return i(e)&&!l(e)?e:K(e)}function i(e){return!(!e||!e[d])}function c(e){return!(!e||!e[f])}function s(e){return!(!e||!e[p])}function l(e){return c(e)||s(e)}function u(e){return!(!e||!e[h])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=c,n.isIndexed=s,n.isAssociative=l,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=a;var d="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",b={},m={value:!1},v={value:!1};function g(e){return e.value=!1,e}function y(e){e&&(e.value=!0)}function O(){}function j(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function w(e){return void 0===e.size&&(e.size=e.__iterate(k)),e.size}function C(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?w(e)+t:t}function k(){return!0}function x(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function S(e,t){return R(e,t,0)}function E(e,t){return R(e,t,t)}function R(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var T,A,N,_="function"==typeof Symbol&&Symbol.iterator,I=_||"@@iterator";function M(e){this.next=e}function L(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function P(){return{value:void 0,done:!0}}function B(e){return!!F(e)}function z(e){return e&&"function"==typeof e.next}function D(e){var t=F(e);return t&&t.call(e)}function F(e){var t=e&&(_&&e[_]||e["@@iterator"]);if("function"==typeof t)return t}function U(e){return e&&"number"==typeof e.length}function V(e){return null==e?X():i(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new W(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function q(e){return null==e?X().toKeyedSeq():i(e)?c(e)?e.toSeq():e.fromEntrySeq():J(e)}function H(e){return null==e?X():i(e)?c(e)?e.entrySeq():e.toIndexedSeq():$(e)}function K(e){return(null==e?X():i(e)?c(e)?e.entrySeq():e:$(e)).toSetSeq()}function Q(e){this._array=e,this.size=e.length}function W(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function G(e){this._iterable=e,this.size=e.length||e.size}function Y(e){this._iterator=e,this._iteratorCache=[]}function Z(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function X(){return T||(T=new Q([]))}function J(e){var t=Array.isArray(e)?new Q(e).fromEntrySeq():z(e)?new Y(e).fromEntrySeq():B(e)?new G(e).fromEntrySeq():"object"==typeof e?new W(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function $(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return U(e)?new Q(e):z(e)?new Y(e):B(e)?new G(e):void 0}function te(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var c=o[n?a-i:i];if(!1===t(c[1],r?c[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new M((function(){var e=o[n?a-i:i];return i++>a?{value:void 0,done:!0}:L(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,H(n).map((function(r,o){return e(t,r,o,n)}))):ae(n)?t.call(o,r,q(n).map((function(r,o){return e(t,r,o,n)}))):n}(t,e,"",{"":e}):oe(e)}function oe(e){return Array.isArray(e)?H(e).map(oe).toList():ae(e)?q(e).map(oe).toMap():e}function ae(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ie(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ce(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||c(e)!==c(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ie(o[1],e)&&(n||ie(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var d=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):o?!ie(t,e.get(r,b)):!ie(e.get(r,b),t))return d=!1,!1}));return d&&e.size===f}function se(e,t){if(!(this instanceof se))return new se(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(A)return A;A=this}}function le(e,t){if(!e)throw new Error(t)}function ue(e,t,n){if(!(this instanceof ue))return new ue(e,t,n);if(le(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(N)return N;N=this}}function de(){throw TypeError("Abstract")}function fe(){}function pe(){}function he(){}M.prototype.toString=function(){return"[Iterator]"},M.KEYS=0,M.VALUES=1,M.ENTRIES=2,M.prototype.inspect=M.prototype.toSource=function(){return this.toString()},M.prototype[I]=function(){return this},t(V,n),V.of=function(){return V(arguments)},V.prototype.toSeq=function(){return this},V.prototype.toString=function(){return this.__toString("Seq {","}")},V.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},V.prototype.__iterate=function(e,t){return te(this,e,t,!0)},V.prototype.__iterator=function(e,t){return ne(this,e,t,!0)},t(q,V),q.prototype.toKeyedSeq=function(){return this},t(H,V),H.of=function(){return H(arguments)},H.prototype.toIndexedSeq=function(){return this},H.prototype.toString=function(){return this.__toString("Seq [","]")},H.prototype.__iterate=function(e,t){return te(this,e,t,!1)},H.prototype.__iterator=function(e,t){return ne(this,e,t,!1)},t(K,V),K.of=function(){return K(arguments)},K.prototype.toSetSeq=function(){return this},V.isSeq=Z,V.Keyed=q,V.Set=K,V.Indexed=H,V.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,t(Q,H),Q.prototype.get=function(e,t){return this.has(e)?this._array[C(this,e)]:t},Q.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},Q.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new M((function(){return o>r?{value:void 0,done:!0}:L(e,o,n[t?r-o++:o++])}))},t(W,q),W.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},W.prototype.has=function(e){return this._object.hasOwnProperty(e)},W.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},W.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new M((function(){var i=r[t?o-a:a];return a++>o?{value:void 0,done:!0}:L(e,i,n[i])}))},W.prototype[h]=!0,t(G,H),G.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=D(this._iterable),r=0;if(z(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},G.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=D(this._iterable);if(!z(n))return new M(P);var r=0;return new M((function(){var t=n.next();return t.done?t:L(e,r++,t.value)}))},t(Y,H),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a<o.length;)if(!1===e(o[a],a++,this))return a;for(;!(n=r.next()).done;){var i=n.value;if(o[a]=i,!1===e(i,a++,this))break}return a},Y.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new M((function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return L(e,o,r[o++])}))},t(se,H),se.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},se.prototype.get=function(e,t){return this.has(e)?this._value:t},se.prototype.includes=function(e){return ie(this._value,e)},se.prototype.slice=function(e,t){var n=this.size;return x(e,t,n)?this:new se(this._value,E(t,n)-S(e,n))},se.prototype.reverse=function(){return this},se.prototype.indexOf=function(e){return ie(this._value,e)?0:-1},se.prototype.lastIndexOf=function(e){return ie(this._value,e)?this.size:-1},se.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},se.prototype.__iterator=function(e,t){var n=this,r=0;return new M((function(){return r<n.size?L(e,r++,n._value):{value:void 0,done:!0}}))},se.prototype.equals=function(e){return e instanceof se?ie(this._value,e._value):ce(e)},t(ue,H),ue.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},ue.prototype.get=function(e,t){return this.has(e)?this._start+C(this,e)*this._step:t},ue.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},ue.prototype.slice=function(e,t){return x(e,t,this.size)?this:(e=S(e,this.size),(t=E(t,this.size))<=e?new ue(0,0):new ue(this.get(e,this._end),this.get(t,this._end),this._step))},ue.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},ue.prototype.lastIndexOf=function(e){return this.indexOf(e)},ue.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;a<=n;a++){if(!1===e(o,a,this))return a+1;o+=t?-r:r}return a},ue.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;return new M((function(){var i=o;return o+=t?-r:r,a>n?{value:void 0,done:!0}:L(e,a++,i)}))},ue.prototype.equals=function(e){return e instanceof ue?this._start===e._start&&this._end===e._end&&this._step===e._step:ce(this,e)},t(de,n),t(fe,de),t(pe,de),t(he,de),de.Keyed=fe,de.Indexed=pe,de.Set=he;var be="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function me(e){return e>>>1&1073741824|3221225471&e}function ve(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return me(n)}if("string"===t)return e.length>xe?function(e){var t=Re[e];return void 0===t&&(t=ge(e),Ee===Se&&(Ee=0,Re={}),Ee++,Re[e]=t),t}(e):ge(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(we&&void 0!==(t=ye.get(e)))return t;if(void 0!==(t=e[ke]))return t;if(!je){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[ke]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Ce,1073741824&Ce&&(Ce=0),we)ye.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(je)Object.defineProperty(e,ke,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[ke]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[ke]=t}}return t}(e);if("function"==typeof e.toString)return ge(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ge(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return me(t)}var ye,Oe=Object.isExtensible,je=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),we="function"==typeof WeakMap;we&&(ye=new WeakMap);var Ce=0,ke="__immutablehash__";"function"==typeof Symbol&&(ke=Symbol(ke));var xe=16,Se=255,Ee=0,Re={};function Te(e){le(e!==1/0,"Cannot perform this action with an infinite size.")}function Ae(e){return null==e?He():Ne(e)&&!u(e)?e:He().withMutations((function(t){var n=r(e);Te(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ne(e){return!(!e||!e[Ie])}t(Ae,fe),Ae.prototype.toString=function(){return this.__toString("Map {","}")},Ae.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ae.prototype.set=function(e,t){return Ke(this,e,t)},Ae.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},Ae.prototype.remove=function(e){return Ke(this,e,b)},Ae.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},Ae.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ae.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var a=t===b,i=n.next();if(i.done){var c=a?r:t,s=o(c);return s===c?t:s}le(a||t&&t.set,"invalid keyPath");var l=i.value,u=a?b:t.get(l,b),d=e(u,n,r,o);return d===u?t:d===b?t.remove(l):(a?He():t).set(l,d)}(this,Yt(e),t,n);return r===b?void 0:r},Ae.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):He()},Ae.prototype.merge=function(){return Ye(this,void 0,arguments)},Ae.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Ye(this,t,n)},Ae.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,He(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Ae.prototype.mergeDeep=function(){return Ye(this,Ze,arguments)},Ae.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ye(this,Xe(t),n)},Ae.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,He(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Ae.prototype.sort=function(e){return jt(zt(this,e))},Ae.prototype.sortBy=function(e,t){return jt(zt(this,t,e))},Ae.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ae.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new O)},Ae.prototype.asImmutable=function(){return this.__ensureOwner()},Ae.prototype.wasAltered=function(){return this.__altered},Ae.prototype.__iterator=function(e,t){return new Fe(this,e,t)},Ae.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Ae.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ae.isMap=Ne;var _e,Ie="@@__IMMUTABLE_MAP__@@",Me=Ae.prototype;function Le(e,t){this.ownerID=e,this.entries=t}function Pe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Be(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ze(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function De(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Fe(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Ve(e._root)}function Ue(e,t){return L(e,t[0],t[1])}function Ve(e,t){return{node:e,index:0,__prev:t}}function qe(e,t,n,r){var o=Object.create(Me);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function He(){return _e||(_e=qe(0))}function Ke(e,t,n){var r,o;if(e._root){var a=g(m),i=g(v);if(r=Qe(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===b?-1:1:0)}else{if(n===b)return e;o=1,r=new Le(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?qe(o,r):He()}function Qe(e,t,n,r,o,a,i,c){return e?e.update(t,n,r,o,a,i,c):a===b?e:(y(c),y(i),new De(t,r,[o,a]))}function We(e){return e.constructor===De||e.constructor===ze}function Ge(e,t,n,r,o){if(e.keyHash===r)return new ze(t,r,[e.entry,o]);var a,i=31&(0===n?e.keyHash:e.keyHash>>>n),c=31&(0===n?r:r>>>n);return new Pe(t,1<<i|1<<c,i===c?[Ge(e,t,n+5,r,o)]:(a=new De(t,r,o),i<c?[e,a]:[a,e]))}function Ye(e,t,n){for(var o=[],a=0;a<n.length;a++){var c=n[a],s=r(c);i(c)||(s=s.map((function(e){return re(e)}))),o.push(s)}return Je(e,t,o)}function Ze(e,t,n){return e&&e.mergeDeep&&i(t)?e.mergeDeep(t):ie(e,t)?e:t}function Xe(e){return function(t,n,r){if(t&&t.mergeDeepWith&&i(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return ie(t,o)?t:o}}function Je(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,b,(function(e){return e===b?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)})):e.constructor(n[0])}function $e(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var o=r?e:j(e);return o[t]=n,o}Me[Ie]=!0,Me.delete=Me.remove,Me.removeIn=Me.deleteIn,Le.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(ie(n,o[a][0]))return o[a][1];return r},Le.prototype.update=function(e,t,n,r,o,a,i){for(var c=o===b,s=this.entries,l=0,u=s.length;l<u&&!ie(r,s[l][0]);l++);var d=l<u;if(d?s[l][1]===o:c)return this;if(y(i),(c||!d)&&y(a),!c||1!==s.length){if(!d&&!c&&s.length>=tt)return function(e,t,n,r){e||(e=new O);for(var o=new De(e,ve(n),[n,r]),a=0;a<t.length;a++){var i=t[a];o=o.update(e,0,void 0,i[0],i[1])}return o}(e,s,r,o);var f=e&&e===this.ownerID,p=f?s:j(s);return d?c?l===u-1?p.pop():p[l]=p.pop():p[l]=[r,o]:p.push([r,o]),f?(this.entries=p,this):new Le(e,p)}},Pe.prototype.get=function(e,t,n,r){void 0===t&&(t=ve(n));var o=1<<(31&(0===e?t:t>>>e)),a=this.bitmap;return 0==(a&o)?r:this.nodes[$e(a&o-1)].get(e+5,t,n,r)},Pe.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=ve(r));var c=31&(0===t?n:n>>>t),s=1<<c,l=this.bitmap,u=0!=(l&s);if(!u&&o===b)return this;var d=$e(l&s-1),f=this.nodes,p=u?f[d]:void 0,h=Qe(p,e,t+5,n,r,o,a,i);if(h===p)return this;if(!u&&h&&f.length>=nt)return function(e,t,n,r,o){for(var a=0,i=new Array(32),c=0;0!==n;c++,n>>>=1)i[c]=1&n?t[a++]:void 0;return i[r]=o,new Be(e,a+1,i)}(e,f,l,c,h);if(u&&!h&&2===f.length&&We(f[1^d]))return f[1^d];if(u&&h&&1===f.length&&We(h))return h;var m=e&&e===this.ownerID,v=u?h?l:l^s:l|s,g=u?h?et(f,d,h,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),a=0,i=0;i<r;i++)i===t&&(a=1),o[i]=e[i+a];return o}(f,d,m):function(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,c=0;c<o;c++)c===t?(a[c]=n,i=-1):a[c]=e[c+i];return a}(f,d,h,m);return m?(this.bitmap=v,this.nodes=g,this):new Pe(e,v,g)},Be.prototype.get=function(e,t,n,r){void 0===t&&(t=ve(n));var o=31&(0===e?t:t>>>e),a=this.nodes[o];return a?a.get(e+5,t,n,r):r},Be.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=ve(r));var c=31&(0===t?n:n>>>t),s=o===b,l=this.nodes,u=l[c];if(s&&!u)return this;var d=Qe(u,e,t+5,n,r,o,a,i);if(d===u)return this;var f=this.count;if(u){if(!d&&--f<rt)return function(e,t,n,r){for(var o=0,a=0,i=new Array(n),c=0,s=1,l=t.length;c<l;c++,s<<=1){var u=t[c];void 0!==u&&c!==r&&(o|=s,i[a++]=u)}return new Pe(e,o,i)}(e,l,f,c)}else f++;var p=e&&e===this.ownerID,h=et(l,c,d,p);return p?(this.count=f,this.nodes=h,this):new Be(e,f,h)},ze.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(ie(n,o[a][0]))return o[a][1];return r},ze.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=ve(r));var c=o===b;if(n!==this.keyHash)return c?this:(y(i),y(a),Ge(this,e,t,n,[r,o]));for(var s=this.entries,l=0,u=s.length;l<u&&!ie(r,s[l][0]);l++);var d=l<u;if(d?s[l][1]===o:c)return this;if(y(i),(c||!d)&&y(a),c&&2===u)return new De(e,this.keyHash,s[1^l]);var f=e&&e===this.ownerID,p=f?s:j(s);return d?c?l===u-1?p.pop():p[l]=p.pop():p[l]=[r,o]:p.push([r,o]),f?(this.entries=p,this):new ze(e,this.keyHash,p)},De.prototype.get=function(e,t,n,r){return ie(n,this.entry[0])?this.entry[1]:r},De.prototype.update=function(e,t,n,r,o,a,i){var c=o===b,s=ie(r,this.entry[0]);return(s?o===this.entry[1]:c)?this:(y(i),c?void y(a):s?e&&e===this.ownerID?(this.entry[1]=o,this):new De(e,this.keyHash,[r,o]):(y(a),Ge(this,e,t,ve(r),[r,o])))},Le.prototype.iterate=ze.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Pe.prototype.iterate=Be.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var a=n[t?o-r:r];if(a&&!1===a.iterate(e,t))return!1}},De.prototype.iterate=function(e,t){return e(this.entry)},t(Fe,M),Fe.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return Ue(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return Ue(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var a=r.nodes[this._reverse?n-o:o];if(a){if(a.entry)return Ue(e,a.entry);t=this._stack=Ve(a,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var tt=8,nt=16,rt=8;function ot(e){var t=ht();if(null==e)return t;if(at(e))return e;var n=o(e),r=n.size;return 0===r?t:(Te(r),r>0&&r<32?pt(0,r,5,null,new st(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function at(e){return!(!e||!e[it])}t(ot,pe),ot.of=function(){return this(arguments)},ot.prototype.toString=function(){return this.__toString("List [","]")},ot.prototype.get=function(e,t){if((e=C(this,e))>=0&&e<this.size){var n=vt(this,e+=this._origin);return n&&n.array[31&e]}return t},ot.prototype.set=function(e,t){return function(e,t,n){if((t=C(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?gt(e,t).set(0,n):gt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=g(v);return t>=Ot(e._capacity)?r=bt(r,e.__ownerID,0,t,n,a):o=bt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},ot.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ot.prototype.insert=function(e,t){return this.splice(e,0,t)},ot.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ht()},ot.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){gt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},ot.prototype.pop=function(){return gt(this,0,-1)},ot.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){gt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},ot.prototype.shift=function(){return gt(this,1)},ot.prototype.merge=function(){return yt(this,void 0,arguments)},ot.prototype.mergeWith=function(t){var n=e.call(arguments,1);return yt(this,t,n)},ot.prototype.mergeDeep=function(){return yt(this,Ze,arguments)},ot.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return yt(this,Xe(t),n)},ot.prototype.setSize=function(e){return gt(this,0,e)},ot.prototype.slice=function(e,t){var n=this.size;return x(e,t,n)?this:gt(this,S(e,n),E(t,n))},ot.prototype.__iterator=function(e,t){var n=0,r=ft(this,t);return new M((function(){var t=r();return t===dt?{value:void 0,done:!0}:L(e,n++,t)}))},ot.prototype.__iterate=function(e,t){for(var n,r=0,o=ft(this,t);(n=o())!==dt&&!1!==e(n,r++,this););return r},ot.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?pt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},ot.isList=at;var it="@@__IMMUTABLE_LIST__@@",ct=ot.prototype;function st(e,t){this.array=e,this.ownerID=t}ct[it]=!0,ct.delete=ct.remove,ct.setIn=Me.setIn,ct.deleteIn=ct.removeIn=Me.removeIn,ct.update=Me.update,ct.updateIn=Me.updateIn,ct.mergeIn=Me.mergeIn,ct.mergeDeepIn=Me.mergeDeepIn,ct.withMutations=Me.withMutations,ct.asMutable=Me.asMutable,ct.asImmutable=Me.asImmutable,ct.wasAltered=Me.wasAltered,st.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&31;if(r>=this.array.length)return new st([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-5,n))===i&&a)return this}if(a&&!o)return this;var c=mt(this,e);if(!a)for(var s=0;s<r;s++)c.array[s]=void 0;return o&&(c.array[r]=o),c},st.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&31;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-5,n))===a&&o===this.array.length-1)return this}var i=mt(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var lt,ut,dt={};function ft(e,t){var n=e._origin,r=e._capacity,o=Ot(r),a=e._tail;return i(e._root,e._level,0);function i(e,c,s){return 0===c?function(e,i){var c=i===o?a&&a.array:e&&e.array,s=i>n?0:n-i,l=r-i;return l>32&&(l=32),function(){if(s===l)return dt;var e=t?--l:s++;return c&&c[e]}}(e,s):function(e,o,a){var c,s=e&&e.array,l=a>n?0:n-a>>o,u=1+(r-a>>o);return u>32&&(u=32),function(){for(;;){if(c){var e=c();if(e!==dt)return e;c=null}if(l===u)return dt;var n=t?--u:l++;c=i(s&&s[n],o-5,a+(n<<o))}}}(e,c,s)}}function pt(e,t,n,r,o,a,i){var c=Object.create(ct);return c.size=t-e,c._origin=e,c._capacity=t,c._level=n,c._root=r,c._tail=o,c.__ownerID=a,c.__hash=i,c.__altered=!1,c}function ht(){return lt||(lt=pt(0,0,5))}function bt(e,t,n,r,o,a){var i,c=r>>>n&31,s=e&&c<e.array.length;if(!s&&void 0===o)return e;if(n>0){var l=e&&e.array[c],u=bt(l,t,n-5,r,o,a);return u===l?e:((i=mt(e,t)).array[c]=u,i)}return s&&e.array[c]===o?e:(y(a),i=mt(e,t),void 0===o&&c===i.array.length-1?i.array.pop():i.array[c]=o,i)}function mt(e,t){return t&&e&&t===e.ownerID?e:new st(e?e.array.slice():[],t)}function vt(e,t){if(t>=Ot(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&31],r-=5;return n}}function gt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new O,o=e._origin,a=e._capacity,i=o+t,c=void 0===n?a:n<0?a+n:o+n;if(i===o&&c===a)return e;if(i>=c)return e.clear();for(var s=e._level,l=e._root,u=0;i+u<0;)l=new st(l&&l.array.length?[void 0,l]:[],r),u+=1<<(s+=5);u&&(i+=u,o+=u,c+=u,a+=u);for(var d=Ot(a),f=Ot(c);f>=1<<s+5;)l=new st(l&&l.array.length?[l]:[],r),s+=5;var p=e._tail,h=f<d?vt(e,c-1):f>d?new st([],r):p;if(p&&f>d&&i<a&&p.array.length){for(var b=l=mt(l,r),m=s;m>5;m-=5){var v=d>>>m&31;b=b.array[v]=mt(b.array[v],r)}b.array[d>>>5&31]=p}if(c<a&&(h=h&&h.removeAfter(r,0,c)),i>=f)i-=f,c-=f,s=5,l=null,h=h&&h.removeBefore(r,0,i);else if(i>o||f<d){for(u=0;l;){var g=i>>>s&31;if(g!==f>>>s&31)break;g&&(u+=(1<<s)*g),s-=5,l=l.array[g]}l&&i>o&&(l=l.removeBefore(r,s,i-u)),l&&f<d&&(l=l.removeAfter(r,s,f-u)),u&&(i-=u,c-=u)}return e.__ownerID?(e.size=c-i,e._origin=i,e._capacity=c,e._level=s,e._root=l,e._tail=h,e.__hash=void 0,e.__altered=!0,e):pt(i,c,s,l,h)}function yt(e,t,n){for(var r=[],a=0,c=0;c<n.length;c++){var s=n[c],l=o(s);l.size>a&&(a=l.size),i(s)||(l=l.map((function(e){return re(e)}))),r.push(l)}return a>e.size&&(e=e.setSize(a)),Je(e,t,r)}function Ot(e){return e<32?0:e-1>>>5<<5}function jt(e){return null==e?kt():wt(e)?e:kt().withMutations((function(t){var n=r(e);Te(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function wt(e){return Ne(e)&&u(e)}function Ct(e,t,n,r){var o=Object.create(jt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function kt(){return ut||(ut=Ct(He(),ht()))}function xt(e,t,n){var r,o,a=e._map,i=e._list,c=a.get(t),s=void 0!==c;if(n===b){if(!s)return e;i.size>=32&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=c===i.size-1?i.pop():i.set(c,void 0))}else if(s){if(n===i.get(c)[1])return e;r=a,o=i.set(c,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Ct(r,o)}function St(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Et(e){this._iter=e,this.size=e.size}function Rt(e){this._iter=e,this.size=e.size}function Tt(e){this._iter=e,this.size=e.size}function At(e){var t=Qt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Wt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new M((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function Nt(e,t,n){var r=Qt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,b);return a===b?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(2,o);return new M((function(){var o=a.next();if(o.done)return o;var i=o.value,c=i[0];return L(r,c,t.call(n,i[1],c,e),o)}))},r}function _t(e,t){var n=Qt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=At(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Wt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function It(e,t,n,r){var o=Qt(e);return r&&(o.has=function(r){var o=e.get(r,b);return o!==b&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,b);return a!==b&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,c=0;return e.__iterate((function(e,a,s){if(t.call(n,e,a,s))return c++,o(e,r?a:c-1,i)}),a),c},o.__iteratorUncached=function(o,a){var i=e.__iterator(2,a),c=0;return new M((function(){for(;;){var a=i.next();if(a.done)return a;var s=a.value,l=s[0],u=s[1];if(t.call(n,u,l,e))return L(o,r?l:c++,u,a)}}))},o}function Mt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),x(t,n,o))return e;var a=S(t,o),i=E(n,o);if(a!=a||i!=i)return Mt(e.toSeq().cacheResult(),t,n,r);var c,s=i-a;s==s&&(c=s<0?0:s);var l=Qt(e);return l.size=0===c?c:e.size&&c||void 0,!r&&Z(e)&&c>=0&&(l.get=function(t,n){return(t=C(this,t))>=0&&t<c?e.get(t+a,n):n}),l.__iterateUncached=function(t,n){var o=this;if(0===c)return 0;if(n)return this.cacheResult().__iterate(t,n);var i=0,s=!0,l=0;return e.__iterate((function(e,n){if(!s||!(s=i++<a))return l++,!1!==t(e,r?n:l-1,o)&&l!==c})),l},l.__iteratorUncached=function(t,n){if(0!==c&&n)return this.cacheResult().__iterator(t,n);var o=0!==c&&e.__iterator(t,n),i=0,s=0;return new M((function(){for(;i++<a;)o.next();if(++s>c)return{value:void 0,done:!0};var e=o.next();return r||1===t?e:L(t,s-1,0===t?void 0:e.value[1],e)}))},l}function Lt(e,t,n,r){var o=Qt(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var c=!0,s=0;return e.__iterate((function(e,a,l){if(!c||!(c=t.call(n,e,a,l)))return s++,o(e,r?a:s-1,i)})),s},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var c=e.__iterator(2,a),s=!0,l=0;return new M((function(){var e,a,u;do{if((e=c.next()).done)return r||1===o?e:L(o,l++,0===o?void 0:e.value[1],e);var d=e.value;a=d[0],u=d[1],s&&(s=t.call(n,u,a,i))}while(s);return 2===o?e:L(o,a,u,e)}))},o}function Pt(e,t){var n=c(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?J(e):$(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&c(a)||s(e)&&s(a))return a}var l=new Q(o);return n?l=l.toKeyedSeq():s(e)||(l=l.toSetSeq()),(l=l.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),l}function Bt(e,t,n){var r=Qt(e);return r.__iterateUncached=function(r,o){var a=0,c=!1;return function e(s,l){var u=this;s.__iterate((function(o,s){return(!t||l<t)&&i(o)?e(o,l+1):!1===r(o,n?s:a++,u)&&(c=!0),!c}),o)}(e,0),a},r.__iteratorUncached=function(r,o){var a=e.__iterator(r,o),c=[],s=0;return new M((function(){for(;a;){var e=a.next();if(!1===e.done){var l=e.value;if(2===r&&(l=l[1]),t&&!(c.length<t)||!i(l))return n?e:L(r,s++,l,e);c.push(a),a=l.__iterator(r,o)}else a=c.pop()}return{value:void 0,done:!0}}))},r}function zt(e,t,n){t||(t=Gt);var r=c(e),o=0,a=e.toSeq().map((function(t,r){return[r,t,o++,n?n(t,r,e):t]})).toArray();return a.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?q(a):s(e)?H(a):K(a)}function Dt(e,t,n){if(t||(t=Gt),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return Ft(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return Ft(t,e,n)?n:e}))}function Ft(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function Ut(e,t,r){var o=Qt(e);return o.size=new Q(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),D(o?e.reverse():e)})),i=0,c=!1;return new M((function(){var n;return c||(n=a.map((function(e){return e.next()})),c=n.some((function(e){return e.done}))),c?{value:void 0,done:!0}:L(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function Vt(e,t){return Z(e)?t:e.constructor(t)}function qt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ht(e){return Te(e.size),w(e)}function Kt(e){return c(e)?r:s(e)?o:a}function Qt(e){return Object.create((c(e)?q:s(e)?H:K).prototype)}function Wt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function Gt(e,t){return e>t?1:e<t?-1:0}function Yt(e){var t=D(e);if(!t){if(!U(e))throw new TypeError("Expected iterable or array-like: "+e);t=D(n(e))}return t}function Zt(e,t){var n,r=function(a){if(a instanceof r)return a;if(!(this instanceof r))return new r(a);if(!n){n=!0;var i=Object.keys(e);!function(e,t){try{t.forEach(en.bind(void 0,e))}catch(e){}}(o,i),o.size=i.length,o._name=t,o._keys=i,o._defaultValues=e}this._map=Ae(a)},o=r.prototype=Object.create(Xt);return o.constructor=r,r}t(jt,Ae),jt.of=function(){return this(arguments)},jt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},jt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},jt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):kt()},jt.prototype.set=function(e,t){return xt(this,e,t)},jt.prototype.remove=function(e){return xt(this,e,b)},jt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},jt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},jt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},jt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ct(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},jt.isOrderedMap=wt,jt.prototype[h]=!0,jt.prototype.delete=jt.prototype.remove,t(St,q),St.prototype.get=function(e,t){return this._iter.get(e,t)},St.prototype.has=function(e){return this._iter.has(e)},St.prototype.valueSeq=function(){return this._iter.valueSeq()},St.prototype.reverse=function(){var e=this,t=_t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},St.prototype.map=function(e,t){var n=this,r=Nt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},St.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ht(this):0,function(o){return e(o,t?--n:n++,r)}),t)},St.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(1,t),r=t?Ht(this):0;return new M((function(){var o=n.next();return o.done?o:L(e,t?--r:r++,o.value,o)}))},St.prototype[h]=!0,t(Et,H),Et.prototype.includes=function(e){return this._iter.includes(e)},Et.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},Et.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t),r=0;return new M((function(){var t=n.next();return t.done?t:L(e,r++,t.value,t)}))},t(Rt,K),Rt.prototype.has=function(e){return this._iter.includes(e)},Rt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},Rt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new M((function(){var t=n.next();return t.done?t:L(e,t.value,t.value,t)}))},t(Tt,q),Tt.prototype.entrySeq=function(){return this._iter.toSeq()},Tt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){qt(t);var r=i(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Tt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new M((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){qt(r);var o=i(r);return L(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}}))},Et.prototype.cacheResult=St.prototype.cacheResult=Rt.prototype.cacheResult=Tt.prototype.cacheResult=Wt,t(Zt,fe),Zt.prototype.toString=function(){return this.__toString($t(this)+" {","}")},Zt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Zt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Zt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Jt(this,He()))},Zt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+$t(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Jt(this,n)},Zt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Jt(this,t)},Zt.prototype.wasAltered=function(){return this._map.wasAltered()},Zt.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},Zt.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},Zt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Jt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Xt=Zt.prototype;function Jt(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function $t(e){return e._name||e.constructor.name||"Record"}function en(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){le(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function tn(e){return null==e?ln():nn(e)&&!u(e)?e:ln().withMutations((function(t){var n=a(e);Te(n.size),n.forEach((function(e){return t.add(e)}))}))}function nn(e){return!(!e||!e[on])}Xt.delete=Xt.remove,Xt.deleteIn=Xt.removeIn=Me.removeIn,Xt.merge=Me.merge,Xt.mergeWith=Me.mergeWith,Xt.mergeIn=Me.mergeIn,Xt.mergeDeep=Me.mergeDeep,Xt.mergeDeepWith=Me.mergeDeepWith,Xt.mergeDeepIn=Me.mergeDeepIn,Xt.setIn=Me.setIn,Xt.update=Me.update,Xt.updateIn=Me.updateIn,Xt.withMutations=Me.withMutations,Xt.asMutable=Me.asMutable,Xt.asImmutable=Me.asImmutable,t(tn,he),tn.of=function(){return this(arguments)},tn.fromKeys=function(e){return this(r(e).keySeq())},tn.prototype.toString=function(){return this.__toString("Set {","}")},tn.prototype.has=function(e){return this._map.has(e)},tn.prototype.add=function(e){return cn(this,this._map.set(e,!0))},tn.prototype.remove=function(e){return cn(this,this._map.remove(e))},tn.prototype.clear=function(){return cn(this,this._map.clear())},tn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)a(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return a(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return a(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},tn.prototype.merge=function(){return this.union.apply(this,arguments)},tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},tn.prototype.sort=function(e){return un(zt(this,e))},tn.prototype.sortBy=function(e,t){return un(zt(this,t,e))},tn.prototype.wasAltered=function(){return this._map.wasAltered()},tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},tn.isSet=nn;var rn,on="@@__IMMUTABLE_SET__@@",an=tn.prototype;function cn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function sn(e,t){var n=Object.create(an);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function ln(){return rn||(rn=sn(He()))}function un(e){return null==e?bn():dn(e)?e:bn().withMutations((function(t){var n=a(e);Te(n.size),n.forEach((function(e){return t.add(e)}))}))}function dn(e){return nn(e)&&u(e)}an[on]=!0,an.delete=an.remove,an.mergeDeep=an.merge,an.mergeDeepWith=an.mergeWith,an.withMutations=Me.withMutations,an.asMutable=Me.asMutable,an.asImmutable=Me.asImmutable,an.__empty=ln,an.__make=sn,t(un,tn),un.of=function(){return this(arguments)},un.fromKeys=function(e){return this(r(e).keySeq())},un.prototype.toString=function(){return this.__toString("OrderedSet {","}")},un.isOrderedSet=dn;var fn,pn=un.prototype;function hn(e,t){var n=Object.create(pn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function bn(){return fn||(fn=hn(kt()))}function mn(e){return null==e?wn():vn(e)?e:wn().unshiftAll(e)}function vn(e){return!(!e||!e[yn])}pn[h]=!0,pn.__empty=bn,pn.__make=hn,t(mn,pe),mn.of=function(){return this(arguments)},mn.prototype.toString=function(){return this.__toString("Stack [","]")},mn.prototype.get=function(e,t){var n=this._head;for(e=C(this,e);n&&e--;)n=n.next;return n?n.value:t},mn.prototype.peek=function(){return this._head&&this._head.value},mn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):jn(e,t)},mn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Te(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):jn(t,n)},mn.prototype.pop=function(){return this.slice(1)},mn.prototype.unshift=function(){return this.push.apply(this,arguments)},mn.prototype.unshiftAll=function(e){return this.pushAll(e)},mn.prototype.shift=function(){return this.pop.apply(this,arguments)},mn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):wn()},mn.prototype.slice=function(e,t){if(x(e,t,this.size))return this;var n=S(e,this.size);if(E(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):jn(r,o)},mn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?jn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},mn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},mn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new M((function(){if(r){var t=r.value;return r=r.next,L(e,n++,t)}return{value:void 0,done:!0}}))},mn.isStack=vn;var gn,yn="@@__IMMUTABLE_STACK__@@",On=mn.prototype;function jn(e,t,n,r){var o=Object.create(On);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function wn(){return gn||(gn=jn(0))}function Cn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}On[yn]=!0,On.withMutations=Me.withMutations,On.asMutable=Me.asMutable,On.asImmutable=Me.asImmutable,On.wasAltered=Me.wasAltered,n.Iterator=M,Cn(n,{toArray:function(){Te(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Et(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new St(this,!0)},toMap:function(){return Ae(this.toKeyedSeq())},toObject:function(){Te(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return jt(this.toKeyedSeq())},toOrderedSet:function(){return un(c(this)?this.valueSeq():this)},toSet:function(){return tn(c(this)?this.valueSeq():this)},toSetSeq:function(){return new Rt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return mn(c(this)?this.valueSeq():this)},toList:function(){return ot(c(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Vt(this,Pt(this,t))},includes:function(e){return this.some((function(t){return ie(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Te(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return Vt(this,It(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,a){if(e.call(t,r,o,a))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Te(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Te(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return Vt(this,Nt(this,e,t))},reduce:function(e,t,n){var r,o;return Te(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Vt(this,_t(this,!0))},slice:function(e,t){return Vt(this,Mt(this,e,t,!0))},some:function(e,t){return!this.every(Rn(e),t)},sort:function(e){return Vt(this,zt(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return w(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Ae().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return ce(this,e)},entrySeq:function(){var e=this;if(e._cache)return new Q(e._cache);var t=e.toSeq().map(En).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Rn(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(k)},flatMap:function(e,t){return Vt(this,function(e,t,n){var r=Kt(e);return e.toSeq().map((function(o,a){return r(t.call(n,o,a,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return Vt(this,Bt(this,e,!0))},fromEntrySeq:function(){return new Tt(this)},get:function(e,t){return this.find((function(t,n){return ie(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=Yt(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,b):b)===b)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=c(e),o=(u(e)?jt():Ae()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=Kt(e);return o.map((function(t){return Vt(e,a(t))}))}(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(Sn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return Dt(this,e)},maxBy:function(e,t){return Dt(this,t,e)},min:function(e){return Dt(this,e?Tn(e):_n)},minBy:function(e,t){return Dt(this,t?Tn(t):_n,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Vt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Vt(this,Lt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Rn(e),t)},sortBy:function(e,t){return Vt(this,zt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Vt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Vt(this,function(e,t,n){var r=Qt(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,c){return t.call(n,e,o,c)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(2,o),c=!0;return new M((function(){if(!c)return{value:void 0,done:!0};var e=i.next();if(e.done)return e;var o=e.value,s=o[0],l=o[1];return t.call(n,l,s,a)?2===r?e:L(r,s,l,e):(c=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Rn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=u(e),n=c(e),r=t?1:0;return function(e,t){return t=be(t,3432918353),t=be(t<<15|t>>>-15,461845907),t=be(t<<13|t>>>-13,5),t=be((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=me((t=be(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+In(ve(e),ve(t))|0}:function(e,t){r=r+In(ve(e),ve(t))|0}:t?function(e){r=31*r+ve(e)|0}:function(e){r=r+ve(e)|0}),r)}(this))}});var kn=n.prototype;kn[d]=!0,kn[I]=kn.values,kn.__toJS=kn.toArray,kn.__toStringMapper=An,kn.inspect=kn.toSource=function(){return this.toString()},kn.chain=kn.flatMap,kn.contains=kn.includes,function(){try{Object.defineProperty(kn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),Cn(r,{flip:function(){return Vt(this,At(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ie(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ie(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return Vt(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Vt(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var xn=r.prototype;function Sn(e,t){return t}function En(e,t){return[t,e]}function Rn(e){return function(){return!e.apply(this,arguments)}}function Tn(e){return function(){return-e.apply(this,arguments)}}function An(e){return"string"==typeof e?JSON.stringify(e):e}function Nn(){return j(arguments)}function _n(e,t){return e<t?1:e>t?-1:0}function In(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return xn[f]=!0,xn[I]=kn.entries,xn.__toJS=kn.toObject,xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+An(e)},Cn(o,{toKeyedSeq:function(){return new St(this,!1)},filter:function(e,t){return Vt(this,It(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return Vt(this,_t(this,!1))},slice:function(e,t){return Vt(this,Mt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=S(e,e<0?this.count():this.size);var r=this.slice(0,e);return Vt(this,1===n?r:r.concat(j(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return Vt(this,Bt(this,e,!1))},get:function(e,t){return(e=C(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=C(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Vt(this,function(e,t){var n=Qt(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,a=0;return e.__iterate((function(e,r){return(!a||!1!==n(t,a++,o))&&!1!==n(e,a++,o)}),r),a},n.__iteratorUncached=function(n,r){var o,a=e.__iterator(1,r),i=0;return new M((function(){return(!o||i%2)&&(o=a.next()).done?o:i%2?L(n,i++,t):L(n,i++,o.value,o)}))},n}(this,e))},interleave:function(){var e=[this].concat(j(arguments)),t=Ut(this.toSeq(),H.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Vt(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Vt(this,Lt(this,e,t,!1))},zip:function(){var e=[this].concat(j(arguments));return Vt(this,Ut(this,Nn,e))},zipWith:function(e){var t=j(arguments);return t[0]=this,Vt(this,Ut(this,e,t))}}),o.prototype[p]=!0,o.prototype[h]=!0,Cn(a,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),a.prototype.has=kn.includes,Cn(q,r.prototype),Cn(H,o.prototype),Cn(K,a.prototype),Cn(fe,r.prototype),Cn(pe,o.prototype),Cn(he,a.prototype),{Iterable:n,Seq:V,Collection:de,Map:Ae,OrderedMap:jt,List:ot,Stack:mn,Set:tn,OrderedSet:un,Record:Zt,Range:ue,Repeat:se,is:ie,fromJS:re}}()},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,c){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,c],u=0;(s=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var o=n(1036),a=n(963),i=n(1196),c=n(838),s=n(874),l=c.OrderedSet,u=c.Record,d=c.Stack,f=u({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:d(),selection:null,treeMap:null,undoStack:d()}),p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._immutable=t}return e.createEmpty=function(t){return e.createWithContent(a.createFromText(""),t)},e.createWithContent=function(t,n){var r=t.getBlockMap().first().getKey();return e.create({currentContent:t,undoStack:d(),redoStack:d(),decorator:n||null,selection:s.createEmpty(r)})},e.create=function(t){var n=t.currentContent,o=t.decorator,a=r({},t,{treeMap:b(n,o),directionMap:i.getDirectionMap(n)});return new e(new f(a))},e.set=function(t,n){return new e(t.getImmutable().withMutations((function(e){var r=e.get("decorator"),a=r;null===n.decorator?a=null:n.decorator&&(a=n.decorator);var i=n.currentContent||t.getCurrentContent();if(a!==r){var c,s=e.get("treeMap");return c=a&&r?function(e,t,n,r,a){return n.merge(t.toSeq().filter((function(t){return r.getDecorations(t,e)!==a.getDecorations(t,e)})).map((function(t){return o.generate(e,t,r)})))}(i,i.getBlockMap(),s,a,r):b(i,a),void e.merge({decorator:a,treeMap:c,nativelyRenderedContent:null})}i!==t.getCurrentContent()&&e.set("treeMap",function(e,t,n,r){var a=e.getCurrentContent().set("entityMap",n),i=a.getBlockMap();return e.getImmutable().get("treeMap").merge(t.toSeq().filter((function(e,t){return e!==i.get(t)})).map((function(e){return o.generate(a,e,r)})))}(t,i.getBlockMap(),i.getEntityMap(),a)),e.merge(n)})))},e.prototype.toJS=function(){return this.getImmutable().toJS()},e.prototype.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},e.prototype.getCurrentContent=function(){return this.getImmutable().get("currentContent")},e.prototype.getUndoStack=function(){return this.getImmutable().get("undoStack")},e.prototype.getRedoStack=function(){return this.getImmutable().get("redoStack")},e.prototype.getSelection=function(){return this.getImmutable().get("selection")},e.prototype.getDecorator=function(){return this.getImmutable().get("decorator")},e.prototype.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},e.prototype.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},e.prototype.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},e.prototype.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},e.prototype.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},e.setInlineStyleOverride=function(t,n){return e.set(t,{inlineStyleOverride:n})},e.prototype.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);if(r>0)return o.getInlineStyleAt(r-1);if(o.getLength())return o.getInlineStyleAt(0);return m(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);if(r<o.getLength())return o.getInlineStyleAt(r);if(r>0)return o.getInlineStyleAt(r-1);return m(e,n)}(t,n)},e.prototype.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.prototype.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.prototype.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.prototype.getDirectionMap=function(){return this.getImmutable().get("directionMap")},e.acceptSelection=function(e,t){return h(e,t,!1)},e.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),h(e,t,!0)},e.moveSelectionToEnd=function(t){var n=t.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return e.acceptSelection(t,new s({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},e.moveFocusToEnd=function(t){var n=e.moveSelectionToEnd(t);return e.forceSelection(n,n.getSelection())},e.push=function(t,n,r){if(t.getCurrentContent()===n)return t;var o="insert-characters"!==r,a=i.getDirectionMap(n,t.getDirectionMap());if(!t.getAllowUndo())return e.set(t,{currentContent:n,directionMap:a,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var c=t.getSelection(),s=t.getCurrentContent(),l=t.getUndoStack(),u=n;c!==s.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(t,r)?(l=l.push(s),u=u.set("selectionBefore",c)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(u=u.set("selectionBefore",s.getSelectionBefore()));var f=t.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(f=null);var p={currentContent:u,directionMap:a,undoStack:l,redoStack:d(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:f};return e.set(t,p)},e.undo=function(t){if(!t.getAllowUndo())return t;var n=t.getUndoStack(),r=n.peek();if(!r)return t;var o=t.getCurrentContent(),a=i.getDirectionMap(r,t.getDirectionMap());return e.set(t,{currentContent:r,directionMap:a,undoStack:n.shift(),redoStack:t.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},e.redo=function(t){if(!t.getAllowUndo())return t;var n=t.getRedoStack(),r=n.peek();if(!r)return t;var o=t.getCurrentContent(),a=i.getDirectionMap(r,t.getDirectionMap());return e.set(t,{currentContent:r,directionMap:a,undoStack:t.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.prototype.getImmutable=function(){return this._immutable},e}();function h(e,t,n){return p.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function b(e,t){return e.getBlockMap().map((function(n){return o.generate(e,n,t)})).toOrderedMap()}function m(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onFullyViewedOnce=t.isFullyViewed=t.onViewedOnce=t.isViewed=void 0;var r=n(918);Object.defineProperty(t,"isViewed",{enumerable:!0,get:function(){return r.isViewed}}),Object.defineProperty(t,"onViewedOnce",{enumerable:!0,get:function(){return r.onViewedOnce}});var o=n(919);Object.defineProperty(t,"isFullyViewed",{enumerable:!0,get:function(){return o.isFullyViewed}}),Object.defineProperty(t,"onFullyViewedOnce",{enumerable:!0,get:function(){return o.onFullyViewedOnce}})},function(e,t,n){"use strict";n.d(t,"d",(function(){return r.a})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return f}));var r=n(871),o=(n(1),n(11)),a=n.n(o),i=(n(906),n(5)),c=function(e){var t=e.className,n=e.options,r=e.children;return Object(i.g)("div",{className:a()("Card-header",t)},Object(i.g)("div",{className:"Card-headerText"},r),n&&Object(i.g)("div",{className:"Card-headerOptions"},n))},s=n(33),l=n.n(s),u=n(41),d=n.n(u),f=function(e){var t=e.className,n=d()(e,["className"]);return Object(i.g)("div",l()({className:a()("Card-section",t)},n))}},function(e,t,n){"use strict";var r=n(1183),o=n(895),a=n(847),i=n(1199),c=n(866),s=n(963),l=n(966),u=n(1039),d=n(1200),f=n(1041),p=n(929),h=n(846),b=n(1037),m=n(840),v=n(973),g=n(1055),y=n(874),O=n(1260),j={Editor:d,EditorBlock:f,EditorState:m,CompositeDecorator:i,Entity:p,EntityInstance:b,BlockMapBuilder:o,CharacterMetadata:a,ContentBlock:c,ContentState:s,SelectionState:y,AtomicBlockUtils:r,KeyBindingUtil:v,Modifier:h,RichUtils:g,DefaultDraftBlockRenderMap:l,DefaultDraftInlineStyle:u,convertFromHTML:n(1053),convertFromRaw:n(1263),convertToRaw:O,genKey:n(860),getDefaultKeyBinding:n(1056),getVisibleSelectionRect:n(1268)};e.exports=j},function(e,t,n){"use strict";n.d(t,"h",(function(){return k})),n.d(t,"r",(function(){return I})),n.d(t,"q",(function(){return L})),n.d(t,"x",(function(){return D})),n.d(t,"n",(function(){return U})),n.d(t,"o",(function(){return V})),n.d(t,"e",(function(){return q})),n.d(t,"k",(function(){return X})),n.d(t,"w",(function(){return W})),n.d(t,"u",(function(){return P})),n.d(t,"j",(function(){return G})),n.d(t,"d",(function(){return Q})),n.d(t,"b",(function(){return K})),n.d(t,"v",(function(){return S})),n.d(t,"l",(function(){return E})),n.d(t,"p",(function(){return Y})),n.d(t,"t",(function(){return N})),n.d(t,"s",(function(){return ee})),n.d(t,"g",(function(){return ne})),n.d(t,"a",(function(){return re})),n.d(t,"f",(function(){return Z})),n.d(t,"i",(function(){return $})),n.d(t,"y",(function(){return F})),n.d(t,"c",(function(){return oe})),n.d(t,"m",(function(){return A}));var r=n(55),o=n.n(r),a=n(326),i=n.n(a),c=n(28),s=n.n(c),l=n(863),u=n.n(l),d=n(7),f=n(44),p=n.n(f),h=n(145),b=(n(37),n(365)),m=n(79),v=n.n(m),g=n(63),y=n(391),O=n.n(y);n(1003),n(212),n(402),n(72),n(56);n(1075),n(587);var j,w,C=n(948),k=(j={os:"",pc:"",platform:0},function(){if(j.os||"undefined"==typeof window)return j;var e=navigator.userAgent;return/iPhone|iPod|iPad/i.test(e)?(j.os="ios",j.platform=1):/android/i.test(e)?(j.os="android",j.platform=2):(j.os="pc",/Macintosh|OS X 10/i.test(e)?(j.pc="mac",j.platform=3):/Windows/i.test(e)&&(j.pc="windows",j.platform=4)),j}),x=function(){return"undefined"!=typeof window?window.location.href:""},S=function(e){var t,n,r=e.url,o=e.params;return r?fetch(r,{method:"post",headers:{"X-Requested-With":"fetch"},body:(t=Object(d.decamelizeKeys)(o),Object.keys(t).reduce((function(e,n){var r=t[n];return null!=r&&e.append(n,r),e}),n||new FormData))}).catch((function(){})):Promise.reject(new Error("request but no url"))},E=function(e){var t=e.query,n=e.url;return fetch("".concat(n,"?").concat(p.a.stringify(t))).then((function(e){if(e.status>=400)throw new Error("Bad response from server");return e.json()})).then((function(e){return e.banner})).catch((function(e){console.error(e)}))},R=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){return t?e||n:e}},T=function(e,t){var n=t.sessionId,r=void 0===n?"":n,o=t.os,a=void 0===o?"":o,i=t.aPageId,c=void 0===i?"":i,s=t.aToken,l=void 0===s?"":s,u=t.xSuger,d=void 0===u?"{}":u,f=t.cardType,p=t.ua,h=void 0===p?"":p,b=t.appendParams,m=t.et,v=void 0===m?"":m,g=t.callback,y=void 0===g?"":g,j=t.isHybrid,w=void 0===j?"":j,C=t.version,k=void 0===C?"":C,S=t.platform,E=t.isKeepMacro,T=void 0===E||E,A=ee(x()),N=A.plugcb,_=void 0===N?"":N,I=A.adplug,M=void 0===I?"":I,L=A.zone_id,P=void 0===L?"":L,B=A.sid,z=y||_;/[&/?]/.test(z)&&(z=encodeURIComponent(z));var D=te().zoneid,F=void 0===D?"":D,U=e.slice(0,e.indexOf("?")),V="string"==typeof d?JSON.parse(d):d,q=V.IDFA,H=void 0===q?"":q,K=V.IMEI,Q=void 0===K?"":K,W=V.ANDROID_ID,G=void 0===W?"":W,Y=V.OAID,Z=void 0===Y?"":Y;return U.includes("zhihu.com")||(H=H?O()(H):"",Q=Q?O()(Q):"",G=G?O()(G):"",Z=Z||""),f&&(e="".concat(e,"&ev=").concat(f)),b&&(e="".concat(e,"&").concat(b)),M&&(e="".concat(e,"&").concat(M)),e.replace("__SESSIONID__",R(r||B,T)).replace("__REQUESTID__",r||B).replace("__OS__",a).replace("__ET__",R(v,T)).replace("__PAGEID__",R(c,T)).replace("__ATOKEN__",R(l,T)).replace("__IDFA__",R(H,T)).replace("__IMEI__",R(Q,T)).replace("__ANDROIDID__",R(G,T)).replace("__OAID__",R(Z,T)).replace("__CREATIVEID__",R(ne(),T)).replace("__UA__",encodeURI(h)).replace("__CALLBACK__",z).replace("__ZONEID__",R(F||P,T)).replace("__ISHYBRID__",w).replace("__VERSION__",k).replace("__PLATFORM__",S)},A=function(e,t){var n=t.cid,r=void 0===n?"":n,o=t.adid,a=void 0===o?"":o,i=t.zoneid,c=void 0===i?"":i,s=t.sid,l=void 0===s?"":s,u=t.ts,d=void 0===u?"":u,f=t.os,p=void 0===f?0:f;return e.replace("__ZONEID__",R(c)).replace("__ADID__",R(a)).replace("__CREATIVEID__",R(r)).replace("__SESSIONID__",R(l)).replace("__TS__",R(d)).replace("__OS__",p)},N=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e};return e?Object.keys(e).reduce((function(r,o){var a=e[o].map((function(e){return n(T(e,t))}));return u()({},r,s()({},o,a))}),{}):{}},_=function(e){if(!document.body.contains(e))return!1;var t=e.getBoundingClientRect(),n=document.documentElement;return t.top<(window.innerHeight||n.clientHeight)},I=function(e,t,n){if(_(e))t.call(n);else var r=Object(h.subscribe)("scroll",(function(){_(e)&&(t.call(n),r.unsubscribe())}))},M=function(e){return function(t){if(!document.body.contains(t))return!1;var n=t.getBoundingClientRect();return e(n)}},L=(w=function(e){var t=document.documentElement;return e.top+parseInt(.3*e.height)<(window.innerHeight||t.clientHeight)},function(e,t,n){if(M(w)(e))t.call(n);else var r=Object(h.subscribe)("scroll",(function(){M(w)(e)&&(t.call(n),r.unsubscribe())}))}),P=function(e){try{g.a.supportsAction("ad/sendTrack").then((function(t){if(!t)return new Promise((function(t,n){var r=new Image;r.onload=t,r.addEventListener("error",n),r.src=e})).catch((function(e){console.warn("zhihu-advert request error: ",e)}));g.a.dispatch("ad/sendTrack",{tracks:[e]})}))}catch(t){return console.warn("zhihu-advert request error: ",t),new Promise((function(t,n){var r=new Image;r.onload=t,r.addEventListener("error",n),r.src=e}))}};function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e).reduce((function(t,n){return t[Object(d.decamelize)(n)]=e[n],t}),{});return p.a.stringify(t)}var z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=B(t);return n&&(e.indexOf("?")>-1?e+="&".concat(n):e+="?".concat(n)),e};function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return e=z(e,t),Promise.race([P(e),new Promise((function(e){return setTimeout(e,n)}))])}var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ad/sendContentTracks",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;return"pc"!==k().os?function(r,o){return Object(C.b)(t,"function"==typeof e?e(z(r,o)):e).catch((function(e){return n(r,o)}))}:n}((function(e){return{tracks:[e]}}),"ad/sendContentPluginTracks");function U(e){var t=e;return e>999&&(t="".concat((e/1e3).toFixed(1),"K")),e>999999&&(t="".concat((e/1e6).toFixed(1),"M")),t}function V(e){return Object(b.cnNiceNumber)(e)}function q(e,t,n){return(Array.isArray(t)?t:t.replace(/\[/g,".").replace(/\]/g,"").split(".")).reduce((function(e,t){return(e||{})[t]}),e)||n}function H(e){return["[object Array]","[object Object]"].includes(Object.prototype.toString.call(e))}function K(e){if(!H(e))throw new Error("obj 不是一个对象!");var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(n){"object"!==i()(e[n])?t[n]=e[n]:null===e[n]?t[n]="":t[n]=K(e[n])})),t}function Q(e){if(!H(e))throw new Error("obj 不是一个对象!");var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(n){"object"!==i()(e[n])?t[n]=e[n]:t[n]=Q(e[n])})),t}var W=function(e){try{return JSON.parse(e)}catch(e){return{}}};function G(){var e=document.createElement("div");e.className="adsbox",document.body.appendChild(e);var t="none"===getComputedStyle(e).display;return document.body.removeChild(e),t}function Y(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n="".concat(e).split("."),r=o()(n,2),a=r[0],i=r[1],c=void 0===i?1:i,s=[],l=1;l<=a;l+=1)s.push(1);parseInt(c,10)&&s.push(Number("0.".concat(c)).toFixed(1));for(var u=t-a-1,d=0;d<u;d++){u[d];s.push(0)}return s}var Z=function(){return e=J(),t=e.iOS,n=e.Android,r=e.ZhihuIOSVersionName,o=e.ZhihuAndroidVersionName,t?{OS:"IOS",version:r||""}:n?{OS:"ANDROID",version:o||""}:{OS:"",version:""};var e,t,n,r,o};var X=function(e){return["google_pc_js","baidu_pc_js","qihoo_pc_js","maozhua_pc_js","ruoying_pc_js"].includes(e)},J=function(){return navigator&&v()(navigator.userAgent)||{}},$=function(){return Boolean(J().ZhihuHybrid)},ee=function(e){if("string"!=typeof e||0===e.length)return{};var t=e.substr(e.indexOf("?")+1);return p.a.parse(t)},te=function(){var e=ee(x()).plugcb;return e?ee(e):{}},ne=function(){var e=te().cid,t=ee(x()),n=t.creative_id,r=t.cid;return e||n||r||""};function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return e;var n=Object.keys(t).map((function(e){return"".concat(e,"=").concat(t[e])})).join("&");if(!n)return e;var r=e.split("#"),a=o()(r,2),i=a[0],c=a[1],s=/\?/g.test(i)?"&":"?",l="".concat(i).concat(s).concat(n);return c?"".concat(l,"#").concat(c):l}function oe(e){if(!document.queryCommandSupported("copy"))return!1;try{var t=window.getSelection(),n=[],r={},o=t.rangeCount;if(o>0){r=t.getRangeAt(0).getBoundingClientRect();for(var a=0;a<o;a++)n.push(t.getRangeAt(a).cloneRange());t.removeAllRanges()}var i=document.createElement("textarea");i.style.cssText="position:absolute;top:".concat(r.top||0,"px;left:").concat(r.left||-999,"px;width:0;height:0;"),i.value=e,document.body.appendChild(i),i.focus(),i.select();var c=document.execCommand("copy");return document.body.removeChild(i),t.removeAllRanges(),n.length&&n.forEach((function(e){return t.addRange(e)})),c}catch(e){console.log("Oops, unable to copy")}return!1}},function(e,t){function n(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function c(e){n(i,o,a,c,s,"next",e)}function s(e){n(i,o,a,c,s,"throw",e)}c(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(847),o=n(1185),a=n(861),i=n(838),c=n(1186),s=n(1188),l=n(928),u=n(1191),d=n(1192),f=n(839),p=n(1193),h=n(1033),b=n(1194),m=n(1195),v=i.OrderedSet,g={replaceText:function(e,t,n,o,a){var i=h(e,t),c=b(i,t),s=r.create({style:o||v(),entity:a||null});return d(c,c.getSelectionAfter(),n,s)},insertText:function(e,t,n,r,o){return t.isCollapsed()||f(!1),g.replaceText(e,t,n,r,o)},moveText:function(e,t,n){var r=l(e,t),o=g.removeRange(e,t,"backward");return g.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=h(e,t),o=b(r,t);return u(o,o.getSelectionAfter(),n)},removeRange:function(e,t,n){var r,o,i=void 0,c=void 0;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),o=t.getFocusKey(),i=e.getBlockForKey(r),c=e.getBlockForKey(o);var l=t.getStartOffset(),u=t.getEndOffset(),d=i.getEntityAt(l),f=c.getEntityAt(u-1);if(r===o&&d&&d===f){var p=s(e.getEntityMap(),i,c,t,n);return b(e,p)}var m=t;a.draft_segmented_entities_behavior&&(m=s(e.getEntityMap(),i,c,t,n));var v=h(e,m);return b(v,m)},splitBlock:function(e,t){var n=h(e,t),r=b(n,t);return m(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return o.add(e,t,n)},removeInlineStyle:function(e,t,n){return o.remove(e,t,n)},setBlockType:function(e,t,n){return p(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return p(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return p(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=h(e,t);return c(r,t,n)}};e.exports=g},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=n(838),i=a.Map,c=a.OrderedSet,s=a.Record,l=c(),u={style:l,entity:null},d=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getStyle=function(){return this.get("style")},t.prototype.getEntity=function(){return this.get("entity")},t.prototype.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return f;var n=i({style:l,entity:null}).merge(e),r=p.get(n);if(r)return r;var o=new t(n);return p=p.set(n,o),o},t}(s(u)),f=new d,p=i([[i(u),f]]);d.EMPTY=f,e.exports=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(35),o=n(43),a=n(2),i=n(1),c=n(63),s=n(90),l=n(232),u=n(69),d=n.n(u),f=n(367),p=function(e){return/^\w+:\/\//.test(e)?e:location.origin+e},h=function(e,t){var n=t.params,r=t.onRequestOpen,a=Object(f.b)();return function(t){var i=e.href,s=e.onClick;if(s&&s(t),!t.defaultPrevented){var l=function(e,t){if(!t)return e;var n=e.split("#"),r=Object(o.a)(n,2),a=r[0],i=r[1],c=a+(a.includes("?")?"&":"?")+t;return i?c+"#"+i:c}(p(i),n);return a.ZhihuHybrid?(t.preventDefault(),void c.a.dispatch("base/openURL",{url:l})):a.isMiniProgram?(t.preventDefault(),void function(e,t){var n,r=function(){var n,r,o,a=null,i=null;if(t.WxMiniProgram)a=null===(r=window.wx)||void 0===r||null===(o=r.miniProgram)||void 0===o?void 0:o.navigateTo;else if(t.JDMiniProgram){var c,s;a=null===(c=window.jd)||void 0===c||null===(s=c.miniProgram)||void 0===s?void 0:s.navigateTo}var l,u=null===(n=/\/topic\/(\d+)/.exec(e))||void 0===n?void 0:n[1];(u&&(t.WxMiniProgram?i="/pages/topic?id=".concat(u):t.JDMiniProgram&&(i="/pages/topic/index?id=".concat(u))),i)?null===(l=a)||void 0===l||l({url:i}):/^http(s)?:/.test(e)&&(location.href=e)};!t.WxMiniProgram||(null===(n=window.WeixinJSBridge)||void 0===n?void 0:n.invoke)?r():document.addEventListener("WeixinJSBridgeReady",r,!1)}(l,a)):void((null==r?void 0:r({ua:a,url:l}))&&t.preventDefault())}}},b=function(e,t){var n=t.extra;return{zaType:"Button",zaAction:"OpenUrl",zaEventType:"Click",shouldTrackClick:!0,extra:d()({link:{get url(){return p(e)}}},n)}},m=Object(i.forwardRef)((function(e,t){var n=e.params,o=e.onRequestOpen,i=e.extra,c=Object(r.a)(e,["params","onRequestOpen","extra"]);return Object(a.b)(l.c,Object.assign({as:s.Link},b(c.href,{extra:i}),c,{ref:t,onClick:h(c,{params:n,onRequestOpen:o})}))}));t.b=function(e){var t=e.params,n=e.onRequestOpen,o=e.children,a=e.extra,c=Object(r.a)(e,["params","onRequestOpen","children","extra"]);return Object(i.cloneElement)(o,Object(l.j)(Object.assign({},b(o.props.href,{extra:a}),c,{ref:o.ref,onClick:h(o.props,{params:t,onRequestOpen:n})})))}},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=n(847),i=n(838),c=n(896),s=i.List,l=i.Map,u=i.OrderedSet,d=i.Record,f=i.Repeat,p=u(),h={parent:null,characterList:s(),data:l(),depth:0,key:"",text:"",type:"unstyled",children:s(),prevSibling:null,nextSibling:null},b=function(e,t){return e.getStyle()===t.getStyle()},m=function(e,t){return e.getEntity()===t.getEntity()},v=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=s(f(a.EMPTY,n.length))),e},g=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;return r(this,t),o(this,e.call(this,v(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():p},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.getChildKeys=function(){return this.get("children")},t.prototype.getParentKey=function(){return this.get("parent")},t.prototype.getPrevSiblingKey=function(){return this.get("prevSibling")},t.prototype.getNextSiblingKey=function(){return this.get("nextSibling")},t.prototype.findStyleRanges=function(e,t){c(this.getCharacterList(),b,e,t)},t.prototype.findEntityRanges=function(e,t){c(this.getCharacterList(),m,e,t)},t}(d(h));e.exports=g},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return l}));var r=/([-\w]+)(="([^"]+)"|='([^']+)')?/g,o=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.decodeValue,a=void 0!==o&&o,c={};t=r.exec(e);){var s=t[1],l=t[3]||t[4];c[s]=(a?i(l):l)||""}return c},a=function(e){if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/&amp;/g,"&").replace(/&#39;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#34;/g,'"').replace(/&#13;/g,"\r")}function c(){return Math.max(window.innerHeight/10,100)}var s=function(e){for(var t=e;t&&"HTML"!==t.tagName&&"BODY"!==t.tagName&&1===t.nodeType;){var n=document.defaultView.getComputedStyle(t);if([n.overflow,n.overflowY,n.overflowX].some((function(e){return"scroll"===e||"auto"===e})))return t;t=t.parentNode||t.parentElement}return window};function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=s(e),o=e.getBoundingClientRect().top+(r.pageYOffset||r.scrollTop||0)-(n?c():0)-t;r.scrollTo({top:o,behavior:"smooth"})}},function(e,t,n){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return C})),n.d(t,"d",(function(){return x})),n.d(t,"c",(function(){return E}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(35),l=n(2),u=n(3),d=n.n(u),f=n(1),p=n(11),h=n.n(p),b=n(83),m=n.n(b),v=n(841),g=n(205),y=n(981);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}function j(e){return!!e&&!(Array.isArray(e)&&!e.some(Boolean))}function w(e){var t=e.onRef,n=e.listClassName,r=e.itemClassName,o=e.className,a=e.children,i=Object(s.a)(e,["onRef","listClassName","itemClassName","className","children"]);return Object(l.b)("div",Object.assign({ref:t,className:h()(n,o)},i,{children:f.Children.map(a,(function(e){return"string"==typeof e?Object(l.b)("span",{className:r,children:e}):e?Object(f.cloneElement)(e,{className:h()(r,e.props.className)}):e}))}))}var C=function(e){return Object(l.b)(w,Object.assign({listClassName:"ContentItem-cells",itemClassName:"ContentItem-cell"},e))},k=function(e){return Object(l.b)(w,Object.assign({listClassName:"ContentItem-actions",itemClassName:"ContentItem-action"},e))},x=function(e){return Object(l.b)(w,Object.assign({listClassName:"ContentItem-status",itemClassName:"ContentItem-statusItem"},e))},S=function(e){Object(a.a)(n,e);var t=O(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).onRef=function(t){e.domNode=t,e.props.onRef&&e.props.onRef(t)},e.onAccessContent=function(t,n){n===document.activeElement&&window.open(e.props.link)},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this;Object(v.onViewedOnce)(this.domNode,(function(){var t=e.props,n=t.data,r=(n=void 0===n?{}:n).type,o=n.id,a=t.lastreadTouchable;e.context.currentUser&&a&&r&&o&&Object(y.c)("article"===r?"post":r,o,y.b)}))}},{key:"render",value:function(){var e=m()(this.props,["noTrackCardShow","lastreadTouchable","data","onRef"]),t=e.className,n=e.title,r=e.meta,o=e.children,a=e.extra,i=e.image,c=e.link,u=Object(s.a)(e,["className","title","meta","children","extra","image","link"]),d=Object(l.c)(f.Fragment,{children:[n&&Object(l.b)("h2",{className:"ContentItem-title",children:n}),j(r)&&Object(l.b)("div",{className:"ContentItem-meta",children:r})]});return Object(l.c)("div",Object.assign({ref:this.onRef,className:h()("ContentItem",t)},u,{children:[c&&Object(l.b)(g.c,{keyMap:{ACCESS:"enter"},handlers:{ACCESS:this.onAccessContent}}),i||a?Object(l.c)("div",{className:"ContentItem-main",children:[i&&Object(l.b)("div",{className:"ContentItem-image",children:i}),Object(l.b)("div",{className:"ContentItem-head",children:d}),a&&Object(l.b)("div",{className:"ContentItem-extra",children:a})]}):d,o]}))}}]),n}(f.Component);S.contextTypes={currentUser:d.a.object};var E={plain:"plain",default:"default",interactive:"interactive"};t.e=S},function(e,t,n){"use strict";var r=n(1206),o=n(1208),a=n(1209),i=n(1210);function c(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var a=n.slice(e.length);return!!t&&(a=r?r(a):a,o.contains(a,t))}function s(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}var l={isBrowser:function(e){return c(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return c(r.browserArchitecture,null,e)},isDevice:function(e){return c(r.deviceName,null,e)},isEngine:function(e){return c(r.engineName,r.engineVersion,e)},isPlatform:function(e){return c(r.platformName,r.platformFullVersion,e,s)},isPlatformArchitecture:function(e){return c(r.platformArchitecture,null,e)}};e.exports=a(l,i)},function(e,t,n){"use strict";e.exports=n(1011)},function(e,t,n){"use strict";n.d(t,"b",(function(){return z})),n.d(t,"a",(function(){return N}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(3),h=n.n(p),b=n(1),m=n(11),v=n.n(m),g=n(79),y=n.n(g),O=n(901),j=n(322),w=n(1270),C=n(921),k=n(5);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var S=function(e){s()(n,e);var t=x(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={isInputing:!1,value:e.props.value||""},e.handleChange=function(t){e.setState({value:Object(j.cutStringWidth)(t.target.value,30)})},e}return i()(n,[{key:"componentWillReceiveProps",value:function(e){e.value&&e.value!==this.state.value&&this.setState({value:e.value})}},{key:"render",value:function(){var e=this,t=this.state,n=t.isInputing,r=t.value,o=this.props.onChange,a=!n&&!r,i=!n&&r;return Object(k.g)("div",{className:"Editable-VideoTitleInput-container"},Object(k.g)(C.a,null,Object(k.g)("div",{className:v()("Editable-VideoTitleInput-innerContainer",{"Editable-VideoTitleInput-innerContainer--isBeforeIconShown":a}),onClick:function(){return e.setState({isInputing:!0})}},a&&Object(k.g)(w.a,{className:"Editable-VideoTitleInput-beforeIcon",center:!0}),!n&&Object(k.g)("div",{className:v()("Editable-VideoTitleInput-value",{"Editable-VideoTitleInput-value--noContent":!r})},r||"好的标题可以获得更多的推荐及关注者"),n&&Object(k.g)("input",{className:"Editable-VideoTitleInput",value:r,ref:function(e){e&&e.focus()},placeholder:"标题长度不超过 15 个字",onChange:this.handleChange,onBlur:function(t){e.setState({isInputing:!1}),o(t.target.value)}}),i&&Object(k.g)(w.a,{className:"Editable-VideoTitleInput-afterIcon",center:!0}))))}}]),n}(b.Component),E=n(915),R=n(1289),T=n(994),A=n.n(T),N=function(e){var t=e.className;return Object(k.g)("svg",{viewBox:"0 0 72 72",className:t},Object(k.g)("circle",{cx:"36",cy:"36",fill:"#fff",fillOpacity:".95",r:"36"}),Object(k.g)("path",{d:"M50.835 37.06L29.477 49.97a1.203 1.203 0 0 1-1.664-.43 1.25 1.25 0 0 1-.17-.631V23.091c0-.682.543-1.234 1.213-1.234.219 0 .433.06.62.173l21.359 12.91a1.245 1.245 0 0 1 0 2.12z",fill:"#444",fillRule:"nonzero"}))},_=function(){return Object(k.g)("div",{className:"VideoCardPlayButton"},Object(k.g)(N,{className:"VideoCardPlayButton-icon"}))},I=function(e){var t=e.fileSize;return Object(k.g)("div",{className:"VideoCardPlayButton-withFileSize--outer"},Object(k.g)("span",{className:"VideoCardPlayButton-withFileSize"},Object(k.g)(R.a,{center:!0,size:14}),t?A()(t,{decimalPlaces:1,unit:"MB"}):"流量播放"))};var M={name:"u03n1e",styles:"position:relative;height:100%;&::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;background-color:rgba(0, 0, 0, 0.05);}"};function L(e){var t=e.thumbnail,n=e.isLens,r=e.canPlay;return n||r?t&&"string"==typeof t?Object(k.g)("div",{css:M},Object(k.g)("img",{src:t,alt:"视频封面"})):t||null:Object(k.g)(N,{className:"VideoCard-playIcon VideoCard-playIcon--nonLens"})}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var B=function(e){s()(n,e);var t=P(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={isMobile:!1,playerShown:!1,playerLoading:!1},e.handlePlay=function(t){t.preventDefault();var n=e.props,r=n.interactive,o=n.isConverting,a=n.isLens,i=n.playerUrl,c=n.onPlayFailed,s=n.onLensPlay,l=n.onBeforePlay;r&&!o&&(i||!c?l?Promise.resolve(l()).then((function(t){!1!==t&&e.play()})):a&&s&&s()||e.play():c())},e.handlePlayerLoad=function(){e.loadingCount--,0===e.loadingCount&&e.setState({playerLoading:!1})},e}return i()(n,[{key:"componentDidMount",value:function(){this.setState({isMobile:y()(navigator.userAgent).Mobile})}},{key:"canPlay",value:function(){return this.props.isLens}},{key:"inlinePlayer",value:function(){var e=this.props,t=e.interactive,n=e.isLens,r=e.onLensPlay,o=e.onBeforePlay;return t&&n&&!(r||o)}},{key:"showContent",value:function(){var e=this.props,t=e.content,n=e.isLens,r=e.title;return!e.isVideoTitleEditable&&(!n||Boolean(t||r))}},{key:"showDescription",value:function(){var e=this.props.isLens;return this.showContent()&&!e}},{key:"play",value:function(){var e=this.props.onPlay;this.loadingCount=2,this.setState({playerShown:!0,playerLoading:!0}),setTimeout(this.handlePlayerLoad,1e3),e&&e()}},{key:"renderContent",value:function(){var e=this.props,t=e.interactive,n=e.isLens,r=e.title,o=e.thumbnail,a=e.source,i=e.url,c=e.showPlayButton,s=e.usePlayButtonWithFileSize,l=e.fileSize,u=e.rightBottomButton,d=e.leftBottomButton,f=e.isVideoTitleEditable,p=e.onVideoTitleChange,h=e.isConverting,b=e.content,m=this.canPlay(),g=this.inlinePlayer(),y=Object(k.g)(L,{thumbnail:o,isLens:n,canPlay:m}),O=c&&!h&&(s?Object(k.g)(I,{fileSize:l}):Object(k.g)(_,null)),j=Object(k.g)("div",{className:"VideoCard-layout"},m?Object(k.g)("div",{className:"VideoCard-video"},Object(k.g)("div",{className:"VideoCard-video-content"},g?this.renderPlayer():Object(k.g)("div",{className:v()("VideoCard-thumbnail",{"VideoCard-thumbnail--placeholder":!o}),onClick:this.handlePlay},y,O,u,d))):Object(k.g)("div",{className:"VideoCard-poster"},y),this.showContent()&&(b||Object(k.g)("div",{className:"VideoCard-content"},Object(k.g)("div",{className:"VideoCard-title"},r),this.showDescription()&&Object(k.g)("div",{className:"VideoCard-description"},a&&Object(k.g)("span",{className:"VideoCard-source"},a),Object(k.g)("span",{className:"VideoCard-badge"},"视频")))),f&&Object(k.g)(S,{value:r,onChange:p}));return n?j:t?Object(k.g)("a",{className:"VideoCard-link",href:i,target:"_blank",rel:"noopener noreferrer"},j):Object(k.g)("div",{className:"VideoCard-link"},j)}},{key:"renderPlayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.props,n=t.source,r=t.playerUrl,o=t.onIframeRef,a=t.useMSE;return Object(k.g)(E.a,{placeholder:Object(k.g)("div",{className:"VideoCard-player"})},Object(k.g)("div",{className:"VideoCard-player"},Object(k.g)(O.a,{type:"video",ref:o,src:"".concat(r),iframeProps:{onLoad:this.handlePlayerLoad,allowFullScreen:!0,autoplay:e&&"lens"===n,useMSE:a}})))}},{key:"render",value:function(){var e=this.props,t=e.interactive,n=e.isConverting,r=e.isVideoAnswer,o=this.state,a=o.isMobile,i=o.playerShown,c=o.playerLoading;return Object(k.g)("div",{className:v()("VideoCard",{"VideoCard--converting":n,"VideoCard--interactive":t,"VideoCard--mobile":a,"is-videoAnswer":r})},this.renderContent(),i&&Object(k.g)("div",{className:v()("VideoCard-overlay",{"is-loading":c})},this.renderPlayer(!0)),Object(k.g)("div",{className:v()("VideoCard-mask",{"is-shown":c})}))}}]),n}(b.Component);B.propTypes={interactive:h.a.bool,showPlayButton:h.a.bool,usePlayButtonWithFileSize:h.a.bool,isVideoAnswer:h.a.bool,fileSize:h.a.number,onPlay:h.a.func,onPlayFailed:h.a.func,onLensPlay:h.a.func,onBeforePlay:h.a.func,rightBottomButton:h.a.oneOfType([h.a.element,h.a.string]),leftBottomButton:h.a.oneOfType([h.a.element,h.a.string]),thumbnail:h.a.oneOfType([h.a.element,h.a.string]),content:h.a.object},B.defaultProps={interactive:!0,showPlayButton:!0};var z=B},,function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(3),i=n.n(a),c=n(27),s=n(34),l=n(78),u=n(11),d=n.n(u),f=n(177),p=n(63),h=n(83),b=n.n(h),m=n(53),v=n(370),g=n(891),y=n(30);n(892);var O=function(e){var t,a=e.isPinProfile,i=e.onClick,u=e.isPinDaily,h=e.user,O=e.avatar,j=e.avatarProps,w=e.showVipIcon,C=e.vipIconZaViewName,k=e.badgeProps,x=e.noBadge,S=e.noLink,E=e.noHoverCard,R=e.style,T=e.className,A=e.children,N=Object(r.a)(e,["isPinProfile","onClick","isPinDaily","user","avatar","avatarProps","showVipIcon","vipIconZaViewName","badgeProps","noBadge","noLink","noHoverCard","style","className","children"]),_=Object(c.useSelector)((function(e){return Object(m.d)(e,{includeTablet:!0})})),I=h.id,M=h.name,L=h.avatarUrl,P=h.urlToken,B=h.isOrg,z=h.vipInfo,D=h.url,F=h.maskLevel,U=void 0===E?_:E,V=Object(l.d)((function(){return n.e(56).then(n.bind(null,1150))}),!U&&!_);t=O?Object(o.b)(f.a,Object.assign({className:"UserLink-avatar",url:L,alt:M},j)):A||M;var q=Boolean(function(e){var t=e.id,n=e.name,r=e.urlToken;return"0"===t||"知乎用户"===n?null:r||t}(h)),H="//www.zhihu.com/".concat(B?"org":"people","/").concat(P||I),K="zhihu://pin".concat(D,"/moments");return q&&!S&&(t=Object(o.b)(s.Link,Object.assign({className:"UserLink-link","data-za-detail-view-element_name":"User",to:H,target:"_blank",onClick:function(e){return function(t){u&&"A"===t.target.nodeName&&y.a.trackEvent(t.target,{id:2065}),a&&(t.preventDefault(),p.a.dispatch("base/openURL",{url:e})),F&&t.preventDefault(),i&&"function"==typeof i&&i(t)}}(K)},b()(N,["isPinProfile","trackEvent","onClick","dispatch","isPinDaily"]),{children:t})),!U&&V&&(t=Object(o.b)(V,{toggler:t,id:I,urlToken:P,user:h}))),Object(o.c)("span",{style:R,className:d()("UserLink",T),children:[t,q&&!x&&!O&&Object(o.b)(v.c,Object.assign({css:{marginLeft:".3em"},isOrg:B,badge:h.badgeV2||h.badge,linkify:!0,enableTooltip:!0},k)),q&&w&&!O&&z&&z.vipIcon&&Object(o.b)(g.a,{vipIcon:z.vipIcon,zaViewName:C})]})};O.propTypes={user:i.a.object.isRequired,avatar:i.a.bool,avatarProps:i.a.object,noBadge:i.a.bool,noHoverCard:i.a.bool,showVipIcon:i.a.bool,style:i.a.object,className:i.a.string,children:i.a.node,isPinProfile:i.a.bool,isPinDaily:i.a.bool},O.defaultProps={avatar:!1,noBadge:!1,showVipIcon:!1},t.a=O},function(e,t,n){"use strict";var r={},o=Math.pow(2,24);e.exports=function(){for(var e=void 0;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*o).toString(32);return r[e]=!0,e}},function(e,t,n){"use strict";var r=n(1184);e.exports=r},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(19),p=n(27),h=n(34),b=n(11),m=n.n(b),v=(n(371),n(30)),g=n(53),y=n(944),O=n(859),j=n(1031),w=(n(885),n(926)),C=n(908);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var x=function(e){Object(a.a)(n,e);var t=k(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleClick=function(t){var n=e.props,r=n.zaId,o=n.zaExtra,a=n.author.urlToken,i=n.isSpecialQuestionOrAnswer;if(n.preventOpenUrl)t.preventDefault();else if(r&&v.a.trackEvent(null,{id:r,action:"OpenUrl",element_name:"User"},o),i)return location.href="zhihu://people/".concat(a,"?utm_app_name=zhihu_check"),t.preventDefault(),void t.stopPropagation()},e}return Object(o.a)(n,[{key:"render",value:function(){var e,t="plain"===this.props.preset,n=this.props,r=n.author,o=n.noLink,a=n.avatarSize,i=void 0===a?t?24:38:a,c=n.children,l=n.className,u=n.extra,d=n.itemProp,f=n.roundAvatar,p=n.isMobile,h=n.target,b=n.noDetail,v=n.noHoverCard,g=n.noHeadline,k=n.router,x=null==r||null===(e=r.vipInfo)||void 0===e?void 0:e.widget,S=3===k.getCurrentLocation().pathname.split("/").length,E=t&&u||Object(s.b)("div",{className:"AuthorInfo-badge",children:c||Object(s.b)(y.a,{className:"AuthorInfo-badgeText",user:r,noHeadline:g})}),R=this.props.userLinkV2;return Object(s.c)("div",{className:m()("AuthorInfo",l,{"AuthorInfo--plain":t}),itemProp:d,itemScope:!0,itemType:"http://schema.org/Person",children:[Object(s.c)("div",{className:m()("AuthorInfo",{"AuthorInfo--mobile":!1}),children:[Object(s.b)("meta",{itemProp:"name",content:r.name}),Object(s.b)("meta",{itemProp:"image",content:r.avatarUrl}),Object(s.b)("meta",{itemProp:"url",content:"https://www.zhihu.com/people/".concat(r.urlToken)}),Object(s.b)("meta",{itemProp:"zhihu:followerCount",content:r.followerCount}),R&&Object(s.c)(s.a,{children:[Object(s.b)(w.a,Object.assign({onClick:this.handleClick,noHoverCard:p||v,noLink:o,user:r,className:"AuthorInfo-avatarWrapper",avatarProps:{className:"AuthorInfo-avatar",size:i,round:f}},h&&{target:h})),Object(s.c)("div",{className:"AuthorInfo-content",children:[Object(s.c)("div",{className:"AuthorInfo-head",children:[Object(s.b)(C.a,Object.assign({noHoverCard:p||v,onClick:this.handleClick,noLink:o,user:r,className:"AuthorInfo-name"},h&&{target:h})),!t&&u]}),!b&&Object(s.b)("div",{className:"AuthorInfo-detail",children:E})]})]}),!R&&Object(s.c)(s.a,{children:[Object(s.b)(O.a,Object.assign({onClick:this.handleClick,noHoverCard:p||v,noLink:o,className:"AuthorInfo-avatarWrapper",user:r,avatar:!0,avatarProps:{className:"AuthorInfo-avatar",size:i,round:f}},h&&{target:h})),Object(s.c)("div",{className:"AuthorInfo-content",children:[Object(s.c)("div",{className:"AuthorInfo-head",children:[Object(s.b)(O.a,Object.assign({noHoverCard:p||v,onClick:this.handleClick,className:"AuthorInfo-name",noLink:o,user:r},h&&{target:h})),!t&&u]}),!b&&Object(s.b)("div",{className:"AuthorInfo-detail",children:E})]})]})]}),S&&x&&x.id&&Object(s.b)(j.a,{className:"AuthorInfo-Widget",widget:x})]})}}]),n}(d.Component);x.propTypes={author:u.a.object.isRequired,noLink:u.a.bool,avatarSize:u.a.number,preset:u.a.oneOf(["plain","default"]),className:u.a.string,itemProp:u.a.string,roundAvatar:u.a.bool,isMobile:u.a.bool,noDetail:u.a.bool,relatedTo:u.a.string,zaId:u.a.number,zaExtra:u.a.object,noHoverCard:u.a.bool,noHeadline:u.a.bool,preventOpenUrl:u.a.bool},x.defaultProps={noLink:!1,roundAvatar:!1,itemProp:"author",noHoverCard:!1,noHeadline:!1,preventOpenUrl:!1};t.a=Object(f.compose)(h.withRouter,Object(p.connect)((function(e,t){var n=t.relatedTo,r=t.params,o=["question","answer"].includes(n);return{isHuman:Object(g.c)(e),shouldOia:Object(g.h)(e)&&o,isMobile:Object(g.d)(e,{includeTablet:!0}),isSpecialQuestionOrAnswer:Object(g.j)(e,{type:o&&n,id:o?"question"===n?null==r?void 0:r.id:null==r?void 0:r.answerId:""})}})))(x)},function(e,t,n){var r=n(28);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l}));var r={general:"general",live:"live",publication:"publication",album:"album",special:"special",manga:"manga"},o=(Object.assign({},r,{album_chapter:r.album,album_video_chapter:r.album,album_paid_column:r.album,paid_column_chapter:r.album,training:r.album,training_bundle:r.album,training_chapter:r.album,web_literature:r.publication,instabook:r.publication,ebook_audio:r.publication,publication_chapter:r.publication,publication_paid_magazine:r.publication,magazine_section:r.publication,paid_answer:r.album,assessment:r.album}),{live:"Live 讲座",album:"盐选专栏",album_paid_column:"盐选专栏",album_chapter:"盐选专栏",album_video_chapter:"盐选专栏",paid_column_chapter:"盐选专栏",publication:"电子书",publication_chapter:"电子书章节",instabook:"讲书",ebook_audio:"有声书",publication_paid_magazine:"盐选杂志",special:"专题",training:"训练营",training_bundle:"训练营",training_chapter:"训练营",web_literature:"网络文学",magazine_section:"杂志文章",manga:"漫画"}),a={live:"Live 讲座",album:"盐选专栏",album_chapter:"盐选专栏",album_video_chapter:"盐选专栏",album_paid_column:"盐选专栏",paid_column_chapter:"盐选专栏",assessment:"盐选专栏",training:"盐选专栏",training_bundle:"盐选专栏",training_chapter:"盐选专栏",publication:"电子书",publication_chapter:"电子书",instabook:"电子书",ebook_audio:"电子书",publication_paid_magazine:"电子书",special:"电子书",web_literature:"电子书",magazine_section:"电子书",manga:"电子书"},i={live:r.live,album:r.album,album_chapter:r.album,album_paid_column:r.album,album_video_chapter:r.album,training:r.album,training_bundle:r.album,training_chapter:r.album,paid_column_chapter:r.album,assessment:r.album,publication:r.publication,publication_chapter:r.publication,instabook:r.publication,ebook_audio:r.publication,publication_paid_magazine:r.publication,special:r.publication,web_literature:r.publication,magazine_section:r.publication,manga:r.publication},c=["live","album","album_chapter","album_video_chapter","paid_column_chapter","publication_chapter","magazine_section","album_paid_column","assessment","special"],s={paidAnswer:"PaidAnswer",paidPost:"PaidPost"},l={paid_magazine:"PaidMagazine",paid_column:"PaidColumn",album:"RemixAlbum",ebook:"EBook",instabook:"InstaBook",literature:"Literature",training:"Training",training_bundle:"TrainingBundle",special:"Special",ebook_audio:"AudioBook",live:"Live",publication:"EBook",web_literature:"EBook",album_chapter:"RemixAlbum",album_paid_column:"RemixAlbum",album_video_chapter:"RemixAlbum",manga:"Manga",free_conversation:"FreeConversation",event:"Event",Onebox:"OneBox"}},function(e,t,n){"use strict";var r=n(847),o=n(838),a=n(896),i=o.List,c=o.Map,s=o.OrderedSet,l=o.Record,u=o.Repeat,d=s(),f=l({key:"",type:"unstyled",text:"",characterList:i(),depth:0,data:c()}),p=function(e){function t(n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=i(u(r.EMPTY,n.length))),e}(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.findStyleRanges=function(e,t){a(this.getCharacterList(),h,e,t)},t.prototype.findEntityRanges=function(e,t){a(this.getCharacterList(),b,e,t)},t}(f);function h(e,t){return e.getStyle()===t.getStyle()}function b(e,t){return e.getEntity()===t.getEntity()}e.exports=p},function(e,t,n){"use strict";var r=n(839),o=/[\uD800-\uDFFF]/;function a(e){return 55296<=e&&e<=57343}function i(e){return o.test(e)}function c(e,t){return 1+a(e.charCodeAt(t))}function s(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!i(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var o=0;if(t>0){for(;t>0&&o<r;t--)o+=c(e,o);if(o>=r)return""}else if(t<0){for(o=r;t<0&&0<o;t++)o-=c(e,o-1);o<0&&(o=0)}var a=r;if(n<r)for(a=o;n>0&&a<r;n--)a+=c(e,a);return e.substring(o,a)}var l={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=c(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:c,hasSurrogateUnit:i,isCodeUnitInSurrogateRange:a,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||r(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),o=e.charCodeAt(t+1);return 55296<=n&&n<=56319&&56320<=o&&o<=57343},strlen:function(e){if(!i(e))return e.length;for(var t=0,n=0;n<e.length;n+=c(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return s(e,t=t<n?t:n,r)},substr:s};e.exports=l},function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(1),i=n(90),c=function(e,t){var n=e.ratio,a=void 0===n?1:n,c=e.children,s=Object(r.a)(e,["ratio","children"]);return Object(o.b)(i.Box,Object.assign({css:{position:"relative",paddingBottom:"".concat(1/a*100,"%"),height:"0",borderRadius:"inherit"}},s,{ref:t,children:Object(o.b)("div",{css:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",borderRadius:"inherit"},children:c})}))};t.a=Object(a.forwardRef)(c)},function(e,t,n){"use strict";n.r(t),n.d(t,"dispatch",(function(){return i})),n.d(t,"HYBRID_ACTION_EVENT",(function(){return o})),n.d(t,"getTrackMacroOptions",(function(){return s})),n.d(t,"removeBIZParameter",(function(){return l})),n.d(t,"sendRaven",(function(){return u})),n.d(t,"base64Decode",(function(){return d.a})),n.d(t,"base64Encode",(function(){return d.b})),n.d(t,"formatPrice",(function(){return f}));var r=n(63),o={commonAd:"ad/open",preloadAd:"ad/preload",answerAd:"answer/openAd",adOpenForm:"ad/openForm",openWithoutDeepLink:"ad/openWithoutDeepLink",baseOpenURL:"base/openURL",baseOpenInbox:"base/openInbox",adOpenWechat:"ad/openWechat",adECommerceOpen:"ad/eCommerceOpen",adDownloadApk:"ad/downloadApk",openWechatShare:"ad/openWechatShare",fetchAdLinkCardInfo:"editor/fetchADLinkCardInfo",adOpenContent:"ad/openContent",adSendContentPluginTracks:"ad/sendContentPluginTracks",adWxPushOnceMsgAuth:"ad/wxPushOnceMsgAuth",adGetContentSign:"ad/getContentSign"};function a(e){var t=e.type,n=e.payload;return new Promise((function(e){r.a.ready().then((function(){r.a.supportsAction(t).then((function(o){o?r.a.dispatch(t,n).then((function(t){var n=!t||!1!==t.status;e({status:n,type:2,data:t})}),(function(t){return e({status:!1,type:2,data:t})})):e({status:!1,type:1})}))})).catch((function(t){return e({status:!1,type:0,data:t})}))}))}function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise((function(e,n){a.apply(void 0,t).then((function(t){return t.status?e(t):n(t)}))}))}var c=n(844);function s(){var e=Object(c.h)(),t=e.os,n=e.platform,r=Object(c.i)(),o=(navigator&&Object(c.f)(navigator.userAgent)).version;return{os:t,ua:navigator.userAgent,platform:n,isHybrid:r?"1":"0",version:o}}function l(e){return e.replace("&BIZ=ECOMMERCE","").replace("?BIZ=ECOMMERCE","?").replace("?&","?").replace("&BIZFROM=ORG","").replace("?BIZFROM=ORG","?")}var u=function(e){void 0!==Object(c.e)(window,"Raven.captureException")&&window.Raven.captureException(new Error("Error in ad data."),{extra:e})},d=n(979),f=function(e){var t=parseFloat(e);if(isNaN(t))return"";var n=(Math.round(e)/100).toString(),r=n.indexOf(".");for(r<0&&(r=n.length,n+=".");n.length<=r+2;)n+="0";return n}},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(19),p=n(27),h=n(11),b=n.n(h),m=n(940),v=n.n(m),g=n(811),y=n(31),O=n(30),j=n(232),w=n(378),C=n(53),k=n(1023),x=n(97),S=n(102),E=n(185),R=n(323),T=n(386),A=n(153),N=n(379),_=n(24);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var M={default:"default",primary:"primary"},L=function(e){Object(a.a)(n,e);var t=I(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).zaRef=Object(d.createRef)(),e.state={hovered:!1,isFetching:!1},e.handleMouseEnter=function(){e.setState({hovered:!0})},e.handleMouseLeave=function(){e.setState({hovered:!1})},e.toggleFollow=function(t){var n=e.props,r=n.isFollowing,o=n.type,a=n.id,i=n.zaId,c=n.useCustomZa,s=n.onFollowButtonClick,l=!r;c||(O.a.trackEvent(t.target,Object.assign({action:l?"Follow":"UnFollow",element:"Button",element_name:_.ab[o]},i&&{id:i})),e.zaRef.current.trackEvent({action:l?"Follow":"UnFollow",eventType:"Click",elementLocation:{type:"Button"}}));var u="toggleFollow".concat(o.slice(0,1).toUpperCase()).concat(o.slice(1)),d=e.props[u](a,l);v()(d)&&(e.setState({isFetching:!0}),d.then((function(){e.setState({isFetching:!1}),s&&s()})).catch((function(){return e.setState({isFetching:!1})})))},e.handleToggleFollow=function(t){e.props.authRequired?e.props.authRequired(e.toggleFollow,_.W.follow,!0)(t):e.props.ua.Zhihu?e.toggleFollow(t):e.context.authRequired(e.toggleFollow,_.W.follow)(t)},e.handleClick=function(t){var n=e.props.onClick;n&&!n(t)||(e.handleToggleFollow(t),t.stopPropagation())},e}return Object(o.a)(n,[{key:"render",value:function(){var e,t,n,r=this.state.hovered,o=this.props,a=o.onRef,i=o.preset,c=o.entityHidden,l=o.type,u=o.isFollowing,d=o.gender,f=o.className,p=o.children,h=o.isMobile,m=o.disabled;u?(e="primary",n=r?"取消关注":"已关注",t={color:"grey"}):(e=i,t={color:"blue"},n=p||("people"===l||"rewardPeople"===l?[Object(s.b)(g.a,{className:"FollowButton-icon",text:!0,center:!0},"icon"),"关注".concat("number"==typeof d&&-1!==d?_.N[d]:"")]:"关注".concat(c?"":w.b[l])));var v=this.state.isFetching;return Object(s.c)(y.c,Object.assign({onRef:a,preset:e,onClick:this.handleClick,className:b()("FollowButton",f)},t,!h&&{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},{disabled:m||v,children:[Object(s.b)(j.d,{ref:this.zaRef}),n]}))}}]),n}(d.Component);L.contextTypes={authRequired:u.a.func},L.propTypes={preset:u.a.oneOf(Object.values(M)),type:u.a.oneOf(w.a).isRequired,id:u.a.oneOfType([u.a.number,u.a.string]).isRequired,zaId:u.a.number,useCustomZa:u.a.bool},L.defaultTypes={preset:M.default},L.PRESETS=M;t.a=Object(f.compose)(Object(p.connect)((function(e){return{ua:e.env.userAgent,isMobile:Object(C.d)(e,{includeTablet:!0})}}),{toggleFollowQuestion:S.nb,toggleFollowCollection:E.d,toggleFollowColumn:R.e,toggleFollowRoundtable:T.m,toggleFollowTopic:A.M,toggleFollowPeople:x.a,toggleFollowRewardPeople:N.o,toggleFollowClub_mask:k.a}))(L)},function(e,t,n){"use strict";var r=n(33),o=n.n(r),a=n(41),i=n.n(a),c=(n(1),n(11)),s=n.n(c),l=(n(906),n(5));t.a=function(e){var t=e.className,n=e.onRef,r=i()(e,["className","onRef"]);return Object(l.g)("div",o()({ref:n,className:s()("Card",t)},r))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(55),o=n.n(r),a=n(1),i=n(11),c=n.n(i),s=n(1355),l=n(1356),u=n(5);var d=function(e){var t=e.style,n=e.className,r=e.id,i=e.name,d=e.size,f=void 0===d?20:d,p=e.checked,h=e.onChange,b=e.disabled,m=Object(a.useState)(!1),v=o()(m,2),g=v[0],y=v[1];return Object(u.g)("label",{style:t,className:c()("Checkbox",n,{"Checkbox--focused":g,"Checkbox--disabled":b})},p?Object(u.g)(s.a,{size:f,className:"Checkbox-iconOn"}):Object(u.g)(l.a,{size:f,className:"Checkbox-iconOff"}),Object(u.g)("input",{className:"Checkbox-input",id:r,name:i,type:"checkbox",checked:p,onFocus:function(){return y(!0)},onBlur:function(){return y(!1)},onChange:h,disabled:b}))}},function(e,t,n){"use strict";t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fetch(e,Object.assign({credentials:"include",headers:{"X-Requested-With":"Fetch"}},t)).then((function(e){return e.json()}))}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},t.prototype.getAnchorKey=function(){return this.get("anchorKey")},t.prototype.getAnchorOffset=function(){return this.get("anchorOffset")},t.prototype.getFocusKey=function(){return this.get("focusKey")},t.prototype.getFocusOffset=function(){return this.get("focusOffset")},t.prototype.getIsBackward=function(){return this.get("isBackward")},t.prototype.getHasFocus=function(){return this.get("hasFocus")},t.prototype.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),o=this.getFocusKey();if(r===o&&r===e){var a=this.getStartOffset();return t<=this.getEndOffset()&&a<=n}if(e!==r&&e!==o)return!1;var i=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=i&&n>=i},t.prototype.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},t.prototype.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},t.prototype.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},t.prototype.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},t.prototype.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,n(838).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=a},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return y}));var r=n(80),o=n.n(r),a=n(55),i=n.n(a),c=n(1),s=n(63),l=n(90),u=n(69),d=n.n(u),f=n(232),p=n(367),h=n(5),b=function(e){return/^(\w+:)?\/\//.test(e)?e:location.origin+e},m=function(e,t){var n=t.params,r=t.onRequestOpen,o=Object(p.b)();return function(t){var a=e.href,c=e.onClick;if(c&&c(t),!t.defaultPrevented&&a){var l=function(e,t){if(!t)return e;var n=e.split("#"),r=i()(n,2),o=r[0],a=r[1],c=o+(o.includes("?")?"&":"?")+t;return a?c+"#"+a:c}(b(a),n);if((null==o?void 0:o.ZhihuHybrid)||(null==o?void 0:o.Zhihu))return t.preventDefault(),void s.a.dispatch("base/openURL",{url:l});(null==r?void 0:r({ua:o,url:l}))&&t.preventDefault()}}},v=function(e,t){var n=t.extra;return{zaType:"Button",zaAction:"OpenUrl",zaEventType:"Click",shouldTrackClick:Boolean(e),extra:d()({link:{get url(){return b(e)}}},n)}},g=function(e){var t=e.getProps,n=e.params,r=e.onRequestOpen,a=e.children,i=e.extra,s=o()(e,["getProps","params","onRequestOpen","children","extra"]),l=function(e,t){return Object.assign({},e,"function"==typeof t&&t(e))}(a.props,t);return Object(c.cloneElement)(a,Object(f.j)(Object.assign({},v(l.href,{extra:i}),s,{ref:a.ref,onClick:m(l,{params:n,onRequestOpen:r})})))},y=Object(c.forwardRef)((function(e,t){var n=e.params,r=e.onRequestOpen,a=e.extra,i=e.as,c=void 0===i?l.Link:i,s=o()(e,["params","onRequestOpen","extra","as"]);return Object(h.g)(f.c,Object.assign({as:c},v(s.href,{extra:a}),s,{ref:t,onClick:m(s,{params:n,onRequestOpen:r})}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(55),o=n.n(r),a=n(1),i=n.n(a),c=n(11),s=n.n(c),l=n(18),u=function(e){return i.a.createElement(l.a,e,i.a.createElement("path",{d:"M12 2c5.43 0 9.848 4.325 9.996 9.72L22 12c0 5.43-4.325 9.848-9.72 9.996L12 22C6.477 22 2 17.524 2 12c0-5.43 4.325-9.848 9.72-9.996L12 2zm0 3.333l-.234.004A6.672 6.672 0 0 0 5.333 12 6.671 6.671 0 0 0 12 18.667l.234-.004A6.672 6.672 0 0 0 18.667 12l-.004-.234A6.672 6.672 0 0 0 12 5.333zm0 3.334a3.333 3.333 0 1 1 0 6.666 3.333 3.333 0 0 1 0-6.666z",fillRule:"evenodd"}))};u.defaultProps={name:"RadioButtonOn"};var d=u,f=function(e){return i.a.createElement(l.a,e,i.a.createElement("path",{d:"M12 2c5.43 0 9.848 4.325 9.996 9.72L22 12c0 5.43-4.325 9.848-9.72 9.996L12 22C6.477 22 2 17.524 2 12c0-5.43 4.325-9.848 9.72-9.996L12 2zm0 3.333l-.234.004A6.672 6.672 0 0 0 5.333 12a6.672 6.672 0 0 0 6.433 6.663l.234.004.234-.004a6.672 6.672 0 0 0 6.429-6.429l.004-.234-.004-.234a6.672 6.672 0 0 0-6.429-6.429L12 5.333z",fillRule:"evenodd"}))};f.defaultProps={name:"RadioButtonOff"};var p=f,h=n(5);var b=function(e){var t=e.style,n=e.className,r=e.id,i=e.name,c=e.value,l=e.size,u=void 0===l?20:l,f=e.checked,b=e.onChange,m=e.disabled,v=Object(a.useState)(!1),g=o()(v,2),y=g[0],O=g[1];return Object(h.g)("label",{style:t,className:s()("RadioButton",n,{"RadioButton--focused":y,"RadioButton--disabled":m})},f?Object(h.g)(d,{size:u,className:"RadioButton-iconOn"}):Object(h.g)(p,{size:u,className:"RadioButton-iconOff"}),Object(h.g)("input",{className:"RadioButton-input",id:r,name:i,value:c,type:"radio",checked:f,onFocus:function(){return O(!0)},onBlur:function(){return O(!1)},onChange:b,disabled:m}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(28),o=n.n(r),a=n(20),i=n.n(a),c=n(21),s=n.n(c),l=n(22),u=n.n(l),d=n(23),f=n.n(d),p=n(13),h=n.n(p),b=n(1),m=n.n(b),v=n(11),g=n.n(v),y=n(5);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var j=function(e){u()(n,e);var t=O(n);function n(e){var r;i()(this,n),(r=t.call(this,e)).handleChange=function(e){r.setState({checked:e.target.checked});var t=r.props.onChange;"function"==typeof t&&t(e)},r.handleFocus=function(){r.setState({focused:!0})},r.handleBlur=function(){r.setState({focused:!1})};var o=e.checked;return r.state={checked:Boolean(o),focused:!1},r}return s()(n,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.checked,r=t.forceControlled;if(!r){var o=e.forceControlled,a=e.checked;if(!o||r){if(void 0!==n){var i=this.state.checked;a!==n&&n!==i&&this.setState({checked:n})}}else this.setState({checked:Boolean(n)})}}},{key:"render",value:function(){var e,t=this.props,n=t.id,r=t.style,a=t.className,i=t.preset,c=t.onClick,s=t.onChange,l=t.name,u=t.value,d=t.checked,f=t.disabled,p=t.forceControlled,h=this.state,b=h.focused,m=h.checked,v=p?d:m,O=p?s:this.handleChange;return Object(y.g)("label",{className:g()("Switch",a,(e={},o()(e,"Switch--".concat(i),"normal"!==i),o()(e,"Switch--focused",b),o()(e,"Switch--disabled",f),o()(e,"Switch--checked",Boolean(v)),e)),style:r},Object(y.g)("input",{id:n,className:"Switch-input",type:"checkbox",onClick:c,onChange:O,onFocus:this.handleFocus,onBlur:this.handleBlur,name:l,value:u,checked:Boolean(v),disabled:f}))}}]),n}(m.a.Component);j.defaultProps={preset:"normal"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n.n(r),a=n(131),i=Object.assign;var c=function(e){return o.a.createElement(a.a,i({width:"150",height:"120",viewBox:"0 0 150 120"},e),o.a.createElement("g",{fill:"none",fillRule:"evenodd"},o.a.createElement("path",{fill:"#EBEEF5",d:"M44 31.005v55.99A3.003 3.003 0 0047.003 90h53.994A3.005 3.005 0 00104 86.995v-55.99A3.003 3.003 0 00100.997 28H47.003A3.005 3.005 0 0044 31.005zm-3 0A6.005 6.005 0 0147.003 25h53.994A6.003 6.003 0 01107 31.005v55.99A6.005 6.005 0 01100.997 93H47.003A6.003 6.003 0 0141 86.995v-55.99z",fillRule:"nonzero"}),o.a.createElement("path",{fill:"#F7F8FA",d:"M59 50a6 6 0 110-12 6 6 0 010 12zm12-9.5c0-.828.68-1.5 1.496-1.5h9.008c.826 0 1.496.666 1.496 1.5 0 .828-.68 1.5-1.496 1.5h-9.008A1.495 1.495 0 0171 40.5zm0 7c0-.828.667-1.5 1.5-1.5h21c.828 0 1.5.666 1.5 1.5 0 .828-.667 1.5-1.5 1.5h-21c-.828 0-1.5-.666-1.5-1.5zM59 73a6 6 0 110-12 6 6 0 010 12zm12-9.5c0-.828.68-1.5 1.496-1.5h9.008c.826 0 1.496.666 1.496 1.5 0 .828-.68 1.5-1.496 1.5h-9.008A1.495 1.495 0 0171 63.5zm0 7c0-.828.667-1.5 1.5-1.5h21c.828 0 1.5.666 1.5 1.5 0 .828-.667 1.5-1.5 1.5h-21c-.828 0-1.5-.666-1.5-1.5z"})))}},function(e,t){e.exports=function(e){return null==e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p}));n(1);var r=n(154),o=n(856),a=n(888),i=n(909),c=n(5),s=/<(h2|h3)[^>]*>(.*?)<\/\1>/g,l={h2:1,h3:2},u=function(e,t){return"h_".concat(e||"editor","_").concat(t)},d=function(e){return e.replace(a.b,"").replace(/<[^>]*>/g,"")},f=function(e){return l[e]},p=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return{catalog:[],html:e};var r=[];return t=t||"editor",n="function"==typeof n?n:function(){return String(n)},e=e.replace(s,(function(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=d(a),c=f(o),s=u(t,r.length);return r.push({text:i,titleLevel:c,Tag:o,targetId:s}),n({text:i,titleLevel:c,targetId:s,Tag:o,originText:a})})),{catalog:r,html:e}},h=function(e){var t=e.originText,n=e.targetId,r=e.Tag;return Object(o.renderToStaticMarkup)(Object(c.g)(r,{id:n,dangerouslySetInnerHTML:{__html:t}}))};t.a=function(e,t){var n=t.sourceId,a=t.theme,s=t.shouldShowCatalog,l=t.shouldFoldCatalog;if(!e)return e;if(!s)return e;var u=p(e,n,h),d=u.catalog,f=u.html;return d.length?Object(o.renderToStaticMarkup)(Object(c.g)(r.a,{theme:a},Object(c.g)(i.b,{catalog:d,canFold:l}))).concat(f):f}},function(e,t,n){"use strict";n.d(t,"b",(function(){return p}));var r=n(33),o=n.n(r),a=n(41),i=n.n(a),c=(n(1),n(83)),s=n.n(c),l=n(11),u=n.n(l),d=n(44),f=n(5),p=function(e){var t;return"ECOMMERCE"===Object(d.parse)(null===(t=e.split("?"))||void 0===t?void 0:t[1]).BIZ},h=function(e){return Object(f.g)("div",e,Object(f.g)("span",null),Object(f.g)("span",null))},b=function(e){var t=s()(e,["entityType","entityData","newLinkCardAb"]),n=t.target,r=t.url,a=t.image,c=t.imageWidth,l=t.imageHeight,d=t.component,p=t.size,b=t.className,m=i()(t,["target","url","image","imageWidth","imageHeight","component","size","className"]);return Object(f.g)(d,o()({target:n,href:r,"data-draft-node":"block","data-draft-type":"link-card","data-is-ecommerce":"1","data-image":a},c&&{"data-image-width":c},l&&{"data-image-height":l},p&&{"data-size":p},{className:u()("LinkCard",b)},m),Object(f.g)("span",{className:"LinkCard-content LinkCard-ecommerceLoadingCard"},Object(f.g)("div",{className:"LinkCard-ecommerceLoadingCardAvatarWrapper"},Object(f.g)("img",{src:"https://pic2.zhimg.com/v2-1b0bbef27f0496a58468f92d94c8a80e_l.png",className:"LinkCard-ecommerceLoadingCardNetwork"})),Object(f.g)(h,{className:"LinkCard-ecommerceLoadingCardLoadingbar"})))};b.defaultProps={component:"a",target:"_blank"};t.a=b},function(e,t,n){"use strict";n.d(t,"a",(function(){return le}));var r=n(55),o=n.n(r),a=n(33),i=n.n(a),c=n(41),s=n.n(c),l=n(1),u=n.n(l),d=n(39),f=n(580),p=n.n(f),h=n(30),b=n(233),m=n.n(b),v=n(78),g=n(49),y=n.n(g),O=n(841),j=n(44),w=n.n(j),C=n(20),k=n.n(C),x=n(21),S=n.n(x),E=n(22),R=n.n(E),T=n(23),A=n.n(T),N=n(13),_=n.n(N),I=n(152),M=n(11),L=n.n(M),P=n(28),B=n.n(P),z=n(71),D=n.n(z),F=n(111),U=n.n(F),V=n(5);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_()(e);if(t){var o=_()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return A()(this,n)}}var H,K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U.a;return function(n){return D()(function(r){R()(a,r);var o=q(a);function a(){var e;k()(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=o.call.apply(o,[this].concat(r))).key=t(),e}return S()(a,[{key:"render",value:function(){return Object(V.g)(n,i()({},this.props,B()({},e,this.key)))}}]),a}(u.a.Component),n)}},Q=n(995),W=n(210),G=n.n(W),Y=function(e,t){return function(n){var r,o=(r=[],{value:{},listen:function(e){r.push(e)},unlisten:function(e){r=r.filter((function(t){return t!==e}))},emit:function(e){this.value=e,r.forEach((function(t){return t(e)}))}}),a=Object(Q.createSubscription)({getCurrentValue:function(e){return e.value},subscribe:function(e,t){return e.listen(t),function(){return e.unlisten(t)}}}),c=function(e,t){return e?G()(e,(function(e){return function(){return t(e.apply(void 0,arguments))}})):{dispatch:t}}(t,(function(e){return o.emit(e(o.value))})),s=Object.assign((function(t){return Object(V.g)(a,{source:o},(function(r){return Object(V.g)(n,i()({},t,e({value:r,source:o},t),c))}))}),{source:o});return D()(s,n)}};!function(e){e[e.Initial=0]="Initial",e[e.Loading=1]="Loading",e[e.Ok=2]="Ok",e[e.Failed=3]="Failed"}(H||(H={}));var Z=function(e){return Object(V.g)("svg",i()({width:60,height:60,viewBox:"0 0 60 60"},e),Object(V.g)("g",{fill:"none",fillRule:"evenodd"},Object(V.g)("ellipse",{fill:"#000",opacity:.45,cx:30,cy:30,rx:30,ry:30}),Object(V.g)("ellipse",{stroke:"#FFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"4,1,4",cx:30,cy:30,rx:26,ry:26}),Object(V.g)("svg",i()({x:16,y:18.5},e),Object(V.g)("path",{d:"M12.842 12.981V11.4H7.64v1.653h3.27v.272c-.018 1.881-1.442 3.147-3.516 3.147-2.382 0-3.876-1.846-3.876-4.834 0-2.936 1.485-4.79 3.832-4.79 1.732 0 2.936.835 3.428 2.364h1.977c-.43-2.566-2.522-4.201-5.405-4.201-3.55 0-5.845 2.601-5.845 6.644 0 4.096 2.268 6.654 5.863 6.654 3.322 0 5.475-2.083 5.475-5.327zM17.518 18V5.317H15.55V18h1.97zm5.142 0v-5.256h5.449v-1.74h-5.45V7.11h5.95V5.317h-7.918V18h1.969z",fill:"#fff"}))))},X=function(e){return Object(V.g)("svg",i()({width:"60px",height:"60px",viewBox:"0 0 60 60",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e),Object(V.g)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Object(V.g)("ellipse",{fill:"#000000",opacity:"0.45",cx:"30",cy:"30",rx:"30",ry:"30"}),Object(V.g)("ellipse",{stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.5",cx:"30",cy:"30",rx:"26",ry:"26"}),Object(V.g)("ellipse",{stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"4,1,4",cx:"30",cy:"30",rx:"26",ry:"26"},Object(V.g)("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 30 30",to:"90 30 30",dur:"0.3s"}),Object(V.g)("animate",{attributeName:"opacity",from:"1",to:"0",dur:"0.3",fill:"freeze"}))),Object(V.g)("svg",{x:"16",y:"18.5"},Object(V.g)("g",{fill:"#ffffff"},Object(V.g)("path",{x:"100",y:"100",d:"M12.8422852,12.9814453 L12.8422852,11.3994141 L7.63916016,11.3994141 L7.63916016,13.0517578 L10.9086914,13.0517578 L10.9086914,13.3242188 C10.8911133,15.2050781 9.46728516,16.4707031 7.39306641,16.4707031 C5.01123047,16.4707031 3.51708984,14.625 3.51708984,11.6367188 C3.51708984,8.70117188 5.00244141,6.84667969 7.34912109,6.84667969 C9.08056641,6.84667969 10.284668,7.68164062 10.7768555,9.2109375 L12.7543945,9.2109375 C12.3237305,6.64453125 10.2319336,5.00976562 7.34912109,5.00976562 C3.79833984,5.00976562 1.50439453,7.61132812 1.50439453,11.6542969 C1.50439453,15.75 3.77197266,18.3076172 7.36669922,18.3076172 C10.6889648,18.3076172 12.8422852,16.2246094 12.8422852,12.9814453 Z M17.5180664,18 L17.5180664,5.31738281 L15.5493164,5.31738281 L15.5493164,18 L17.5180664,18 Z M22.659668,18 L22.659668,12.7441406 L28.1088867,12.7441406 L28.1088867,11.0039062 L22.659668,11.0039062 L22.659668,7.11035156 L28.6098633,7.11035156 L28.6098633,5.31738281 L20.690918,5.31738281 L20.690918,18 L22.659668,18 Z"}))),Object(V.g)("path",{d:"M56,30 C56,15.6405965 44.3594035,4 30,4",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0",fill:"none"},Object(V.g)("animate",{attributeName:"opacity",from:"0",to:"1",dur:".6",fill:"freeze"}),Object(V.g)("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 30 30",to:"360 30 30",dur:"1.625s",repeatCount:"indefinite"})))},J=function(e){return Object(V.g)("svg",i()({width:60,height:60,viewBox:"0 0 60 60"},e),Object(V.g)("g",{fill:"none",fillRule:"evenodd"},Object(V.g)("ellipse",{fill:"#282828",opacity:.45,cx:30,cy:30,rx:30,ry:30}),Object(V.g)("path",{d:"M41.552 18.93A15.954 15.954 0 0 0 30 14c-8.837 0-16 7.163-16 16s7.163 16 16 16c7.811 0 14.315-5.597 15.72-13",stroke:"#FFF",strokeWidth:2,strokeLinecap:"round"}),Object(V.g)("path",{d:"M45.108 16.236c.44-.33.797-.151.797.4v7.005c0 .55-.358.73-.797.4L40.7 20.736c-.44-.33-.439-.866 0-1.195l4.407-3.305z",fill:"#FFF"})))};function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_()(e);if(t){var o=_()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return A()(this,n)}}var ee=function(){return new Promise(requestAnimationFrame)},te=function(e){R()(n,e);var t=$(n);function n(){var e;k()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).videoEle=null,e.onPlay=function(){var t=e.props.onSuccess;t&&t()},e.onError=function(t){var n=e.props,r=n.onFailed,o=n.gifKey;r&&r(t.target.error),e.props.updateGif({gifKey:o,loadState:H.Failed})},e.handleClick=function(t){var n=e.props,r=n.gifKey,o=n.src,a=n.onLoadStart,i=n.onSuccess,c=n.onFailed,s=n.onClick,l=n.onPlayChange,u=n.loadState,d=n.isPlaying,f=n.videoUrl;if(s&&s(t),l&&l(d),f)return e.videoEle&&(d?e.videoEle.pause():(u===H.Failed&&(e.videoEle.src=e.videoEle.src),e.videoEle.play(),a&&a())),void e.props.updateGif({gifKey:r,isPlaying:!d});e.canPlay?e.props.updateGif({gifKey:r,isPlaying:!d}):u!==H.Loading&&(e.props.updateGif({gifKey:r,loadState:H.Loading}),a&&a(),Promise.all([Object(I.loadImage)(o),ee().then(ee)]).then((function(){i&&i(),e.props.updateGif({gifKey:r,isPlaying:!0,loadState:H.Ok})})).catch((function(t){c&&c(t),e.props.updateGif({gifKey:r,loadState:H.Failed})})))},e}return S()(n,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isPlaying,r=t.videoUrl;this.videoEle&&n&&r!==e.videoUrl&&this.videoEle.play(),this.videoEle&&this.videoEle.duration&&!n&&(this.videoEle.currentTime=0,this.videoEle.controls=!1,this.videoEle.pause())}},{key:"componentWillUnmount",value:function(){this.props.removeGif({gifKey:this.props.gifKey})}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.poster,o=n.src,a=n.size,i=n.loadState,c=n.isPlaying,s=n.onRef,l=n.videoUrl,u=this.canPlay&&c,d=i===H.Loading,f=i===H.Failed;return d?e=Object(V.g)(X,{className:"GifPlayer-icon"}):f?e=Object(V.g)(J,{className:"GifPlayer-icon"}):c||(e=Object(V.g)(Z,{className:"GifPlayer-icon"})),e&&(this.lastIcon=e),Object(V.g)("div",{className:L()("GifPlayer",{isPlaying:c}),"data-size":a,onClick:this.handleClick,ref:s},l&&Object(V.g)("video",{ref:function(e){t.videoEle=e},className:"ztext-gif GifPlayer-gif2mp4",src:l,"data-thumbnail":r,poster:r,"data-size":a,controls:!1,preload:"metadata",loop:!0,muted:!0,onPlay:this.onPlay,onError:this.onError,playsInline:!0}),Object(V.g)("img",{className:L()("ztext-gif",{"GifPlayer-gif2mp4Image":l}),role:"presentation",src:u?o:r,"data-thumbnail":r,"data-size":a}),e||this.lastIcon)}},{key:"canPlay",get:function(){return this.props.loadState===H.Ok}}]),n}(u.a.Component);te.defaultProps={isPlaying:!1,loadState:H.Initial};var ne=K("gifKey")(Y((function(e,t){return e.value[t.gifKey]}),{updateGif:function(e){return function(t){var n=e.gifKey,r=e.isPlaying,o=s()(e,["gifKey","isPlaying"]),a=Object.assign({},t);if(r)for(var i=0,c=Object.keys(a);i<c.length;i++){var l=c[i],u=a[l];l!==n&&u.isPlaying&&(a[l]=Object.assign({},u,{isPlaying:!1}))}return Object.assign({},a,B()({},n,Object.assign({},t[n],{isPlaying:r},o)))}},removeGif:function(e){return function(t){var n=Object.assign({},t);return delete n[e.gifKey],n}}})(te)),re=n(237),oe=function(e){return fetch("https://api.zhihu.com/gif2mp4/".concat(e),{credentials:"include",headers:{"X-Requested-With":"Fetch"}}).then((function(e){return e.json()}))},ae=n(922),ie=n(924),ce=function(e,t){h.a.trackEvent(e,{action:"StatusReport",element:"Card"},{status:{result:t}})},se=function(e,t){var n,r,o;null===(n=window)||void 0===n||null===(r=n.Raven)||void 0===r||null===(o=r.captureException)||void 0===o||o.call(r,e,{fingerprint:["gif2mp4"],extra:t})},le=function(e){var t=e.src,n=e.useWebP,r=void 0===n?"auto":n,a=e.useMp4,c=void 0!==a&&a,u=e.onRef,d=e.onLoadStateChange,b=s()(e,["src","useWebP","useMp4","onRef","onLoadStateChange"]),g=Object(l.useState)(""),j=o()(g,2),C=j[0],k=j[1],x=Object(l.useState)(null),S=o()(x,2),E=S[0],R=S[1],T=Object(l.useState)(Date.now()),A=o()(T,2),N=A[0],_=A[1],I=Object(l.useState)(!1),M=o()(I,2),L=M[0],P=M[1],B=Object(l.useState)(null),z=o()(B,2),D=z[0],F=z[1],U=Object(ie.a)("animation"),q=Object(l.useCallback)((function(){var e=(Object(f.imgPathParse)(t)||{}).hash;c&&Object(O.onViewedOnce)(E,(function(){oe(e).then((function(e){var t,n,r=e.playlist,o=(null==r||null===(t=r.SD)||void 0===t?void 0:t.play_url)||(null==r||null===(n=r.LD)||void 0===n?void 0:n.play_url);o&&y.a.increment("Gif2Mp4Player.mp4.fetch.success.count"),k(o)})).catch(m.a)}))}),[E,t,c]);Object(l.useEffect)(q,[t,c,E]),Object(l.useEffect)((function(){E&&h.a.setModule(E,{module:"GifItem"})}),[E]),Object(ae.a)(E,(function(){h.a.trackCardShow(E,{element:"Card"})})),Object(v.i)((function(){y.a.increment("Gif2Mp4Player.mp4.play.failure.count"),se(new Error("Gif2Mp4 play timeout"),{src:t,videoUrl:C}),P(!1)}),L?2e3:null),Object(v.i)((function(){y.a.increment("Gif2Mp4Player.mp4.play.success.count"),y.a.timing("Gif2Mp4Player.mp4.first_frame_time",Date.now()-N-100),P(!1),F(null)}),D);var H=p()(t,{extension:("auto"===r?U:r)?"webp":"gif"});return Object(V.g)(ne,i()({videoUrl:C,src:H,onRef:Object(l.useCallback)(Object(re.a)(u,R),[]),onPlayChange:function(e){e||(_(Date.now()),C&&(y.a.increment("Gif2Mp4Player.mp4.click.count"),P(!0)),h.a.trackEvent(E,{action:"Click",element:"Image"}))},onLoadStart:function(){if(C){var e=w.a.parse(C).expiration;e&&Number(e)<Date.now()/1e3+900&&q()}_(Date.now()),d&&d("loadstart",H)},onSuccess:function(){ce(E,"Success"),C?L&&F(100):y.a.timing("Gif2Mp4Player.gif.first_frame_time",Date.now()-N),d&&d("load",H)},onFailed:function(e){ce(E,"Fail"),C&&(L&&(y.a.increment("Gif2Mp4Player.mp4.play.failure.count"),P(!1),F(null)),se(e,{videoUrl:C,src:t})),d&&d("error",H)}},b))},ue=function(e){var t=e.dataset,n=t.thumbnail,r={src:n,poster:n,size:t.size},o=document.createElement("div");return o.className="RichText-gifPlaceholder",e.parentNode.replaceChild(o,e),{data:r,target:o}};t.b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.Component,r=void 0===n?le:n,a=Object(l.useState)(null),c=o()(a,2),s=c[0],u=c[1];return Object(l.useEffect)((function(){if(e){var t=Array.from(e.querySelectorAll("img.origin_image[data-thumbnail],img.content_image[data-thumbnail]"));if(t.length){var n=t.map((function(e){return ue(e)})).map((function(e,t){var n=e.data,o=e.target;return Object(d.createPortal)(Object(V.g)(r,i()({key:t},n)),o)}));u(n)}}}),[e]),s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(923),f=n(205);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var h=function(e){Object(i.a)(n,e);var t=p(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={ref:null},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.tabIndex,o=t.children,a=Object(r.a)(t,["tabIndex","children"]),i=this.state.ref;return Object(l.b)(d.a,Object.assign({tabIndex:n,onRef:function(t){return!e.state.ref&&e.setState({ref:t})}},a,{children:Object(l.b)(f.d.Provider,{value:i,children:o})}))}}]),n}(u.Component);h.defaultProps={tabIndex:0};var b=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n(43);var r=n(44),o=n.n(r),a=function(e){var t=e||{},n=t.type,r=t.id,a=t.urlToken,i=t.q;switch(n){case"question":return"/questions/".concat(r);case"answer":return"/answers/".concat(r);case"article":case"p":return"/articles/".concat(r);case"column":return"/columns/".concat(r);case"live":return"/lives/".concat(r);case"ebook":case"book":return"/pub/book/".concat(r);case"feed":return"/feed";case"topic":return"/topics/".concat(r);case"people":return"/people/".concat(a||r);case"search":return"/search?".concat(o.a.stringify({q:i}));case"video":return"video_topic/".concat(r);case"zvideo":return"/zvideo/".concat(r);case"zvideo_answer":case"zvideo_article":var c=n.replace("zvideo_","");return"/".concat(c,"s/").concat(r);case"liveplus":return"/liveplus/".concat(r);default:return null}},i=function(e,t){var n=t?"?".concat(o.a.stringify(t)):"",r="string"==typeof e?e:a(e);if(r){var i=r.startsWith("/")?r.slice(1):r;return"zhihu://".concat(i).concat(n)}return"zhihu://".concat(n)}},function(e,t,n){"use strict";var r=n(41),o=n.n(r),a=n(33),i=n.n(a),c=n(1),s=n.n(c),l=n(3),u=n.n(l),d=n(11),f=n.n(d),p=n(83),h=n.n(p),b=n(152),m=n(882),v=(n(932),n(5)),g=s.a.forwardRef((function(e,t){if(!e.notCommerce&&Object(m.b)(e.url))return Object(v.g)(m.a,i()({},e,{className:f()("old",e.className)}));var n=h()(e,["entityType","entityData","notCommerce"]),r=n.text,a=n.target,c=n.url,l=n.image,u=n.imageWidth,d=n.imageHeight,p=n.component,g=n.className,y=n.size,O=n.newLinkCardAb,j=n.children,w=o()(n,["text","target","url","image","imageWidth","imageHeight","component","className","size","newLinkCardAb","children"]),C=function(e,t){if(e>0&&t>0){var n=e/t;if(n>1.2)return"180x120";if(n<=.8)return"120x160"}return"ipico"}(u,d),k=Object(b.imgUrl)(l,C);return Object(v.g)(p,i()({ref:t,target:a,href:c,"data-draft-node":"block","data-draft-type":"link-card"},k&&{"data-image":k},u&&{"data-image-width":u},d&&{"data-image-height":d},y&&{"data-size":y},r!==c&&r&&{"data-text":r},{className:f()("LinkCard new",g)},w),j||("3"===O?Object(v.g)(s.a.Fragment,null,Object(v.g)("span",{className:"LinkCard-contents withTitle"},Object(v.g)("span",{className:"LinkCard-title loadingTitle"},r),Object(v.g)("span",{className:"LinkCard-title loading withTitle"}),Object(v.g)("span",{className:"LinkCard-desc loading"})),Object(v.g)("span",{className:"LinkCard-image LinkCard-image--default"})):Object(v.g)(s.a.Fragment,null,Object(v.g)("span",{className:"LinkCard-contents"},Object(v.g)("span",{className:"LinkCard-title loading","data-text":!0}),Object(v.g)("span",{className:"LinkCard-desc loading"})),Object(v.g)("span",{className:"LinkCard-image LinkCard-image--default"}))))}));g.propTypes={component:u.a.oneOfType([u.a.string,u.a.func]),target:u.a.string,url:u.a.string.isRequired,text:u.a.string,image:u.a.string,imageWidth:u.a.oneOfType([u.a.string,u.a.number]),imageHeight:u.a.oneOfType([u.a.string,u.a.number])},g.defaultProps={component:"a",target:"_blank"},t.a=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a}));var r=Object.freeze({DOM:{PLAY:"event/dom/play",PLAYING:"event/dom/playing",PAUSE:"event/dom/pause",ENDED:"event/dom/ended",TIMEUPDATE:"event/dom/timeupdate",ERROR:"event/dom/error",WAITING:"event/dom/waiting"},PLAYER:{QUALITY_CHANGE:"event/player/quality-change",REQUEST_PLAY:"event/player/request-play",PLAY_REJECTED:"event/player/play-rejected",REQUEST_PAUSE:"event/player/request-pause",PLAY_COUNT:"event/player/play-count",PLAY_FAILED:"event/player/play-failed",ENTER_FULLSCREEN:"event/player/enter-fullscreen",EXIT_FULLSCREEN:"event/player/exit-fullscreen",ENTER_PIP:"event/player/enter-pip",EXIT_PIP:"event/player/exit-pip"}}),o=Object.freeze({PLAYER:{PLAY:"action/player/play",PAUSE:"action/player/pause",SET_VOLUME:"action/player/set-volume",ENTER_FULLSCREEN:"action/player/enter-fullscreen",EXIT_FULLSCREEN:"action/player/exit-fullscreen",ENTER_PIP:"action/player/enter-pip",EXIT_PIP:"action/player/exit-pip",TIME_UPDATE:"action/player/time-update"}});function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*",n=arguments.length>2?arguments[2]:void 0;function r(r){function o(o){var a=o.origin||o.originalEvent.origin,i="*"===t||t===a,c=o.data||{},s=c.from,l=c.id,u=c.payload;if(i&&"griffith"===s&&(!n||e===l)&&u){var d=u.messageName,f=u.data;d&&r(d,f,o.source)}}return window.addEventListener("message",o),{unsubscribe:function(){return window.removeEventListener("message",o)}}}function o(n,r,o){n&&n.postMessage&&n.postMessage({from:"griffith",id:e,payload:{messageName:r,data:o}},t||"*")}return{subscribeMessage:r,dispatchMessage:o}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));n(1);var r=n(856),o=n(851),a=n(1001),i=n(5),c=/<sup\b([^>]*data-draft-type="reference"[^>]*)>(.*?)<\/sup>/g;t.a=function(e){return function(t){return function(e,t){if(!e)return e;var n=e,s=[];return n=n.replace(c,(function(e,n){var a=Object(o.e)(n,{decodeValue:!0}),c=a["data-text"],l=void 0===c?"":c,u=a["data-url"],d=void 0===u?"":u,f=a["data-numero"],p=t?"ref_".concat(t,"_").concat(f):"ref_".concat(f),h=s.filter((function(e){return e.refKey===p})),b="".concat(p,"_").concat(h.length);s.push({refKey:p,text:l,url:d,numero:f});var m=[l,d].filter(Boolean).join(" ");return Object(r.renderToStaticMarkup)(Object(i.g)("sup",{"data-text":l,"data-url":d,"data-numero":f,"data-draft-node":"inline","data-draft-type":"reference","data-tooltip":m,"data-tooltip-preset":"white","data-tooltip-classname":"ztext-referene-tooltip"},Object(i.g)("a",{id:b,href:"#".concat(p),"data-reference-link":!0,"aria-labelledby":p},"[",f,"]")))})),s.length?n=n.concat(Object(r.renderToStaticMarkup)(Object(i.g)(a.a,{referenceList:s}))):n}(t,e)}}},function(e,t,n){"use strict";var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(3),h=n.n(p),b=n(1),m=n.n(b),v=n(11),g=n.n(v),y=n(937),O=n(152),j=n(79),w=n.n(j),C=n(143),k=n(5);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var S={top:10,left:20},E={top:0,left:0};var R=function(e){s()(n,e);var t=x(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).scrollerRef=m.a.createRef(),e.state={transEnded:!1,rect:null,translate:null,scale:null},e.getBoundingClientRect=function(){var t=e.props,n=t.img,r=t.data,o=n.getBoundingClientRect(),a=o.left,i=o.top,c=o.width,s=o.height,l=r.width,u=r.height,d={left:a,top:i,width:c,height:s},f=1;return l>u?(d.height=s,f=s/u,d.width=l*f,d.left=a+(c-d.width)/2,d.top=i+(s-d.height)/2):l<u&&(d.width=c,f=c/l,d.height=u*f,d.left=a+(c-d.width)/2,d.top=i+(s-d.height)/2),d},e.handleClick=function(t){t.stopPropagation(),e.setState({translate:null,scale:null})},e.handleTransitionEnd=function(){var t=e.state,n=t.translate,r=t.scale,o=e.props.onClose;n&&r?(e.setState({transEnded:!0}),e.scrollerRef.current.style.overflow="auto"):o()},e}return i()(n,[{key:"componentWillMount",value:function(){var e=this.props,t=e.img,n=e.isOriginalUrl;this.originalSrc!==this.currentSrc&&((new Image).src=this.originalSrc);this.setState({rect:!1===n?this.getBoundingClientRect():t.getBoundingClientRect()})}},{key:"componentDidMount",value:function(){var e=this;Object(y.disableBodyScroll)(this.scrollerRef.current);var t=this.props.img;setTimeout((function(){return e.setState(Object.assign({},e.computeTransition(e.state.rect,{width:t.dataset.rawwidth||t.naturalWidth})))}))}},{key:"componentWillUnmount",value:function(){Object(y.enableBodyScroll)(this.scrollerRef.current)}},{key:"computeTransition",value:function(e,t){var n,r=this.props,o=r.transitionType,a=r.data,i=w()(navigator.userAgent).Mobile?E:S,c=i.top,s=i.left,l=window,u={left:0,top:0,width:l.innerWidth,height:l.innerHeight},d=function(e){return{x:e.left+e.width/2,y:e.top+e.height/2}}(u),f={width:u.width-2*s,height:u.height-2*c},p={},h={};return 1===o?(p.width=f.width>a.width?a.width:f.width,n=p.width/a.width,p.height=a.height*n,h={x:(f.width-p.width)/2+s,y:p.height<f.height?(f.height-p.height)/2+c:S.top}):(p.width=f.width>t.width?t.width:f.width,n=p.width/e.width,p.height=e.height*n,h={x:d.x-e.width/2,y:(p.height<f.height?d.y:S.top+p.height/2)-e.height/2}),{translate:h,scale:n}}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.img,o=n.isOriginalUrl,a=n.data,i=n.transitionType,c=n.className,s=this.state,l=s.translate,u=s.scale,d=s.rect,f=s.transEnded,p=l&&u,h=1,b="";if(1===i){var m=(w()(navigator.userAgent).Mobile?E:S).left;e=Math.min(window.innerWidth-2*m,a.width);var v=d.width/e;b=p?"translate(".concat(l.x,"px, ").concat(l.y,"px) scale(1) "):"translate(".concat(d.left,"px, ").concat(d.top,"px) scale(").concat(v,") "),h=p?1:0}else b=p?"translate(".concat(l.x,"px ,").concat(l.y,"px) scale(").concat(u,") "):"translate(".concat(d.left,"px,").concat(d.top,"px)");return Object(k.g)(C.a,null,Object(k.g)("div",{className:g()("ImageView",c,{"is-active":p}),style:{paddingBottom:S.top},onClick:this.handleClick},Object(k.g)("div",{className:"ImageView-inner",ref:this.scrollerRef},Object(k.g)("img",{ref:function(e){t.imgEl=e},src:!1===o?Object(O.imgUrl)(r.dataset.original,"r"):f&&this.originalSrc||this.currentSrc,className:g()("ImageView-img",{"ImageView-transformOrigin":1===i}),style:{width:e||d.width,transform:b,opacity:h},onTransitionEnd:this.handleTransitionEnd,alt:"preview"}))))}},{key:"originalSrc",get:function(){return this.props.img.dataset.original}},{key:"currentSrc",get:function(){var e=this.props.img;return e.currentSrc||e.src}}]),n}(b.Component);R.propTypes={img:h.a.object.isRequired,onClose:h.a.func.isRequired};t.a=R},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(27),p=n(11),h=n.n(p),b=n(1129),m=n.n(b),v=n(233),g=n.n(v),y=n(827),O=n(1331),j=n(1330),w=n(1465),C=n(84),k=n(31),x=n(30),S=n(232),E=n(126),R=n(378),T=n(205),A=n(434),N=n(25),_=n(24);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}function M(e){return e&&e.startsWith("//")?"https:".concat(e):e}function L(e){return Object.keys(e).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e[t]))})).join("&")}var P=function(e){Object(a.a)(n,e);var t=I(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={qrCodeUrl:"",url:""},e.togglerRef=Object(d.createRef)(),e.shouldShowMenu=function(){var t=e.props,n=t.onTogglerClick,r=t.disabled;return!1!==n()&&!r},e.handleTogglerClick=function(t){e.shouldShowMenu()?(e.loadQrcodeImage(),e.onShare(t)):t.preventDefault()},e.handleMouseEnter=function(t){e.shouldShowMenu()?(e.loadQrcodeImage(),e.onShare(t)):t.preventDefault()},e.open=function(t){e.shouldShowMenu()&&(e.loadQrcodeImage(),e.menu.popover.open(),e.onShare(t))},e.onShare=function(){var t=e.props,n=t.id,r=t.type,o=t.getShareText,a=t.zaShareId;"live"!==r&&"club"!==r&&o(n,r),x.a.trackEvent(e.togglerRef.current,Object.assign({action:"Share",element:"Button",is_intent:!0,element_name:_.ab[r]},a&&{id:a}))},e.copyLink=function(){var t=e.props,n=t.type,r=t.title,o=t.authorName,a=t.href,i=t.showNotification,c=R.b[n]||"",s=r?"".concat(r," - "):"",l=o&&"匿名用户"!==o&&c?"".concat(o,"的").concat(c," - "):"",u=a?Object(E.toAbsoluteUrl)(a):e.url();m()("".concat(s).concat(l,"知乎\n").concat(M(u))),i("链接复制成功!")},e.url=function(){var t=e.props,n=t.id,r=t.type;return M(Object(E.toAbsoluteUrl)(e.props.url))||"".concat(location.origin,"/").concat(r,"/").concat(n)},e.loadQrcodeImage=function(){var t=e.state.qrCodeUrl;if(!t){var n="".concat(location.protocol,"//www.zhihu.com/"),r=e.url();t="".concat(n,"qrcode?").concat(L({url:"".concat(r).concat("#showWechatShareTip")})),e.setState({qrCodeUrl:t,url:r})}},e.shareToWeibo=function(){var t={appKey:"3063806388"},n=e.props.shareText;n&&(t.title=n);var r="http://service.weibo.com/share/share.php?".concat(L(t));window.open(r,"_blank","width=615,height=505")||(location.href=r)},e}return Object(o.a)(n,[{key:"componentDidUpdate",value:function(e){this.props.positionStatus!==e.positionStatus&&this.menu.popover.close()}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.togglerClassName,o=t.positionStatus,a=t.toggler,i=t.type,c=t.disabled,l=t.placement,u=t.toggleEvent,f=t.stickHover,p=t.children,b=this.state.qrCodeUrl,m=Object(s.c)("div",{className:h()("ShareMenu-toggler",r),children:[b&&Object(s.b)("img",{className:"ShareMenu-fakeQRCode",src:b,alt:"微信二维码"}),Object(d.cloneElement)(a,{onMouseEnter:this.loadQrcodeImage,disabled:c,ref:this.togglerRef})]}),v="hover"===u?{onMouseEnter:this.handleMouseEnter}:{onClick:this.handleTogglerClick};return Object(s.c)(d.Fragment,{children:[Object(s.b)(T.c,{keyMap:{SHARE:"f x"},handlers:{SHARE:this.open}}),Object(s.c)(C.c,Object.assign({className:h()("ShareMenu",n),positionStatus:o,ref:function(t){e.menu=t},toggler:m,placement:l,toggleEvent:u,stickHover:f},v,{children:[Object(s.c)(S.a,{as:C.b,zaType:"Button",zaAction:"Share",zaText:!0,className:"ShareMenu-button",onClick:this.copyLink,children:[Object(s.b)(y.a,{size:20,className:"ShareMenu-Icon--normal",color:"#9FADC7"}),"复制链接"]}),"live"===i||Object(s.c)(S.a,{as:C.b,zaType:"Button",zaAction:"Share",zaText:!0,className:"ShareMenu-button",onClick:this.shareToWeibo,children:[Object(s.b)(O.a,{size:17,className:"ShareMenu-Icon--small"}),"新浪微博"]}),Object(s.c)(C.b,{tag:"div",className:"ShareMenu-wechat",noActive:!0,children:[Object(s.c)(k.c,{className:"ShareMenu-button",preset:"plain",children:[Object(s.b)(j.a,{size:17,className:"ShareMenu-Icon--small",color:"#60C84D"}),"微信扫一扫"]}),Object(s.b)("img",{className:"ShareMenu-qrCode",src:b,alt:"微信二维码"})]}),p]}))]})}}]),n}(d.Component);P.propTypes={toggler:u.a.node,onTogglerClick:u.a.func,zaShareId:u.a.number},P.defaultProps={toggler:Object(s.b)(k.c,{preset:"plain",icon:w.a,label:"分享"}),onTogglerClick:g.a};t.a=Object(f.connect)((function(e,t){var n=t.id,r=t.type,o=e.shareTexts;return{shareText:(null==o?void 0:o["".concat(r).concat(n)])||t.shareText}}),{showNotification:N.h,getShareText:A.b})(P)},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(27),p=n(841),h=n(30);n(892);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var m=function(e){Object(a.a)(n,e);var t=b(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props.zaViewName;Object(p.onViewedOnce)(this.node,(function(){h.a.trackCardShow(null,{id:3613,name:e})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.theme,r=t.zaViewName,o=t.vipIcon,a=o.nightModeUrl,i=o.url,c="light"===n?i:a;return Object(s.b)("a",{className:"UserLink-vipIcon",href:"https://www.zhihu.com/vip",target:"_blank",rel:"noopener noreferrer",ref:function(t){return e.node=t},"data-za-detail-view-id":3612,"data-za-detail-view-name":r,children:Object(s.b)("img",{src:c,alt:"zhihu vip"})})}}]),n}(d.Component);m.propTypes={vipIcon:u.a.shape({nightModeUrl:u.a.string,url:u.a.string}).isRequired,zaViewName:u.a.string},t.a=Object(f.connect)((function(e){return{theme:e.env.theme}}))(m)},function(e,t,n){},function(e,t,n){"use strict";var r=n(43),o=n(35),a=n(2),i=n(1),c=n(90),s=n(73),l=n(31),u=n(111),d=n.n(u),f=n(367),p=n(405),h=function(e){var t=e.title,n=e.content,u=e.ok,d=e.cancel,p=e.onOk,h=e.onCancel,b=Object(o.a)(e,["title","content","ok","cancel","onOk","onCancel"]),m=Object(i.useState)(!0),v=Object(r.a)(m,2),g=v[0],y=v[1],O=function(e){return function(){y(!1),e()}},j=Object(f.b)();return Object(a.b)(s.b,Object.assign({closeButton:null,maskClosable:!1,hotKeyClosable:!1,css:[{overflow:"hidden",maxWidth:"96vw",".Modal-content":{margin:0,padding:0}},j.Mobile&&{width:320,borderRadius:12,boxShadow:""}]},b,{children:g&&Object(a.c)(c.Box,{px:"36px",py:"24px",children:[t&&Object(a.b)(c.Text,{fontSize:"18px",lineHeight:"28px",fontWeight:"bold",textAlign:"center",children:t}),n&&Object(a.b)(c.Text,{mt:t?"16px":"0",fontSize:"14px",lineHeight:"normal",color:"GBK03A",maxHeight:"calc(67vh - 100px)",css:{wordBreak:"break-all",overflowY:"auto",WebkitOverflowScrolling:"touch",marginRight:-10,paddingRight:10},children:n}),Object(a.c)(c.Flex,{mt:"16px",css:{button:{padding:0,flex:1,height:36,lineHeight:1,fontSize:15,borderRadius:4,":active":{opacity:.6}}},fontWeight:"bold",children:[d&&Object(a.b)(l.c,{css:{marginRight:4},onClick:O(h),children:d}),Object(a.b)(l.c,{preset:"primary",color:"blue",onClick:O(p),children:u})]})]})}))};t.a=function(){var e=Object(p.b)(),t=e.addInstance,n=e.removeInstance,r=function(e){return setTimeout((function(){return n(e)}),300)};return{alert:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.title,c=o.ok;return new Promise((function(r){n=Object(a.b)(h,{content:e,title:i,ok:c||"确定",onOk:r,css:{textAlign:"center"}},d()("modal")),t(n)})).finally((function(){return r(n)}))},confirm:function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.title,c=o.ok,s=o.cancel;return new Promise((function(r,o){n=Object(a.b)(h,{content:e,title:i,ok:c||"确定",onOk:r,cancel:s||"取消",onCancel:o},d()("modal")),t(n)})).finally((function(){return r(n)}))}}}},function(e,t,n){"use strict";function r(e){var t=e.id,n=e.name,r=e.urlToken;return"0"===t||"知乎用户"===n?null:Boolean(r||t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(838).OrderedMap,o={createFromArray:function(e){return r(e.map((function(e){return[e.getKey(),e]})))}};e.exports=o},function(e,t,n){"use strict";e.exports=function(e,t,n,r){if(e.size){var o=0;e.reduce((function(e,a,i){return t(e,a)||(n(e)&&r(o,i),o=i),a})),n(e.last())&&r(o,e.count())}}},function(e,t,n){"use strict";e.exports=function(e){return"handled"===e||!0===e}},function(e,t,n){"use strict";var r=n(846);e.exports=function(e,t,n){var o=e.getSelection(),a=e.getCurrentContent(),i=o;if(o.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return a}else if(e.isSelectionAtStartOfContent())return a;if((i=t(e))===o)return a}return r.removeRange(a,i,n)}},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(134),p=n(1101);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var b=function(e){Object(a.a)(n,e);var t=h(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handlePackup=function(){var t=e.props.onClose;window.scrollTo(0,e.originPageYOffset),t&&t()},e}return Object(o.a)(n,[{key:"componentWillReceiveProps",value:function(e){"bottom"===e.commentPattern&&e.shown&&!this.props.shown&&(this.originPageYOffset=window.pageYOffset)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.containerClassName,r=e.shown,o=e.showPackupButton,a=e.parent,i=e.commentPattern,c=e.commentInputPosition,l=e.onClose,u=e.byComment,d=e.needLoadCommentPermission,h=e.isMobile,b=e.onOrderChange,m=e.onItemLike,v=e.onPaginationClick,g=e.autoFocus,y=e.onMount,O=e.zaInfo;return r?"bottom"===i?Object(s.b)(p.a,{className:t,containerClassName:n,autoFocus:g,parent:a,commentPattern:i,commentInputPosition:c,showPackupButton:o,handlePackupButton:this.handlePackup,needLoadCommentPermission:d,isMobile:h,onOrderChange:b,onItemLike:m,onPaginationClick:v,onMount:y,zaInfo:O}):Object(s.b)(f.b,{size:"fullPage",onClose:l,maskClosable:!1,children:r&&"fixed"===i&&Object(s.b)(p.a,{className:t,containerClassName:n,parent:a,commentPattern:i,byComment:u,needLoadCommentPermission:d,onOrderChange:b,onItemLike:m,onPaginationClick:v,onMount:y,zaInfo:O})}):null}}]),n}(d.Component);b.propTypes={className:u.a.string,containerClassName:u.a.string,byComment:u.a.oneOfType([u.a.number,u.a.string]),parent:u.a.object,shown:u.a.bool,showPackupButton:u.a.bool,commentPattern:u.a.string,commentInputPosition:u.a.oneOf(["top","bottom"]),onClose:u.a.func,needLoadCommentPermission:u.a.bool,isMobile:u.a.bool,onOrderChange:u.a.func,onItemLike:u.a.func,onPaginationClick:u.a.func,autoFocus:u.a.bool,onMount:u.a.func,zaInfo:u.a.object},b.defaultProps={commentPattern:"fixed",showPackupButton:!0,commentInputPosition:"bottom"},t.a=b},function(e,t,n){"use strict";n.d(t,"w",(function(){return s})),n.d(t,"a",(function(){return je})),n.d(t,"b",(function(){return F})),n.d(t,"c",(function(){return Ce})),n.d(t,"d",(function(){return Oe})),n.d(t,"e",(function(){return Z})),n.d(t,"f",(function(){return he})),n.d(t,"g",(function(){return Ne})),n.d(t,"h",(function(){return E})),n.d(t,"i",(function(){return Be})),n.d(t,"j",(function(){return Le})),n.d(t,"k",(function(){return A})),n.d(t,"l",(function(){return N})),n.d(t,"m",(function(){return I})),n.d(t,"n",(function(){return P})),n.d(t,"o",(function(){return K})),n.d(t,"p",(function(){return ye})),n.d(t,"q",(function(){return ge})),n.d(t,"r",(function(){return ve})),n.d(t,"s",(function(){return R})),n.d(t,"t",(function(){return ze})),n.d(t,"u",(function(){return T})),n.d(t,"v",(function(){return S})),n.d(t,"x",(function(){return ke})),n.d(t,"y",(function(){return _})),n.d(t,"z",(function(){return Ue})),n.d(t,"A",(function(){return Ke})),n.d(t,"B",(function(){return qe})),n.d(t,"C",(function(){return De})),n.d(t,"D",(function(){return He}));var r=n(55),o=n.n(r),a=n(20),i=n.n(a);let c=w();const s=e=>g(e,c);let l=w();s.write=e=>g(e,l);let u=w();s.onStart=e=>g(e,u);let d=w();s.onFrame=e=>g(e,d);let f=w();s.onFinish=e=>g(e,f);let p=[];s.setTimeout=(e,t)=>{let n=s.now()+t,r=()=>{let e=p.findIndex(e=>e.cancel==r);~e&&p.splice(e,1),k.count-=~e?1:0},o={time:n,handler:e,cancel:r};return p.splice(h(n),0,o),k.count+=1,y(),o};let h=e=>~(~p.findIndex(t=>t.time>e)||~p.length);s.cancel=e=>{c.delete(e),l.delete(e)},s.sync=e=>{v=!0,s.batchedUpdates(e),v=!1},s.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,s.onStart(n)}return r.handler=e,r.cancel=()=>{u.delete(n),t=null},r};let b="undefined"!=typeof window?window.requestAnimationFrame:()=>{};s.use=e=>b=e,s.now="undefined"!=typeof performance?()=>performance.now():Date.now,s.batchedUpdates=e=>e(),s.catch=console.error;let m=-1,v=!1;function g(e,t){v?(t.delete(e),e(0)):(t.add(e),y())}function y(){m<0&&(m=0,b(O))}function O(){~m&&(b(O),s.batchedUpdates(j))}function j(){let e=m;m=s.now();let t=h(m);t&&(C(p.splice(0,t),e=>e.handler()),k.count-=t),u.flush(),c.flush(e?Math.min(64,m-e):16.667),d.flush(),l.flush(),f.flush()}function w(){let e=new Set,t=e;return{add(n){k.count+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(k.count-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,k.count-=t.size,C(t,t=>t(n)&&e.add(t)),k.count+=e.size,t=e)}}}function C(e,t){e.forEach(e=>{try{t(e)}catch(e){s.catch(e)}})}const k={count:0,clear(){m=-1,p=[],u=w(),c=w(),d=w(),l=w(),f=w(),k.count=0}};var x=n(1);function S(){}var E=function(e,t,n){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})},R={arr:Array.isArray,obj:function(e){return!!e&&"Object"===e.constructor.name},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e}};function T(e,t){if(R.arr(e)){if(!R.arr(t)||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var A=function(e,t){return e.forEach(t)};function N(e,t,n){for(var r in e)t.call(n,e[r],r)}var _=function(e){return R.und(e)?[]:R.arr(e)?e:[e]};function I(e,t){if(e.size){var n=Array.from(e);e.clear(),A(n,t)}}var M,L,P=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return I(e,(function(e){return e.apply(void 0,n)}))},B=null,z=!1,D=S,F=Object.freeze({__proto__:null,get createStringInterpolator(){return M},get to(){return L},get colors(){return B},get skipAnimation(){return z},get willAdvance(){return D},assign:function(e){e.to&&(L=e.to),e.now&&(s.now=e.now),void 0!==e.colors&&(B=e.colors),null!=e.skipAnimation&&(z=e.skipAnimation),e.createStringInterpolator&&(M=e.createStringInterpolator),e.requestAnimationFrame&&s.use(e.requestAnimationFrame),e.batchedUpdates&&(s.batchedUpdates=e.batchedUpdates),e.willAdvance&&(D=e.willAdvance)}}),U=new Set,V=[],q=[],H=0,K={get idle(){return!U.size&&!V.length},start:function(e){H>e.priority?(U.add(e),s.onStart(Q)):(W(e),s(Y))},advance:Y,sort:function(e){if(H)s.onFrame((function(){return K.sort(e)}));else{var t=V.indexOf(e);~t&&(V.splice(t,1),G(e))}},clear:function(){V=[],U.clear()}};function Q(){U.forEach(W),U.clear(),s(Y)}function W(e){V.includes(e)||G(e)}function G(e){var t,n,r;V.splice((n=function(t){return t.priority>e.priority},(r=(t=V).findIndex(n))<0?t.length:r),0,e)}function Y(e){for(var t=q,n=0;n<V.length;n++){var r=V[n];H=r.priority,r.idle||(D(r),r.advance(e),r.idle||t.push(r))}return H=0,(q=V).length=0,(V=t).length>0}var Z={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},X="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var $=new RegExp("rgb"+J(X,X,X)),ee=new RegExp("rgba"+J(X,X,X,X)),te=new RegExp("hsl"+J(X,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+J(X,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",X)),re=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function ce(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,a=ce(o,r,e+1/3),i=ce(o,r,e),c=ce(o,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*i)<<16|Math.round(255*c)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function ue(e){return(parseFloat(e)%360+360)%360/360}function de(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ae.exec(t))?parseInt(n[1]+"ff",16)>>>0:B&&void 0!==B[t]?B[t]:(n=$.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|de(n[4]))>>>0:(n=re.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ie.exec(t))?parseInt(n[1],16)>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=te.exec(t))?(255|se(ue(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=ne.exec(t))?(se(ue(n[1]),fe(n[2]),fe(n[3]))|de(n[4]))>>>0:null;if(null===r)return e;var o=(16711680&(r=r||0))>>>16,a=(65280&r)>>>8,i=(255&r)/255;return"rgba(".concat((4278190080&r)>>>24,", ").concat(o,", ").concat(a,", ").concat(i,")")}var he=function e(t,n,r){if(R.fun(t))return t;if(R.arr(t))return e({range:t,output:n,extrapolate:r});if(R.str(t.output[0]))return M(t);var o=t,a=o.output,i=o.range||[0,1],c=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",l=o.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,a,i,c,s){var l=s?s(e):e;if(l<t){if("identity"===i)return l;"clamp"===i&&(l=t)}if(l>n){if("identity"===c)return l;"clamp"===c&&(l=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=a(l),r===-1/0?l=-l:o===1/0?l+=r:l=l*(o-r)+r;return l}(e,i[t],i[t+1],a[t],a[t+1],l,c,s,o.map)}};var be=Symbol.for("FluidValue.get"),me=Symbol.for("FluidValue.observers"),ve=function(e){return Boolean(e&&e[be])},ge=function(e){return e&&e[be]?e[be]():e},ye=function(e){return e[me]||null};function Oe(e,t){var n=e[me];n&&n.forEach((function(e){!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var je=function e(t){if(i()(this,e),!t&&!(t=this.get))throw Error("Unknown getter");we(this,t)},we=function(e,t){return Se(e,be,t)};function Ce(e,t){if(e[be]){var n=e[me];n||Se(e,me,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ke(e,t){var n=e[me];if(n&&n.has(t)){var r=n.size-1;r?n.delete(t):e[me]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var xe,Se=function(e,t,n){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})},Ee=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Re=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Te=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ae=function(e,t,n,r,o){return"rgba(".concat(Math.round(t),", ").concat(Math.round(n),", ").concat(Math.round(r),", ").concat(o,")")},Ne=function(e){xe||(xe=B?new RegExp("(".concat(Object.keys(B).join("|"),")"),"g"):/^\b$/);var t=e.output.map((function(e){return ge(e).replace(Re,pe).replace(xe,pe)})),n=t.map((function(e){return e.match(Ee).map(Number)})),r=n[0].map((function(e,t){return n.map((function(e){if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]}))})).map((function(t){return he(Object.assign({},e,{output:t}))}));return function(e){var n=0;return t[0].replace(Ee,(function(){return String(r[n++](e))})).replace(Te,Ae)}},_e="react-spring: ",Ie=function(e){var t=e,n=!1;if("function"!=typeof t)throw new TypeError("".concat(_e,"once requires a function parameter"));return function(){n||(t.apply(void 0,arguments),n=!0)}},Me=Ie(console.warn);function Le(){Me("".concat(_e,'The "interpolate" function is deprecated in v9 (use "to" instead)'))}var Pe=Ie(console.warn);function Be(){Pe("".concat(_e,'Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead)'))}function ze(e){return R.str(e)&&("#"==e[0]||/\d/.test(e)||e in(B||{}))}var De=function(e){return Object(x.useEffect)(e,Fe)},Fe=[];function Ue(){var e=Object(x.useState)()[1],t=Object(x.useState)(Ve)[0];return De(t.unmount),function(){t.current&&e({})}}function Ve(){var e={current:!0,unmount:function(){return function(){e.current=!1}}};return e}function qe(e,t){var n=Object(x.useState)((function(){return{inputs:t,result:e()}})),r=o()(n,1)[0],a=Object(x.useRef)(),i=a.current,c=i;c?Boolean(t&&c.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,c.inputs))||(c={inputs:t,result:e()}):c=r;return Object(x.useEffect)((function(){a.current=c,i==r&&(r.inputs=r.result=void 0)}),[c]),c.result}function He(e){var t=Object(x.useRef)();return Object(x.useEffect)((function(){t.current=e})),t.current}var Ke="undefined"!=typeof window&&window.document&&window.document.createElement?x.useLayoutEffect:x.useEffect},function(e,t,n){"use strict";var r,o=n(80),a=n.n(o),i=n(1),c=n(3),s=n.n(c),l=n(887),u=n(30),d=new Uint8Array(16);function f(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(d)}var p=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var h=function(e){return"string"==typeof e&&p.test(e)},b=[],m=0;m<256;++m)b.push((m+256).toString(16).substr(1));var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+"-"+b[e[t+4]]+b[e[t+5]]+"-"+b[e[t+6]]+b[e[t+7]]+"-"+b[e[t+8]]+b[e[t+9]]+"-"+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase();if(!h(n))throw TypeError("Stringified UUID is invalid");return n};var g=function(e,t,n){var r=(e=e||{}).random||(e.rng||f)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return v(r)},y=n(5);var O={id:10291,name:"开始播放"},j={id:10366,name:"播放暂停"},w={id:10367,name:"播放结束"},C={id:10364,name:"有效播放"},k={id:10365,name:"感兴趣播放"},x={onSixSecond:6,onThreeSecond:3};var S={name:"1mzat5w-VideoWrapper",styles:"width:100%;height:100%;;label:VideoWrapper;"},E=Object(i.forwardRef)((function(e,t){var n=e.src,r=e.className,o=e.iframeProps,c=o.autoplay,s=o.useMSE,d=a()(o,["autoplay","useMSE"]),f="?player=".concat(JSON.stringify({autoplay:c,useMSE:s})),p=function(e){if(!e)return null;var t=new URL(e).pathname.match(/^\/video\/(\d+)$/);return t&&t[1]?t[1]:null}(n),h=Object(i.useRef)(Object(l.c)(p,"*",!0)),b=Object(i.useRef)(null),m=Object(i.useRef)(g()),v=Object(i.useRef)(!1),E=Object(i.useRef)(!1),R=Object(i.useRef)(!1),T=Object(i.useCallback)((function(e,t,n){if("onThreeSecond"===e){if(E.current)return;E.current=!0}if("onSixSecond"===e){if(R.current)return;R.current=!0}if("onEnd"===e){if(v.current)return;v.current=!0}var r=n.currentTime,o=n.duration;u.a.trackEvent(b.current,{id:t.id,action:c?"AutoPlay":"Play",name:t.name},{play:{play_event_identifier:m.current,elapsed:1e3*r,duration:1e3*o},module:[{card:{content:{video_id:p}}}]})}),[c,p]),A=Object(i.useCallback)((function(e,t,n){var r=n.currentTime;Math.floor(r)===x[e]&&T(e,t,n)}),[T]);return Object(i.useEffect)((function(){var e=h.current.subscribeMessage((function(e,t){e===l.b.DOM.PLAY&&T("onPlay",O,t),e===l.b.DOM.PAUSE&&T("onPause",j,t),e===l.b.DOM.ENDED&&T("onEnded",w,t),e===l.b.DOM.TIMEUPDATE&&A("onThreeSecond",C,t),e===l.b.DOM.TIMEUPDATE&&A("onSixSecond",k,t)}));return function(){return e&&e.unsubscribe()}}),[T,A]),Object(y.g)("div",{ref:b,className:r},Object(y.g)("iframe",Object.assign({ref:t,src:"".concat(n).concat(f)},d,{frameBorder:"0",css:S})))}));E.propTypes={className:s.a.string,src:s.a.string.isRequired,iframeProps:s.a.object},E.defaultProps={src:"",iframeProps:{autoplay:!1,useMSE:!1}};var R={video:E},T=Object(i.forwardRef)((function(e,t){var n=e.type,r=void 0===n?"video":n,o=a()(e,["type"]),i=R[r];return Object(y.g)(i,Object.assign({ref:t},o))}));T.propTypes={type:s.a.oneOf(["video"])};t.a=T},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(1432),p=n(31),h=n(30),b=n(365),m=n(205);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var g=function(e){Object(a.a)(n,e);var t=v(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).buttonRef=Object(d.createRef)(),e.handleClick=function(t){var n=e.props,r=n.zaInfos,o=r.toggleComment,a=r.getCommentAction,i=n.positionStatus,c=n.onClick,s=n.commentsShown;if(h.a.trackEvent(e.buttonRef.current,Object.assign({action:a?a(!s):"Comment",element:"Button",is_intent:!0},o&&{id:o})),c){var l="fixed"===i?"fixed":"bottom",u={commentsShown:!e.props.commentsShown,commentsAutoFocus:!(t instanceof KeyboardEvent),commentPattern:l};t instanceof KeyboardEvent&&"bottom"===l&&e.buttonRef.current.focus(),c(t,u)}},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.onInstance(this)}},{key:"componentWillUnmount",value:function(){this.props.onInstance(null)}},{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.count,o=t.commentsShown,a=t.commentClosed;o?e="收起评论":e=r&&!a?"".concat(Object(b.formatNumber)(r)," 条评论"):"添加评论";return Object(s.c)(d.Fragment,{children:[Object(s.b)(m.c,{keyMap:{COMMENT:"c"},handlers:{COMMENT:this.handleClick}}),Object(s.b)(p.c,{onRef:this.buttonRef,preset:"plain",className:n,onClick:this.handleClick,icon:f.a,label:e})]})}}]),n}(d.Component);g.propTypes={commentsShown:u.a.bool,count:u.a.number,zaInfos:u.a.shape({id:u.a.number,getCommentAction:u.a.func}),onInstance:u.a.func},g.defaultProps={zaInfos:{},onInstance:function(){return null}};t.a=g},function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(27),i=n(78),c=n(53),s=n(1),l=n(233),u=n.n(l),d=n(34),f=n(63),p=n(30);function h(e,t){var n=e.isPinProfile,a=e.user,c=e.isPinDaily,s=e.onClick,l=void 0===s?u.a:s,h=e.children,b=Object(r.a)(e,["isPinProfile","user","isPinDaily","onClick","children"]),m=a.id,v=a.urlToken,g=a.isOrg,y=a.url,O=a.maskLevel,j="//www.zhihu.com/".concat(g?"org":"people","/").concat(v||m),w="zhihu://pin".concat(y,"/moments"),C=Object(i.c)((function(e){c&&"A"===e.target.nodeName&&p.a.trackEvent(e.target,{id:2065}),n&&(e.preventDefault(),f.a.dispatch("base/openURL",{url:w})),O&&e.preventDefault(),l(e)}));return Object(o.b)(d.Link,Object.assign({ref:t,to:j,target:"_blank",onClick:C,className:"UserLink-link","data-za-detail-view-element_name":"User"},b,{children:h}))}var b=Object(s.forwardRef)(h),m=n(894);t.a=function(e){var t=e.user,s=e.noHoverCard,l=e.noLink,u=e.children,d=Object(r.a)(e,["user","noHoverCard","noLink","children"]),f=t.id,p=t.urlToken,h=!Object(m.a)(t)||l,v=Object(a.useSelector)((function(e){return Object(c.d)(e,{includeTablet:!0})})),g=null!=s?s:v,y=Object(i.d)((function(){return n.e(56).then(n.bind(null,1150))}),!g);if(h)return u||null;var O=Object(o.b)(b,Object.assign({},d,{user:t,children:u}));return g||!y?O:Object(o.b)(y,{toggler:O,id:f,urlToken:p,user:t})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var r=n(28),o=n.n(r),a=n(253),i=n.n(a);function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l={BASIC_STYLING:"basic_styling",LIST_CONTENT:"list_content",BLOCK_CONTENT:"block_content",STRUCTURE_STYLING:"structure_styling",FORMAT_EDITING:"format_editing",MENU:"menu",RIGHT_SIDE:"right_side",BASIC_MEDIA:"basic_media",PROFESSIONAL_MEDIA:"professional_media",CUSTOM_MAIN:"custom_main"},u=function(e){var t,n=Object.values(l).reduce((function(e,t){return Object.assign({},e,o()({},t,[]))}),{}),r=c(e);try{for(r.s();!(t=r.n()).done;){var a=t.value.toolbar;if(i()(a)||Array.isArray(a)){i()(a)&&(a=[a]);var s,u=c(a);try{for(u.s();!(s=u.n()).done;){var d=s.value,f=d.section;n[void 0===f?"custom-main":f].push(d)}}catch(e){u.e(e)}finally{u.f()}}}}catch(e){r.e(e)}finally{r.f()}return n};t.a=l},function(e,t,n){"use strict";n.d(t,"b",(function(){return f}));var r=n(28),o=n.n(r),a=n(253),i=n.n(a),c=n(938),s=n.n(c);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d={CONTENT_OPERATION:"content_operation",TEXT_STYLE:"text_style",LIST:"list",BLOCK:"block",STRUCTURE_GENERATION:"structure_generation",PROFESSIONAL_MEDIA:"professional_media",BASIC_MEDIA:"basic_media",BUSINESS_MEDIA:"business_media"},f=function(e){var t,n=Object.values(d).reduce((function(e,t){return Object.assign({},e,o()({},t,[]))}),{}),r=[],a=[],c=l(e);try{for(c.s();!(t=c.n()).done;){var u=t.value.toolbarV2;if(i()(u)||Array.isArray(u)){var f,p=l(i()(u)?[u]:u);try{for(p.s();!(f=p.n()).done;){var h=f.value;h.parentName?a.push(h):r.push(h)}}catch(e){p.e(e)}finally{p.f()}}}}catch(e){c.e(e)}finally{c.f()}for(var b=function(){var e=v[m],t=e.section,r=e.parentName,o=n[t];if(r){var a=o.find((function(e){return e.name===r}));if(!a)return"continue";a.childItems||(a.childItems=[]),a.childItems.includes(e)||(a.childItems.push(e),a.childItems=s()(a.childItems,(function(e){var t;return null!==(t=e.priority)&&void 0!==t?t:1/0})))}else o.push(e),o=s()(o,(function(e){var t;return null!==(t=e.priority)&&void 0!==t?t:1/0}));n[t]=o},m=0,v=[].concat(r,a);m<v.length;m++)b();return n};t.a=d},function(e,t,n){},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(35),o=n(2),a=n(11),i=n.n(a),c=n(370),s=n(894),l=n(955),u=n(891),d=n(903);function f(e){var t,n,a=e.className,f=e.showVipIcon,p=e.vipIconZaViewName,h=e.user,b=void 0===h?{}:h,m=e.noBadge,v=e.children,g=e.badgeProps,y=void 0===g?{}:g,O=Object(r.a)(e,["className","showVipIcon","vipIconZaViewName","user","noBadge","children","badgeProps"]),j=Object(s.a)(b),w=j&&!m,C=null===(t=b.vipInfo)||void 0===t?void 0:t.isVip,k=j&&f&&(null===(n=b.vipInfo)||void 0===n?void 0:n.vipIcon);return Object(o.c)("span",{className:i()("UserLink",a),children:[Object(o.b)(d.a,Object.assign({},O,{user:b,children:v||b.name})),w&&Object(o.b)(c.c,Object.assign({css:{marginLeft:".3em"},isOrg:b.isOrg,badge:b.badgeV2||b.badge,linkify:!0,enableTooltip:!0},y)),C&&Object(o.b)(l.a,{css:{marginLeft:".3em"}}),k&&Object(o.b)(u.a,{vipIcon:b.vipInfo.vipIcon,zaViewName:p})]})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(33),o=n.n(r),a=n(140),i=n(41),c=n.n(i),s=n(1),l=n.n(s),u=n(90),d=n(1305),f=n(1271),p=n(1290),h=n(11),b=n.n(h),m=n(132),v=n(851),g=n(5);var y={name:"16fhh0i",styles:"&+.Catalog-FirstLevelTitle{margin-top:12px;}&+.Catalog-SecondLevelTitle{margin-top:6px;}"},O={name:"160ybly",styles:"cursor:pointer;align-items:center;"},j=function(e){var t=e.children,n=e.pl,r=e.targetId,i=e.handleScroll,s=e.index,l=c()(e,["children","pl","targetId","handleScroll","index"]);return Object(g.g)(u.Text,o()({flexShrink:0,display:"flex",alignItems:"center",color:"GBK02A",fontSize:"12px",height:"20px",lineHeight:"19px",css:y},l),Object(g.g)(u.Flex,{pl:n,css:O,"data-catalog-target-id":r,"data-za-detail-view-id":"9745","data-za-detail-view-action":"Click","data-za-detail-view-name":"正文",onClick:function(e){i(e,s)}},Object(g.g)(u.Text,{css:Object(a.a)([Object(m.d)(1),{pointerEvents:"none",wordBreak:"break-all"}],""),dangerouslySetInnerHTML:{__html:t}}),Object(g.g)(d.a,{size:"20px",css:function(e){var t;return{color:null===(t=e.colors)||void 0===t?void 0:t.GBK08A,flex:"0 0 auto",pointerEvents:"none"}}})))},w={name:"16fhh0i",styles:"&+.Catalog-FirstLevelTitle{margin-top:12px;}&+.Catalog-SecondLevelTitle{margin-top:6px;}"},C=function(e){var t=e.className,n=c()(e,["className"]);return Object(g.g)(j,o()({className:b()(t,"Catalog-FirstLevelTitle"),fontWeight:"bold",css:w},n))},k={name:"q7f27s",styles:"&+.Catalog-FirstLevelTitle{margin-top:12px;}&+.Catalog-SecondLevelTitle{margin-top:0px;}"},x={name:"4g6ai3",styles:"cursor:pointer;"},S={name:"eg4v4b",styles:"margin-top:1px;"},E=l.a.forwardRef((function(e,t){var n=e.isFold,r=e.onClick,o=n?f.a:p.a,a=n?"展开目录":"收起目录";return Object(g.g)(l.a.Fragment,null,Boolean(n)&&Object(g.g)("div",{className:"bottom-shadow",css:function(e){return{position:"absolute",bottom:"25px",width:"100%",height:"40px",background:"linear-gradient(to bottom, ".concat(e.colorMod(e.colors.GBK99A).alpha(0),", ").concat(e.colors.GBK99A,")")}}}),Object(g.g)(u.Flex,{ref:t,alignItems:"center",justifyContent:"center",height:"25px",fontSize:"12px",color:"GBL05A",css:x,onClick:r},a,Object(g.g)(o,{size:18,css:S})))})),R={1:C,2:function(e){var t=e.className,n=c()(e,["className"]);return Object(g.g)(j,o()({className:b()(t,"Catalog-SecondLevelTitle"),pl:"10px",css:k},n))}},T={name:"7cjcr7",styles:"& .Catalog-wrapper{position:relative;}"},A={name:"npr4z8",styles:"margin-bottom:18px !important;margin-top:0px !important;"};t.b=function(e){var t=e.catalog,n=e.className,r=e.canFold,o=e.inEditor,a=e.scrollOffset,i=void 0===a?0:a,c=r&&!o&&(null==t?void 0:t.length)>3,l=Object(s.useCallback)((function(e,t){if(o){var n=document.querySelector(".DraftEditor-editorContainer");if(n){var r=Array.from(n.querySelectorAll("h2,h3"))[t];r&&requestAnimationFrame((function(){return Object(v.a)(r,i)}))}}}),[o,i]);return(null==t?void 0:t.length)?Object(g.g)(u.Box,{className:b()(n,"Catalog"),mb:"48px",css:T,"data-za-detail-view-name":"正文"},Object(g.g)("h2",{css:A},"目录"),Object(g.g)(u.Box,{className:"Catalog-wrapper"},Object(g.g)(u.Flex,{className:"Catalog-content",flexDirection:"column",fontSize:"12px",overflow:"hidden",height:c?"84px":"auto"},t.map((function(e){var t=e.titleLevel,n=e.text,r=e.targetId,o=e.index,a=R[t]||C;return Object(g.g)(a,{key:String([r,o]),targetId:r,handleScroll:l,index:o},n)}))),Boolean(c)&&Object(g.g)(E,{isFold:!0}))):o?Object(g.g)(u.Flex,{flexDirection:"column",alignItems:"center",mb:"18px"},Object(g.g)(u.Box,{size:"160px",mb:"10px"},Object(g.g)(u.Image,{size:"100%",src:"https://pic1.zhimg.com/v2-acf70e51e6f95a027a65a9209fd6a330_r.png"})),Object(g.g)(u.Text,{color:"GBK06A",fontSize:"17px",lineHeight:"24px",textAlign:"center"},"在内容中设置标题将会在此处同步展示")):null}},,function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(84),i=n(574);t.a=function(e){var t=e.checked,n=e.children,c=Object(r.a)(e,["checked","children"]);return Object(o.c)(a.b,Object.assign({},c,{children:[Object(o.b)("span",{css:{display:"inline-block",width:24,marginLeft:-24},children:t&&Object(o.b)(i.a,{text:!0,center:!0})}),n]}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return ie})),n.d(t,"a",(function(){return ce}));var r=n(55),o=n.n(r),a=n(1),i=n.n(a),c=n(7),s=n(63),l=n(841),u=n(79),d=n.n(u),f=n(1172),p=n(835),h=n(232),b=n(30),m=n(233),v=n.n(m),g=n(11),y=n.n(g),O=n(996),j=n(33),w=n.n(j),C=n(41),k=n.n(C),x=n(20),S=n.n(x),E=n(21),R=n.n(E),T=n(22),A=n.n(T),N=n(23),_=n.n(N),I=n(13),M=n.n(I),L=n(5);function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=M()(e);if(t){var o=M()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _()(this,n)}}var B=function(e){A()(n,e);var t=P(n);function n(){return S()(this,n),t.apply(this,arguments)}return R()(n,[{key:"render",value:function(){return Object(L.g)("svg",{width:"30",height:"30",viewBox:"0 0 66 66",xmlns:"http://www.w3.org/2000/svg",className:"CircleLoadingBar","aria-hidden":"true"},Object(L.g)("g",null,Object(L.g)("circle",{className:"path",fill:"none",strokeWidth:"6",strokeLinecap:"round",cx:"33",cy:"33",r:"30"})))}}]),n}(a.Component),z=n(1005);var D=function(e){var t=e.className,n=e.url,r=e.source,o=k()(e,["className","url","source"]),a="苏宁"===r?"拼购":"",i="目前".concat(r,"暂不支持在电脑端购买").concat(a,"商品");return Object(L.g)(z.a,w()({className:y()("QRCodeModal",t)},o),Object(L.g)("div",{className:"QRCodeModal-title"},"用知乎 App 扫码查看"),Object(L.g)("div",{className:"QRCodeModal-tip"},i),Object(L.g)("div",{className:"QRCodeModal-qrcode"},Object(L.g)(B,null),Object(L.g)("img",{src:"https://www.zhihu.com/qrcode?url=".concat(encodeURIComponent(n))})))},F=n(140),U=n(132);var V=function(e){return Object(L.g)("svg",w()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 12",fill:"currentColor"},e),Object(L.g)("path",{d:"M5,0 C7.7615,0 10,2.074 10,4.632 C10,8 8.681,9.6805 6.043,11.657 C5.463,12.0915 4.6455,12.1135 4.041,11.722 L3.952,11.66 L3.766,11.5195 C1.2555,9.5815 0,8 0,4.632 C0,2.074 2.2385,0 5,0 Z M5,1.5 C3.0425,1.5 1.5,2.929 1.5,4.632 C1.5,7.1075 2.159,8.3245 4.368,10.0855 L4.672,10.3235 L4.8565,10.463 C4.926,10.508 5.033,10.5115 5.109,10.4765 L5.144,10.4565 C7.708,8.535 8.5,7.2275 8.5,4.631 C8.5,2.9295 6.9575,1.5 5,1.5 Z M5,3 C5.82842712,3 6.5,3.67157288 6.5,4.5 C6.5,5.32842712 5.82842712,6 5,6 C4.17157288,6 3.5,5.32842712 3.5,4.5 C3.5,3.67157288 4.17157288,3 5,3 Z"}))};var q={hotel:"酒店",ticket:"门票"},H=Object.keys(q);var K={name:"1rguia",styles:"display:flex;padding:14px;"},Q={name:"1c8iba8",styles:"flex:1;margin-left:12px;overflow:hidden;"},W={name:"gg4vpm",styles:"display:flex;justify-content:space-between;"},G={name:"zjqrkl",styles:"font-size:12px;line-height:1;vertical-align:1px;"},Y={name:"1q27zj9",styles:"flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"};function Z(e){var t,n,r,o=e.onRef,a=e.data,i=e.titleRightArea,c=a.imgUrl,s=a.title,l=a.priceText,u=a.areaName,d=Object(U.e)();return Object(L.g)("div",{css:K,ref:o},Object(L.g)("img",{src:c,css:Object(F.a)([{width:75,height:100,borderRadius:6,flexShrink:0,objectFit:"cover"},d],"")}),Object(L.g)("div",{css:Q},Object(L.g)("div",{css:W},Object(L.g)("div",{css:function(e){return Object.assign({color:e.colors.GBK02A,fontSize:15,fontWeight:e.fontWeights.bold,lineHeight:1.2,height:36},Object(U.d)(2))}},s),i),Object(L.g)("div",{css:function(e){return{color:e.colors.GBK05A,fontSize:12,marginTop:4,fontWeight:e.fontWeights.bold,height:16,lineHeight:"16px"}}},(n=(t=a).source,r=t.productTypeName,[n,q[r]].filter(Boolean).join(" · "))),Object(L.g)("div",{css:function(e){return{display:"flex",alignItems:"center",color:e.colors.GRD08A,marginTop:8,height:18,lineHeight:"18px"}}},Object(L.g)("div",{css:function(e){return{fontSize:15,fontWeight:e.fontWeights.bold}}},l," ",Object(L.g)("span",{css:G},"起")),Object(L.g)("div",{role:"button",css:function(e){return{marginLeft:"auto",cursor:"pointer",fontSize:13,fontWeight:e.fontWeights.bold}}},"去购买 ",Object(L.g)(p.a,{size:16,center:!0}))),Object(L.g)("div",{css:function(e){return{display:"flex",alignItems:"center",marginTop:2,height:18,lineHeight:1,fontSize:12,color:e.colors.GBK06A,fontWeight:e.fontWeights.bold,overflow:"hidden",transform:"scale(0.92)",transformOrigin:"left"}}},Object(L.g)(V,{width:"12",height:"12",css:Object(F.a)({flexShrink:0,marginTop:-1,marginRight:2},"")}),Object(L.g)("span",{css:Y},u))))}var X=Object(a.forwardRef)((function(e,t){return Object(L.g)(Z,w()({onRef:t},e))})),J={jingdong:"https://zhihu-live.zhimg.com/namespace_1001/static/20210302/49ab350f2a978c498a772cca64bed957.png",taobao:"https://zhihu-live.zhimg.com/namespace_1001/static/20210302/a8b2060a0b5d2c430e35ac415e19799c.png",pinduoduo:"https://zhihu-live.zhimg.com/namespace_1001/static/20210302/32e7577190980fd93efe88e79290ac2a.png",suning:"https://zhihu-live.zhimg.com/namespace_1001/static/20210302/380c2640df67aa0dac0e476f231868bc.png",meituanhotel:"https://zhihu-live.zhimg.com/namespace_1001/static/20210302/84810f4277ac3237497d30dae0ccf6e6.png",youzan:"https://zhihu-live.zhimg.com/namespace_1001/static/20210302/cb99f968d536fa5fcdfb457c08ec8325.png",zhihu:"https://zhihu-live.zhimg.com/namespace_1001/static/20210302/241545a9b1f94a0a9673708a20912fd1.png"};var $=function(e){var t=e.width,n=void 0===t?"16":t,r=e.height,o=void 0===r?"16":r;return Object(L.g)("svg",w()({width:n,height:o,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Object(L.g)("path",{d:"M8.31461 8L5.74555 10.5685C5.41807 10.896 5.41807 11.4269 5.74555 11.7544C6.07302 12.0819 6.60396 12.0819 6.93144 11.7544L10.0929 8.59295C10.2502 8.43572 10.3386 8.22242 10.3386 8C10.3386 7.77758 10.2502 7.56428 10.0929 7.40705L6.93144 4.24561C6.60396 3.91813 6.07302 3.91813 5.74555 4.24561C5.41807 4.57308 5.41807 5.10402 5.74555 5.4315L8.31461 8Z",fill:"#FF7955"}))},ee=n(383);var te=function(e){var t,n,r,o,a,i,l,u,f,b=e.id,m=e.bottomInfo,v=e.type,g=e.scenes,O=e.fetcher,j=d()(null===(t=navigator)||void 0===t?void 0:t.userAgent)||{},w=j.ZhihuHybrid,C=j.Safari,k=j.iOS,x=j.Android,S=function(e){w?s.a.supportsAction("mcn/openURL").then((function(t){t?s.a.dispatch("mcn/openURL",{type:v,scenes:g,url:e,fallbackUrl:e}):C?window.location.href=e:window.open(e,"_blank")})):C?window.location.href=e:window.open(e,"_blank")},E=function(e,t){if(e){var n=e.clickUrl,r=e.clickType;if(n){if(t.preventDefault(),t.stopPropagation(),"redirect"!==r)return"linkcard"===r?S(n):void(w?s.a.dispatch("base/openURL",{url:n}):S(n));O&&O(n).then((function(e){var t=Object(c.camelizeKeys)(e.data)||{},n=t.url,r=t.appSchemaIos,o=t.appSchemaAndroid;S(k?r:x?o:n)}))}}};return Object(L.g)(h.b,{content:{id:b,type:"GoodsRecommend"}},Object(L.g)(h.e,{zaText:!0,as:"div",zaType:"Card",zaBlock:"goodsRecommendCardBottomInfo",className:"BottomInfo"},Object(L.g)(h.a,{as:"div",zaText:!0,zaAction:"OpenUrl",zaBlock:"icon",zaType:"Button",extra:{link:{url:null===(n=m.icon)||void 0===n?void 0:n.clickUrl}},onClick:function(e){return E(m.icon,e)}},Object(L.g)("img",{src:null===(r=m.icon)||void 0===r?void 0:r.iconUrl,alt:""}),Object(L.g)("span",{className:y()({"MCNLinkCard-cardBottom-iconText":"redirect"===(null===(o=m.icon)||void 0===o?void 0:o.clickType)||"linkcard"===(null===(a=m.icon)||void 0===a?void 0:a.clickType)})},null===(i=m.icon)||void 0===i?void 0:i.iconText)),Object(L.g)(h.a,{as:"span",className:"MCNLinkCard-cardBottom-arrowText",zaText:!0,zaAction:"OpenUrl",zaBlock:"text",zaType:"Text",extra:{link:{url:null===(l=m.text)||void 0===l?void 0:l.clickUrl}},onClick:function(e){return E(m.text,e)}},null===(u=m.text)||void 0===u?void 0:u.text,(null===(f=m.text)||void 0===f?void 0:f.clickUrl)&&Object(L.g)(p.a,null))))},ne=function(e){var t=e.id,n=e.skuId,r=e.source,o=e.image,i=e.title,c=e.price,s=void 0===c?"0.00":c,l=e.sourceList,u=void 0===l?[]:l,f=e.bottomInfo,p=e.isContent,m=e.onRef,v=e.scenes,g=e.fetcher,O=Object(ee.versionControl)(d.a,{IOS:"7.8.0",ANDROID:"7.4.0"}),j=d()(navigator.userAgent),w=j.Mobile,C=j.Android,k=j.iOS,x=j.ZhihuHybrid,S=w?O&&x&&k?"zhihu://goods/bottom_sheet_hybrid?url=https://www.zhihu.com/grapp/select/method?page=paperBook&paperBookCardId=".concat(t):O&&x&&C?"https://www.zhihu.com/goods/bottom_sheet_hybrid?url=https://www.zhihu.com/grapp/select/method?page=paperBook&paperBookCardId=".concat(t):"https://www.zhihu.com/grapp/select/method?page=paperBook&paperBookCardId=".concat(t):"";Object(a.useEffect)((function(){b.a.trackCardShow(null,{id:10329,path:[{module_name:"".concat(t,"_").concat(n,"_").concat(r)}]})}),[]);return Object(L.g)(h.b,{as:"div",className:"AssociatedCard",block:"polymericCard",content:{type:"GoodsRecommend",id:"".concat(t,"-").concat(n,"-").concat(r)},extra:{link:{url:S}}},Object(L.g)(h.e,{as:"div",ref:m,className:"AssociatedCard-cardContainer",shouldTrackClick:!0,zaType:"Card",zaText:i,zaAction:"OpenUrl",zaEventType:"Click",extra:{link:{url:S}},onClick:function(){b.a.trackEvent(null,{id:10330,action:"OpenUrl",path:[{module_name:"".concat(t,"_").concat(n,"_").concat(r)}]})}},Object(L.g)("div",{className:y()("AssociatedCard-imageBox")},Object(L.g)("img",{className:"AssociatedCard-image",src:o,alt:""})),Object(L.g)("div",{className:"AssociatedCard-main"},Object(L.g)("div",{className:"AssociatedCard-title"},i),Object(L.g)("div",{className:"AssociatedCard-tool"},Object(L.g)("div",{className:"AssociatedCard-price"},Object(L.g)("span",null,s),Object(L.g)("span",{className:"AssociatedCard-priceQi"},"起")),Object(L.g)("div",{className:"AssociatedCard-sources"},u.length&&u.map((function(e,t){return t>2?null:Object(L.g)("img",{key:e,className:"AssociatedCard-sourceLogo",src:J[e],alt:""})})),Object(L.g)("span",{className:"AssociatedCard-sourceLength",style:{display:u.length>3?"inline-flex":"none"}},u.length),Object(L.g)($,{height:21,width:24,size:24,css:function(e){var t;return{color:null===(t=e.colors)||void 0===t?void 0:t.GRD08A}}}))))),f&&p&&Object(L.g)(te,{id:t,bottomInfo:f,type:r,fetcher:g,scenes:v}))},re=Object(a.forwardRef)((function(e,t){return Object(L.g)(ne,w()({onRef:t},e))})),oe=n(3),ae=n.n(oe),ie={CONTENT:0,MENTION_IN_CONTENT:1,SHOWCASE:2,LIVING_THEATER:3},ce={EDITOR:"editor",CONTENT:"content"},se=1,le={"淘宝":"taobao","天猫":"tmall","京东":"jingdong","京东自营":"jingdongSale","知乎":"zhihu","美团酒旅":"meituanhotel","苏宁":"suning","有赞":"youzan","拼多多":"pinduoduo"};function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.trimZero,r=void 0!==n&&n,o=String(e).padStart(2,"0").slice(-2);return r&&"00"===o?"".concat(Math.floor(e/100)):"".concat(Math.floor(e/100),".").concat(o)}function de(e){var t=e.source,n=e.producer,r=e.price,o=e.zhihuVipText,a=e.isInvalidCard;if(null===r)return null;var i="¥ ".concat(ue(r)).concat("网络文学"===n?"/千字":"");return o?Object(L.g)("div",{className:"MCNLinkCard-VIPPrice"},Object(L.g)("span",{className:"MCNLinkCard-VIPPriceHint"},o),Object(L.g)("span",{className:"MCNLinkCard-originalPrice"},i)):Object(L.g)("div",{className:y()("MCNLinkCard-price",{"MCNLinkCard-price--invalid":a})},"拼多多"===t&&Object(L.g)("span",{className:"MCNLinkCard-pricePrefix"},"拼团价"),Object(L.g)("span",null,i))}function fe(e,t){var n=Object(a.useState)(null),r=o()(n,2),u=r[0],m=r[1],g=Object(a.useState)(!1),j=o()(g,2),w=j[0],C=j[1],k=e.component,x=void 0===k?"a":k,S=e.id,E=e.scenes,R=void 0===E?ie.CONTENT:E,T=e.className,A=e.onClick,N=e.onMouseDown,_=e.onClickGoodsPrice,I=e.refetchKey,M=e.onData,P=void 0===M?v.a:M,B=e.processResponse,z=e.getUrl,F=e.buttonText,U=e.fetcher,V=void 0===U?O.a:U,q=e.fetcherOptions,K=e.cardShowHandler,Q=e.disableZa,W=e.titleRightArea,G=e.titleRightText,Y=e.position,Z=void 0===Y?ce.CONTENT:Y,J=e.goodsRecommendCards,$=Object(a.useRef)(null);if(Object(a.useEffect)((function(){if(null!==I)if(J&&J[S])m(Object(c.camelizeKeys)(J[S]));else{var e=z?z(S):"/api/v4/mcn/linkcard/".concat(S,"?scenes=").concat(R);V(e,q).then((function(e){var t=B?B(e):Object(c.camelizeKeys)(e.data);m(t),P(t)})).catch((function(){}))}}),[S,R,m,P,I,z,B,V,q,J]),Object(a.useEffect)((function(){$.current&&!Q&&Object(l.onViewedOnce)($.current.parentNode,(function(){var e=u.skuid,t=u.source;b.a.trackCardShow($.current.parentNode,{id:6108,path:[{module_name:"".concat(S,"_").concat(e,"_").concat(le[t])}]},{button:{text:$.current.parentNode.dataset.zaExtraButtonText}})}))}),[K,u,Q,S]),!u)return Object(L.g)(x,{ref:t,className:y()("MCNLinkCard","MCNLinkCard-placeholder",T),"data-draft-node":"block","data-draft-type":"mcn-link-card"});var ee=u.url,ne=u.skuid,oe=u.title,ae=u.imgUrl,fe=u.price,pe=u.source,he=u.children,be=u.productTypeName,me=u.goodsType,ve=u.producer,ge=u.zhihuButtonText,ye=u.zhihuVipText,Oe=u.appSchemaAndroid,je=u.appSchemaIos,we=u.subtitle,Ce=u.status,ke=u.banClick,xe=u.description,Se=u.bottomInfo,Ee=u.sideInfo,Re=u.productType,Te=null,Ae="square",Ne=F||"去购买",_e=!0,Ie=!1,Me=!1,Le="知乎"===pe&&["7","8"].includes(Re+"");(Z===ce.EDITOR&&Ce===se||"red_packet"===be&&ke)&&(Ie=!0),"有赞"===pe&&"store"===be&&(_e=!1,Ne="去浏览"),"知乎"===pe&&(Te=ve,Ae="rectangle",Ne=ge||"去查看"),"red_packet"===be&&(Ne="去领取",_e=!1,Me=!0);var Pe=["天猫","京东自营"].includes(pe)?"1":void 0,Be=H.includes(be),ze=he&&he.length&&[le[pe]].concat(he.map((function(e){return le[e.source]})))||[],De=he&&he.length&&he.reduce((function(e,t){return parseInt((null==e?void 0:e.price)||0)>parseInt((null==t?void 0:t.price)||0)?t:e})),Fe=parseInt((null==De?void 0:De.price)||0)>parseInt(fe||0)?parseInt(fe||0):parseInt((null==De?void 0:De.price)||0);function Ue(e){return!1===e?null:null==e?(null==Ee?void 0:Ee.type)?Object(L.g)(h.b,{content:{type:"GoodsRecommend",id:"".concat(S,"-").concat(ne,"-").concat(le[pe])}},Object(L.g)(h.e,{zaText:!0,shouldTrackClick:!0,onClick:function(e){return function(e,t){var n;if(e.preventDefault(),e.stopPropagation(),_)return _(e);var r=d()(null===(n=navigator)||void 0===n?void 0:n.userAgent)||{},o=r.ZhihuHybrid,a=r.Safari;t=function(e){if("string"!=typeof e)return"";var t="zh_forcehybrid=1&zh_hide_nav_bar=true&zh_hide_tab_bar=true";return e.includes("?")?"".concat(e,"&").concat(t):"".concat(e,"?").concat(t)}(t),o?s.a.dispatch("base/openURL",{url:t}):a?window.location.href=t:window.open(t,"_blank")}(e,null==Ee?void 0:Ee.clickUrl)},className:y()({"MCNLinkCard-titleRightText":"text"===(null==Ee?void 0:Ee.type),"MCNLinkCard-titleRightImg":"img"===(null==Ee?void 0:Ee.type)}),as:"div",zaType:"Button",zaAction:"OpenUrl",zaEventType:"Click",zaBlock:"goodPrice",extra:{link:{url:null==Ee?void 0:Ee.clickUrl}}},"text"===(null==Ee?void 0:Ee.type)&&(G||Ee.value||Ee.test),"img"===(null==Ee?void 0:Ee.type)&&Object(L.g)("img",{src:Ee.value,alt:""}))):null:e}var Ve=he&&he.length?Object(L.g)(re,{ref:$,id:S,skuId:ne,source:le[pe],image:ae,title:oe,price:"¥ ".concat(ue(Fe)),sourceList:ze,isContent:Z===ce.CONTENT,bottomInfo:Se,scenes:R,fetcher:V}):Be?Object(L.g)(X,{data:u,ref:$,titleRightArea:Ue(W)}):Object(L.g)("div",{className:"MCNLinkCard-card",ref:$},Object(L.g)("div",{className:"MCNLinkCard-cardContainer"},Object(L.g)("div",{className:y()("MCNLinkCard-imageContainer","MCNLinkCard-imageContainer--".concat(Ae),{"MCNLinkCard-imageContainer--invalid":Ie,"MCNLinkCard-redPacketImageContainer":Me})},Object(L.g)("img",{className:"MCNLinkCard-image",src:ae,alt:""}),Te&&Object(L.g)("div",{className:"MCNLinkCard-tagInImage"},Te)),Object(L.g)("div",{className:"MCNLinkCard-info"},Object(L.g)("div",{className:"MCNLinkCard-titleContainer"},Object(L.g)("div",{className:y()("MCNLinkCard-title",{"MCNLinkCard-title--invalid":Ie,"MCNLinkCard-redPacketTitle":Me})},oe),Ue(W)),Me&&xe&&Object(L.g)("div",{className:"MCNLinkCard-desc"},xe),!Me&&Object(L.g)("div",{className:y()("MCNLinkCard-source",{"MCNLinkCard-source--invalid":Ie})},Le?"":we||pe),Object(L.g)("div",{className:"MCNLinkCard-tool"},Object(L.g)("div",{className:"MCNLinkCard-toolLeft"},Me&&Object(L.g)("div",{className:"MCNLinkCard-redEvenlope-time"},we),_e&&Object(L.g)(de,{source:pe,producer:ve,price:fe,zhihuVipText:ye,isInvalidCard:Ie})),Ie?Object(L.g)("div",{className:"MCNLinkCard-invalidButton",role:"button"},Object(L.g)(f.a,{size:17,center:!0}),Object(L.g)("span",null,"已失效")):Object(L.g)("div",{className:"MCNLinkCard-button",role:"button"},Ne,Object(L.g)(p.a,{size:24,center:!0}))))),Se&&Z===ce.CONTENT&&Object(L.g)(te,{id:S,bottomInfo:Se,fetcher:V,type:le[pe],scenes:R}));return Object(L.g)(i.a.Fragment,null,w&&Object(L.g)(D,{url:ee,source:pe,onClose:function(){return C(!1)}}),Object(L.g)(h.b,{block:"goodsRecommendCard",content:{type:"GoodsRecommend",id:"".concat(S,"-").concat(ne,"-").concat(le[pe])},extra:{link:{url:ee}}},Object(L.g)(h.e,{shouldTrackClick:!0,zaAction:"OpenUrl",zaType:"Card",zaText:oe,zaEventType:"Click",as:x,ref:t,className:y()("MCNLinkCard",T),"data-draft-node":"block","data-draft-type":"mcn-link-card","data-mcn-id":S,"data-mcn-skuid":ne,"data-mcn-source":pe,"data-mcn-goods-type":me,"data-mcn-app-schema-android":Oe,"data-mcn-app-schema-ios":je,"data-mcn-children":he&&he.length||0,"data-za-detail-view-name":S,"data-za-extra-button-text":Pe,"data-za-not-track-link":!0,"data-mcn-product-type":Re,href:ee,target:"_blank",rel:"noopener noreferrer",onClick:function(e){if(!Q&&b.a.trackEvent(e.currentTarget,{id:6208,action:"Click",path:[{module_name:"".concat(S,"_").concat(ne,"_").concat(le[pe])}]},{button:{text:e.currentTarget.dataset.zaExtraButtonText}}),Me&&Ie)e.preventDefault();else if(A&&A(e),!e.defaultPrevented){var t=d()(navigator.userAgent),n=t.Tablet,r=t.Mobile;"拼多多"!==pe||n||r||(e.preventDefault(),C(!0)),"苏宁"!==pe||"苏宁拼购"!==me||n||r||(e.preventDefault(),C(!0))}},onMouseDown:N},Ve)))}fe.prototype={component:ae.a.element,id:ae.a.number,className:ae.a.string,onClick:ae.a.func};t.c=i.a.forwardRef(fe)},function(e,t,n){"use strict";n.d(t,"a",(function(){return ge}));var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(3),d=n.n(u),f=n(1),p=n(27),h=n(11),b=n.n(h),m=n(31),v=n(857),g=n(1271),y=n(889),O=n(235),j=n(1141),w=n(1019),C=n(377),k=n(841),x=n(1068),S=n(152),E=n(30),R=n(205),T=n(958),A=n(19),N=n(40),_=n.n(N),I=n(57),M=n(813);function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var P=function(e){Object(i.a)(n,e);var t=L(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.visible,n=e.top,r=e.onSelect,o=e.content,a=this.hintInfo,i=a&&"danger"===a.type;return Object(l.c)("div",{className:b()("SharePopover",{"SharePopover--show":t}),style:{top:n},disabled:i,children:[Object(l.b)("span",{className:"SharePopover-arrow"}),Object(l.c)("div",{className:b()("SharePopover-content",{"SharePopover-content--danger":i}),onClick:function(){i||r(o)},children:[Object(l.b)(M.a,{className:"SharePopover-quote",size:24}),Object(l.b)("span",{className:"SharePopover-main",children:"发送到百科下的摘录"}),a&&Object(l.b)("span",{className:"SharePopover-hint",children:a.text})]})]})}},{key:"hintInfo",get:function(){var e=this.props,t=e.content;if(!e.isCopyable)return{type:"danger",text:"该内容限制转载"};var n=t.length;return n<100?{type:"danger",text:"最少摘录 100 字"}:n>450&&n<=500?{type:"warning",text:"还可以摘录 ".concat(500-n," 字")}:n>500&&{type:"danger",text:"已经超出 ".concat(n-500," 字")}}}]),n}(f.Component);P.propTypes={content:d.a.string,top:d.a.number,visible:d.a.bool};var B=P,z=n(43),D=n(134),F=n(1169),U=n(396);function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var q=function(e){Object(i.a)(n,e);var t=V(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={topics:[],actived:!1},e.handleChange=function(t){(0,e.props.onChange)(t),e.setState((function(e){return Object.assign({},e,{actived:!1,topics:t})}))},e.deactived=function(){e.setState({actived:!1})},e.toggleActived=function(){e.setState((function(e){return Object.assign({},e,{actived:!e.actived})}))},e.focus=function(){return e.topicsInput&&e.topicsInput.focus()},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this,t=this.state,n=t.topics,r=t.actived;return Object(l.b)("div",{className:"TopicSelect",children:Object(l.b)(U.a,{actived:r,placeholderNote:" ",max:1,inputProps:{className:"".concat("TopicSelect","-topicInput")},onRef:function(t){e.topicsInput=t},value:n,onChange:this.handleChange,onBlur:this.handleBlur,onToggleActived:this.toggleActived})})}}]),n}(f.Component);function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var K=function(e){Object(i.a)(n,e);var t=H(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={topics:[]},e.handleChangeTopics=function(t){e.setState((function(e){return Object.assign({},e,{topics:t})}))},e.handleSubmit=function(){var t=Object(z.a)(e.state.topics,1)[0].urlToken;(0,e.props.onSubmit)(t)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.type,n=e.author,r=e.currentUser,o=e.title,a=e.url,i=e.onClose,c=e.content,s=e.visible;return Object(l.b)(D.b,{onClose:i,size:"large",title:"发送摘录到百科",className:"AbstractForm",children:s&&Object(l.c)(f.Fragment,{children:[Object(l.b)(F.a,{type:t,author:n,member:r,title:o,url:a,content:c,theme:"scroll"}),Object(l.b)(q,{onChange:this.handleChangeTopics}),Object(l.b)("div",{className:"AbstractForm-footer",children:Object(l.b)(m.c,{preset:"primary",color:"blue",disabled:this.disabled,onClick:this.handleSubmit,children:"确定"})})]})})}},{key:"disabled",get:function(){var e=this.state.topics,t=this.props.content;return 0===e.length||""===t}}]),n}(f.Component);K.propTypes={type:d.a.string.isRequired,author:d.a.object,currentUser:d.a.object,title:d.a.string.isRequired,content:d.a.string.isRequired,url:d.a.string.isRequired,visible:d.a.bool.isRequired,onClose:d.a.func.isRequired,onSubmit:d.a.func.isRequired};var Q=n(153),W=n(1106),G=n(249);function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var Z=function(e){Object(i.a)(n,e);var t=Y(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={popoverVisible:!1,top:0,content:"",abstractModalVisible:!1},e.handlePopoverShow=function(t,n){if(!e.hasAddBaikeSummaryPermission)return null;E.a.trackCardShow(null,{id:6115}),e.setState((function(e){return Object.assign({},e,{top:n,content:t,popoverVisible:!0})}))},e.handlePopoverClose=function(){if(!e.hasAddBaikeSummaryPermission)return null;e.setState((function(e){return Object.assign({},e,{popoverVisible:!1})}))},e.handleAbstractModalClose=function(){e.setState((function(e){return Object.assign({},e,{abstractModalVisible:!1})}))},e.handleAbstractSelected=function(t){E.a.trackEvent(null,{id:6116,action:"Send"}),e.setState((function(e){return Object.assign({},e,{content:t,popoverVisible:!1,abstractModalVisible:!0})}))},e.handleCreateAbstract=function(t){var n=e.props,r=n.type,o=n.objectId,a=n.createAbstract,i=e.state.content;E.a.trackEvent(null,{id:6117,action:"Submit"}),a({type:r,token:o,topicId:t,content:i}).then((function(){e.setState((function(e){return Object.assign({},e,{content:i,popoverVisible:!1,abstractModalVisible:!1})}))}))},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e,t,n;e=this.richContainer,t=this.handlePopoverShow,n=this.handlePopoverClose,e.onmouseup=function(){var r=Object(I.a)(_.a.mark((function r(o){var a,i;return _.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,new Promise((function(e){setTimeout((function(){var t="";t=document.selection?document.selection.createRange().text:document.getSelection(),e(t.toString())}),0)}));case 2:(a=r.sent)?(i=o.target===e?o.offsetY:o.offsetY+o.target.offsetTop+30,t(a,i)):n();case 4:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()}},{key:"render",value:function(){var e=this.state,t=e.popoverVisible,n=e.top,r=e.content,o=e.abstractModalVisible,a=this.props,i=a.type,c=a.author,s=a.currentUser,u=a.title,d=a.url,p=a.isCopyable;return this.hasAddBaikeSummaryPermission?Object(l.c)(f.Fragment,{children:[Object(l.b)(B,{top:n,visible:t,content:r,isCopyable:this.isAuthor||p,onBlur:this.handlePopoverClose,onSelect:this.handleAbstractSelected}),Object(l.b)(K,{type:i,onSubmit:this.handleCreateAbstract,author:c,visible:o,onClose:this.handleAbstractModalClose,currentUser:s,title:u,url:d,content:r})]}):null}},{key:"isAuthor",get:function(){var e=this.props,t=e.currentUser,n=e.author;return Object(W.a)(t,n)}},{key:"hasAddBaikeSummaryPermission",get:function(){var e=this.props.currentUser;return e&&e.hasAddBaikeSummaryPermission}},{key:"richContainer",get:function(){var e=this.props,t=e.type,n=e.objectId;return"article"===t?document.querySelector(".Post-RichText"):document.querySelector(".AnswerItem[name='".concat(n,"'] .RichContent-inner"))}}]),n}(f.Component);Z.propTypes={type:d.a.string.isRequired,author:d.a.object.isRequired,currentUser:d.a.object,title:d.a.string.isRequired,url:d.a.string.isRequired,objectId:d.a.number.isRequired,isCopyable:d.a.bool},Z.defaultProps={isCopyable:!0};var X=Object(A.compose)(Object(G.b)(),Object(p.connect)(null,{createAbstract:Q.d}))(Z),J=n(854),$=n(66),ee=n(427),te=n(36),ne=n(998);function re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var oe=function(e){Object(i.a)(n,e);var t=re(n);function n(){var e;return Object(o.a)(this,n),(e=t.call(this)).state={tipShown:!1,tipContent:"",tipX:0,tipY:0,tipPosition:"bottom"},e.handleMouseDown=e.handleMouseDown.bind(Object($.a)(e)),e.handleCopy=e.handleCopy.bind(Object($.a)(e)),e.handleTipClose=e.handleTipClose.bind(Object($.a)(e)),e.rightClickX=-1,e.rightClickY=-1,e}return Object(a.a)(n,[{key:"getRange",value:function(e){if(e&&e.rangeCount>0)return e.getRangeAt(0)}},{key:"getExtraCopyright",value:function(e,t,n){var r=["作者:".concat(t),"链接:".concat(e),"来源:知乎","著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。"],o=["",""];return r=n?r.concat(o):o.concat(r)}},{key:"getCopyText",value:function(e,t,n,r){var o=this.getExtraCopyright(t,n,r).join("\n");return r?o+e:e+o}},{key:"getRangeHtml",value:function(e){var t=document.createElement("div");return t.appendChild(e.cloneContents()),t.outerHTML}},{key:"getCopyHtml",value:function(e,t,n,r){var o=this.getExtraCopyright(t,n,r).join("<br />");return"<div>".concat(r?o+e:e+o,"</div>")}},{key:"randomRange",value:function(e,t){return Math.floor(Math.random()*(t-e)+e)}},{key:"addCopyright",value:function(e,t,n){if(window.getSelection){var r=window.getSelection(),o=this.getRange(r),a=o.toString().trim(),i=this.getRangeHtml(o);if(a&&!(a.length<128)){var c=a.length>=512,s=this.getCopyHtml(i,t,n,c),l=this.getCopyText(a,t,n,c),u=e.nativeEvent.clipboardData;if("object"==typeof u){if(u.setData("text/html",'<meta charset="utf-8">'+s),u.setData("text/plain",l),u.getData("text/plain")&&u.getData("text/plain").length>0)return void e.preventDefault()}var d=document.createElement("div");d.innerHTML=s;var f=d.firstChild;f.style.position="fixed",f.style.left="-9999px",document.body.appendChild(f),r.selectAllChildren(f),setTimeout((function(){document.body.removeChild(f),r.removeAllRanges(),r.addRange(o)}),200)}}}},{key:"showTip",value:function(e,t){if(window.getSelection){var n=window.getSelection(),r=this.getRange(n),o=r.toString().trim(),a=this.randomRange(44,66);if(!(o.length<=a)){e.preventDefault(),e.stopPropagation();var i,c=r.getBoundingClientRect(),s=window.pageYOffset,l=this.rightClickX,u=this.rightClickY,d="bottom";if(-1!==u)i=u+3;else{var f=this.props.viewPort,p=c.top+s,h=c.bottom+s,b=s+f.top+52,m=s+f.bottom-52;h<b?i=b-52:h<m?i=h:(d="top",i=p>b&&p<m?p:m+52)}var v=-1!==l?l+3:c.left+(c.right-c.left)/2-12;this.setState({tipShown:!0,tipContent:t,tipX:v,tipY:i,tipPosition:d}),this.rightClickX=-1,this.rightClickY=-1}}}},{key:"handleTipClose",value:function(){this.setState({tipShown:!1})}},{key:"handleCopy",value:function(e){var t=this.props,n=t.data,r=n.author,o=n.type,a=n.id,i=n.question,c=n.reshipmentSettings,s=n.relationship,u=(s=void 0===s?{}:s).isAuthor,d=s.isAuthorized,f=t.isCurrentUser,p="";if("article"===o?p="https://zhuanlan.zhihu.com/p/".concat(a):"answer"===o&&(p="https://www.zhihu.com/question/".concat(i.id,"/answer/").concat(a)),!f&&!u)switch(c){case"disallowed":this.showTip(e,Object(l.b)("a",{href:"https://www.zhihu.com/term/zhihu-terms#sec-licence-6",children:"禁止转载"}));break;case"need_payment":if(!d){this.showTip(e,Object(l.b)("a",{href:"https://www.zhihu.com/copyright/apply?answer=".concat(a),children:"申请转载"}));break}this.showTip(e,"已获授权,复制成功");default:this.addCopyright(e,p,r.name)}}},{key:"handleMouseDown",value:function(e){3===e.nativeEvent.which&&(this.rightClickX=e.pageX,this.rightClickY=e.pageY)}},{key:"render",value:function(){var e=this.props,t=e.onRef,n=e.data,r=e.tag,o=e.html,a=e.children,i=e.onClick,c=e.className,s=e.itemProp,u=e.style,d=e.prefix,f=e.ecommerce,p=e.shouldUseArticleCard,h=e.shouldShowCatalog,b=e.richContentKey,m=this.state,v=m.tipShown,g=m.tipContent,y=m.tipX,O=m.tipY,j=m.tipPosition;return Object(l.c)("div",{ref:t,onClick:i,className:c,style:u,children:[d,Object(l.b)(ne.a,{richContentKey:b,sourceId:n.id,sourceType:n.type,itemProp:s,tag:r,html:o,onCopy:this.handleCopy,onMouseDown:this.handleMouseDown,className:"CopyrightRichText-richText",ecommerce:f,shouldUseArticleCard:p,shouldShowCatalog:h}),a,Object(l.b)(ee.a,{shown:v,timeout:1e4,hideOnClick:!0,onClose:this.handleTipClose,x:y,y:O,position:j,content:g,className:"CopyrightRichText-tooltip"})]})}}]),n}(f.Component);oe.propTypes={onRef:d.a.func,viewPort:d.a.object};var ae=Object(A.compose)(Object(p.connect)((function(e,t){return{isCurrentUser:Object(te.i)(e,t.data.author)}})))(oe),ie=n(936),ce=n(849),se=n(34),le=n(369),ue=n.n(le),de=n(365),fe=n(176);function pe(){var e=Object(ce.a)(["发布于",""]);return pe=function(){return e},e}function he(){var e=Object(ce.a)(["编辑于",""]);return he=function(){return e},e}function be(){var e=Object(ce.a)(["发布于",""]);return be=function(){return e},e}function me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var ve=function(e){Object(i.a)(n,e);var t=me(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.href,n=e.created,r=e.updated,o=e.onClick,a=e.videoPlayCount;return Object(l.c)("div",{className:"ContentItem-time",children:[Object(l.b)(se.Link,{to:t,target:"_blank",onClick:o,children:Object(l.b)("span",{"data-tooltip":ue()(be(),Object(fe.toAbsoluteDateTimeString)(n)),children:r!==n?ue()(he(),Object(fe.toSmartString)(r)):ue()(pe(),Object(fe.toSmartString)(n))})}),Boolean(a)&&Object(l.c)("span",{css:{marginTop:10,marginLeft:5},children:["· ",Object(de.cnNiceNumber)(a),"次播放"]})]})}}]),n}(f.Component);ve.propTypes={href:d.a.string,created:d.a.number,updated:d.a.number,videoPlayCount:d.a.number,onClick:d.a.func};var ge=ve,ye=n(53),Oe=n(435),je=n(981);function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var Ce=/.*?(class="link-box")/;var ke=function(e){Object(i.a)(n,e);var t=we(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state=Object.assign({},e.getInitTruncatedState(e.props),{shouldSticky:!1,offset:0}),e.richContentRef=Object(f.createRef)(),e.truncateContent=function(){var t=e.props.isMobile?400:800,n=e.props.expandedHeight||t;(!e.content||e.content.scrollHeight<n)&&e.setState({isTruncated:!1,isExpanded:!1}),e.content&&e.content.scrollHeight>e.content.offsetHeight&&e.setState({contentCollapsed:!0})},e.updateStateInBrowser=function(){var t=e.props,n=t.excerpt,r=t.allowCollapseWithEmptyExcerpt,o=t.html,a=t.expanded,i=t.cover,c=t.unescapable,s=t.limit,l=t.limitWithImage,u=t.truncateHTMLOptions,d=t.truncateDisabled,f=!0,p=e.state.truncatedContent;if((n||r)&&(Ce.test(n)||d))p=n;else if(!c){var h=i?l:s,b=e.truncate(o,h,u);f=b.isTruncated,p=b.content}return{isTruncated:f,isExpanded:o&&a,truncatedContent:p,previewImg:null}},e.checkOpenInAppStyle=function(e){},e.toggle=function(t){e.isCollapsed()?e.handleExpand(t):e.handleCollapse(t)},e.handleExpand=function(t){var n,r,o=e.props.zaIds.expand;(null==t?void 0:t.target)&&(((null===(r=n=t.target.textContent)||void 0===r?void 0:r.length)>10||t.target.classList.contains("RichContent-inner")||t.target.classList.contains("List-item"))&&(n=null));E.a.trackEvent(e.richContentRef.current,Object.assign({action:"Expand"},n&&{name:n},o&&{id:o}));var a=e.props.onExpand;if(a)a(t);else{var i=e.props,c=i.onToggleExpend,s=i.data,l=s.type,u=s.id;e.context.currentUser&&Object(je.c)("article"===l?"post":l,u,je.a);c&&c(!0),e.setState({isExpanded:!0},(function(){"article"===l&&Object(k.onViewedOnce)(e.richContentRef.current,(function(){E.a.trackEvent(e.richContentRef.current,{action:"ReadFinish"})}))}))}},e.handleCollapse=function(){var t=e.props.onToggleExpend;E.a.trackEvent(e.richContentRef.current,{action:"Collapse",element:"Button"});t&&t(!1),e.setState({isExpanded:!1},(function(){return e.checkOpenInAppStyle(!1)}))},e.handlePreview=function(t){var n=e.state,r=n.isExpanded,o=n.isTruncated&&!r,a=t.target;o||"IMG"!==a.tagName||!a.classList.contains("zh-lightbox-thumb")&&!a.classList.contains("Slideshow-swiperImage")||e.setState({previewImg:a})},e.handlePositionStatusChange=function(t){var n=e.props.onPositionStatusChange;n&&(n(t),e.checkOpenInAppStyle("fixed"===t))},e.handleObserve=function(t){var n=t[0].intersectionRatio;if(n||!document.querySelector("#root").style.position){var r=n>0;r!==e.state.shouldSticky&&(e.setState({shouldSticky:r}),r||e.checkOpenInAppStyle(!1))}},e.handleTrunObserve=function(t){var n=e.props,r=n.data,o=(r.type,r.id,n.updateReadStatus,t[0]),a=o.intersectionRatio,i=o.isIntersecting;e.truncateComputed||(a>0||i)&&(setTimeout((function(){return e.truncateContent()})),e.truncateComputed=!0)},e.isCollapsed=function(){var t=e.props,n=t.after,r=t.before,o=t.unescapable,a=e.state,i=a.isExpanded,c=a.isTruncated;return!r&&!n||o?c&&!i:!i},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;this.setState(Object.assign({},this.updateStateInBrowser(),{viewPort:{top:148,bottom:window.innerHeight-56}})),Object(k.onViewedOnce)(this.richContentRef.current,(function(){var t=e.props,n=t.data,r=n.type,o=n.id,a=t.expanded;e.context.currentUser&&a&&Object(je.c)("article"===r?"post":r,o,je.a)})),this.props.imperativeRef&&(this.props.imperativeRef.current={handleExpand:this.handleExpand.bind(this)})}},{key:"componentWillReceiveProps",value:function(e){this.props.data.id!==e.data.id&&this.setState(this.getInitTruncatedState(e))}},{key:"componentWillUpdate",value:function(e,t){if(this.state.isExpanded&&!t.isExpanded){var n=this.richContentRef.current.getBoundingClientRect();n.top<this.props.topExcludedHeight&&(this.rect=n,this.scroll=window.pageYOffset)}}},{key:"componentDidUpdate",value:function(e,t){if(t.isExpanded&&!this.state.isExpanded&&this.rect){var n=this.rect,r=n.top,o=n.bottom,a=n.height,i=this.richContentRef.current.offsetHeight,c=window.innerHeight,s=o<c?i-a:r-(c-i);window.scrollTo(0,this.scroll+s),this.rect=null,this.scroll=null}}},{key:"componentWillUnmount",value:function(){this.props.imperativeRef&&(this.props.imperativeRef.current=null)}},{key:"getInitTruncatedState",value:function(e){var t=e.excerpt,n=e.html,r=e.expanded,o=e.unescapable;return{isTruncated:t.length<=n.length,isExpanded:r,truncatedContent:o?n:t,previewImg:null}}},{key:"truncate",value:function(e,t,n){var r=Object(x.truncateHTML)(e,t,n);return{isTruncated:r.isTruncated,content:r.content}}},{key:"renderActions",value:function(){var e=this,t=this.props,n=t.children,r=t.unescapable,o=t.noCollapsed,a=t.expandText,i=void 0===a?"展开阅读全文":a,c=t.onClick,s=t.videoData,u=t.needExpandArrow,d=void 0===u||u,f=this.state,p=f.isExpanded,h=f.isTruncated,b=f.shouldSticky,v=f.offset;if(!p)return[r&&h&&!s&&Object(l.c)(m.c,{preset:"plain",className:"ContentItem-rightButton ContentItem-expandButton",onClick:c||this.handleExpand,children:[i,d&&Object(l.b)(g.a,{className:"ContentItem-arrowIcon",center:!0})]},"expand-button"),n&&Object(l.b)(J.a,{children:n},"actions")];var y=(n||!o)&&Object(l.c)(J.a,{className:"RichContent-actions",children:[n,!o&&Object(l.c)(m.c,{"data-zop-retract-question":!0,preset:"plain",className:"ContentItem-rightButton",onClick:this.handleCollapse,children:[Object(l.b)("span",{className:"RichContent-collapsedText",children:"收起"}),Object(l.b)(g.a,{className:"ContentItem-arrowIcon is-active",center:!0})]})]});return b&&y?Object(l.b)(O.a,{offset:v,bottom:!0,container:function(){return e.richContentRef.current.parentNode},onPositionStatusChange:this.handlePositionStatusChange,children:y}):y}},{key:"renderText",value:function(){var e=this,t=this.props,n=t.html,r=t.excerpt,o=t.data,a=t.itemProp,i=void 0===a?"text":a,c=t.expandText,s=void 0===c?"阅读全文":c,u=t.onClick,d=t.prefix,f=t.unescapable,p=(t.isSearchContent,t.collapsedHeight),h=t.ecommerce,v=t.canAbstract,O=t.shouldUseArticleCard,w=t.richContentKey,k=this.state,x=k.truncatedContent,S=k.previewImg,E=k.viewPort,R=k.contentCollapsed,A=k.isExpanded,N=this.isCollapsed(),_=x||r,I="answer"===o.type?Object(j.a)(n):n,M=N?_:I,L={},P=Object(l.c)(ae,Object.assign({richContentKey:w&&String([w,N]),itemProp:i,className:b()("RichContent-inner",{"RichContent-inner--collapsed":R}),style:N&&f?{maxHeight:p}:null,tag:"span",onRef:function(t){e.content=t},data:o,html:M,viewPort:E,prefix:d},N&&{onClick:u||this.handleExpand},L,{ecommerce:h,shouldUseArticleCard:O,shouldShowCatalog:Object(T.a)(o)&&(A||f&&!N),children:[v&&Object(l.b)(X,Object.assign({},this.abstractProps)),!f&&N&&Object(l.c)(m.c,{preset:"plain",className:"ContentItem-more",children:[s,Object(l.b)(g.a,{className:"ContentItem-arrowIcon",center:!0})]}),S&&Object(l.b)(y.a,{img:S,onClose:function(){return e.setState({previewImg:null})}})]}),N);return f?Object(l.b)(C.a,{rootMargin:"200px 0px 200px 0px",onObserve:this.handleTrunObserve,children:P}):P}},{key:"render",value:function(){var e=this.props,t=e.unescapable,r=e.after,o=e.before,a=e.extra,i=e.cover,c=e.hasVideo,s=e.renderCanExpandExtra,u=e.className,d=e.videoData,p=e.handleClickVideoMoreButton,h=e.duration,m=e.isVideoAnswer,v=this.state.isExpanded,g=this.isCollapsed(),y=d?Object(l.c)(f.Fragment,{children:[Object(l.b)(ie.a,{data:d}),Object(l.b)("p",{className:"RichContent-videoMore",onClick:p,children:"点击查看全文"})]}):this.renderText(),O=v?Object(l.b)(C.a,{rootMargin:"-".concat(240,"px 0px"),onObserve:this.handleObserve,children:y}):y;return Object(l.c)("div",{className:b()("RichContent",u,{"is-collapsed":g,"RichContent--unescapable":t}),ref:this.richContentRef,onClick:this.handlePreview,children:[Object(l.b)(R.c,{keyMap:{TOGGLE_EXPAND:"o"},handlers:{TOGGLE_EXPAND:this.toggle}}),!g&&o,!t&&g&&i&&Object(l.b)(n.Cover,{url:i,hasVideo:c,onClick:this.handleExpand,duration:h,isVideoAnswer:m}),O,a||"function"==typeof s&&s(v,this.handleExpand),!g&&r,this.renderActions()]})}},{key:"abstractProps",get:function(){var e=this.props.data;return{objectId:e.id,type:e.type,author:e.author,title:e.question.title,url:e.url,isCopyable:e.isCopyable}}}]),n}(f.Component);ke.contextTypes={currentUser:d.a.object},ke.propTypes={enableConvert:d.a.bool,unescapable:d.a.bool,expanded:d.a.bool,noCollapsed:d.a.bool,limit:d.a.number,limitWithImage:d.a.number,collapsedHeight:d.a.number,html:d.a.string,excerpt:d.a.string,allowCollapseWithEmptyExcerpt:d.a.bool,truncateDisabled:d.a.bool,before:d.a.node,after:d.a.node,prefix:d.a.node,extra:d.a.node,renderCanExpandExtra:d.a.func,topExcludedHeight:d.a.number,onPositionStatusChange:d.a.func,type:d.a.string,data:d.a.object,canAbstract:d.a.bool,cover:d.a.string,hasVideo:d.a.bool,truncateHTMLOptions:d.a.object,expandText:d.a.string,onToggleExpend:d.a.func,videoData:d.a.object,handleClickVideoMoreButton:d.a.func,zaIds:d.a.shape({expand:d.a.number})},ke.defaultProps={limit:160,limitWithImage:100,expanded:!1,unescapable:!1,topExcludedHeight:60,excerpt:"",allowCollapseWithEmptyExcerpt:!1,hasVideo:!1,isVideoAnswer:!1,data:{},collapsedHeight:400,zaIds:{}},ke.Cover=function(e){var t=e.url,n=e.hasVideo,o=e.duration,a=e.isVideoAnswer,i=Object(r.a)(e,["url","hasVideo","duration","isVideoAnswer"]);return Object(l.c)("div",Object.assign({className:b()("RichContent-cover",{"RichContent-cover--mobile":!1})},i,{children:[Object(l.c)("div",{className:"RichContent-cover-inner",children:[Object(l.b)(w.a,{thumbnail:Object(S.imgUrl)(t,"60w"),url:Object(S.imgUrl)(t,"400x224"),alt:"cover"}),o&&Object(l.b)("div",{className:"RichContent-cover-mask"}),o&&Object(l.b)("div",{className:"RichContent-cover-duration",children:o})]}),a&&Object(l.b)("img",{css:{position:"absolute",left:0,top:0,width:"64px",height:"18px",objectFit:"cover"},src:"https://pic1.zhimg.com/80/v2-c19ceba4b1bea7204cb67e27f469c95b_1440w.png"}),n&&Object(l.b)(v.a,{className:"RichContent-cover-play"})]}))};t.b=Object(p.connect)((function(e){return{isMobile:Object(ye.d)(e)}}),{updateReadStatus:Oe.b})(ke)},function(e,t,n){"use strict";var r=n(55),o=n.n(r),a=n(33),i=n.n(a),c=n(41),s=n.n(c),l=n(1),u=n.n(l),d=n(232),f=n(83),p=n.n(f),h=n(931),b=n(886),m=n(40),v=n.n(m),g=n(845),y=n.n(g),O=n(78),j=n(74),w=n.n(j),C=n(20),k=n.n(C),x=n(21),S=n.n(x),E=n(7),R=n(318),T=n.n(R),A=function(){function e(t){var n=this;k()(this,e),this.fetch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.url||(n.url=e),e!==n.url)throw new Error("mismatch url\n".concat(e,"\n").concat(n.url),e,n.url);return new Promise((function(e,r){n.addToQueue({options:t,resolve:e,reject:r})}))},this.instance=null,this.customFetch=t,this.delay=200,this.maxDelay=1e3,this.url="",this.queueMaxLength=10,this.queue=[],this.startTime=Date.now(),this.timeout=null,this.initialized=!1}var t;return S()(e,[{key:"initConfig",value:function(e){var t=e.delay,n=e.maxDelay,r=e.maxBatchCount;t&&(this.delay=t),n&&(this.maxDelay=n),r&&(this.maxBatchCount=r),this.initialized=!0}},{key:"buildFetchParams",value:function(e){var t=o()(e,1)[0].options,n=e.reduce((function(e,t){var n,r;return(null===(n=(r=t.options).dataBuilder)||void 0===n?void 0:n.call(r,e,t))||e}),{}),r=this.url,a=!t.method||"GET"===t.method.toUpperCase();if(a){var i=T()(r,!0);i.query=Object.assign({},i.query,{},n),r=i.toString()}return[r,Object.assign({},t,{data:a?null:Object.assign({},t.data,{},n)})]}},{key:"doFetch",value:(t=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this.queue.length){e.next=2;break}return e.abrupt("return");case 2:return t=this.queue,this.queue=[],e.prev=4,e.next=7,this.customFetch.apply(this,w()(this.buildFetchParams(t)));case 7:n=e.sent,t.forEach((function(e){var t=e.options,r=e.resolve;t.resultBuilder?r(t.resultBuilder(n)):r(n)})),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),t.forEach((function(t){return t.reject(e.t0)}));case 14:case"end":return e.stop()}}),e,this,[[4,11]])}))),function(){return t.apply(this,arguments)})},{key:"addToQueue",value:function(e){var t=this;this.initialized||this.initConfig(e.options),clearTimeout(this.timeout),(Date.now()-this.startTime>this.maxDelay||this.queue.length>=this.maxBatchCount)&&(this.startTime=Date.now(),this.doFetch()),this.queue.push(e),setTimeout((function(){t.startTime=Date.now(),t.doFetch()}),this.delay)}}]),e}(),N=null,_=function(e){return function(t,n){return N||(N=new A(e)),N.fetch(t,n)}}(function(e){return function(){var t=y()(v.a.mark((function t(n,r){var o;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(n,r);case 2:return o=t.sent,t.t0=E.camelizeKeys,t.next=6,o.json();case 6:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}(fetch)),I={},M=function(e){var t=Object(l.useRef)(0),n=e.inEditor,r=e["data-offset-key"],a=e["data-text"],i=e["data-image"],c=e.href,s=Object(l.useState)((function(){return n&&I[r]||null})),u=o()(s,2),d=u[0],f=u[1],p=Object(O.e)({once:!0}),h=o()(p,2),b=h[0],m=h[1],g=Object(O.c)((function(e){var t=e||d;if(!t||0===Object.keys(t).length)return{objectType:null,title:a||c,thumbnail:i};t.title=a||t.title||c,t.thumbnail=i||t.thumbnail;var o=Object.assign({},t,{cached:!0});return n&&(I[r]=o),o})),j=Object(O.c)(y()(v.a.mark((function e(){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.current+=1,e.prev=1,e.next=4,_("/api/v4/link_card_infos",{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},dataBuilder:function(e){return e.urls="".concat(e.urls?e.urls+",":"").concat(c),e},resultBuilder:function(e){return e[c]}});case 4:n=e.sent,f(g(n)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t.current<=1?j():f(g());case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))));return Object(l.useEffect)((function(){!m||d&&d.cached||j()}),[m,d,j]),Object(l.useEffect)((function(){n&&f(g())}),[n,g,a,i]),[b,d]},L=n(920),P=n(237),B=n(5),z={answer:"Answer",article:"Column",zvideo:"Zvideo",question:"Question",collection:"Collection",roundtable:"Roundtable",topic:"Topic"},D=u.a.forwardRef((function(e,t){var n=p()(e,["zvideoLinkCardProps"]),r=n.inEditor,a=n["data-text"],c=n.href,u=n.newLinkCardAb,f=n.zaBlock,m=s()(n,["inEditor","data-text","href","newLinkCardAb","zaBlock"]),v=Object(l.useRef)(),g=M(e),y=o()(g,2),O=y[0],j=y[1],w=Object(L.a)(e,v,"zvideo"===(null==j?void 0:j.objectType)),C=w.handleImageClick,k=w.handleInfoClick,x=Object(l.useCallback)(Object(P.a)(t,O,v),[]),S=r?h.d:d.a,E=r?null:{as:h.d,shouldTrackShow:!0,zaText:!0,zaType:"Button",zaAction:"OpenUrl",zaBlock:f,extra:{link:{url:c}},"data-za-module":"Content"},R=Object(B.g)(S,i()({},E,{url:c,data:j,onClick:k,onClickImage:C,newLinkCardAb:u}));return"3"===u?Object(B.g)(d.b,{content:{type:z[null==j?void 0:j.objectType]||"Unknown"}},Object(B.g)(b.a,i()({ref:x,text:a,url:c,component:"a",newLinkCardAb:u},m),Boolean(j)&&R)):Object(B.g)(b.a,i()({ref:x,text:a,url:c,component:"a",newLinkCardAb:u},m),Boolean(j)&&Object(B.g)(d.b,{content:{type:z[j.objectType]||"Unknown"}},R))}));t.a=D},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(3),h=n.n(p),b=n(1),m=n(377),v=n(5);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var y=function(e){s()(n,e);var t=g(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={shown:!1},e.handleObserve=function(t){(t[0].isIntersecting||t[0].intersectionRatio>0)&&e.setState({shown:!0})},e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.placeholder,n=e.rootMargin,r=e.children;return this.state.shown?r:Object(v.g)(m.a,{rootMargin:n,onObserve:this.handleObserve,threshold:[0,.1]},t||Object(v.g)("div",{style:{height:"1px"}}))}}]),n}(b.Component);y.propTypes={placeholder:h.a.element,rootMargin:h.a.string},y.defaultProps={rootMargin:"200px"};var O=y},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return c}));var r=n(983),o=n.n(r),a=n(24);function i(e){if("number"!=typeof e)return null;var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(String(t),":").concat(o()(String(n),2,"0"))}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.multiple,r=void 0!==n&&n,o=t.numLimit,i=void 0===o?a.T:o,c=t.uploadPartiallyWhenExceedsLimit,s=void 0===c||c,l=Array.from(e).filter((function(e){return a.a.VIDEO.some((function(t){return e.name.toLowerCase().endsWith(t)}))}));return 0===l.length?{message:"视频格式不支持",abortUpload:!0}:!r&&l.length>1?{message:"一次仅能上传一个视频,请分开上传",abortUpload:!1,validFiles:[l[0]]}:r&&l.length>i?0===i?{message:"上传个数已达上限",abortUpload:!0}:s?{message:"最多可上传 ".concat(i," 个视频,已默认选择").concat(i>1?"前":"第"," ").concat(i," 个视频"),abortUpload:!1,validFiles:l.slice(0,i)}:{message:"一次最多上传 ".concat(i," 个视频, 请重新选择上传"),abortUpload:!0}:{message:null,abortUpload:!1,validFiles:l}}},function(e,t,n){"use strict";n.d(t,"k",(function(){return i})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"h",(function(){return j})),n.d(t,"i",(function(){return C})),n.d(t,"g",(function(){return x})),n.d(t,"j",(function(){return R})),n.d(t,"f",(function(){return S.a}));var r=n(35),o=n(2),a=n(90),i=function(e){var t=e.children,n=Object(r.a)(e,["children"]);return Object(o.b)(a.Flex,Object.assign({alignItems:"center",justifyContent:"center",flex:1,height:"100%"},n,{children:Object(o.b)(a.Text,{textAlign:"center",color:"GBL05A",children:t})}))},c=n(1),s=n.n(c),l=n(131),u=Object.assign;var d=function(e){return s.a.createElement(l.a,u({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{fill:"#EBEEF5",d:"M94 29v-2.002c0-.55.443-.998 1-.998h1c.553 0 1 .446 1 .998V29h2.002c.55 0 .998.443.998 1v1c0 .553-.446 1-.998 1H97v2.002c0 .55-.443.998-1 .998h-1c-.553 0-1-.446-1-.998V32h-2.002A.997.997 0 0191 31v-1c0-.553.446-1 .998-1H94zm30.613 17.724l-21.82-4.638.207-3.023 22.237 4.727a6.004 6.004 0 014.62 7.122l-7.9 37.158a6.001 6.001 0 01-7.116 4.627l-15.31-3.254.63-2.934 15.31 3.25c1.62.34 3.218-.69 3.56-2.32l7.9-37.16a3.005 3.005 0 00-2.31-3.567zM48.596 85.727l.624 2.935-12.717 2.703a6.004 6.004 0 01-7.117-4.628L21.488 49.58a6.004 6.004 0 014.62-7.123L47 38.017l.133 3.038-20.402 4.337a3 3 0 00-2.3 3.564l7.9 37.157a3.005 3.005 0 003.56 2.317l12.71-2.703zM100 82c0 3.314-2.688 6-6.006 6H56.006A6.01 6.01 0 0150 82V34c0-3.314 2.688-6 6.006-6h27.147v3H56.006A3.003 3.003 0 0053 34v48c0 1.65 1.35 3 3.006 3h37.988A3.003 3.003 0 0097 82V42.373h3V82zm-4.5-41C89.7 41 85 36.3 85 30.5S89.7 20 95.5 20 106 24.7 106 30.5 101.3 41 95.5 41zm0-3a7.5 7.5 0 100-15 7.5 7.5 0 000 15z",fillRule:"nonzero"}),s.a.createElement("path",{fill:"#F7F8FA",d:"M47 73.22l-6.484 1.378c-.82.174-1.333.97-1.16 1.78.173.816.97 1.327 1.784 1.154L47 76.287V73.22zm0-8.594l-4.58.974c-.8.17-1.324.968-1.152 1.778a1.494 1.494 0 001.775 1.156l3.957-.84v-3.068zm0-17.285a6.002 6.002 0 00-8 5.66 6.002 6.002 0 008 5.66V47.34zm56 29.88l6.178 1.318a1.5 1.5 0 10.624-2.934L103 74.148v3.067zm0-8.58l4.275.91c.808.17 1.6-.34 1.775-1.157a1.507 1.507 0 00-1.15-1.78l-4.9-1.04v3.067zm0-8.97c.626.22 1.3.34 2 .34 3.314 0 6-2.685 6-6s-2.686-6-6-6c-.7 0-1.374.12-2 .34v11.32zM76 56a8 8 0 110-16 8 8 0 010 16zm-8 7.5c0-.828.667-1.5 1.505-1.5h12.99a1.5 1.5 0 110 3h-12.99A1.5 1.5 0 0168 63.5zm-5 8c0-.828.67-1.5 1.49-1.5h23.02c.822 0 1.49.666 1.49 1.5 0 .828-.67 1.5-1.49 1.5H64.49c-.822 0-1.49-.666-1.49-1.5z"})))},f=Object.assign;var p=function(e){return s.a.createElement(l.a,f({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{fill:"#EBEEF5",d:"M67.757 83H45c-1.66 0-3-1.338-3-2.998V37.998A3.003 3.003 0 0145 35h53.42v-3H45c-3.31 0-6 2.686-6 5.998v42.004A5.994 5.994 0 0045 86h21.515l6.853 6.854a2.99 2.99 0 004.234 0L84.456 86H105c3.31 0 6-2.686 6-5.998v-36.54h-3v36.54A3.003 3.003 0 01105 83H83.214l-7.728 7.728L67.756 83z",fillRule:"nonzero"}),s.a.createElement("path",{fill:"#F7F8FA",d:"M55 48.5c0-.828.67-1.5 1.508-1.5h26.984a1.5 1.5 0 110 3H56.508A1.5 1.5 0 0155 48.5zm0 11c0-.828.677-1.5 1.495-1.5h37.01c.826 0 1.495.666 1.495 1.5 0 .828-.677 1.5-1.495 1.5h-37.01A1.494 1.494 0 0155 59.5zm0 11c0-.828.677-1.5 1.495-1.5h37.01c.826 0 1.495.666 1.495 1.5 0 .828-.677 1.5-1.495 1.5h-37.01A1.494 1.494 0 0155 70.5z"}),s.a.createElement("path",{fill:"#EBEEF5",d:"M94.868 50.46l18.92-18.92-2.83-2.827-18.918 18.92-2.12-2.123 18.917-18.918a3.005 3.005 0 014.245-.002l2.828 2.828a3.004 3.004 0 01-.002 4.245L96.99 52.58l-2.122-2.12zm-7.193 2.377l2.244-7.327 7.07 7.07-7.328 2.245c-1.575.482-2.473-.405-1.988-1.988z",fillRule:"nonzero"})))},h=Object.assign;var b=function(e){return s.a.createElement(l.a,h({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{fill:"#EBEEF5",d:"M102 30.998A2.996 2.996 0 0098.998 28H50.002A2.996 2.996 0 0047 30.998v58.147l.193-.125c1.453-.94 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.94 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.94 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.94 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.94 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.413-.913 3.363-.94 4.807-.075V30.998zm-1.508 60.542c-.464-.3-1.21-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.21-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.21-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.21-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.21-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.21-.298-1.67 0l-4.316 2.79A1.99 1.99 0 0144 93V30.997C44 27.687 46.68 25 50.002 25h48.996A5.996 5.996 0 01105 30.998v62c0 .45-.147.866-.396 1.2l-4.112-2.658z",fillRule:"nonzero"}),s.a.createElement("path",{fill:"#F7F8FA",d:"M55 39c0-.553.44-1 1-1h19c.553 0 1 .44 1 1v19c0 .553-.44 1-1 1H56c-.553 0-1-.44-1-1V39zm25 .5c0-.828.675-1.5 1.498-1.5h11.004c.827 0 1.498.666 1.498 1.5 0 .828-.675 1.5-1.498 1.5H81.498A1.495 1.495 0 0180 39.5zm0 9c0-.828.675-1.5 1.498-1.5h11.004c.827 0 1.498.666 1.498 1.5 0 .828-.675 1.5-1.498 1.5H81.498A1.495 1.495 0 0180 48.5zm0 9c0-.828.675-1.5 1.498-1.5h11.004c.827 0 1.498.666 1.498 1.5 0 .828-.675 1.5-1.498 1.5H81.498A1.495 1.495 0 0180 57.5zm-25 9c0-.828.677-1.5 1.505-1.5h35.99a1.5 1.5 0 110 3h-35.99A1.5 1.5 0 0155 66.5zm0 9c0-.828.665-1.5 1.505-1.5h24.99a1.5 1.5 0 110 3h-24.99A1.5 1.5 0 0155 75.5z"})))},m=Object.assign;var v=function(e){return s.a.createElement(l.a,m({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{fill:"#EBEEF5",d:"M37.273 69.98c.212-3.3 3.063-5.98 6.387-5.98h63.91c3.315 0 6.175 2.673 6.387 5.98l1.285 20.04c.212 3.302-2.302 5.98-5.615 5.98H41.603c-3.313 0-5.827-2.673-5.615-5.98l1.285-20.04zm1.71 20.23C38.88 91.788 40.02 93 41.603 93h68.023c1.58 0 2.722-1.215 2.62-2.79l-1.284-20.037c-.11-1.726-1.657-3.173-3.394-3.173H43.66c-1.74 0-3.282 1.447-3.393 3.173L38.982 90.21zM47 58h58v-3.5a1.5 1.5 0 013 0v5c0 .414-.168.79-.44 1.06a1.49 1.49 0 01-1.06.44h-61a1.49 1.49 0 01-1.06-.44A1.49 1.49 0 0144 59.5v-5a1.5 1.5 0 013 0V58zm50-31H55v28.008h-3V25.992c0-1.1 1.025-1.992 2.283-1.992h43.434c1.26 0 2.283.898 2.283 1.992v29.016h-3V27zM60 87.5c0-.828.668-1.5 1.5-1.5h29c.828 0 1.5.666 1.5 1.5 0 .828-.668 1.5-1.5 1.5h-29c-.828 0-1.5-.666-1.5-1.5zM46 72.01c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm-52 7c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98zm8 0c0-.558.443-1.01 1.01-1.01h1.98c.558 0 1.01.443 1.01 1.01v1.98c0 .558-.443 1.01-1.01 1.01h-1.98c-.558 0-1.01-.443-1.01-1.01v-1.98z",fillRule:"nonzero"}),s.a.createElement("path",{fill:"#F7F8FA",d:"M71 34.5a1.5 1.5 0 011.497-1.5h7.006a1.5 1.5 0 110 3h-7.006A1.495 1.495 0 0171 34.5zm-9 8c0-.828.665-1.5 1.505-1.5h24.99a1.5 1.5 0 110 3h-24.99A1.5 1.5 0 0162 42.5zm0 7c0-.828.67-1.5 1.495-1.5h19.01c.826 0 1.495.666 1.495 1.5 0 .828-.67 1.5-1.495 1.5h-19.01A1.494 1.494 0 0162 49.5z"})))},g=Object.assign;var y=function(e){return s.a.createElement(l.a,g({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{fill:"#EBEEF5",d:"M106.807 78h8.19A3.004 3.004 0 00118 74.998V34.002A3 3 0 00114.997 31H61.003A3.004 3.004 0 0058 34.002V36h-3v-1.998A6.004 6.004 0 0161.003 28h53.994A6 6 0 01121 34.002v40.996A6.004 6.004 0 01114.997 81h-5.372l-.375 6.004c-.138 2.207-1.514 2.732-3.074 1.172L99 81h-5v-3h6.243l6.178 6.178.388-6.178zM44.824 95.176c-1.56 1.56-2.936 1.035-3.074-1.172L41.312 87H37a6 6 0 01-6-6.006V45.006A6.01 6.01 0 0137 39h48a6 6 0 016 6.006v35.988A6.01 6.01 0 0185 87H53l-8.176 8.176zm-.245-3.998L51.755 84H85c1.65 0 3-1.35 3-3.006V45.006A3 3 0 0085 42H37c-1.65 0-3 1.35-3 3.006v35.988A3 3 0 0037 84h7.13l.45 7.178z",fillRule:"nonzero"}),s.a.createElement("path",{fill:"#F7F8FA",d:"M94 49h9.494a1.5 1.5 0 110 3H94v-3zm0 9h9.494a1.5 1.5 0 110 3H94v-3zm-50 6.5c0-.828.68-1.5 1.505-1.5h30.99a1.5 1.5 0 110 3h-30.99A1.5 1.5 0 0144 64.5zm0-14.503c0-.55.453-.997.997-.997h6.006c.55 0 .997.453.997.997v6.006c0 .55-.453.997-.997.997h-6.006c-.55 0-.997-.453-.997-.997v-6.006zM44 73.5c0-.828.68-1.5 1.505-1.5h30.99a1.5 1.5 0 110 3h-30.99A1.5 1.5 0 0144 73.5z"})))},O=Object.assign;var j=function(e){return s.a.createElement(l.a,O({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("path",{fill:"#EBEEF5",d:"M62.85 82.335c-.13-.03-.202-.04-.25-.044-.117 0-.31.05-.87.34-7.092 2.65-7.508 2.79-9.903 3.43-.955.26-1.885.46-2.826.63-1.24.23-2.52-.08-3.35-.83-1.12-1.01-1.16-2.58-.02-3.73l.28-.22s.074-.053.204-.19c.265-.26.54-.63.81-1.102.588-1.05 1.025-2.445 1.224-4.246.145-.8-.374-2.14-1.117-2.833-.23-.216-.696-.727-1.487-1.683-3.62-4.37-6.03-12.332-6.03-18.87C39.5 37.19 53.48 23.5 72.446 23.5c19.842 0 32.947 13.235 32.947 29.466 0 21.157-22.76 36.133-42.028 29.488-.182-.04-.473-.11-.515-.12zm-.068-3.038c.233.014.448.05.717.108l.6.14c17.56 6.102 38.29-7.514 38.29-26.58 0-14.58-11.77-26.465-29.95-26.465-17.32 0-29.95 12.36-29.95 26.466 0 5.885 2.203 13.176 5.333 16.96.716.865 1.102 1.287 1.222 1.4 1.432 1.34 2.34 3.65 2.044 5.404-.246 2.172-.8 3.94-1.585 5.338a8.3 8.3 0 01-1.213 1.68c1.02-.175 1.87-.366 2.75-.598 2.25-.596 2.667-.743 9.4-3.245.95-.47 1.596-.653 2.326-.608zm11.554 9.593a1.5 1.5 0 111.919-2.306c5.242 4.364 12.82 5.41 19.8 2.98l.173-.05c.084-.017.372-.085.433-.1.22-.046.39-.074.59-.086.61-.037 1.14.11 1.87.472 4.83 1.793 5.13 1.9 6.73 2.324.57.15 1.12.276 1.68.38-.22-.318-.46-.7-.68-1.153-.58-1.14-.99-2.51-1.173-4.12-.232-1.39.38-2.75 1.537-3.83.12-.11.43-.44.947-1.05 2.1-2.47 3.356-7.15 3.356-11.61 0-4.7-.62-7.39-2.7-10.094a1.5 1.5 0 012.381-1.828c2.56 3.33 3.318 6.62 3.318 11.925 0 5.11-1.433 10.45-4.066 13.555-.59.693-.98 1.107-1.19 1.304-.49.46-.675.873-.623 1.16.16 1.37.47 2.41.894 3.25.324.647.62 1.013.756 1.13 1.162 1.17.883 2.636-.177 3.54-.78.67-1.91 1-2.948.817-.69-.124-1.373-.28-2.073-.46-1.75-.466-2.05-.57-7.08-2.44l-.156-.068c-.344-.173-.42-.195-.414-.195-.142.03-.33.075-.464.105-7.91 2.728-16.56 1.52-22.627-3.533z"}))},w=Object.assign;var C=function(e){return s.a.createElement(l.a,w({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("path",{fill:"#EBEEF5",d:"M46.76 78.71a1.895 1.895 0 00-1.378 2.092c.13.948.94 1.648 1.904 1.635h55.468a1.882 1.882 0 001.884-1.635c.13-.95-.46-1.846-1.367-2.09a8.61 8.61 0 01-6.4-7.872l-2.473-20.928c-.96-7.872-6.567-14.37-14.178-16.435l-.986-.267-.113-1.014c-.24-2.106-2.01-3.696-4.11-3.696s-3.87 1.59-4.104 3.696l-.114 1.014-.98.267c-7.61 2.063-13.22 8.563-14.18 16.43L53.15 70.84c-.2 3.74-2.79 6.926-6.393 7.87zm50.61-29.155l2.482 20.982c.127 2.562 1.817 4.654 4.19 5.276a4.895 4.895 0 013.568 5.397c-.336 2.446-2.434 4.26-4.876 4.227H47.306a4.883 4.883 0 01-4.896-4.227 4.897 4.897 0 013.58-5.4 5.614 5.614 0 004.17-5.168l2.49-21.093c1.068-8.77 7.135-16.06 15.46-18.7.807-3.11 3.615-5.35 6.9-5.35s6.094 2.24 6.9 5.35c8.325 2.64 14.393 9.93 15.46 18.7zm-16.417 38.91c-.288 3.184-3.007 5.36-5.943 5.36-2.936 0-5.655-2.176-5.943-5.36l-2.988.27c.43 4.82 4.52 8.09 8.93 8.09s8.49-3.27 8.93-8.09l-2.99-.27z"}))},k=Object.assign;var x=function(e){return s.a.createElement(l.a,k({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("path",{fill:"#E7EAF1",d:"M39.09 35.994c.05-3.31 2.777-5.994 6.096-5.994h18.562c2.21 0 4.667 1.66 5.487 3.708L70.152 36h34.85A5.997 5.997 0 01111 41.99v40.02c0 3.308-2.69 5.99-6 5.99H45c-3.314 0-6-2.686-6-5.99V41.99c0-.077 0-.153.004-.23l.086-5.766zm2.914 5.81L42 41.99v40.02A2.998 2.998 0 0045 85h60c1.655 0 3-1.342 3-2.99V41.99a2.998 2.998 0 00-3-2.99H68.12l-1.67-4.177C66.085 33.915 64.73 33 63.747 33h-18.56c-1.68 0-3.07 1.368-3.097 3.038l-.086 5.767zM69.89 72.658c-1.56.715-3.105-.395-2.906-2.113l.697-6.032-4.11-4.47c-1.16-1.265-.58-3.076 1.115-3.418l5.952-1.2 2.982-5.29c.843-1.498 2.744-1.507 3.593 0l2.98 5.29 5.955 1.2c1.684.34 2.28 2.145 1.11 3.418l-4.11 4.47.698 6.032c.197 1.708-1.336 2.832-2.908 2.113l-5.52-2.527-5.523 2.53z"}))},S=n(879),E=Object.assign;var R=function(e){return s.a.createElement(l.a,E({width:"150",height:"120",viewBox:"0 0 150 120"},e),s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{fill:"#EBEEF5",d:"M109.545 78h5.463A2.995 2.995 0 00118 75.01V34.99c0-1.648-1.34-2.99-2.992-2.99H62.992A2.995 2.995 0 0060 34.99v2.027h-3V34.99c0-3.308 2.69-5.99 5.992-5.99h52.016A5.993 5.993 0 01121 34.99v40.02c0 3.308-2.69 5.99-5.992 5.99h-2.744l-.558 5.65c-.217 2.197-1.783 2.842-3.49 1.45l-8.7-7.1h-18.69v-3h19.76l8.29 6.767.67-6.767zM37.33 91.9c-1.942 1.057-3.23.15-2.878-2.027l1.237-7.64A25.886 25.886 0 0130 66c0-14.36 11.637-26 26-26 14.36 0 26 11.637 26 26 0 14.36-11.637 26-26 26-4.627 0-8.973-1.21-12.737-3.327L37.33 91.9zm5.958-6.656l1.447.814A22.878 22.878 0 0056 89c12.705 0 23-10.296 23-23 0-12.705-10.296-23-23-23-12.705 0-23 10.296-23 23a22.894 22.894 0 005.03 14.36l.833 1.04-1.11 6.855 5.535-3.01zm13.108-31.452c2.304 0 4.176.612 5.616 1.908 1.44 1.26 2.16 2.988 2.16 5.148 0 1.764-.468 3.24-1.368 4.392-.324.396-1.332 1.332-3.024 2.808-.684.576-1.188 1.224-1.512 1.872-.396.72-.576 1.512-.576 2.376v.612H53.84v-.612c0-1.332.216-2.484.72-3.42.468-1.008 1.836-2.484 4.068-4.464l.612-.684c.648-.828 1.008-1.692 1.008-2.628 0-1.26-.36-2.232-1.044-2.952-.72-.72-1.764-1.08-3.06-1.08-1.62 0-2.808.504-3.528 1.548-.648.864-.972 2.088-.972 3.672h-3.78c0-2.628.756-4.68 2.268-6.192 1.512-1.548 3.6-2.304 6.264-2.304zm-.648 21.06c.756 0 1.404.216 1.908.72.504.468.756 1.08.756 1.836s-.288 1.368-.792 1.872a2.703 2.703 0 01-1.872.72c-.72 0-1.368-.252-1.872-.756s-.756-1.116-.756-1.836c0-.756.252-1.368.756-1.836.504-.504 1.152-.72 1.872-.72z",fillRule:"nonzero"}),s.a.createElement("path",{fill:"#F7F8FA",d:"M83.23 56h24.275c.818 0 1.495-.672 1.495-1.5 0-.834-.67-1.5-1.495-1.5H81.93a28.845 28.845 0 013.002 11h12.56a1.5 1.5 0 110 3h-12.51a29.422 29.422 0 00-.05-3zM72.285 42h35.22c.826 0 1.495.666 1.495 1.5 0 .828-.677 1.5-1.495 1.5H76a28.945 28.945 0 00-3.715-3z"})))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.onViewedOnce=t.isViewed=void 0;var o=r(n(206));t.isViewed=function(e){if(!document.body||!document.body.contains(e))return!1;var t=e.getBoundingClientRect(),n=document.documentElement;return t.bottom<(window.innerHeight||n.clientHeight)};var a=function(){};t.onViewedOnce=function(e,n,r){if(t.isViewed(e))return n.call(r,e),a;var i=o.default((function(){t.isViewed(e)&&(n.call(r,e),c())}),250);function c(){window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}return window.addEventListener("scroll",i),window.addEventListener("resize",i),c}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.onFullyViewedOnce=t.isFullyViewed=void 0;var o=r(n(206)),a=r(n(233));t.isFullyViewed=function(e,t){var n=e.getBoundingClientRect(),r=n.right,o=n.bottom,a=t.getBoundingClientRect(),i=a.right;return o<=a.bottom&&r<=i},t.onFullyViewedOnce=function(e,n,r,i){if(t.isFullyViewed(e,n))return r.call(i,e),a.default;var c=o.default((function(){t.isFullyViewed(e,n)&&(r.call(i,e),s())}),250);n.addEventListener("scroll",c),n.addEventListener("resize",c);var s=function(){n.removeEventListener("scroll",c),n.removeEventListener("resize",c)};return s}},function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l}));var r=n(1),o=n(841),a=n(30),i=n(78),c=function(e){a.a.trackCardShow(e,{id:7844},{button:{text:"inlinezvideo"}})},s=function(e,t,n){var r;a.a.trackEvent(e.target,{id:7846,action:"OpenUrl"},{button:{text:"inlinezvideo"}}),null==t||null===(r=t.onImageClick)||void 0===r||r.call(t,e,n)},l=function(e,t,n){var r;a.a.trackEvent(e.target,{id:7846,action:"OpenUrl"},{button:{text:"inlinezvideo"}}),null==t||null===(r=t.onImageClick)||void 0===r||r.call(t,e,n)};t.a=function(e,t,n){var a=e["data-text"],u=e.href,d=e.zvideoLinkCardProps;Object(r.useEffect)((function(){n&&Object(o.onViewedOnce)(t.current,(function(){return c(t.current)}))}),[n,t]);var f=Object(i.c)((function(e){s(e,{title:a,url:u,video:{}})})),p=Object(i.c)((function(e){l(e,d,{title:a,url:u})}));return n?{handleImageClick:f,handleInfoClick:p}:{}}},function(e,t,n){"use strict";var r=n(1),o=n(5);function a(e){var t=e.className,n=e.children,a=e.onEvent,i=Object(r.useCallback)((function(e){a(e)||e.stopPropagation()}),[a]);return Object(o.g)("div",{className:t,onBeforeInput:i,onBlur:i,onCompositionEnd:i,onCompositionStart:i,onCopy:i,onCut:i,onDragEnd:i,onDragEnter:i,onDragLeave:i,onDragOver:i,onDragStart:i,onDrop:i,onFocus:i,onInput:i,onKeyDown:i,onKeyPress:i,onKeyUp:i,onMouseUp:i,onPaste:i,onSelect:i,onClick:i},n)}a.defaultProps={onEvent:function(){return!1}},t.a=a},function(e,t,n){"use strict";var r=n(1),o=n(78);t.a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.rootMargin,i=n.threshold,c=n.once,s=void 0===c||c;e=Array.isArray(e)?e:e?[e]:[];var l=Object(r.useRef)(null),u=Object(o.c)(t);Object(r.useEffect)((function(){if(e.length)return l.current&&e.forEach((function(e){return l.current.unobserve(e)})),l.current=new IntersectionObserver((function(e){e.forEach((function(e){e.intersectionRatio>0&&(u(e),s&&l.current.unobserve(e.target))}))}),{rootMargin:a,threshold:i}),e.forEach((function(e){return l.current.observe(e)})),function(){e.forEach((function(e){return l.current.unobserve(e)}))}}),[e,a,JSON.stringify(i),s])}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return k}));var r=n(33),o=n.n(r),a=n(41),i=n.n(a),c=n(1),s=n.n(c),l=n(11),u=n.n(l),d=n(5),f=function(e){var t=e.className,n=e.title,r=e.options,a=e.children,c=i()(e,["className","title","options","children"]);return Object(d.g)("div",o()({className:u()("List",t)},c),(n||r)&&Object(d.g)("div",{className:"List-header"},Object(d.g)("h4",{className:"List-headerText"},n),Object(d.g)("div",{className:"List-headerOptions"},r)),a)},p=n(20),h=n.n(p),b=n(21),m=n.n(b),v=n(22),g=n.n(v),y=n(23),O=n.n(y),j=n(13),w=n.n(j);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w()(e);if(t){var o=w()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O()(this,n)}}var k=function(e){g()(n,e);var t=C(n);function n(){return h()(this,n),t.apply(this,arguments)}return m()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.tabIndex,r=e.meta,o=e.children,a=e.onRef;return Object(d.g)("div",{className:u()("List-item",t),tabIndex:n,ref:a},r&&Object(d.g)("div",{className:"List-itemMeta"},r),o)}}]),n}(s.a.Component);n(989)},function(e,t,n){"use strict";var r=n(55),o=n.n(r),a=n(1),i=n(112);var c="function"==typeof Image,s={},l=c?i((function(e){return new Promise((function(t){return n=e,r=function(e,n){s[e]=n,t(n)},(o=new Image).onload=function(){var e=o.width>0&&o.height>0;r(n,e)},o.onerror=function(){r(n,!1)},void(o.src="data:image/webp;base64,"+{lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}[n]);var n,r,o}))})):function(){return Promise.resolve(!1)};t.a=function(e){var t=s[e],n=Object(a.useState)(t),r=o()(n,2),i=r[0],u=r[1];return c&&void 0===t&&l(e).then(u),i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={TAB:9,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(35),o=n(2),a=n(11),i=n.n(a),c=n(177),s=n(903);function l(e){var t=e.className,n=e.user,a=void 0===n?{}:n,l=e.avatarProps,u=void 0===l?{}:l,d=Object(r.a)(e,["className","user","avatarProps"]),f=a.name,p=a.avatarUrl;return Object(o.b)("span",{className:i()("UserLink",t),children:Object(o.b)(s.a,Object.assign({},d,{user:a,children:Object(o.b)(c.a,Object.assign({className:"UserLink-avatar",url:p,alt:f},u))}))})}},function(e,t,n){e.exports=n(58)(202)},function(e,t,n){"use strict";var r=n(1032),o=n(1033);e.exports=function(e,t){var n=t.getStartKey(),a=t.getStartOffset(),i=t.getEndKey(),c=t.getEndOffset(),s=o(e,t).getBlockMap(),l=s.keySeq(),u=l.indexOf(n),d=l.indexOf(i)+1;return r(s.slice(u,d).map((function(e,t){var r=e.getText(),o=e.getCharacterList();return n===i?e.merge({text:r.slice(a,c),characterList:o.slice(a,c)}):t===n?e.merge({text:r.slice(a),characterList:o.slice(a)}):t===i?e.merge({text:r.slice(0,c),characterList:o.slice(0,c)}):e})))}},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(1037),a=n(838),i=n(839),c=(0,a.Map)(),s=0;function l(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var u={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),u.__getLastCreatedEntityKey()},create:function(e,t,n){return l("DraftEntity.create","contentState.createEntity"),u.__create(e,t,n)},add:function(e){return l("DraftEntity.add","contentState.addEntity"),u.__add(e)},get:function(e){return l("DraftEntity.get","contentState.getEntity"),u.__get(e)},mergeData:function(e,t){return l("DraftEntity.mergeData","contentState.mergeEntityData"),u.__mergeData(e,t)},replaceData:function(e,t){return l("DraftEntity.replaceData","contentState.replaceEntityData"),u.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return""+s},__create:function(e,t,n){return u.__add(new o({type:e,mutability:t,data:n||{}}))},__add:function(e){var t=""+ ++s;return c=c.set(t,e),t},__get:function(e){var t=c.get(e);return t||i(!1),t},__mergeData:function(e,t){var n=u.__get(e),o=r({},n.getData(),t),a=n.set("data",o);return c=c.set(e,a),a},__replaceData:function(e,t){var n=u.__get(e).set("data",t);return c=c.set(e,n),n}};e.exports=u},function(e,t,n){"use strict";var r={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var t=e.split("-"),n=t[0],r=t[1],o=t[2];return{blockKey:n,decoratorKey:parseInt(r,10),leafKey:parseInt(o,10)}}};e.exports=r},function(e,t,n){"use strict";n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return O}));var r=n(1),o=n.n(r),a=n(11),i=n.n(a),c=n(318),s=n.n(c),l=n(365),u=n(827),d=n(1289),f=n(5),p={answer:"回答",article:"文章",zvideo:"视频",question:"问题",collection:"收藏夹",roundtable:"圆桌",topic:"话题"},h={voteupCount:"赞同",commentCount:"评论",playCount:"播放",followerCount:"关注",answerCount:"回答",visitCount:"浏览"},b={answer:["voteupCount","commentCount"],article:["voteupCount","commentCount"],zvideo:["playCount","voteupCount"],question:["followerCount","answerCount"],collection:["visitCount","followerCount"],default:["followerCount","visitCount"]},m=function(e){var t=e.twoLine,n=e.children;return Boolean(n)&&Object(f.g)("span",{className:i()("LinkCard-title",{"two-line":t})},n)},v=function(e){var t=e.author,n=e.children;return Boolean(t)&&Object(f.g)("span",{className:"LinkCard-excerpt"},Object(f.g)("span",{className:"LinkCard-author"},t,n?"":" 创作"),Boolean(n)&&n)},g=function(e){var t=e.data,n=t.objectType,r=(b[n]||b.default).map((function(e){var n=t[e];return"".concat(Object(l.cnNiceNumber)(n)).concat(h[e])})).filter(Boolean).join(" · ");return Object(f.g)("span",{className:"LinkCard-desc"},r,Object(f.g)("span",{className:"LinkCard-tag"},p[n]))},y=function(e){var t=e.url,n=Object(r.useMemo)((function(){var e=null,n=s()(t,!0);return"link.zhihu.com"===n.hostname&&(e=n.query.target),(e||t).replace(/^https?:\/\//,"")}),[t]);return Object(f.g)("span",{className:"LinkCard-desc"},Object(f.g)(u.a,{size:14,center:!0}),n)},O=function(e){var t=e.url,n=e.isVideo,r=e.ratio,o=void 0===r?1:r,a=e.onClick;return Boolean(t)&&Object(f.g)("span",{className:"LinkCard-image",style:{height:60*o}},Object(f.g)("img",{src:t,onClick:a,alt:n?"点击可播放视频":""}),n&&Object(f.g)("span",{className:"LinkCard-image--video"},Object(f.g)(d.a,{size:10,center:!0})))};t.d=o.a.forwardRef((function(e,t){var n=e.url,r=e.data,a=e.onClick,i=e.onClickImage,c="2"===e.newLinkCardAb,s=r.title,l=r.author,u=r.excerpt,d=r.thumbnail,p=r.objectType;return Object(f.g)(o.a.Fragment,null,Object(f.g)("span",{ref:t,className:"LinkCard-contents",onClick:a},Object(f.g)(m,{twoLine:!l||c},s),!c&&Object(f.g)(v,{author:l},u),p?Object(f.g)(g,{data:r}):Object(f.g)(y,{url:n})),Object(f.g)(O,{url:d,isVideo:"zvideo"===p,onClick:i}))}))},function(e,t,n){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return P})),n.d(t,"d",(function(){return z})),n.d(t,"f",(function(){return F})),n.d(t,"e",(function(){return q})),n.d(t,"g",(function(){return Y})),n.d(t,"h",(function(){return Z})),n.d(t,"c",(function(){return te}));var r=n(55),o=n.n(r),a=n(33),i=n.n(a),c=n(41),s=n.n(c),l=n(1),u=n.n(l),d=n(233),f=n.n(d),p=n(39),h=n(5),b=function(e){return function(t){var n=Object(l.useState)(null),r=o()(n,2),a=r[0],c=r[1],u=e.idAttr,d=e.selector,b=e.component,m=e.targetClassName,v=e.cardDataFilter,g=e.getCardProps,y=t.root,O=s()(t,["root"]),j=u&&d&&m&&Object(l.useCallback)(function(e){var t=e.idAttr,n=e.targetClassName;return function(e){var r=e.getAttribute(t),o=document.createElement("div");return o.className=n,e.parentNode.replaceChild(o,e),{data:{id:r},target:o}}}({idAttr:u,targetClassName:m}),[u,m]),w=Object(l.useMemo)((function(){return j?function(e){return Array.from(e.querySelectorAll(d)).map(j)}:f.a}),[j,y,d]);return Object(l.useEffect)((function(){if(y||d&&v){var e=(v||w)(y).map((function(e){var t=e.data,n=e.target,r=null;return"function"==typeof g&&(r=g(t)),Object(p.createPortal)(Object(h.g)(b,i()({key:t.id,id:t.id},r,O)),n)}));e.length>0&&c(e)}}),[y]),a}},m=b({idAttr:"data-ad-id",selector:"a[data-ad-id]",targetClassName:"RichText-ADLinkCardContainer",component:n(1e3).a}),v=n(30),g=n(232),y=n(7),O=n(873),j=n(387),w=n.n(j),C=n(11),k=n.n(C),x=n(369),S=n.n(x),E=n(152),R=n(365);function T(){var e=w()(["","的文章"]);return T=function(){return e},e}var A=function(e){var t=e.authorName,n=e.voteupCount;return Object(h.g)(u.a.Fragment,null,S()(T(),t),n>=100&&" · ".concat(Object(R.cnNiceNumber)(n),"赞同"))};function N(e){var t=e.cardRef,n=e.useOpenArticleButton,r=e.handleClickLink,o=e.title,a=e.excerptText,i=e.imgUrlSrc,c=e.voteupCount,s=e.commentCount;return Object(h.g)("div",{className:"ArticleLinkCard",ref:t},Object(h.g)("span",{className:"ArticleLinkCard-title"},o),Boolean(a)&&Object(h.g)("div",{className:"ArticleLinkCard-excerpt"},a),i&&Object(h.g)("div",{className:"ArticleLinkCard-imageWrapper"},Object(h.g)("img",{src:Object(E.imgUrl)(i,"540x300"),className:"ArticleLinkCard-image",alt:""})),Object(h.g)("div",{className:"ArticleLinkCard-bottom"},Object(h.g)("span",{className:"ArticleLinkCard-hint"},"".concat(Object(R.cnNiceNumber)(c),"赞同 · ").concat(Object(R.cnNiceNumber)(s),"评论")),n&&Object(h.g)("span",{onClick:r,className:"ArticleLinkCard-hybridLink"},"查看完整文章")),Object(h.g)("div",{className:"ArticleLinkCard-bottomCardGradient"}))}function _(e){var t=e.cardRef,n=e.useOpenArticleButton,r=e.handleClickLink,o=e.title,a=e.content,i=e.imgUrlSrc,c=e.voteupCount,s=e.authorName,l=e.avatarUrl;return Object(h.g)("div",{className:"ArticleLinkCard AvatarArticleLinkCard",ref:t},Object(h.g)("div",{className:"AvatarArticleLinkCard-info"},Object(h.g)("div",{className:"AvatarArticleLinkCard-hint"},l&&Object(h.g)("img",{className:"AvatarArticleLinkCard-avatar",src:l,alt:""}),Object(h.g)(A,{authorName:s,voteupCount:c})),n&&Object(h.g)("span",{onClick:r,className:"AvatarArticleLinkCard-hybridLink"},"查看全文")),Object(h.g)("span",{className:"ArticleLinkCard-title"},o),Object(h.g)("div",{className:k()("ArticleLinkCard-content",{"ArticleLinkCard-content--noImg":!i})},Object(h.g)("div",{dangerouslySetInnerHTML:{__html:a}})),!i&&Object(h.g)("span",{className:"AvatarArticleLinkCard-more"},"更多内容"),i&&Object(h.g)("img",{className:"AvatarArticleLinkCard-image",src:i,alt:""}))}function I(e){var t=e.cardRef,n=e.useOpenArticleButton,r=e.handleClickLink,o=e.title,a=e.content,i=e.imgUrlSrc,c=e.voteupCount,s=e.authorName;return Object(h.g)("div",{className:"ArticleLinkCard QuoteArticleLinkCard",ref:t},Object(h.g)("span",{className:"ArticleLinkCard-title"},o),Object(h.g)("div",{className:"QuoteArticleLinkCard-hint"},Object(h.g)(A,{authorName:s,voteupCount:c})),Object(h.g)("div",{className:k()("ArticleLinkCard-content QuoteArticleLinkCard-content",{"ArticleLinkCard-content--noImg":!i})},Object(h.g)("div",{dangerouslySetInnerHTML:{__html:a}})),!i&&n&&Object(h.g)("div",{onClick:r,className:"QuoteArticleLinkCard-hybridLink"},"查看全文"),i&&Object(h.g)("img",{className:"QuoteArticleLinkCard-image",src:i,alt:""}))}function M(e){var t=e.article,n=t.title,r=t.excerpt,o=t.content,a=t.imageUrl,i=t.voteupCount,c=t.commentCount,s=t.author,u=void 0===s?{}:s,d=e.styleAbParam,f=e.cardRef,p=e.useOpenArticleButton,b=e.handleClickLink,m=Object(l.useMemo)((function(){var e=document.createElement("div");return e.innerHTML=r,e.textContent}),[r]),v=u.name,g=u.avatarUrl;return"1"===d?Object(h.g)(_,{cardRef:f,useOpenArticleButton:p,handleClickLink:b,title:n,content:o,imgUrlSrc:a,voteupCount:i,authorName:v,avatarUrl:g}):"2"===d?Object(h.g)(I,{cardRef:f,useOpenArticleButton:p,handleClickLink:b,title:n,content:o,imgUrlSrc:a,voteupCount:i,authorName:v}):Object(h.g)(N,{cardRef:f,useOpenArticleButton:p,handleClickLink:b,title:n,excerptText:m,imgUrlSrc:a,voteupCount:i,commentCount:c})}var L=function(e){var t=e.article.id,n=e.article,r=e.useOpenArticleButton,o=e.enableZa,a=e.styleAbParam,i=Object(l.useRef)(null);Object(l.useEffect)((function(){o&&(v.a.setModule(i.current,{module:"Content"},{card:{content:{type:"Post",token:String(t)}}}),v.a.trackCardShow(i.current,{id:8589,element:"Card"}))}),[o,t]);var c="https://zhuanlan.zhihu.com/p/".concat(t),s=Object(l.useCallback)((function(){o&&v.a.trackEvent(i.current,{id:8590,action:"OpenUrl",element:"Card"})}),[o]);return Object(h.g)(g.c,{as:"a",shouldTrackShow:!0,shouldTrackClick:!0,zaBlock:"ZTextArticleLinkCard",zaAction:"OpenUrl",zaType:"Button",zaEventType:"Click",extra:{link:{url:c}},href:c,"data-za-not-track-link":!0,onClick:s,rel:"noopener noreferrer",target:"_blank"},Object(h.g)(M,{styleAbParam:a,cardRef:i,useOpenArticleButton:r,linkUrl:c,handleClickLink:s,article:n}))},P=b({cardDataFilter:function(e){return Array.from(e.getElementsByTagName("a")).map((function(e){var t,n=e.getAttribute("href"),r="link-card"===e.getAttribute("data-draft-type"),o="normal"===e.getAttribute("data-size");if(!n||!r||!o)return null;var a=null===(t=n.match(/https:\/\/zhuanlan.zhihu.com\/p\/(\d+)$/))||void 0===t?void 0:t[1];if(a){var i=document.createElement("div");return i.className="RichText-ArticleLinkCardContainer",e.parentNode.replaceChild(i,e),{data:{id:a},target:i}}return null})).filter(Boolean)},component:function(e){var t=e.id,n=e.useOpenArticleButton,r=e.enableZa,a=e.styleAbParam,c=s()(e,["id","useOpenArticleButton","enableZa","styleAbParam"]),u=Object(l.useState)(null),d=o()(u,2),f=d[0],p=d[1],b=Object(l.useState)(null),m=o()(b,2),v=m[0],g=m[1],j=a&&["1","2"].includes(a)?"1":"0";return Object(l.useEffect)((function(){var e="https://www.zhihu.com/api/v4/articles/".concat(t,"?is_article_card=").concat(j);Object(O.a)(e).then((function(e){return Object(y.camelizeKeys)(e)})).then((function(e){e.error?g(e.error.message):p(e)})).catch((function(e){g(e.message||"未知错误")}))}),[t,j]),v?Object(h.g)("div",{className:"ArticleLinkCard-error"},v):f?Object(h.g)(L,i()({article:f,useOpenArticleButton:n,enableZa:r,styleAbParam:a},c)):Object(h.g)("div",{className:"ArticleLinkCard-loading"},"加载中...")}}),B=n(912),z=b({idAttr:"data-mcn-id",selector:"a[data-mcn-id]",targetClassName:"RichText-MCNLinkCardContainer",component:B.c}),D=n(914),F=b({cardDataFilter:function(e){return Array.from(e.querySelectorAll("a.LinkCard[data-draft-type=link-card]")).map((function(e){var t,n=(t=e.attributes,Array.from(t).reduce((function(e,t){return"class"===t.name?e.className=t.value:e[t.name]=t.value,e}),{})),r=document.createElement("div");return r.className="RichText-LinkCardContainer",e.parentNode.replaceChild(r,e),{data:n,target:r}}))},getCardProps:function(e){return e.href&&e.href.match(/https:\/\/www.zhihu.com\/zvideo\/(\d+)$/)?e.zaBlock="ZTextZVideoLinkCard":e.zaBlock="ZTextLinkCard",e},component:D.a}),U=n(841),V=function(e){var t=Object(y.camelizeKeys)(e),n=t.resourceName,r=t.button,o=r.url,a=r.text,i=t.title,c=t.cover,s=t.price,l=t.source,u=void 0===l?"知乎":l;return{url:o,buttonText:a,title:i,imgUrl:c,price:s,authorText:t.desc,heatText:t.footer,producer:n,source:u}},q=b({idAttr:"data-sku-id",selector:"a[data-sku-id]",targetClassName:"RichText-MkSkuLinkCardContainer",component:function(e){var t=e.onClick,n=Object(l.useRef)(!1);return Object(h.g)(B.c,i()({processResponse:V,getUrl:function(e){return"https://www.zhihu.com/api/v4/market/km_sku_card/".concat(e)},fetcherOptions:{credentials:"same-origin"},onClick:function(e){v.a.trackEvent(e.target,{id:7204,action:"OpenUrl"}),t&&t(e)},disableZa:!0,ref:function(t){t&&!t.classList.contains("MCNLinkCard-placeholder")&&!1===n.current&&(v.a.setModule(t,{module:"Content"},{card:{content:{id:e.id}}}),Object(U.onViewedOnce)(t,(function(){v.a.trackCardShow(t,{id:7203})})),n.current=!0)},zaBlock:"ZTextMkSKuLinkCard"},e))}}),H=n(78),K=function(e){return{elementLocation:{type:"Button",content:{type:e.dataset.zaContentType}}}},Q=function(e){return{attachedInfoBytes:e.dataset.zaAttachInfo}},W=[{selector:"a.external, a.internal",zaBlock:"ZTextLink"},{selector:"a.member_mention, a.UserLink-link",zaBlock:"ZTextMention"},{selector:"a.video-box",zaBlock:"ZTextVideoCard"},{selector:'a.LinkCard.old[data-draft-type="link-card"]',zaBlock:"ZTextLinkCard"},{selector:'a.LinkCard.new.static[data-draft-type="link-card"]:not([data-za-content-type="Zvideo"])',zaBlock:"ZTextLinkCard",viewInfoBuilder:K,extraInfoBuilder:Q},{selector:'a.LinkCard.new.static[data-draft-type="link-card"][data-za-content-type="Zvideo"]',zaBlock:"ZTextZVideoLinkCard",viewInfoBuilder:K,extraInfoBuilder:Q},{selector:"a.FileLinkCard",zaBlock:"ZTextFileLinkCard"}],G=function(e){var t,n,r=e.element,o=e.config,a=null===(t=o.viewInfoBuilder)||void 0===t?void 0:t.call(o,r,o),i=Object.assign({elementLocation:{type:"Button"},block:o.zaBlock},a),c=Object.assign({action:"OpenUrl",elementLocation:{type:"Button"},block:o.zaBlock,eventType:"Click"},a),s=Object.assign({link:{url:r.href}},null===(n=o.extraInfoBuilder)||void 0===n?void 0:n.call(o,r,o)),u=Object(g.i)().trackEvent,d=Object(g.h)(i,s),f=Object(H.c)((function(e){u(c,s),"ZTextLinkCard"===o.zaBlock&&r.dataset.isEcommerce&&e.preventDefault()}));return Object(l.useEffect)((function(){return r.addEventListener("click",f),function(){r.removeEventListener("click",f)}}),[]),Object(l.useEffect)((function(){return d(r),function(){return d(null)}}),[]),null},Y=function(e){var t=e.root,n=Object(l.useState)([]),r=o()(n,2),a=r[0],i=r[1];return Object(l.useEffect)((function(){if(t){var e=[];W.forEach((function(n){var r=n.selector;Array.from(t.querySelectorAll(r)).forEach((function(t){e.push({el:t,config:n})}))})),i(e)}}),[t]),Object(h.g)(u.a.Fragment,null,a.map((function(e,t){var n=e.el,r=e.config;return Object(h.g)(G,{key:t,element:n,config:r})})))},Z=b({cardDataFilter:function(e){return Array.from(e.getElementsByTagName("a")).map((function(e){var t,n=e.getAttribute("href"),r="link-card"===e.getAttribute("data-draft-type");if(!n||!r)return null;var o=null===(t=n.match(/https:\/\/www.zhihu.com\/zvideo\/(\d+)$/))||void 0===t?void 0:t[1];if(o){var a=document.createElement("div");return a.className="RichText-ZVideoLinkCardContainer",e.parentNode.replaceChild(a,e),{data:{id:o},target:a}}return null})).filter(Boolean)},component:n(978).a}),X=n(90),J=n(909);var $={name:"1wtde8n",styles:"font-size:12px;overflow:hidden;"},ee=function(e){var t=e.contentHTML,n=Object(l.useState)(!0),r=o()(n,2),a=r[0],i=r[1],c=Object(H.c)((function(){i(!a)}));return Object(h.g)(g.b,{block:"ZTextCatalog"},Object(h.g)(g.e,{as:X.Flex,zaType:"Block",className:"Catalog-content",flexDirection:"column",css:$,style:{height:a?"84px":"auto"},dangerouslySetInnerHTML:{__html:t}}),Object(h.g)(g.a,{as:J.a,zaType:"Button",zaAction:a?"Expand":"Collapse",isFold:a,onClick:c}))},te=function(e){var t=e.root,n=Object(l.useState)(null),r=o()(n,2),a=r[0],i=r[1];return Object(l.useEffect)((function(){if(t){var e=t.querySelector(".Catalog-wrapper");if(e&&e.querySelector(".bottom-shadow")){var n=e.querySelector(".Catalog-content").innerHTML,r=document.createElement("div");r.className="Catalog-wrapper",e.parentNode.replaceChild(r,e),i(Object(p.createPortal)(Object(h.g)(ee,{contentHTML:n}),r))}}}),[t]),a}},function(e,t,n){"use strict";n.d(t,"h",(function(){return m})),n.d(t,"d",(function(){return x})),n.d(t,"a",(function(){return y})),n.d(t,"f",(function(){return C})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return j})),n.d(t,"e",(function(){return k}));n(55);var r=n(1),o=n(39),a=n(44),i=n.n(a),c=n(318),s=n.n(c),l=n(30),u=(n(63),n(7),n(391)),d=n.n(u),f=(n(869),n(941)),p=n(844);function h(e){return"string"!=typeof e?e:e.replace(/__TS__/g,(function(){return parseInt(Date.now()/1e3)}))}function b(e){return e instanceof r.Component?Object(o.findDOMNode)(e):e}function m(e,t,n,r){"cardShow"===e?l.a.trackCardShow(b(t),n,r):"trackEvent"===e&&l.a.trackEvent(b(t),n,r)}n.d(t,"g",(function(){return p.y}));function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.x;if(!e)return new Promise((function(e){return e()}));var r=e,o=/^https?:\/\/[\w-.]+(:\d+)?/i.exec(e),a=o&&o[0];return a&&a.match("sugar.zhihu.com")&&(r=Object(p.a)(r,{ets:(new Date).getTime()})),n(r=h(r),r.indexOf("sugar.zhihu.com")>-1&&t?{fl:t}:void 0)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=void 0===n?"":n,o=t.payload,a=void 0===o?{}:o;if(r===f.a.TopicClick){var i=a.url;return"".concat(e,"&etu=").concat(btoa(unescape(encodeURIComponent(i))))}if(r===f.a.ExtendClick&&0===e.indexOf("https://sugar.zhihu.com"))try{var c=e.slice(),l=parseInt(Date.now()/1e3),u="".concat(s()(c).pathname,"+").concat(l),p=d()(u),h=a.clickEvent,b=void 0===h?{}:h,m=b.clientX,v=b.clientY,g=b.currentTarget,y=g.getBoundingClientRect(),O=y.width,j=y.height,w=y.left,C=y.top,k=m-w,x=v-C,S="".concat(parseInt(k),"x").concat(parseInt(x),"x").concat(parseInt(O),"x").concat(parseInt(j));return"".concat(c,"&ev=").concat(S,"&emfen=").concat(p,"&emfts=").concat(l)}catch(t){return e}return e}function y(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{var o;e&&"function"==typeof e.trackMethod&&(o=e.trackMethod,e=e.tracks);var a=e.filter(Boolean).map((function(e){var a="".concat(e).concat(n?"&et=".concat(n):"");return v(a=g(a,r),t,o)})),i=Promise.all(a).catch((function(){return null}));return Promise.race([i,new Promise((function(e){return setTimeout(e,500)}))])}catch(e){console.error("clickTrack: ",e)}}function O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.filter(Boolean).map((function(e){return v(e)})),n=Promise.all(t).catch((function(){return null}));return Promise.race([n,new Promise((function(e){return setTimeout(e,500)}))])}function j(e,t){e&&e.length&&e.map((function(e){return Object(p.x)(e,{et:t?"page_adjson":"page_ads"})}))}function w(e,t){e&&e.length&&e.map((function(e){return v(e,t)}))}function C(e,t,n,r){var o;t&&"function"==typeof t.trackMethod&&(o=t.trackMethod,t=t.tracks),t&&t.length&&Object(p.r)(e,(function(){t.map((function(e){return Promise.race([v(e,n,o),new Promise((function(e,t){return setTimeout(t,5e3)}))]).then((function(){return{status:200}})).catch((function(){return{status:600}})).then((function(t){return{et:"third_imp",ev:t.status||601,etu:btoa(unescape(encodeURIComponent(e))),plugin:Object(p.j)()}})).then((function(e){if(e){var t=i.a.stringify(e);(r||[]).map((function(e){return e?Object(p.u)(t?"".concat(e).concat(e.includes("?")?"&":"?").concat(t):e):null}))}}))}))}))}function k(e,t){t&&t.length&&Object(p.q)(e,(function(){t.map((function(e){return v("".concat(e))}))}))}function x(e,t){var n=t.impressionTracks,r=t.debugTracks,o=t.viewTracks,a=t.viewXTracks,i=t.xAppFlavor;w(n,i),C(e,o,i,r),k(e,a)}},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(66),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(19),f=n(27),p=n(377),h=n(857),b=n(1009),m=n(30),v=n(887),g=n(25),y=n(216),O=n(366),j=n(320),w=n.n(j),C=function(e,t){return e+(t?Date.now()-t:0)},k=function(e,t){return Math.abs(e-t)<.01},x={auto:"Auto",ld:"LD",sd:"SD",hd:"HD"},S={auto:"自动",ld:"低清",sd:"标清",hd:"超清"},E=[1,2,3,5,8,13];function R(e){var t,n="sd",r=0,o=null,a=0,i=null,c=!1,s=0,l=0;function u(t,c){e(t,Object.assign({play_event_identifier:o,duration:1e3*r,elapsed:C(a,i),video_quality:x[n]},c))}function d(){(++l<15?E.includes(l):l%15==0)&&u({action:"Playing"})}function f(){clearInterval(t)}return{handlePlayEvent:function(e){var n=e.currentTime,c=e.duration;r=c,k(n,0)&&(o=w()(),a=0),i=Date.now(),k(n,0)?u({action:"Play"}):u({action:"ResumePlay"}),l=0,f(),t=setInterval(d,1e3)},handlePauseEvent:function(e){var t=e.currentTime,n=e.duration;i&&(a+=Date.now()-i,i=null),k(t,n)?u({action:"EndPlay"}):u({action:"Pause"}),f()},handleQualityChangeEvent:function(e){var t=e.quality;u({action:"Switch",name:S[t]}),n=t},handleFragmentLoading:function(){c||(s=Date.now())},handleFragmentLoaded:function(){c||(c=!0,u({action:"Load"},{video_load_time:Date.now()-s}))},clearTick:f}}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var A=function(e){Object(i.a)(n,e);var t=T(n);function n(e){var o;Object(r.a)(this,n),(o=t.call(this,e)).pauseVideoInIframe=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o.messageHelper.dispatchMessage(e.contentWindow,v.a.PLAYER.PAUSE,{dontApplyOnFullScreen:t})},o.pauseAllOtherVideos=function(){Array.from(document.querySelectorAll("iframe")).filter((function(e){return e!==o.iframe})).forEach((function(e){return o.pauseVideoInIframe(e)}))},o.handleMessage=function(e,t){var n=o.videoTracker,r=n.handlePlayEvent,a=n.handlePauseEvent,i=n.handleQualityChangeEvent,c=n.handleFragmentLoading,s=n.handleFragmentLoaded;switch(e){case v.b.DOM.PLAY:o.pauseAllOtherVideos(),r(t);break;case v.b.DOM.PAUSE:a(t);break;case v.b.PLAYER.QUALITY_CHANGE:i(t);break;case"fragment-loading":c(t);break;case"fragment-loaded":s(t)}},o.handleObserve=function(e){e[0].intersectionRatio<=0&&o.iframe&&o.pauseVideoInIframe(o.iframe,!0)},o.handlePlay=function(){o.props.trackEvent(Object(a.a)(o),{id:5500,action:"Play",element:"Video"})},o.handlePlayFailed=function(){(0,o.props.showNotification)("视频加载失败,请刷新页面重试","red")};var i=e.data;return o.messageHelper=Object(v.c)(i.id,"*",!0),o.videoTracker=R((function(e,t){m.a.trackEvent(Object(a.a)(o),e,{play:t})})),o}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.data,n=t.isLens,r=t.id,o=t.playerUrl,a=t.flvPlayerUrl,i=e.loadVideo;n||!r||o||a||i(r);var c=this.messageHelper.subscribeMessage;this.messageSubscription=c(this.handleMessage)}},{key:"componentWillUnmount",value:function(){this.messageSubscription.unsubscribe(),this.videoTracker.clearTick()}},{key:"render",value:function(){var e=this,t=this.props,n=t.data,r=t.data.error,o=t.onBeforePlay;return Object(l.b)("div",{className:"RichText-video",children:r?Object(l.b)(b.a,Object.assign({},n)):Object(l.b)(p.a,{onObserve:this.handleObserve,children:Object(l.b)(h.b,Object.assign({},n,{onIframeRef:function(t){return e.iframe=t},onPlay:this.handlePlay,onPlayFailed:this.handlePlayFailed,onBeforePlay:o}))})})}}]),n}(u.Component);t.a=Object(d.compose)(Object(f.connect)((function(e,t){var n=t.data,r=n.isLens,o=n.id;return r?{data:Object.assign({},t.data,{source:"lens",playerUrl:"https://www.zhihu.com/video/".concat(o)})}:{data:e.video.data[o]||t.data}}),{showNotification:g.h,loadVideo:y.c}),Object(O.b)((function(e){var t=e.data,n=t.isLens,r=t.id,o=t.isPlayable;return{module:"VideoItem",content:{type:"Video",sub_type:n?"SelfHosted":"Embedded",video_id:r,is_playable:Boolean(o)},trackCardShow:!0,view:{id:174}}})))(A)},function(e,t,n){var r,o,a;o=[t],void 0===(a="function"==typeof(r=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var n=!1;if("undefined"!=typeof window){var r={get passive(){n=!0}};window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}function o(e){return s.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))}function a(e){var t=e||window.event;return!!o(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)}function i(){setTimeout((function(){void 0!==f&&(document.body.style.paddingRight=f,f=void 0),void 0!==d&&(document.body.style.overflow=d,d=void 0)}))}var c="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&1<window.navigator.maxTouchPoints),s=[],l=!1,u=-1,d=void 0,f=void 0;e.disableBodyScroll=function(e,r){if(c){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!s.some((function(t){return t.targetElement===e}))){var i={targetElement:e,options:r||{}};s=[].concat(t(s),[i]),e.ontouchstart=function(e){1===e.targetTouches.length&&(u=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var n,r,i,c;1===t.targetTouches.length&&(r=e,c=(n=t).targetTouches[0].clientY-u,o(n.target)||(r&&0===r.scrollTop&&0<c||(i=r)&&i.scrollHeight-i.scrollTop<=i.clientHeight&&c<0?a(n):n.stopPropagation()))},l||(document.addEventListener("touchmove",a,n?{passive:!1}:void 0),l=!0)}}else{h=r,setTimeout((function(){if(void 0===f){var e=!!h&&!0===h.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(f=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===d&&(d=document.body.style.overflow,document.body.style.overflow="hidden")}));var p={targetElement:e,options:r||{}};s=[].concat(t(s),[p])}var h},e.clearAllBodyScrollLocks=function(){c?(s.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),l&&(document.removeEventListener("touchmove",a,n?{passive:!1}:void 0),l=!1),s=[],u=-1):(i(),s=[])},e.enableBodyScroll=function(e){if(c){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,s=s.filter((function(t){return t.targetElement!==e})),l&&0===s.length&&(document.removeEventListener("touchmove",a,n?{passive:!1}:void 0),l=!1)}else(s=s.filter((function(t){return t.targetElement!==e}))).length||i()}})?r.apply(t,o):r)||(e.exports=a)},function(e,t,n){var r=n(252),o=n(1069),a=n(182),i=n(319),c=a((function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=c},,function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=n,e.exports.default=n},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return i})),n.d(t,"d",(function(){return c})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"f",(function(){return u})),n.d(t,"a",(function(){return f}));var r=n(863),o={ready:"立即下载",downloading:"下载中...",pause:"继续下载",completed:"立即安装",error:"立即下载"},a="立即打开",i={brand_card_image:"normal",plutus_card_image:"normal",plutus_card_image_download:"largeDownloadAd",plutus_card_video:"video",plutus_card_video_download:"videoDownload",plutus_card_window:"windowAd",sdk_card_image:"sdkAd",plutus_card_slide_image:"normal",plutus_card_slide_image_download:"normalDownload",plutus_card_word_105:"word",plutus_card_word_105_download:"wordDownload",plutus_card_small_image_105:"smallImage",plutus_card_small_image_105_download:"smallImageDownload",plutus_card_multi_images_105:"multiple",plutus_card_multi_images_105_download:"multipleDownload"},c={bbi_105:"normal",pbi_105:"normal",pii_105:"normal",pii_105_d:"normalDownload",pbi_105_d:"largeDownloadAd",pv_105:"video",bv_105_o:"videoWithDeeplink",bv_105_i:"videoFullscreen",pv_105_d:"videoDownload",ps_105:"windowAd",sbi_105:"sdkAd",pw_105_d:"wordDownload",pw_105:"word",psi_105:"smallImage",psi_105_d:"smallImageDownload",pmi_105:"multiple",pmi_105_d:"multipleDownload",pw_417_d:"wordDownload",pw_417:"word",psi_417:"smallImage",psi_417_d:"smallImageDownload",pw_419_d:"wordDownload",pw_419:"word",psi_419:"smallImage",psi_419_d:"smallImageDownload"},s={bsi_20:"single",bmi_20:"multiple",pw_20:"word",bw_20:"word",pw_20_d:"wordDownload",psi_20:"single",psi_20_d:"singleDownload",bsi_20_pu:"singlePu",pmi_20:"multiple",pmi_20_d:"multipleDownload",sci_20:"single",bsi_118:"single",bmi_118:"multiple"},l={bsi_208:"small",bmi_208:"multiple"},u=n.n(r)()({psi_19:"single",psi_19_d:"singleDownload",bsi_19:"single",psi_219:"small",psi_219_d:"small",pmi_219:"multiple",pmi_219_d:"multiple",pbi_m:"large",pbi_m_d:"large",psi_m:"small",psi_m_d:"small",pw_m:"word",pw_m_d:"word"},s),d="https://www.zhihu.com",f=("".concat(d,"/m_banner.html"),"".concat(d,"/m_banner2.html"),"".concat(d,"/natsume/maozhua_m_banner.html"),"".concat(d,"/natsume/ruoying_m_banner.html"),"".concat(d,"/m_related_feed.html"),"".concat(d,"/natsume/ruoying_related_feed.html"),"".concat(d,"/m_hot_feed.html"),{ExtendClick:"ExtendClick",TopicClick:"TopicClick"});new Set(["click_con","click_win","click_upvote","click_downvote"]),new Set(["click_topic","click_hot1","click_hot2","click_hot3"])},function(e,t,n){"use strict";var r=n(74),o=n.n(r),a=n(20),i=n.n(a),c=n(21),s=n.n(c),l=n(92),u=n.n(l),d=n(22),f=n.n(d),p=n(23),h=n.n(p),b=n(13),m=n.n(b),v=n(3),g=n.n(v),y=n(1),O=n.n(y),j=n(39),w=n(64),C=n.n(w),k=n(384),x=n.n(k),S=n(30),E=n(71),R=n.n(E);var T=function(e,t){return function(n){var r=t(n);return R()(r,n),r.displayName="".concat(e,"(").concat(function(e){return e.displayName||e.name||"Component"}(n),")"),r}};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=C()((function(){var e=new IntersectionObserver((function(t){t.forEach((function(t){if(0!==t.intersectionRatio){var n=t.target;e.unobserve(n),n.handleChange&&(n.handleChange(),n.handleChange=null)}}))}),{threshold:[.1]});return e})),I=function(e,t,n,r){return T("track",(function(o){return function(a){f()(l,a);var c=A(l);function l(){var e;i()(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=c.call.apply(c,[this].concat(n)),N(u()(e),"values_",{}),N(u()(e),"trackCardShow",(function(){var t=e.values,n=t.viewInfo,r=t.extraInfo;S.a.trackCardShow(e.element,n,r)})),e}return s()(l,[{key:"parseValues",value:function(){var o,a=this,i=function(e){return"function"==typeof e?e(a.props):e};this.values={viewLocation:e,moduleInfo:(o=i(t),o?o.type||o.sub_type?{card:{card_type:"Content",content:o}}:o:null),viewInfo:i(n),extraInfo:i(r)}}},{key:"setModule",value:function(){var e=this.values,t=e.viewLocation,n=e.moduleInfo;S.a.setModule(this.element,t,n)}},{key:"componentDidMount",value:function(){this.element=Object(j.findDOMNode)(this),this.parseValues(),this.values.viewInfo&&(this.element.handleChange=this.trackCardShow,_().observe(this.element))}},{key:"componentDidUpdate",value:function(){this.parseValues()}},{key:"componentWillUnmount",value:function(){this.values.viewInfo&&(_().unobserve(this.element),this.element.handleChange=null),this.element=null}},{key:"render",value:function(){return O.a.createElement(o,this.props)}},{key:"values",get:function(){return this.values_},set:function(e){x()(e,this.values_)||(this.values_=e,this.setModule())}}]),l}(y.Component)}))},M=function(e){f()(n,e);var t=A(n);function n(){var e;i()(this,n);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),N(u()(e),"Component",I.apply(void 0,o()(e.props.options))((function(){return e.props.children}))),e}return s()(n,[{key:"render",value:function(){return"undefined"!=typeof window&&window.IntersectionObserver?O.a.createElement(this.Component,null):this.props.children}}]),n}(y.Component);N(M,"propTypes",{children:g.a.element.isRequired,options:g.a.array.isRequired});t.a=M},,function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(1),i=n(3),c=n.n(i),s=n(372),l=n(370),u=n(956);function d(e){var t,n=e.user,i=e.noHeadline,c=Object(r.a)(e,["user","noHeadline"]),d=n.headline,f=n.isOrg,p=Object(a.useMemo)((function(){return Object(l.e)(n.badgeV2||n.badge)}),[n]),h=p.identity,b=p.bestAnswerer,m=p.baike,v=p.title;return v?Object(o.b)(s.a,Object.assign({html:v},c)):!f&&(null==b||null===(t=b.topics)||void 0===t?void 0:t.length)?Object(o.c)("div",Object.assign({},c,{children:[Object(o.b)(u.a,{topics:b.topics,user:n}),"的优秀答主"]})):h?Object(o.b)("div",Object.assign({},c,{children:h[0].description})):m?Object(o.b)("div",Object.assign({},c,{children:m.description})):d&&!i?Object(o.b)(s.a,Object.assign({html:d},c)):null}d.propTypes={user:c.a.object.isRequired,noHeadline:c.a.bool},t.a=Object(a.memo)(d)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){var r=n(579),o=n(1070)(r);e.exports=o},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));n(863),n(55);var r=n(63),o=(n(7),n(869));n(844);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.HYBRID_ACTION_EVENT.commonAd;return new Promise((function(n){r.a.ready().then((function(){r.a.supportsAction(t).then((function(o){o?r.a.dispatch(t,e).then((function(e){e&&!1===e.status?n({status:!1,type:2,data:e}):n({status:!0,type:2,data:e})}),(function(e){return n({status:!1,type:2,data:e})})):n({status:!1,type:1})}))})).catch((function(e){return n({status:!1,type:0,data:e})}))}))}function i(e,t){return new Promise((function(n,r){a(t,e).then((function(e){return e.status?n(e):r(e)}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return j}));var r=n(33),o=n.n(r),a=n(20),i=n.n(a),c=n(21),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(22),h=n.n(p),b=n(1),m=n.n(b),v=n(7),g=n(844),y=n(869),O=function(e){function t(e){var n;return i()(this,t),(n=u()(this,f()(t).call(this,e))).state={hasError:!1},n}return h()(t,e),s()(t,[{key:"componentDidCatch",value:function(e,t){this.handleError(e,t)}},{key:"unstable_handleError",value:function(e,t){this.handleError(e,t)}},{key:"handleError",value:function(e,t){this.setState({hasError:!0}),console.error(e),t&&console.error(t),Object(y.sendRaven)({adjson:Object(g.e)(this.props,"children.props"),error:e,info:t})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(m.a.Component),j=function(e){return function(t){return t.data?m.a.createElement(O,null,m.a.createElement(e,o()({},t,{data:Object(v.camelizeKeys)(t.data)}))):null}}},function(e,t,n){"use strict";var r=n(27),o=n(53);t.a=function(){return Object(r.useSelector)(o.e)}},function(e,t,n){var r=n(1080),o=n(907),a=n(1081);e.exports=function(e){return o(e)?a(e):r(e)}},function(e,t,n){"use strict";function r(e){var t=String(e);return t.length<2&&(t="0"+t),t}function o(e){if(!isFinite(e))return"";var t=(e=Math.floor(e))%60,n=Math.floor(e/60);return"".concat(r(n),":").concat(r(t))}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return s})),n.d(t,"a",(function(){return l}));var r=5,o=40,a=60,i=300,c=6,s=[{value:"original",label:"原创"},{value:"reprint",label:"转载"}],l="https://pic2.zhimg.com/v2-feb96045745dac939aa2a900c6d6845d.jpg"},function(e,t,n){var r=n(1027)();e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(11),d=n.n(u);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var p=function(e){Object(a.a)(n,e);var t=f(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children;return Object(s.b)("div",{className:d()("Badge",t),children:n})}}]),n}(l.Component),h=n(232),b=n(1170),m=n(24);function v(e){return Object(s.b)(h.a,Object.assign({as:"a",href:m.F,target:"_blank",rel:"noopener noreferrer",zaBlock:"VipBadge",zaType:"Button",zaEventType:"Click",zaAction:"OpenUrl",extra:{link:{url:m.F}}},e,{children:Object(s.b)(b.a,{css:{height:"1em",width:"1em","&:hover":{cursor:"pointer"}},center:!0})}))}var g=Object(l.memo)(v);t.b=p},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(66),i=n(16),c=n(17),s=n(9),l=n(2),u=n(3),d=n.n(u),f=n(1),p=n(34),h=n(31),b=n(957),m=n(24);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var g=function(e){Object(i.a)(n,e);var t=v(n);function n(){var e;return Object(r.a)(this,n),(e=t.call(this)).state={expanded:!1},e.onExpand=e.handleExpand.bind(Object(a.a)(e)),e}return Object(o.a)(n,[{key:"handleExpand",value:function(){this.setState({expanded:!0})}},{key:"render",value:function(){var e=this.props,t=e.topics,n=e.user,r=e.ellipsisLength,o=e.expandable,a=e.privacyEnabled,i=e.showPrivacyPage,c=this.state.expanded,s="等 ".concat(t.length," 个"),u=t;return c||(u=t.slice(0,r)),0===t.length?null:Object(l.c)("span",{children:[u.map((function(e,t){return Object(l.c)("span",{children:[Object(l.b)(b.a,{showPrivacyPage:a&&i,authWrapperClassName:"ProfileMainPrivacy-authWrapper",authChild:Object(l.b)("span",{className:"ProfileMainPrivacy-pointerWrapper",children:e.name}),children:Object(l.b)(p.Link,{to:"".concat(m.D,"/").concat(n.isOrg?"org":"people","/").concat(n.urlToken,"/creations/").concat(e.id),children:e.name})}),t<u.length-1?"、":" "]},t)})),!c&&t.length>r&&(o?Object(l.b)(h.c,{preset:"plain",onClick:this.onExpand,children:s}):s),"话题"]})}}]),n}(f.Component);g.propTypes={topics:d.a.array.isRequired,user:d.a.object,ellipsisLength:d.a.number,expandable:d.a.bool,noHoverCard:d.a.bool,privacyEnabled:d.a.bool,showPrivacyPage:d.a.bool},g.defaultProps={ellipsisLength:3,expandable:!0,noHoverCard:!1},t.a=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2),o=n(1),a=n(399),i=function(e){var t=e.children,n=e.showPrivacyPage,i=e.authWrapperClassName,c=e.authChild,s=o.Children.only(t),l=c?o.Children.only(c):s;return n?Object(r.b)(a.a,{wrapperClassName:i,loginButton:l}):s}},function(e,t,n){"use strict";t.a=function(e,t){return!!e&&(!!(t=t||e.type)&&("answer"===t&&((null===(n=e.settings)||void 0===n||null===(r=n.tableOfContents)||void 0===r?void 0:r.enabled)||(null===(o=e.settings)||void 0===o||null===(a=o.tableOfContent)||void 0===a?void 0:a.enabled))));var n,r,o,a}},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(11),d=n.n(u),f=n(31),p=n(134);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var b=function(e){Object(a.a)(n,e);var t=h(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleSubmit=function(){var t=e.props,n=t.onSubmit,r=t.onCancel,o=t.needCancel;(void 0===o||o)&&r(),n()},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.subtitle,r=e.shown,o=e.onCancel,a=e.className,i=e.isMobile,c=e.confirmText,l=e.cancelText,u=e.showButtonHorizontal,h=e.showConfirmButtonRight,b=Object(s.b)(f.c,{preset:"primary",color:"blue",onClick:this.handleSubmit,children:c||"确认"},"confirm"),m=Object(s.b)(f.c,{onClick:o,children:l||"取消"},"cancel"),v=i||h?[m,b]:[b,m];return Object(s.b)(p.b,{wrapperClassName:"ConfirmModal-wrapper",className:d()("ConfirmModal",a),title:t,size:i?"small":"default",subtitle:n,onClose:o,closeButton:!1,buttonGroupOnly:!0,children:r&&Object(s.b)(p.a,{direction:i||u?"horizontal":"vertical",children:v})})}}]),n}(l.Component);t.a=b},function(e,t,n){"use strict";n.d(t,"a",(function(){return N}));var r=n(0),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(35),u=n(2),d=n(3),f=n.n(d),p=n(1),h=n(19),b=n(27),m=n(29),v=n(144),g=n(439),y=n(162),O=n(114);var j=n(105),w=n(432),C=function(e,t){var n=t.urlToken;return e.people.allFavlistsByUser[n]||{}},k=function(e){return e.currentUser},x=(Object(j.a)(y.a.GET_ALL_FAVLISTS,(function(e,t,n){return function(r,o){var a=o();if(e=e||k(a),!t){var i=C(a,{urlToken:e}),c=i.offset,s=void 0===c?0:c,l=i.limit;t={offset:s,limit:void 0===l?10:l}}return{action:Object.assign({urlToken:e,paging:t},O.a.enableSchema&&{schema:w.b},{extra:n}),fetcher:function(e,t){var n=t.next,r=t.offset,o=void 0===r?0:r,a=t.limit,i=void 0===a?10:a;return n?O.a.http(n):O.a.http("/api/v4/people/".concat(e,"/collections"),{query:{include:"data[*].updated_time,answer_count,follower_count,creator,is_public",offset:o,limit:i}})}(e,t)}}})),Object(j.a)(y.a.GET_ALL_FAVLISTS_WITH_RELATIONS,(function(e,t,n,r,o){return function(a,i){var c=i();if(e=e||k(c),!r){var s=C(c,{urlToken:e}),l=s.offset,u=void 0===l?0:l,d=s.limit;r={offset:u,limit:void 0===d?10:d}}var f=Object.assign({contentType:t,contentId:n,urlToken:e,paging:r},O.a.enableSchema&&{schema:w.b},{extra:o});return{action:f,fetcher:function(e){var t=e.contentType,n=e.contentId,r=e.paging,o=(r=void 0===r?{}:r).next,a=r.offset,i=void 0===a?0:a,c=r.limit,s=void 0===c?10:c;return o?O.a.http(o):O.a.http("/api/v4/collections/contents/".concat(t,"/").concat(n),{query:{offset:i,limit:s}})}(f)}}})));function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var E=function(){return n.e(38).then(n.bind(null,1477)).then((function(e){return e.FavlistsModal}))},R={ids:[],isFetching:!1,isDrained:!1},T=Object(m.createSelector)((function(e){return e.people.allFavlistsByUser[e.currentUser]||R}),(function(e){return e.entities.favlists}),(function(e,t){var n=e.ids,r=Object(l.a)(e,["ids"]);return Object.assign({},r,{items:n.map((function(e){return t[e]}))})}));var A=function(e){Object(i.a)(n,e);var t=S(n);function n(){var e;Object(o.a)(this,n);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return(e=t.call.apply(t,[this].concat(i))).onFavlistAdd=function(){for(var t=e.props,n=t.urlToken,r=t.onFavlistAdd,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r.apply(void 0,a.concat([{urlToken:n}]))},e.onLoad=function(){for(var t=e.props,n=t.onLoad,o=t.type,a=t.id,i=t.urlToken,c=t.onUpdateReaction,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return n.apply(void 0,[i,o,a].concat(l)).then((function(e){c({contentType:o,contentId:a,relations:e.payload.data.reduce((function(e,t){return Object.assign({},e,Object(r.a)({},t.id,t.isFavorited))}),{})})}))},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this.context.currentUser||{};return Object(u.b)(v.a,Object.assign({getComponent:E},this.props,{authRequired:this.context.authRequired,isUserActive:Boolean(e.isActive),onLoad:this.onLoad,onFavlistAdd:this.onFavlistAdd}))}}]),n}(p.Component);A.contextTypes={authRequired:f.a.func,currentUser:f.a.object};var N=Object(h.compose)(Object(b.connect)((function(e,t){var n=t.id,r=t.type,o=e.favlists.relations,a=e.currentUser,i=T(e);return{isFetching:i.isFetching,isDrained:i.isDrained,items:i.items,relations:o["".concat(r,"_").concat(n)],zaEnabled:!0,urlToken:a}}),(function(e,t){return{onUpdateFav:function(){return e(g.b.apply(void 0,arguments))},onFavlistAdd:t.onFavlistAdd||function(){return e(g.a.apply(void 0,arguments))},onLoad:function(){return e(x.apply(void 0,arguments))},onUpdateReaction:function(){return e(g.c.apply(void 0,arguments))}}})))(A)},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(1),h=n.n(p),b=n(11),m=n.n(b),v=n(111),g=n.n(v),y=n(5);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var j=function(e){s()(n,e);var t=O(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={uid:g()()},e.handleChange=function(t){var n=t.target.files;n&&e.uploadFiles(n),e.setState({uid:g()()})},e.uploadFiles=function(t){var n=e.props.multiple,r=g()(),o=Array.prototype.slice.call(t);n?o.map((function(t){e.upload(t,r)})):e.upload(o[0],r)},e.upload=function(t,n){var r,o=e.props,a=o.beforeUpload,i=o.customUpload,c=o.onStart,s=o.onSuccess,l=o.onError;if(a&&(r=a(t)),!1!==r&&i){var u={file:t,uid:n,status:"uploading"};c&&c(u),Promise.resolve().then((function(){return i({file:t})})).then((function(e){s&&s(Object.assign({},u,{remoteInfo:e,status:"success"}))})).catch((function(e){l&&l(Object.assign({},u,{remoteInfo:e,status:"error"}))}))}},e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.accept,r=e.multiple,o=e.disabled,a=e.onRef,i=e.onClick,c=e.children;return Object(y.g)("label",{className:m()("UploadPicture-wrapper",t)},Object(y.g)("input",{type:"file",accept:n,multiple:r,className:"UploadPicture-input",disabled:o,ref:a,onChange:this.handleChange,onClick:i}),c)}}]),n}(h.a.Component);j.defaultProps={multiple:!1,disabled:!1}},function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(370),i=n(90),c=n(848),s=n(112),l=n.n(s),u=n(152),d=l()(u.findImageSpec),f=function(e,t){return Object(u.imgUrl)(e,d(t))};t.a=function(e){var t=e.user,n=e.size,s=void 0===n?38:n,l=e.noBadge,u=void 0!==l&&l,d=e.noLink,p=void 0!==d&&d,h=e.linkProps,b=Object(r.a)(e,["user","size","noBadge","noLink","linkProps"]),m=t.avatarUrl,v=t.isOrg,g=t.urlToken,y=!p&&g?"https://www.zhihu.com/".concat(v?"org":"people","/").concat(g):null,O=Object(o.b)(i.Image,{loading:"lazy",src:f(m,s),srcSet:"".concat(f(m,2*s)," 2x"),size:s,display:"block",css:{borderRadius:"50%"}});return Object(o.c)(i.Box,Object.assign({display:"inline-block",size:s,css:{position:"relative"}},b,{children:[y?Object(o.b)(c.a,Object.assign({href:y,target:"_blank"},h,{children:O})):O,!u&&Object(o.b)(a.c,{css:Object(a.f)(s),isOrg:v,badge:t.badgeV2||t.badge,linkify:!p,enableTooltip:!0})]}))}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=n(895),i=n(847),c=n(866),s=n(850),l=n(929),u=n(861),d=n(838),f=n(874),p=n(860),h=n(964),b=d.List,m=d.Record,v=d.Repeat,g=u.draft_tree_data_support?s:c,y=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getEntityMap=function(){return l},t.prototype.getBlockMap=function(){return this.get("blockMap")},t.prototype.getSelectionBefore=function(){return this.get("selectionBefore")},t.prototype.getSelectionAfter=function(){return this.get("selectionAfter")},t.prototype.getBlockForKey=function(e){return this.getBlockMap().get(e)},t.prototype.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},t.prototype.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil((function(t){return t===e})).skip(1).first()},t.prototype.getBlockAfter=function(e){return this.getBlockMap().skipUntil((function(t,n){return n===e})).skip(1).first()},t.prototype.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil((function(t,n){return n===e})).skip(1).first()},t.prototype.getBlocksAsArray=function(){return this.getBlockMap().toArray()},t.prototype.getFirstBlock=function(){return this.getBlockMap().first()},t.prototype.getLastBlock=function(){return this.getBlockMap().last()},t.prototype.getPlainText=function(e){return this.getBlockMap().map((function(e){return e?e.getText():""})).join(e||"\n")},t.prototype.getLastCreatedEntityKey=function(){return l.__getLastCreatedEntityKey()},t.prototype.hasText=function(){var e=this.getBlockMap();return e.size>1||e.first().getLength()>0},t.prototype.createEntity=function(e,t,n){return l.__create(e,t,n),this},t.prototype.mergeEntityData=function(e,t){return l.__mergeData(e,t),this},t.prototype.replaceEntityData=function(e,t){return l.__replaceData(e,t),this},t.prototype.addEntity=function(e){return l.__add(e),this},t.prototype.getEntity=function(e){return l.__get(e)},t.createFromBlockArray=function(e,n){var r=Array.isArray(e)?e:e.contentBlocks,o=a.createFromArray(r),i=o.isEmpty()?new f:f.createEmpty(o.first().getKey());return new t({blockMap:o,entityMap:n||l,selectionBefore:i,selectionAfter:i})},t.createFromText=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,r=e.split(n),o=r.map((function(e){return e=h(e),new g({key:p(),text:e,type:"unstyled",characterList:b(v(i.EMPTY,e.length))})}));return t.createFromBlockArray(o)},t}(m({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}));e.exports=y},function(e,t,n){"use strict";var r=new RegExp("\r","g");e.exports=function(e){return e.replace(r,"")}},function(e,t,n){"use strict";var r=n(839),o=null;function a(e){return"LTR"===e||"RTL"===e}function i(e){return a(e)||r(!1),"LTR"===e?"ltr":"rtl"}function c(e){o=e}var s={NEUTRAL:"NEUTRAL",LTR:"LTR",RTL:"RTL",isStrong:a,getHTMLDir:i,getHTMLDirIfDifferent:function(e,t){return a(e)||r(!1),a(t)||r(!1),e===t?null:i(e)},setGlobalDir:c,initGlobalDir:function(){c("LTR")},getGlobalDir:function(){return o||this.initGlobalDir(),o||r(!1),o}};e.exports=s},function(e,t,n){"use strict";var r=n(838).Map,o=n(1),a=n(875),i=r({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:o.createElement("ul",{className:a("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:o.createElement("ol",{className:a("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:o.createElement("pre",{className:a("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});e.exports=i},function(e,t,n){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,n){"use strict";function r(e,t){return t&&"MUTABLE"===e.__get(t).getMutability()?t:null}e.exports=function(e,t){var n;if(t.isCollapsed()){var o=t.getAnchorKey(),a=t.getAnchorOffset();return a>0?(n=e.getBlockForKey(o).getEntityAt(a-1))!==e.getBlockForKey(o).getEntityAt(a)?null:r(e.getEntityMap(),n):null}var i=t.getStartKey(),c=t.getStartOffset(),s=e.getBlockForKey(i);return n=c===s.getLength()?null:s.getEntityAt(c),r(e.getEntityMap(),n)}},function(e,t,n){"use strict";var r=n(1213);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";function r(e,t){var n=o.get(e,t);return"auto"===n||"scroll"===n}var o={get:n(1215),getScrollParent:function(e){if(!e)return null;for(var t=e.ownerDocument;e&&e!==t.body;){if(r(e,"overflow")||r(e,"overflowY")||r(e,"overflowX"))return e;e=e.parentNode}return t.defaultView||t.parentWindow}};e.exports=o},function(e,t,n){"use strict";var r=n(1220),o=n(1221);e.exports=function(e){var t=r(e.ownerDocument||e.document);e.Window&&e instanceof e.Window&&(e=t);var n=o(e),a=e===t?e.ownerDocument.documentElement:e,i=e.scrollWidth-a.clientWidth,c=e.scrollHeight-a.clientHeight;return n.x=Math.max(0,Math.min(n.x,i)),n.y=Math.max(0,Math.min(n.y,c)),n}},function(e,t,n){"use strict";var r=n(1045);e.exports=function(e){for(var t=e;t&&t!==document.documentElement;){var n=r(t);if(null!=n)return n;t=t.parentNode}return null}},function(e,t,n){"use strict";var r=n(855).isPlatform("Mac OS X"),o={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return r&&e.altKey},hasCommandModifier:function(e){return r?!!e.metaKey&&!e.altKey:o.isCtrlKeyCommand(e)}};e.exports=o},function(e,t,n){"use strict";e.exports=function(e,t){var n=e.getSelection(),r=e.getCurrentContent(),o=n.getStartKey(),a=n.getStartOffset(),i=o,c=0;if(t>a){var s=r.getKeyBefore(o);if(null==s)i=o;else i=s,c=r.getBlockForKey(s).getText().length}else c=a-t;return n.merge({focusKey:i,focusOffset:c,isBackward:!0})}},function(e,t,n){var r=n(1152);function o(t,n,a){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=o=Reflect.get,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var o=r(e,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(n):a.value}},e.exports.default=e.exports,e.exports.__esModule=!0),o(t,n,a||t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(43),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(44),f=n(3),p=n.n(f),h=n(11),b=n.n(h),m=n(1154),v=n(94),g=n.n(v),y="function"==typeof ResizeObserver?function(e,t){var n=new ResizeObserver((function(e){return t(e[0].contentRect)}));return n.observe(e),function(){n.disconnect()}}:function(e,t){var n,r=function(){var r=e.getBoundingClientRect();!(n&&["left","top","width","height"].every((function(e){return n[e]===r[e]})))&&(n=r,t(r))},o=new(window.MutationObserver||window.WebKitMutationObserver)(g()(r,100));return o.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),r(),function(){o.disconnect()}};function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var j={auto:"auto",yes:"scroll",no:"hidden"},w=function(e){Object(i.a)(n,e);var t=O(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={locationHref:"",iframeHeight:900},e.iframe=null,e.iframeMessenger=null,e.iframeObserver=null,e.handleIframeLoad=function(){e.iframe.contentDocument&&(e.unlistenResize=y(e.iframe.contentDocument.body,(function(t){e.setState({iframeHeight:t.height})})))},e.handleMessage=function(t){var n=e.props.onMessage;t.type===m.b.CHANGE_IFRAME_HEIGHT&&e.setState({iframeHeight:t.payload}),t.type===m.b.REDIRECT_URL&&(window.location.href=t.payload),n&&n(t)},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.setState({locationHref:window.location.href,timestamp:Date.now()}),this.iframeMessenger=new m.a({beforeMessage:function(e){return e.origin.endsWith("zhihu.com")},onMessage:this.handleMessage})}},{key:"componentWillUnmount",value:function(){this.iframeMessenger.close(),this.unlistenResize&&this.unlistenResize()}},{key:"render",value:function(){var e=this,t=this.props,n=t.src,o=t.className,a=t.scrolling,i=t.withParentUrl,c=t.withTimestamp,s=this.state,u=s.locationHref,f=s.timestamp,p=s.iframeHeight,h=n.split("?"),m=Object(r.a)(h,2),v=m[0],g=m[1],y=Object(d.parse)(g);return i&&(y.parent_url=u),c&&(y.ts=f),Object(l.b)("iframe",{className:b()("Iframe",o),src:"".concat(v,"?").concat(Object(d.stringify)(y)),ref:function(t){return e.iframe=t},height:p,onLoad:this.handleIframeLoad,scrolling:a,style:{border:"none",display:"block",overflow:j[a],width:"100%"}})}}]),n}(u.Component);w.defaultProps={scrolling:"auto",withParentUrl:!0,withTimestamp:!1},w.propTypes={className:p.a.string,src:p.a.string,scrolling:p.a.oneOf(["auto","yes","no"]),onMessage:p.a.func};var C=w},function(e,t,n){"use strict";var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(33),h=n.n(p),b=n(41),m=n.n(b),v=n(3),g=n.n(v),y=n(1),O=n(11),j=n.n(O),w=n(365),C=n(31),k=n(5);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}function S(e){var t=e.className,n=e.tag,r=e.name,o=e.value,a=m()(e,["className","tag","name","value"]),i="div";return n?i=n:a.href?i="a":a.onClick&&(i=C.c),Object(k.g)(i,h()({className:j()("NumberBoard-item",t)},a),Object(k.g)("div",{className:"NumberBoard-itemInner"},Object(k.g)("div",{className:"NumberBoard-itemName"},r),Object(k.g)("strong",{className:"NumberBoard-itemValue",title:o},Object(w.formatNumber)(o))))}var E=function(e){s()(n,e);var t=x(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.divider,r=e.children,o=e.items,a=m()(e,["className","divider","children","items"]);return Object(k.g)("div",h()({className:j()("NumberBoard",t,{"NumberBoard--divider":n})},a),r||o.map((function(e){return Object(k.g)(S,h()({key:e.name},e))})))}}]),n}(y.Component);E.propTypes={divider:g.a.bool},E.defaultProps={divider:!1},E.Item=S;var R=E;t.a=R},function(e,t,n){"use strict";var r=n(55),o=n.n(r),a=n(33),i=n.n(a),c=n(41),s=n.n(c),l=n(1),u=n.n(l),d=n(11),f=n.n(d),p=n(30),h=n(233),b=n.n(h),m=n(7),v=n(841),g=n(365),y=n(232),O=n(901),j=n(993),w=n(177),C=n(873),k=n(915),x=n(857),S=n(914),E=n(5);function R(e){var t=Object(l.useRef)(null),n=e.component,r=void 0===n?"a":n,o=e.className,a=e.onClick,i=e.onMouseDown,c=e.zvideo,s=e.enableInlinePlay,d=void 0!==s&&s,h=e.onImageClick,m=void 0===h?b.a:h,C=e.onInfoClick,S=void 0===C?b.a:C,R=e.renderInjection,A=c.id,N=c.title,_=c.url,I=c.imageUrl,M=c.video,L=M.videoId,P=M.duration,B=M.status,z=c.author,D=c.playCount,F=c.creationReferences,U=!_?"inlinezvideo":"zvideo";Object(l.useEffect)((function(){R||Object(v.onViewedOnce)(t.current,(function(){p.a.trackCardShow(t.current,{id:7844},{button:{text:U}})}))}),[U,R]);var V=Object(l.useCallback)((function(e){p.a.trackEvent(e.target,{id:7846,action:"OpenUrl"},{button:{text:U}}),m(e,c)}),[m,c,U]),q=Object(l.useCallback)((function(e){p.a.trackEvent(e.target,{id:7847,action:"OpenUrl"},{button:{text:U}}),S(e,c)}),[S,c,U]);if(R){if("function"!=typeof R)throw new Error("renderInjection must be function");return R(e)}return"converting_failure"===B?Object(E.g)(T,{error:"视频转码失败,请重新上传视频"}):Object(E.g)(u.a.Fragment,null,Object(E.g)(y.c,{as:r,shouldTrackClick:!0,shouldTrackShow:!0,zaAction:"OpenUrl",zaEventType:"Click",zaBlock:"ZTextZVideoLinkCard",zaType:"Button",extra:{link:{url:_}},className:f()("ZVideoLinkCard",o),ref:t,href:_,target:"_blank",rel:"noopener noreferrer",onClick:a,onMouseDown:i,"data-za-not-track-link":!0,"data-za-module":"Content","data-za-module-info":JSON.stringify({card:{content:{type:"Zvideo",token:A,video_id:L}}})},d?Object(E.g)(k.a,{placeholder:Object(E.g)("div",{className:"ZVideoLinkCard-playerContainer"})},Object(E.g)("div",{className:"ZVideoLinkCard-playerContainer"},Object(E.g)(O.a,{type:"video",className:"ZVideoLinkCard-player",src:"https://www.zhihu.com/video/".concat(L),iframeProps:{allowFullScreen:!0}}))):Object(E.g)("div",{className:"ZVideoLinkCard-image",style:{backgroundImage:"url(".concat(I,")")},onClick:V},Object(E.g)(x.a,{className:"ZVideoLinkCard-playIcon"}),Boolean(P)&&Object(E.g)("div",{className:"ZVideoLinkCard-duration"},Object(j.a)(P))),Object(E.g)("div",{className:"ZVideoLinkCard-info",onClick:q},Object(E.g)("div",{className:"ZVideoLinkCard-title"},N),Boolean(_)&&Object(E.g)("div",{className:"ZVideoLinkCard-author"},Object(E.g)(w.a,{className:"ZVideoLinkCard-avatar",url:z.avatarUrl,alt:"",size:20,round:!0}),Object(E.g)("div",null,z.name),(null==F?void 0:F.plaintext)?Object(E.g)("div",null," ",F.plaintext):Object(E.g)("div",null,"的视频"),Boolean(D)&&Object(E.g)("div",null," · ",Object(g.cnNiceNumber)(D),"播放")))))}function T(e){var t=e.error;return Object(E.g)("div",{className:"ZVideoLinkErrorCard"},Object(E.g)("div",{className:"ZVideoLinkErrorCard-message"},t.message||"视频加载错误"))}function A(e){var t=e.id,n=e.shouldUseOldLinkCard,r=s()(e,["id","shouldUseOldLinkCard"]),a=Object(l.useState)(null),c=o()(a,2),u=c[0],d=c[1],f=Object(l.useState)(null),p=o()(f,2),h=p[0],b=p[1];return Object(l.useEffect)((function(){if(n){var e="https://www.zhihu.com/api/v4/zvideos/".concat(t,"/card");Object(C.a)(e).then((function(e){return Object(m.camelizeKeys)(e)})).then((function(e){e.error?b(e.error):d(e)})).catch((function(e){b(e)}))}}),[n,t]),n?h?Object(E.g)(T,{error:h}):u?Object(E.g)(R,i()({zvideo:u},r)):null:Object(E.g)(S.a,i()({inEditor:!0,component:"div",href:"https://www.zhihu.com/zvideo/".concat(t)},r))}A.defaultProps={shouldUseOldLinkCard:!0};t.a=A},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=e.Buffer,o=function(e){if("undefined"!=typeof atob)return atob(e);if(r)return r.from(e,"base64").toString("binary");throw new Error("Do not support Base64 decoding")},a=function(e){if("undefined"!=typeof btoa)return btoa(e);if(r)return r.from(String(e),"binary").toString("base64");throw new Error("Do not support Base64 encoding")}}).call(this,n(100))},function(e,t,n){"use strict";var r=n(2),o=n(78);t.a=function(e){var t=Object(o.d)((function(){return n.e(0).then(n.bind(null,1322))}));return t?Object(r.b)(t,Object.assign({},e)):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(112),o=n.n(r),a=n(1076),i=n.n(a),c=function(e,t){var n=[];return o()((function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n.push(o),setTimeout((function(){n.length&&(t(n),n.length=0)}),e)}),(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return String(t)}))}(550,(function(e){var t=new FormData;return t.append("items",JSON.stringify(e)),i()("/lastread/touch",{method:"POST",body:t})})),s="read",l="touch";t.c=c},,function(e,t,n){var r=n(1077),o=n(951),a=n(324),i=n(411);e.exports=function(e,t,n){e=i(e);var c=(t=a(t))?o(e):0;return t&&c<t?r(t-c,n)+e:e}},,,,,function(e,t,n){"use strict";n.d(t,"c",(function(){return r.c})),n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return v}));var r=n(991),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(73),f=n(1158),p=n.n(f),h=n(366);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var m=function(e){Object(i.a)(n,e);var t=b(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){return Object(l.b)("img",{src:p.a,style:{maxWidth:"200px",marginTop:"30px"},alt:"delete-comment-success"})}}]),n}(u.Component);m.showModal=function(e){d.b.open((function(t){var n=(e||{}).reportText;return setTimeout(t,2e3),Object(l.b)(d.b,{title:"举报成功",onClose:t,children:Object(l.c)("div",{style:{textAlign:"center"},children:[Object(l.b)("div",{children:n||"你的举报我们已经收到,处理完成后将会私信告知处理结果。"}),Object(l.b)(m,{})]})})}))};var v=Object(h.b)({view:{id:3038},trackCardShow:!0})(m),g=n(31),y=n(241);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var j=function(e){Object(i.a)(n,e);var t=O(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={reportModalShown:!1},e.handleSubmit=function(){var t=e.props,n=t.id,r=t.onDelete,o=t.onClose;r(n),o()},e.handleReportModalOpen=function(){return e.setState({reportModalShown:!0})},e.handleReportModalClose=function(){e.setState({reportModalShown:!1}),e.handleSubmit()},e.handleSuccess=function(){e.handleSubmit()},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.shown,r=e.onClose,o=e.reportAndDeleteExperiment;return Object(l.c)(u.Fragment,{children:[Object(l.b)(d.b,{title:"你确定要删除这条评论吗?",closeButton:null,maskClosable:!1,hotKeyClosable:!1,onClose:r,footer:o&&Object(l.c)("div",{className:"CommentDeleteAndReport-extra",children:["评论若构成举报条件可以",Object(l.b)(g.c,{preset:"link",onClick:this.handleReportModalOpen,children:"删除并举报"})]}),children:n&&Object(l.c)(d.a,{direction:"horizontal",children:[Object(l.b)(g.c,{onClick:r,children:"取消"}),Object(l.b)(g.c,{preset:"primary",color:"blue",onClick:this.handleSubmit,children:"确定"})]})}),Object(l.b)(y.a,{title:"删除成功,请选择举报理由",subtitle:"",shown:this.state.reportModalShown,type:"comment",urlToken:t,zaEnabled:!0,onSuccess:this.handleSuccess,onClose:this.handleReportModalClose})]})}}]),n}(u.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n(1);var r=n(11),o=n.n(r),a=n(5),i=function(e){var t=e.avatar,n=e.bottom,r=e.button,i=e.className,c=e.height,s=e.icon,l=e.inline,u=e.right,d=e.style,f=void 0===d?{}:d,p=e.title,h=e.width,b=Object.assign({},f);return h&&(b.width="".concat(h,"px")),c&&(b.height="".concat(c,"px")),n&&(b.marginBottom="".concat(n,"px")),u&&(b.marginRight="".concat(u,"px")),Object(a.g)("div",{className:o()("Holder",i,{"Holder--inline":l,"Holder--title":p,"Holder--icon":s,"Holder--button":r,"Holder--avatar":t}),style:b})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(43),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(3),d=n.n(u),f=n(1),p=n(11),h=n.n(p),b=n(31),m=n(1335),v=n(1435),g=n(30),y=n(365),O=n(73),j=n(205),w=n(4),C=n(783),k=n(138);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var S=function(e){Object(i.a)(n,e);var t=x(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={step:0},e.containerRef=Object(f.createRef)(),e.reasonButtonRefs=[],e.toggleStep=function(){e.setState({step:0===e.state.step?1:0},(function(){e.popover.position()}))},e.handleKeyDown=function(t){var n=Number(t.key);n&&e.reasonButtonRefs[n-1]&&e.reasonButtonRefs[n-1].focus()},e.handleNeverShowVoteDownReason=function(){e.props.onSetVoteDownReason(!1),e.popover.close()},e.handleSelectReason=function(t){e.props.onSelectVoteDownReason(t),e.popover.close()},e}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(){"absolute"===this.props.positionStatus&&this.popover.close()}},{key:"render",value:function(){var e=this,t=this.props,n=t.reasonList,r=t.positionStatus,o=this.state.step,a=Object(w.a)(n).sort((function(e,t){return e.sort-t.sort}));return Object(l.b)(k.a,{className:"VoteDownReasonMenu",targetClassName:"VoteDownReasonMenu-target",positionStatus:r,toggler:this.props.toggler,onOpen:function(){e.setState({step:0})},getContainer:function(){return document.querySelector(".ContentItem-actions")},onClick:this.props.onTogglerClick,ref:function(t){e.popover=t,e.props.popoverRef&&e.props.popoverRef(t)},placement:"top",arrowed:!0,preventCloseOnTarget:!0,children:Object(l.c)("div",{className:"VoteDownReasonMenu-container",onKeyDown:this.handleKeyDown,tabIndex:-1,children:[Object(l.c)("div",{className:"VoteDownReasonMenu-header",children:[0===o&&"已反对,你觉得",1===o&&"不再显示该反馈功能?"]}),Object(l.c)("div",{className:"VoteDownReasonMenu-action",children:[0===o&&Object(l.b)(b.c,{preset:"plain",className:"VoteDownReasonMenu-ignoreButton preventCloseOnTarget",onClick:this.toggleStep,children:"不再显示"}),0===o&&Object(l.b)("div",{className:"VoteDownReasonMenu-spliter"}),Object(l.b)(b.c,{preset:"plain",className:"VoteDownReasonMenu-closeButton",onClick:function(){e.popover.close()},"aria-label":"关闭",tabIndex:1,icon:C.a})]}),0===o&&Object(l.b)("div",{className:"VoteDownReasonMenu-reasonList",children:a.map((function(t,n){return Object(l.b)(b.c,{preset:"plain",className:"VoteDownReasonMenu-reason",onClick:function(){e.handleSelectReason(t)},onRef:function(t){return e.reasonButtonRefs[n]=t},children:t.name},t.reasonId)}))}),1===o&&Object(l.c)("div",{className:"VoteDownReasonMenu-disableReason",children:[Object(l.b)("div",{className:"VoteDownReasonMenu-disableReasonHint",children:"你可以在「设置」页面中的「屏蔽」开启。"}),Object(l.c)("div",{className:"VoteDownReasonMenu-disableReasonButtonList",children:[Object(l.b)(b.c,{className:"preventCloseOnTarget",onClick:this.toggleStep,children:"返回"}),Object(l.b)(b.c,{color:"blue",onClick:this.handleNeverShowVoteDownReason,children:"不再显示"})]})]})]})})}}]),n}(f.Component);S.defaultProps={reasonList:[]};var E=S,R=n(24);n(1160);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var A=function(e){Object(i.a)(n,e);var t=T(n);function n(){var e;Object(o.a)(this,n);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return(e=t.call.apply(t,[this].concat(i))).state={recognizeInfo:{showRecognizeModal:!1,action:"",voteType:"",isRecognized:e.props.isRecognized}},e.voteUpButtonRef=Object(f.createRef)(),e.voteDownButtonRef=Object(f.createRef)(),e.shouldShowMenu=function(){var t=e.props,n=t.voting,r=t.voteDownReason,o=t.onLoadVoteDownReason;return!!t.isShowVoteDownMenu&&(-1===n?(e.popover.close(),!1):!!r||(e.isPendingForVoteDownReason=!0,o(),!1))},e.onVote=e.context.authRequired((function(t){e.props.onVote(t)}),R.W.vote),e.voteUp=function(t){var n=1===e.props.voting?["UnUpvote","neutral"]:["Upvote","up"],o=Object(r.a)(n,2),a=o[0],i=o[1];e.vote(t,a,i),e.voteUpButtonRef.current.focus()},e._voteDown=function(t){var n=-1===e.props.voting?["UnDownvote","neutral"]:["Downvote","down"],o=Object(r.a)(n,2),a=o[0],i=o[1];e.vote(t,a,i),e.voteDownButtonRef.current.focus()},e.voteDown=function(t){e.shouldShowMenu()&&e.popover.open(),e._voteDown(t)},e.vote=function(t,n,r){var o=e.props,a=o.disableAuth,i=o.handleToggleGuide,c=o.onClick,s=o.type,l=o.zaIds,u=l.voteUp,d=l.voteDown,f=n.includes("Upvote")?u:d;"article"===s&&"down"===r&&g.a.trackEvent(e.voteDownButtonRef.current,{action:"Click",id:2315,name:"反对"}),g.a.trackEvent(n.includes("Upvote")?e.voteUpButtonRef.current:e.voteDownButtonRef.current,Object.assign({action:n,element:"Button"},f&&{id:f})),c?c(t,r):a?i():e.onVoteWithRecognize(n,r)},e.onVoteWithRecognize=function(t,n){var r=e.props.voting;!e.state.recognizeInfo.isRecognized||1!==r||"UnUpvote"!==t&&"Downvote"!==t?e.onVote(n):e.setState({recognizeInfo:Object.assign({},e.state.recognizeInfo,{showRecognizeModal:!0,action:t,voteType:n})})},e.handleConfirmCancelRecognize=function(){e.onVote(e.state.recognizeInfo.voteType),e.setState({recognizeInfo:Object.assign({},e.state.recognizeInfo,{isRecognized:!1,showRecognizeModal:!1})})},e.handleCloseCancelRecognizeModal=function(){return e.setState({recognizeInfo:Object.assign({},e.state.recognizeInfo,{showRecognizeModal:!1})})},e.handleTogglerClick=function(t){e.shouldShowMenu()||t.preventDefault(),e._voteDown(t)},e.renderVoteUpButton=function(){var t=e.props,n=t.isOwner,r=t.count,o=t.voting,a=t.disabled,i=t.hideDesc,c=1===o?"已赞同":"赞同",s=[c,Object(y.cnNiceNumber)(r)].join(" "),u=[!i&&c,0!==r&&Object(y.cnNiceNumber)(r).trim()].filter(Boolean).join(" ");return Object(l.c)(b.c,{className:h()("VoteButton VoteButton--up",{"is-active":1===o}),disabled:n||a,onClick:e.voteUp,"aria-label":s,onRef:e.voteUpButtonRef,children:[Object(l.b)(m.a,{center:!0,size:10,className:"VoteButton-TriangleUp"}),u]})},e.renderVoteDownButton=function(){var t=e.props,n=t.voting,r=t.disabled,o=-1===n?"已反对":"反对";return Object(l.b)(b.c,{className:h()("VoteButton VoteButton--down",{"is-active":-1===n},{"VoteButton--mobileDown":!1}),disabled:r,onClick:e._voteDown,"aria-label":o,onRef:e.voteDownButtonRef,children:Object(l.b)(v.a,{center:!0,size:10})})},e}return Object(a.a)(n,[{key:"componentWillReceiveProps",value:function(e){e.voteDownReason&&this.isPendingForVoteDownReason&&(this.isPendingForVoteDownReason=!1,this.popover.open())}},{key:"render",value:function(){var e=this,t=this.props,n=t.isOwner,r=t.positionStatus,o=t.isShowVoteDownMenu,a=t.voteDownReason,i=this.state.recognizeInfo,c=i.showRecognizeModal,s="UnUpvote"===i.action,u=o&&!0;return Object(l.c)("span",{ref:this.voteButtonRef,children:[Object(l.b)(j.c,{keyMap:{VOTE_UP:"v",VOTE_DOWN:"d"},handlers:{VOTE_UP:this.voteUp,VOTE_DOWN:this.voteDown}}),this.renderVoteUpButton(),!n&&!u&&this.renderVoteDownButton(),!n&&u&&Object(l.b)(E,{reasonList:a,toggler:this.renderVoteDownButton(),popoverRef:function(t){return e.popover=t},positionStatus:r,onTogglerClick:this.handleTogglerClick,onSelectVoteDownReason:this.props.onSelectVoteDownReason,onSetVoteDownReason:this.props.onSetVoteDownReason}),Object(l.b)(O.b,{title:"确定".concat(s?"取消赞同":"选择反对"),onClose:this.handleCloseCancelRecognizeModal,children:c&&Object(l.c)("div",{children:[Object(l.c)("div",{children:[s?"取消赞同":"选择反对","时,你赠与作者的专业徽章也会收回,并且赠与次数不会返还,是否仍要取消?"]}),Object(l.c)(O.a,{direction:"horizontal",children:[Object(l.b)(b.c,{onClick:this.handleCloseCancelRecognizeModal,children:s?"暂不取消":"暂不选择"}),Object(l.b)(b.c,{preset:"primary",color:"blue",onClick:this.handleConfirmCancelRecognize,children:s?"取消赞同":"选择反对"})]})]})})]})}}]),n}(f.Component);A.contextTypes={authRequired:d.a.func},A.propTypes={voting:d.a.oneOf([-1,0,1]).isRequired,disabled:d.a.bool,type:d.a.string,hideDesc:d.a.bool,zaIds:d.a.shape({voteUp:d.a.number,voteDown:d.a.number}),isRecognized:d.a.bool},A.defaultProps={voting:0,disabled:!1,type:"",hideDesc:!1,zaIds:{}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return j}));var r=n(0),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(3),f=n.n(d),p=n(27),h=n(11),b=n.n(h),m=n(911),v=n(36),g=n(96);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var O={all:"开放评论",censor:"预审评论",nobody:"关闭评论"},j={all:"允许任何人评论",follower:"允许关注我的人评论",censor:"评论由我筛选后显示",followee:"允许我关注的人评论",paid:"付费用户可评论",nobody:"关闭评论"},w=function(e){Object(i.a)(n,e);var t=y(n);function n(){var e;Object(o.a)(this,n);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return(e=t.call.apply(t,[this].concat(i))).handleClickOption=function(t){var n=e.props,r=n.isOrg,o=n.target,a=n.onChange,i=n.current;if(t!==i)if(o){var c=o.id;o.adminClosedComment?Object(g.b)("此内容无法更改评论权限",{theme:"red-ghost"}):r||"censor"!==t&&"censor"!==i?a(c,t):Object(g.a)("你确定要更改评论权限吗?",{content:"censor"===t?"更改后,已有评论不变,新评论需要经过筛选才会公开显示":"更改后,所有待筛选评论都会被公开显示出来"}).then((function(){return a(c,t)})).catch((function(){return null}))}else a(t)},e.getCommentPermission=function(){var t=e.props.target,n=t&&"answer"===t.type&&"paid"===t.answerType;return Object.keys(j).filter((function(e){if("paid"!==e||n)return"follower"!==e||t&&"article"===t.type})).reduce((function(e,t){return Object.assign({},e,Object(r.a)({},t,j[t]))}),{})},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.isOrg,r=t.current,o=t.className,a=n?O:this.getCommentPermission();return Object(l.b)(u.Fragment,{children:Object.keys(a).map((function(t){return Object(l.b)(m.a,{onClick:function(){return e.handleClickOption(t)},className:b()("CommentPermission-item",o),checked:t===r,children:a[t]},t)}))})}}]),n}(u.Component);w.propTypes={current:f.a.string.isRequired,target:f.a.object,onChange:f.a.func.isRequired};t.c=Object(p.connect)((function(e){return{isOrg:Object(v.h)(e)}}))(w)},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(3),d=n.n(u),f=n(71),p=n.n(f),h=n(403);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}t.a=function(e){var t=function(t){Object(a.a)(i,t);var n=b(i);function i(){return Object(r.a)(this,i),n.apply(this,arguments)}return Object(o.a)(i,[{key:"render",value:function(){var t=this.props.currentUser,n=this.context.authRequired,r=void 0===n?function(){}:n;return Object(s.b)(e,Object.assign({isLogin:t&&"guest"!==t.userType,authRequired:r},this.props))}}]),i}(l.Component);return t.contextTypes={authRequired:d.a.func},p()(Object(h.b)(t),e)}},function(e,t,n){"use strict";function r(e){var t=String(e);return t.length<2&&(t="0"+t),t}t.a=function(e){if(!Number.isFinite(e))return"";var t=(e=Math.floor(e))%60,n=Math.floor(e/60);return"".concat(r(n),":").concat(r(t))}},function(e,t,n){"use strict";
/*!
* bytes
* Copyright(c) 2012-2014 TJ Holowaychuk
* Copyright(c) 2015 Jed Watson
* MIT Licensed
*/e.exports=function(e,t){if("string"==typeof e)return s(e);if("number"==typeof e)return c(e,t);return null},e.exports.format=c,e.exports.parse=s;var r=/\B(?=(\d{3})+(?!\d))/g,o=/(?:\.0*|(\.[^0]+)0+)$/,a={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},i=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function c(e,t){if(!Number.isFinite(e))return null;var n=Math.abs(e),i=t&&t.thousandsSeparator||"",c=t&&t.unitSeparator||"",s=t&&void 0!==t.decimalPlaces?t.decimalPlaces:2,l=Boolean(t&&t.fixedDecimals),u=t&&t.unit||"";u&&a[u.toLowerCase()]||(u=n>=a.pb?"PB":n>=a.tb?"TB":n>=a.gb?"GB":n>=a.mb?"MB":n>=a.kb?"KB":"B");var d=(e/a[u.toLowerCase()]).toFixed(s);return l||(d=d.replace(o,"$1")),i&&(d=d.replace(r,i)),d+c+u}function s(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,n=i.exec(e),r="b";return n?(t=parseFloat(n[1]),r=n[4].toLowerCase()):(t=parseInt(e,10),r="b"),Math.floor(a[r]*t)}},function(e,t,n){"use strict";e.exports=n(1012)},function(e,t,n){"use strict";t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fetch(e,Object.assign({credentials:"include",headers:{"X-Requested-With":"Fetch"}},t)).then((function(e){return e.json()}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i}));var r=n(43),o=n(927),a=function(e,t){switch(e){case"answer":return"https://www.zhihu.com/answer/".concat(t);case"book":return"https//www.zhihu.com/pub/book/".concat(t);case"article":return"https://zhuanlan.zhihu.com/p/".concat(t);case"live":return"https://www.zhihu.com/lives/".concat(t);case"remix_album":case"remix":return"https://www.zhihu.com/remix/albums/".concat(t);case"pin":return"https://www.zhihu.com/pin/".concat(t);case"question":return"https://www.zhihu.com/question/".concat(t);case"zvideo":return"https://www.zhihu.com/zvideo/".concat(t);case"topic":return"https://www.zhihu.com/topic/".concat(t);default:return""}},i=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];try{if(!e||"string"!=typeof e)return"";if(!t||"object"!=typeof t)return e;var a=e.split("#"),i=Object(r.a)(a,2),c=i[0],s=i[1],l=void 0===s?"":s,u=c.split("?"),d=Object(r.a)(u,2),f=d[0],p=d[1],h=Object(o.parse)(p),b=n?Object.assign({},h,t):Object.assign({},t,h),m=function(e,t){return t?e+t:""};return f+m("?",Object(o.stringify)(b))+m("#",l)}catch(t){return console.error(t),e}}},function(e,t,n){"use strict";var r=n(35),o=n(43),a=n(2),i=n(1),c=n(27),s=n(183),l=n.n(s),u=n(1063),d=n(883),f=n(381),p=n(49),h=n.n(p),b=n(53),m=n(40),v=n.n(m),g=n(57),y=n(406),O=n(63),j=n(383),w=n(79),C=n.n(w),k={"京东":"jingdong","淘宝":"taobao","知乎":"zhihu","拼多多":"pinduoduo","美团酒旅":"meituanhotel","苏宁":"suning","天猫":"taobao"},x=function(e,t,n){var r=e.id,o=e.url,a=e.source,i=e.children,c=void 0===i?0:i,s=e.scenes,l=e.fallbackUrl,u=k[a],d=C()(navigator.userAgent);if(!d.ZhihuHybrid)return c&&"function"==typeof n?void n():void(d.Mobile?location.href=o:t?t.location.href=o:window.open(o));O.a.supportsAction("mcn/openURL").then((function(e){var t=e;if(r&&o&&a&&(Object(j.versionControl)(d,{IOS:"6.15",ANDROID:"6.15"})||"taobao"!==u)&&(Object(j.versionControl)(d,{IOS:"6.25",ANDROID:"6.25"})||"zhihu"!==u)&&(Object(j.versionControl)(d,{IOS:"6.28",ANDROID:"6.29"})||"pinduoduo"!==u)&&(Object(j.versionControl)(d,{IOS:"6.37",ANDROID:"6.37"})||"meituanhotel"!==u)&&(Object(j.versionControl)(d,{IOS:"6.51",ANDROID:"6.51"})||"suning"!==u)&&(Object(j.versionControl)(d,{ANDROID:"6.63"})||"0"!==r)||(t=!1),t){var n=Object.assign({id:r,url:o,type:u,fallbackUrl:l||o},s?{scenes:s}:{});O.a.dispatch("mcn/openURL",n)}else O.a.dispatch("base/openURL",{url:o})}))};var S=n(152),E=n(367),R=function(e){var t=Object(E.b)(),n=Object(i.useCallback)((function(n){t.ZhihuHybrid&&function(e,t){var n=t.root;if(!e.defaultPrevented){var r=e.target;if("img"===r.tagName.toLowerCase()&&(r.src.includes("zhimg")||!r.src.includes("equation"))&&(!r.classList.contains("ztext-gif")||r.parentNode.classList.contains("isPlaying"))){var o=Array.from(n.querySelectorAll(["img"])).filter((function(e){return e.src.includes("zhimg")&&!e.src.includes("equation")})),a=o.indexOf(r);if(-1!==a){e.preventDefault();var i=o.map((function(e){return e.dataset.thumbnail&&e.src.replace(/\.jpg|\.webp/,".gif")||e.dataset.src||e.src||""})).map((function(e){return Object(S.imgUrl)(e,Object.assign({quality:""},e.endsWith("webp")&&{extension:"jpg"}))}));O.a.dispatch("base/openImage",{images:i,index:a})}}}}(n,{root:e})}),[e,t.ZhihuHybrid]);Object(i.useEffect)((function(){if(e)return e.addEventListener("click",n),function(){e.removeEventListener("click",n)}}),[e,n])},T=n(39),A=n(859),N=function(e){var t=e.getAttribute("data-hash"),n=e.textContent.replace(/^@/,""),r=document.createElement("span");return e.parentNode.replaceChild(r,e),{target:r,data:{id:t,name:n}}},_=function(e){var t=Object(i.useState)(null),n=Object(o.a)(t,2),r=n[0],c=n[1];return Object(i.useEffect)((function(){if(e){var t=Array.from(e.querySelectorAll(".member_mention"));if(t.length){var n=t.map(N).map((function(e,t){var n=e.data,r=e.target;return Object(T.createPortal)(Object(a.c)(A.a,{user:n,children:["@",n.name]},t),r)}));c(n)}}}),[e]),r},I=n(936),M=function(e){var t=e.getAttribute("data-poster"),n="data:,"===t?"":t,r={title:e.getAttribute("data-name"),thumbnail:n,url:e.getAttribute("href"),src:e.getAttribute("data-src")};r=e.getAttribute("data-lens-id")?Object.assign({},r,{isLens:!0,id:e.getAttribute("data-lens-id"),isPlayable:!0}):Object.assign({},r,{isLens:!1,id:e.getAttribute("data-video-id"),isPlayable:"true"===e.getAttribute("data-video-playable")}),e.hasAttribute("data-lens-status")&&(r=Object.assign({},r,{error:{status:e.getAttribute("data-lens-status"),message:e.getAttribute("data-description")}}));var o=document.createElement("div");return e.parentNode.replaceChild(o,e),{target:o,data:r}},L=function(e){var t=Object(i.useState)(null),n=Object(o.a)(t,2),r=n[0],c=n[1];return Object(i.useEffect)((function(){if(e){var t=Array.from(e.querySelectorAll(".video-box, .video-link, .unprocessable_video"));if(t.length){var n=t.map(M).map((function(e,t){var n=e.data,r=e.target;return Object(T.createPortal)(Object(a.b)(I.a,{data:n},t),r)}));c(n)}}}),[e]),r},P=n(78),B={},z=function(e,t){var n=function(e){return e.split("/").reverse()[0]}(t),r=n.split("."),a=Object(o.a)(r,2),i=a[0],c=a[1],s=i.split("_"),l=Object(o.a)(s,2)[1],u="webp"===c||"gif"===c?c:"image",d=Object(p.statGenerator)({appName:"heifetz"})("".concat(u,".").concat(l,".unknown.RichText"));switch(e){case"loadstart":B[n]=Date.now();break;case"load":if(B[n]){var f="".concat(d,".success");h.a.increment({raw:"".concat(f,".count")}),h.a.timing(f,Date.now()-B[n]),delete B[n]}break;case"timeout":B[n]&&(h.a.increment({raw:"".concat(d,".timeout.count")}),delete B[n]);break;case"error":B[n]&&(h.a.increment({raw:"".concat(d,".failure.count")}),delete B[n])}},D=function(e){return Object(a.b)(d.a,Object.assign({onLoadStateChange:z},e,{useMp4:!0}))};t.a=function(e){var t=e.ecommerce,s=e.html,p=e.shouldUseArticleCard,h=e.shouldShowCatalog,m=e.sourceId,O=e.sourceType,j=Object(r.a)(e,["ecommerce","html","shouldUseArticleCard","shouldShowCatalog","sourceId","sourceType"]),w=Object(i.useState)(null),k=Object(o.a)(w,2),S=k[0],E=k[1],T=Object(i.useState)(!1),A=Object(o.a)(T,2),N=A[0],I=A[1],M=Object(i.useState)(""),B=Object(o.a)(M,2),F=B[0],U=B[1],V=!Object(b.o)({includeTablet:!0}),q=Object(c.useSelector)((function(e){return e.currentUser}));R(S);var H,K=Object(P.d)((function(){return n.e(5).then(n.bind(null,2642))})),Q=(H=Object(c.useDispatch)(),Object(i.useCallback)(function(){var e=Object(g.a)(v.a.mark((function e(t,n){var r,o,a,i;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t,o=null,"京东"!==t.source&&"苏宁"!==t.source){e.next=9;break}return C()(navigator.userAgent).Safari&&"苏宁拼购"!==t.goodsType&&(o=window.open()),e.next=7,H(Object(y.b)(t.id,0)).catch((function(){return null}));case 7:i=e.sent,r=Object.assign({},t,null==i||null===(a=i.payload)||void 0===a?void 0:a.data);case 9:"苏宁拼购"!==t.goodsType&&x(r,o,n);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[H]));return Object(a.c)(a.a,{children:[Object(a.b)(u.a,Object.assign({},j,{html:s,onRef:E,lazyLoadImageProps:{onLoadStateChange:z,useWebP:!1},adLinkCardProps:{parentId:m,parentType:O},mcnLinkCardProps:{onClick:function(e){var t=e.currentTarget,n=t.href,r=t.dataset,o=r.mcnId,a=r.mcnSource,i=r.mcnChildren,c=r.mcnAppSchemaIos,s=r.mcnAppSchemaAndroid,l=r.mcnGoodsType;V&&("拼多多"===a||"苏宁"===a&&"苏宁拼购"===l)||(e.preventDefault(),Q({id:o,source:a,goodsType:l,url:n,children:Number(i),appSchemaIos:c,appSchemaAndroid:s},(function(){U(o),I(!0)})))}},mkSkuLinkCardProps:{cardSize:"large",enableBackdrop:!1,sourceConvert:!1,tagPreset:"plain",enableMetaTag:!1,enableButton:!0,buttonPreset:"plain",buttonColor:"orange",enableHint:!1},zvideoLinkCardProps:{enableInlinePlay:!0},articleLinkCardProps:{enableZa:!0,useOpenArticleButton:!0},shouldUseArticleCard:p,shouldShowCatalog:h,sourceId:m})),Object(d.b)(S,{Component:D}),L(S),_(S),Object(f.d)(S,{ecommerce:t,getComponent:function(){return n.e(2).then(n.bind(null,1696))}}),N&&Object(a.b)(K,{showModal:N,id:F,userId:q,clientId:l.a.get("_zap"),onClose:function(){U(""),I(!1)},onSelectCard:function(e){var t=e.id,n=e.source,r=e.goods_type,o=e.url,a=e.app_schema_ios,i=e.app_schema_android;Q({id:t,source:n,goodsType:r,url:o,appSchemaIos:a,appSchemaAndroid:i})}})]})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(1),o=n.n(r),a=n(132),i=n(78),c=n(11),s=n.n(c),l=n(31),u=n(3),d=n.n(u),f={image:d.a.oneOf(["default","loadingError","noNetwork","contentError","noWorks","noCollection","noBalance"])},p={buttonText:d.a.oneOfType([d.a.string,d.a.element]).isRequired,buttonOnClick:d.a.func.isRequired},h={className:d.a.string,content:d.a.string.isRequired},b=Object.assign({},h,{},p),m=Object.assign({},h,{title:d.a.string.isRequired}),v=Object.assign({},m,{},p),g=Object.assign({},h,{},f),y=Object.assign({},g,{},p),O=Object.assign({},g,{title:d.a.string.isRequired}),j=Object.assign({},O,{},p),w=n(5),C=o.a.memo((function(e){var t=e.className,r=e.image,o=e.title,c=e.content,u=e.buttonText,d=e.buttonOnClick,f=Object(a.f)().isDarkMode,p=Object(i.d)((function(){return n.e(24).then(n.bind(null,2640))})),h=r&&r.replace(/\b\w/g,(function(e){return e.toUpperCase()}))+(f?"Dark":""),b=p&&p[h],m=r&&b,v=s()("EmptyView-content",{"EmptyView-withTitle":Boolean(o)});return Object(w.g)("div",{className:s()("EmptyView-container",t)},Boolean(m)&&Object(w.g)("div",{className:"EmptyView--placeholder"}),Object(w.g)("div",{className:"EmptyView"},Boolean(m)&&Object(w.g)(m,null),Boolean(o)&&Object(w.g)("div",{className:"EmptyView-title"},o),Object(w.g)("div",{className:v},Boolean(c)&&Object(w.g)("div",null,c)),Boolean(u)&&Object(w.g)(l.c,{className:"EmptyView-button",onClick:d},u)),Boolean(m)&&Object(w.g)("div",{className:"EmptyView--placeholder"}))}));function k(e){var t=function(t){var n={};return Object.keys(t).forEach((function(r){e[r]?n[r]=t[r]:console.warn("".concat(r," is not allowed. check the type"))})),Object(w.g)(C,n)};return t.propTypes=e,t}var x={ET1:k(h),ET1A:k(b),ET2:k(m),ET2A:k(v),EI1:k(g),EI1A:k(y),EI2:k(O),EI2A:k(j)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n(1);var r=n(3),o=n.n(r),a=n(78),i=n(5);function c(e){var t=e.id,r=e.parentType,o=e.parentId,c=e.suger,s=e.data,l=e.isEditor,u=void 0!==l&&l,d=Object(a.d)((function(){return n.e(3).then(n.bind(null,2645))}),t),f=Object(a.d)((function(){return n.e(4).then(n.bind(null,2646))}),t);return t.startsWith("fee_")&&f?Object(i.g)(f,{id:t,isEditor:u}):d?Object(i.g)(d,{id:t,parentType:r,urlToken:o,suger:c,data:s,isEditor:u}):null}c.propTypes={id:o.a.string.isRequired,parentType:o.a.oneOf(["answer","article"]),parentId:o.a.string,suger:o.a.object,data:o.a.object,isEditor:o.a.bool};var s=c},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(157),i=n.n(a),c=n(5);t.a=function(e){var t=e.referenceList,n=e.onClick,r=e.listRef;return Object(c.g)(o.a.Fragment,null,Object(c.g)("h2",null,"参考"),Object(c.g)("ol",{className:"ReferenceList",onClick:n,ref:r},i()(t,"refKey").map((function(e){var n=t.filter((function(t){return t.refKey===e.refKey})),r=n.length>1?Object(c.g)(o.a.Fragment,null,Object(c.g)("span",{className:"ReferenceList-backHint","aria-label":"back"},"^"),n.map((function(e,t){var n="".concat(e.refKey,"_").concat(t);return Object(c.g)("sup",{key:n,className:"ReferenceList-backLink"},Object(c.g)("a",{href:"#".concat(n),"data-reference-link":!0},"abcdefghijklmnopqrstuvwxyz"[t%26]))}))):Object(c.g)("a",{className:"ReferenceList-backLink",href:"#".concat(e.refKey,"_0"),"aria-label":"back","data-reference-link":!0},"^");return Object(c.g)("li",{id:e.refKey,key:e.refKey,tabIndex:0},r,e.text&&Object(c.g)("span",null,e.text),e.text&&e.url&&" ",e.url&&Object(c.g)("a",{href:e.url,className:"external",target:"_blank",rel:"noopener noreferrer"},e.url))}))))}},function(e,t,n){},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(133),o=n(581),a=n(56);function i(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(o.a)(e,-n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Q}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(1),h=n.n(p),b=n(139),m=n(141),v=n(142);n(3);function g(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var y=n(39),O=n.n(y),j=!1,w=h.a.createContext(null),C=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}Object(v.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[O.a.findDOMNode(this),r],a=o[0],i=o[1],c=this.getTimeouts(),s=r?c.appear:c.enter;!e&&!n||j?this.safeSetState({status:"entered"},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,i),this.safeSetState({status:"entering"},(function(){t.props.onEntering(a,i),t.onTransitionEnd(s,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(a,i)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:O.a.findDOMNode(this);t&&!j?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:O.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],i=o[1];this.props.addEndListener(a,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(m.default)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return h.a.createElement(w.Provider,{value:null},"function"==typeof n?n(e,r):h.a.cloneElement(h.a.Children.only(n),r))},t}(h.a.Component);function k(){}C.contextType=w,C.propTypes={},C.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:k,onEntering:k,onEntered:k,onExit:k,onExiting:k,onExited:k},C.UNMOUNTED="unmounted",C.EXITED="exited",C.ENTERING="entering",C.ENTERED="entered",C.EXITING="exiting";var x=C,S=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=g(n.className,r):n.setAttribute("class",g(n.className&&n.className.baseVal||"",r)));var n,r}))},E=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1];t.removeClasses(o,"exit"),t.addClass(o,a?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.addClass(o,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.removeClasses(o,a),t.addClass(o,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}Object(v.a)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,a=n.done;this.appliedClasses[t]={},r&&S(e,r),o&&S(e,o),a&&S(e,a)},n.render=function(){var e=this.props,t=(e.classNames,Object(m.default)(e,["classNames"]));return h.a.createElement(x,Object(b.default)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(h.a.Component);E.defaultProps={classNames:""},E.propTypes={};var R=E,T=n(66);function A(e,t){var n=Object.create(null);return e&&p.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(p.isValidElement)(e)?t(e):e}(e)})),n}function N(e,t,n){return null!=n[t]?n[t]:e.props[t]}function _(e,t,n){var r=A(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var c={};for(var s in t){if(o[s])for(r=0;r<o[s].length;r++){var l=o[s][r];c[o[s][r]]=n(l)}c[s]=n(s)}for(r=0;r<a.length;r++)c[a[r]]=n(a[r]);return c}(t,r);return Object.keys(o).forEach((function(a){var i=o[a];if(Object(p.isValidElement)(i)){var c=a in t,s=a in r,l=t[a],u=Object(p.isValidElement)(l)&&!l.props.in;!s||c&&!u?s||!c||u?s&&c&&Object(p.isValidElement)(l)&&(o[a]=Object(p.cloneElement)(i,{onExited:n.bind(null,i),in:l.props.in,exit:N(i,"exit",e),enter:N(i,"enter",e)})):o[a]=Object(p.cloneElement)(i,{in:!1}):o[a]=Object(p.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:N(i,"exit",e),enter:N(i,"enter",e)})}})),o}var I=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},M=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Object(T.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Object(v.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,A(n.children,(function(e){return Object(p.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:N(e,"appear",n),enter:N(e,"enter",n),exit:N(e,"exit",n)})}))):_(e,o,a),firstRender:!1}},n.handleExited=function(e,t){var n=A(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(b.default)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(m.default)(e,["component","childFactory"]),o=this.state.contextValue,a=I(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?h.a.createElement(w.Provider,{value:o},a):h.a.createElement(w.Provider,{value:o},h.a.createElement(t,r,a))},t}(h.a.Component);M.propTypes={},M.defaultProps={component:"div",childFactory:function(e){return e}};var L=M,P=n(33),B=n.n(P),z=n(41),D=n.n(z),F=n(5);function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var V=function(e){s()(n,e);var t=U(n);function n(e){var r;return o()(this,n),r=t.call(this,e),"undefined"!=typeof document&&(r.element=document.createElement("div")),r}return i()(n,[{key:"componentDidMount",value:function(){document.body.appendChild(this.element)}},{key:"componentWillUnmount",value:function(){document.body.removeChild(this.element),delete this.element}},{key:"render",value:function(){if(this.element){var e=this.props,t=e.onRef,n=D()(e,["onRef"]);return Object(y.createPortal)(Object(F.g)("div",B()({ref:t},n)),this.element)}return null}}]),n}(p.Component);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var H=function(e,t){e.addEventListener("transitionend",t,!1),e.addEventListener("transitioncancel",t,!1)},K=function(e){s()(n,e);var t=q(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={shouldMountPortal:!1,hasChildren:!1},e.handleExited=function(){e.setState((function(e){e.hasChildren}))},e}return i()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.portalClassName,r=t.transitionName,o=t.onAfterEnter,a=t.timeout,i=t.children,c=this.state,s=c.shouldMountPortal,l=c.hasChildren,u={appear:"".concat(r,"-enter"),appearActive:"".concat(r,"-enter-active"),enter:"".concat(r,"-enter"),enterActive:"".concat(r,"-enter-active"),enterDone:"".concat(r,"-enter-done"),exit:"".concat(r,"-leave"),exitActive:"".concat(r,"-leave-active"),exitDone:"".concat(r,"-leave-done")};return s&&Object(F.g)(V,{className:n},Object(F.g)(L,null,l&&p.Children.map(i,(function(t,n){return t&&Object(F.g)(R,{key:n,timeout:a,classNames:u,appear:!0,onExited:e.handleExited,onEntering:o,addEndListener:H},t)}))))}}]),n}(p.Component);K.getDerivedStateFromProps=function(e,t){var n=p.Children.toArray(e.children).some(Boolean),r=t.hasChildren;return!r&&n?{shouldMountPortal:!0,hasChildren:n}:r&&!n?{hasChildren:n}:null};var Q=K},function(e,t,n){"use strict";var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(3),h=n.n(p),b=n(1),m=n(39),v=n(783),g=n(11),y=n.n(g),O=n(321),j=n(925),w=n(1006),C=n(1004),k=n(33),x=n.n(k),S=n(41),E=n.n(S),R=n(5),T=function(e){var t=e.children,n=e.className,r=e.direction,o=E()(e,["children","className","direction"]);return Object(R.g)("div",x()({className:y()("ModalButtonGroup",n,"ModalButtonGroup--".concat(r))},o),t)};T.defaultProps={direction:"vertical"},T.propTypes={children:h.a.node,direction:h.a.oneOf(["vertical","horizontal"])};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var N,_=[],I=function(e){s()(n,e);var t=A(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={transparent:!1},e.handleKeydown=function(t){var n=e.props,r=n.hotKeyClosable,o=n.onClose;t.keyCode===j.a.ESCAPE&&r&&o&&o(t)},e.handleBackdropClick=function(t){var n=e.props,r=n.maskClosable,o=n.onClose;r&&o&&o(t)},e.handleButtonClick=function(t){var n=e.props.onClose;n&&n(t)},e}return i()(n,[{key:"componentDidMount",value:function(){this.props.children&&this.handleShow()}},{key:"componentDidUpdate",value:function(e){var t=e.children,n=this.props.children;!t&&n?this.handleShow():t&&!n&&this.handleHide()}},{key:"componentWillUnmount",value:function(){this.props.children&&this.handleHide()}},{key:"handleShow",value:function(){var e=_[_.length-1];e&&e.setState({transparent:!0}),_.push(this),_.length>0&&(clearTimeout(N),O.hide())}},{key:"handleHide",value:function(){_.pop();var e=_[_.length-1];e&&e.setState({transparent:!1}),_.length<=0&&(N=setTimeout((function(){O.show()}),300))}},{key:"render",value:function(){var e=this.props,t=e.size,n=e.spread,r=e.title,o=e.subtitle,a=e.footer,i=e.closeButton,c=void 0===i?Object(R.g)("div",{className:"ModalWindow-closeButton",onClick:this.handleButtonClick},Object(R.g)(v.a,{className:"ModalWindow-closeIcon"})):i,s=e.buttonGroupOnly,l=e.className,u=e.children,d=e.onScroll,f=e.contentClassName,p=void 0===f?"":f,h=e.backDropClassName,b=void 0===h?"":h,m=this.state.transparent;return Object(R.g)(C.a,{transitionName:"ModalWindow",timeout:300},u&&Object(R.g)(w.a,{onKeyDown:this.handleKeydown},Object(R.g)("div",{className:y()("ModalWindow-wrapper",{"ModalWindow-wrapper--transparent":m})},Object(R.g)("div",{className:y()("ModalWindow-backdrop",b),onClick:this.handleBackdropClick}),Object(R.g)("div",{className:y()("ModalWindow","ModalWindow--".concat(t),l),tabIndex:0},Object(R.g)("div",{className:"ModalWindow-inner",onScroll:d},r&&Object(R.g)("h3",{className:y()("ModalWindow-title",{"ModalWindow-title--simple":!o&&s})},r),o&&Object(R.g)("div",{className:"ModalWindow-subtitle"},o),Object(R.g)("div",{className:y()("ModalWindow-content",{"ModalWindow-content--spread":n||"fullPage"===t&&!r&&!o},p)},u),a&&Object(R.g)("div",{className:"ModalWindow-footer"},a)),c))))}}]),n}(b.Component);I.propTypes={size:h.a.oneOf(["default","large","fullPage","small"]),spread:h.a.bool,title:h.a.node,subtitle:h.a.node,footer:h.a.node,closeButton:h.a.node,buttonGroupOnly:h.a.bool,hotKeyClosable:h.a.bool,maskClosable:h.a.bool,onClose:h.a.func,onScroll:h.a.func,contentClassName:h.a.string},I.defaultProps={size:"default",spread:!1,buttonGroupOnly:!1,hotKeyClosable:!0,maskClosable:!0},I.open=function(e){var t=document.createElement("div");document.body.appendChild(t);var n=!1,r=function(){n||(n=!0,o())};"function"==typeof e&&(e=e(r));var o=function(){Object(m.render)(Object(b.cloneElement)(e,{children:null}),t),setTimeout((function(){Object(m.unmountComponentAtNode)(t),t.parentNode.removeChild(t)}),300)};Object(m.render)(e.props.onClose?e:Object(b.cloneElement)(e,{onClose:r}),t)};t.a=I},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(92),s=n.n(c),l=n(22),u=n.n(l),d=n(23),f=n.n(d),p=n(13),h=n.n(p),b=n(1),m=n.n(b),v=n(39),g=n(410),y=n.n(g);function O(e,t){e&&(e.focus(t),e instanceof HTMLInputElement&&e.select())}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=n(y()(t)),o=r.length;if(o){var a=r.indexOf(document.activeElement);-1===a?("prev"===e&&O(r[o-1]),"next"===e&&O(r[0])):("prev"===e&&O(r[(a-1+o)%o]),"next"===e&&O(r[(a+1)%o]))}}var w=O,C=n(925);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var x=[],S=function(e){u()(n,e);var t=k(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleKeyDown=function(t){if(e.isTopLayer()){var n=e.props.onKeyDown;if(n&&n(t),!t.defaultPrevented&&t.keyCode===C.a.TAB){t.preventDefault();var r=Object(v.findDOMNode)(s()(e));j(t.shiftKey?"prev":"next",r,(function(e){return e.filter((function(e){return"true"===e.contentEditable||!e.closest("[contentEditable]")}))}))}}},e}return i()(n,[{key:"componentDidMount",value:function(){x.push(this),window.addEventListener("keydown",this.handleKeyDown,!0),this.enterFocusZone()}},{key:"componentWillUnmount",value:function(){x.splice(x.indexOf(this),1),window.removeEventListener("keydown",this.handleKeyDown,!0),this.leaveFocusZone()}},{key:"enterFocusZone",value:function(){var e=this;this.prevActiveElement=document.activeElement,this.timeout=window.setTimeout((function(){var t=Object(v.findDOMNode)(e);t&&!t.contains(document.activeElement)&&function(e){j("next",e)}(t)}),100)}},{key:"leaveFocusZone",value:function(){clearTimeout(this.timeout),this.prevActiveElement&&!this.prevActiveElement.closest("[contentEditable]")&&w(this.prevActiveElement)}},{key:"isTopLayer",value:function(){return x[x.length-1]===this}},{key:"render",value:function(){return b.Children.only(this.props.children)}}]),n}(m.a.Component)},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n.n(o),i=n(11),c=n.n(i),s=Array.from(Array(12),(function(e,t){return Object(r.b)("span",{className:"Spinner-blade-12"},t)}));function l(e){var t=e.className,n=e.white,o=e.large;return Object(r.b)("div",{className:c()("Spinner-blade",t,{"Spinner-blade--large":o,"Spinner-blade--white":n}),children:s})}l.propTypes={className:a.a.string,large:a.a.bool,white:a.a.bool};var u=l;t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2),o=n(1),a=n(31),i=n(364),c=n(205),s=function(e){var t=e.className,n=e.onClick,s=e.label,l=e.onRef,u=e.disabled,d=e.showIcon,f=void 0===d||d;return Object(r.c)(o.Fragment,{children:[Object(r.b)(c.c,{keyMap:{BOOKMARK:"s c"},handlers:{BOOKMARK:n}}),Object(r.b)(a.c,{onRef:l,className:t,preset:"plain",onClick:n,icon:f?i.a:null,label:s,disabled:u})]})};s.defaultProps={label:"收藏"};var l=s},function(e,t,n){"use strict";var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(33),h=n.n(p),b=n(3),m=n.n(b),v=n(1),g=n(857),y=n(5);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var j=function(e){s()(n,e);var t=O(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"renderThumbnail",value:function(){var e=this.props.error;return Object(y.g)("div",{className:"VideoErrorCard-thumbnail"},Object(y.g)("div",{className:"VideoErrorCard-error"},e.message||"错误"))}},{key:"render",value:function(){var e=this.props,t=e.isLens,n=e.id;return Object(y.g)("div",{className:"VideoErrorCard"},Object(y.g)(g.b,h()({},this.props,t&&{playerUrl:"https://www.zhihu.com/video/".concat(n)},{thumbnail:this.renderThumbnail(),showPlayButton:!1,onBeforePlay:function(){return!1}})))}}]),n}(v.Component);j.propTypes={error:m.a.object.isRequired};t.a=j},,function(e,t,n){"use strict";
/** @license React v16.14.0
* react-dom-server.browser.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(91),o=n(1);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i="function"==typeof Symbol&&Symbol.for,c=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,d=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.concurrent_mode"):60111,h=i?Symbol.for("react.forward_ref"):60112,b=i?Symbol.for("react.suspense"):60113,m=i?Symbol.for("react.suspense_list"):60120,v=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,y=i?Symbol.for("react.block"):60121,O=i?Symbol.for("react.fundamental"):60117,j=i?Symbol.for("react.scope"):60119;function w(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case s:return"Fragment";case c:return"Portal";case u:return"Profiler";case l:return"StrictMode";case b:return"Suspense";case m:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case d:return"Context.Provider";case h:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case v:return w(e.type);case y:return w(e.render);case g:if(e=1===e._status?e._result:null)return w(e)}return null}var C=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;C.hasOwnProperty("ReactCurrentDispatcher")||(C.ReactCurrentDispatcher={current:null}),C.hasOwnProperty("ReactCurrentBatchConfig")||(C.ReactCurrentBatchConfig={suspense:null});var k={};function x(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var S=new Uint16Array(16),E=0;15>E;E++)S[E]=E+1;S[15]=0;var R=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,T=Object.prototype.hasOwnProperty,A={},N={};function _(e){return!!T.call(N,e)||!T.call(A,e)&&(R.test(e)?N[e]=!0:(A[e]=!0,!1))}function I(e,t,n,r,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){M[e]=new I(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];M[t]=new I(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){M[e]=new I(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){M[e]=new I(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){M[e]=new I(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){M[e]=new I(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){M[e]=new I(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){M[e]=new I(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){M[e]=new I(e,5,!1,e.toLowerCase(),null,!1)}));var L=/[\-:]([a-z])/g;function P(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(L,P);M[t]=new I(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(L,P);M[t]=new I(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(L,P);M[t]=new I(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){M[e]=new I(e,1,!1,e.toLowerCase(),null,!1)})),M.xlinkHref=new I("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){M[e]=new I(e,1,!1,e.toLowerCase(),null,!0)}));var B=/["'&<>]/;function z(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=B.exec(e);if(t){var n,r="",o=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}o!==n&&(r+=e.substring(o,n)),o=n+1,r+=t}e=o!==n?r+e.substring(o,n):r}return e}function D(e,t){var n,r=M.hasOwnProperty(e)?M[e]:null;return(n="style"!==e)&&(n=null!==r?0===r.type:2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])),n||function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(e,t,r,!1)?"":null!==r?(e=r.attributeName,3===(n=r.type)||4===n&&!0===t?e+'=""':(r.sanitizeURL&&(t=""+t),e+'="'+z(t)+'"')):_(e)?e+'="'+z(t)+'"':""}var F="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},U=null,V=null,q=null,H=!1,K=!1,Q=null,W=0;function G(){if(null===U)throw Error(a(321));return U}function Y(){if(0<W)throw Error(a(312));return{memoizedState:null,queue:null,next:null}}function Z(){return null===q?null===V?(H=!1,V=q=Y()):(H=!0,q=V):null===q.next?(H=!1,q=q.next=Y()):(H=!0,q=q.next),q}function X(e,t,n,r){for(;K;)K=!1,W+=1,q=null,n=e(t,r);return V=U=null,W=0,q=Q=null,n}function J(e,t){return"function"==typeof t?t(e):t}function $(e,t,n){if(U=G(),q=Z(),H){var r=q.queue;if(t=r.dispatch,null!==Q&&void 0!==(n=Q.get(r))){Q.delete(r),r=q.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return q.memoizedState=r,[r,t]}return[q.memoizedState,t]}return e=e===J?"function"==typeof t?t():t:void 0!==n?n(t):t,q.memoizedState=e,e=(e=q.queue={last:null,dispatch:null}).dispatch=ee.bind(null,U,e),[q.memoizedState,e]}function ee(e,t,n){if(!(25>W))throw Error(a(301));if(e===U)if(K=!0,e={action:n,next:null},null===Q&&(Q=new Map),void 0===(n=Q.get(t)))Q.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function te(){}var ne=0,re={readContext:function(e){var t=ne;return x(e,t),e[t]},useContext:function(e){G();var t=ne;return x(e,t),e[t]},useMemo:function(e,t){if(U=G(),t=void 0===t?null:t,null!==(q=Z())){var n=q.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!F(t[o],r[o])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),q.memoizedState=[e,t],e},useReducer:$,useRef:function(e){U=G();var t=(q=Z()).memoizedState;return null===t?(e={current:e},q.memoizedState=e):t},useState:function(e){return $(J,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:te,useEffect:te,useDebugValue:te,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return G(),e},useTransition:function(){return G(),[function(e){e()},!1]}},oe="http://www.w3.org/1999/xhtml";function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var ie={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ce=r({menuitem:!0},ie),se={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},le=["Webkit","ms","Moz","O"];Object.keys(se).forEach((function(e){le.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),se[t]=se[e]}))}));var ue=/([A-Z])/g,de=/^ms-/,fe=o.Children.toArray,pe=C.ReactCurrentDispatcher,he={listing:!0,pre:!0,textarea:!0},be=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,me={},ve={};var ge=Object.prototype.hasOwnProperty,ye={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Oe(e,t){if(void 0===e)throw Error(a(152,w(t)||"Component"))}function je(e,t,n){function i(o,i){var c=i.prototype&&i.prototype.isReactComponent,s=function(e,t,n,r){if(r&&("object"==typeof(r=e.contextType)&&null!==r))return x(r,n),r[n];if(e=e.contextTypes){for(var o in n={},e)n[o]=t[o];t=n}else t=k;return t}(i,t,n,c),l=[],u=!1,d={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===l)return null},enqueueReplaceState:function(e,t){u=!0,l=[t]},enqueueSetState:function(e,t){if(null===l)return null;l.push(t)}};if(c){if(c=new i(o.props,s,d),"function"==typeof i.getDerivedStateFromProps){var f=i.getDerivedStateFromProps.call(null,o.props,c.state);null!=f&&(c.state=r({},c.state,f))}}else if(U={},c=i(o.props,s,d),null==(c=X(i,o.props,c,s))||null==c.render)return void Oe(e=c,i);if(c.props=o.props,c.context=s,c.updater=d,void 0===(d=c.state)&&(c.state=d=null),"function"==typeof c.UNSAFE_componentWillMount||"function"==typeof c.componentWillMount)if("function"==typeof c.componentWillMount&&"function"!=typeof i.getDerivedStateFromProps&&c.componentWillMount(),"function"==typeof c.UNSAFE_componentWillMount&&"function"!=typeof i.getDerivedStateFromProps&&c.UNSAFE_componentWillMount(),l.length){d=l;var p=u;if(l=null,u=!1,p&&1===d.length)c.state=d[0];else{f=p?d[0]:c.state;var h=!0;for(p=p?1:0;p<d.length;p++){var b=d[p];null!=(b="function"==typeof b?b.call(c,f,o.props,s):b)&&(h?(h=!1,f=r({},f,b)):r(f,b))}c.state=f}}else l=null;if(Oe(e=c.render(),i),"function"==typeof c.getChildContext&&"object"==typeof(o=i.childContextTypes)){var m=c.getChildContext();for(var v in m)if(!(v in o))throw Error(a(108,w(i)||"Unknown",v))}m&&(t=r({},t,m))}for(;o.isValidElement(e);){var c=e,s=c.type;if("function"!=typeof s)break;i(c,s)}return{child:e,context:t}}var we=function(){function e(e,t){o.isValidElement(e)?e.type!==s?e=[e]:(e=e.props.children,e=o.isValidElement(e)?[e]:fe(e)):e=fe(e),e={type:null,domNamespace:oe,children:e,childIndex:0,context:k,footer:""};var n=S[0];if(0===n){var r=S,i=2*(n=r.length);if(!(65536>=i))throw Error(a(304));var c=new Uint16Array(i);for(c.set(r),(S=c)[0]=n+1,r=n;r<i-1;r++)S[r]=r+1;S[i-1]=0}else S[0]=S[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}var t=e.prototype;return t.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var e=this.threadID;S[e]=S[0],S[0]=e}},t.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID;x(n,r);var o=n[r];this.contextStack[t]=n,this.contextValueStack[t]=o,n[r]=e.props.value},t.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},t.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},t.read=function(e){if(this.exhausted)return null;var t=ne;ne=this.threadID;var n=pe.current;pe.current=re;try{for(var r=[""],o=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var i=this.threadID;S[i]=S[0],S[0]=i;break}var c=this.stack[this.stack.length-1];if(o||c.childIndex>=c.children.length){var s=c.footer;if(""!==s&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===c.type)this.currentSelectValue=null;else if(null!=c.type&&null!=c.type.type&&c.type.type.$$typeof===d)this.popProvider(c.type);else if(c.type===b){this.suspenseDepth--;var l=r.pop();if(o){o=!1;var u=c.fallbackFrame;if(!u)throw Error(a(303));this.stack.push(u),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=l}r[this.suspenseDepth]+=s}else{var f=c.children[c.childIndex++],p="";try{p+=this.render(f,c.context,c.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(a(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=p}}return r[0]}finally{pe.current=n,ne=t}},t.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?z(n):this.previousWasTextNode?"\x3c!-- --\x3e"+z(n):(this.previousWasTextNode=!0,z(n));if(e=(t=je(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!o.isValidElement(e)){if(null!=e&&null!=e.$$typeof){if((n=e.$$typeof)===c)throw Error(a(257));throw Error(a(258,n.toString()))}return e=fe(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}var i=e.type;if("string"==typeof i)return this.renderDOM(e,t,n);switch(i){case l:case p:case u:case m:case s:return e=fe(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case b:throw Error(a(294))}if("object"==typeof i&&null!==i)switch(i.$$typeof){case h:U={};var y=i.render(e.props,e.ref);return y=X(i.render,e.props,y,e.ref),y=fe(y),this.stack.push({type:null,domNamespace:n,children:y,childIndex:0,context:t,footer:""}),"";case v:return e=[o.createElement(i.type,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case d:return n={type:e,domNamespace:n,children:i=fe(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case f:i=e.type,y=e.props;var w=this.threadID;return x(i,w),i=fe(y.children(i[w])),this.stack.push({type:e,domNamespace:n,children:i,childIndex:0,context:t,footer:""}),"";case O:throw Error(a(338));case g:switch(function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i=e.type),i._status){case 1:return e=[o.createElement(i._result,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw i._result;default:throw Error(a(295))}case j:throw Error(a(343))}throw Error(a(130,null==i?i:typeof i,""))},t.renderDOM=function(e,t,n){var i=e.type.toLowerCase();if(n===oe&&ae(i),!me.hasOwnProperty(i)){if(!be.test(i))throw Error(a(65,i));me[i]=!0}var c=e.props;if("input"===i)c=r({type:void 0},c,{defaultChecked:void 0,defaultValue:void 0,value:null!=c.value?c.value:c.defaultValue,checked:null!=c.checked?c.checked:c.defaultChecked});else if("textarea"===i){var s=c.value;if(null==s){s=c.defaultValue;var l=c.children;if(null!=l){if(null!=s)throw Error(a(92));if(Array.isArray(l)){if(!(1>=l.length))throw Error(a(93));l=l[0]}s=""+l}null==s&&(s="")}c=r({},c,{value:void 0,children:""+s})}else if("select"===i)this.currentSelectValue=null!=c.value?c.value:c.defaultValue,c=r({},c,{value:void 0});else if("option"===i){l=this.currentSelectValue;var u=function(e){if(null==e)return e;var t="";return o.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(c.children);if(null!=l){var d=null!=c.value?c.value+"":u;if(s=!1,Array.isArray(l)){for(var f=0;f<l.length;f++)if(""+l[f]===d){s=!0;break}}else s=""+l===d;c=r({selected:void 0,children:void 0},c,{selected:s,children:u})}}if(s=c){if(ce[i]&&(null!=s.children||null!=s.dangerouslySetInnerHTML))throw Error(a(137,i,""));if(null!=s.dangerouslySetInnerHTML){if(null!=s.children)throw Error(a(60));if("object"!=typeof s.dangerouslySetInnerHTML||!("__html"in s.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=s.style&&"object"!=typeof s.style)throw Error(a(62,""))}for(O in s=c,l=this.makeStaticMarkup,u=1===this.stack.length,d="<"+e.type,s)if(ge.call(s,O)){var p=s[O];if(null!=p){if("style"===O){f=void 0;var h="",b="";for(f in p)if(p.hasOwnProperty(f)){var m=0===f.indexOf("--"),v=p[f];if(null!=v){if(m)var g=f;else if(g=f,ve.hasOwnProperty(g))g=ve[g];else{var y=g.replace(ue,"-$1").toLowerCase().replace(de,"-ms-");g=ve[g]=y}h+=b+g+":",b=f,h+=m=null==v||"boolean"==typeof v||""===v?"":m||"number"!=typeof v||0===v||se.hasOwnProperty(b)&&se[b]?(""+v).trim():v+"px",b=";"}}p=h||null}f=null;e:if(m=i,v=s,-1===m.indexOf("-"))m="string"==typeof v.is;else switch(m){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":m=!1;break e;default:m=!0}m?ye.hasOwnProperty(O)||(f=_(f=O)&&null!=p?f+'="'+z(p)+'"':""):f=D(O,p),f&&(d+=" "+f)}}l||u&&(d+=' data-reactroot=""');var O=d;s="",ie.hasOwnProperty(i)?O+="/>":(O+=">",s="</"+e.type+">");e:{if(null!=(l=c.dangerouslySetInnerHTML)){if(null!=l.__html){l=l.__html;break e}}else if("string"==typeof(l=c.children)||"number"==typeof l){l=z(l);break e}l=null}return null!=l?(c=[],he.hasOwnProperty(i)&&"\n"===l.charAt(0)&&(O+="\n"),O+=l):c=fe(c.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ae(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:i,children:c,childIndex:0,context:t,footer:s}),this.previousWasTextNode=!1,O},e}(),Ce={renderToString:function(e){e=new we(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new we(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(a(207))},renderToStaticNodeStream:function(){throw Error(a(208))},version:"16.14.0"};e.exports=Ce.default||Ce},function(e,t,n){"use strict";
/** @license React v16.13.1
* create-subscription.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(1);t.createSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe;return function(e){function r(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(n=e.call.apply(e,[this].concat(r))||this).state={source:n.props.source,value:null!=n.props.source?t(n.props.source):void 0},n._hasUnmounted=!1,n._unsubscribe=null,n}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(r,e),r.getDerivedStateFromProps=function(e,n){return e.source!==n.source?{source:e.source,value:null!=e.source?t(e.source):void 0}:null};var o=r.prototype;return o.componentDidMount=function(){this.subscribe()},o.componentDidUpdate=function(e,t){this.state.source!==t.source&&(this.unsubscribe(),this.subscribe())},o.componentWillUnmount=function(){this.unsubscribe(),this._hasUnmounted=!0},o.render=function(){return this.props.children(this.state.value)},o.subscribe=function(){var e=this,r=this.state.source;if(null!=r){var o=n(r,(function(t){e._hasUnmounted||e.setState((function(e){return t===e.value||r!==e.source?null:{value:t}}))}));if("function"!=typeof o)throw Error(function(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}(266));this._unsubscribe=o,(o=t(this.props.source))!==this.state.value&&this.setState({value:o})}},o.unsubscribe=function(){"function"==typeof this._unsubscribe&&this._unsubscribe(),this._unsubscribe=null},r}(r.Component)}},function(e,t,n){e.exports=n(369),e.exports.CJKSpace=n(1273).CJKSpace},function(e,t,n){"use strict";n.d(t,"useSpring",(function(){return Qe})),n.d(t,"useTransition",(function(){return Ge}));var r=n(92),o=n.n(r),a=n(74),i=n.n(a),c=n(80),s=n.n(c),l=n(55),u=n.n(l),d=n(33),f=n.n(d),p=n(975),h=n.n(p),b=n(21),m=n.n(b),v=n(22),g=n.n(v),y=n(23),O=n.n(y),j=n(13),w=n.n(j),C=n(422),k=n.n(C),x=n(40),S=n.n(x),E=n(845),R=n.n(E),T=n(20),A=n.n(T),N=n(900);n.d(t,"Globals",(function(){return N.b}));var _=n(1),I=n(1110);n(1111),n(1112);function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w()(e);if(t){var o=w()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O()(this,n)}}function L(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N.s.fun(e)?e.apply(void 0,n):e}var z=function(e,t){return!0===e||!!(t&&e&&(N.s.fun(e)?e(t):Object(N.y)(e).includes(t)))},D=function(e,t){return N.s.obj(e)?t&&e[t]:e},F=function(e,t){return!0===e.default?e[t]:e.default?e.default[t]:void 0},U=function(e){return e},V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U,n=q;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));var r,o={},a=L(n);try{for(a.s();!(r=a.n()).done;){var i=r.value,c=t(e[i],i);N.s.und(c)||(o[i]=c)}}catch(e){a.e(e)}finally{a.f()}return o},q=["config","onProps","onStart","onChange","onPause","onResume","onRest"],H={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function K(e){var t=function(e){var t={},n=0;if(Object(N.l)(e,(function(e,r){H[r]||(t[r]=e,n++)})),n)return t}(e);if(t){var n={to:t};return Object(N.l)(e,(function(e,r){return r in t||(n[r]=e)})),n}return Object.assign({},e)}function Q(e){return e=Object(N.q)(e),N.s.arr(e)?e.map(Q):Object(N.t)(e)?N.b.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function W(e){for(var t in e)return!0;return!1}function G(e){return N.s.fun(e)||N.s.arr(e)&&N.s.obj(e[0])}function Y(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Z(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}var X=Object.assign({},{tension:170,friction:26},{mass:1,damping:1,easing:function(e){return e},clamp:!1}),J=function e(){A()(this,e),this.velocity=0,Object.assign(this,X)};function $(e,t){if(N.s.und(t.decay)){var n=!N.s.und(t.tension)||!N.s.und(t.friction);!n&&N.s.und(t.frequency)&&N.s.und(t.damping)&&N.s.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var ee=[],te=function e(){A()(this,e),this.changed=!1,this.values=ee,this.toValues=null,this.fromValues=ee,this.config=new J,this.immediate=!1};function ne(e,t){var n=t.key,r=t.props,o=t.defaultProps,a=t.state,i=t.actions;return new Promise((function(t,c){var s,l,u,d=z(null!=(s=r.cancel)?s:null==o?void 0:o.cancel,n);if(d)b();else{N.s.und(r.pause)||(a.paused=z(r.pause,n));var f=null==o?void 0:o.pause;!0!==f&&(f=a.paused||z(f,n)),l=B(r.delay||0,n),f?(a.resumeQueue.add(h),i.pause()):(i.resume(),h())}function p(){a.resumeQueue.add(h),a.timeouts.delete(u),u.cancel(),l=u.time-N.w.now()}function h(){l>0?(u=N.w.setTimeout(b,l),a.pauseQueue.add(p),a.timeouts.add(u)):b()}function b(){a.pauseQueue.delete(p),a.timeouts.delete(u),e<=(a.cancelId||0)&&(d=!0);try{i.start(Object.assign({},r,{callId:e,cancel:d}),t)}catch(e){c(e)}}}))}var re=function(e,t){return 1==t.length?t[0]:t.some((function(e){return e.cancelled}))?ie(e.get()):t.every((function(e){return e.noop}))?oe(e.get()):ae(e.get(),t.every((function(e){return e.finished})))},oe=function(e){return{value:e,noop:!0,finished:!0,cancelled:!1}},ae=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{value:e,finished:t,cancelled:n}},ie=function(e){return{value:e,cancelled:!0,finished:!1}};function ce(e,t,n,r){var o=t.callId,a=t.parentId,i=t.onRest,c=n.asyncTo,s=n.promise;return a||e!==c||t.reset?n.promise=R()(S.a.mark((function l(){var u,d,f,p,h,b,m,v;return S.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(n.asyncId=o,n.asyncTo=e,u=V(t,(function(e,t){return"onRest"===t?void 0:e})),p=new Promise((function(e,t){return d=e,f=t})),h=function(e){var t=o<=(n.cancelId||0)&&ie(r)||o!==n.asyncId&&ae(r,!1);if(t)throw e.result=t,f(e),e},b=function(e,t){var a=new le,i=new ue;return R()(S.a.mark((function c(){var s,l;return S.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(!N.b.skipAnimation){c.next=5;break}throw se(n),i.result=ae(r,!1),f(i),i;case 5:return h(a),(s=N.s.obj(e)?Object.assign({},e):Object.assign({},t,{to:e})).parentId=o,Object(N.l)(u,(function(e,t){N.s.und(s[t])&&(s[t]=e)})),c.next=11,r.start(s);case 11:if(l=c.sent,h(a),!n.paused){c.next=16;break}return c.next=16,new Promise((function(e){n.resumeQueue.add(e)}));case 16:return c.abrupt("return",l);case 17:case"end":return c.stop()}}),c)})))()},!N.b.skipAnimation){l.next=9;break}return se(n),l.abrupt("return",ae(r,!1));case 9:return l.prev=9,v=N.s.arr(e)?function(){var e=R()(S.a.mark((function e(t){var n,r,o;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=L(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,b(o);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})));return function(t){return e.apply(this,arguments)}}()(e):Promise.resolve(e(b,r.stop.bind(r))),l.next=13,Promise.all([v.then(d),p]);case 13:m=ae(r.get(),!0,!1),l.next=27;break;case 16:if(l.prev=16,l.t0=l.catch(9),!(l.t0 instanceof le)){l.next=22;break}m=l.t0.result,l.next=27;break;case 22:if(!(l.t0 instanceof ue)){l.next=26;break}m=l.t0.result,l.next=27;break;case 26:throw l.t0;case 27:return l.prev=27,o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?c:void 0,n.promise=a?s:void 0),l.finish(27);case 30:return N.s.fun(i)&&N.w.batchedUpdates((function(){i(m,r,r.item)})),l.abrupt("return",m);case 32:case"end":return l.stop()}}),l,null,[[9,16,27,30]])})))():s}function se(e,t){Object(N.m)(e.timeouts,(function(e){return e.cancel()})),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var le=function(e){g()(n,e);var t=M(n);function n(){return A()(this,n),t.call(this,"An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}return n}(k()(Error)),ue=function(e){g()(n,e);var t=M(n);function n(){return A()(this,n),t.call(this,"SkipAnimationSignal")}return n}(k()(Error)),de=function(e){return e instanceof pe},fe=1,pe=function(e){g()(n,e);var t=M(n);function n(){var e;return A()(this,n),(e=t.apply(this,arguments)).id=fe++,e._priority=0,e}return m()(n,[{key:"get",value:function(){var e=Object(I.e)(this);return e&&e.getValue()}},{key:"to",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N.b.to(this,t)}},{key:"interpolate",value:function(){Object(N.j)();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N.b.to(this,t)}},{key:"toJSON",value:function(){return this.get()}},{key:"observerAdded",value:function(e){1==e&&this._attach()}},{key:"observerRemoved",value:function(e){0==e&&this._detach()}},{key:"_attach",value:function(){}},{key:"_detach",value:function(){}},{key:"_onChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Object(N.d)(this,{type:"change",parent:this,value:e,idle:t})}},{key:"_onPriorityChange",value:function(e){this.idle||N.o.sort(this),Object(N.d)(this,{type:"priority",parent:this,priority:e})}},{key:"priority",get:function(){return this._priority},set:function(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}}]),n}(N.a),he=Symbol.for("SpringPhase"),be=function(e){return(1&e[he])>0},me=function(e){return(2&e[he])>0},ve=function(e){return(4&e[he])>0},ge=function(e,t){return t?e[he]|=3:e[he]&=-3},ye=function(e,t){return t?e[he]|=4:e[he]&=-5},Oe=function(e){g()(n,e);var t=M(n);function n(e,r){var o;if(A()(this,n),(o=t.call(this)).animation=new te,o.defaultProps={},o._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},o._pendingCalls=new Set,o._lastCallId=0,o._lastToId=0,o._memoizedDuration=0,!N.s.und(e)||!N.s.und(r)){var a=N.s.obj(e)?Object.assign({},e):Object.assign({},r,{from:e});N.s.und(a.default)&&(a.default=!0),o.start(a)}return o}return m()(n,[{key:"advance",value:function(e){var t=this,n=!0,r=!1,o=this.animation,a=o.config,i=o.toValues,c=Object(I.g)(o.to);!c&&Object(N.r)(o.to)&&(i=Object(N.y)(Object(N.q)(o.to))),o.values.forEach((function(s,l){if(!s.done){var u=s.constructor==I.b?1:c?c[l].lastPosition:i[l],d=o.immediate,f=u;if(!d){if(f=s.lastPosition,a.tension<=0)return void(s.done=!0);var p,h=s.elapsedTime+=e,b=o.fromValues[l],m=null!=s.v0?s.v0:s.v0=N.s.arr(a.velocity)?a.velocity[l]:a.velocity;if(N.s.und(a.duration))if(a.decay){var v=!0===a.decay?.998:a.decay,g=Math.exp(-(1-v)*h);f=b+m/(1-v)*(1-g),d=Math.abs(s.lastPosition-f)<.1,p=m*g}else{p=null==s.lastVelocity?m:s.lastVelocity;for(var y=a.precision||(b==u?.005:Math.min(1,.001*Math.abs(u-b))),O=a.restVelocity||y/10,j=a.clamp?0:a.bounce,w=!N.s.und(j),C=b==u?s.v0>0:b<u,k=Math.ceil(e/1),x=0;x<k&&(Math.abs(p)>O||!(d=Math.abs(u-f)<=y));++x){w&&(f==u||f>u==C)&&(p=-p*j,f=u),f+=1*(p+=1*((1e-6*-a.tension*(f-u)+.001*-a.friction*p)/a.mass))}}else{var S=1;a.duration>0&&(t._memoizedDuration!==a.duration&&(t._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,h=s.elapsedTime+=e)),S=(S=(a.progress||0)+h/t._memoizedDuration)>1?1:S<0?0:S,s.durationProgress=S),p=((f=b+a.easing(S)*(u-b))-s.lastPosition)/e,d=1==S}s.lastVelocity=p,Number.isNaN(f)&&(console.warn("Got NaN while animating:",t),d=!0)}c&&!c[l].done&&(d=!1),d?s.done=!0:n=!1,s.setValue(f,a.round)&&(r=!0)}}));var s=Object(I.e)(this);if(n){var l=Object(N.q)(o.to);(s.setValue(l)||r)&&this._onChange(l),this._stop()}else r&&this._onChange(s.getValue())}},{key:"set",value:function(e){var t=this;return N.w.batchedUpdates((function(){t._stop(),t._focus(e),t._set(e)})),this}},{key:"pause",value:function(){this._update({pause:!0})}},{key:"resume",value:function(){this._update({pause:!1})}},{key:"finish",value:function(){var e=this;if(me(this)){var t=this.animation,n=t.to,r=t.config;N.w.batchedUpdates((function(){e._onStart(),r.decay||e._set(n,!1),e._stop()}))}return this}},{key:"update",value:function(e){return(this.queue||(this.queue=[])).push(e),this}},{key:"start",value:function(e,t){var n,r=this;return N.s.und(e)?(n=this.queue||[],this.queue=[]):n=[N.s.obj(e)?e:Object.assign({},t,{to:e})],Promise.all(n.map((function(e){return r._update(e)}))).then((function(e){return re(r,e)}))}},{key:"stop",value:function(e){var t=this,n=this.animation.to;return this._focus(this.get()),se(this._state,e&&this._lastCallId),N.w.batchedUpdates((function(){return t._stop(n,e)})),this}},{key:"reset",value:function(){this._update({reset:!0})}},{key:"eventObserved",value:function(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}},{key:"_prepareNode",value:function(e){var t=this.key||"",n=e.to,r=e.from;(null==(n=N.s.obj(n)?n[t]:n)||G(n))&&(n=void 0),null==(r=N.s.obj(r)?r[t]:r)&&(r=void 0);var o={to:n,from:r};if(!be(this)){if(e.reverse){var a=[r,n];n=a[0],r=a[1]}r=Object(N.q)(r),N.s.und(r)?Object(I.e)(this)||this._set(n):this._set(r)}return o}},{key:"_update",value:function(e,t){var n=this,r=f()({},e),o=this.key,a=this.defaultProps;r.default&&Object.assign(a,V(r,(function(e,t){return/^on/.test(t)?D(e,o):e}))),Ee(this,r,"onProps"),Re(this,"onProps",r,this);var i=this._prepareNode(r);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");var c=this._state;return ne(++this._lastCallId,{key:o,props:r,defaultProps:a,state:c,actions:{pause:function(){ve(n)||(ye(n,!0),Object(N.n)(c.pauseQueue),Re(n,"onPause",ae(n,je(n,n.animation.to)),n))},resume:function(){ve(n)&&(ye(n,!1),me(n)&&n._resume(),Object(N.n)(c.resumeQueue),Re(n,"onResume",ae(n,je(n,n.animation.to)),n))},start:this._merge.bind(this,i)}}).then((function(e){if(r.loop&&e.finished&&(!t||!e.noop)){var o=we(r);if(o)return n._update(o,!0)}return e}))}},{key:"_merge",value:function(e,t,n){var r=this;if(t.cancel)return this.stop(!0),n(ie(this));var o=!N.s.und(e.to),a=!N.s.und(e.from);if(o||a){if(!(t.callId>this._lastToId))return n(ie(this));this._lastToId=t.callId}var i=this.key,c=this.defaultProps,s=this.animation,l=s.to,u=s.from,d=e.to,f=void 0===d?l:d,p=e.from,h=void 0===p?u:p;if(!a||o||t.default&&!N.s.und(f)||(f=h),t.reverse){var b=[h,f];f=b[0],h=b[1]}var m=!Object(N.u)(h,u);m&&(s.from=h),h=Object(N.q)(h);var v=!Object(N.u)(f,l);v&&this._focus(f);var g=G(t.to),y=s.config,O=y.decay,j=y.velocity;(o||a)&&(y.velocity=0),t.config&&!g&&function(e,t,n){for(var r in n&&($(n=Object.assign({},n),t),t=Object.assign({},n,t)),$(e,t),Object.assign(e,t),X)null==e[r]&&(e[r]=X[r]);var o=e.mass,a=e.frequency,i=e.damping;N.s.und(a)||(a<.01&&(a=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/a,2)*o,e.friction=4*Math.PI*i*o/a)}(y,B(t.config,i),t.config!==c.config?B(c.config,i):void 0);var w=Object(I.e)(this);if(!w||N.s.und(f))return n(ae(this,!0));var C=N.s.und(t.reset)?a&&!t.default:!N.s.und(h)&&z(t.reset,i),k=C?h:this.get(),x=Q(f),S=N.s.num(x)||N.s.arr(x)||Object(N.t)(x),E=!g&&(!S||z(c.immediate||t.immediate,i));if(v){var R=Object(I.f)(f);if(R!==w.constructor){if(!E)throw Error("Cannot animate between ".concat(w.constructor.name," and ").concat(R.name,', as the "to" prop suggests'));w=this._set(x)}}var T=w.constructor,A=Object(N.r)(f),_=!1;if(!A){var M=C||!be(this)&&m;(v||M)&&(A=!(_=Object(N.u)(Q(k),x))),Object(N.u)(y.decay,O)&&Object(N.u)(y.velocity,j)||(A=!0)}if(_&&me(this)&&(s.changed&&!C?A=!0:A||this._stop(l)),!g&&((A||Object(N.r)(l))&&(s.values=w.getPayload(),s.toValues=Object(N.r)(f)?null:T==I.b?[1]:Object(N.y)(x)),s.immediate!=E&&(s.immediate=E,E||C||this._set(l)),A)){var L=s.onRest;Object(N.k)(Se,(function(e){return Ee(r,t,e)}));var P=ae(this,je(this,l));Object(N.n)(this._pendingCalls,P),this._pendingCalls.add(n),s.changed&&N.w.batchedUpdates((function(){var e;s.changed=!C,null==L||L(P,r),C?B(c.onRest,P):null==(e=s.onStart)||e.call(s,P,r)}))}C&&this._set(k),g?n(ce(t.to,t,this._state,this)):A?this._start():me(this)&&!v?this._pendingCalls.add(n):n(oe(k))}},{key:"_focus",value:function(e){var t=this.animation;e!==t.to&&(Object(N.p)(this)&&this._detach(),t.to=e,Object(N.p)(this)&&this._attach())}},{key:"_attach",value:function(){var e=0,t=this.animation.to;Object(N.r)(t)&&(Object(N.c)(t,this),de(t)&&(e=t.priority+1)),this.priority=e}},{key:"_detach",value:function(){var e=this.animation.to;Object(N.r)(e)&&Object(N.x)(e,this)}},{key:"_set",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Object(N.q)(e);if(!N.s.und(r)){var o=Object(I.e)(this);if(!o||!Object(N.u)(r,o.getValue())){var a=Object(I.f)(r);o&&o.constructor==a?o.setValue(r):Object(I.h)(this,a.create(r)),o&&N.w.batchedUpdates((function(){t._onChange(r,n)}))}}return Object(I.e)(this)}},{key:"_onStart",value:function(){var e=this.animation;e.changed||(e.changed=!0,Re(this,"onStart",ae(this,je(this,e.to)),this))}},{key:"_onChange",value:function(e,t){t||(this._onStart(),B(this.animation.onChange,e,this)),B(this.defaultProps.onChange,e,this),h()(w()(n.prototype),"_onChange",this).call(this,e,t)}},{key:"_start",value:function(){var e=this.animation;Object(I.e)(this).reset(Object(N.q)(e.to)),e.immediate||(e.fromValues=e.values.map((function(e){return e.lastPosition}))),me(this)||(ge(this,!0),ve(this)||this._resume())}},{key:"_resume",value:function(){N.b.skipAnimation?this.finish():N.o.start(this)}},{key:"_stop",value:function(e,t){if(me(this)){ge(this,!1);var n=this.animation;Object(N.k)(n.values,(function(e){e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Object(N.d)(this,{type:"idle",parent:this});var r=t?ie(this.get()):ae(this.get(),je(this,null!=e?e:n.to));Object(N.n)(this._pendingCalls,r),n.changed&&(n.changed=!1,Re(this,"onRest",r,this))}}},{key:"idle",get:function(){return!(me(this)||this._state.asyncTo)||ve(this)}},{key:"goal",get:function(){return Object(N.q)(this.animation.to)}},{key:"velocity",get:function(){var e=Object(I.e)(this);return e instanceof I.c?e.lastVelocity||0:e.getPayload().map((function(e){return e.lastVelocity||0}))}},{key:"hasAnimated",get:function(){return be(this)}},{key:"isAnimating",get:function(){return me(this)}},{key:"isPaused",get:function(){return ve(this)}}]),n}(pe);function je(e,t){var n=Q(t),r=Q(e.get());return Object(N.u)(r,n)}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.loop,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.to,r=B(t);if(r){var o=!0!==r&&K(r),a=(o||e).reverse,i=!o||o.reset;return Ce(Object.assign({},e,{loop:t,default:!1,pause:void 0,to:!a||G(n)?n:void 0,from:i?e.from:void 0,reset:i},o))}}function Ce(e){var t=e=K(e),n=t.to,r=t.from,o=new Set;return N.s.obj(n)&&xe(n,o),N.s.obj(r)&&xe(r,o),e.keys=o.size?Array.from(o):null,e}function ke(e){var t=Ce(e);return N.s.und(t.default)&&(t.default=V(t)),t}function xe(e,t){Object(N.l)(e,(function(e,n){return null!=e&&t.add(n)}))}var Se=["onStart","onRest","onChange","onPause","onResume"];function Ee(e,t,n){e.animation[n]=t[n]!==F(t,n)?D(t[n],e.key):void 0}function Re(e,t){for(var n,r,o,a,i,c,s=arguments.length,l=new Array(s>2?s-2:0),u=2;u<s;u++)l[u-2]=arguments[u];null==(a=(o=e.animation)[t])||(n=a).call.apply(n,[o].concat(l)),null==(c=(i=e.defaultProps)[t])||(r=c).call.apply(r,[i].concat(l))}var Te=["onStart","onChange","onRest"],Ae=1,Ne=function(){function e(t,n){A()(this,e),this.id=Ae++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start(Object.assign({default:!0},t))}return m()(e,[{key:"get",value:function(){var e={};return this.each((function(t,n){return e[n]=t.get()})),e}},{key:"set",value:function(e){for(var t in e){var n=e[t];N.s.und(n)||this.springs[t].set(n)}}},{key:"update",value:function(e){return e&&this.queue.push(Ce(e)),this}},{key:"start",value:function(e){var t=this.queue;return e?t=Object(N.y)(e).map(Ce):this.queue=[],this._flush?this._flush(this,t):(De(this,t),_e(this,t))}},{key:"stop",value:function(e,t){if(e!==!!e&&(t=e),t){var n=this.springs;Object(N.k)(Object(N.y)(t),(function(t){return n[t].stop(!!e)}))}else se(this._state,this._lastAsyncId),this.each((function(t){return t.stop(!!e)}));return this}},{key:"pause",value:function(e){if(N.s.und(e))this.start({pause:!0});else{var t=this.springs;Object(N.k)(Object(N.y)(e),(function(e){return t[e].pause()}))}return this}},{key:"resume",value:function(e){if(N.s.und(e))this.start({pause:!1});else{var t=this.springs;Object(N.k)(Object(N.y)(e),(function(e){return t[e].resume()}))}return this}},{key:"each",value:function(e){Object(N.l)(this.springs,e)}},{key:"_onFrame",value:function(){var e=this,t=this._events,n=t.onStart,r=t.onChange,o=t.onRest,a=this._active.size>0,i=this._changed.size>0;(a&&!this._started||i&&!this._started)&&(this._started=!0,Object(N.m)(n,(function(t){var n=u()(t,2),r=n[0],o=n[1];o.value=e.get(),r(o,e,e._item)})));var c=!a&&this._started,s=i||c&&o.size?this.get():null;i&&r.size&&Object(N.m)(r,(function(t){var n=u()(t,2),r=n[0],o=n[1];o.value=s,r(o,e,e._item)})),c&&(this._started=!1,Object(N.m)(o,(function(t){var n=u()(t,2),r=n[0],o=n[1];o.value=s,r(o,e,e._item)})))}},{key:"eventObserved",value:function(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}N.w.onFrame(this._onFrame)}},{key:"idle",get:function(){return!this._state.asyncTo&&Object.values(this.springs).every((function(e){return e.idle}))}},{key:"item",get:function(){return this._item},set:function(e){this._item=e}}]),e}();function _e(e,t){return Promise.all(t.map((function(t){return Ie(e,t)}))).then((function(t){return re(e,t)}))}function Ie(e,t,n){return Me.apply(this,arguments)}function Me(){return(Me=R()(S.a.mark((function e(t,n,r){var o,a,i,c,s,l,u,d,f,p,h,b,m;return S.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.keys,a=n.to,i=n.from,c=n.loop,s=n.onRest,l=n.onResolve,u=N.s.obj(n.default)&&n.default,c&&(n.loop=!1),!1===a&&(n.to=null),!1===i&&(n.from=null),(d=N.s.arr(a)||N.s.fun(a)?a:void 0)?(n.to=void 0,n.onRest=void 0,u&&(u.onRest=void 0)):Object(N.k)(Te,(function(e){var r=n[e];if(N.s.fun(r)){var o=t._events[e];n[e]=function(e){var t=e.finished,n=e.cancelled,a=o.get(r);a?(t||(a.finished=!1),n&&(a.cancelled=!0)):o.set(r,{value:null,finished:t||!1,cancelled:n||!1})},u&&(u[e]=n[e])}})),f=t._state,n.pause===!f.paused?(f.paused=n.pause,Object(N.n)(n.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(n.pause=!0),p=(o||Object.keys(t.springs)).map((function(e){return t.springs[e].start(n)})),h=!0===n.cancel||!0===F(n,"cancel"),(d||h&&f.asyncId)&&p.push(ne(++t._lastAsyncId,{props:n,state:f,actions:{pause:N.v,resume:N.v,start:function(e,n){h?(se(f,t._lastAsyncId),n(ie(t))):(e.onRest=s,n(ce(d,e,f,t)))}}})),!f.paused){e.next=15;break}return e.next=15,new Promise((function(e){f.resumeQueue.add(e)}));case 15:return e.t0=re,e.t1=t,e.next=19,Promise.all(p);case 19:if(e.t2=e.sent,b=(0,e.t0)(e.t1,e.t2),!c||!b.finished||r&&b.noop){e.next=26;break}if(!(m=we(n,c,a))){e.next=26;break}return De(t,[m]),e.abrupt("return",Ie(t,m,!0));case 26:return l&&N.w.batchedUpdates((function(){return l(b,t,t.item)})),e.abrupt("return",b);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(e,t){var n=Object.assign({},e.springs);return t&&Object(N.k)(Object(N.y)(t),(function(e){N.s.und(e.keys)&&(e=Ce(e)),N.s.obj(e.to)||(e=Object.assign({},e,{to:void 0})),ze(n,e,(function(e){return Be(e)}))})),n}function Pe(e,t){Object(N.l)(t,(function(t,n){e.springs[n]||(e.springs[n]=t,Object(N.c)(t,e))}))}function Be(e,t){var n=new Oe;return n.key=e,t&&Object(N.c)(n,t),n}function ze(e,t,n){t.keys&&Object(N.k)(t.keys,(function(r){(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function De(e,t){Object(N.k)(t,(function(t){ze(e.springs,t,(function(t){return Be(t,e)}))}))}var Fe,Ue,Ve=function(e){var t=e.children,n=s()(e,["children"]),r=Object(_.useContext)(qe),o=n.pause||!!r.pause,a=n.immediate||!!r.immediate;n=Object(N.B)((function(){return{pause:o,immediate:a}}),[o,a]);var i=qe.Provider;return Object(_.createElement)(i,{value:n},t)},qe=(Fe=Ve,Ue={},Object.assign(Fe,Object(_.createContext)(Ue)),Fe.Provider._context=Fe,Fe.Consumer._context=Fe,Fe);Ve.Provider=qe.Provider,Ve.Consumer=qe.Consumer;var He=function(e){g()(n,e);var t=M(n);function n(){var e;return A()(this,n),(e=t.call(this,"return arguments.callee._call.apply(arguments.callee, arguments)")).current=[],e}return m()(n,[{key:"_call",value:function(e){Object(N.i)(),this.start(e)}},{key:"set",value:function(e){Object(N.k)(this.current,(function(t){return t.set(e)}))}},{key:"start",value:function(e){var t=this,n=[];return Object(N.k)(this.current,(function(r,o){if(N.s.und(e))n.push(r.start());else{var a=t._getProps(e,r,o);a&&n.push(r.start(a))}})),n}},{key:"update",value:function(e){var t=this;return Object(N.k)(this.current,(function(n,r){return n.update(t._getProps(e,n,r))})),this}},{key:"add",value:function(e){this.current.includes(e)||this.current.push(e)}},{key:"delete",value:function(e){var t=this.current.indexOf(e);~t&&this.current.splice(t,1)}},{key:"_getProps",value:function(e,t,n){return N.s.fun(e)?e(n,t):e}}]),n}(k()(Function));function Ke(e,t,n){var r=arguments,o=N.s.fun(t)&&t;o&&!n&&(n=[]);var a=Object(_.useMemo)((function(){return o||3==r.length?new He:void 0}),[]),c=Object(_.useRef)(0),s=Object(N.z)(),l=Object(_.useMemo)((function(){return{ctrls:[],queue:[],flush:function(e,t){var n=Le(e,t);return c.current>0&&!l.queue.length&&!Object.keys(n).some((function(t){return!e.springs[t]}))?_e(e,t):new Promise((function(r){Pe(e,n),l.queue.push((function(){r(_e(e,t))})),s()}))}}}),[]),u=i()(l.ctrls),d=[],f=Object(N.D)(e)||0,p=u.slice(e,f);function h(e,n){for(var r=e;r<n;r++){var a=u[r]||(u[r]=new Ne(null,l.flush)),i=o?o(r,a):t[r];i&&(d[r]=ke(i))}}Object(_.useMemo)((function(){u.length=e,h(f,e)}),[e]),Object(_.useMemo)((function(){h(0,Math.min(f,e))}),n);var b=u.map((function(e,t){return Le(e,d[t])})),m=Object(_.useContext)(Ve),v=Object(N.D)(m),g=m!==v&&W(m);Object(N.A)((function(){c.current++,l.ctrls=u;var e=l.queue;e.length&&(l.queue=[],Object(N.k)(e,(function(e){return e()}))),Object(N.k)(p,(function(e){Y(e,a),e.stop(!0)})),Object(N.k)(u,(function(e,t){Pe(e,b[t]),null==a||a.add(e),g&&e.start({default:m});var n=d[t];n&&(Z(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Object(N.C)((function(){return function(){Object(N.k)(l.ctrls,(function(e){return e.stop(!0)}))}}));var y=b.map((function(e){return Object.assign({},e)}));return a?[y,a]:y}function Qe(e,t){var n=N.s.fun(e),r=Ke(1,n?e:[e],n?t||[]:t),o=u()(r,2),a=u()(o[0],1),i=a[0],c=o[1];return n||2==arguments.length?[i,c]:i}Object(N.k)(["stop","pause","resume"],(function(e){He.prototype[e]=function(){var t=arguments;return Object(N.k)(this.current,(function(n){return n[e].apply(n,i()(t))})),this}}));var We="enter";function Ge(e,t,n){var r=arguments,o=t.reset,a=t.sort,i=t.trail,c=void 0===i?0:i,s=t.expires,l=void 0===s||s,u=t.onDestroyed,d=Object(_.useMemo)((function(){return 3==r.length?new He:void 0}),[]),f=Object(N.y)(e),p=[],h=Object(_.useRef)(null),b=o?null:h.current;Object(N.A)((function(){h.current=p})),Object(N.C)((function(){return function(){return Object(N.k)(h.current,(function(e){e.expired&&clearTimeout(e.expirationId),Y(e.ctrl,d),e.ctrl.stop(!0)}))}}));var m=Ze(f,t,b),v=o&&h.current||[];Object(N.A)((function(){return Object(N.k)(v,(function(e){var t=e.ctrl,n=e.item,r=e.key;Y(t,d),B(u,n,r)}))}));var g=[];if(b&&Object(N.k)(b,(function(e,t){e.expired?(clearTimeout(e.expirationId),v.push(e)):~(t=g[t]=m.indexOf(e.key))&&(p[t]=e)})),Object(N.k)(f,(function(e,t){p[t]||(p[t]={key:m[t],item:e,phase:"mount",ctrl:new Ne},p[t].ctrl.item=e)})),g.length){var y=-1;Object(N.k)(g,(function(e,n){var r=b[n];~e?(y=p.indexOf(r),p[y]=Object.assign({},r,{item:f[e]})):t.leave&&p.splice(++y,0,r)}))}N.s.fun(a)&&p.sort((function(e,t){return a(e.item,t.item)}));var O=-c,j=Object(N.z)(),w=V(t),C=new Map;Object(N.k)(p,(function(e,n){var r,o,a=e.key,i=e.phase;if("mount"==i)r=t.enter,o=We;else{var s=m.indexOf(a)<0;if("leave"!=i)if(s)r=t.leave,o="leave";else{if(!(r=t.update))return;o="update"}else{if(s)return;r=t.enter,o=We}}if(r=B(r,e.item,n),!(r=N.s.obj(r)?K(r):{to:r}).config){var u=t.config||w.config;r.config=B(u,e.item,n,o)}var d=Object.assign({},w,{delay:O+=c,reset:!1},r);if(o==We&&N.s.und(d.from)){var f=N.s.und(t.initial)||b?t.from:t.initial;d.from=B(f,e.item,n)}var p=d.onResolve;d.onResolve=function(e){B(p,e);var t=h.current,n=t.find((function(e){return e.key===a}));if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){var r=t.every((function(e){return e.ctrl.idle}));if("leave"==n.phase){var o=B(l,n.item);if(!1!==o){var i=!0===o?0:o;if(n.expired=!0,!r&&i>0)return void(i<=2147483647&&(n.expirationId=setTimeout(j,i)))}}r&&t.some((function(e){return e.expired}))&&j()}};var v=Le(e.ctrl,d);C.set(e,{phase:o,springs:v,payload:d})}));var k=Object(_.useContext)(Ve),x=Object(N.D)(k),S=k!==x&&W(k);Object(N.A)((function(){S&&Object(N.k)(p,(function(e){e.ctrl.start({default:k})}))}),[k]),Object(N.A)((function(){Object(N.k)(C,(function(e,t){var n=e.phase,r=e.springs,o=e.payload,a=t.ctrl;t.phase=n,null==d||d.add(a),Z(a,o.ref),Pe(a,r),S&&n==We&&a.start({default:k}),a[a.ref?"update":"start"](o)}))}),o?void 0:n);var E=function(e){return Object(_.createElement)(_.Fragment,null,p.map((function(t,n){var r=(C.get(t)||t.ctrl).springs,o=e(Object.assign({},r),t.item,t,n);return o&&o.type?Object(_.createElement)(o.type,Object.assign({},o.props,{key:N.s.str(t.key)||N.s.num(t.key)?t.key:t.ctrl.id,ref:o.ref})):o})))};return d?[E,d]:E}var Ye=1;function Ze(e,t,n){var r=t.key,o=t.keys,a=void 0===o?r:o;if(null===a){var i=new Set;return e.map((function(e){var t=n&&n.find((function(t){return t.item===e&&"leave"!==t.phase&&!i.has(t)}));return t?(i.add(t),t.key):Ye++}))}return N.s.und(a)?e:N.s.fun(a)?e.map(a):Object(N.y)(a)}var Xe=function(e){g()(n,e);var t=M(n);function n(e,r){var a;A()(this,n),(a=t.call(this)).source=e,a.idle=!0,a._active=new Set,a.calc=N.f.apply(void 0,i()(r));var c=a._get(),s=Object(I.f)(c);return Object(I.h)(o()(a),s.create(c)),a}return m()(n,[{key:"advance",value:function(e){var t=this._get(),n=this.get();Object(N.u)(t,n)||(Object(I.e)(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&$e(this._active)&&et(this)}},{key:"_get",value:function(){var e=N.s.arr(this.source)?this.source.map(N.q):Object(N.y)(Object(N.q)(this.source));return this.calc.apply(this,i()(e))}},{key:"_start",value:function(){var e=this;this.idle&&!$e(this._active)&&(this.idle=!1,Object(N.k)(Object(I.g)(this),(function(e){e.done=!1})),N.b.skipAnimation?(N.w.batchedUpdates((function(){return e.advance()})),et(this)):N.o.start(this))}},{key:"_attach",value:function(){var e=this,t=1;Object(N.k)(Object(N.y)(this.source),(function(n){Object(N.r)(n)&&Object(N.c)(n,e),de(n)&&(n.idle||e._active.add(n),t=Math.max(t,n.priority+1))})),this.priority=t,this._start()}},{key:"_detach",value:function(){var e=this;Object(N.k)(Object(N.y)(this.source),(function(t){Object(N.r)(t)&&Object(N.x)(t,e)})),this._active.clear(),et(this)}},{key:"eventObserved",value:function(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Object(N.y)(this.source).reduce((function(e,t){return Math.max(e,(de(t)?t.priority:0)+1)}),0))}}]),n}(pe);function Je(e){return!1!==e.idle}function $e(e){return!e.size||Array.from(e).every(Je)}function et(e){e.idle||(e.idle=!0,Object(N.k)(Object(I.g)(e),(function(e){e.done=!0})),Object(N.d)(e,{type:"idle",parent:e}))}N.b.assign({createStringInterpolator:N.g,to:function(e,t){return new Xe(e,t)}});N.o.advance},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(11),d=n.n(u),f=n(133),p=n(72),h=n(56);function b(e,t){Object(h.a)(2,arguments);var n=Object(p.a)(e),r=Object(f.a)(t);return n.setSeconds(r),n}var m=n(1386),v=n(1387);function g(e,t){Object(h.a)(2,arguments);var n=Object(p.a)(e),r=Object(p.a)(t);return n.getTime()===r.getTime()}var y=n(212);function O(e){Object(h.a)(1,arguments);var t=Object(p.a)(e);return t.setMinutes(0,0,0),t}function j(e){Object(h.a)(1,arguments);var t=Object(p.a)(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}var w=n(1341);var C=n(1462);var k=n(1463),x=n(954),S=n.n(x),E=n(983),R=n.n(E),T=n(433),A=n.n(T),N=n(178),_=n(1122);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var M=S()(0,24).map((function(e){return R()(e,2,"0")})),L=S()(0,60).map((function(e){return R()(e,2,"0")})),P=function(e){Object(a.a)(n,e);var t=I(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={value:b(e.props.value,0)},e}return Object(o.a)(n,[{key:"handleChange",value:function(e,t){var n=this.props,r=n.onChange,o=n.min,a=n.max,i=e;o&&m.a(e,o)&&(i=o),a&&v.a(e,a)&&(i=a),this.setState({value:i}),r(i,t)}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.large,o=t.min,a=t.max,i=t.onRef,c=t.showIcon,l=void 0!==c&&c,u=this.state.value,b=o&&g(y.a(u),y.a(o)),x=b&&g(O(u),O(o)),S=a&&g(y.a(u),y.a(a)),E=S&&g(O(u),O(a));return Object(s.c)("div",{className:d()("DateTimePicker",n),ref:i,children:[Object(s.b)(_.a,{showIcon:l,large:r,value:u,disabledDate:function(e){return!(!o||!m.a(e,y.a(o)))||!(!a||!v.a(e,y.a(a)))},onChange:function(t){e.handleChange(A()((function(e){return function(e,t){Object(h.a)(2,arguments);var n=Object(p.a)(e),r=Object(f.a)(t);return isNaN(n)?new Date(NaN):(n.setFullYear(r),n)}(e,t.getFullYear())}),(function(e){return function(e,t){Object(h.a)(2,arguments);var n=Object(p.a)(e),r=Object(f.a)(t),o=n.getFullYear(),a=n.getDate(),i=new Date(0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);var c=j(i);return n.setMonth(r,Math.min(a,c)),n}(e,t.getMonth())}),(function(e){return function(e,t){Object(h.a)(2,arguments);var n=Object(p.a)(e),r=Object(f.a)(t);return n.setDate(r),n}(e,t.getDate())}))(u),{date:t})}}),Object(s.b)(N.b,{listClassName:"DateTimePicker-selectList",large:r,value:w.a(u,"HH"),onChange:function(t){return e.handleChange(function(e,t){Object(h.a)(2,arguments);var n=Object(p.a)(e),r=Object(f.a)(t);return n.setHours(r),n}(u,t),{hours:t})},children:M.map((function(e){var t=b&&e<C.a(o)||S&&e>C.a(a);return Object(s.b)(N.a,{value:e,disabled:t,css:function(e){return{color:t?e.colors.GBK07B:e.colors.GBK02A}}},e)}))}),Object(s.b)("span",{className:"DateTimePicker-label",children:"时"}),Object(s.b)(N.b,{listClassName:"DateTimePicker-selectList",large:r,value:w.a(u,"mm"),onChange:function(t){return e.handleChange(function(e,t){Object(h.a)(2,arguments);var n=Object(p.a)(e),r=Object(f.a)(t);return n.setMinutes(r),n}(u,t),{minutes:t})},children:L.map((function(e){var t=x&&e<k.a(o)||E&&e>k.a(a);return Object(s.b)(N.a,{value:e,disabled:t,css:function(e){return{color:t?e.colors.GBK07B:e.colors.GBK02A}}},e)}))}),Object(s.b)("span",{className:"DateTimePicker-label",children:"分"})]})}}]),n}(l.Component);t.a=P},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return j})),n.d(t,"e",(function(){return C})),n.d(t,"f",(function(){return S})),n.d(t,"d",(function(){return _})),n.d(t,"g",(function(){return L}));var r=n(1),o=n.n(r),a=n(30),i=n(232),c=n(851),s=function(e){var t=Object(i.i)().trackEvent,n=Object(r.useCallback)((function(n){!function(e,t,n){if(!e.defaultPrevented){var r=e.target.getAttribute("data-catalog-target-id");if(r){n({action:"OpenUrl",block:"ZTextCatalog",eventType:"Click",elementLocation:{type:"Button",text:e.target.innerText}},{link:{url:window.location.href}}),a.a.trackEvent(e.target);var o=t.querySelector("#"+r);o&&(e.preventDefault(),Object(c.a)(o,10,!1))}}}(n,e,t)}),[e,t]);Object(r.useEffect)((function(){if(e)return e.addEventListener("click",n),function(){e.removeEventListener("click",n)}}),[e,n])},l=function(e){Object(r.useEffect)((function(){e&&Array.from(e.querySelectorAll("img[eeimg]")).forEach((function(e){e.setAttribute("data-formula",e.alt),e.alt="[公式]"}))}),[e])},u=(n(883),n(55)),d=n.n(u),f=n(64),p=n.n(f),h=n(152),b=function(e){return e.replace(/\.(jpg|png|jpeg|gif)/,".webp")},m=n(922),v=n(924),g=p()((function(){return/Mobile/.test(navigator.userAgent)}));function y(e,t){var n={monitor:{type:"Event",imgResourceErrorInfo:{error_description:t,img_url:e,img_from:"web"}}};a.a.trackMonitor({name:t},n)}var O=function(e){var t=e.onLoadStateChange,n=e.enableWebP,r=e.size,o=e.quality;return function(e){var a=e.target,i=function(e){var t=e.image,n=e.enableWebP,r=e.size,o=e.quality,a=void 0===o?80:o,i=t.dataset,c=i.actualsrc,s=i.actualgif;return n&&s&&s.match(/.gif$/i)?c:(r||(r="720w",!g()&&window.devicePixelRatio>=1.5&&(r="1440w"),g()&&window.devicePixelRatio*window.innerWidth>=1080&&(r="1440w")),Object(h.imgUrl)(c,{quality:a,size:r}))}({image:a,enableWebP:n,size:r,quality:o});if(n&&(i=b(i)),a.src=i,a.complete)a.dataset.lazyStatus="ok";else{t&&a.addEventListener("loadstart",(function(){t("loadstart",i)})),a.dataset.lazyStatus="loading";var c=setTimeout((function(){a.complete||y(a.url,"image_web_timeout_image"),t&&t("timeout",i)}),15e3);a.addEventListener("load",(function(){a.dataset.lazyStatus="ok",clearTimeout(c),y(a.url,"image_web_success_image"),t&&t("load",i)})),a.addEventListener("error",(function(){clearTimeout(c),y(a.url,"image_web_fail_image"),t&&t("error",i)}))}}},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.useWebP,o=void 0===n||n,a=t.disabled,i=void 0!==a&&a,c=t.onLoadStateChange,s=t.size,l=t.quality,u=Object(r.useState)([]),f=d()(u,2),p=f[0],h=f[1],b=Object(v.a)("lossless");Object(m.a)(p,O({onLoadStateChange:c,enableWebP:b&&o,size:s,quality:l}),{rootMargin:"300px"}),Object(r.useEffect)((function(){if(e&&!i){var t=Array.from(e.querySelectorAll("img.lazy:not([data-thumbnail])"));t.length&&h(t)}}),[e,i])},w=n(78),C=function(e,t){var n=Object(w.c)((function(n){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e.defaultPrevented&&e.target.matches("a[data-reference-link]")){var r=e.target.getAttribute("href"),o=t.querySelector(r);if(o){if(e.preventDefault(),n.onReferenceClick&&e.target.hasAttribute("aria-labelledby"))return void n.onReferenceClick(e);o.focus({preventScroll:!0}),Object(c.a)(o),document.documentElement.setAttribute("data-focus-visible","")}}}(n,e,t)}));Object(r.useEffect)((function(){if(e)return e.addEventListener("click",n),function(){e.removeEventListener("click",n)}}),[e,n])},k=(n(577),function(e){var t=function(e){if(0!==e.intersectionRatio){var t=e.target;t.dataset.zaDetailViewId=t.cardShowViewId,a.a.trackCardShow(t,{},{link:{url:t.href}}),n.unobserve(t),t.clickViewId&&(t.dataset.zaDetailViewId=t.clickViewId)}},n=new IntersectionObserver((function(e){e.forEach(t)}),{threshold:[.1]});return[{cardShowViewId:1042,clickViewId:1043,selector:"a.external, a.internal"},{cardShowViewId:1044,clickViewId:1045,selector:"a.member_mention, a.UserLink-link"},{cardShowViewId:174,clickViewId:175,selector:"a.video-box"},{cardShowViewId:171,clickViewId:172,selector:'a[data-draft-type="link-card"]'},{cardShowViewId:7692,selector:"a.FileLinkCard .FileLinkCard-info"},{cardShowViewId:9744,selector:".Catalog"}].forEach((function(t){var r=t.selector,o=t.cardShowViewId,a=t.clickViewId;Array.from(e.querySelectorAll(r)).forEach((function(e){e.cardShowViewId=o,e.clickViewId=a,n.observe(e)}))})),function(){n.disconnect()}}),x="function"==typeof queueMicrotask?queueMicrotask:function(e){return Promise.resolve().then(e)},S=function(e){var t=Object(r.useRef)(null);Object(r.useEffect)((function(){if(e)return x((function(){e&&(t.current=k(e))})),function(){t.current&&t.current()}}),[e])},E=n(33),R=n.n(E),T=n(934),A=n(873),N=n(5),_=function(e){var t=e.contentType,n=e.token,a=e.root,i=e.mcnLinkCardProps,c=Object(r.useState)(null),s=d()(c,2),l=s[0],u=s[1],f=Object(r.useState)(!1),p=d()(f,2),h=p[0],b=p[1];return Object(r.useEffect)((function(){var e=a&&a.querySelector("*[data-draft-type=mcn-link-card]");["answer","article"].includes(t)&&e&&Object(A.a)("/api/v4/mcn/linkcards?content_type=".concat(t,"&token=").concat(n)).then((function(e){var t=e.data;t&&(u(t),b(!0))})).catch((function(){b(!0)}))}),[a]),Object(N.g)(o.a.Fragment,null,h&&Object(N.g)(T.d,R()({},i,{goodsRecommendCards:l,root:a})))},I=n(841),M=n(920),L=function(e,t,n){var o=Object(r.useRef)(n),a=Object(w.c)((function(e){var n=e.currentTarget,r={title:n.dataset.text,href:n.href};"IMG"===e.target.tagName?Object(M.b)(e,t,Object.assign({},r,{video:{}})):Object(M.c)(e,t,r)}));Object(r.useEffect)((function(){if(e&&o.current){var t=Array.from(e.querySelectorAll(".LinkCard.new.static.zvideo"));return t.forEach((function(e){Object(I.onViewedOnce)(e,(function(){return Object(M.d)(e)})),e.addEventListener("click",a)})),function(){t.forEach((function(e){e.removeEventListener("click",a)}))}}}),[e,o,a])}},function(e,t,n){"use strict";n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return d}));var r=n(3),o=n.n(r),a=n(1),i=n(11),c=n.n(i),s=n(177),l=n(5),u=function(e){var t=e.title,n=e.subtitle,r=e.attrInfo,o=e.coverUrl,a=e.avatarUrl,i=e.avatarFit;return Object(l.g)("div",null,o&&Object(l.g)("div",{className:"HoverCard-coverContainer"},Object(l.g)("img",{className:"HoverCard-cover",src:o,alt:"cover"})),Object(l.g)("div",{className:c()("HoverCard-titleContainer",{"HoverCard-titleContainer--noAvatar":!o})},a&&Object(l.g)(s.a,{size:68,className:"HoverCard-avatar",url:a,imgFit:i}),Object(l.g)("div",{className:c()("HoverCard-titleText",{"HoverCard-titleText--noAvatar":!a})},Object(l.g)("div",{className:"HoverCard-title"},t),n&&Object(l.g)("div",{className:"HoverCard-subtitle"},n)),r&&Object(l.g)("div",{className:"HoverCard-attrInfo"},r)))};u.propTypes={title:o.a.node,subtitle:o.a.node,attrInfo:o.a.node,coverUrl:o.a.string,avatarUrl:o.a.string,avatarFit:o.a.oneOf(["fill","contain","cover","none","scale-down"])};var d=u,f=n(20),p=n.n(f),h=n(21),b=n.n(h),m=n(22),v=n.n(m),g=n(23),y=n.n(g),O=n(13),j=n.n(O),w=n(33),C=n.n(w),k=n(41),x=n.n(k),S=n(83),E=n.n(S),R=n(375),T=n(138);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j()(e);if(t){var o=j()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y()(this,n)}}var N=function(e){v()(n,e);var t=A(n);function n(){var e;p()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={opened:!1,placement:null,loaderStyle:null},e.handleOpen=function(t){var n=t.arrowStyle,r=t.placement,o=e.props.onOpen;o&&o(),e.setState({opened:!0,placement:r,loaderStyle:n})},e.handleClose=function(){var t=e.props.onClose;t&&t(),e.setState({opened:!1})},e}return b()(n,[{key:"render",value:function(){var e=E()(this.props,["onOpen","onClose"]),t=e.toggler,n=e.children,r=e.isLoading,o=e.onRef,i=e.size,s=x()(e,["toggler","children","isLoading","onRef","size"]),u=this.state,d=u.opened,f=u.loaderStyle;return Object(l.g)(T.a,C()({noLayer:!0,toggler:Object(l.g)("div",null,t),toggleEvent:"hover",targetClassName:"HoverCard-popoverTarget",placement:"bottom-left",onOpen:this.handleOpen,onClose:this.handleClose},s),Object(l.g)("div",{className:c()("HoverCard-container",{"HoverCard-container--large":"large"===i}),ref:o},r&&Object(l.g)("div",{className:"HoverCard-loading",style:f},Object(l.g)(R.a,null)),Object(l.g)("div",{className:c()("HoverCard",{"HoverCard--isLoading":r||!d})},a.Children.map(n,(function(e){return e&&("string"==typeof e?Object(l.g)("div",{className:"HoverCard-item"},e):Object(a.cloneElement)(e,{className:c()("HoverCard-item",e.props.className)}))})))))}}]),n}(a.Component);N.propTypes={toggler:o.a.node.isRequired,isLoading:o.a.bool,onOpen:o.a.func,onClose:o.a.func,size:o.a.oneOf(["default","large"])},N.defaultProps={margin:16,align:"left",topExcludedHeight:60,size:"default"};var _=N},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1),o=n.n(r),a=n(11),i=n.n(a),c=n(365),s=n(5),l=[{extensionList:["doc","docx","txt"],type:"doc"},{extensionList:["jpg","jpeg","png","bmp"],type:"image"},{extensionList:["mp3","aac"],type:"music"},{extensionList:["pdf"],type:"pdf"},{extensionList:["xls","xlsx","csv"],type:"table"},{extensionList:["torrent"],type:"torrent"},{extensionList:["mp4","flv"],type:"video"},{extensionList:["zip","rar","7z"],type:"zip"},{extensionList:[""],type:"folder"}];var u=function(e){var t=e.className,n=e.isDirectory,r=void 0!==n&&n,o=e.extension,a=function(e){return"https://zhstatic.zhihu.com/assets/zhihu-components/file-icon/zhimg_answer_editor_file_".concat(e,".svg")}(r?"folder":function(e){var t=l.find((function(t){return t.extensionList.includes(e)}));return t?t.type:"other"}(o));return Object(s.g)("img",{className:i()("FileExtensionIcon",t),src:a})},d={baidu:"百度网盘"};var f=function(e){var t=e.component,n=void 0===t?"a":t,r=e.className,a=e.href,l=e.type,f=void 0===l?"file":l,p=e.name,h=e.extension,b=e.size,m=e.source,v=e.onRef,g=e.onClick,y=e.onMouseDown,O=Number(b);return Object(s.g)(n,{className:i()("FileLinkCard",r),href:a,target:"_blank",rel:"noopener noreferrer","data-za-detail-view-id":7693,ref:v,onClick:g,onMouseDown:y},Object(s.g)(u,{className:"FileLinkCard-icon",isDirectory:"directory"===f,extension:h}),Object(s.g)("div",{className:"FileLinkCard-info"},Object(s.g)("div",{className:"FileLinkCard-name"},p),Object(s.g)("div",{className:"FileLinkCard-meta"},Boolean(O)&&Object(s.g)("div",{className:"FileLinkCard-size"},Object(c.unitPrefix)(O)),Boolean(O)&&m&&Object(s.g)(o.a.Fragment,null," · "),m&&Object(s.g)("div",{className:"FileLinkCard-source"},function(e){return d[e]||e}(m)))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(33),h=n.n(p),b=n(41),m=n.n(b),v=n(1),g=n(39),y=n(11),O=n.n(y),j=n(1062),w=n.n(j),C=n(83),k=n.n(C),x=n(5);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}function E(e,t,n){var r=new Image;return r.addEventListener("load",t),r.onerror=n,r.src=e,r}var R=function(e){s()(n,e);var t=S(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={thumbnailLoaded:!1,loaded:!1,vagued:!0,computedWidth:e.props.width,computedHeight:e.props.height},e.wrapperNode=null,e.hasLoaded=!1,e.loadThumbnail=function(){var t=e.props,n=t.onLoadImageFail,r=t.onLoadImageTimeout;e.thumbnail=E(e.props.thumbnail,e.handleThumbnailLoaded,(function(){n&&n({type:"thumbnail",url:e.props.thumbnail})})),r&&setTimeout((function(){e.thumbnail&&!e.thumbnail.complete&&r({type:"thumbnail",url:e.props.thumbnail})}),3e3)},e.loadImage=function(){var t=e.props,n=t.onLoadImageFail,r=t.onLoadImageTimeout;e.image=E(e.props.url,e.handleImageLoaded,(function(){n&&n({type:"image",url:e.props.url})})),r&&setTimeout((function(){e.image&&!e.image.complete&&r({type:"image",url:e.props.url})}),3e3)},e.handleObserve=function(t){t&&e.hasLoaded||t&&(e.hasLoaded=!0,e.loadThumbnail(),e.loadImage())},e.handleThumbnailLoaded=function(){var t=e.props.onLoadImageSuccess;t&&t({type:"thumbnail",url:e.props.thumbnail});var n=e.state,r=n.computedWidth;if(!n.computedHeight){var o=e.thumbnail,a=o.naturalWidth,i=o.naturalHeight*(Number(r)/a);e.setState({computeHeight:i})}e.setState({thumbnailLoaded:!0})},e.handleImageLoaded=function(){var t=e.props.onLoadImageSuccess;t&&t({type:"image",url:e.props.url}),e.setState({loaded:!0}),e.timeout=window.setTimeout((function(){return e.setState({vagued:!1})}),500)},e}return i()(n,[{key:"componentDidMount",value:function(){if(this.wrapperNode){var e=Object(g.findDOMNode)(this.wrapperNode),t=this.state,n=t.computedWidth,r=t.computedHeight;this.setState({computeWidth:n||e.offsetWidth,computeHeight:r||e.offsetHeight})}}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout),this.thumbnail&&this.thumbnail.removeEventListener("load",this.handleThumbnailLoaded),this.image&&this.image.removeEventListener("load",this.handleImageLoaded)}},{key:"render",value:function(){var e=this,t=k()(this.props,["onLoadImageFail","onLoadImageTimeout","onLoadImageSuccess"]),n=t.className,r=t.url,o=t.alt,a=t.threshold,i=t.thumbnail,c=m()(t,["className","url","alt","threshold","thumbnail"]),s=this.state,l=s.thumbnailLoaded,u=s.loaded,d=s.vagued,f=s.computedWidth,p=s.computedHeight;if(!d)return Object(x.g)("img",h()({className:n,width:f,src:r,alt:o},c));var b=w.a;return Object(x.g)(b,{rootMargin:"".concat(a,"px 0px ").concat(a,"px 0px"),onChange:this.handleObserve,className:O()("VagueImage",n),ref:function(t){e.wrapperNode=t},style:Object.assign({},f&&{width:"".concat(f,"px")},{},p&&{height:"".concat(p,"px")}),"data-src":r},Object(x.g)("div",{className:O()("VagueImage-mask",{"is-active":!u}),style:l?{backgroundImage:"url(".concat(i,")")}:{}}),u&&Object(x.g)("img",{className:"VagueImage-innerLarge",src:r,alt:o}))}}]),n}(v.Component);R.defaultProps={threshold:200};var T=R},function(e,t,n){"use strict";var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(55),h=n.n(p),b=n(33),m=n.n(b),v=n(41),g=n.n(v),y=n(1),O=n.n(y),j=n(3),w=n.n(j),C=n(18),k=function(e){return O.a.createElement(C.a,e,O.a.createElement("path",{d:"M11.991 3C7.023 3 3 7.032 3 12s4.023 9 8.991 9C16.968 21 21 16.968 21 12s-4.032-9-9.009-9zm6.237 5.4h-2.655a14.084 14.084 0 0 0-1.242-3.204A7.227 7.227 0 0 1 18.228 8.4zM12 4.836A12.678 12.678 0 0 1 13.719 8.4h-3.438A12.678 12.678 0 0 1 12 4.836zM5.034 13.8A7.418 7.418 0 0 1 4.8 12c0-.621.09-1.224.234-1.8h3.042A14.864 14.864 0 0 0 7.95 12c0 .612.054 1.206.126 1.8H5.034zm.738 1.8h2.655a14.084 14.084 0 0 0 1.242 3.204A7.188 7.188 0 0 1 5.772 15.6zm2.655-7.2H5.772a7.188 7.188 0 0 1 3.897-3.204c-.54.999-.954 2.079-1.242 3.204zM12 19.164a12.678 12.678 0 0 1-1.719-3.564h3.438A12.678 12.678 0 0 1 12 19.164zm2.106-5.364H9.894A13.242 13.242 0 0 1 9.75 12c0-.612.063-1.215.144-1.8h4.212c.081.585.144 1.188.144 1.8 0 .612-.063 1.206-.144 1.8zm.225 5.004c.54-.999.954-2.079 1.242-3.204h2.655a7.227 7.227 0 0 1-3.897 3.204zm1.593-5.004c.072-.594.126-1.188.126-1.8 0-.612-.054-1.206-.126-1.8h3.042c.144.576.234 1.179.234 1.8s-.09 1.224-.234 1.8h-3.042z"}))};k.defaultProps={name:"Browser"};var x=k,S=n(827),E=n(11),R=n.n(E),T=n(83),A=n.n(T),N=n(152),_=n(882),I=n(5);function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var L=function(){return Object(I.g)("div",{className:"LinkCard-image LinkCard-image--default"},Object(I.g)(x,{size:32}))},P=/^https?:\/\/link\.zhihu\.com/,B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e;if(P.test(e)){var n=e.match(/target=([^=]+)/)||[],r=h()(n,2),o=r[1];o&&(t=decodeURIComponent(o))}var a=t.split("/"),i=h()(a,3),c=i[2];return c||""},z=function(e){s()(n,e);var t=M(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"renderLinkMeta",value:function(){var e=this.props,t=e.url,n=e.entityType,r=e.entityData,o=B(t);if(n&&r&&"job"===n){var a=r.salary,i=r.city,c=r.location,s=r.seniority,l=r.education;return Object(I.g)("span",{className:"LinkCard-meta"},Object(I.g)("span",{className:"LinkCard-textMeta"},s&&Object(I.g)("span",{className:"LinkCard-metaItem"},s),l&&Object(I.g)("span",{className:"LinkCard-metaItem"},l),(i||c)&&Object(I.g)("span",{className:"LinkCard-metaItem"},i,Object(I.g)("span",{className:"LinkCard-metaItem-jobLocation"},c))),a&&Object(I.g)("span",{className:"LinkCard-badge"},a))}return Object(I.g)("span",{className:"LinkCard-meta"},Object(I.g)(S.a,{size:17,center:!0}),o)}},{key:"render",value:function(){var e=A()(this.props,["entityType","entityData"]),t=e.text,n=e.target,r=e.url,o=e.image,a=e.imageWidth,i=e.imageHeight,c=e.component,s=e.className,l=e.size,u=g()(e,["text","target","url","image","imageWidth","imageHeight","component","className","size"]);if(Object(_.b)(r))return Object(I.g)(_.a,m()({className:R()("old",s)},this.props));var d=function(e,t){if(e>0&&t>0){var n=e/t;if(n>1.2)return{modifier:"horizontal",size:"180x120"};if(n<=.8)return{modifier:"vertical",size:"120x160"}}return{modifier:"square",size:"ipico"}}(a,i),f=d.modifier,p=d.size,h=!o&&function(e){var t=B(e);return"zhihu.com"===t||t.endsWith(".zhihu.com")}(r)?"https://zhstatic.zhihu.com/assets/zhihu/editor/zhihu-card-default.svg":Object(N.imgUrl)(o,p);return Object(I.g)(c,m()({target:n,href:r,"data-draft-node":"block","data-draft-type":"link-card"},h&&{"data-image":h},a&&{"data-image-width":a},i&&{"data-image-height":i},l&&{"data-size":l},{className:R()("LinkCard old",s,{"LinkCard--hasImage":Boolean(h),"LinkCard--noImage":!h})},u),h&&Object(I.g)("span",{className:"LinkCard-backdrop",style:{backgroundImage:"url(".concat(h,")")}}),Object(I.g)("span",{className:"LinkCard-content"},Object(I.g)("span",{className:"LinkCard-text"},Object(I.g)("span",{className:"LinkCard-title","data-text":!0},t),this.renderLinkMeta()),Object(I.g)("span",{className:"LinkCard-imageCell"},h?Object(I.g)("img",{className:R()("LinkCard-image","LinkCard-image--".concat(f)),alt:"图标",src:h}):Object(I.g)(L,null))))}}]),n}(O.a.Component);z.propTypes={component:w.a.oneOfType([w.a.string,w.a.func]),target:w.a.string,url:w.a.string.isRequired,text:w.a.string.isRequired,image:w.a.string,imageWidth:w.a.oneOfType([w.a.string,w.a.number]),imageHeight:w.a.oneOfType([w.a.string,w.a.number])},z.defaultProps={component:"a",target:"_blank"};t.a=z},function(e,t,n){var r=n(946),o=n(207);e.exports=function(e,t){var n=-1,a=o(e)?Array(e.length):[];return r(e,(function(e,r,o){a[++n]=t(e,r,o)})),a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(365);function o(e){return Object(r.formatNumber)(e)||"--"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),o=n(6),a=n(25),i=n(24),c=Object(o.a)("user",["UPDATE_FOLLOWERS_PIN"]).UPDATE_FOLLOWERS_PIN;function s(e,t,n){return function(o,s){var l=s(),u=l.entities.users,d=l.currentUser,f=u[e];return o(n?Object(a.h)(i.U.blocked,"red"):{urlToken:d,userUrlToken:e,expect:t,API:{types:c,endpoint:"members/".concat(e,"/followers"),method:t?"POST":"DELETE"},UPDATE:{request:{users:Object(r.a)({},e,{isFollowing:t})},failure:{users:Object(r.a)({},e,f)},success:function(t){return{users:Object(r.a)({},e,t)}}}})}}},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(30),p=n(176),h=n(365),b=n(870),m=n(1120),v=n(859),g=n(944),y=n(854),O=(n(1151),n(926)),j=n(908);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var C=function(e){Object(a.a)(n,e);var t=w(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props.user;f.a.setModule(this,{module:"UserItem"},{card:{content:{type:"User",member_hash_id:e.id,follower_num:e.followerCount}}})}},{key:"renderRewardDetails",value:function(){var e=this.props.user,t=e.amount,n=e.rewardCreated;return Object(s.c)("div",{className:"ContentItem-rewardDetails",children:[Object(s.b)("p",{className:"ContentItem-rewardAmount",children:t&&"赞赏了 ¥".concat(t/100)}),Object(s.b)("p",{className:"ContentItem-rewardTime",children:Object(p.toRelativeString)(n)})]})}},{key:"render",value:function(){var e=this.props,t=e.user,n=t.urlToken,r=t.isFollowed,o=t.isFollowing,a=t.answerCount,i=t.articlesCount,c=t.followerCount,l=t.id,u=t.isOrg,d=e.user,f=e.type,p=e.isRewardList,w=e.action,C=e.meta,k=e.status,x=e.noTrackCardShow,S=e.onClick,E=e.currentUser,R=!n,T=E&&E.id===l,A=void 0!==w?w:!T&&!R&&Object(s.b)(b.a,{id:d.urlToken,type:f||d.type,preset:b.a.PRESETS.primary,gender:d.gender,isFollowing:o,onClick:S}),N=void 0!==C?C:R||Object(s.b)(g.a,{user:d}),_=void 0!==k?Object(s.b)(y.d,{children:k}):!R&&Object(s.c)(y.d,{children:[Boolean(a)&&"".concat(Object(h.formatNumber)(a)," 回答"),Boolean(i)&&"".concat(Object(h.formatNumber)(i)," 文章"),Boolean(c)&&"".concat(Object(h.formatNumber)(c)," 关注者")]}),I="//www.zhihu.com/".concat(u?"org":"people","/").concat(n||l),M=this.props.userLinkV2;return Object(s.b)(y.e,{data:d,link:I,image:M?Object(s.b)(O.a,{className:"UserItem-avatar",avatarProps:{size:60},user:d,target:"_blank"}):Object(s.b)(v.a,{className:"UserItem-avatar",avatar:!0,avatarProps:{size:60},user:d,target:"_blank"}),title:Object(s.c)("div",{className:"UserItem-title",children:[M?Object(s.b)(j.a,{user:d,target:"_blank"}):Object(s.b)(v.a,{user:d,target:"_blank"}),Object(s.b)(m.a,{isFollowing:o,isFollowed:r})]}),meta:Object(s.c)("div",{children:[N,_]}),noTrackCardShow:x,extra:p?this.renderRewardDetails():A})}}]),n}(d.Component);C.contextTypes={authRequired:u.a.func},C.propTypes={action:u.a.node,status:u.a.node,meta:u.a.node,type:u.a.string,isRewardList:u.a.bool,onClick:u.a.func,currentUser:u.a.object},t.a=C},,function(e,t,n){"use strict";var r=n(843);t.a=function(e,t,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:" ",i=e.getSelection(),c=e.getCurrentContent(),s=c.createEntity(t,n,o),l=s.getLastCreatedEntityKey(),u=r.EditorState.set(e,{currentContent:s}),d=(u=r.AtomicBlockUtils.insertAtomicBlock(u,l,a)).getCurrentContent(),f=d.getBlockMap(),p=i.getStartKey(),h=d.getBlockForKey(p);h!==f.first()&&0===h.getLength()&&(f=f.delete(p),d=d.merge({blockMap:f}));var b=u.getSelection().getFocusKey(),m=d.getBlockForKey(b);return m!==f.last()&&0===m.getLength()&&(f=f.delete(b),d=d.merge({blockMap:f,selectionAfter:r.SelectionState.createEmpty(d.getKeyAfter(b))})),u=r.EditorState.set(u,{currentContent:d}),r.EditorState.forceSelection(u,u.getCurrentContent().getSelectionAfter())}},function(e,t,n){var r=n(1028),o=n(319),a=n(408);e.exports=function(e){return function(t,n,i){return i&&"number"!=typeof i&&o(t,n,i)&&(n=i=void 0),t=a(t),void 0===n?(n=t,t=0):n=a(n),i=void 0===i?t<n?1:-1:a(i),r(t,n,i,e)}}},function(e,t){var n=Math.ceil,r=Math.max;e.exports=function(e,t,o,a){for(var i=-1,c=r(n((t-e)/(o||1)),0),s=Array(c);c--;)s[a?c:++i]=e,e+=o;return s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(33),h=n.n(p),b=n(41),m=n.n(b),v=n(1),g=n.n(v),y=n(18),O=function(e){return g.a.createElement(y.a,e,g.a.createElement("path",{d:"M16.296 7h.697A1.01 1.01 0 0 1 18 8.003v10.995c0 .554-.45 1.003-1.007 1.003H4.007A1.01 1.01 0 0 1 3 18.998V8.003C3 7.449 3.45 7 4.007 7h12.289zm-.892 11a.6.6 0 0 0 .597-.601V9.601A.597.597 0 0 0 15.405 9H5.596A.599.599 0 0 0 5 9.602v7.797c0 .335.267.601.596.601h9.808zM7 4h13a1 1 0 0 1 1 1v11a1 1 0 0 1-2 0V6.5c0-.5-.5-.5-.5-.5H7a1 1 0 0 1 0-2z",fillRule:"evenodd"}))};O.defaultProps={name:"Size"};var j=O,w=n(5);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var k=function(e){s()(n,e);var t=C(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleMouseMove=function(t){1!==t.buttons&&1!==t.which||e.handleChange(t)},e.handleChange=function(t){var n=e.input.value;e.value!==n&&(e.value=n,e.props.onChange&&e.props.onChange(t))},e}return i()(n,[{key:"componentDidMount",value:function(){this.value=this.input.value}},{key:"render",value:function(){var e=this;return Object(w.g)("input",h()({},this.props,{onMouseMove:this.handleMouseMove,onClick:this.handleChange,onKeyDown:this.handleChange,onChange:this.handleChange,ref:function(t){e.input=t}}))}}]),n}(v.Component);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var S=function(e){s()(n,e);var t=x(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=m()(e,["className"]);return Object(w.g)("div",{className:t},Object(w.g)(j,{center:!0,size:18}),Object(w.g)(k,h()({type:"range",className:"RangeInput",min:"1",max:"2",step:"0.01"},n)),Object(w.g)(j,{center:!0,size:22}))}}]),n}(v.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r.a})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return g})),n.d(t,"d",(function(){return O}));var r=n(1163),o=n(0),a=n(35),i=n(2),c=n(27),s=n(83),l=n.n(s),u=n(71),d=n.n(u),f=n(400),p=["answer","article","post","item"],h=function(e){return e.itemType||p.find((function(t){return e[t]}))},b=function(e){return d()(Object(c.connect)((function(e,t){return{useNewLabels:Object(f.f)(e,t[h(t)])}}))((function(t){var n=t.showLabelInfo,r=void 0===n||n,c=t.showLabels,s=void 0===c||c,u=Object(a.a)(t,["showLabelInfo","showLabels"]),d=h(u),f=u,p=[];return s||p.push("isLabeled"),r||(p.push("labelInfo"),p.push("hermesLabel")),d&&p.length>0&&(f=Object.assign({},f,Object(o.a)({},d,l()(u[d],p)))),Object(i.b)(e,Object.assign({},f))})),e)},m=n(1),v=Object(m.createContext)({showLabelInfo:!0,showLabels:!0}),g=v.Provider,y=v.Consumer,O=function(e){return function(t){var n=Object(i.b)(y,{children:function(n){return Object(i.b)(e,Object.assign({},t,{showLabelProps:n}))}});return d()(n,e)}}},function(e,t,n){"use strict";var r=n(2),o=n(27),a=n(36),i=n(38),c=n.n(i),s=n(37),l=n.n(s),u=n(101);t.a=Object(o.connect)((function(e){var t;return{vipInfo:null===(t=Object(a.b)(e))||void 0===t?void 0:t.vipInfo}}))((function(e){var t=e.widget,n=e.className,o=e.vipInfo,a=t.id,i=t.url;return Object(r.b)(u.a,{className:n,onClick:function(){var e;(null==o||null===(e=o.widget)||void 0===e?void 0:e.id)!=="".concat(a)&&(l.a.set("widgetId",a),l.a.set("widgetUrl",i))},preset:"link",a:!0,to:"https://".concat(c.a.wwwHost,"/settings/stickers"),children:Object(r.b)("img",{src:i,style:{width:"100%"}})})}))},function(e,t,n){"use strict";var r=n(850),o=n(838),a=n(860),i=o.OrderedMap;e.exports=function(e){return e.first()instanceof r?function(e){var t={},n=void 0;return i(e.withMutations((function(e){e.forEach((function(r,o){var i=r.getKey(),c=r.getNextSiblingKey(),s=r.getPrevSiblingKey(),l=r.getChildKeys(),u=r.getParentKey(),d=a();(t[i]=d,c)&&(e.get(c)?e.setIn([c,"prevSibling"],d):e.setIn([i,"nextSibling"],null));s&&(e.get(s)?e.setIn([s,"nextSibling"],d):e.setIn([i,"prevSibling"],null));if(u&&e.get(u)){var f=e.get(u).getChildKeys();e.setIn([u,"children"],f.set(f.indexOf(r.getKey()),d))}else e.setIn([i,"parent"],null),n&&(e.setIn([n.getKey(),"nextSibling"],d),e.setIn([i,"prevSibling"],t[n.getKey()])),n=e.get(i);l.forEach((function(t){e.get(t)?e.setIn([t,"parent"],d):e.setIn([i,"children"],r.getChildKeys().filter((function(e){return e!==t})))}))}))})).toArray().map((function(e){return[t[e.getKey()],e.set("key",t[e.getKey()])]})))}(e):function(e){return i(e.toArray().map((function(e){var t=a();return[t,e.set("key",t)]})))}(e)}},function(e,t,n){"use strict";var r=n(847),o=n(896),a=n(839);function i(e,t,n){var i=t.getCharacterList(),c=n>0?i.get(n-1):void 0,s=n<i.count()?i.get(n):void 0,l=c?c.getEntity():void 0,u=s?s.getEntity():void 0;if(u&&u===l&&"MUTABLE"!==e.__get(u).getMutability()){for(var d,f=function(e,t,n){var r;return o(e,(function(e,t){return e.getEntity()===t.getEntity()}),(function(e){return e.getEntity()===t}),(function(e,t){e<=n&&t>=n&&(r={start:e,end:t})})),"object"!=typeof r&&a(!1),r}(i,u,n),p=f.start,h=f.end;p<h;)d=i.get(p),i=i.set(p,r.applyEntity(d,null)),p++;return t.set("characterList",i)}return t}e.exports=function(e,t){var n=e.getBlockMap(),r=e.getEntityMap(),o={},a=t.getStartKey(),c=t.getStartOffset(),s=n.get(a),l=i(r,s,c);l!==s&&(o[a]=l);var u=t.getEndKey(),d=t.getEndOffset(),f=n.get(u);a===u&&(f=l);var p=i(r,f,d);return p!==f&&(o[u]=p),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}},function(e,t,n){"use strict";e.exports=function(e,t,n){if(n===e.count())t.forEach((function(t){e=e.push(t)}));else if(0===n)t.reverse().forEach((function(t){e=e.unshift(t)}));else{var r=e.slice(0,n),o=e.slice(n);e=r.concat(t,o).toList()}return e}},function(e,t,n){"use strict";var r=n(850);e.exports=function(e,t){if(!(e instanceof r))return null;var n=e.getNextSiblingKey();if(n)return n;var o=e.getParentKey();if(!o)return null;for(var a=t.get(o);a&&!a.getNextSiblingKey();){var i=a.getParentKey();a=i?t.get(i):null}return a?a.getNextSiblingKey():null}},function(e,t,n){"use strict";var r=n(838),o=n(945),a=n(896),i=r.List,c=r.Repeat,s=r.Record,l=o.thatReturnsTrue,u=s({start:null,end:null}),d=s({start:null,end:null,decoratorKey:null,leaves:null}),f={generate:function(e,t,n){var r=t.getLength();if(!r)return i.of(new d({start:0,end:0,decoratorKey:null,leaves:i.of(new u({start:0,end:0}))}));var o=[],s=n?n.getDecorations(t,e):i(c(null,r)),f=t.getCharacterList();return a(s,h,l,(function(e,t){o.push(new d({start:e,end:t,decoratorKey:s.get(e),leaves:p(f.slice(e,t).toList(),e)}))})),i(o)},getFingerprint:function(e){return e.map((function(e){var t=e.get("decoratorKey");return(null!==t?t+"."+(e.get("end")-e.get("start")):"")+"."+e.get("leaves").size})).join("-")}};function p(e,t){var n=[],r=e.map((function(e){return e.getStyle()})).toList();return a(r,h,l,(function(e,r){n.push(new u({start:e+t,end:r+t}))})),i(n)}function h(e,t){return e===t}e.exports=f},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getType=function(){return this.get("type")},t.prototype.getMutability=function(){return this.get("mutability")},t.prototype.getData=function(){return this.get("data")},t}((0,n(838).Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));e.exports=a},function(e,t,n){"use strict";var r=n(965),o=n(839),a="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",i="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",c=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA--zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+a+i+"]"),s=new RegExp("["+a+i+"]");function l(e){var t=c.exec(e);return null==t?null:t[0]}function u(e){var t=l(e);return null==t?r.NEUTRAL:s.exec(t)?r.RTL:r.LTR}function d(e,t){if(t=t||r.NEUTRAL,!e.length)return t;var n=u(e);return n===r.NEUTRAL?t:n}function f(e,t){return t||(t=r.getGlobalDir()),r.isStrong(t)||o(!1),d(e,t)}var p={firstStrongChar:l,firstStrongCharDir:u,resolveBlockDir:d,getDirection:f,isDirectionLTR:function(e,t){return f(e,t)===r.LTR},isDirectionRTL:function(e,t){return f(e,t)===r.RTL}};e.exports=p},function(e,t,n){"use strict";e.exports={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),o=t.getStartOffset(),a=!1;return r.some((function(e){return o===e.get("start")?(a=!0,!0):o<e.get("end")&&e.get("leaves").some((function(e){var t=e.get("start");return o===t&&(a=!0,!0)}))})),a}},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var i=n(1204),c=n(930),s=n(1),l=n(39),u=n(1043),d=n(970),f=n(1038),p=n(965),h=n(875),b=n(1218),m=n(971),v=n(1222),g=n(839),y=n(852),O=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},j=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||O(e.selection,e.block.getKey())&&e.forceSelection},t.prototype.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=l.findDOMNode(this),r=d.getScrollParent(n),o=m(r),a=void 0;if(r===window){var i=b(n);(a=i.y+i.height-v().height)>0&&window.scrollTo(o.x,o.y+a+10)}else{n instanceof HTMLElement||g(!1),(a=n.offsetHeight+n.offsetTop-(r.offsetHeight+o.y))>0&&u.setTop(r,u.getTop(r)+a+10)}}},t.prototype._renderChildren=function(){var e=this,t=this.props.block,n=t.getKey(),o=t.getText(),a=this.props.tree.size-1,l=O(this.props.selection,n);return this.props.tree.map((function(u,d){var h=u.get("leaves"),b=h.size-1,m=h.map((function(r,u){var f=c.encode(n,d,u),p=r.get("start"),h=r.get("end");return s.createElement(i,{key:f,offsetKey:f,block:t,start:p,selection:l?e.props.selection:null,forceSelection:e.props.forceSelection,text:o.slice(p,h),styleSet:t.getInlineStyleAt(p),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:d===a&&u===b})})).toArray(),v=u.get("decoratorKey");if(null==v)return m;if(!e.props.decorator)return m;var g=y(e.props.decorator),O=g.getComponentForKey(v);if(!O)return m;var j=g.getPropsForKey(v),w=c.encode(n,d,0),C=o.slice(h.first().get("start"),h.last().get("end")),k=p.getHTMLDirIfDifferent(f.getDirection(C),e.props.direction);return s.createElement(O,r({},j,{contentState:e.props.contentState,decoratedText:C,dir:k,key:w,entityKey:t.getEntityAt(u.get("start")),offsetKey:w}),m)})).toArray()},t.prototype.render=function(){var e=this.props,t=e.direction,n=e.offsetKey,r=h({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===t,"public/DraftStyleDefault/rtl":"RTL"===t});return s.createElement("div",{"data-offset-key":n,className:r},this._renderChildren())},t}(s.Component);e.exports=j},function(e,t,n){"use strict";e.exports=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},function(e,t,n){"use strict";function r(e,t){return!!t&&(e===t.documentElement||e===t.body)}var o={getTop:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollTop||t.documentElement.scrollTop:e.scrollTop},setTop:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollTop=n.documentElement.scrollTop=t:e.scrollTop=t},getLeft:function(e){var t=e.ownerDocument;return r(e,t)?t.body.scrollLeft||t.documentElement.scrollLeft:e.scrollLeft},setLeft:function(e,t){var n=e.ownerDocument;r(e,n)?n.body.scrollLeft=n.documentElement.scrollLeft=t:e.scrollLeft=t}};e.exports=o},function(e,t,n){"use strict";var r=n(1225),o=n(1226),a=n(945),i=new RegExp("\r\n","g"),c={"text/rtf":1,"text/html":1};function s(e){if("file"==e.kind)return e.getAsFile()}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.types=t.types?o(t.types):[]}return e.prototype.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some((function(e){return c[e]}))},e.prototype.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(i,"\n"):null},e.prototype.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},e.prototype.isLink=function(){return this.types.some((function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")}))},e.prototype.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},e.prototype.isImage=function(){var e=this.types.some((function(e){return-1!=e.indexOf("application/x-moz-file")}));if(e)return!0;for(var t=this.getFiles(),n=0;n<t.length;n++){var o=t[n].type;if(!r.isImage(o))return!1}return!0},e.prototype.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},e.prototype.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(s).filter(a.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},e.prototype.hasFiles=function(){return this.getFiles().length>0},e}();e.exports=l},function(e,t,n){"use strict";e.exports=function e(t){if(t instanceof Element){var n=t.getAttribute("data-offset-key");if(n)return n;for(var r=0;r<t.childNodes.length;r++){var o=e(t.childNodes[r]);if(o)return o}}return null}},function(e,t,n){"use strict";(function(t){var r=n(839),o=/\.textClipping$/,a={"text/plain":!0,"text/html":!0,"text/rtf":!0};e.exports=function(e,n){var i=0,c=[];e.forEach((function(s){!function(e,n){if(!t.FileReader||e.type&&!(e.type in a))return void n("");if(""===e.type){var i="";return o.test(e.name)&&(i=e.name.replace(o,"")),void n(i)}var c=new FileReader;c.onload=function(){var e=c.result;"string"!=typeof e&&r(!1),n(e)},c.onerror=function(){n("")},c.readAsText(e)}(s,(function(t){i++,t&&c.push(t.slice(0,5e3)),i==e.length&&n(c.join("\r"))}))}))}}).call(this,n(100))},function(e,t,n){"use strict";var r=n(930),o=n(852);e.exports=function(e,t,n,a,i){var c=o(e.getSelection()),s=r.decode(t),l=s.blockKey,u=e.getBlockTree(l).getIn([s.decoratorKey,"leaves",s.leafKey]),d=r.decode(a),f=d.blockKey,p=e.getBlockTree(f).getIn([d.decoratorKey,"leaves",d.leafKey]),h=u.get("start"),b=p.get("start"),m=u?h+n:null,v=p?b+i:null;if(c.getAnchorKey()===l&&c.getAnchorOffset()===m&&c.getFocusKey()===f&&c.getFocusOffset()===v)return c;var g=!1;if(l===f){var y=u.get("end"),O=p.get("end");g=b===h&&O===y?i<n:b<h}else{g=e.getCurrentContent().getBlockMap().keySeq().skipUntil((function(e){return e===l||e===f})).first()===f}return c.merge({anchorKey:l,anchorOffset:m,focusKey:f,focusOffset:v,isBackward:g})}},function(e,t,n){"use strict";var r=n(928);e.exports=function(e){var t=e.getSelection();return t.isCollapsed()?null:r(e.getCurrentContent(),t)}},function(e,t,n){"use strict";var r=n(855),o=n(839);var a=r.isBrowser("Chrome")?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var a=r===e.commonAncestorContainer;a?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var i,c=Array.from(t.getClientRects());if(n.push(c),a)return n.reverse(),(i=[]).concat.apply(i,n);t.setEndBefore(r)}o(!1)}:function(e){return Array.from(e.getClientRects())};e.exports=a},function(e,t,n){"use strict";var r=n(972),o=n(1045),a=n(1047),i=n(839),c=n(852);function s(e,t,n){var a=t,s=r(a);if(null!=s||e&&(e===a||e.firstChild===a)||i(!1),e===a&&((a=a.firstChild)instanceof Element&&"true"===a.getAttribute("data-contents")||i(!1),n>0&&(n=a.childNodes.length)),0===n){var u=null;if(null!=s)u=s;else{var d=function(e){for(;e.firstChild&&(e.firstChild instanceof Element&&"true"===e.firstChild.getAttribute("data-blocks")||o(e.firstChild));)e=e.firstChild;return e}(a);u=c(o(d))}return{key:u,offset:0}}var f=a.childNodes[n-1],p=null,h=null;if(o(f)){var b=function(e){for(;e.lastChild&&(e.lastChild instanceof Element&&"true"===e.lastChild.getAttribute("data-blocks")||o(e.lastChild));)e=e.lastChild;return e}(f);p=c(o(b)),h=l(b)}else p=c(s),h=l(f);return{key:p,offset:h}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}e.exports=function(e,t,n,o,i,l){var u=n.nodeType===Node.TEXT_NODE,d=i.nodeType===Node.TEXT_NODE;if(u&&d)return{selectionState:a(e,c(r(n)),o,c(r(i)),l),needsRecovery:!1};var f=null,p=null,h=!0;return u?(f={key:c(r(n)),offset:o},p=s(t,i,l)):d?(p={key:c(r(i)),offset:l},f=s(t,n,o)):(f=s(t,n,o),p=s(t,i,l),n===i&&o===l&&(h=!!n.firstChild&&"BR"!==n.firstChild.nodeName)),{selectionState:a(e,f.key,f.offset,p.key,p.offset),needsRecovery:h}}},function(e,t,n){"use strict";var r="\\s|(?![_])"+n(1243).getPunctuation(),o=new RegExp("^(?:"+r+")*(?:[']|(?!"+r+").)*(?:(?!"+r+").)"),a=new RegExp("(?:(?!"+r+").)(?:[']|(?!"+r+").)*(?:"+r+")*$");function i(e,t){var n=t?a.exec(e):o.exec(e);return n?n[0]:e}var c={getBackward:function(e){return i(e,!0)},getForward:function(e){return i(e,!1)}};e.exports=c},function(e,t,n){"use strict";e.exports=function(e,t){var n,r=e.getSelection(),o=r.getStartKey(),a=r.getStartOffset(),i=e.getCurrentContent(),c=o;return t>i.getBlockForKey(o).getText().length-a?(c=i.getKeyAfter(o),n=0):n=a+t,r.merge({focusKey:c,focusOffset:n})}},function(e,t,n){"use strict";var r,o=a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(91);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=n(847),s=n(866),l=n(850),u=n(966),d=n(929),f=n(861),p=n(838),h=n(838).Set,b=n(1254),m=n(875),v=n(860),g=n(1054),y=n(839),O=n(964),j=f.draft_tree_data_support,w=p.List,C=p.OrderedSet,k=new RegExp("\r","g"),x=new RegExp("\n","g"),S=new RegExp("&nbsp;","g"),E=new RegExp("&#13;?","g"),R=new RegExp("&#8203;?","g"),T=["bold","bolder","500","600","700","800","900"],A=["light","lighter","100","200","300","400"],N={b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE"},_=(i(r={},m("public/DraftStyleDefault/depth0"),0),i(r,m("public/DraftStyleDefault/depth1"),1),i(r,m("public/DraftStyleDefault/depth2"),2),i(r,m("public/DraftStyleDefault/depth3"),3),i(r,m("public/DraftStyleDefault/depth4"),4),r),I=["className","href","rel","target","title"],M=["alt","className","height","src","width"],L=void 0,P={text:"",inlines:[],entities:[],blocks:[]},B={children:w(),depth:0,key:"",type:""},z=function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null},D=function(e,t,n){var r=n.filter((function(t){return t.element===e||t.wrapper===e||t.aliasedElements&&t.aliasedElements.some((function(t){return t===e}))})).keySeq().toSet().toArray().sort();switch(r.length){case 0:return"unstyled";case 1:return r[0];default:return function(e,t,n){for(var r=0;r<n.length;r++){var o=n[r](e,t);if(o)return o}return null}(e,t,[z])||"unstyled"}},F=function(e,t,n){var r=e.text.slice(-1),o=t.text.slice(0,1);if("\r"!==r||"\r"!==o||n||(e.text=e.text.slice(0,-1),e.inlines.pop(),e.entities.pop(),e.blocks.pop()),"\r"===r){if(" "===t.text||"\n"===t.text)return e;" "!==o&&"\n"!==o||(t.text=t.text.slice(1),t.inlines.shift(),t.entities.shift())}return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},U=function(e){e instanceof HTMLAnchorElement||y(!1);var t=e.protocol;return"http:"===t||"https:"===t||"mailto:"===t},V=function(e){var t=new Array(1);return e&&(t[0]=e),o({},P,{text:" ",inlines:[C()],entities:t})},q=function(){return o({},P,{text:"\n",inlines:[C()],entities:new Array(1)})},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o({},B,e)},K=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{text:"\r",inlines:[C()],entities:new Array(1),blocks:[H({parent:n,key:v(),type:e,depth:Math.max(0,Math.min(4,t))})]}},Q=function e(t,n,r,a,i,c,s,l,u,f){var p=L,h=n.nodeName.toLowerCase(),m=t,v="unstyled",g=!1,y=i&&D(i,a,l),O=o({},P),w=void 0;if("#text"===h){var C=n.textContent,k=C.trim();if(a&&""===k&&n.parentElement){var S=n.parentElement.nodeName.toLowerCase();if("ol"===S||"ul"===S)return{chunk:o({},P),entityMap:t}}return""===k&&"pre"!==i?{chunk:V(u),entityMap:t}:("pre"!==i&&(C=C.replace(x," ")),L=h,{chunk:{text:C,inlines:Array(C.length).fill(r),entities:Array(C.length).fill(u),blocks:[]},entityMap:t})}if(L=h,"br"===h)return"br"!==p||i&&"unstyled"!==y?{chunk:q(),entityMap:t}:{chunk:K("unstyled",s,f),entityMap:t};if("img"===h&&n instanceof HTMLImageElement&&n.attributes.getNamedItem("src")&&n.attributes.getNamedItem("src").value){var E=n,R={};M.forEach((function(e){var t=E.getAttribute(e);t&&(R[e]=t)})),n.textContent="📷",u=d.__create("IMAGE","MUTABLE",R||{})}r=function(e,t,n){var r=N[e];if(r)n=n.add(r).toOrderedSet();else if(t instanceof HTMLElement){var o=t;n=n.withMutations((function(e){var t=o.style.fontWeight,n=o.style.fontStyle,r=o.style.textDecoration;T.indexOf(t)>=0?e.add("BOLD"):A.indexOf(t)>=0&&e.remove("BOLD"),"italic"===n?e.add("ITALIC"):"normal"===n&&e.remove("ITALIC"),"underline"===r&&e.add("UNDERLINE"),"line-through"===r&&e.add("STRIKETHROUGH"),"none"===r&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})).toOrderedSet()}return n}(h,n,r),"ul"!==h&&"ol"!==h||(a&&(s+=1),a=h),!j&&"li"===h&&n instanceof HTMLElement&&(s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(_).some((function(n){e.classList.contains(n)&&(t=_[n])})),t}(n,s));var B=D(h,a,l),z=a&&"li"===i&&"li"===h,H=(!i||j)&&-1!==c.indexOf(h);(z||H)&&(w=(O=K(B,s,f)).blocks[0].key,i=h,g=!j),z&&(v="ul"===a?"unordered-list-item":"ordered-list-item");var Q=n.firstChild;null!=Q&&(h=Q.nodeName.toLowerCase());for(var W=null;Q;){Q instanceof HTMLAnchorElement&&Q.href&&U(Q)?function(){var e=Q,t={};I.forEach((function(n){var r=e.getAttribute(n);r&&(t[n]=r)})),t.url=new b(e.href).toString(),W=d.__create("LINK","MUTABLE",t||{})}():W=void 0;var G=e(m,Q,r,a,i,c,s,l,W||u,j?w:null),Y=G.chunk;m=G.entityMap,O=F(O,Y,j);var Z=Q.nextSibling;!f&&Z&&c.indexOf(h)>=0&&i&&(O=F(O,q())),Z&&(h=Z.nodeName.toLowerCase()),Q=Z}return g&&(O=F(O,K(v,s,f))),{chunk:O,entityMap:m}},W=function(e,t,n,r){e=e.trim().replace(k,"").replace(S," ").replace(E,"").replace(R,"");var a=function(e){var t=e.get("unstyled").element,n=h([]);return e.forEach((function(e){e.aliasedElements&&e.aliasedElements.forEach((function(e){n=n.add(e)})),n=n.add(e.element)})),n.filter((function(e){return e&&e!==t})).toArray().sort()}(n),i=t(e);if(!i)return null;L=null;var c=function(e,t){return t.some((function(t){return-1!==e.indexOf("<"+t)}))}(e,a)?a:["div"],s=Q(r,i,C(),"ul",null,c,-1,n),l=s.chunk,u=s.entityMap;return 0===l.text.indexOf("\r")&&(l={text:l.text.slice(1),inlines:l.inlines.slice(1),entities:l.entities.slice(1),blocks:l.blocks}),"\r"===l.text.slice(-1)&&(l.text=l.text.slice(0,-1),l.inlines=l.inlines.slice(0,-1),l.entities=l.entities.slice(0,-1),l.blocks.pop()),0===l.blocks.length&&l.blocks.push(o({},P,{type:"unstyled",depth:0})),l.text.split("\r").length===l.blocks.length+1&&l.blocks.unshift({type:"unstyled",depth:0}),{chunk:l,entityMap:u}},G=function(e){if(!e||!e.text||!Array.isArray(e.blocks))return null;var t=0,n=e.blocks,r=e.inlines,o=e.entities,a=j?l:s;return e.text.split("\r").reduce((function(e,i,s){i=O(i);var u=n[s],d=t+i.length,f=r.slice(t,d),p=o.slice(t,d),h=w(f.map((function(e,t){var n={style:e,entity:null};return p[t]&&(n.entity=p[t]),c.create(n)})));t=d+1;var b=u.depth,m=u.type,g=u.parent,y=u.key||v(),j=null;if(g){var C=e.cacheRef[g],k=e.contentBlocks[C];if(k.getChildKeys().isEmpty()&&k.getText()){var x=k.getCharacterList(),S=k.getText();j=v();var E=new l({key:j,text:S,characterList:x,parent:g,nextSibling:y});e.contentBlocks.push(E),k=k.withMutations((function(e){e.set("characterList",w()).set("text","").set("children",k.children.push(E.getKey()))}))}e.contentBlocks[C]=k.set("children",k.children.push(y))}var R=new a({key:y,parent:g,type:m,depth:b,text:i,characterList:h,prevSibling:j||(0===s||n[s-1].parent!==g?null:n[s-1].key),nextSibling:s===n.length-1||n[s+1].parent!==g?null:n[s+1].key});return e.contentBlocks.push(R),e.cacheRef[R.key]=s,e}),{cacheRef:{},contentBlocks:[]}).contentBlocks};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=W(e,t,n,d);if(null==r)return null;var o=r.chunk,a=r.entityMap,i=G(o);return{contentBlocks:i,entityMap:a}}},function(e,t,n){"use strict";var r=n(855),o=n(839),a=r.isBrowser("IE <= 9");e.exports=function(e){var t,n=null;return!a&&document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement||o(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}},function(e,t,n){"use strict";var r=n(846),o=n(840),a=(n(874),n(1255)),i=n(852),c={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some((function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()}))},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t){switch(t){case"bold":return c.toggleInlineStyle(e,"BOLD");case"italic":return c.toggleInlineStyle(e,"ITALIC");case"underline":return c.toggleInlineStyle(e,"UNDERLINE");case"code":return c.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return c.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return c.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=r.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=o.push(e,t,"insert-characters");return o.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),a=n.getBlockBefore(r);if(a&&"atomic"===a.getType()){var i=n.getBlockMap().delete(a.getKey()),s=n.merge({blockMap:i,selectionAfter:t});if(s!==n)return o.push(e,s,"remove-range")}var l=c.tryToRemoveBlockStyle(e);return l?o.push(e,l,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),a=t.getStartKey(),i=n.getBlockForKey(a).getLength();if(t.getStartOffset()<i)return null;var c=n.getBlockAfter(a);if(!c||"atomic"!==c.getType())return null;var s=t.merge({focusKey:c.getKey(),focusOffset:c.getLength()}),l=r.removeRange(n,s,"forward");return l!==n?o.push(e,l,"remove-range"):null},onTab:function(e,t,n){var r=t.getSelection(),i=r.getAnchorKey();if(i!==r.getFocusKey())return t;var c=t.getCurrentContent(),s=c.getBlockForKey(i),l=s.getType();if("unordered-list-item"!==l&&"ordered-list-item"!==l)return t;e.preventDefault();var u=c.getBlockBefore(i);if(!u)return t;var d=u.getType();if("unordered-list-item"!==d&&"ordered-list-item"!==d)return t;var f=s.getDepth();if(!e.shiftKey&&f===n)return t;n=Math.min(u.getDepth()+1,n);var p=a(c,r,e.shiftKey?-1:1,n);return o.push(t,p,"adjust-depth")},toggleBlockType:function(e,t){var n=e.getSelection(),a=n.getStartKey(),c=n.getEndKey(),s=e.getCurrentContent(),l=n;if(a!==c&&0===n.getEndOffset()){var u=i(s.getBlockBefore(c));c=u.getKey(),l=l.merge({anchorKey:a,anchorOffset:n.getStartOffset(),focusKey:c,focusOffset:u.getLength(),isBackward:!1})}if(s.getBlockMap().skipWhile((function(e,t){return t!==a})).reverse().skipWhile((function(e,t){return t!==c})).some((function(e){return"atomic"===e.getType()})))return e;var d=s.getBlockForKey(a).getType()===t?"unstyled":t;return o.push(e,r.setBlockType(s,l,d),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?c.toggleBlockType(e,"code-block"):c.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(e,t){var n=e.getSelection(),a=e.getCurrentInlineStyle();if(n.isCollapsed())return o.setInlineStyleOverride(e,a.has(t)?a.remove(t):a.add(t));var i,c=e.getCurrentContent();return i=a.has(t)?r.removeInlineStyle(c,n,t):r.applyInlineStyle(c,n,t),o.push(e,i,"change-inline-style")},toggleLink:function(e,t,n){var a=r.applyEntity(e.getCurrentContent(),t,n);return o.push(e,a,"apply-entity")},tryToRemoveBlockStyle:function(e){var t=e.getSelection(),n=t.getAnchorOffset();if(t.isCollapsed()&&0===n){var o=t.getAnchorKey(),a=e.getCurrentContent(),i=a.getBlockForKey(o),c=a.getFirstBlock();if(i.getLength()>0&&i!==c)return null;var s=i.getType(),l=a.getBlockBefore(o);if("code-block"===s&&l&&"code-block"===l.getType()&&0!==l.getLength())return null;if("unstyled"!==s)return r.setBlockType(a,t,"unstyled")}return null}};e.exports=c},function(e,t,n){"use strict";var r=n(973),o=n(967),a=n(855),i=a.isPlatform("Mac OS X"),c=a.isPlatform("Windows"),s=i&&a.isBrowser("Firefox < 29"),l=r.hasCommandModifier,u=r.isCtrlKeyCommand;function d(e){return i&&e.altKey||u(e)}e.exports=function(e){switch(e.keyCode){case 66:return l(e)?"bold":null;case 68:return u(e)?"delete":null;case 72:return u(e)?"backspace":null;case 73:return l(e)?"italic":null;case 74:return l(e)?"code":null;case 75:return!c&&u(e)?"secondary-cut":null;case 77:case 79:return u(e)?"split-block":null;case 84:return i&&u(e)?"transpose-characters":null;case 85:return l(e)?"underline":null;case 87:return i&&u(e)?"backspace-word":null;case 89:return u(e)?c?"redo":"secondary-paste":null;case 90:return function(e){return l(e)?e.shiftKey?"redo":"undo":null}(e)||null;case o.RETURN:return"split-block";case o.DELETE:return function(e){return c&&e.shiftKey?null:d(e)?"delete-word":"delete"}(e);case o.BACKSPACE:return function(e){return l(e)&&i?"backspace-to-start-of-line":d(e)?"backspace-word":"backspace"}(e);case o.LEFT:return s&&l(e)?"move-selection-to-start-of-block":null;case o.RIGHT:return s&&l(e)?"move-selection-to-end-of-block":null;default:return null}}},function(e,t,n){"use strict";var r={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};e.exports=r},,function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";return e.length>t?e.slice(0,t)+n:e}function o(e,t){for(var n,r=0,o="",a=e.length,i=0;i<a&&((n=e[i]).charCodeAt(0)<128?r+=1:r+=2,o+=n,!(r>=t-1));i+=1);return o}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return c}));var a=null;function i(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"undefined"==typeof document?t=o(n=e.replace(/<.+?>/g,""),r):((a=a||document.createElement("div")).textContent=e,t=o(n=a.textContent.replace(/<.+?>/g,""),r));var s=!1;return t!==n&&(s=!0,t=t.slice(0,t.length-i.length),t+=i),c?{output:t,truncated:s}:t}function c(e){return/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g.test(e)}},function(e,t,n){"use strict";var r=n(43),o=n(1),a=n(37),i=n.n(a);t.a=function(e){var t=Object(o.useState)((function(){return i.a.get(e)})),n=Object(r.a)(t,2),a=n[0],c=n[1];return[a,Object(o.useCallback)((function(t){i.a.set(e,t),c(t)}),[e])]}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),i=n(1157);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(){var e,n,r;c(this,t);for(var o=arguments.length,a=Array(o),l=0;l<o;l++)a[l]=arguments[l];return n=r=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={inView:!1},r.node=null,r.handleNode=function(e){r.node&&(0,i.unobserve)(r.node),r.node=e,r.observeNode(),r.props.innerRef&&r.props.innerRef(e)},r.handleChange=function(e){r.setState({inView:e}),r.props.onChange&&r.props.onChange(e)},s(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidUpdate",value:function(e,t){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold||((0,i.unobserve)(this.node),this.observeNode()),t.inView!==this.state.inView&&this.state.inView&&this.props.triggerOnce&&((0,i.unobserve)(this.node),this.node=null)}},{key:"componentWillUnmount",value:function(){this.node&&((0,i.unobserve)(this.node),this.node=null)}},{key:"observeNode",value:function(){if(this.node){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,o=e.rootId;(0,i.observe)(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r},o)}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.render,o=e.tag,i=(e.innerRef,e.triggerOnce,e.threshold,e.root,e.rootId,e.rootMargin,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","render","tag","innerRef","triggerOnce","threshold","root","rootId","rootMargin"])),c=this.state.inView;return a.createElement(o,r({},i,{ref:this.handleNode}),"function"==typeof n?n(c):null,"function"==typeof t?t(c):t)}}]),t}(a.Component);l.defaultProps={tag:"div",threshold:0,triggerOnce:!1},t.default=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return $}));var r=n(74),o=n.n(r),a=n(55),i=n.n(a),c=n(33),s=n.n(c),l=n(41),u=n.n(l),d=n(1),f=n.n(d),p=n(3),h=n.n(p),b=n(132),m=n(233),v=n.n(m);var g=function(e){return e.length?function(t,n){var r=this;return e.reverse().reduce((function(e,t){return t.call(r,e,n)}),t)}:v.a},y=n(237),O=n(11),j=n.n(O),w=n(1085),C=n.n(w),k=n(881),x=/<p><br><\/p>/g,S=function(e){return e?e.replace(x,'<p class="ztext-empty-paragraph"><br /></p>'):e},E=n(856),R=n(1020),T=n(886),A=n(7),N=n(882),_=n(931),I=n(5),M=function(e){var t=e.className,n=e.html;return n?Object(I.g)("span",{className:"LinkCard-richText ".concat(t),dangerouslySetInnerHTML:{__html:"<object>".concat(n,"</object>")}}):null},L={title:function(e,t){var n=e.title,r=e.content,o="5"===t||"6"===t||!r;return Object(I.g)(_.c,{key:"title",twoLine:o},n)},excerpt:function(e){var t=e.content;return Object(I.g)(M,{key:"excerpt",className:"LinkCard-excerpt",html:t})},desc:function(e){var t=e.desc;return Object(I.g)(M,{key:"desc",className:"LinkCard-desc",html:t})},url:function(e){var t=e.content,n=e.desc,r=e.url;return!t&&!n&&Object(I.g)(_.b,{key:"url",url:r})}},P={1:["title","excerpt","desc","url"],5:["title"],6:["title","desc","url"],7:["title","excerpt","url"]},B=function(e){var t=e.data,n=e.newLinkCardAb,r=t.image,o=t.ratio,a=t.isVideo,i=P[n]||P[1];return Object(I.g)(f.a.Fragment,null,Object(I.g)("span",{className:"LinkCard-contents"},i.map((function(e){return L[e](t,n)}))),Object(I.g)(_.a,{url:r,ratio:o,isVideo:a}))},z=(n(932),{ANSWER:"Answer",ARTICLE:"Column",ZVIDEO:"Zvideo",QUESTION:"Question",COLLECTION:"Collection",ROUNDTABLE:"Roundtable",SPECIAL:"Special",TOPIC:"Topic"}),D=function(e){if(Object(N.b)(e.url))return Object(I.g)(N.a,s()({},e,{className:j()("old",e.className)}));var t=Object(d.useMemo)((function(){return function(e){var t={};if(e.data){var n=Object(A.camelizeKeys)(JSON.parse(e.data)),r=n.source,o=void 0===r?{}:r,a=n.display,i=void 0===a?{}:a,c=n.zaData,s=void 0===c?{}:c,l=i.cardOpenUrl,u=i.title,d=i.content,f=i.desc,p=i.image||{};t={source:o,url:l,title:u,content:d,desc:f,image:p.imageUrl,ratio:p.ratio,isVideo:p.isVideo,zaAttachInfo:s.attachInfo}}return Object.assign({},t,{},e,{title:e.text||t.title,image:t.image||e.image})}(e)}),[e]),n=t.source,r=t.target,o=t.title,a=t.url,i=t.zaAttachInfo;return Object(I.g)(T.a,{notCommerce:!0,target:r,text:o,url:a,"data-za-attach-info":i,"data-za-content-type":z[null==n?void 0:n.contentType]||"Unknown",className:"static"},Object(I.g)(B,{data:t,newLinkCardAb:e.newLinkCardAb}))},F=n(851),U=/<a\b([^>]*data-draft-type="link-card"[^>]*)>(.*?)<\/a>/g,V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.newLinkCardAb,r=t.linkCardInfo;return e?e.replace(U,(function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=Object(F.e)(t,{decodeValue:!0}),i=a.target,c=void 0===i?"_blank":i,l=a.href,u=void 0===l?"":l,d=a["data-image"],f=a["data-image-width"],p=a["data-image-height"],h=a["data-entity-type"],b=a["data-entity-data"],m=a["data-size"],v=o.replace(/<[^>]*>/g,"");v=Object(F.b)(v),u.match(/https:\/\/www.zhihu.com\/zvideo\/(\d+)$/)&&!v&&(v="知乎视频");var g=Number(n)>0,y=g?r?D:T.a:R.a;return Object(E.renderToStaticMarkup)(Object(I.g)(y,s()({text:v,url:u,target:c,image:d,imageWidth:f,imageHeight:p,entityType:h,entityData:Object(F.f)(b),size:m},g&&{newLinkCardAb:n},r&&{data:r[u]})))})):e},q=n(1018),H=/<a\b([^>]*data-draft-type="file-link-card"[^>]*)>(.*?)<\/a>/g,K=function(e){return e?e.replace(H,(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=Object(F.e)(t,{decodeValue:!0}),o=r.href,a=void 0===o?"":o,i=r["data-file-type"],c=r["data-file-extension"],s=r["data-file-size"],l=r["data-file-source"],u=Object(F.b)(n);return Object(E.renderToStaticMarkup)(Object(I.g)(q.a,{href:a,name:u,type:i,extension:c,size:s,source:l}))})):e},Q=n(888),W=(n(1002),n(578),[S]),G=Object(d.forwardRef)((function(e,t){var n,r=e.as,o=e.tag,a=e.className,i=e.html,c=e.clearBoth,l=void 0!==c&&c,d=e.richContentKey,p=e.root,h=e.Portal,b=e.useHooks,m=u()(e,["as","tag","className","html","clearBoth","richContentKey","root","Portal","useHooks"]),v=C()(W);b(p);var g=null!==(n=null!=r?r:o)&&void 0!==n?n:"div";return Object(I.g)(f.a.Fragment,null,h&&Object(I.g)(h,{root:p}),Object(I.g)(g,s()({key:d||i,ref:t,className:j()("RichText","ztext",a,{"RichText--clearBoth":l}),dangerouslySetInnerHTML:{__html:v(i)}},m)))}));G.propTypes={as:h.a.string,tag:h.a.string,html:h.a.string.isRequired,clearBoth:h.a.bool,ref:h.a.func,Portal:h.a.func,useHooks:h.a.func},G.defaultProps={useHooks:v.a};var Y=f.a.memo(G),Z=n(1016),X=n(934),J=function(e){var t=e.onRef,n=e.htmlProcessors,r=e.newLinkCardAb,a=e.linkCardInfo,c=e.shouldUseArticleCard,l=e.articleLinkCardProps,p=e.zvideoLinkCardProps,h=e.adLinkCardProps,m=e.mcnLinkCardProps,v=e.mkSkuLinkCardProps,O=e.html,j=e.sourceId,w=e.shouldShowCatalog,C=e.shouldFoldCatalog,x=e.referenceLinkProps,S=e.lazyLoadImageProps,E=u()(e,["onRef","htmlProcessors","newLinkCardAb","linkCardInfo","shouldUseArticleCard","articleLinkCardProps","zvideoLinkCardProps","adLinkCardProps","mcnLinkCardProps","mkSkuLinkCardProps","html","sourceId","shouldShowCatalog","shouldFoldCatalog","referenceLinkProps","lazyLoadImageProps"]),R=h||{},T=R.parentType,A=R.parentId,N=Object(d.useState)(null),_=i()(N,2),M=_[0],L=_[1],P=Object(b.f)();Object(Z.b)(M),Object(Z.e)(M,x),Object(Z.a)(M),Object(Z.f)(M),Object(Z.g)(M,p,a),Object(Z.c)(M,S);var B=Number(r)>0,z=g([].concat(o()(n),[Object(Q.a)(),V,K,k.a])),D=B?!a&&Object(I.g)(X.f,{zvideoLinkCardProps:p,root:M,newLinkCardAb:r}):Object(I.g)(f.a.Fragment,null,c&&Object(I.g)(X.b,s()({},l,{root:M})),Object(I.g)(X.h,s()({},p,{root:M})));return Object(I.g)(f.a.Fragment,null,w&&C&&Object(I.g)(X.c,{root:M}),D,Object(Z.d)({root:M,mcnLinkCardProps:m,contentType:T,token:A}),Object(I.g)(X.a,s()({},h,{root:M})),Object(I.g)(X.e,s()({},v,{root:M})),Object(I.g)(X.g,{root:M}),Object(I.g)(Y,s()({ref:Object(d.useCallback)(Object(y.a)(L,t),[]),html:z(O,{sourceId:j,theme:P,shouldShowCatalog:w,shouldFoldCatalog:C,newLinkCardAb:r,linkCardInfo:a})},E)))};J.propTypes={html:h.a.string.isRequired,onRef:h.a.oneOfType([h.a.func,h.a.object]),htmlProcessors:h.a.array,newLinkCardAb:h.a.string,linkCardInfo:h.a.object},J.defaultProps={shouldUseArticleCard:!1,htmlProcessors:[]};var $=f.a.memo(J)},function(e,t,n){"use strict";n.d(t,"a",(function(){return ee}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(41),h=n.n(p),b=n(1),m=n.n(b),v=n(3),g=n.n(v),y=n(11),O=n.n(y),j=n(152),w=n(232),C=n(254),k=n(242),x=n(163),S=n(213),E=n(73),R=n(804),T=n(5);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var N=function(e){s()(n,e);var t=A(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleVideoPosterChange=function(){e.props.onVideoPosterChange(e.input.files[0])},e}return i()(n,[{key:"render",value:function(){var e=this;return Object(T.g)("form",null,Object(T.g)("div",{className:"VideoCoverFileInput"},Object(T.g)("div",{className:"VideoCoverFile-uploader"},Object(T.g)("div",{className:"VideoCoverFile-uploader-icon"},Object(T.g)(R.a,{size:70})),Object(T.g)("div",{className:"VideoCoverFile-uploader-text"},"选择要上传的图片"),Object(T.g)("div",{className:"VideoCoverFile-uploader-tip"},"支持 jpgpng 格式,建议分辨率 1280*720"),Object(T.g)("input",{type:"file",className:"VideoCoverFileInput-input",accept:"image/png,image/jpeg",ref:function(t){e.input=t},onChange:this.handleVideoPosterChange,onClick:function(){return e.input.value=null}}))))}}]),n}(m.a.Component);N.propTypes={onVideoPosterChange:g.a.func.isRequired},N.defaultProps={onVideoPosterChange:function(){}};var _=n(921),I=n(1074),M=n.n(I),L=n(1029),P=n(31);function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var z=function(e){s()(n,e);var t=B(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={range:1,image:e.props.image},e.handleSave=function(){var t=e.editorEl.getImage(),n=e.props.image;t&&t.toBlob(e.handleUploadBlob,n.type)},e.handleUploadBlob=function(t){e.props.onUploadImage(t,"avatar")},e.handleResetUpload=function(){e.setState({range:1,image:""}),e.props.onResetUpload()},e}return i()(n,[{key:"render",value:function(){var e=this,t=this.props.image,n=this.state.range;return Object(T.g)("div",{className:"VideoCoverCrop"},Object(T.g)(M.a,{ref:function(t){e.editorEl=t},image:t,width:340,height:208,border:[0,20],color:[246,246,246,.9],scale:parseFloat(n)}),Object(T.g)(L.a,{className:"VideoCoverCrop-range",value:n,onChange:function(t){return e.setState({range:t.target.value})}}),Object(T.g)("div",{className:"VideoCoverCrop-uplaodImgFooter"},Object(T.g)(P.c,{preset:"primary",onClick:this.handleResetUpload},"重新上传"),Object(T.g)(P.c,{color:"blue",preset:"primary",onClick:this.handleSave},"保存")))}}]),n}(m.a.Component);z.propTypes={image:g.a.oneOfType([g.a.string,g.a.object]).isRequired,onResetUpload:g.a.func.isRequired,onUploadImage:g.a.func.isRequired};var D={name:"12qah06",styles:"display:block;width:100%;height:100%;object-fit:cover;"},F={name:"1rwvvfg",styles:"width:100%;display:flex;flex-direction:row;margin-top:30px;& button{flex:1;}"},U={name:"8mg22s",styles:"margin-right:20px;"};function V(e){var t=e.image,n=e.file,r=e.onResetUpload,o=e.onUploadImage;return Object(T.g)("div",null,Object(T.g)("img",{src:t,css:D}),Object(T.g)("div",{css:F},Object(T.g)(P.c,{preset:"primary",onClick:r,css:U},"重新上传"),Object(T.g)(P.c,{color:"blue",preset:"primary",onClick:function(){return o(n)}},"保存")))}var q=n(30);function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var K=function(e){s()(n,e);var t=H(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleSelect=function(t){t.preventDefault();var n=e.props.setTab;q.a.trackEvent(t.target,{id:2181}),n(1)},e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.curTabId,n=e.setTab;return Object(T.g)("ul",{className:"VideoCoverEditor-tabs"},Object(T.g)("li",{className:O()("VideoCoverEditor-tabItem",{active:0===t}),onClick:function(){return n(0)}},"上传封面"),Object(T.g)("li",{className:O()("VideoCoverEditor-tabItem",{active:1===t}),onClick:this.handleSelect},"选择封面"))}}]),n}(m.a.Component);function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}K.propTypes={curTabId:g.a.number.isRequired,setTab:g.a.func.isRequired};var W=function(e){s()(n,e);var t=Q(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){return Object(T.g)("div",{className:"VideoCoverPickerPending"},Object(T.g)("p",null,"视频处理中..."),Object(T.g)("p",null,"暂无系统封面,请使用上传封面"),Object(T.g)(P.c,{className:"VideoCoverPickerPending-nowUpdate",color:"blue",preset:"primary",onClick:this.props.backTab},"现在上传"))}}]),n}(m.a.Component);W.propTypes={backTab:g.a.func.isRequired};var G=n(1117),Y=n(1100),Z=n(375);function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var J=function(e){s()(n,e);var t=X(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={curPicIndex:0,thumbs:[]},e.handleCoverClick=function(t){e.setState({curPicIndex:t})},e.handleSubmit=function(t){t.preventDefault();var n=e.state.curPicIndex,r=e.props,o=r.items,a=r.onUploadPoster;q.a.trackEvent(t.target,{id:2234});var i=!o.length;a(e.list.children[n].children[0].src,i)},e}return i()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.video;Object(G.h)(t).then((function(t){e.setState({thumbs:t})}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.curPicIndex,r=t.thumbs;return Object(T.g)("div",{className:"VideoCoverPicker-coverSelect"},0===r.length?Object(T.g)("div",{className:"VideoCoverPicker-coverList VideoCoverPicker-empty"},Array.from(Array(9)).map((function(e,t){return Object(T.g)("div",{className:"VideoCoverPicker-coverItem",key:t})})),Object(T.g)(Z.a,null)):Object(T.g)("div",{className:"VideoCoverPicker-coverList",ref:function(t){return e.list=t}},r.slice(0,9).map((function(t,r){return Object(T.g)("div",{className:O()("VideoCoverPicker-coverItem",{actived:n===r}),onClick:function(){return e.handleCoverClick(r)},key:r},Object(T.g)("img",{src:t.url}),Object(T.g)(Y.a,{shown:n!==r}))}))),Object(T.g)(P.c,{onClick:this.handleSubmit,className:"VideoCoverPicker-coverSelectBtn",color:"blue",preset:"primary"},"确定"))}}]),n}(m.a.Component);function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}J.propTypes={items:g.a.array.isRequired,onUploadPoster:g.a.func.isRequired};var ee=function(e){s()(n,e);var t=$(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={editorShown:!1,cropShown:!1,file:null,dataUrl:"",curTabId:0,errorMsg:""},e.renderTitle=function(){var t=e.state.curTabId;return Object(T.g)(K,{curTabId:t,setTab:e.setTab})},e.setTab=function(t){e.setState({curTabId:t})},e.showEditor=function(){e.setState({editorShown:!0})},e.hideEditor=function(){e.setState({editorShown:!1})},e.handleVideoPosterChange=function(t){if(t.size>10485760)return e.setState({errorMsg:"请上传不超过 10M 的图片"},(function(){e.resetErrorMsg()})),void e.resetUpload();Object(k.a)(t).then((function(n){var r=window.URL.createObjectURL(n),o=new Image;o.onload=function(){o.width<640||o.height<360?(e.setState({errorMsg:"请上传宽度不小于 640px高度不小于 360px 的图片"},(function(){e.resetErrorMsg()})),e.resetUpload()):e.setState({cropShown:!0,file:t,dataUrl:r})},o.src=r}))},e.resetUpload=function(){e.setState({cropShown:!1})},e.resetErrorMsg=function(){setTimeout((function(){e.setState({errorMsg:""})}),2400)},e.uploadImage=function(t){return Object(C.a)(t).then((function(t){var n=t.src;e.uploadVideoPoster(n)})).catch((function(){e.setState({errorMsg:"上传封面图片失败"},(function(){e.resetErrorMsg()}))}))},e.uploadVideoPoster=function(t,n){if(n)return Object(j.loadImage)(t).then((function(t){var n=document.createElement("canvas"),r=n.getContext("2d");n.width=t.width,n.height=t.height,r.drawImage(t,0,0,t.width,t.height),n.toBlob(e.uploadImage,"image/jpeg")}));t=Object(j.imgUrl)(t,""),(0,e.props.onVideoPosterChange)(t),e.resetUpload(),e.hideEditor()},e.handleUploadImage=function(){var t;e.load("https://lens.zhihu.com/report?msg=upload_cover",{catch:function(){return null}}),(t=e).uploadImage.apply(t,arguments).then((function(){e.shouldRetry=!1}))},e}return i()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.thumbnail,r=t.needUploadThumbnail,o=t.uploading,a=t.id,i=t.changedVideoPoster,c=t.instantUpload;r&&n&&this.uploadVideoPoster(n,!n.startsWith("http")),!1!==o||i||c||(this.shouldRetry=!0,this.cts=new x.a,this.token=this.cts.token,Object(x.b)((function(){return e.load("https://lens.zhihu.com/api/v4/videos/".concat(a,"/default_cover")).then((function(t){if(!t.algorithm_cover_url)return Promise.reject("has no smart cover");e.shouldRetry&&e.uploadVideoPoster(t.algorithm_cover_url,!1)}))}),{times:10,delay:3e3,shouldRetry:function(){return e.shouldRetry},cancellationToken:this.token}))}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.changedVideoPoster,n=e.needUploadThumbnail;t&&!n&&(this.shouldRetry=!1)}},{key:"componentWillUnmount",value:function(){this.cts&&this.cts.cancel();var e=this.state.dataUrl;e&&window.URL.revokeObjectURL(e)}},{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.errorMessage,o=h()(n,["errorMessage"]);return fetch(e,Object.assign({},o,{headers:Object.assign({},o.headers,{Accept:"application/json","X-Requested-With":"Fetch"}),credentials:"include"})).then((function(e){return e.json().catch((function(){return{}})).then((function(t){if(!e.ok)throw t;return t}))})).catch((function(){if(n.catch)return n.catch();t.setState({errorMsg:r||"上传封面失败"},(function(){t.resetErrorMsg()}))}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.editorShown,r=t.cropShown,o=t.file,a=t.dataUrl,i=t.curTabId,c=t.errorMsg,s=t.covers,l=void 0===s?[]:s,u=this.props,d=u.triggerClassName,f=u.coverButtonText,p=u.uploading,h=u.upload,b=u.originVideo,m=u.useCoverCrop,v=u.zvideoId,g=u.id,y=(null==h?void 0:h.file)||b,j="video/mp4"===(null==y?void 0:y.type),C=m?z:V;return Object(T.g)(_.a,null,Object(T.g)("div",{className:"VideoCoverEditor"},Object(T.g)(w.a,{className:O()(d,"Video-uploadPosterButton"),zaText:!0,zaType:"Button",zaBlock:"VideoUploadPoster",extra:{mediaInfo:{attachmentZvideoId:v,videoInfo:{videoId:g}}},onClick:this.showEditor},Object(T.g)("p",null,f)),n&&Object(T.g)(E.b,{className:"VideoCoverEditor-Modal",title:j&&this.renderTitle(),onClose:this.hideEditor},0===i&&(r?Object(T.g)(C,{file:o,image:a,onResetUpload:this.resetUpload,onUploadImage:this.handleUploadImage}):Object(T.g)(N,{onVideoPosterChange:this.handleVideoPosterChange})),1===i&&j&&(p?Object(T.g)(W,{backTab:function(){e.setState({curTabId:0})}}):Object(T.g)(J,{items:l,video:y,onUploadPoster:function(){e.load("https://lens.zhihu.com/report?msg=choose_cover",{catch:function(){return null}}),e.uploadVideoPoster.apply(e,arguments).then((function(){e.shouldRetry=!1}))}})))),Object(T.g)(S.a,{notification:{key:c,text:c,theme:"red"},delay:2400}))}}]),n}(b.Component);ee.propTypes={onVideoPosterChange:g.a.func.isRequired,coverButtonText:g.a.string,useCoverCrop:g.a.bool},ee.defaultProps={onVideoPosterChange:function(){},coverButtonText:"上传视频封面",useCoverCrop:!0}},function(e,t,n){"use strict";var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(1),h=n(5);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var m=function(e){s()(n,e);var t=b(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){return Object(h.g)("svg",{width:"30",height:"30",viewBox:"0 0 66 66",xmlns:"http://www.w3.org/2000/svg",className:"CircleLoadingBar","aria-hidden":"true"},Object(h.g)("g",null,Object(h.g)("circle",{className:"path",fill:"none",strokeWidth:"6",strokeLinecap:"round",cx:"33",cy:"33",r:"30"})))}}]),n}(p.Component);t.a=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(43),a=n(0),i=n(2),c=n(78),s=n(1),l=n(73),u=n(24),d=n(992),f=n(373),p={comment_img:"comment_img",dynamic_top:"dynamic_top",comment_sticker:"comment_sticker",block_keyword:"block_keyword"},h=(r={},Object(a.a)(r,p.comment_img,"https://pic1.zhimg.com/v2-1b6677f81c2df41f55332474e15bc5a8.png"),Object(a.a)(r,p.dynamic_top,"https://pic1.zhimg.com/v2-e16a265a43592abd5b98fceef02a1614.png"),Object(a.a)(r,p.comment_sticker,"https://pic1.zhimg.com/v2-183a98cd480d24cd3e3246ba7a26303b.png"),Object(a.a)(r,p.block_keyword,"https://pic3.zhimg.com/v2-0ad4e8aa43c3279cc7536f2fb7ac8348.png"),r);t.b=Object(d.a)((function(e){var t=e.show,n=e.setShow,r=e.type,a=e.isLogin,d=Object(s.useState)(""),p=Object(o.a)(d,2),b=p[0],m=p[1],v=Object(s.useState)(!1),g=Object(o.a)(v,2),y=g[0],O=g[1],j=Object(f.b)(),w=Object(c.c)((function(){t&&n(!1)})),C=Object(c.c)((function(){window.open(u.F,"_blank")}));return Object(s.useEffect)((function(){!b&&a&&(O(!0),j("/api/v4/unlimited/vip_rights/popup?token="+r).then((function(e){m(e.payload.button.text)})).catch((function(){})).then((function(){O(!1)})))}),[t]),Object(i.b)(l.b,{css:{".Modal-content":{padding:0,marginTop:0}},onClose:w,children:t&&!y&&Object(i.c)(i.a,{children:[Object(i.b)("img",{src:h[r],css:{height:"230px",width:"400px",display:"block"}}),Object(i.b)("div",{css:{padding:20},children:Object(i.b)("div",{css:function(e){return{padding:8,background:"linear-gradient(135deg, ".concat(e.colors.GYL06A," 0.2%, ").concat(e.colors.GYL08A," 100%)"),borderRadius:3,textAlign:"center",fontsize:14,color:e.colors.GYL12A,userSelect:"none","&:hover":{cursor:"pointer"}}},onClick:C,children:b||"开通会员立即解锁"})})]})})}))},function(e,t,n){var r=n(583),o=n(259),a=n(257),i=n(93),c=n(207),s=n(258),l=n(256),u=n(325),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(c(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||u(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stripHTML=t.truncateHTML=t.parseTag=t.parseTagGroup=t.parseAttrs=t.TAG_RE=t.TAG_RE_TEMPLATE=void 0;var r=n(1140);Object.defineProperty(t,"TAG_RE_TEMPLATE",{enumerable:!0,get:function(){return r.TAG_RE_TEMPLATE}}),Object.defineProperty(t,"TAG_RE",{enumerable:!0,get:function(){return r.TAG_RE}}),Object.defineProperty(t,"parseAttrs",{enumerable:!0,get:function(){return r.parseAttrs}}),Object.defineProperty(t,"parseTagGroup",{enumerable:!0,get:function(){return r.parseTagGroup}}),Object.defineProperty(t,"parseTag",{enumerable:!0,get:function(){return r.parseTag}}),Object.defineProperty(t,"truncateHTML",{enumerable:!0,get:function(){return r.truncateHTML}}),Object.defineProperty(t,"stripHTML",{enumerable:!0,get:function(){return r.stripHTML}})},function(e,t,n){var r=n(209),o=n(260),a=n(238),i=n(1021),c=n(1071),s=n(215),l=n(1072),u=n(244),d=n(93);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return d(e)?function(t){return o(t,1===e.length?e[0]:e)}:e})):[u];var f=-1;t=r(t,s(a));var p=i(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return c(p,(function(e,t){return l(e,t,n)}))}},function(e,t,n){var r=n(207);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,c=Object(n);(t?i--:++i<a)&&!1!==o(c[i],i,c););return n}}},function(e,t){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},function(e,t,n){var r=n(1073);e.exports=function(e,t,n){for(var o=-1,a=e.criteria,i=t.criteria,c=a.length,s=n.length;++o<c;){var l=r(a[o],i[o]);if(l)return o>=s?l:l*("desc"==n[o]?-1:1)}return e.index-t.index}},function(e,t,n){var r=n(248);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,a=e==e,i=r(e),c=void 0!==t,s=null===t,l=t==t,u=r(t);if(!s&&!u&&!i&&e>t||i&&c&&l&&!s&&!u||o&&c&&l||!n&&l||!a)return 1;if(!o&&!i&&!u&&e<t||u&&n&&a&&!o&&!i||s&&n&&a||!c&&a||!l)return-1}return 0}},function(e,t,n){e.exports=function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var a=function(e){var t="undefined"==typeof DOMParser?null:new DOMParser;return t?t.parseFromString(e,"text/html"):null},i=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if("text/html"===r.type){r.getAsString((function(e){var n=a(e).querySelector("img");n&&n.src&&t(n.src)}));break}}},c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&c.return&&c.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=!("undefined"==typeof window||"undefined"==typeof navigator||!("ontouchstart"in window||navigator.msMaxTouchPoints>0)),d="undefined"!=typeof File,f={touch:{react:{down:"onTouchStart",mouseDown:"onMouseDown",drag:"onTouchMove",drop:"onTouchEnd",move:"onTouchMove",mouseMove:"onMouseMove",up:"onTouchEnd",mouseUp:"onMouseUp"},native:{down:"touchstart",mouseDown:"mousedown",drag:"touchmove",drop:"touchend",move:"touchmove",mouseMove:"mousemove",up:"touchend",mouseUp:"mouseup"}},desktop:{react:{down:"onMouseDown",drag:"onDragOver",drop:"onDrop",move:"onMouseMove",up:"onMouseUp"},native:{down:"mousedown",drag:"dragStart",drop:"drop",move:"mousemove",up:"mouseup"}}},p=u?f.touch:f.desktop,h="undefined"!=typeof window&&window.devicePixelRatio?window.devicePixelRatio:1,b=function(e){function a(){var e,t,n;r(this,a);for(var c=arguments.length,l=Array(c),u=0;u<c;u++)l[u]=arguments[u];return t=n=o(this,(e=a.__proto__||Object.getPrototypeOf(a)).call.apply(e,[this].concat(l))),n.state={drag:!1,my:null,mx:null,image:{x:.5,y:.5}},n.handleMouseDown=function(e){(e=e||window.event).preventDefault(),n.setState({drag:!0,mx:null,my:null})},n.handleMouseUp=function(){n.state.drag&&(n.setState({drag:!1}),n.props.onMouseUp())},n.handleMouseMove=function(e){if(e=e||window.event,!1!==n.state.drag){var t=e.targetTouches?e.targetTouches[0].pageX:e.clientX,r=e.targetTouches?e.targetTouches[0].pageY:e.clientY,o={mx:t,my:r},a=n.props.rotate;if(a=(a%=360)<0?a+360:a,n.state.mx&&n.state.my){var i=n.state.mx-t,c=n.state.my-r,l=n.state.image.width*n.props.scale,u=n.state.image.height*n.props.scale,d=n.getCroppingRect(),f=d.x,p=d.y;f*=l,p*=u;var h=function(e){return e*(Math.PI/180)},b=Math.cos(h(a)),m=Math.sin(h(a)),v=p+-i*m+c*b,g={x:(f+i*b+c*m)/l+1/n.props.scale*n.getXScale()/2,y:v/u+1/n.props.scale*n.getYScale()/2};n.props.onPositionChange(g),o.image=s({},n.state.image,g)}n.setState(o),n.props.onMouseMove(e)}},n.handleDragOver=function(e){(e=e||window.event).preventDefault()},n.handleDrop=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;if(e.stopPropagation(),e.preventDefault(),e.dataTransfer){var t=e.dataTransfer,r=t.files,o=t.items;r&&r.length?(n.props.onDropFile(e),n.loadImageFile(r[0])):o&&o.length&&i(o,(function(e){return n.loadImage(e)}))}},n.setCanvas=function(e){n.canvas=e},o(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,t.Component),l(a,[{key:"isVertical",value:function(){return this.props.rotate%180!=0}},{key:"getBorders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.border;return Array.isArray(e)?e:[e,e]}},{key:"getDimensions",value:function(){var e=this.props,t=e.width,n=e.height,r=e.rotate,o=e.border,a={},i=this.getBorders(o),s=c(i,2),l=s[0],u=s[1],d=t,f=n;return this.isVertical()?(a.width=f,a.height=d):(a.width=d,a.height=f),a.width+=2*l,a.height+=2*u,{canvas:a,rotate:r,width:t,height:n,border:o}}},{key:"getImage",value:function(){var e=this.getCroppingRect(),t=this.state.image;e.x*=t.resource.width,e.y*=t.resource.height,e.width*=t.resource.width,e.height*=t.resource.height;var n=document.createElement("canvas");this.isVertical()?(n.width=e.height,n.height=e.width):(n.width=e.width,n.height=e.height);var r=n.getContext("2d");return r.translate(n.width/2,n.height/2),r.rotate(this.props.rotate*Math.PI/180),r.translate(-n.width/2,-n.height/2),this.isVertical()&&r.translate((n.width-n.height)/2,(n.height-n.width)/2),r.drawImage(t.resource,-e.x,-e.y),n}},{key:"getImageScaledToCanvas",value:function(){var e=this.getDimensions(),t=e.width,n=e.height,r=document.createElement("canvas");return this.isVertical()?(r.width=n,r.height=t):(r.width=t,r.height=n),this.paintImage(r.getContext("2d"),this.state.image,0,1),r}},{key:"getXScale",value:function(){var e=this.props.width/this.props.height,t=this.state.image.width/this.state.image.height;return Math.min(1,e/t)}},{key:"getYScale",value:function(){var e=this.props.height/this.props.width,t=this.state.image.height/this.state.image.width;return Math.min(1,e/t)}},{key:"getCroppingRect",value:function(){var e=this.props.position||{x:this.state.image.x,y:this.state.image.y},t=1/this.props.scale*this.getXScale(),n=1/this.props.scale*this.getYScale(),r={x:e.x-t/2,y:e.y-n/2,width:t,height:n},o=0,a=1-r.width,i=0,c=1-r.height;return(t>1||n>1)&&(o=-r.width,a=1,i=-r.height,c=1),s({},r,{x:Math.max(o,Math.min(r.x,a)),y:Math.max(i,Math.min(r.y,c))})}},{key:"isDataURL",value:function(e){return null!==e&&!!e.match(/^\s*data:([a-z]+\/[a-z]+(;[a-z-]+=[a-z-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=\-._~:@/?%\s]*\s*$/i)}},{key:"loadImage",value:function(e){d&&e instanceof File?this.loadImageFile(e):"string"==typeof e&&this.loadImageURL(e)}},{key:"loadImageURL",value:function(e){var t=new Image;t.onload=this.handleImageReady.bind(this,t),t.onerror=this.props.onLoadFailure,!this.isDataURL(e)&&this.props.crossOrigin&&(t.crossOrigin=this.props.crossOrigin),t.src=e}},{key:"loadImageFile",value:function(e){var t=this,n=new FileReader;n.onload=function(e){return t.loadImageURL(e.target.result)},n.readAsDataURL(e)}},{key:"componentDidMount",value:function(){var e=n.findDOMNode(this.canvas).getContext("2d");if(this.props.image&&this.loadImage(this.props.image),this.paint(e),document){var t=p.native;document.addEventListener(t.move,this.handleMouseMove,!1),document.addEventListener(t.up,this.handleMouseUp,!1),u&&(document.addEventListener(t.mouseMove,this.handleMouseMove,!1),document.addEventListener(t.mouseUp,this.handleMouseUp,!1))}}},{key:"componentWillUnmount",value:function(){if(document){var e=p.native;document.removeEventListener(e.move,this.handleMouseMove,!1),document.removeEventListener(e.up,this.handleMouseUp,!1),u&&(document.removeEventListener(e.mouseMove,this.handleMouseMove,!1),document.removeEventListener(e.mouseUp,this.handleMouseUp,!1))}}},{key:"componentDidUpdate",value:function(e,t){var r=n.findDOMNode(this.canvas),o=r.getContext("2d");o.clearRect(0,0,r.width,r.height),this.paint(o),this.paintImage(o,this.state.image,this.props.border),e.image===this.props.image&&e.width===this.props.width&&e.height===this.props.height&&e.position===this.props.position&&e.scale===this.props.scale&&e.rotate===this.props.rotate&&t.my===this.state.my&&t.mx===this.state.mx&&t.image.x===this.state.image.x&&t.image.y===this.state.image.y||this.props.onImageChange()}},{key:"handleImageReady",value:function(e){var t=this.getInitialSize(e.width,e.height);t.resource=e,t.x=.5,t.y=.5,this.setState({drag:!1,image:t},this.props.onImageReady),this.props.onLoadSuccess(t)}},{key:"getInitialSize",value:function(e,t){var n=void 0,r=void 0,o=this.getDimensions();return o.height/o.width>t/e?r=e*((n=this.getDimensions().height)/t):n=t*((r=this.getDimensions().width)/e),{height:n,width:r}}},{key:"componentWillReceiveProps",value:function(e){(e.image&&this.props.image!==e.image||this.props.width!==e.width||this.props.height!==e.height)&&this.loadImage(e.image)}},{key:"paintImage",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h;if(t.resource){var o=this.calculatePosition(t,n);e.save(),e.translate(e.canvas.width/2,e.canvas.height/2),e.rotate(this.props.rotate*Math.PI/180),e.translate(-e.canvas.width/2,-e.canvas.height/2),this.isVertical()&&e.translate((e.canvas.width-e.canvas.height)/2,(e.canvas.height-e.canvas.width)/2),e.scale(r,r),e.globalCompositeOperation="destination-over",e.drawImage(t.resource,o.x,o.y,o.width,o.height),e.restore()}}},{key:"calculatePosition",value:function(e,t){e=e||this.state.image;var n=this.getBorders(t),r=c(n,2),o=r[0],a=r[1],i=this.getCroppingRect(),s=e.width*this.props.scale,l=e.height*this.props.scale,u=-i.x*s,d=-i.y*l;return this.isVertical()?(u+=a,d+=o):(u+=o,d+=a),{x:u,y:d,height:l,width:s}}},{key:"paint",value:function(e){e.save(),e.scale(h,h),e.translate(0,0),e.fillStyle="rgba("+this.props.color.slice(0,4).join(",")+")";var t=this.props.borderRadius,n=this.getDimensions(),r=this.getBorders(n.border),o=c(r,2),a=o[0],i=o[1],s=n.canvas.height,l=n.canvas.width;t=Math.max(t,0),t=Math.min(t,l/2-a,s/2-i),e.beginPath(),function(e,t,n,r,o,a){if(0===a)e.rect(t,n,r,o);else{var i=r-a,c=o-a;e.translate(t,n),e.arc(a,a,a,Math.PI,1.5*Math.PI),e.lineTo(i,0),e.arc(i,a,a,1.5*Math.PI,2*Math.PI),e.lineTo(r,c),e.arc(i,c,a,2*Math.PI,.5*Math.PI),e.lineTo(a,o),e.arc(a,c,a,.5*Math.PI,Math.PI),e.translate(-t,-n)}}(e,a,i,l-2*a,s-2*i,t),e.rect(l,0,-l,s),e.fill("evenodd"),e.restore()}},{key:"render",value:function(){var e=this.getDimensions(),n={width:e.canvas.width,height:e.canvas.height,cursor:this.state.drag?"grabbing":"grab"},r={width:e.canvas.width*h,height:e.canvas.height*h,style:s({},n,this.props.style)};return r[p.react.down]=this.handleMouseDown,r[p.react.drag]=this.handleDragOver,this.props.disableDrop||(r[p.react.drop]=this.handleDrop),u&&(r[p.react.mouseDown]=this.handleMouseDown),t.createElement("canvas",s({ref:this.setCanvas},r))}}]),a}();return b.propTypes={scale:e.number,rotate:e.number,image:e.oneOfType([e.string].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(d?[e.instanceOf(File)]:[]))),border:e.oneOfType([e.number,e.arrayOf(e.number)]),borderRadius:e.number,width:e.number,height:e.number,position:e.shape({x:e.number,y:e.number}),color:e.arrayOf(e.number),style:e.object,crossOrigin:e.oneOf(["","anonymous","use-credentials"]),onDropFile:e.func,onLoadFailure:e.func,onLoadSuccess:e.func,onImageReady:e.func,onImageChange:e.func,onMouseUp:e.func,onMouseMove:e.func,onPositionChange:e.func,disableDrop:e.bool},b.defaultProps={disableDrop:!1,scale:1,rotate:0,border:25,borderRadius:0,width:200,height:200,color:[0,0,0,.5],style:{},onDropFile:function(){},onLoadFailure:function(){},onLoadSuccess:function(){},onImageReady:function(){},onImageChange:function(){},onMouseUp:function(){},onMouseMove:function(){},onPositionChange:function(){}},b}(n(3),n(1),n(39))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(413),o=n(56);function a(e,t){Object(o.a)(2,arguments);var n=Object(r.a)(e,t)/6e4;return n>0?Math.floor(n):Math.ceil(n)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(404)),o=a(n(420));function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){if(204===e.status)return!1;if("0"===e.headers.get("content-length"))return!1;var t=e.headers.get("content-type");return t&&-1!==t.indexOf("application/json")},c=function(e){return e.ok?i(e)?e.json():e.text():i(e)?e.json().then((function(t){return Promise.reject(Object.assign({},t,{status:e.status}))})):e.text().then((function(t){return Promise.reject(new o.default(e,{text:t}))}))},s=(0,r.default)(fetch),l=function(e,t){return s(e,t).then(c)};t.default=l},function(e,t,n){var r=n(1078),o=n(584),a=n(1079),i=n(907),c=n(951),s=n(1082),l=Math.ceil;e.exports=function(e,t){var n=(t=void 0===t?" ":o(t)).length;if(n<2)return n?r(t,e):t;var u=r(t,l(e/c(t)));return i(t)?a(s(u),0,e).join(""):u.slice(0,e)}},function(e,t){var n=Math.floor;e.exports=function(e,t){var r="";if(!e||t<1||t>9007199254740991)return r;do{t%2&&(r+=e),(t=n(t/2))&&(e+=e)}while(t);return r}},function(e,t,n){var r=n(412);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},function(e,t,n){var r=n(585)("length");e.exports=r},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",l="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[a,i,c].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),u="(?:"+[a+r+"?",r,i,c,n].join("|")+")",d=RegExp(o+"(?="+o+")|"+u+l,"g");e.exports=function(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}},function(e,t,n){var r=n(1083),o=n(907),a=n(1084);e.exports=function(e){return o(e)?a(e):r(e)}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",l="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[a,i,c].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),u="(?:"+[a+r+"?",r,i,c,n].join("|")+")",d=RegExp(o+"(?="+o+")|"+u+l,"g");e.exports=function(e){return e.match(d)||[]}},function(e,t,n){var r=n(586)(!0);e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(370);function o(e){var t,n=e.isOrg,o=e.badgeV2,a=e.badge;if(!n)return!1;var i=Object(r.e)(o||a);return Boolean(null===(t=i.identity)||void 0===t?void 0:t.length)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2),o=n(11),a=n.n(o);function i(e){var t=e.className;return Object(r.b)("span",{className:a()("ActivityItem-StickyMark",t),children:"置顶"})}},function(e,t,n){"use strict";var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(3),d=n.n(u),f=n(1),p=n(19),h=n(27),b=n(11),m=n.n(b),v=n(177),g=n(31),y=n(977),O=n(1017),j=n(372),w=n(30),C=n(101),k=n(24),x=n(153);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var E=function(e){Object(i.a)(n,e);var t=S(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).load=function(){var t=e.props,n=t.dispatch,r=t.id;n(Object(x.A)(r))},e.track=function(){var t=e.props.topic;e.hoverCardElement&&t&&(w.a.setModule(e.hoverCardElement,{module:"TopicItem"},{card:{content:{type:"Topic",token:t.id,item_num:t.questionsCount,follower_num:t.followersCount}}}),w.a.trackCardShow(e.hoverCardElement))},e.handleFollow=e.context.authRequired((function(){var t=!e.props.topic.isFollowing;w.a.trackEvent(e.hoverCardElement,{action:t?"Follow":"UnFollow",element:"Button"});var n=e.props,r=n.dispatch,o=n.id;r(Object(x.M)(o))}),k.W.follow),e.handleOpen=function(){e.load(),e.track()},e}return Object(a.a)(n,[{key:"isTopicReady",value:function(){var e=this.props.topic||{},t=e.questionsCount,n=e.followersCount,r=e.bestAnswersCount;return!(void 0===t&&void 0===n&&void 0===r)}},{key:"render",value:function(){var e=this,t=this.props,n=t.toggler,o=t.topic,a=t.id,i=t.isLoading,c=t.onRef,s=Object(r.a)(t,["toggler","topic","id","isLoading","onRef"]),u=o||{},d=u.name,f=u.introduction,p=u.questionsCount,h=u.followersCount,b=u.bestAnswersCount,m=u.avatarUrl,v=u.isFollowing,w=u.headerCard,k="//www.zhihu.com/topic/".concat(a),x=w&&w.avatarUrl||m;return Object(l.c)(O.b,Object.assign({toggler:n,preventCloseOnTarget:!0,isLoading:i,onOpen:this.handleOpen,size:"large"},s,{onRef:function(t){c&&"function"==typeof c&&c(t),e.hoverCardElement=t},children:[Object(l.b)(O.a,{title:Object(l.b)("a",{target:"_blank",rel:"noopener noreferrer",href:k,children:d}),avatarUrl:x,avatarFit:"cover"}),f&&Object(l.b)("div",{children:Object(l.b)(j.a,{className:"HoverCard-description",html:f})}),Object(l.c)("div",{children:[this.isTopicReady()&&Object(l.c)(y.a,{children:[Object(l.b)(y.a.Item,{tag:C.a,preset:"plain",a:!0,to:"".concat(k,"/questions"),name:"问题",value:p,target:"_blank"}),Object(l.b)(y.a.Item,{tag:C.a,preset:"plain",a:!0,to:"".concat(k,"/top-answers"),name:"精华",value:b,target:"_blank"}),Object(l.b)(y.a.Item,{tag:C.a,preset:"plain",a:!0,to:"".concat(k,"/followers"),name:"关注者",target:"_blank",value:h})]}),Object(l.b)("div",{className:"HoverCard-buttons",children:o&&Object(l.b)(g.c,{preset:"primary",color:v?"grey":"blue",onClick:this.handleFollow,children:v?"已关注":"关注话题"})})]})]}))}}]),n}(f.Component);E.contextTypes={authRequired:d.a.func};var R=Object(h.connect)((function(e,t){var n=t.id,r=e.entities.topics,o=e.loading.local;return{topic:r[n],isLoading:Boolean(o["topic/".concat(n)])}}))(E),T=n(53);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var N=function(e){Object(i.a)(n,e);var t=A(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e,t=this.props,n=t.isMobile,o=t.topic,a=o.name,i=o.avatarUrl,c=o.id,s=o.headerCard,u=t.avatar,d=t.avatarProps,f=t.noHoverCard,p=t.noLink,h=t.style,b=t.className,g=t.children,y=(t.dispatch,t.trackEvent,Object(r.a)(t,["isMobile","topic","avatar","avatarProps","noHoverCard","noLink","style","className","children","dispatch","trackEvent"])),O=void 0===f?n:f,j=s&&s.avatarUrl||i;e=u?Object(l.b)(v.a,Object.assign({className:"TopicLink-avatar",url:j,alt:a},d)):g||a,p||O||(e=Object(l.b)(R,{toggler:e,id:c}));var w=p?"span":"a";return Object(l.b)(w,Object.assign({style:h,className:m()("TopicLink",b),href:"//www.zhihu.com/topic/".concat(c),target:"_blank"},y,{children:e}))}}]),n}(f.Component);N.propTypes={topic:d.a.object.isRequired,user:d.a.object,avatar:d.a.bool,avatarProps:d.a.object,noHoverCard:d.a.bool,noLink:d.a.bool,style:d.a.object,className:d.a.string,children:d.a.node},N.defaultProps={avatar:!1,noLink:!1};t.a=Object(p.compose)(Object(h.connect)((function(e){return{isMobile:Object(T.d)(e,{includeTablet:!0})}})))(N)},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(27),i=n(78),c=n(400),s=function(){return Object(r.b)("div",{className:"LabelContainer-loading"})};t.a=function(e){var t=e.useOldLabels,l=e.item,u=e.abnormalDetailProps,d=e.collapseReasonProps,f=e.showDeleteButton,p=e.inviter,h=l.type,b=l.id,m=l.isLabeled,v=Object(a.useDispatch)(),g=Object(a.useSelector)((function(e){return t||u||d?{}:f?{thankInviterInfo:p}:Object(c.c)(e,l)})),y=Object(i.d)((function(){return n.e(8).then(n.bind(null,2655))}));return Object(o.useEffect)((function(){m&&!g&&v(Object(c.e)(h,b))}),[v,h,b,m,g]),y?Object(r.b)(y,Object.assign({data:g},e)):m&&!t?Object(r.b)(s,{}):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(33),h=n.n(p),b=n(41),m=n.n(b),v=n(1),g=n(11),y=n.n(g),O=n(232),j=n(31),w=(n(947),n(5));function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var k=function(e){return"undefined"!=typeof navigator&&/Mac/i.test(navigator.userAgent)?e.replace(/\+/g,""):e.replace("⌘","Ctrl").replace("⌥","Alt").replace("⇧","Shift")},x=function(e){s()(n,e);var t=C(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.shortcut,r=e.icon,o=e.isActive,a=e.className,i=e.children,c=m()(e,["label","shortcut","icon","isActive","className","children"]);return Object(w.g)(O.a,h()({as:j.c,zaType:"Button",zaText:t,preset:"plain",className:y()(a,"Editable-control",{"is-active":o}),"aria-label":t},t&&{"data-tooltip":t+(n?" (".concat(k(n),")"):"")},{"data-tooltip-position":"bottom","data-tooltip-will-hide-on-click":!0},c),"function"==typeof r?Object(w.g)(r,null):r,i&&Object(w.g)("span",null,i))}}]),n}(v.Component);x.defaultProps={isActive:!1}},function(e,t,n){"use strict";t.a=function(e){var t=e.getCurrentContent();return t.getBlockMap().filter((function(e){return"atomic"===e.getType()})).map((function(e){var n=e.getEntityAt(0);return n?t.getEntity(n):null})).filter(Boolean)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(145),p=n(235);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var b=function(e){Object(a.a)(n,e);var t=h(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={stickyOffset:e.props.offset},e.check=function(){var t;if(null===(t=e.el)||void 0===t?void 0:t.children){var n=e.props.offset,r=n,o=Array.from(e.el.children).map((function(e){var t=window.getComputedStyle(e);return e.offsetHeight+parseInt(t.marginBottom,10)+parseInt(t.marginTop,10)})),a=e.el&&e.el.clientHeight,i=document.documentElement.clientHeight-n;if(e.sticky&&e.sticky.updateHeight(),a>i){var c=a;o.every((function(e){return!(c<i)&&(c-=e,!0)})),r=n-a+c}e.state.stickyOffset!==r&&e.setState({stickyOffset:r})}},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.resizeHandler=Object(f.subscribe)("resize",this.check),this.timeout=setTimeout(this.check)}},{key:"componentWillUnmount",value:function(){this.resizeHandler.unsubscribe(),clearTimeout(this.timeout)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,o=t.onRef;return Object(s.b)("div",{className:r,ref:o,children:Object(s.b)(p.a,{offset:this.state.stickyOffset,ref:function(t){e.sticky=t},children:Object(s.b)("div",{ref:function(t){e.el=t},children:n})})})}}]),n}(d.Component);b.propTypes={offset:u.a.number,onRef:u.a.func,className:u.a.string},b.defaultProps={offset:0,onRef:function(){},className:""}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(133),o=n(72),a=n(56);function i(e,t){Object(a.a)(2,arguments);var n=Object(o.a)(e),i=Object(r.a)(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var c=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+i+1,0);var l=s.getDate();return c>=l?s:(n.setFullYear(s.getFullYear(),s.getMonth(),c),n)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d}));var r=n(0),o=n(7),a=n(10),i=n(6),c=Object(i.a)("club",["GET","JOIN","LEAVE","UPDATE","REQUEST_JOIN"]),s=function(e){return{API:{types:c.GET,method:"GET",endpoint:"clubs/".concat(e),fetchOptions:{credentials:"include"}},schema:a.a.CLUB,meta:{id:e}}},l=function(e){return function(t){return t({API:{types:c.JOIN,method:"POST",endpoint:"clubs/".concat(e,"/join"),fetchOptions:{credentials:"include"}},meta:{id:e}}).then((function(){return t(s(e))}))}},u=function(e,t){return function(n){return n({API:{types:c.REQUEST_JOIN,method:"POST",endpoint:"clubs/".concat(e,"/join_requests"),fetchOptions:{zsEncrypt:!0},body:Object(o.decamelizeKeys)({requestDetail:t})}}).then((function(){return n(s(e))}))}},d=function(e){return function(t,n){var o=n().entities.clubs[e],a=o.joinCount,i=o.isJoined,l=o.loginMask;return t({API:{types:c.LEAVE,method:"DELETE",endpoint:"clubs/".concat(e,"/join"),fetchOptions:{credentials:"include"}},UPDATE:{request:{clubs:Object(r.a)({},e,Object.assign({isJoined:!1},a&&{joinCount:a-1}))},failure:{clubs:Object(r.a)({},e,Object.assign({isJoined:i,loginMask:l},a&&{joinCount:a}))}},meta:{id:e}}).then((function(){return t(s(e))}))}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return c}));var r=function(e){var t=e.title,n=e.id,r=e.topics,o=e.answerCount,a=e.commentCount,i=e.created,c=e.updatedTime,s=e.visitsCount,l=e.followerCount;return{name:t,url:"https://www.zhihu.com/question/".concat(n),keywords:r.map((function(e){return e.name})).join(","),answerCount:o,commentCount:a,dateCreated:new Date(1e3*i).toISOString(),dateModified:new Date(1e3*c).toISOString(),"zhihu:visitsCount":s,"zhihu:followerCount":l}};function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&(t||n)}var a={auto_notif:"auto_notif",header:"header",question_header_card:"question_header_card",force_launch_notif:"force_launch_notif",agree:"agree",disagree:"disagree",comment:"comment",star:"star",comment_list:"comment_list",comment_more:"comment_more",more_answers:"more_answers",bottom:"bottom",capsule:"capsule",follow:"follow",write_answer:"write_answer"},i={expand_answer:"force_launch_notif",expand_answer1:"auto_notif",expand_answer2:"auto_notif",up:"agree",down:"disagree",comment_answer:"comment",collect_answer:"star"},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isClose,n=e.isEvaluate,r=e.isLocked,o=e.isSuggest;return t?"closed":o?"suggested":n?"evaluated":r?"locked":""}},function(e,t,n){"use strict";var r=n(4),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n.n(u),f=n(11),p=n.n(f),h=n(3),b=n.n(h),m=n(133),v=n(1094),g=n(56);function y(e,t){Object(g.a)(2,arguments);var n=Object(m.a)(t);return Object(v.a)(e,12*n)}var O=n(1126),j=n(72);var w=n(738),C=n(581),k=n(211);var x=n(1427),S=n(1341),E=n(1295),R=n(1428),T=n(1429),A=n(360);function N(e,t){Object(g.a)(2,arguments);var n=Object(j.a)(e),r=Object(j.a)(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function _(e){Object(g.a)(1,arguments);var t=Object(j.a)(e),n=t.getDate();return n}var I=n(18),M=function(e){return d.a.createElement(I.a,e,d.a.createElement("path",{d:"M17.782 16.78a.737.737 0 0 1-1.052 0l-4.512-4.249a.758.758 0 0 1 0-1.063L16.73 7.22a.737.737 0 0 1 1.052 0c.29.294.29.77.001 1.063L14 12l3.782 3.716c.29.294.29.77 0 1.063zm-5 0a.737.737 0 0 1-1.052 0L7.218 12.53a.758.758 0 0 1 0-1.063L11.73 7.22a.737.737 0 0 1 1.052 0c.29.294.29.77.001 1.063L9 12l3.782 3.716c.29.294.29.77 0 1.063z",fillRule:"evenodd"}))};M.defaultProps={name:"DoubleArrowLeft"};var L=M,P=n(1137),B=n(835),z=function(e){return d.a.createElement(I.a,e,d.a.createElement("path",{d:"M6.218 16.78a.737.737 0 0 0 1.052 0l4.512-4.249a.758.758 0 0 0 0-1.063L7.27 7.22a.737.737 0 0 0-1.052 0 .759.759 0 0 0-.001 1.063L10 12l-3.782 3.716a.758.758 0 0 0 0 1.063zm5 0a.737.737 0 0 0 1.052 0l4.512-4.249a.758.758 0 0 0 0-1.063L12.27 7.22a.737.737 0 0 0-1.052 0 .759.759 0 0 0-.001 1.063L15 12l-3.782 3.716a.758.758 0 0 0 0 1.063z",fillRule:"evenodd"}))};z.defaultProps={name:"DoubleArrowRight"};var D=z;function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var U=["日","一","二","三","四","五","六"],V=function(e){Object(i.a)(n,e);var t=F(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={calendarDate:e.props.defaultCalendarDate||(Array.isArray(e.props.value)?e.props.value[0]:e.props.value),hoveringDate:null,now:new Date},e.handlePrevYearClick=function(){var t=y(e.state.calendarDate,-1);e.setState({calendarDate:t}),e.props.onCalendarDateChange(t)},e.handlePrevMonthClick=function(){var t=Object(v.a)(e.state.calendarDate,-1);e.setState({calendarDate:t}),e.props.onCalendarDateChange(t)},e.handleNextMonthClick=function(){var t=Object(v.a)(e.state.calendarDate,1);e.setState({calendarDate:t}),e.props.onCalendarDateChange(t)},e.handleNextYearClick=function(){var t=y(e.state.calendarDate,1);e.setState({calendarDate:t}),e.props.onCalendarDateChange(t)},e.handleDayClick=function(t){e.setState({calendarDate:t}),e.props.onCalendarDateChange(t),e.props.onChange(t)},e.handleDayHover=function(t){e.setState({hoveringDate:t}),e.props.onHover(t)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,o=t.weekStartsOn,a=t.value,i=t.disabledDate,c=t.showToday,s=t.showPrevMonth,u=t.showPrevYear,d=t.showNextMonth,f=t.showNextYear,h=this.state,b=h.calendarDate,v=h.hoveringDate,y=h.now,I=Object(O.a)(function(e){Object(g.a)(1,arguments);var t=Object(j.a)(e);return t.setDate(1),t.setHours(0,0,0,0),t}(b),{weekStartsOn:o}),M=function(e,t){Object(g.a)(1,arguments);var n=t||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,a=null==o?0:Object(m.a)(o),i=null==n.weekStartsOn?a:Object(m.a)(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var c=Object(j.a)(e),s=c.getDay(),l=6+(s<i?-7:0)-(s-i);return c.setHours(0,0,0,0),c.setDate(c.getDate()+l),c}(function(e){Object(g.a)(1,arguments);var t=Object(j.a)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(b),{weekStartsOn:o}),z=Object(r.a)(Array(Object(w.a)(M,I)+1)).map((function(e,t){return Object(C.a)(I,t)})).reduce((function(e,t){var n=function(e,t,n){Object(g.a)(2,arguments);var r=Object(O.a)(e,n),o=Object(O.a)(t,n),a=r.getTime()-Object(k.a)(r),i=o.getTime()-Object(k.a)(o);return Math.round((a-i)/6048e5)}(t,I,{weekStartsOn:o});return e[n]=e[n]?[].concat(Object(r.a)(e[n]),[t]):[t],e}),[]),F=z[0].map(x.a),V=Array.isArray(a),q=c;return Object(l.c)("div",{className:p()("Calendar",n,{"Calendar--hasBottomTool":q}),children:[Object(l.c)("div",{className:"Calendar-topTool",children:[u&&Object(l.b)("button",{className:"Calendar-topToolButton Calendar-topToolButton--prevYear",onClick:this.handlePrevYearClick,children:Object(l.b)(L,{size:20,center:!0})}),s&&Object(l.b)("button",{className:"Calendar-topToolButton Calendar-topToolButton--prevMonth",onClick:this.handlePrevMonthClick,children:Object(l.b)(P.a,{size:20,center:!0})}),Object(l.b)("div",{className:"Calendar-topToolDate",children:Object(S.a)(b,"yyyy 年 M 月")}),d&&Object(l.b)("button",{className:"Calendar-topToolButton Calendar-topToolButton--nextMonth",onClick:this.handleNextMonthClick,children:Object(l.b)(B.a,{size:20,center:!0})}),f&&Object(l.b)("button",{className:"Calendar-topToolButton Calendar-topToolButton--nextYear",onClick:this.handleNextYearClick,children:Object(l.b)(D,{size:20,center:!0})})]}),Object(l.c)("table",{className:"Calendar-table",cellSpacing:0,children:[Object(l.b)("thead",{className:"Calendar-thead",children:Object(l.b)("tr",{children:F.map((function(e){return Object(l.b)("th",{className:"Calendar-weekName",children:U[e]},e)}))})}),Object(l.b)("tbody",{children:z.map((function(t,n){return Object(l.b)("tr",{children:t.map((function(t,n){var r=i(t),o=V?Object(E.a)(t,a[0])||Object(E.a)(t,a[1]):Object(E.a)(t,a),c=!1;if(V){var s=Object(R.a)(a),u=Object(T.a)(a);c=Object(A.a)(t,s)>0&&Object(A.a)(u,t)>0}return Object(l.b)("td",{className:p()("Calendar-day",{"is-hovered":Object(E.a)(t,v),"is-today":Object(E.a)(t,y),"is-disabled":r,"is-not-this-month":!N(t,b),"is-input-date":o,"is-in-range":c}),onClick:function(){r||e.handleDayClick(t)},onMouseEnter:function(){r||e.handleDayHover(t)},onMouseLeave:function(){r||e.handleDayHover(null)},children:_(t)},n)}))},n)}))})]}),q&&Object(l.b)("div",{className:"Calendar-bottomTool",children:c&&Object(l.b)("button",{className:"Calendar-todayButton",onClick:function(){return e.handleDayClick(y)},disabled:i(y),children:"今天"})})]})}}]),n}(u.Component);V.defaultProps={weekStartsOn:0,disabledDate:function(){return!1},onChange:function(){return!1},onCalendarDateChange:function(){return!1},onHover:function(){return!1},showToday:!0,showPrevMonth:!0,showPrevYear:!0,showNextMonth:!0,showNextYear:!0},V.propTypes={defaultCalendarDate:b.a.instanceOf(Date),value:b.a.oneOfType([b.a.instanceOf(Date),b.a.arrayOf(b.a.instanceOf(Date))]),weekStartsOn:b.a.number,disabledDate:b.a.func,onChange:b.a.func,onHover:b.a.func,showToday:b.a.bool,showPrevMonth:b.a.bool,showPrevYear:b.a.bool,showNextMonth:b.a.bool,showNextYear:b.a.bool};t.a=V},,function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r,o=n(20),a=n.n(o),i=n(21),c=n.n(i),s=n(22),l=n.n(s),u=n(23),d=n.n(u),f=n(13),p=n.n(f),h=n(1),b=n.n(h),m=n(11),v=n.n(m),g=n(5);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var o=p()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}!function(e){e.BLACK="black",e.WHITE="white"}(r||(r={}));var O=function(e){l()(n,e);var t=y(n);function n(){return a()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.maskClassName,r=e.shown,o=e.background,a=e.children,i=e.fullContent;return Object(g.g)("div",{className:v()("Mask",t,{"Mask-hidden":!r})},Object(g.g)("div",{className:v()("Mask-mask","Mask-mask--".concat(o),n)}),a&&Object(g.g)("div",{className:i?"Mask-content--full":"Mask-content"},a))}}]),n}(b.a.Component);O.defaultProps={shown:!1,background:r.BLACK};var j=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),o=n(34),a=n(78),i=["answer","question","article","pin","zvideo","club_post","videoanswer"];var c=Object(o.withRouter)((function(e){var t=e.parent.type,o=i.includes(t),c=Object(a.d)((function(){return n.e(18).then(n.bind(null,2649))}),!o),s=Object(a.d)((function(){return n.e(18).then(n.bind(null,2643))}),o),l=o?s:c;return l?Object(r.b)(l,Object.assign({},e)):null}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(63),o={400:"请求参数有误",401:"用户认证失败",403:"服务已拒绝",404:"资源不存在",405:"请求方式有误",410:"资源已解散",502:"网关错误",503:"服务无响应",504:"网关超时"},a=function(e){var t;return(null==e||null===(t=e.payload)||void 0===t?void 0:t.message)||(null==e?void 0:e.status)&&o[e.status]||"操作失败"};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r.a.dispatch("ui/showToast",{icon:"fail",text:a(e)})}},function(e,t,n){"use strict";var r=n(43),o=n(2),a=n(1),i=n(71),c=n.n(i),s=n(27),l=n(380),u=Object(s.connect)((function(e){return{hasData:e.emoticons.emoticonGroupList.length>0}}));t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alwaysShow,n=void 0!==t&&t;return function(e){return u(c()((function(t){var i=t.hasData,c=Object(a.useState)(!1),u=Object(r.a)(c,2),d=u[0],f=u[1],p=Object(s.useDispatch)();return Object(a.useEffect)((function(){i?f(!0):p(Object(l.d)()).then((function(e){var t=e.payload.data[0].id;p(Object(l.e)(t)),f(!0)})).catch((function(){f(!0)}))}),[p,i]),(!d||!n)&&Object(o.b)(e,Object.assign({},t))}),e))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var r=n(4),o=n(1),a=n(19),i=n(27);function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(i.useDispatch)(),c=Array.isArray(e),s=c?e:[e];return Object(o.useMemo)((function(){return c?s.map((function(e){return Object(a.bindActionCreators)(e,n)})):Object(a.bindActionCreators)(s[0],n)}),[n].concat(Object(r.a)(s),Object(r.a)(t)))}function s(e){return Object(i.useSelector)(e,i.shallowEqual)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(953);function o(e){return(t=e,t?t.replace(/\.[^/.]+$/,""):"").slice(0,r.c);var t}function a(e,t){var n=e.title,o=e.description,a=e.categoryFirstLevel,i=e.categorySecondLevelId,c=e.topics,s=e.zvideoType;if(!n)return"视频标题至少 ".concat(r.e," 个字");if(n.length<r.e)return"视频标题至少 ".concat(r.e," 个字");if(n.length>r.d)return"视频标题最多 ".concat(r.d," 个字");if(o.length>r.b)return"视频描述最多 ".concat(r.b," 个字");if(!a)return"请选择所属领域";if(!i)return"请选择所属二级领域";if(!c.length)return"请绑定话题";if(!s)return"请选择类型";if(t){var l=t();if(l)return l}}},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e.id===t.id&&void 0!==e.id||e.urlToken===t.urlToken&&void 0!==e.urlToken)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(31),i=n(1182),c=function(e){var t=e.onClick,n=e.text,c=Object(r.a)(e,["onClick","text"]);return Object(o.c)(a.c,Object.assign({preset:"link",onClick:t,css:{fontSize:15}},c,{children:[Object(o.b)(i.a,{text:!0,center:!0})," ",n]}))};c.defaultProps={text:"修改"},t.a=c},function(e,t,n){"use strict";t.a=function(e){return e.componentList.filter(Boolean).filter((function(e){var t=e.component;return Boolean(t)})).map((function(e){return e.component}))}},function(e,t,n){"use strict";n.d(t,"animated",(function(){return M}));var r=n(21),o=n.n(r),a=n(55),i=n.n(a),c=n(20),s=n.n(c),l=n(22),u=n.n(l),d=n(23),f=n.n(d),p=n(13),h=n.n(p),b=n(80),m=n.n(b),v=n(1014);n.o(v,"useSpring")&&n.d(t,"useSpring",(function(){return v.useSpring})),n.o(v,"useTransition")&&n.d(t,"useTransition",(function(){return v.useTransition}));var g=n(39),y=n(900),O=n(1110);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var w=/^--/;function C(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||w.test(e)||x.hasOwnProperty(e)&&x[e]?(""+t).trim():t+"px"}var k={};var x={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},S=["Webkit","Ms","Moz","O"];x=Object.keys(x).reduce((function(e,t){return S.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),x);var E=/^(matrix|translate|scale|rotate|skew)/,R=/^(translate)/,T=/^(rotate|skew)/,A=function(e,t){return y.s.num(e)&&0!==e?e+t:e},N=function e(t,n){return y.s.arr(t)?t.every((function(t){return e(t,n)})):y.s.num(t)?t===n:parseFloat(t)===n},_=function(e){u()(n,e);var t=j(n);function n(e){var r=e.x,o=e.y,a=e.z,c=m()(e,["x","y","z"]);s()(this,n);var l=[],u=[];return(r||o||a)&&(l.push([r||0,o||0,a||0]),u.push((function(e){return["translate3d(".concat(e.map((function(e){return A(e,"px")})).join(","),")"),N(e,0)]}))),Object(y.l)(c,(function(e,t){if("transform"===t)l.push([e||""]),u.push((function(e){return[e,""===e]}));else if(E.test(t)){if(delete c[t],y.s.und(e))return;var n=R.test(t)?"px":T.test(t)?"deg":"";l.push(Object(y.y)(e)),u.push("rotate3d"===t?function(e){var t=i()(e,4),r=t[0],o=t[1],a=t[2],c=t[3];return["rotate3d(".concat(r,",").concat(o,",").concat(a,",").concat(A(c,n),")"),N(c,0)]}:function(e){return["".concat(t,"(").concat(e.map((function(e){return A(e,n)})).join(","),")"),N(e,t.startsWith("scale")?1:0)]})}})),l.length&&(c.transform=new I(l,u)),t.call(this,c)}return n}(O.a),I=function(e){u()(n,e);var t=j(n);function n(e,r){var o;return s()(this,n),(o=t.call(this)).inputs=e,o.transforms=r,o._value=null,o}return o()(n,[{key:"get",value:function(){return this._value||(this._value=this._get())}},{key:"_get",value:function(){var e=this,t="",n=!0;return Object(y.k)(this.inputs,(function(r,o){var a=Object(y.q)(r[0]),c=e.transforms[o](y.s.arr(a)?a:r.map(y.q)),s=i()(c,2),l=s[0],u=s[1];t+=" "+l,n=n&&u})),n?"none":t}},{key:"observerAdded",value:function(e){var t=this;1==e&&Object(y.k)(this.inputs,(function(e){return Object(y.k)(e,(function(e){return Object(y.r)(e)&&Object(y.c)(e,t)}))}))}},{key:"observerRemoved",value:function(e){var t=this;0==e&&Object(y.k)(this.inputs,(function(e){return Object(y.k)(e,(function(e){return Object(y.r)(e)&&Object(y.x)(e,t)}))}))}},{key:"eventObserved",value:function(e){"change"==e.type&&(this._value=null),Object(y.d)(this,e)}}]),n}(y.a);v.Globals.assign({batchedUpdates:g.unstable_batchedUpdates,createStringInterpolator:y.g,colors:y.e});var M=Object(O.d)(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;var n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,r=t.style,o=t.children,a=t.scrollTop,i=t.scrollLeft,c=m()(t,["style","children","scrollTop","scrollLeft"]),s=Object.values(c),l=Object.keys(c).map((function(t){return n||e.hasAttribute(t)?t:k[t]||(k[t]=t.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})))}));for(var u in void 0!==o&&(e.textContent=o),r)if(r.hasOwnProperty(u)){var d=C(u,r[u]);"float"===u?u="cssFloat":w.test(u)?e.style.setProperty(u,d):e.style[u]=d}l.forEach((function(t,n){e.setAttribute(t,s[n])})),void 0!==a&&(e.scrollTop=a),void 0!==i&&(e.scrollLeft=i)},createAnimatedStyle:function(e){return new _(e)},getComponentProps:function(e){e.scrollTop,e.scrollLeft;return m()(e,["scrollTop","scrollLeft"])}}).animated},function(e,t,n){"use strict";n.d(t,"a",(function(){return R})),n.d(t,"b",(function(){return S})),n.d(t,"c",(function(){return x})),n.d(t,"d",(function(){return L})),n.d(t,"e",(function(){return j})),n.d(t,"f",(function(){return N})),n.d(t,"g",(function(){return C})),n.d(t,"h",(function(){return w}));var r=n(55),o=n.n(r),a=n(975),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(20),h=n.n(p),b=n(21),m=n.n(b),v=n(900),g=n(1);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var O=Symbol.for("Animated:node"),j=function(e){return e&&e[O]},w=function(e,t){return Object(v.h)(e,O,t)},C=function(e){return e&&e[O]&&e[O].getPayload()},k=function(){function e(){h()(this,e),w(this,this)}return m()(e,[{key:"getPayload",value:function(){return this.payload||[]}}]),e}(),x=function(e){s()(n,e);var t=y(n);function n(e){var r;return h()(this,n),(r=t.call(this))._value=e,r.done=!0,r.durationProgress=0,v.s.num(r._value)&&(r.lastPosition=r._value),r}return m()(n,[{key:"getPayload",value:function(){return[this]}},{key:"getValue",value:function(){return this._value}},{key:"setValue",value:function(e,t){return v.s.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}},{key:"reset",value:function(){var e=this.done;this.done=!1,v.s.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}],[{key:"create",value:function(e){return new n(e)}}]),n}(k),S=function(e){s()(n,e);var t=y(n);function n(e){var r;return h()(this,n),(r=t.call(this,0))._string=null,r._toString=Object(v.f)({output:[e,e]}),r}return m()(n,[{key:"getValue",value:function(){var e=this._string;return null==e?this._string=this._toString(this._value):e}},{key:"setValue",value:function(e){if(v.s.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!i()(f()(n.prototype),"setValue",this).call(this,e))return!1;this._string=null}return!0}},{key:"reset",value:function(e){e&&(this._toString=Object(v.f)({output:[this.getValue(),e]})),this._value=0,i()(f()(n.prototype),"reset",this).call(this)}}],[{key:"create",value:function(e){return new n(e)}}]),n}(x),E={dependencies:null},R=function(e){s()(n,e);var t=y(n);function n(e){var r;return h()(this,n),(r=t.call(this)).source=e,r.setValue(e),r}return m()(n,[{key:"getValue",value:function(e){var t={};return Object(v.l)(this.source,(function(n,r){var o;(o=n)&&o[O]===o?t[r]=n.getValue(e):Object(v.r)(n)?t[r]=Object(v.q)(n):e||(t[r]=n)})),t}},{key:"setValue",value:function(e){this.source=e,this.payload=this._makePayload(e)}},{key:"reset",value:function(){this.payload&&Object(v.k)(this.payload,(function(e){return e.reset()}))}},{key:"_makePayload",value:function(e){if(e){var t=new Set;return Object(v.l)(e,this._addToPayload,t),Array.from(t)}}},{key:"_addToPayload",value:function(e){var t=this;E.dependencies&&Object(v.r)(e)&&E.dependencies.add(e);var n=C(e);n&&Object(v.k)(n,(function(e){return t.add(e)}))}}]),n}(k),T=function(e){s()(n,e);var t=y(n);function n(e){return h()(this,n),t.call(this,e)}return m()(n,[{key:"getValue",value:function(){return this.source.map((function(e){return e.getValue()}))}},{key:"setValue",value:function(e){var t=this.getPayload();return e.length==t.length?t.some((function(t,n){return t.setValue(e[n])})):(i()(f()(n.prototype),"setValue",this).call(this,e.map(A)),!0)}}],[{key:"create",value:function(e){return new n(e)}}]),n}(R);function A(e){return(Object(v.t)(e)?S:x).create(e)}function N(e){var t=j(e);return t?t.constructor:v.s.arr(e)?T:Object(v.t)(e)?S:x}var _=function(e,t){var n=!v.s.fun(e)||e.prototype&&e.prototype.isReactComponent;return Object(g.forwardRef)((function(r,a){var i=Object(g.useRef)(null),c=n&&Object(g.useCallback)((function(e){i.current=function(e,t){e&&(v.s.fun(e)?e(t):e.current=t);return t}(a,e)}),[a]),s=function(e,t){var n=new Set;E.dependencies=n,e.style&&(e=Object.assign({},e,{style:t.createAnimatedStyle(e.style)}));return e=new R(e),E.dependencies=null,[e,n]}(r,t),l=o()(s,2),u=l[0],d=l[1],f=Object(v.z)(),p=function(){var e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,u.getValue(!0)))&&f()},h=new I(p,d),b=Object(g.useRef)();Object(v.A)((function(){var e=b.current;b.current=h,Object(v.k)(d,(function(e){return Object(v.c)(e,h)})),e&&(Object(v.k)(e.deps,(function(t){return Object(v.x)(t,e)})),v.w.cancel(e.update))})),Object(g.useEffect)(p,[]),Object(v.C)((function(){return function(){var e=b.current;Object(v.k)(e.deps,(function(t){return Object(v.x)(t,e)}))}}));var m=t.getComponentProps(u.getValue());return Object(g.createElement)(e,Object.assign({},m,{ref:c}))}))},I=function(){function e(t,n){h()(this,e),this.update=t,this.deps=n}return m()(e,[{key:"eventObserved",value:function(e){"change"==e.type&&v.w.write(this.update)}}]),e}();var M=Symbol.for("AnimatedComponent"),L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.applyAnimatedValues,r=void 0===n?function(){return!1}:n,o=t.createAnimatedStyle,a=void 0===o?function(e){return new R(e)}:o,i=t.getComponentProps,c=void 0===i?function(e){return e}:i,s={applyAnimatedValues:r,createAnimatedStyle:a,getComponentProps:c},l=function e(t){var n=P(t)||"Anonymous";return(t=v.s.str(t)?e[t]||(e[t]=_(t,s)):t[M]||(t[M]=_(t,s))).displayName="Animated(".concat(n,")"),t};return Object(v.l)(e,(function(t,n){v.s.arr(e)&&(n=P(t)),l[n]=l(t)})),{animated:l}},P=function(e){return v.s.str(e)?e:e&&v.s.str(e.displayName)?e.displayName:v.s.fun(e)&&e.name||null}},function(e,t){},function(e,t){},,,,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(27),d=n(19),f=n(3),p=n.n(f),h=n(11),b=n.n(h),m=n(262),v=n.n(m),g=n(78),y=n(232),O=n(380),j=n(36),w=n(234),C=n(1066),k=n(43),x=n(156);function S(e){var t,n,r,o,a,i,c,u,d,f=e.className,p=e.emoticonGroupList,h=e.curEmoticonGroupId,m=e.onGroupSelected,v=e.vipEnabled,y=Object(l.useRef)(),O=Object(x.a)(v,p),j=(t=y,n=Object(l.useState)({left:null,x:null}),r=Object(k.a)(n,2),o=r[0],a=r[1],i=Object(l.useState)(!1),c=Object(k.a)(i,2),u=c[0],d=c[1],{onMouseDown:Object(g.c)((function(e){var n;d(!0);var r=null===(n=t.current)||void 0===n?void 0:n.scrollLeft,o=e.clientX;a({left:r,x:o}),e.preventDefault()})),onMouseMove:Object(g.c)((function(e){if(u){var n=e.clientX-o.x;t.current&&(t.current.scrollLeft=o.left-n)}})),onMouseUp:Object(g.c)((function(){u&&d(!1)}))});return Object(s.b)("div",{className:b()("EmoticonsFooter",f),children:Object(s.b)("ul",Object.assign({className:"EmoticonsFooter-items",ref:y},j,{children:O.map((function(e){return Object(s.b)("li",{className:b()("EmoticonsFooter-item",{"EmoticonsFooter-item--selected":h===e.id}),onClick:function(){m(e.id)},children:Object(s.b)("img",{src:e.iconUrl,className:"EmoticonsFooter-itemIcon"})},e.id)}))}))})}var E=n(1007);function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var T=function(e){Object(a.a)(n,e);var t=R(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleMouseEnter=function(e,t){e.dynamicImageUrl&&(t.target.src=e.dynamicImageUrl)},e.handleMouseLeave=function(e,t){e.dynamicImageUrl&&(t.target.src=e.staticImageUrl)},e.handleSelectEmoticon=function(t,n){(0,e.props.onSelectEmoticon)(t,n)},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.type,r=t.data,o=void 0===r?[]:r;return 0===o.length?Object(s.b)(E.a,{className:"EmoticonPanel-spinner"}):Object(s.b)("ul",{className:"EmoticonPanel",children:o.map((function(t){return Object(s.c)(y.a,{zaType:"Button",zaText:t.title,zaEventType:"Click",zaBlock:"vip"===n?"VipEmoticon":"Emoticon",as:"li",className:b()("EmoticonPanel-item",{"EmoticonPanel-item--big":"emoji"!==n}),onClick:function(){e.handleSelectEmoticon(t,n)},children:[Object(s.b)("img",{src:t.staticImageUrl,title:"emoji"===n?t.title:"",className:b()({"EmoticonPanel-itemImg--small":"emoji"===n,"EmoticonPanel-itemImg--big":"emoji"!==n}),onMouseOver:function(n){e.handleMouseEnter(t,n)},onMouseOut:function(n){e.handleMouseLeave(t,n)},alt:t.title}),"emoji"!==n&&Object(s.b)("span",{className:"EmoticonPanel-itemTitle",children:t.title})]},t.id)}))})}}]),n}(l.Component);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}T.propTypes={type:p.a.string.isRequired,data:p.a.array.isRequired,onSelectEmoticon:p.a.func.isRequired};var N=function(e){Object(a.a)(n,e);var t=A(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).getCurEmoticonGroupPanleData=function(){var t=e.props,n=t.curEmoticonGroupId;return t.emoticonPanelList.filter((function(e){return e.groupId===n}))},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.changeSelectedEmoticonPanel,n=e.curEmoticonPanelId,r=e.className,o=this.getCurEmoticonGroupPanleData();return o.length<=1?null:Object(s.b)("ul",{className:b()("EmoticonPagination",r),children:o.map((function(e){return Object(s.b)("li",{className:b()("EmoticonPagination-bullet",{"EmoticonPagination-bullet--active":e.id===n}),onClick:function(){t(e.id)}},e.id)}))})}}]),n}(l.Component);N.propsTypes={className:p.a.string};var _=Object(u.connect)((function(e){var t=e.emoticons;return{curEmoticonGroupId:t.curEmoticonGroupId,emoticonPanelList:t.emoticonPanelList,curEmoticonPanelId:t.curEmoticonPanelId}}),{changeSelectedEmoticonPanel:O.b})(N),I=n(0),M=n(835),L=n(24);function P(e){var t=e.show,n=e.onClick,r=Object(g.c)((function(){null==n||n()}));return t&&Object(s.c)(y.a,{zaType:"Button",zaEventType:"Click",zaAction:"OpenUrl",zaBlock:"VipBrand",extra:{link:{url:L.F}},css:function(e){return Object(I.a)({backgroundColor:e.colorMod(e.colors.GYL08A).alpha(.25),color:e.colors.GYL12A,display:"flex",alignItems:"center",justifyContent:"center",height:"25px",fontSize:"12px",lineHeight:"17px",userSelect:"none"},"&:hover",{cursor:"pointer"})},onClick:r,children:["开通会员解锁全部会员表情 ",Object(s.b)(M.a,{})]})}function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var z={containerClass:"Emoticons-panelContainer",ContainerEl:"ul",threshold:10},D=function(e){Object(a.a)(n,e);var t=B(n);function n(e){var o;return Object(r.a)(this,n),(o=t.call(this,e)).state={showVipStickerModal:!1},o.setShowVipStickerModal=function(e){o.setState({showVipStickerModal:e})},o.handleGetSwiperInstance=function(e){o.mousetrap=new v.a,o.swiperInstance=e,o.mousetrap.bind("left",(function(){e.slidePrev()})),o.mousetrap.bind("right",(function(){e.slideNext()}))},o.handleEmoticonGroupSelected=function(e){var t=o.props,n=t.getEmoticonsDetail,r=t.emoticonGroupDetail,a=t.changeSelectedEmoticonGroup,i=t.changeSelectedEmoticonPanel;r[e]||n(e),a(e),i("".concat(e,"-0"))},o.handleSlideChange=function(){var e=o.props,t=e.emoticonPanelList,n=e.getEmoticonsDetail,r=e.changeSelectedEmoticonPanel,a=e.changeSelectedEmoticonGroup;if(o.swiperInstance){var i=t[o.swiperInstance.activeIndex];r(i.id),a(i.groupId),0===i.data.length&&n(i.groupId)}},o.handleRequestVip=function(){o.setShowVipStickerModal(!0)},o.handleSelectEmoticon=function(e,t){var n=o.props,r=n.onSelectEmoticon,a=n.isVip;"vip"!==t||a?r(e,t):o.handleRequestVip()},o.swiperInstance=Object(l.createRef)(),o}return Object(o.a)(n,[{key:"componentWillUnmount",value:function(){var e=this.props,t=e.changeSelectedEmoticonGroup,n=e.changeSelectedEmoticonPanel,r=e.emoticonPanelList;t(r[0].groupId),n(r[0].id),this.mousetrap.reset()}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.emoticonGroupList,o=void 0===r?[]:r,a=t.curEmoticonGroupId,i=t.emoticonPanelList,c=t.curEmoticonPanelId,l=t.isVip,u=t.vipEnabled,d=void 0!==u&&u,f=t.Swiper,p=this.state.showVipStickerModal,h=this.setShowVipStickerModal,m=Object(x.a)(d,i);return Object(s.b)(y.b,{block:"EmoticonsCard",children:Object(s.c)("div",{className:b()("Emoticons",n),children:[f?Object(s.b)(f,Object.assign({},z,{activeSlideKey:c,getSwiper:this.handleGetSwiperInstance,on:{slideChange:this.handleSlideChange},children:m.map((function(t){return Object(s.b)("li",{className:"Emoticons-panels-item",children:Object(s.b)(T,{type:t.type,data:t.data,onSelectEmoticon:e.handleSelectEmoticon})},t.id)}))})):Object(s.b)("div",{css:{height:183}}),Object(s.b)(_,{className:"Emoticons-Pagination"}),Object(s.b)(P,{show:d&&!l,onClick:this.handleRequestVip}),Object(s.b)(S,{emoticonGroupList:o,curEmoticonGroupId:a,onGroupSelected:this.handleEmoticonGroupSelected,vipEnabled:d}),Object(s.b)(C.b,{show:p,setShow:h,type:C.a.comment_sticker})]})})}}]),n}(l.Component);D.propTypes={className:p.a.string,onSelectEmoticon:p.a.func};t.a=Object(d.compose)(Object(u.connect)((function(e){var t=e.emoticons,n=t.emoticonGroupList,r=t.curEmoticonGroupId,o=t.emoticonGroupDetail,a=t.emoticonPanelList;return{emoticonGroupList:n,curEmoticonGroupId:r,emoticonGroupDetail:o,emoticonPanelList:void 0===a?[]:a,curEmoticonPanelId:t.curEmoticonPanelId,isVip:Object(j.j)(e)}}),{getEmoticonsDetail:O.e,changeSelectedEmoticonGroup:O.a,changeSelectedEmoticonPanel:O.b}),Object(w.a)(null),(function(e){return function(t){var r=Object(g.d)((function(){return n.e(45).then(n.t.bind(null,2609,7))}));return Object(s.b)(e,Object.assign({},t,{Swiper:r}))}}))(D)},function(e,t,n){"use strict";function r(e){var t,n,r=window.URL||window.webkitURL;try{n=document.createElement("video"),t=r.createObjectURL(e)}catch(e){}return new Promise((function(e){var r=setTimeout((function(){e(0)}),1e3);n.addEventListener("loadeddata",(function(){clearTimeout(r),e(n.duration?n.duration:0)})),n.src=t}))}n.d(t,"g",(function(){return r})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return a})),n.d(t,"f",(function(){return i})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d}));function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9;return new Promise((function(n){if(0!==t){var r=document.createElement("video"),o=(window.URL||window.webkitURL).createObjectURL(e),a=0,i=0,c=[],s=document.createElement("canvas"),l=s.getContext("2d"),u=function(){i=r.duration/(t-1),r.currentTime=a};r.addEventListener("loadeddata",u);r.addEventListener("seeked",(function e(){!function(){if(l){var e=r.videoWidth,t=r.videoHeight;s.width=e,s.height=t,l.drawImage(r,0,0,e,t),c.push({url:s.toDataURL("image/jpeg")})}}(),(a+=i)<=r.duration?r.currentTime=a:(r.removeEventListener("loadeddata",u),r.removeEventListener("seeked",e),n(c))})),r.src=o}else n([])}))}var a=function(){return"undefined"!=typeof window&&!/Maxthon/.test(window.navigator.userAgent)},i={reprint:"reprint",original:"original"},c=[{value:i.reprint,label:"转载"},{value:i.original,label:"原创"}],s=[".3gp",".asf",".avi",".dat",".f4v",".flv",".m4v",".mkv",".mov",".mp4",".mp4v",".mpe",".mpeg",".mpg",".ra",".ram",".rm",".rmvb",".vob",".webm",".wm",".wmv"],l=2147483648,u=102400,d=3600},function(e,t,n){"use strict";n.d(t,"b",(function(){return q}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(33),h=n.n(p),b=n(41),m=n.n(b),v=n(1),g=n.n(v),y=n(11),O=n.n(y),j=n(825),w=n(30),C=n(232),k=n(208),x=n.n(k),S=n(880),E=n.n(S),R=n(938),T=n.n(R),A=n(83),N=n.n(A),_=n(245),I=n(84),M=n(1091),L=(n(947),n(5)),P=function(){return Object(L.g)("span",{className:"Editable-toolbar-separator"})},B=function(e){var t=e.className,n=m()(e,["className"]);return Object(L.g)(I.b,h()({className:O()(t,"Editable-toolbarMenuItem")},n))},z=n(783),D=n(31);function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}g.a.Component;var U=n(904);function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var q={INLINE_STYLE:"inlineStyle",BLOCK_TYPE:"blockType",ENTITY:"entity",CLEAR_FORMAT:"clearFormat"},H=function(e,t){var n={inlineStyle:!1,blockType:!1,entity:!1,clearFormat:!1};return"atomic"===t&&(n.inlineStyle=!0,n.blockType=!0,n.entity=!0,n.clearFormat=!0),"code-block"===t&&(n.inlineStyle=!0,n.entity=!0),n},K={FIRST_LINE:[U.a.BASIC_STYLING,U.a.LIST_CONTENT,U.a.BLOCK_CONTENT,U.a.STRUCTURE_STYLING,U.a.FORMAT_EDITING],SECOND_LINE:[U.a.BASIC_MEDIA,U.a.PROFESSIONAL_MEDIA,U.a.CUSTOM_MAIN]},Q=function(e){s()(n,e);var t=V(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={isMenuOpen:!1,isMenuAttentionShown:!1},e.timeout=null,e.toolbarRef=g.a.createRef(),e.menuButtonRef=g.a.createRef(),e.showMenuAttention=function(){e.timeout=setTimeout((function(){e.setState({isMenuAttentionShown:!0}),e.timeout=setTimeout((function(){e.setState({isMenuAttentionShown:!1})}),5e3)}),2e3)},e}return i()(n,[{key:"componentDidMount",value:function(){this.props.toolbarMenuAttention&&this.showMenuAttention()}},{key:"componentDidUpdate",value:function(e){this.props.toolbarMenuAttention&&!e.toolbarMenuAttention&&this.showMenuAttention()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"renderToolbarSections",value:function(e){var t=this.props,n=t.currentStyle,r=t.currentBlockType,o=t.onCommand,a=t.plugins,i=Object(U.b)(a),c=H(0,r);return e.map((function(t,a){var s;return Object(L.g)(v.Fragment,{key:t},Object(L.g)(g.a.Fragment,null,T()(i[t],(function(e){var t;return null!==(t=e.priority)&&void 0!==t?t:1/0})).map((function(e){var t,a,i=N()(e,"style"),s=i.onClick,l=i.toolType,u=i.Component,d=void 0===u?M.a:u,f=i.commandName,p=i.shouldActive,b=i.shouldShow,v=void 0===b?function(){return!0}:b,g=i.shouldDisabled,y=void 0===g?function(){return null}:g,O=m()(i,["onClick","toolType","Component","commandName","shouldActive","shouldShow","shouldDisabled"]);if(!v())return null;if(e.section===U.a.MENU){var j,w=e.label,C=e.icon,k=e.onClick,S=e.commandName,R=m()(e,["label","icon","onClick","commandName"]);return Object(L.g)(B,h()({key:null!==(j=e.icon)&&void 0!==j?j:null==d?void 0:d.name,onClick:function(e){null==k||k(e),S&&o(S)}},R),Object(L.g)(C,{text:!0}),w)}var T=x()(Object.assign({onClick:function(e){null==s||s(e),f&&o(f)}},p&&{isActive:p({currentStyle:n,currentBlockType:r})},{disabled:null!==(t=y())&&void 0!==t?t:c[l]},O),(function(e){return!E()(e)}));return Object(L.g)(d,h()({key:null!==(a=e.icon)&&void 0!==a?a:null==d?void 0:d.name},T))}))),a!==K.FIRST_LINE.length-1&&(null===(s=i[e[a+1]])||void 0===s?void 0:s.length)>0&&Object(L.g)(P,null))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=(t.currentStyle,t.currentBlockType),o=t.onCommand,a=t.toolbarMainPlugins,i=t.toolbarSidePlugins,c=t.toolbarMenuPlugins,s=t.toolbarMenuAttention,l=t.isFixed,u=t.style,d=t.menuCallout,f=t.plugins,p=this.state,h=p.isMenuOpen,b=p.isMenuAttentionShown,m=H(0,r),v=Object(U.b)(f);return Object(L.g)(C.b,{block:"Toolbar"},Object(L.g)("div",{style:u,className:O()("Editable-toolbar",n),onMouseDown:function(e){return e.preventDefault()},ref:this.toolbarRef},Object(L.g)("div",{className:"Editable-toolbar-controls"},this.renderToolbarSections(K.FIRST_LINE),Object(L.g)(I.c,{className:"Editable-toolbarMenu",getContainer:function(){return e.toolbarRef.current},toggler:Object(L.g)(M.a,{label:h?null:"更多",icon:j.a,disabled:m.entity,onRef:this.menuButtonRef,onMouseEnter:b?function(){clearTimeout(e.timeout),e.setState({isMenuAttentionShown:!1})}:null}),onClick:function(e){w.a.trackEvent(e.target,{id:1183,action:"Click"})},onOpen:function(){o("click-more"),e.setState({isMenuOpen:!0})},onClose:function(){e.setState({isMenuOpen:!1})}},this.renderToolbarSections([U.a.MENU]),c),Object(L.g)(_.a,{isOpen:b,target:b&&this.menuButtonRef.current,container:this.toolbarRef.current,isFixed:l},s),i&&Object(L.g)(P,null),i),Object(L.g)("div",{className:"Editable-toolbar-controls"},this.renderToolbarSections(K.SECOND_LINE),a&&0===v[U.a.CUSTOM_MAIN].length&&Object(L.g)(P,null),a),d&&g.a.cloneElement(d,{anchor:this.menuButtonRef})))}}]),n}(v.Component);t.a=Q},,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2);function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var u=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.isFollowed,n=e.isFollowing;return t?Object(s.b)("span",{className:"FollowStatus",children:n?"相互关注":"关注了你"}):null}}]),n}(n(1).Component);t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2),o=n(11),a=n.n(o);function i(e){var t=e.header,n=e.options,o=e.className,i=e.onRef,c=e.showOptions,s=void 0===c||c;return Object(r.c)("div",{className:a()("Topbar",o,!1),ref:i,children:[Object(r.b)("div",{className:"Topbar-title",children:t}),s&&Object(r.b)("div",{className:"Topbar-options",children:n})]})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(3),d=n.n(u),f=n(11),p=n.n(f),h=n(1341),b=n(431),m=n(138),v=n(1430),g=n(798),y=n(1098);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var j=function(e){Object(a.a)(n,e);var t=O(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={isFocused:!1},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.large,o=t.value,a=t.onChange,i=t.isButtonActive,c=t.toggler,l=t.disabledDate,u=t.getContainer,d=t.showIcon,f=void 0!==d&&d,O=this.state.isFocused;return Object(s.b)(m.a,{className:p()("DatePicker",n),toggler:c||Object(s.c)(b.a,{large:r,className:p()("DatePicker-Button",{"is-active":O||i}),children:[f&&Object(s.b)(v.a,{center:!0,size:20}),h.a(o,"yyyy/MM/dd"),Object(s.b)(g.a,{css:{marginLeft:8}})]}),onOpen:function(){e.setState({isFocused:!0})},onClose:function(){e.setState({isFocused:!1})},ref:function(t){e.popover=t},placement:"bottom",arrowed:!0,preventCloseOnTarget:!0,getContainer:u,children:Object(s.b)(y.a,{value:o,onChange:function(t){e.popover.close(),a(t)},disabledDate:l})})}}]),n}(l.Component);j.propTypes={toggler:d.a.element,disabledDate:d.a.func}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e){var t=e.annotationDetail;if(!t||!t.showOuter)return null;var n=t.reason,o=t.reasonDescription;return Object(r.b)("span",{className:"AnnotationTag",children:32300===n?"该内容已被标记":o})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(3),d=n.n(u),f=n(79),p=n.n(f),h=n(366),b=n(134),m=n(371);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var g={zhihu:"注册或登录",wechat:"使用微信快速登录",weibo:"使用微博快速登录",qq:"使用 QQ 快速登录"},y={qq:"qqconn",weibo:"sina",wechat:"wechat_mp"},O=function(e){Object(a.a)(n,e);var t=v(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).jumpToOAuthUrl=function(t){var n=e.props.redirectUrl,r=void 0===n?location.href:n,o=Object(m.c)(r),a=o.utm_source,i=o.utm_medium,c=p()(navigator.userAgent).isZhihu;location.href="zhihu"!==t?"https://www.zhihu.com/oauth/redirect/login/".concat(y[t],"?next=/oauth/account_callback&from=").concat(encodeURIComponent(r),"&utm_source=").concat(a,"&ref_source=").concat(i):c?"zhihu://signin?next=".concat(r):"https://www.zhihu.com/signin?next=".concat(r).concat(a?"?utm_source=".concat(a):"")},e.renderSignButtons=function(){var t=e.props.buttons;return"string"==typeof t?e.renderSingleSignButton({name:t}):t.map((function(t){return"string"==typeof t?e.renderSingleSignButton({name:t}):"object"==typeof t?e.renderSingleSignButton(t):null}))},e.renderSingleSignButton=function(t){var n=t.name,r=t.text,o=t.fill,a=t.color,i="#fff"===o||"#ffffff"===o;return Object.keys(g).includes(n)?Object(s.b)("button",{className:"SignInModal-button-".concat(n),style:{backgroundColor:o,borderColor:i?"#0f88eb":o,color:i?"#0f88eb":a},onClick:function(){e.jumpToOAuthUrl(n)},children:r||g[n]},n):null},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.urlScheme,r=this.props.title||"".concat(n?"打开 App 或":"","登录后继续操作");return Object(s.b)(b.b,{size:"small",className:"SignInModal",title:r,onClose:t,children:Object(s.b)(h.a,{module:"SignForm",moduleName:r,trackCardShow:!0,children:Object(s.c)("div",{className:"SignInModal-content",children:[n&&Object(s.b)(m.a,{className:"SignInModal-openInAppButton",href:n,children:"立即打开 App"}),this.renderSignButtons()]})})})}}]),n}(l.Component);O.propTypes={onClose:d.a.func.isRequired,urlScheme:d.a.string,redirectUrl:d.a.string,buttons:d.a.oneOfType([d.a.array,d.a.string])},O.defaultProps={buttons:["zhihu"]}},function(e,t,n){"use strict";var r=n(35),o=n(2),a=n(1),i=n(11),c=n.n(i),s=n(233),l=n.n(s),u=n(385),d=n.n(u),f=n(47),p=Object(f.isBrowser)()?a.useLayoutEffect:function(){};t.a=function(e){var t=e.onKeyDown,n=void 0===t?l.a:t,i=e.onChange,s=e.value,u=e.large,f=e.className,h=e.autoHeight,b=e.autoHeightOnInit,m=e.shiftEnter,v=Object(r.a)(e,["onKeyDown","onChange","value","large","className","autoHeight","autoHeightOnInit","shiftEnter"]),g=Object(a.useRef)(),y=function(){var e=g.current;if(e){e.style.height="1px";var t=Math.max(e.scrollHeight,25);e.style.height="".concat(t,"px")}};p((function(){if(!h){var e=u?100:0,t=g.current;t.style.height="1px",t.style.height="".concat(d()(t.scrollHeight,e,230),"px")}}),[s,u,h]);var O=Object(a.useCallback)((function(e){(m&&"Enter"===e.key&&!e.shiftKey||!u&&"Enter"===e.key)&&(y(),e.preventDefault()),n(e)}),[u,n,m]),j=Object(a.useCallback)((function(e){h&&y(),i&&i(e)}),[i,h]);return Object(a.useEffect)((function(){b&&h&&y()}),[b,h]),Object(o.b)("textarea",Object.assign({},v,{ref:g,onKeyDown:O,value:s,onChange:j,className:c()("AutoSizeTextArea",f)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(72),o=n(133),a=n(56);function i(e,t){Object(a.a)(1,arguments);var n=t||{},i=n.locale,c=i&&i.options&&i.options.weekStartsOn,s=null==c?0:Object(o.a)(c),l=null==n.weekStartsOn?s:Object(o.a)(n.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(r.a)(e),d=u.getDay(),f=(d<l?7:0)+d-l;return u.setDate(u.getDate()-f),u.setHours(0,0,0,0),u}},function(e,t,n){},,function(e,t,n){"use strict";var r=n(1155),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,c,s,l,u=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),c=document.createRange(),s=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=o[t.format]||o.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),c.selectNodeContents(l),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),l&&document.body.removeChild(l),i()}return u}},function(e,t,n){"use strict";var r=n(1),o=n(3),a=n.n(o),i=n(27),c=n(381);function s(e){var t=e.content,n=e.type,o=e.urlToken,a=Object(i.useDispatch)(),s=Object(r.useCallback)((function(){a(Object(c.a)({content:t,type:n,urlToken:o}))}),[a,t,n,o]),l=Object(i.useSelector)((function(e){return Object(c.c)(e,{type:n,urlToken:o})}));return Object(r.useEffect)((function(){l||s()}),[l,s]),null}s.propTypes={content:a.a.string.isRequired,type:a.a.oneOf(["answer","article"]).isRequired,urlToken:a.a.string.isRequired},t.a=s},function(e,t,n){"use strict";var r=n(80),o=n.n(r),a=n(1),i=n.n(a),c=function e(t){var n=function(e,t){return Object.keys(t).reduce((function(e,n){var r=e[n];if(delete e[n],r){var o=t[n],a="function"==typeof o?o(e):o;return Object.assign({},e,a,a&&a.style&&{style:Object.assign({},e.style,a.style)})}return e}),Object.assign({},e))}(t,e.mapProps),r=n.name,a=n.className,c=n.defaultClassName,s=n.size,l=n.center,u=o()(n,["name","className","defaultClassName","size","center"]),d=i.a.createElement("svg",Object.assign({className:"".concat(c," ").concat(c,"--").concat(r).concat(a?" ".concat(a):"")},u,s&&{width:s,height:s}));return l?i.a.createElement("span",{style:e.strutStyle},"",d):d};c.defaultProps={defaultClassName:"Icon",fill:"currentColor"},c.mapProps={text:{size:"1.2em"}},c.strutStyle={display:"inline-flex",alignItems:"center"},t.a=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return Lf}));var r=n(4),o=n(43),a=n(14),i=n(15),c=n(66),s=n(16),l=n(17),u=n(9),d=n(2),f=n(5),p=n(1),h=n.n(p),b=n(19),m=n(90),v=n(3),g=n.n(v),y=n(11),O=n.n(y),j=n(27),w=n(29),C=n(34),k=n(836),x=n(1287),S=n(1182),E=n(1688),R=n(1689),T=n(30),A=n(232),N=n(857),_=n(31),I=n(84),M=n(911),L=n(175),P=n(37),B=n.n(P),z=n(1124),D=n(144),F=n(134),U=[{code:32309,description:"收到大量反对"},{code:32301,description:"可能包含争议观点"},{code:32302,description:"可能存在事实性错误",placeholder:"为了避免对您造成误导,请谨慎甄别"},{code:32303,description:"可能涉及金钱往来",placeholder:"为保障您的财产安全,请谨慎判断"},{code:32304,description:"可能包含剧透"},{code:32306,description:"可能包含具体的医疗建议",placeholder:"网络上的医疗建议仅供参考,如有需要请咨询专业人士或前往医疗机构就医"},{code:32307,description:"可能包含令人不适的图片或视频",placeholder:"为保障您的阅读体验,请谨慎浏览"},{code:32308,description:"已有回应"},{code:32300,description:"其他"}];function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var q=function(e){Object(s.a)(n,e);var t=V(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props,t=e.options,n=e.value,r=e.onChange,o=e.className;return Object(d.b)("div",{className:O()("RadioButtons",o),children:t.map((function(e,t){var o=e.value,a=e.text,i=e.placeholder;return Object(d.c)("label",{className:"RadioButtons-item",children:[Object(d.b)("span",{className:"RadioButtons-text",children:a}),Object(d.b)("input",{type:"radio",className:"RadioButtons-input",value:o,checked:n===o,onChange:function(){return r(o,i)}})]},t)}))})}}]),n}(p.PureComponent);function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}q.propTypes={options:g.a.arrayOf(g.a.shape({value:g.a.string,text:g.a.string,placeholder:g.a.string})).isRequired,value:g.a.string,onChange:g.a.func,className:g.a.string};var K=function(){return n.e(46).then(n.bind(null,2611))},Q=U.map((function(e){var t=e.code,n=e.description,r=e.placeholder;return{text:n,value:String(t),placeholder:r}})),W=function(e){Object(s.a)(n,e);var t=H(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={selectedReasonCode:null,isReasonDescriptionEmpty:!0},e.handleReasonCodeChange=function(t,n){e.setState({selectedReasonCode:Number(t),selectedReasonPlaceholder:n||""}),e.input&&e.input.resetWithValue(n||"")},e.handleAddAnnotation=function(){var t=e.props,n=t.addAnnotation,r=t.type,o=t.urlToken,a=t.showNotification,i=t.onClose;n(r,o,e.state.selectedReasonCode,e.input.toHTML()).then((function(){i(),a&&a("标记内容成功")}))},e.handleReasonDescriptionChange=function(t){e.setState({isReasonDescriptionEmpty:t.isEmpty})},e}return Object(i.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.onClose,r=t.shown,o=t.className,a=this.state,i=a.selectedReasonCode,c=a.isReasonDescriptionEmpty,s=a.selectedReasonPlaceholder,l=function(e){var t=U.find((function(t){return t.code===e}));return t&&t.description}(i),u=32300===i;return Object(d.b)(F.b,{title:"标记内容",subtitle:"请选择标记原因",onClose:n,className:o,children:r&&Object(d.c)("div",{children:[Object(d.c)("div",{className:"AddAnnotationModal-body",children:[Object(d.b)(q,{options:Q,onChange:this.handleReasonCodeChange,value:String(i)}),i&&Object(d.c)("div",{children:[Object(d.c)("div",{className:"AddAnnotationModal-description",children:[l,"",u?"必填":"选填",""]}),Object(d.b)(D.a,{getComponent:K,multiline:!0,richtext:!0,allowMention:!0,large:!0,spread:!0,minRows:2,onRef:function(t){e.input=t},defaultValue:s,placeholder:"请填写原因",onChange:this.handleReasonDescriptionChange})]})]}),Object(d.b)(F.a,{direction:"horizontal",className:"AddAnnotationModal-buttonGroup",children:Object(d.b)(_.c,{preset:"primary",color:"blue",onClick:this.handleAddAnnotation,size:"spread",disabled:!i||u&&c,children:"标记"})})]})})}}]),n}(p.PureComponent);W.propTypes={addAnnotation:g.a.func.isRequired,onClose:g.a.func.isRequired,shown:g.a.bool.isRequired,type:g.a.oneOf([0,1,2]).isRequired,urlToken:g.a.oneOfType([g.a.number,g.a.string]),showNotification:g.a.func,className:g.a.string};var G=n(47),Y=n(79),Z=n.n(Y),X=n(135);function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var $=function(e){Object(s.a)(n,e);var t=J(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={isReasonDescriptionEmpty:!0},e.handleCancelAnnotation=function(){var t=e.props,n=t.cancelAnnotation,r=t.type,o=t.urlToken,a=t.showNotification,i=t.onClose;n(r,o,32305,e.input.value).then((function(){i(),a&&a("撤销标记成功")}))},e.handleReasonDescriptionChange=function(t){return e.setState({isReasonDescriptionEmpty:t.isEmpty})},e}return Object(i.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.onClose,r=t.shown,o=t.className,a=this.state.isReasonDescriptionEmpty;return Object(d.b)(F.b,{title:"你确定要撤销这条内容的标记吗?",onClose:n,className:o,children:r&&Object(d.c)("div",{className:"CancelAnnotationModal",children:[Object(d.b)(X.a,{multiline:!0,large:!0,spread:!0,onRef:function(t){e.input=t},placeholder:"请填写撤销原因(必填)",onChange:this.handleReasonDescriptionChange,className:"CancelAnnotationModal-Input"}),Object(d.c)(F.a,{direction:"horizontal",children:[Object(G.isBrowser)()&&!Z()(window.navigator.userAgent).Mobile&&Object(d.b)(_.c,{onClick:n,size:"spread",children:"取消"}),Object(d.b)(_.c,{preset:"primary",color:"blue",onClick:this.handleCancelAnnotation,size:"spread",className:"CancelAnnotationModal-CancelButton",disabled:a,children:"撤销标记"})]})]})})}}]),n}(p.PureComponent);$.propTypes={cancelAnnotation:g.a.func.isRequired,onClose:g.a.func.isRequired,shown:g.a.bool.isRequired,type:g.a.oneOf([0,1,2]).isRequired,urlToken:g.a.oneOfType([g.a.number.isRequired,g.a.string.isRequired]),showNotification:g.a.func,className:g.a.string};var ee=n(371),te=n(381),ne=n(366),re=n(24),oe=n(68),ae=n(102),ie=n(0),ce=n(7),se=n(48),le=n(6),ue=Object.assign({},Object(le.a)("collaboration",["ADD_ANNOTATION","CANCEL_ANNOTATION"])),de=function(e){return e===re.e?"answers":e===re.g?"pins":e===re.f?"articles":null},fe=n(25),pe=n(379),he=n(53),be=n(216),me=n(36),ve=n(136),ge=n(1086),ye=n(885),Oe=n(988),je=n(1165),we=n(1166),Ce=n(958),ke=n(92),xe=n.n(ke),Se=n(20),Ee=n.n(Se),Re=n(21),Te=n.n(Re),Ae=n(22),Ne=n.n(Ae),_e=n(23),Ie=n.n(_e),Me=n(13),Le=n.n(Me),Pe=n(55),Be=n.n(Pe),ze=n(40),De=n.n(ze),Fe=n(845),Ue=n.n(Fe),Ve=n(80),qe=n.n(Ve),He=n(74),Ke=n.n(He),Qe=n(233),We=n.n(Qe),Ge=n(78),Ye=n(63),Ze=n(365),Xe=n(1305),Je=n(1271),$e=n(1389),et=n(1432),tt=n(835),nt=n(837),rt=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},ot={measureLayout:rt(["layout","layoutId","drag","_layoutResetTransform"]),animation:rt(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:rt(["exit"]),drag:rt(["drag","dragControls"]),focus:rt(["whileFocus"]),hover:rt(["whileHover","onHoverStart","onHoverEnd"]),tap:rt(["whileTap","onTap","onTapStart","onTapCancel"]),pan:rt(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:rt(["layout","layoutId"])};function at(e){for(var t in e){var n=e[t];null!==n&&(ot[t].Component=n)}}var it=n(316),ct=Object(p.createContext)({strict:!1}),st=Object.keys(ot),lt=st.length;var ut=Object(p.createContext)({transformPagePoint:function(e){return e},isStatic:!1}),dt=Object(p.createContext)({});var ft=Object(p.createContext)(null);function pt(e){var t=Object(p.useRef)(null);return null===t.current&&(t.current=e()),t.current}function ht(){var e=Object(p.useContext)(ft);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=gt();Object(p.useEffect)((function(){return r(o)}),[]);return!t&&n?[!1,function(){return null==n?void 0:n(o)}]:[!0]}function bt(e){return null===e||e.isPresent}var mt=0,vt=function(){return mt++},gt=function(){return pt(vt)},yt=Object(p.createContext)(null),Ot="undefined"!=typeof window,jt=Ot?p.useLayoutEffect:p.useEffect;function wt(e,t,n,r){var o=Object(p.useContext)(ut),a=Object(p.useContext)(ct),i=Object(p.useContext)(dt).visualElement,c=Object(p.useContext)(ft),s=function(e){var t=e.layoutId,n=Object(p.useContext)(yt);return n&&void 0!==t?n+"-"+t:t}(n),l=Object(p.useRef)(void 0);r||(r=a.renderer),!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:Object(nt.a)(Object(nt.a)({},n),{layoutId:s}),presenceId:null==c?void 0:c.id,blockInitialAnimation:!1===(null==c?void 0:c.initial)}));var u=l.current;return jt((function(){u&&(u.setProps(Object(nt.a)(Object(nt.a)(Object(nt.a)({},o),n),{layoutId:s})),u.isPresent=bt(c),u.isPresenceRoot=!i||i.presenceId!==(null==c?void 0:c.id),u.syncRender())})),Object(p.useEffect)((function(){var e;u&&(null===(e=u.animationState)||void 0===e||e.animateChanges())})),jt((function(){return function(){return null==u?void 0:u.notifyUnmount()}}),[]),u}function Ct(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function kt(e){return Array.isArray(e)}function xt(e){return"string"==typeof e||kt(e)}function St(e,t,n,r,o){var a;return void 0===r&&(r={}),void 0===o&&(o={}),"string"==typeof t&&(t=null===(a=e.variants)||void 0===a?void 0:a[t]),"function"==typeof t?t(null!=n?n:e.custom,r,o):t}function Et(e,t,n){var r=e.getProps();return St(r,t,null!=n?n:r.custom,function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function Rt(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||xt(e.initial)||xt(e.animate)||xt(e.whileHover)||xt(e.whileDrag)||xt(e.whileTap)||xt(e.whileFocus)||xt(e.exit)}function Tt(e){return Boolean(Rt(e)||e.variants)}function At(e,t){var n=function(e,t){if(Rt(e)){var n=e.initial,r=e.animate;return{initial:!1===n||xt(n)?n:void 0,animate:xt(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,Object(p.useContext)(dt)),r=n.initial,o=n.animate;return Object(p.useMemo)((function(){return{initial:r,animate:o}}),t?[Nt(r),Nt(o)]:[])}function Nt(e){return Array.isArray(e)?e.join(" "):e}function _t(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.useRender,o=e.useVisualState,a=e.Component;return t&&at(t),Object(p.forwardRef)((function(e,t){var i=Object(p.useContext)(ut).isStatic,c=null,s=At(e,i),l=o(e,i);return!i&&Ot&&(s.visualElement=wt(a,l,e,n),c=function(e,t,n){var r=[];if(Object(p.useContext)(ct),!t)return null;for(var o=0;o<lt;o++){var a=st[o],i=ot[a],c=i.isEnabled,s=i.Component;c(e)&&s&&r.push(p.createElement(s,Object(nt.a)({key:a},e,{visualElement:t})))}return r}(e,s.visualElement)),p.createElement(p.Fragment,null,p.createElement(dt.Provider,{value:s},r(a,e,function(e,t,n){return Object(p.useCallback)((function(r){var o;r&&(null===(o=e.mount)||void 0===o||o.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Ct(n)&&(n.current=r))}),[t])}(l,s.visualElement,t),l,i)),c)}))}var It=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Mt(e){return"string"==typeof e&&!e.includes("-")&&!!(It.indexOf(e)>-1||/[A-Z]/.test(e))}var Lt={};var Pt=["","X","Y","Z"],Bt=["transformPerspective","x","y","z"];function zt(e,t){return Bt.indexOf(e)-Bt.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return Pt.forEach((function(t){return Bt.push(e+t)}))}));var Dt=new Set(Bt);function Ft(e){return Dt.has(e)}var Ut=new Set(["originX","originY","originZ"]);function Vt(e){return Ut.has(e)}function qt(e,t){var n=t.layout,r=t.layoutId;return Ft(e)||Vt(e)||(n||void 0!==r)&&(!!Lt[e]||"opacity"===e)}var Ht=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},Kt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Qt(e){return e.startsWith("--")}var Wt=function(e,t){return t&&"number"==typeof e?t.transform(e):e},Gt=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},Yt=function(e){return e%1?Number(e.toFixed(5)):e},Zt=/(-)?([\d]*\.?[\d])+/g,Xt=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Jt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function $t(e){return"string"==typeof e}var en=function(e){return{test:function(t){return $t(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},tn=en("deg"),nn=en("%"),rn=en("px"),on=en("vh"),an=en("vw"),cn=Object(nt.a)(Object(nt.a)({},nn),{parse:function(e){return nn.parse(e)/100},transform:function(e){return nn.transform(100*e)}}),sn={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},ln=Object(nt.a)(Object(nt.a)({},sn),{transform:Gt(0,1)}),un=Object(nt.a)(Object(nt.a)({},sn),{default:1}),dn=Object(nt.a)(Object(nt.a)({},sn),{transform:Math.round}),fn={borderWidth:rn,borderTopWidth:rn,borderRightWidth:rn,borderBottomWidth:rn,borderLeftWidth:rn,borderRadius:rn,radius:rn,borderTopLeftRadius:rn,borderTopRightRadius:rn,borderBottomRightRadius:rn,borderBottomLeftRadius:rn,width:rn,maxWidth:rn,height:rn,maxHeight:rn,size:rn,top:rn,right:rn,bottom:rn,left:rn,padding:rn,paddingTop:rn,paddingRight:rn,paddingBottom:rn,paddingLeft:rn,margin:rn,marginTop:rn,marginRight:rn,marginBottom:rn,marginLeft:rn,rotate:tn,rotateX:tn,rotateY:tn,rotateZ:tn,scale:un,scaleX:un,scaleY:un,scaleZ:un,skew:tn,skewX:tn,skewY:tn,distance:rn,translateX:rn,translateY:rn,translateZ:rn,x:rn,y:rn,z:rn,perspective:rn,transformPerspective:rn,opacity:ln,originX:cn,originY:cn,originZ:rn,zIndex:dn,fillOpacity:ln,strokeOpacity:ln,numOctaves:dn};function pn(e,t,n,r,o,a,i,c){var s,l=e.style,u=e.vars,d=e.transform,f=e.transformKeys,p=e.transformOrigin;f.length=0;var h=!1,b=!1,m=!0;for(var v in t){var g=t[v];if(Qt(v))u[v]=g;else{var y=fn[v],O=Wt(g,y);if(Ft(v)){if(h=!0,d[v]=O,f.push(v),!m)continue;g!==(null!==(s=y.default)&&void 0!==s?s:0)&&(m=!1)}else if(Vt(v))p[v]=O,b=!0;else if((null==n?void 0:n.isHydrated)&&(null==r?void 0:r.isHydrated)&&Lt[v]){var j=Lt[v].process(g,r,n),w=Lt[v].applyTo;if(w)for(var C=w.length,k=0;k<C;k++)l[w[k]]=j;else l[v]=j}else l[v]=O}}r&&n&&i&&c?(l.transform=i(r.deltaFinal,r.treeScale,h?d:void 0),a&&(l.transform=a(d,l.transform)),l.transformOrigin=c(r)):(h&&(l.transform=function(e,t,n,r){var o=e.transform,a=e.transformKeys,i=t.enableHardwareAcceleration,c=void 0===i||i,s=t.allowTransformNone,l=void 0===s||s,u="";a.sort(zt);for(var d=!1,f=a.length,p=0;p<f;p++){var h=a[p];u+=(Kt[h]||h)+"("+o[h]+") ","z"===h&&(d=!0)}return!d&&c?u+="translateZ(0)":u=u.trim(),r?u=r(o,n?"":u):l&&n&&(u="none"),u}(e,o,m,a)),b&&(l.transformOrigin=function(e){var t=e.originX,n=void 0===t?"50%":t,r=e.originY,o=void 0===r?"50%":r,a=e.originZ;return n+" "+o+" "+(void 0===a?0:a)}(p)))}var hn=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function bn(e,t,n){for(var r in t)Ht(t[r])||qt(r,n)||(e[r]=t[r])}function mn(e,t,n){var r={};return bn(r,e.style||{},e),Object.assign(r,function(e,t,n){var r=e.transformTemplate;return Object(p.useMemo)((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};pn(e,t,void 0,void 0,{enableHardwareAcceleration:!n},r);var o=e.vars,a=e.style;return Object(nt.a)(Object(nt.a)({},o),a)}),[t])}(e,t,n)),e.transformValues&&(r=e.transformValues(r)),r}function vn(e,t,n){var r={},o=mn(e,t,n);return Boolean(e.drag)&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=o,r}var gn=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function yn(e){return gn.has(e)}var On=function(e){return!yn(e)};try{var jn=n(267).default;On=function(e){return e.startsWith("on")?!yn(e):jn(e)}}catch(e){}function wn(e,t,n){return"string"==typeof e?e:rn.transform(t+n*e)}var Cn=function(e,t){return rn.transform(e*t)},kn={offset:"stroke-dashoffset",array:"stroke-dasharray"},xn={offset:"strokeDashoffset",array:"strokeDasharray"};function Sn(e,t,n,r,o,a,i,c){var s=t.attrX,l=t.attrY,u=t.originX,d=t.originY,f=t.pathLength,p=t.pathSpacing,h=void 0===p?1:p,b=t.pathOffset,m=void 0===b?0:b;pn(e,Object(nt.d)(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,o,a,i,c),e.attrs=e.style,e.style={};var v=e.attrs,g=e.style,y=e.dimensions,O=e.totalPathLength;v.transform&&(y&&(g.transform=v.transform),delete v.transform),y&&(void 0!==u||void 0!==d||g.transform)&&(g.transformOrigin=function(e,t,n){return wn(t,e.x,e.width)+" "+wn(n,e.y,e.height)}(y,void 0!==u?u:.5,void 0!==d?d:.5)),void 0!==s&&(v.x=s),void 0!==l&&(v.y=l),void 0!==O&&void 0!==f&&function(e,t,n,r,o,a){void 0===r&&(r=1),void 0===o&&(o=0),void 0===a&&(a=!0);var i=a?kn:xn;e[i.offset]=Cn(-o,t);var c=Cn(n,t),s=Cn(r,t);e[i.array]=c+" "+s}(v,O,f,h,m,!1)}var En=function(){return Object(nt.a)(Object(nt.a)({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function Rn(e,t){var n=Object(p.useMemo)((function(){var n=En();return Sn(n,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Object(nt.a)(Object(nt.a)({},n.attrs),{style:Object(nt.a)({},n.style)})}),[t]);if(e.style){var r={};bn(r,e.style,e),n.style=Object(nt.a)(Object(nt.a)({},r),n.style)}return n}function Tn(e){void 0===e&&(e=!1);return function(t,n,r,o,a){var i=o.latestValues,c=(Mt(t)?Rn:vn)(n,i,a),s=function(e,t,n){var r={};for(var o in e)(On(o)||!0===n&&yn(o)||!t&&!yn(o))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),l=Object(nt.a)(Object(nt.a)(Object(nt.a)({},s),c),{ref:r});return Object(p.createElement)(t,l)}}var An=/([a-z])([A-Z])/g,Nn=function(e){return e.replace(An,"$1-$2").toLowerCase()};function _n(e,t){var n=t.style,r=t.vars;for(var o in Object.assign(e.style,n),r)e.style.setProperty(o,r[o])}var In=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function Mn(e,t){for(var n in _n(e,t),t.attrs)e.setAttribute(In.has(n)?n:Nn(n),t.attrs[n])}function Ln(e){var t=e.style,n={};for(var r in t)(Ht(t[r])||qt(r,e))&&(n[r]=t[r]);return n}function Pn(e){var t=Ln(e);for(var n in e){if(Ht(e[n]))t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function Bn(e){return"object"==typeof e&&"function"==typeof e.start}var zn=function(e){return Array.isArray(e)};function Dn(e){var t,n=Ht(e)?e.get():e;return t=n,Boolean(t&&"object"==typeof t&&t.mix&&t.toValue)?n.toValue():n}function Fn(e,t,n,r){var o=e.scrapeMotionValuesFromProps,a=e.createRenderState,i=e.onMount,c={latestValues:Vn(t,n,r,o),renderState:a()};return i&&(c.mount=function(e){return i(t,e,c)}),c}var Un=function(e){return function(t,n){var r=Object(p.useContext)(dt),o=Object(p.useContext)(ft);return n?Fn(e,t,r,o):pt((function(){return Fn(e,t,r,o)}))}};function Vn(e,t,n,r){var o={},a=!1===(null==n?void 0:n.initial),i=r(e);for(var c in i)o[c]=Dn(i[c]);var s=e.initial,l=e.animate,u=Rt(e),d=Tt(e);t&&d&&!u&&!1!==e.inherit&&(null!=s||(s=t.initial),null!=l||(l=t.animate));var f=a||!1===s?l:s;f&&"boolean"!=typeof f&&!Bn(f)&&(Array.isArray(f)?f:[f]).forEach((function(t){var n=St(e,t);if(n){var r=n.transitionEnd;n.transition;var a=Object(nt.d)(n,["transitionEnd","transition"]);for(var i in a)o[i]=a[i];for(var i in r)o[i]=r[i]}}));return o}var qn={useVisualState:Un({scrapeMotionValuesFromProps:Pn,createRenderState:En,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}"path"===t.tagName&&(r.totalPathLength=t.getTotalLength()),Sn(r,o,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Mn(t,r)}})};var Hn,Kn={useVisualState:Un({scrapeMotionValuesFromProps:Ln,createRenderState:hn})};function Qn(e,t,n,r){var o=t.forwardMotionProps,a=void 0!==o&&o,i=Mt(e)?qn:Kn;return Object(nt.a)(Object(nt.a)({},i),{preloadedFeatures:n,useRender:Tn(a),createVisualElement:r,Component:e})}function Wn(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function Gn(e,t,n,r){Object(p.useEffect)((function(){var o=e.current;if(n&&o)return Wn(o,t,n,r)}),[e,t,n,r])}function Yn(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function Zn(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"}(Hn||(Hn={}));var Xn={pageX:0,pageY:0};function Jn(e,t){void 0===t&&(t="page");var n=e.touches[0]||e.changedTouches[0]||Xn;return{x:n[t+"X"],y:n[t+"Y"]}}function $n(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function er(e,t){return void 0===t&&(t="page"),{point:Zn(e)?Jn(e,t):$n(e,t)}}var tr=function(e,t){void 0===t&&(t=!1);var n,r=function(t){return e(t,er(t))};return t?(n=r,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}):r},nr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},rr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function or(e){return Ot&&null===window.onpointerdown?e:Ot&&null===window.ontouchstart?rr[e]:Ot&&null===window.onmousedown?nr[e]:e}function ar(e,t,n,r){return Wn(e,or(t),tr(n,"pointerdown"===t),r)}function ir(e,t,n,r){return Gn(e,or(t),n&&tr(n,"pointerdown"===t),r)}function cr(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var sr=cr("dragHorizontal"),lr=cr("dragVertical");function ur(e){var t=!1;if("y"===e)t=lr();else if("x"===e)t=sr();else{var n=sr(),r=lr();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function dr(){var e=ur(!0);return!e||(e(),!1)}function fr(e,t,n){return function(r,o){var a;Yn(r)&&!dr()&&(null==n||n(r,o),null===(a=e.animationState)||void 0===a||a.setActive(Hn.Hover,t))}}function pr(e){return Object(p.useEffect)((function(){return function(){return e()}}),[])}var hr=function(e,t){return function(n){return t(e(n))}},br=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(hr)};var mr=function(e){return function(t){return e(t),null}},vr={tap:mr((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,a=e.visualElement,i=t||n||r||o,c=Object(p.useRef)(!1),s=Object(p.useRef)(null);function l(){var e;null===(e=s.current)||void 0===e||e.call(s),s.current=null}function u(){var e;return l(),c.current=!1,null===(e=a.animationState)||void 0===e||e.setActive(Hn.Tap,!1),!dr()}function d(e,n){u()&&(!function e(t,n){return!!n&&(t===n||e(t,n.parentElement))}(a.getInstance(),e.target)?null==r||r(e,n):null==t||t(e,n))}function f(e,t){u()&&(null==r||r(e,t))}ir(a,"pointerdown",i?function(e,t){var r;l(),c.current||(c.current=!0,s.current=br(ar(window,"pointerup",d),ar(window,"pointercancel",f)),null==n||n(e,t),null===(r=a.animationState)||void 0===r||r.setActive(Hn.Tap,!0))}:void 0),pr(l)})),focus:mr((function(e){var t=e.whileFocus,n=e.visualElement;Gn(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Hn.Focus,!0)}:void 0),Gn(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Hn.Focus,!1)}:void 0)})),hover:mr((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;ir(o,"pointerenter",t||r?fr(o,!0,t):void 0),ir(o,"pointerleave",n||r?fr(o,!1,n):void 0)}))};function gr(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var yr=function(e,t,n){return Math.min(Math.max(n,e),t)};function Or(e){var t,n,r=e.duration,o=void 0===r?800:r,a=e.bounce,i=void 0===a?.25:a,c=e.velocity,s=void 0===c?0:c,l=e.mass,u=void 0===l?1:l;Object(it.b)(o<=1e4,"Spring duration must be 10 seconds or less");var d=1-i;d=yr(.05,1,d),o=yr(.01,10,o/1e3),d<1?(t=function(e){var t=e*d,n=t*o;return.001-(t-s)/jr(e,d)*Math.exp(-n)},n=function(e){var n=e*d*o,r=n*s+s,a=Math.pow(d,2)*Math.pow(e,2)*o,i=Math.exp(-n),c=jr(Math.pow(e,2),d);return(.001-t(e)>0?-1:1)*((r-a)*i)/c}):(t=function(e){return Math.exp(-e*o)*((e-s)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(s-e))});var f=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o*=1e3,isNaN(f))return{stiffness:100,damping:10,duration:o};var p=Math.pow(f,2)*u;return{stiffness:p,damping:2*d*Math.sqrt(u*p),duration:o}}function jr(e,t){return e*Math.sqrt(1-t*t)}var wr=["duration","bounce"],Cr=["stiffness","damping","mass"];function kr(e,t){return t.some((function(t){return void 0!==e[t]}))}function xr(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.restSpeed,i=void 0===a?2:a,c=e.restDelta,s=Object(nt.d)(e,["from","to","restSpeed","restDelta"]),l={done:!1,value:n},u=function(e){var t=Object(nt.a)({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!kr(e,Cr)&&kr(e,wr)){var n=Or(e);(t=Object(nt.a)(Object(nt.a)(Object(nt.a)({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(s),d=u.stiffness,f=u.damping,p=u.mass,h=u.velocity,b=u.duration,m=u.isResolvedFromDuration,v=Sr,g=Sr;function y(){var e=h?-h/1e3:0,t=o-n,r=f/(2*Math.sqrt(d*p)),a=Math.sqrt(d/p)/1e3;if(null!=c||(c=Math.abs(o-n)<=1?.01:.4),r<1){var i=jr(a,r);v=function(n){var c=Math.exp(-r*a*n);return o-c*((e+r*a*t)/i*Math.sin(i*n)+t*Math.cos(i*n))},g=function(n){var o=Math.exp(-r*a*n);return r*a*o*(Math.sin(i*n)*(e+r*a*t)/i+t*Math.cos(i*n))-o*(Math.cos(i*n)*(e+r*a*t)-i*t*Math.sin(i*n))}}else if(1===r)v=function(n){return o-Math.exp(-a*n)*(t+(e+a*t)*n)};else{var s=a*Math.sqrt(r*r-1);v=function(n){var i=Math.exp(-r*a*n),c=Math.min(s*n,300);return o-i*((e+r*a*t)*Math.sinh(c)+s*t*Math.cosh(c))/s}}}return y(),{next:function(e){var t=v(e);if(m)l.done=e>=b;else{var n=1e3*g(e),r=Math.abs(n)<=i,a=Math.abs(o-t)<=c;l.done=r&&a}return l.value=l.done?o:t,l},flipTarget:function(){var e;h=-h,n=(e=[o,n])[0],o=e[1],y()}}}xr.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var Sr=function(e){return 0},Er=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},Rr=function(e,t,n){return-n*e+n*t+e},Tr=function(e,t){return function(n){return Boolean($t(n)&&Jt.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},Ar=function(e,t,n){return function(r){var o;if(!$t(r))return r;var a=r.match(Zt),i=a[0],c=a[1],s=a[2],l=a[3];return(o={})[e]=parseFloat(i),o[t]=parseFloat(c),o[n]=parseFloat(s),o.alpha=void 0!==l?parseFloat(l):1,o}},Nr=Gt(0,255),_r=Object(nt.a)(Object(nt.a)({},sn),{transform:function(e){return Math.round(Nr(e))}}),Ir={test:Tr("rgb","red"),parse:Ar("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,a=void 0===o?1:o;return"rgba("+_r.transform(t)+", "+_r.transform(n)+", "+_r.transform(r)+", "+Yt(ln.transform(a))+")"}};var Mr={test:Tr("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Ir.transform},Lr={test:Tr("hsl","hue"),parse:Ar("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,a=void 0===o?1:o;return"hsla("+Math.round(t)+", "+nn.transform(Yt(n))+", "+nn.transform(Yt(r))+", "+Yt(ln.transform(a))+")"}},Pr=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},Br=[Mr,Ir,Lr],zr=function(e){return Br.find((function(t){return t.test(e)}))},Dr=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},Fr=function(e,t){var n=zr(e),r=zr(t);Object(it.a)(!!n,Dr(e)),Object(it.a)(!!r,Dr(t)),Object(it.a)(n.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var o=n.parse(e),a=r.parse(t),i=Object(nt.a)({},o),c=n===Lr?Rr:Pr;return function(e){for(var t in i)"alpha"!==t&&(i[t]=c(o[t],a[t],e));return i.alpha=Rr(o.alpha,a.alpha,e),n.transform(i)}},Ur={test:function(e){return Ir.test(e)||Mr.test(e)||Lr.test(e)},parse:function(e){return Ir.test(e)?Ir.parse(e):Lr.test(e)?Lr.parse(e):Mr.parse(e)},transform:function(e){return $t(e)?e:e.hasOwnProperty("red")?Ir.transform(e):Lr.transform(e)}};function Vr(e){var t=[],n=0,r=e.match(Xt);r&&(n=r.length,e=e.replace(Xt,"${c}"),t.push.apply(t,r.map(Ur.parse)));var o=e.match(Zt);return o&&(e=e.replace(Zt,"${n}"),t.push.apply(t,o.map(sn.parse))),{values:t,numColors:n,tokenised:e}}function qr(e){return Vr(e).values}function Hr(e){var t=Vr(e),n=t.values,r=t.numColors,o=t.tokenised,a=n.length;return function(e){for(var t=o,n=0;n<a;n++)t=t.replace(n<r?"${c}":"${n}",n<r?Ur.transform(e[n]):Yt(e[n]));return t}}var Kr=function(e){return"number"==typeof e?0:e};var Qr={test:function(e){var t,n,r,o;return isNaN(e)&&$t(e)&&(null!==(n=null===(t=e.match(Zt))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(Xt))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:qr,createTransformer:Hr,getAnimatableNone:function(e){var t=qr(e);return Hr(e)(t.map(Kr))}},Wr=function(e){return"number"==typeof e};function Gr(e,t){return Wr(e)?function(n){return Rr(e,t,n)}:Ur.test(e)?Fr(e,t):Jr(e,t)}var Yr=function(e,t){var n=Object(nt.e)([],e),r=n.length,o=e.map((function(e,n){return Gr(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}},Zr=function(e,t){var n=Object(nt.a)(Object(nt.a)({},e),t),r={};for(var o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Gr(e[o],t[o]));return function(e){for(var t in r)n[t]=r[t](e);return n}};function Xr(e){for(var t=Qr.parse(e),n=t.length,r=0,o=0,a=0,i=0;i<n;i++)r||"number"==typeof t[i]?r++:void 0!==t[i].hue?a++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:a}}var Jr=function(e,t){var n=Qr.createTransformer(t),r=Xr(e),o=Xr(t);return Object(it.a)(r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),br(Yr(r.parsed,o.parsed),n)},$r=function(e,t){return function(n){return Rr(e,t,n)}};function eo(e,t,n){for(var r,o=[],a=n||("number"==typeof(r=e[0])?$r:"string"==typeof r?Ur.test(r)?Fr:Jr:Array.isArray(r)?Yr:"object"==typeof r?Zr:void 0),i=e.length-1,c=0;c<i;c++){var s=a(e[c],e[c+1]);if(t){var l=Array.isArray(t)?t[c]:t;s=br(l,s)}o.push(s)}return o}function to(e,t,n){var r=void 0===n?{}:n,o=r.clamp,a=void 0===o||o,i=r.ease,c=r.mixer,s=e.length;Object(it.a)(s===t.length,"Both input and output ranges must be the same length"),Object(it.a)(!i||!Array.isArray(i)||i.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var l=eo(t,i,c),u=2===s?function(e,t){var n=e[0],r=e[1],o=t[0];return function(e){return o(Er(n,r,e))}}(e,l):function(e,t){var n=e.length,r=n-1;return function(o){var a=0,i=!1;if(o<=e[0]?i=!0:o>=e[r]&&(a=r-1,i=!0),!i){for(var c=1;c<n&&!(e[c]>o||c===r);c++);a=c-1}var s=Er(e[a],e[a+1],o);return t[a](s)}}(e,l);return a?function(t){return u(yr(e[0],e[s-1],t))}:u}var no,ro=function(e){return function(t){return 1-e(1-t)}},oo=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},ao=function(e){return function(t){return t*t*((e+1)*t-e)}},io=function(e){return e},co=(no=2,function(e){return Math.pow(e,no)}),so=ro(co),lo=oo(co),uo=function(e){return 1-Math.sin(Math.acos(e))},fo=ro(uo),po=oo(fo),ho=ao(1.525),bo=ro(ho),mo=oo(ho),vo=function(e){var t=ao(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),go=function(e){if(1===e||0===e)return e;var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},yo=ro(go);function Oo(e,t){return e.map((function(){return t||lo})).splice(0,e.length-1)}function jo(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.ease,i=e.offset,c=e.duration,s=void 0===c?300:c,l={done:!1,value:n},u=Array.isArray(o)?o:[n,o],d=function(e,t){return e.map((function(e){return e*t}))}(i&&i.length===u.length?i:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(u),s);function f(){return to(d,u,{ease:Array.isArray(a)?a:Oo(u,a)})}var p=f();return{next:function(e){return l.value=p(e),l.done=e>=s,l},flipTarget:function(){u.reverse(),p=f()}}}var wo={keyframes:jo,spring:xr,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,o=void 0===r?0:r,a=e.power,i=void 0===a?.8:a,c=e.timeConstant,s=void 0===c?350:c,l=e.restDelta,u=void 0===l?.5:l,d=e.modifyTarget,f={done:!1,value:o},p=i*n,h=o+p,b=void 0===d?h:d(h);return b!==h&&(p=b-o),{next:function(e){var t=-p*Math.exp(-e/s);return f.done=!(t>u||t<-u),f.value=f.done?b:b+t,f},flipTarget:function(){}}}};var Co="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},ko="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(Co())}),1/60*1e3)};var xo=!0,So=!1,Eo=!1,Ro={delta:0,timestamp:0},To=["read","update","preRender","render","postRender"],Ao=To.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,a=new WeakSet,i={schedule:function(e,i,c){void 0===i&&(i=!1),void 0===c&&(c=!1);var s=c&&o,l=s?t:n;return i&&a.add(e),-1===l.indexOf(e)&&(l.push(e),s&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:function(c){var s;if(o=!0,t=(s=[n,t])[0],(n=s[1]).length=0,r=t.length)for(var l=0;l<r;l++){var u=t[l];u(c),a.has(u)&&(i.schedule(u),e())}o=!1}};return i}((function(){return So=!0})),e}),{}),No=To.reduce((function(e,t){var n=Ao[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),So||Po(),n.schedule(e,t,r)},e}),{}),_o=To.reduce((function(e,t){return e[t]=Ao[t].cancel,e}),{}),Io=To.reduce((function(e,t){return e[t]=function(){return Ao[t].process(Ro)},e}),{}),Mo=function(e){return Ao[e].process(Ro)},Lo=function e(t){So=!1,Ro.delta=xo?1/60*1e3:Math.max(Math.min(t-Ro.timestamp,40),1),Ro.timestamp=t,Eo=!0,To.forEach(Mo),Eo=!1,So&&(xo=!1,ko(e))},Po=function(){So=!0,xo=!0,Eo||ko(Lo)},Bo=function(){return Ro},zo=No;function Do(e,t,n){return void 0===n&&(n=0),e-t-n}var Fo=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return zo.update(t,!0)},stop:function(){return _o.update(t)}}};function Uo(e){var t,n,r,o,a,i=e.from,c=e.autoplay,s=void 0===c||c,l=e.driver,u=void 0===l?Fo:l,d=e.elapsed,f=void 0===d?0:d,p=e.repeat,h=void 0===p?0:p,b=e.repeatType,m=void 0===b?"loop":b,v=e.repeatDelay,g=void 0===v?0:v,y=e.onPlay,O=e.onStop,j=e.onComplete,w=e.onRepeat,C=e.onUpdate,k=Object(nt.d)(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),x=k.to,S=0,E=k.duration,R=!1,T=!0,A=function(e){if(Array.isArray(e.to))return jo;if(wo[e.type])return wo[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?jo:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?xr:jo}(k);(null===(n=(t=A).needsInterpolation)||void 0===n?void 0:n.call(t,i,x))&&(a=to([0,100],[i,x],{clamp:!1}),i=0,x=100);var N=A(Object(nt.a)(Object(nt.a)({},k),{from:i,to:x}));function _(){S++,"reverse"===m?f=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?Do(t+-e,t,n):t-(e-t)+n}(f,E,g,T=S%2==0):(f=Do(f,E,g),"mirror"===m&&N.flipTarget()),R=!1,w&&w()}function I(e){if(T||(e=-e),f+=e,!R){var t=N.next(Math.max(0,f));o=t.value,a&&(o=a(o)),R=T?t.done:f<=0}null==C||C(o),R&&(0===S&&(null!=E||(E=f)),S<h?function(e,t,n,r){return r?e>=t+n:e<=-n}(f,E,g,T)&&_():(r.stop(),j&&j()))}return s&&(null==y||y(),(r=u(I)).start()),{stop:function(){null==O||O(),r.stop()}}}function Vo(e,t){return t?e*(1e3/t):0}var qo=function(e){return 1e3*e},Ho=function(e,t){return 1-3*t+3*e},Ko=function(e,t){return 3*t-6*e},Qo=function(e){return 3*e},Wo=function(e,t,n){return((Ho(t,n)*e+Ko(t,n))*e+Qo(t))*e},Go=function(e,t,n){return 3*Ho(t,n)*e*e+2*Ko(t,n)*e+Qo(t)};function Yo(e,t,n,r){if(e===t&&n===r)return io;for(var o=new Float32Array(11),a=0;a<11;++a)o[a]=Wo(.1*a,e,n);function i(t){for(var r=0,a=1;10!==a&&o[a]<=t;++a)r+=.1;--a;var i=r+.1*((t-o[a])/(o[a+1]-o[a])),c=Go(i,e,n);return c>=.001?function(e,t,n,r){for(var o=0;o<8;++o){var a=Go(t,n,r);if(0===a)return t;t-=(Wo(t,n,r)-e)/a}return t}(t,i,e,n):0===c?i:function(e,t,n,r,o){var a,i,c=0;do{(a=Wo(i=t+(n-t)/2,r,o)-e)>0?n=i:t=i}while(Math.abs(a)>1e-7&&++c<10);return i}(t,r,r+.1,e,n)}return function(e){return 0===e||1===e?e:Wo(i(e),t,r)}}var Zo={linear:io,easeIn:co,easeInOut:lo,easeOut:so,circIn:uo,circInOut:po,circOut:fo,backIn:ho,backInOut:mo,backOut:bo,anticipate:vo,bounceIn:yo,bounceInOut:function(e){return e<.5?.5*(1-go(1-2*e)):.5*go(2*e-1)+.5},bounceOut:go},Xo=function(e){if(Array.isArray(e)){Object(it.a)(4===e.length,"Cubic bezier arrays must contain four numerical values.");var t=Object(nt.c)(e,4);return Yo(t[0],t[1],t[2],t[3])}return"string"==typeof e?(Object(it.a)(void 0!==Zo[e],"Invalid easing type '"+e+"'"),Zo[e]):e},Jo=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Qr.test(t)||t.startsWith("url(")))},$o=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},ea=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},ta=function(){return{type:"keyframes",ease:"linear",duration:.3}},na=function(e){return{type:"keyframes",duration:.8,values:e}},ra={x:$o,y:$o,z:$o,rotate:$o,rotateX:$o,rotateY:$o,rotateZ:$o,scaleX:ea,scaleY:ea,scale:ea,opacity:ta,backgroundColor:ta,color:ta,default:ea},oa=new Set(["brightness","contrast","saturate","opacity"]);function aa(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if("drop-shadow"===n)return e;var o=(r.match(Zt)||[])[0];if(!o)return e;var a=r.replace(o,""),i=oa.has(n)?1:0;return o!==r&&(i*=100),n+"("+i+a+")"}var ia=/([a-z-]*)\(.*?\)/g,ca=Object(nt.a)(Object(nt.a)({},Qr),{getAnimatableNone:function(e){var t=e.match(ia);return t?t.map(aa).join(" "):e}}),sa=Object(nt.a)(Object(nt.a)({},fn),{color:Ur,backgroundColor:Ur,outlineColor:Ur,fill:Ur,stroke:Ur,borderColor:Ur,borderTopColor:Ur,borderRightColor:Ur,borderBottomColor:Ur,borderLeftColor:Ur,filter:ca,WebkitFilter:ca}),la=function(e){return sa[e]};function ua(e,t){var n,r=la(e);return r!==ca&&(r=Qr),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}var da=!1;function fa(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,a=e.loop,i=Object(nt.d)(e,["ease","times","yoyo","flip","loop"]),c=Object(nt.a)({},i);return n&&(c.offset=n),i.duration&&(c.duration=qo(i.duration)),i.repeatDelay&&(c.repeatDelay=qo(i.repeatDelay)),t&&(c.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(Xo):Xo(t)),"tween"===i.type&&(c.type="keyframes"),(r||a||o)&&(Object(it.b)(!da,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),da=!0,r?c.repeatType="reverse":a?c.repeatType="loop":o&&(c.repeatType="mirror"),c.repeat=a||r||o||i.repeat),"spring"!==i.type&&(c.type="keyframes"),c}function pa(e,t,n){var r,o,a,i;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=Object(nt.e)([],Object(nt.c)(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=Object(nt.d)(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=Object(nt.a)(Object(nt.a)({},e),(o=n,a=t.to,i=zn(a)?na:ra[o]||ra.default,Object(nt.a)({to:a},i(a))))),Object(nt.a)(Object(nt.a)({},t),fa(e))}function ha(e,t,n,r,o){var a,i=va(r,e),c=null!==(a=i.from)&&void 0!==a?a:t.get(),s=Jo(e,n);"none"===c&&s&&"string"==typeof n?c=ua(e,n):ba(c)&&"string"==typeof n?c=ma(n):!Array.isArray(n)&&ba(n)&&"string"==typeof c&&(n=ma(c));var l=Jo(e,c);return Object(it.b)(l===s,"You are trying to animate "+e+' from "'+c+'" to "'+n+'". '+c+" is not an animatable value - to enable this animation set "+c+" to a value animatable to "+n+" via the `style` property."),l&&s&&!1!==i.type?function(){var r={from:c,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===i.type||"decay"===i.type?function(e){var t,n=e.from,r=void 0===n?0:n,o=e.velocity,a=void 0===o?0:o,i=e.min,c=e.max,s=e.power,l=void 0===s?.8:s,u=e.timeConstant,d=void 0===u?750:u,f=e.bounceStiffness,p=void 0===f?500:f,h=e.bounceDamping,b=void 0===h?10:h,m=e.restDelta,v=void 0===m?1:m,g=e.modifyTarget,y=e.driver,O=e.onUpdate,j=e.onComplete;function w(e){return void 0!==i&&e<i||void 0!==c&&e>c}function C(e){return void 0===i?c:void 0===c||Math.abs(i-e)<Math.abs(c-e)?i:c}function k(e){null==t||t.stop(),t=Uo(Object(nt.a)(Object(nt.a)({},e),{driver:y,onUpdate:function(t){var n;null==O||O(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:j}))}function x(e){k(Object(nt.a)({type:"spring",stiffness:p,damping:b,restDelta:v},e))}if(w(r))x({from:r,velocity:a,to:C(r)});else{var S=l*a+r;void 0!==g&&(S=g(S));var E,R,T=C(S),A=T===i?-1:1;k({type:"decay",from:r,velocity:a,timeConstant:d,power:l,restDelta:v,modifyTarget:g,onUpdate:w(S)?function(e){E=R,R=e,a=Vo(e-E,Bo().delta),(1===A&&e>T||-1===A&&e<T)&&x({from:e,to:T,velocity:a})}:void 0})}return{stop:function(){return null==t?void 0:t.stop()}}}(Object(nt.a)(Object(nt.a)({},r),i)):Uo(Object(nt.a)(Object(nt.a)({},pa(i,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=i.onUpdate)||void 0===t||t.call(i,e)},onComplete:function(){var e;r.onComplete(),null===(e=i.onComplete)||void 0===e||e.call(i)}}))}:function(){var e;return t.set(n),o(),null===(e=null==i?void 0:i.onComplete)||void 0===e||e.call(i),{stop:function(){}}}}function ba(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function ma(e){return"number"==typeof e?0:ua("",e)}function va(e,t){return e[t]||e.default||e}function ga(e,t,n,r){return void 0===r&&(r={}),t.start((function(o){var a,i,c=ha(e,t,n,r,o),s=function(e,t){var n;return null!==(n=(va(e,t)||{}).delay)&&void 0!==n?n:0}(r,e),l=function(){return i=c()};return s?a=setTimeout(l,qo(s)):l(),function(){clearTimeout(a),null==i||i.stop()}}))}function ya(e,t){-1===e.indexOf(t)&&e.push(t)}function Oa(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var ja=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return ya(this.subscriptions,e),function(){return Oa(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o<r;o++){var a=this.subscriptions[o];a&&a(e,t,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),wa=function(){function e(e){var t,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ja,this.velocityUpdateSubscribers=new ja,this.renderSubscribers=new ja,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=e;var r=Bo(),o=r.delta,a=r.timestamp;n.lastUpdated!==a&&(n.timeDelta=o,n.lastUpdated=a,zo.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return zo.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?Vo(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function Ca(e){return new wa(e)}var ka=function(e){return function(t){return t.test(e)}},xa=[sn,rn,nn,tn,an,on,{test:function(e){return"auto"===e},parse:function(e){return e}}],Sa=function(e){return xa.find(ka(e))},Ea=Object(nt.e)(Object(nt.e)([],Object(nt.c)(xa)),[Ur,Qr]),Ra=function(e){return Ea.find(ka(e))};function Ta(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ca(n))}function Aa(e,t){var n=Et(e,t),r=n?e.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,a=void 0===o?{}:o;r.transition;var i,c=Object(nt.d)(r,["transitionEnd","transition"]);for(var s in c=Object(nt.a)(Object(nt.a)({},c),a)){Ta(e,s,(i=c[s],zn(i)?i[i.length-1]||0:i))}}function Na(e,t){Object(nt.e)([],Object(nt.c)(t)).reverse().forEach((function(n){var r,o=e.getVariant(n);o&&Aa(e,o),null===(r=e.variantChildren)||void 0===r||r.forEach((function(e){Na(e,t)}))}))}function _a(e,t){if(t)return(t[e]||t.default||t).from}function Ia(e,t,n){var r;if(void 0===n&&(n={}),e.notifyAnimationStart(),Array.isArray(t)){var o=t.map((function(t){return Ma(e,t,n)}));r=Promise.all(o)}else if("string"==typeof t)r=Ma(e,t,n);else{var a="function"==typeof t?Et(e,t,n.custom):t;r=La(e,a,n)}return r.then((function(){return e.notifyAnimationComplete(t)}))}function Ma(e,t,n){var r;void 0===n&&(n={});var o=Et(e,t,n.custom),a=(o||{}).transition,i=void 0===a?e.getDefaultTransition()||{}:a;n.transitionOverride&&(i=n.transitionOverride);var c=o?function(){return La(e,o,n)}:function(){return Promise.resolve()},s=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=i.delayChildren,a=void 0===o?0:o,c=i.staggerChildren,s=i.staggerDirection;return function(e,t,n,r,o,a){void 0===n&&(n=0);void 0===r&&(r=0);void 0===o&&(o=1);var i=[],c=(e.variantChildren.size-1)*r,s=1===o?function(e){return void 0===e&&(e=0),e*r}:function(e){return void 0===e&&(e=0),c-e*r};return Array.from(e.variantChildren).sort(Pa).forEach((function(e,r){i.push(Ma(e,t,Object(nt.a)(Object(nt.a)({},a),{delay:n+s(r)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(i)}(e,t,a+r,c,s,n)}:function(){return Promise.resolve()},l=i.when;if(l){var u=Object(nt.c)("beforeChildren"===l?[c,s]:[s,c],2),d=u[0],f=u[1];return d().then(f)}return Promise.all([c(),s(n.delay)])}function La(e,t,n){var r,o=void 0===n?{}:n,a=o.delay,i=void 0===a?0:a,c=o.transitionOverride,s=o.type,l=e.makeTargetAnimatable(t),u=l.transition,d=void 0===u?e.getDefaultTransition():u,f=l.transitionEnd,p=Object(nt.d)(l,["transition","transitionEnd"]);c&&(d=c);var h=[],b=s&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[s]);for(var m in p){var v=e.getValue(m),g=p[m];if(!(!v||void 0===g||b&&Ba(b,m))){var y=ga(m,v,g,Object(nt.a)({delay:i},d));h.push(y)}}return Promise.all(h).then((function(){f&&Aa(e,f)}))}function Pa(e,t){return e.sortNodePosition(t)}function Ba(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}var za=[Hn.Animate,Hn.Hover,Hn.Tap,Hn.Drag,Hn.Focus,Hn.Exit],Da=Object(nt.e)([],Object(nt.c)(za)).reverse(),Fa=za.length;function Ua(e){var t,n=function(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return Ia(e,n,r)})))}}(e),r=((t={})[Hn.Animate]=Va(!0),t[Hn.Hover]=Va(),t[Hn.Tap]=Va(),t[Hn.Drag]=Va(),t[Hn.Focus]=Va(),t[Hn.Exit]=Va(),t),o={},a=!0,i=function(t,n){var r=Et(e,n);if(r){r.transition;var o=r.transitionEnd,a=Object(nt.d)(r,["transition","transitionEnd"]);t=Object(nt.a)(Object(nt.a)(Object(nt.a)({},t),a),o)}return t};function c(t,c){for(var s,l=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set,p={},h=1/0,b=function(n){var o=Da[n],b=r[o],m=null!==(s=l[o])&&void 0!==s?s:u[o],v=xt(m),g=o===c?b.isActive:null;!1===g&&(h=n);var y=m===u[o]&&m!==l[o]&&v;if(y&&a&&e.manuallyAnimateOnMount&&(y=!1),b.protectedKeys=Object(nt.a)({},p),!b.isActive&&null===g||!m&&!b.prevProp||Bn(m)||"boolean"==typeof m)return"continue";var O=function(e,t){if("string"==typeof t)return t!==e;if(kt(t))return!gr(t,e);return!1}(b.prevProp,m)||o===c&&b.isActive&&!y&&v||n>h&&v,j=Array.isArray(m)?m:[m],w=j.reduce(i,{});!1===g&&(w={});var C=b.prevResolvedValues,k=void 0===C?{}:C,x=Object(nt.a)(Object(nt.a)({},k),w),S=function(e){O=!0,f.delete(e),b.needsAnimating[e]=!0};for(var E in x){var R=w[E],T=k[E];p.hasOwnProperty(E)||(R!==T?zn(R)&&zn(T)?gr(R,T)?b.protectedKeys[E]=!0:S(E):void 0!==R?S(E):f.add(E):void 0!==R&&f.has(E)?S(E):b.protectedKeys[E]=!0)}b.prevProp=m,b.prevResolvedValues=w,b.isActive&&(p=Object(nt.a)(Object(nt.a)({},p),w)),a&&e.blockInitialAnimation&&(O=!1),O&&!y&&d.push.apply(d,Object(nt.e)([],Object(nt.c)(j.map((function(e){return{animation:e,options:Object(nt.a)({type:o},t)}})))))},m=0;m<Fa;m++)b(m);if(o=Object(nt.a)({},p),f.size){var v={};f.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(v[t]=n)})),d.push({animation:v})}var g=Boolean(d.length);return a&&!1===l.initial&&!e.manuallyAnimateOnMount&&(g=!1),a=!1,g?n(d):Promise.resolve()}return{isAnimated:function(e){return void 0!==o[e]},animateChanges:c,setActive:function(t,n,o){var a;return r[t].isActive===n?Promise.resolve():(null===(a=e.variantChildren)||void 0===a||a.forEach((function(e){var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)})),r[t].isActive=n,c(o,t))},setAnimateFunction:function(t){n=t(e)},getState:function(){return r}}}function Va(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var qa={animation:mr((function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=Ua(t)),Bn(n)&&Object(p.useEffect)((function(){return n.subscribe(t)}),[n])})),exit:mr((function(e){var t=e.custom,n=e.visualElement,r=Object(nt.c)(ht(),2),o=r[0],a=r[1],i=Object(p.useContext)(ft);Object(p.useEffect)((function(){var e,r,c=null===(e=n.animationState)||void 0===e?void 0:e.setActive(Hn.Exit,!o,{custom:null!==(r=null==i?void 0:i.custom)&&void 0!==r?r:t});!o&&(null==c||c.then(a))}),[o])}))},Ha=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Ka=function(e){return Ha(e)&&e.hasOwnProperty("z")},Qa=function(e,t){return Math.abs(e-t)};function Wa(e,t){if(Wr(e)&&Wr(t))return Qa(e,t);if(Ha(e)&&Ha(t)){var n=Qa(e.x,t.x),r=Qa(e.y,t.y),o=Ka(e)&&Ka(t)?Qa(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var Ga=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=Xa(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=Wa(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,a=Bo().timestamp;r.history.push(Object(nt.a)(Object(nt.a)({},o),{timestamp:a}));var i=r.handlers,c=i.onStart,s=i.onMove;t||(c&&c(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),s&&s(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=Ya(t,r.transformPagePoint),Yn(e)&&0===e.buttons?r.handlePointerUp(e,t):zo.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,a=n.onSessionEnd,i=Xa(Ya(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,i),a&&a(e,i)},!(Zn(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var a=Ya(er(e),this.transformPagePoint),i=a.point,c=Bo().timestamp;this.history=[Object(nt.a)(Object(nt.a)({},i),{timestamp:c})];var s=t.onSessionStart;s&&s(e,Xa(a,this.history)),this.removeListeners=br(ar(window,"pointermove",this.handlePointerMove),ar(window,"pointerup",this.handlePointerUp),ar(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),_o.update(this.updatePoint)},e}();function Ya(e,t){return t?{point:t(e.point)}:e}function Za(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xa(e,t){var n=e.point;return{point:n,delta:Za(n,$a(t)),offset:Za(n,Ja(t)),velocity:ei(t,.1)}}function Ja(e){return e[0]}function $a(e){return e[e.length-1]}function ei(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=$a(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qo(t)));)n--;if(!r)return{x:0,y:0};var a=(o.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function ti(e){return e}function ni(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var ri={translate:0,scale:1,origin:0,originPoint:0};function oi(){return{x:Object(nt.a)({},ri),y:Object(nt.a)({},ri)}}function ai(e){return[e("x"),e("y")]}function ii(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e<r?e=n?Rr(r,e,n.min):Math.max(e,r):void 0!==o&&e>o&&(e=n?Rr(o,e,n.max):Math.min(e,o)),e}function ci(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function si(e,t){var n,r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=(n=Object(nt.c)([o,r],2))[0],o=n[1]),{min:e.min+r,max:e.min+o}}function li(e,t,n){return{min:ui(e,t),max:ui(e,n)}}function ui(e,t){var n;return"number"==typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function di(e,t){return ni(function(e,t){var n=e.top,r=e.left,o=e.bottom,a=e.right;void 0===t&&(t=ti);var i=t({x:r,y:n}),c=t({x:a,y:o});return{top:i.y,left:i.x,bottom:c.y,right:c.x}}(e.getBoundingClientRect(),t))}function fi(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),Wa(e,t)<n}function pi(e){return e.max-e.min}function hi(e,t){var n=.5,r=pi(e),o=pi(t);return o>r?n=Er(t.min,t.max-r,e.min):r>o&&(n=Er(e.min,e.max-o,t.min)),yr(0,1,n)}function bi(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=Rr(t.min,t.max,e.origin),e.scale=pi(n)/pi(t),fi(e.scale,1,1e-4)&&(e.scale=1),e.translate=Rr(n.min,n.max,e.origin)-e.originPoint,fi(e.translate)&&(e.translate=0)}function mi(e,t,n,r){bi(e.x,t.x,n.x,vi(r.originX)),bi(e.y,t.y,n.y,vi(r.originY))}function vi(e){return"number"==typeof e?e:.5}function gi(e,t,n){e.min=n.min+t.min,e.max=e.min+pi(t)}var yi=function(e,t){return e.depth-t.depth};function Oi(e){return e.projection.isEnabled||e.shouldResetTransform()}function ji(e,t){void 0===t&&(t=[]);var n=e.parent;return n&&ji(n,t),Oi(e)&&t.push(e),t}function wi(e){if(!e.shouldResetTransform()){var t,n=e.getLayoutState();e.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=e.measureViewportBox(),n.layoutCorrected=(t=n.layout,{x:Object(nt.a)({},t.x),y:Object(nt.a)({},t.y)}),e.notifyLayoutMeasure(n.layout,e.prevViewportBox||n.layout),zo.update((function(){return e.rebaseProjectionTarget()}))}}function Ci(e,t){return{min:t.min-e.min,max:t.max-e.min}}function ki(e,t){return{x:Ci(e.x,t.x),y:Ci(e.y,t.y)}}function xi(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||void 0===r&&e!==t}function Si(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function Ei(e,t){e.min=t.min,e.max=t.max}function Ri(e,t,n){return n+t*(e-n)}function Ti(e,t,n,r,o){return void 0!==o&&(e=Ri(e,o,r)),Ri(e,n,r)+t}function Ai(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),e.min=Ti(e.min,t,n,r,o),e.max=Ti(e.max,t,n,r,o)}function Ni(e,t){var n=t.x,r=t.y;Ai(e.x,n.translate,n.scale,n.originPoint),Ai(e.y,r.translate,r.scale,r.originPoint)}function _i(e,t,n,r){var o=Object(nt.c)(r,3),a=o[0],i=o[1],c=o[2];e.min=t.min,e.max=t.max;var s=void 0!==n[c]?n[c]:.5,l=Rr(t.min,t.max,s);Ai(e,n[a],n[i],l,n.scale)}var Ii=["x","scaleX","originX"],Mi=["y","scaleY","originY"];function Li(e,t,n){_i(e.x,t.x,n,Ii),_i(e.y,t.y,n,Mi)}function Pi(e,t,n,r,o){return e=Ri(e-=t,1/n,r),void 0!==o&&(e=Ri(e,1/o,r)),e}function Bi(e,t,n){var r=Object(nt.c)(n,3),o=r[0],a=r[1],i=r[2];!function(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5);var a=Rr(e.min,e.max,r)-t;e.min=Pi(e.min,t,n,a,o),e.max=Pi(e.max,t,n,a,o)}(e,t[o],t[a],t[i],t.scale)}function zi(e,t){Bi(e.x,t,Ii),Bi(e.y,t,Mi)}var Di=new Set;function Fi(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function Ui(e){return Di.add(e),function(){return Di.delete(e)}}function Vi(){if(Di.size){var e=0,t=[[]],n=[],r=function(n){return Fi(t,n,e)},o=function(t){Fi(n,t,e),e++};Di.forEach((function(t){t(r,o),e=0})),Di.clear();for(var a=n.length,i=0;i<=a;i++)t[i]&&t[i].forEach(Hi),n[i]&&n[i].forEach(Hi)}}var qi,Hi=function(e){return e()},Ki=new WeakMap,Qi=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),Ki.set(t,this)}return e.prototype.start=function(e,t){var n=this,r=void 0===t?{}:t,o=r.snapToCursor,a=void 0!==o&&o,i=r.cursorProgress,c=this.props.transformPagePoint;this.panSession=new Ga(e,{onSessionStart:function(e){var t;n.stopMotion();var r=function(e){return er(e,"client")}(e).point;null===(t=n.cancelLayout)||void 0===t||t.call(n),n.cancelLayout=Ui((function(e,t){var o=ji(n.visualElement),c=function(e){var t=[];return e.children.forEach((function e(n){Oi(n)&&t.push(n),n.children.forEach(e)})),t.sort(yi)}(n.visualElement),s=Object(nt.e)(Object(nt.e)([],Object(nt.c)(o)),Object(nt.c)(c)),l=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),t((function(){s.forEach((function(e){return e.resetTransform()}))})),e((function(){wi(n.visualElement),c.forEach(wi)})),t((function(){s.forEach((function(e){return e.restoreTransform()})),a&&(l=n.snapToCursor(r))})),e((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var e=n.visualElement.projection;ai((function(t){if(!l){var o=e.target[t],a=o.min,c=o.max;n.cursorProgress[t]=i?i[t]:Er(a,c,r[t])}var s=n.getAxisMotionValue(t);s&&(n.originPoint[t]=s.get())}))})),t((function(){Io.update(),Io.preRender(),Io.render(),Io.postRender()})),e((function(){return n.resolveDragConstraints()}))}))},onStart:function(e,t){var r,o,a,i=n.props,c=i.drag,s=i.dragPropagation;(!c||s||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=ur(c),n.openGlobalLock))&&(Vi(),n.isDragging=!0,n.currentDirection=null,null===(o=(r=n.props).onDragStart)||void 0===o||o.call(r,e,t),null===(a=n.visualElement.animationState)||void 0===a||a.setActive(Hn.Drag,!0))},onMove:function(e,t){var r,o,a,i,c=n.props,s=c.dragPropagation,l=c.dragDirectionLock;if(s||n.openGlobalLock){var u=t.offset;if(l&&null===n.currentDirection)return n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(u),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t.point,u),n.updateAxis("y",t.point,u),null===(i=(a=n.props).onDrag)||void 0===i||i.call(a,e,t),qi=e}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:c})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(Ct(n)?this.resolveRefConstraints(o,n):function(e,t){var n=t.top,r=t.left,o=t.bottom,a=t.right;return{x:ci(e.x,r,a),y:ci(e.y,n,o)}}(o,n)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:li(e,"left","right"),y:li(e,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&ai((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,a=t.current;Object(it.a)(null!==a,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=di(a,o);var i=function(e,t){return{x:si(e.x,t.x),y:si(e.y,t.y)}}(e,this.constraintsBox);if(r){var c=r(function(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}(i));this.hasMutatedConstraints=!!c,c&&(i=ni(c))}return i},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Hn.Drag,!1)},e.prototype.stop=function(e,t){var n,r,o;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var a=this.isDragging;if(this.cancelDrag(),a){var i=t.velocity;this.animateDragEnd(i),null===(o=(r=this.props).onDragEnd)||void 0===o||o.call(r,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return ai((function(n){if(Wi(n,t.props.drag,t.currentDirection)){var r=t.getAxisMotionValue(n);if(!r)return t.cursorProgress[n]=.5,!0;var o=t.visualElement.getLayoutState().layout,a=o[n].max-o[n].min,i=o[n].min+a/2,c=e[n]-i;t.originPoint[n]=e[n],r.set(c)}})).includes(!0)},e.prototype.updateAxis=function(e,t,n){if(Wi(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,n):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var n=this.getAxisMotionValue(e);if(t&&n){var r=this.originPoint[e]+t[e],o=this.constraints?ii(r,this.constraints[e],this.elastic[e]):r;n.set(o)}},e.prototype.updateVisualElementAxis=function(e,t){var n,r=this.visualElement.getLayoutState().layout[e],o=r.max-r.min,a=this.cursorProgress[e],i=function(e,t,n,r,o){var a=e-t*n;return r?ii(a,r,o):a}(t[e],o,a,null===(n=this.constraints)||void 0===n?void 0:n[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,i,i+o)},e.prototype.setProps=function(e){var t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,a=e.dragPropagation,i=void 0!==a&&a,c=e.dragConstraints,s=void 0!==c&&c,l=e.dragElastic,u=void 0===l?.35:l,d=e.dragMomentum,f=void 0===d||d,p=Object(nt.d)(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(nt.a)({drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:s,dragElastic:u,dragMomentum:f},p)},e.prototype.getAxisMotionValue=function(e){var t=this.props,n=t.layout,r=t.layoutId,o="_drag"+e.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==r?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,n=e._dragY;return t||n},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,a=n.dragElastic,i=n.dragTransition,c=function(e,t){void 0===t&&(t=!0);var n,r=e.getProjectionParent();return!!r&&(t?zi(n=ki(r.projection.target,e.projection.target),r.getLatestValues()):n=ki(r.getLayoutState().layout,e.getLayoutState().layout),ai((function(t){return e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),s=this.constraints||{};if(c&&Object.keys(s).length&&this.isLayoutDrag()){var l=this.visualElement.getProjectionParent();if(l){var u=ki(l.projection.targetFinal,s);ai((function(e){var t=u[e],n=t.min,r=t.max;s[e]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var d=ai((function(n){var l;if(Wi(n,r,t.currentDirection)){var u=null!==(l=null==s?void 0:s[n])&&void 0!==l?l:{},d=a?200:1e6,f=a?40:1e7,p=Object(nt.a)(Object(nt.a)({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},i),u);return t.getAxisMotionValue(n)?t.startAxisValueAnimation(n,p):t.visualElement.startLayoutAnimation(n,p,c)}}));return Promise.all(d).then((function(){var e,n;null===(n=(e=t.props).onDragTransitionEnd)||void 0===n||n.call(e)}))},e.prototype.stopMotion=function(){var e=this;ai((function(t){var n=e.getAxisMotionValue(t);n?n.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var n=this.getAxisMotionValue(e);if(n){var r=n.get();return n.set(r),n.set(r),ga(e,n,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.drag;if(Ct(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};ai((function(t){r[t]=hi(e.visualElement.projection.target[t],e.constraintsBox[t])})),this.updateConstraints((function(){ai((function(t){if(Wi(t,n,null)){var o=function(e,t,n){var r=e.max-e.min,o=Rr(t.min,t.max-r,n);return{min:o,max:o+r}}(e.visualElement.projection.target[t],e.constraintsBox[t],r[t]),a=o.min,i=o.max;e.visualElement.setProjectionTargetAxis(t,a,i)}}))})),setTimeout(Vi,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=Ui((function(n,r){var o=ji(t.visualElement);r((function(){return o.forEach((function(e){return e.resetTransform()}))})),n((function(){return wi(t.visualElement)})),r((function(){return o.forEach((function(e){return e.restoreTransform()}))})),n((function(){t.resolveDragConstraints()})),e&&r(e)}))},e.prototype.mount=function(e){var t=this,n=ar(e.getInstance(),"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=Wn(window,"resize",(function(){t.scalePoint()})),o=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),a=e.prevDragCursor;return a&&this.start(qi,{cursorProgress:a}),function(){null==n||n(),null==r||r(),null==o||o(),t.cancelDrag()}},e}();function Wi(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var Gi,Yi,Zi={pan:mr((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,a=e.visualElement,i=t||n||r||o,c=Object(p.useRef)(null),s=Object(p.useContext)(ut).transformPagePoint,l={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){c.current=null,r&&r(e,t)}};Object(p.useEffect)((function(){null!==c.current&&c.current.updateHandlers(l)})),ir(a,"pointerdown",i&&function(e){c.current=new Ga(e,l,{transformPagePoint:s})}),pr((function(){return c.current&&c.current.end()}))})),drag:mr((function(e){var t=e.dragControls,n=e.visualElement,r=Object(p.useContext)(ut).transformPagePoint,o=pt((function(){return new Qi({visualElement:n})}));o.setProps(Object(nt.a)(Object(nt.a)({},e),{transformPagePoint:r})),Object(p.useEffect)((function(){return t&&t.subscribe(o)}),[o]),Object(p.useEffect)((function(){return o.mount(n)}),[])}))};function Xi(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(Gi||(Gi={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(Yi||(Yi={}));var Ji=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function $i(e,t,n){void 0===n&&(n=1),Object(it.a)(n<=4,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var r=Object(nt.c)(function(e){var t=Ji.exec(e);if(!t)return[,];var n=Object(nt.c)(t,3);return[n[1],n[2]]}(e),2),o=r[0],a=r[1];if(o){var i=window.getComputedStyle(t).getPropertyValue(o);return i?i.trim():Xi(a)?$i(a,t,n+1):a}}function ec(e,t){return e/(t.max-t.min)*100}var tc={process:function(e,t,n){var r=n.target;if("string"==typeof e){if(!rn.test(e))return e;e=parseFloat(e)}return ec(e,r.x)+"% "+ec(e,r.y)+"%"}},nc={borderRadius:Object(nt.a)(Object(nt.a)({},tc),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:tc,borderTopRightRadius:tc,borderBottomLeftRadius:tc,borderBottomRightRadius:tc,boxShadow:{process:function(e,t){var n=t.delta,r=t.treeScale,o=e,a=e.includes("var("),i=[];a&&(e=e.replace(Ji,(function(e){return i.push(e),"_$css"})));var c=Qr.parse(e);if(c.length>5)return o;var s=Qr.createTransformer(e),l="number"!=typeof c[0]?1:0,u=n.x.scale*r.x,d=n.y.scale*r.y;c[0+l]/=u,c[1+l]/=d;var f=Rr(u,d,.5);"number"==typeof c[2+l]&&(c[2+l]/=f),"number"==typeof c[3+l]&&(c[3+l]/=f);var p=s(c);if(a){var h=0;p=p.replace("_$css",(function(){var e=i[h];return h++,e}))}return p}}},rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,n,r){void 0===r&&(r={});var o=r.originBox,a=r.targetBox,i=r.visibilityAction,c=r.shouldStackAnimate,s=r.onComplete,l=r.prevParent,u=Object(nt.d)(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=t.props,f=d.visualElement,p=d.layout;if(!1===c)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===c){c&&(t.isAnimatingTree=!0),n=o||n,e=a||e;var h=!1,b=f.getProjectionParent();if(b){var m=b.prevViewportBox,v=b.getLayoutState().layout;l&&(a&&(v=l.getLayoutState().layout),o&&!xi(l,b)&&l.prevViewportBox&&(m=l.prevViewportBox)),m&&lc(l,o,a)&&(h=!0,n=ki(m,n),e=ki(v,e))}var g=oc(n,e),y=ai((function(r){var o,a;if("position"===p){var c=e[r].max-e[r].min;n[r].max=n[r].min+c}if(!f.projection.isTargetLocked)return void 0===i?g?t.animateAxis(r,e[r],n[r],Object(nt.a)(Object(nt.a)({},u),{isRelative:h})):(null===(a=(o=t.stopAxisAnimation)[r])||void 0===a||a.call(o),f.setProjectionTargetAxis(r,e[r].min,e[r].max,h)):void f.setVisibility(i===Yi.Show)}));return f.syncRender(),Promise.all(y).then((function(){t.isAnimatingTree=!1,s&&s(),f.notifyLayoutAnimationComplete()}))}},t}return Object(nt.b)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=ga,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)Lt[t]=e[t]}(nc)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),ai((function(t){var n,r;return null===(r=(n=e.stopAxisAnimation)[t])||void 0===r?void 0:r.call(n)}))},t.prototype.animateAxis=function(e,t,n,r){var o,a,i=this,c=void 0===r?{}:r,s=c.transition,l=c.isRelative;if(!this.isAnimating[e]||!cc(t,this.currentAnimationTarget[e])){null===(a=(o=this.stopAxisAnimation)[e])||void 0===a||a.call(o),this.isAnimating[e]=!0;var u=this.props.visualElement,d=this.frameTarget[e],f=u.getProjectionAnimationProgress()[e];f.clearListeners(),f.set(0),f.set(0);var p=function(){var r=f.get()/1e3;!function(e,t,n,r){e.min=Rr(t.min,n.min,r),e.max=Rr(t.max,n.max,r)}(d,n,t,r),u.setProjectionTargetAxis(e,d.min,d.max,l)};p();var h=f.onChange(p);this.stopAxisAnimation[e]=function(){i.isAnimating[e]=!1,f.stop(),h()},this.currentAnimationTarget[e]=t;var b=s||u.getDefaultTransition()||sc;return ga("x"===e?"layoutX":"layoutY",f,1e3,b&&va(b,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(p.Component);function oc(e,t){return!(ic(e)||ic(t)||cc(e.x,t.x)&&cc(e.y,t.y))}var ac={min:0,max:0};function ic(e){return cc(e.x,ac)&&cc(e.y,ac)}function cc(e,t){return e.min===t.min&&e.max===t.max}var sc={duration:.45,ease:[.4,0,.1,1]};function lc(e,t,n){return e||!e&&!(t||n)}var uc={layoutReady:function(e){return e.notifyLayoutReady()}};function dc(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=void 0===t?uc:t,r=n.layoutReady,o=n.parent;Ui((function(t,n){var a=Array.from(e).sort(yi),i=o?ji(o):[];n((function(){Object(nt.e)(Object(nt.e)([],Object(nt.c)(i)),Object(nt.c)(a)).forEach((function(e){return e.resetTransform()}))})),t((function(){a.forEach(wi)})),n((function(){i.forEach((function(e){return e.restoreTransform()})),a.forEach(r)})),t((function(){a.forEach((function(e){e.isPresent&&(e.presence=Gi.Present)}))})),n((function(){Io.preRender(),Io.render()})),t((function(){zo.postRender((function(){return a.forEach(fc)})),e.clear()}))})),Vi()}}}function fc(e){e.prevViewportBox=e.projection.target}var pc=Object(p.createContext)(dc()),hc=Object(p.createContext)(dc());function bc(e){return!!e.forceUpdate}var mc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(nt.b)(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,n=e.framerSyncLayout,r=e.visualElement;bc(t)&&t.register(r),bc(n)&&n.register(r),r.onUnmount((function(){bc(t)&&t.remove(r),bc(n)&&n.remove(r)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,n=e.visualElement;return bc(t)?t.syncUpdate():(!function(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}(n),t.add(n)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;bc(e)||e.flush()},t.prototype.render=function(){return null},t}(h.a.Component);var vc={measureLayout:function(e){var t=Object(p.useContext)(pc),n=Object(p.useContext)(hc);return h.a.createElement(mc,Object(nt.a)({},e,{syncLayout:t,framerSyncLayout:n}))},layoutAnimation:function(e){var t=Object(nt.c)(ht(),2)[1];return p.createElement(rc,Object(nt.a)({},e,{safeToRemove:t}))}};function gc(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:oi(),deltaFinal:oi(),deltaTransform:""}}var yc=gc();function Oc(e,t,n){var r=e.x,o=e.y,a="translate3d("+r.translate/t.x+"px, "+o.translate/t.y+"px, 0) ";if(n){var i=n.rotate,c=n.rotateX,s=n.rotateY;i&&(a+="rotate("+i+") "),c&&(a+="rotateX("+c+") "),s&&(a+="rotateY("+s+") ")}return a+="scale("+r.scale+", "+o.scale+")",n||a!==wc?a:""}function jc(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var wc=Oc(yc.delta,yc.treeScale,{x:1,y:1}),Cc=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function kc(e,t,n,r){var o,a,i=e.delta,c=e.layout,s=e.layoutCorrected,l=e.treeScale,u=t.target;a=c,Ei((o=s).x,a.x),Ei(o.y,a.y),function(e,t,n){var r=n.length;if(r){var o,a;t.x=t.y=1;for(var i=0;i<r;i++)a=(o=n[i]).getLayoutState().delta,t.x*=a.x.scale,t.y*=a.y.scale,Ni(e,a),Si(o)&&Li(e,e,o.getLatestValues())}}(s,l,n),mi(i,s,u,r)}var xc=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){ya(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Oa(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(yi),this.isDirty=!1,this.children.forEach(e)},e}();var Sc=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,a=e.makeTargetAnimatable,i=e.measureViewportBox,c=e.render,s=e.readValueFromInstance,l=e.resetTransform,u=e.restoreTransform,d=e.removeValueFromRenderState,f=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(e,t){var h=e.parent,b=e.props,m=e.presenceId,v=e.blockInitialAnimation,g=e.visualState;void 0===t&&(t={});var y,O,j,w,C,k,x=g.latestValues,S=g.renderState,E=function(){var e=Cc.map((function(){return new ja})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return Cc.forEach((function(r){var o;null===(o=t[r])||void 0===o||o.call(t);var a="on"+r,i=e[a];i&&(t[r]=n[a](i))}))}};return e.forEach((function(e,t){n["on"+Cc[t]]=function(t){return e.add(t)},n["notify"+Cc[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.notify.apply(e,Object(nt.e)([],Object(nt.c)(t)))}})),n}(),R={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},T=R,A=x,N=gc(),_=!1,I=new Map,M=new Map,L={},P=Object(nt.a)({},x);function B(){y&&(Q.isProjectionReady()&&(Li(T.targetFinal,T.target,A),mi(N.deltaFinal,N.layoutCorrected,T.targetFinal,x)),z(),c(y,S))}function z(){var e=x;if(w&&w.isActive()){var n=w.getCrossfadeState(Q);n&&(e=n)}r(Q,S,e,T,N,t,b)}function D(){E.notifyUpdate(x)}function F(){Q.layoutTree.forEach(Rc)}var U=p(b);for(var V in U){var q=U[V];void 0!==x[V]&&Ht(q)&&q.set(x[V],!1)}var H=Rt(b),K=Tt(b),Q=Object(nt.a)(Object(nt.a)({treeType:n,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,path:h?Object(nt.e)(Object(nt.e)([],Object(nt.c)(h.path)),[h]):[],layoutTree:h?h.layoutTree:new xc,presenceId:m,projection:R,variantChildren:K?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==h?void 0:h.isMounted()),blockInitialAnimation:v,isMounted:function(){return Boolean(y)},mount:function(e){y=Q.current=e,Q.pointTo(Q),K&&h&&!H&&(k=null==h?void 0:h.addVariantChild(Q)),null==h||h.children.add(Q)},unmount:function(){_o.update(D),_o.render(B),_o.preRender(Q.updateLayoutProjection),M.forEach((function(e){return e()})),Q.stopLayoutAnimation(),Q.layoutTree.remove(Q),null==k||k(),null==h||h.children.delete(Q),null==j||j(),E.clearAllListeners()},addVariantChild:function(e){var t,n=Q.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return f&&n===e.treeType?f(Q.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return K?Q:null==h?void 0:h.getClosestVariantNode()},scheduleUpdateLayoutProjection:h?h.scheduleUpdateLayoutProjection:function(){return zo.preRender(Q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return b.layoutId},getInstance:function(){return y},getStaticValue:function(e){return x[e]},setStaticValue:function(e,t){return x[e]=t},getLatestValues:function(){return x},setVisibility:function(e){Q.isVisible!==e&&(Q.isVisible=e,Q.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),a(Q,e,b,t)},addValue:function(e,t){Q.hasValue(e)&&Q.removeValue(e),I.set(e,t),x[e]=t.get(),function(e,t){var n=t.onChange((function(t){x[e]=t,b.onUpdate&&zo.update(D,!1,!0)})),r=t.onRenderRequest(Q.scheduleRender);M.set(e,(function(){n(),r()}))}(e,t)},removeValue:function(e){var t;I.delete(e),null===(t=M.get(e))||void 0===t||t(),M.delete(e),delete x[e],d(e,S)},hasValue:function(e){return I.has(e)},getValue:function(e,t){var n=I.get(e);return void 0===n&&void 0!==t&&(n=Ca(t),Q.addValue(e,n)),n},forEachValue:function(e){return I.forEach(e)},readValue:function(e){var n;return null!==(n=x[e])&&void 0!==n?n:s(y,e,t)},setBaseTarget:function(e,t){P[e]=t},getBaseTarget:function(e){if(o){var t=o(b,e);if(void 0!==t&&!Ht(t))return t}return P[e]}},E),{build:function(){return z(),S},scheduleRender:function(){zo.render(B,!1,!0)},syncRender:B,setProps:function(e){b=e,E.updatePropListeners(e),L=function(e,t,n){var r;for(var o in t){var a=t[o],i=n[o];if(Ht(a))e.addValue(o,a);else if(Ht(i))e.addValue(o,Ca(a));else if(i!==a)if(e.hasValue(o)){var c=e.getValue(o);!c.hasAnimated&&c.set(a)}else e.addValue(o,Ca(null!==(r=e.getStaticValue(o))&&void 0!==r?r:a))}for(var o in n)void 0===t[o]&&e.removeValue(o);return t}(Q,p(b),L)},getProps:function(){return b},getVariant:function(e){var t;return null===(t=b.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return b.transition},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==h?void 0:h.getVariantContext();if(!H){var t=(null==h?void 0:h.getVariantContext())||{};return void 0!==b.initial&&(t.initial=b.initial),t}for(var n={},r=0;r<Nc;r++){var o=Ac[r],a=b[o];(xt(a)||!1===a)&&(n[o]=a)}return n},enableLayoutProjection:function(){R.isEnabled=!0,Q.layoutTree.add(Q)},lockProjectionTarget:function(){R.isTargetLocked=!0},unlockProjectionTarget:function(){Q.stopLayoutAnimation(),R.isTargetLocked=!1},getLayoutState:function(){return N},setCrossfader:function(e){w=e},isProjectionReady:function(){return R.isEnabled&&R.isHydrated&&N.isHydrated},startLayoutAnimation:function(e,t,n){void 0===n&&(n=!1);var r=Q.getProjectionAnimationProgress()[e],o=n?R.relativeTarget[e]:R.target[e],a=o.min,i=o.max-a;return r.clearListeners(),r.set(a),r.set(a),r.onChange((function(t){Q.setProjectionTargetAxis(e,t,t+i,n)})),Q.animateMotionValue(e,r,0,t)},stopLayoutAnimation:function(){ai((function(e){return Q.getProjectionAnimationProgress()[e].stop()}))},measureViewportBox:function(e){void 0===e&&(e=!0);var n=i(y,t);return e||zi(n,x),n},getProjectionAnimationProgress:function(){return C||(C={x:Ca(0),y:Ca(0)}),C},setProjectionTargetAxis:function(e,t,n,r){var o;void 0===r&&(r=!1),r?(R.relativeTarget||(R.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),o=R.relativeTarget[e]):(R.relativeTarget=void 0,o=R.target[e]),R.isHydrated=!0,o.min=t,o.max=n,_=!0,E.notifySetAxisTarget()},rebaseProjectionTarget:function(e,t){void 0===t&&(t=N.layout);var n=Q.getProjectionAnimationProgress(),r=n.x,o=n.y,a=!(R.relativeTarget||R.isTargetLocked||r.isAnimating()||o.isAnimating());(e||a)&&ai((function(e){var n=t[e],r=n.min,o=n.max;Q.setProjectionTargetAxis(e,r,o)}))},notifyLayoutReady:function(e){!function(e){var t=e.getProjectionParent();if(t){var n=ki(t.getLayoutState().layout,e.getLayoutState().layout);ai((function(t){e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)}))}else e.rebaseProjectionTarget()}(Q),Q.notifyLayoutUpdate(N.layout,Q.prevViewportBox||N.layout,e)},resetTransform:function(){return l(Q,y,b)},restoreTransform:function(){return u(y,S)},updateLayoutProjection:function(){if(Q.isProjectionReady()){var e=N.delta,t=N.treeScale,n=t.x,r=t.y,o=N.deltaTransform;kc(N,T,Q.path,x),_&&Q.notifyViewportBoxUpdate(T.target,e),_=!1;var a=Oc(e,t);a===o&&n===t.x&&r===t.y||Q.scheduleRender(),N.deltaTransform=a}},updateTreeLayoutProjection:function(){Q.layoutTree.forEach(Ec),zo.preRender(F,!1,!0)},getProjectionParent:function(){if(void 0===O){for(var e=!1,t=Q.path.length-1;t>=0;t--){var n=Q.path[t];if(n.projection.isEnabled){e=n;break}}O=e}return O},resolveRelativeTargetBox:function(){var e=Q.getProjectionParent();if(R.relativeTarget&&e&&(function(e,t){gi(e.target.x,e.relativeTarget.x,t.target.x),gi(e.target.y,e.relativeTarget.y,t.target.y)}(R,e.projection),Si(e))){var t=R.target;Li(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(b._layoutResetTransform)},pointTo:function(e){T=e.projection,A=e.getLatestValues(),null==j||j(),j=br(e.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;Q.isPresent?Q.presence=Gi.Present:null===(e=Q.layoutSafeToRemove)||void 0===e||e.call(Q)})))},isPresent:!0,presence:Gi.Entering});return Q}};function Ec(e){e.resolveRelativeTargetBox()}function Rc(e){e.updateLayoutProjection()}var Tc,Ac=Object(nt.e)(["initial"],Object(nt.c)(za)),Nc=Ac.length,_c=new Set(["width","height","top","left","right","bottom","x","y"]),Ic=function(e){return _c.has(e)},Mc=function(e,t){e.set(t,!1),e.set(t)},Lc=function(e){return e===sn||e===rn};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Tc||(Tc={}));var Pc=function(e,t){return parseFloat(e.split(", ")[t])},Bc=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return Pc(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?Pc(i[1],e):0}},zc=new Set(["x","y","z"]),Dc=Bt.filter((function(e){return!zc.has(e)}));var Fc={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Bc(4,13),y:Bc(5,14)},Uc=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=Object(nt.a)({},t),r=Object(nt.a)({},r);var o=Object.keys(t).filter(Ic),a=[],i=!1,c=[];if(o.forEach((function(o){var s=e.getValue(o);if(e.hasValue(o)){var l,u=n[o],d=t[o],f=Sa(u);if(zn(d))for(var p=d.length,h=null===d[0]?1:0;h<p;h++)l?Object(it.a)(Sa(d[h])===l,"All keyframes must be of the same type"):(l=Sa(d[h]),Object(it.a)(l===f||Lc(f)&&Lc(l),"Keyframes must be of the same dimension as the current value"));else l=Sa(d);if(f!==l)if(Lc(f)&&Lc(l)){var b=s.get();"string"==typeof b&&s.set(parseFloat(b)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&l===rn&&(t[o]=d.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==l?void 0:l.transform)&&(0===u||0===d)?0===u?s.set(l.transform(u)):t[o]=f.transform(d):(i||(a=function(e){var t=[];return Dc.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),i=!0),c.push(o),r[o]=void 0!==r[o]?r[o]:t[o],Mc(s,d))}})),c.length){var s=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),a=getComputedStyle(o),i=a.display,c={top:a.top,left:a.left,bottom:a.bottom,right:a.right,transform:a.transform};"none"===i&&t.setStaticValue("display",e.display||"block"),t.syncRender();var s=t.measureViewportBox();return n.forEach((function(n){var o=t.getValue(n);Mc(o,Fc[n](r,c)),e[n]=Fc[n](s,a)})),e}(t,e,c);return a.length&&a.forEach((function(t){var n=Object(nt.c)(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),{target:s,transitionEnd:r}}return{target:t,transitionEnd:r}};function Vc(e,t,n,r){return function(e){return Object.keys(e).some(Ic)}(t)?Uc(e,t,n,r):{target:t,transitionEnd:r}}var qc=function(e,t,n,r){var o=function(e,t,n){var r,o=Object(nt.d)(t,[]),a=e.getInstance();if(!(a instanceof HTMLElement))return{target:o,transitionEnd:n};for(var i in n&&(n=Object(nt.a)({},n)),e.forEachValue((function(e){var t=e.get();if(Xi(t)){var n=$i(t,a);n&&e.set(n)}})),o){var c=o[i];if(Xi(c)){var s=$i(c,a);s&&(o[i]=s,n&&(null!==(r=n[i])&&void 0!==r||(n[i]=c)))}}return{target:o,transitionEnd:n}}(e,t,r);return Vc(e,t=o.target,n,r=o.transitionEnd)};var Hc={treeType:"dom",readValueFromInstance:function(e,t){if(Ft(t)){var n=la(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(Qt(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return di(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var a=t.transition,i=t.transitionEnd,c=Object(nt.d)(t,["transition","transitionEnd"]),s=function(e,t,n){var r,o,a={};for(var i in e)a[i]=null!==(r=_a(i,t))&&void 0!==r?r:null===(o=n.getValue(i))||void 0===o?void 0:o.get();return a}(c,a||{},e);if(o&&(i&&(i=o(i)),c&&(c=o(c)),s&&(s=o(s))),r){!function(e,t,n){var r,o,a,i,c=Object.keys(t).filter((function(t){return!e.hasValue(t)})),s=c.length;if(s)for(var l=0;l<s;l++){var u=c[l],d=t[u],f=null;Array.isArray(d)&&(f=d[0]),null===f&&(f=null!==(o=null!==(r=n[u])&&void 0!==r?r:e.readValue(u))&&void 0!==o?o:t[u]),null!=f&&("string"==typeof f&&/^\-?\d*\.?\d+$/.test(f)?f=parseFloat(f):!Ra(f)&&Qr.test(d)&&(f=ua(u,d)),e.addValue(u,Ca(f)),null!==(a=(i=n)[u])&&void 0!==a||(i[u]=f),e.setBaseTarget(u,f))}}(e,c,s);var l=qc(e,c,s,i);i=l.transitionEnd,c=l.target}return Object(nt.a)({transition:a,transitionEnd:i},c)},scrapeMotionValuesFromProps:Ln,build:function(e,t,n,r,o,a,i){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden");var c=r.isEnabled&&o.isHydrated;pn(t,n,r,o,a,i.transformTemplate,c?Oc:void 0,c?jc:void 0)},render:_n},Kc=Sc(Hc),Qc=Sc(Object(nt.a)(Object(nt.a)({},Hc),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return Ft(t)?(null===(n=la(t))||void 0===n?void 0:n.default)||0:(t=In.has(t)?t:Nn(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Pn,build:function(e,t,n,r,o,a,i){var c=r.isEnabled&&o.isHydrated;Sn(t,n,r,o,a,i.transformTemplate,c?Oc:void 0,c?jc:void 0)},render:Mn})),Wc=function(e,t){return Mt(e)?Qc(t,{enableHardwareAcceleration:!1}):Kc(t,{enableHardwareAcceleration:!0})},Gc=Object(nt.a)(Object(nt.a)(Object(nt.a)(Object(nt.a)({},qa),vr),Zi),vc);function Yc(e){return _t(Qn(e,{forwardMotionProps:!1},Gc,Wc))}function Zc(e){var t=e.children,n=e.features,r=e.strict,o=void 0!==r&&r,a=Object(nt.c)(Object(p.useState)(!Xc(n)),2)[1],i=Object(p.useRef)(void 0);if(!Xc(n)){var c=n.renderer,s=Object(nt.d)(n,["renderer"]);i.current=c,at(s)}return Object(p.useEffect)((function(){Xc(n)&&n().then((function(e){var t=e.renderer;at(Object(nt.d)(e,["renderer"])),i.current=t,a(!0)}))}),[]),p.createElement(ct.Provider,{value:{renderer:i.current,strict:o}},t)}function Xc(e){return"function"==typeof e}var Jc=Object(nt.a)(Object(nt.a)({renderer:Wc},qa),vr);function $c(e){var t=e.children,n=Object(nt.d)(e,["children"]);(n=Object(nt.a)(Object(nt.a)({},Object(p.useContext)(ut)),n)).isStatic=pt((function(){return n.isStatic}));var r="object"==typeof n.transition?n.transition.toString():"",o=Object(p.useMemo)((function(){return n}),[r,n.transformPagePoint]);return p.createElement(ut.Provider,{value:o},t)}var es=function(e){return Yc(e)},ts=new Map;["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Object.defineProperty(es,e,{get:function(){return ts.has(e)||ts.set(e,Yc(e)),ts.get(e)}})}));var ns={transition:{type:"spring",mass:1,stiffness:170,damping:26}},rs=Object(p.createContext)(!1),os=function(e){var t=e.children,n=e.transition,r=void 0===n;return Object(p.useContext)(rs)&&r?t:Object(f.g)(rs.Provider,{value:!0},Object(f.g)(Zc,{features:Jc},Object(f.g)($c,{transition:r?ns:n},t)))},as=n(140),is=n(122),cs=(n(387),n(364)),ss=n(574),ls=n(784),us=n(132);n(369);var ds=function(e){var t=e.as,n=void 0===t?"svg":t,r=e.size,o=qe()(e,["as","size"]);return Object(f.g)(n,Object.assign({},o,r&&{width:r,height:r}))},fs={name:"g9eqf4-StrutAlign",styles:"display:inline-flex;align-items:center;;label:StrutAlign;"},ps=function(e){var t=e.children;return Object(f.g)("span",{css:fs},"",t)},hs=function(e){return Object(f.g)("path",Object.assign({d:"M2.63951518,13.3895441 C3.70763333,14.2842292 4.44777637,16.1226061 4.30075305,17.5023312 L4.32211542,17.3063047 C4.17509209,18.6910561 5.17786655,19.7063729 6.5613937,19.5844846 L6.364106,19.6008202 C7.75140298,19.4789319 9.57474349,20.2554985 10.4468305,21.3349009 L10.3224262,21.1803415 C11.1982831,22.2647703 12.6257916,22.2723098 13.5167278,21.2079863 L13.3898102,21.3600325 C14.2845162,20.2919393 16.1229361,19.5518136 17.5026934,19.6988334 L17.3054057,19.6774716 C18.6914461,19.8244915 19.7067866,18.8217404 19.5836389,17.4395022 L19.6012314,17.6367853 C19.4793403,16.2482641 20.255925,14.4249662 21.3353526,13.5528995 L21.1807897,13.677301 C22.2639871,12.8014646 22.2727834,11.3739894 21.2084351,10.483074 L21.3604848,10.6099886 C20.2923667,9.71530351 19.5522236,7.87818322 19.6992469,6.49720154 L19.6778846,6.69448464 C19.8249079,5.30847665 18.8221335,4.2944164 17.4386063,4.41630468 L17.635894,4.39871256 C16.248597,4.52185742 14.4252565,3.74529084 13.5531695,2.66588842 L13.6775738,2.81919121 C12.8017169,1.73601905 11.3742084,1.72722299 10.4832722,2.79154644 L10.6101898,2.63950024 C9.71548377,3.70759343 7.87706394,4.44771919 6.49730661,4.30195588 L6.69459432,4.32206116 C5.30855394,4.17504128 4.29447,5.17904888 4.41636114,6.56128713 L4.3987686,6.36400404 C4.52065973,7.75126861 3.74407501,9.57456653 2.66464737,10.4478898 L2.81921035,10.3222318 C1.73601288,11.1993248 1.72721662,12.6255433 2.79156494,13.5164587 L2.63951518,13.3895441 Z"},e))},bs=function(){return Object(f.g)("path",{d:"M3.56231227,13.8535307 C2.40051305,12.768677 2.41398885,11.0669203 3.59484487,9.99979213 L3.59222085,9.99654885 C4.26730143,9.45036719 4.79446755,8.21005186 4.7184197,7.34453784 L4.72305873,7.34412719 C4.66942824,5.75539997 5.8824188,4.56066914 7.47188965,4.64242381 L7.47229112,4.6386236 C8.33515314,4.72977993 9.58467253,4.22534048 10.1426329,3.55925173 L10.1462611,3.56228565 C11.2316055,2.40008701 12.9353108,2.41394456 14.0015072,3.59634088 L14.0047263,3.59374004 C14.5498229,4.26841874 15.7896857,4.79521622 16.6545744,4.71844347 L16.6549836,4.72304294 C18.245027,4.66894057 19.4396947,5.88213996 19.3575031,7.47241135 L19.3623099,7.47292747 C19.2704388,8.3358681 19.7742711,9.58421483 20.4407199,10.1424506 L20.437686,10.1460789 C21.5997217,11.2312209 21.5860695,12.9345218 20.4042441,14.0007396 L20.4072865,14.0045125 C19.7325967,14.5495925 19.2055209,15.7896954 19.2815865,16.6561959 L19.2770449,16.6565978 C19.3315454,18.2453037 18.1173775,19.4393568 16.5274188,19.3571512 L16.5269029,19.3619539 C15.6647098,19.270083 14.415408,19.7741709 13.8573671,20.4403558 L13.8537409,20.4373235 C12.76842,21.5995708 11.0650432,21.5864553 9.99899434,20.4039226 L9.99527367,20.406923 C9.45025436,19.7323399 8.21017638,19.2051872 7.34461983,19.2812352 L7.344304,19.2776405 C5.75448683,19.3312904 4.55977145,18.1170085 4.64254978,16.527117 L4.63769921,16.5265942 C4.72957031,15.6644394 4.22547659,14.4151814 3.55928015,13.8571569 L3.56231227,13.8535307 Z"})},ms=function(){return Object(f.g)("path",{d:"M15.7813142,3.57503307 L15.7854711,3.57151971 L15.8921602,3.69421038 C16.4424581,4.28431051 17.5350358,4.74412453 18.2894455,4.73316843 C19.9333771,4.58833861 21.2181294,5.79159049 21.15505,7.4886116 C21.0701034,8.2865101 21.5265142,9.46606744 22.1127648,10.035647 C23.3717224,11.0894606 23.4353862,12.8395995 22.2012979,14.0008558 C21.5713113,14.5098203 21.0601754,15.6488699 21.0713212,16.4574574 C21.2178026,18.101598 20.0080847,19.4177693 18.3112241,19.3546942 C17.5092159,19.2692363 16.3558202,19.7109277 15.7654686,20.3212774 L15.6621219,20.4336952 C14.6500533,21.6427249 13.0849849,21.6436494 11.9474232,20.5631265 C10.8923672,21.6870601 9.32522077,21.5992584 8.24023034,20.4486779 L8.1078387,20.3064513 C7.55404654,19.712602 6.49129072,19.2608283 5.70952995,19.2733367 L5.54483281,19.2812165 C3.90192421,19.4259562 2.78153527,18.2170275 2.84495915,16.5118397 C2.93043705,15.7096812 2.48857834,14.5554516 1.90697576,13.9902121 C0.646877359,12.9371723 0.564979867,11.1620752 1.79820938,10.0003274 C2.42856138,9.49033387 2.93982368,8.35088862 2.92860713,7.54223086 C2.78363994,5.89831142 3.99233598,4.58198069 5.68797562,4.64483357 C6.48630047,4.72917193 7.66684346,4.2727307 8.23582678,3.68720379 C9.25777524,2.46637146 10.9345424,2.36957086 12.0582149,3.44874212 C13.122914,2.42536528 14.7150653,2.44435809 15.755462,3.54647107 L15.7776557,3.57086138 L15.7813142,3.57503307 Z"})},vs=function(e){return Object(f.g)(ds,Object.assign({viewBox:"0 0 24 24",size:30,x:-3,y:-3},e))},gs={name:"svsrxm-Octangle",styles:"overflow:visible!important;;label:Octangle;"},ys=function(e){var t=e.fg,n=e.bg,r=e.stroke,o=e.icon,a=qe()(e,["fg","bg","stroke","icon"]),i=Boolean(n);return Object(f.g)(ds,Object.assign({viewBox:"0 0 24 24",size:24,css:gs},a),Object(f.g)(vs,{fill:r},i?Object(f.g)(ms,null):Object(f.g)(bs,null)),i?Object(f.g)(h.a.Fragment,null,Object(f.g)(hs,{fill:n,transform:"translate(".concat(2,")")}),Object(f.g)(hs,{fill:t,transform:"translate(-".concat(2,")")})):Object(f.g)(hs,{fill:t}),Object(f.g)(o,{size:12,fill:"#fff",x:6+(i?-2:0),y:6}))},Os=function(e){var t=e.size,n=void 0===t?18:t,r=e.center,o=void 0===r||r,a=e.icon,i=e.stroke,c=void 0===i?"background":i,s=e.fg,l=void 0===s?"currentColor":s,u=e.bg,d=qe()(e,["size","center","icon","stroke","fg","bg"]),p=Object(us.f)().colors,h=function(e){return p[e]||e},b=Object(f.g)(ys,Object.assign({size:n,bg:h(u),fg:h(l),stroke:h(c),icon:a},d));return o?Object(f.g)(ps,null,b):b},js=h.a.memo(Os),ws={BadgeG:{fg:"#FF9607",icon:cs.a},BadgeC:{fg:"#0066FF",icon:ss.a},BadgeW:{fg:"#6C53F1",icon:ls.a},BadgeGC:{fg:"#FF9607",bg:"#0066FF",icon:cs.a},BadgeCW:{fg:"#0066FF",bg:"#6C53F1",icon:ss.a},BadgeGW:{fg:"#FF9607",bg:"#6C53F1",icon:cs.a}},Cs=function(e){return Object(f.g)(js,Object.assign({},ws.BadgeG,e))},ks=function(e){return Object(f.g)(js,Object.assign({},ws.BadgeC,e))},xs=function(e){return Object(f.g)(js,Object.assign({},ws.BadgeW,e))},Ss=function(e){return Object(f.g)(js,Object.assign({},ws.BadgeGC,e))},Es=function(e){return Object(f.g)(js,Object.assign({},ws.BadgeCW,e))},Rs=function(e){return Object(f.g)(js,Object.assign({},ws.BadgeGW,e))};var Ts="https://www.zhihu.com/question/48509984",As="https://www.zhihu.com/question/48510028",Ns="https://www.zhihu.com/question/330307214";function _s(e){var t=e.Icon,n=e.badgeInfo,r=e.containerProps,o=qe()(e,["Icon","badgeInfo","containerProps"]);return Object(f.g)(m.Link,Object.assign({href:Object(p.useMemo)((function(){return function(e){if(!e)return null;var t=e.bestAnswerer,n=e.identity,r=e.active,o=e.baike;return t?t.url||Ts:n?n.url||As:r?r.url:o?Ns:null}(n)}),[n]),target:"_blank",display:"inline-block"},r),Object(f.g)(t,o))}function Is(e){return!0===e?"已认证的官方帐号":!1===e?"已认证的个人":"已认证的帐号"}function Ms(e,t){return Object(p.useMemo)((function(){var n,r,o,a,i=e||((n=t)?n.mergedBadges?n.mergedBadges.reduce((function(e,t){return"best"===t.type?e.bestAnswerer=Object.assign({},t,{topics:t.sources}):"identity"===t.type?(e.identity||(e.identity=[]),e.identity.push(t)):e[t.type]=t,e}),{title:n.title}):n.length?(n.forEach((function(e){"identity"===e.type&&(r?r.push(e):r=[e]),"best_answerer"===e.type&&(o=e),"baike"===e.type&&(a=e)})),{identity:r,bestAnswerer:o,baike:a}):{}:{});return{Icon:function(e){if(!e)return null;var t=e.identity,n=e.bestAnswerer,r=e.baike;return t?n?Ss:r?Es:ks:n?r?Rs:Cs:r?xs:null}(i),parsedBadge:i}}),[e,t])}function Ls(e){var t=e.badgeInfo,n=e.badge,r=e.isOrg,o=e.className,a=e.linkify,i=e.enableTooltip,c=qe()(e,["badgeInfo","badge","isOrg","className","linkify","enableTooltip"]),s=Ms(t,n),l=s.Icon,u=s.parsedBadge,d=Object(p.useMemo)((function(){return i?function(e,t){if(e.title)return e.title;var n=e.identity,r=e.bestAnswerer,o=e.baike;return[null==r?void 0:r.description,n&&Is(t),null==o?void 0:o.description].filter(Boolean).join(" · ")}(u,r):null}),[i,u,r]);if(!l)return null;var h=Object.assign({className:o},d&&{"aria-label":d,"data-tooltip":d});return a?Object(f.g)(_s,Object.assign({Icon:l,badgeInfo:u,containerProps:h},c)):Object(f.g)(l,Object.assign({},h,c))}function Ps(e){var t=e.badgeInfo,n=e.badge,r=e.size,o=void 0===r?18:r,a=e.linkify,i=void 0!==a&&a,c=e.enableTooltip,s=void 0!==c&&c,l=e.isOrg,u=void 0!==l&&l,d=qe()(e,["badgeInfo","badge","size","linkify","enableTooltip","isOrg"]);return n||t&&Object.keys(t).length?Object(f.g)(Ls,Object.assign({},d,{badgeInfo:t,badge:n,size:o,linkify:i,enableTooltip:s,isOrg:u})):null}Ps.propTypes={badgeInfo:g.a.object,badge:g.a.oneOfType([g.a.shape({title:g.a.string,mergedBadges:g.a.array,detailBadges:g.a.array}),g.a.arrayOf(g.a.shape({type:g.a.oneOf(["identity","best_answerer","baike"])}))]),linkify:g.a.bool,enableTooltip:g.a.bool,isOrg:g.a.bool};var Bs=h.a.memo(Ps);var zs=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18,n=e/2*(1-1/Math.SQRT2)-t/2,r=parseFloat(n.toFixed(2));return{position:"absolute",right:r,bottom:r}};var Ds=n(876),Fs=n(367),Us=n(44),Vs=n(208),qs=n.n(Vs),Hs=n(404),Ks=n.n(Hs),Qs=n(39),Ws=(n(577),n(154));function Gs(){var e=!1,t=[],n=new Set,r={subscribe:function(e){return n.add(e),function(){n.delete(e)}},start:function(r,o){if(e){var a=[];return n.forEach((function(e){a.push(Ia(e,r,{transitionOverride:o}))})),Promise.all(a)}return new Promise((function(e){t.push({animation:[r,o],resolve:e})}))},set:function(t){return Object(it.a)(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach((function(e){!function(e,t){Array.isArray(t)?Na(e,t):"string"==typeof t?Na(e,[t]):Aa(e,t)}(e,t)}))},stop:function(){n.forEach((function(e){!function(e){e.forEachValue((function(e){return e.stop()}))}(e)}))},mount:function(){return e=!0,t.forEach((function(e){var t=e.animation,n=e.resolve;r.start.apply(r,Object(nt.e)([],Object(nt.c)(t))).then(n)})),function(){e=!1,r.stop()}}};return r}var Ys=n(176);function Zs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Le()(e);if(t){var o=Le()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ie()(this,n)}}var Xs=function(e){var t=e.user,n=e.className,r=e.badgeSize,o=void 0===r?14:r,a=e.isHybrid,i=qe()(e,["user","className","badgeSize","isHybrid"]),c=t.avatarUrl,s=t.badge,l=t.badgeV2,u=t.isOrg,d=t.id,p=Object(us.e)(),b=a?30:24,v="0"===d||""===d,g=Object(f.g)(h.a.Fragment,null,Object(f.g)(m.Image,{size:b,src:c,css:Object(as.a)({borderRadius:a?"50%":"2px"},";label:content;"),className:n}),(null!=l?l:s)&&a&&Object(f.g)(Bs,{size:o,badge:null!=l?l:s,css:zs(2*o,o)}));return v?Object(f.g)("span",i,g):Object(f.g)(m.Box,{size:b,css:Object(as.a)(Object.assign({position:"relative"},p),";label:Avatar;"),className:n},Object(f.g)(Ds.b,{href:"https://www.zhihu.com/".concat(u?"org":"people","/").concat(d),zaType:"Image",onClick:function(e){T.a.trackEvent(e.target,{id:1200,action:"OpenUrl",element_name:"User"})}},g))},Js={400:"请求参数有误",401:"用户认证失败",403:"服务已拒绝",404:"资源不存在",405:"请求方式有误",410:"资源已解散",502:"网关错误",503:"服务无响应",504:"网关超时"},$s=function(e){return function(){var t=Ue()(De.a.mark((function t(n){var r,o,a,i,c=arguments;return De.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=c.length>1&&void 0!==c[1]?c[1]:{},t.next=3,e(n,r);case 3:if(o=t.sent,t.prev=4,a=o.headers.get("content-type"),i=null,!a||-1===a.indexOf("application/json")||204===o.status){t.next=13;break}return t.next=10,o.json();case 10:i=t.sent,t.next=18;break;case 13:return t.t0=JSON,t.next=16,o.text();case 16:t.t1=t.sent,i=t.t0.parse.call(t.t0,t.t1);case 18:if(i=Object(ce.camelizeKeys)(i),o.ok&&!i.error){t.next=22;break}throw i.toastMsg=i.error.message,i;case 22:return t.abrupt("return",i);case 25:throw t.prev=25,t.t2=t.catch(4),t.t2.status=o.status,t.t2;case 29:case"end":return t.stop()}}),t,null,[[4,25]])})));return function(e){return t.apply(this,arguments)}}()},el=function(e){return function(){var t=Ue()(De.a.mark((function t(n,r){return De.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e(n,r);case 3:return t.abrupt("return",t.sent);case 6:throw t.prev=6,t.t0=t.catch(0),400===t.t0.status&&18e4===t.t0.code&&Ye.a.supportsAction("base/unLockAccount").then((function(e){return e&&Ye.a.dispatch("base/unLockAccount")})),t.t0.toastMsg||(t.t0.toastMsg=Js[t.t0.status]||"操作失败"),t.t0;case 11:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(e,n){return t.apply(this,arguments)}}()},tl=function(){throw new Error("Not implemented")},nl=!1,rl=!1,ol=function(){var e=Ue()(De.a.mark((function e(t){var n;return De.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(rl){e.next=3;break}return e.next=3,rl=!0,Ye.a.ready().catch((function(){nl=!0}));case 3:if(!nl){e.next=5;break}return e.abrupt("return",!0);case 5:return e.next=7,Ye.a.dispatch("account/showLoginDialog",{next:t}).catch((function(e){return e}));case 7:if("object"!=typeof(n=e.sent)||"ERR_AUTH_ALREADYLOGIN"!==n.name&&"ERR_ACOUNT_NOTGUEST"!==n.name){e.next=11;break}return nl=!0,e.abrupt("return",nl);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),al=Object(p.createContext)({data:null,dispatch:We.a,authRequired:We.a}),il="LOAD_COMMENT_PREVIEW",cl="TOGGLE_LIKE",sl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=t.payload;if(n===il)return Object(ce.camelizeKeys)(r);if(n===cl){var o=r.id,a=r.nextAction,i=r.rootCommentId;return Object.assign({},e,{data:e.data.map((function(e){return i?i!==e.id?e:Object.assign({},e,{childComments:e.childComments.map((function(t){return t.id!==o?t:Object.assign({},t,{likeCount:e.likeCount+("like"===a?1:-1),liked:"like"===a})}))}):e.id!==o?e:Object.assign({},e,{likeCount:e.likeCount+("like"===a?1:-1),liked:"like"===a})}))})}return e},ll=function(e){var t=e.children,n=e.resourceType,r=e.resourceId,o=e.redirectUrl,a=e.requestHost,i=e.commentUnfoldable,c=e.showInteractions,s=void 0===c||c,l=e.showSecondaryComment,u=e.showSecondaryCommentButton,d=e.showLevelInfo,h=e.preProxy,b=e.onAllCommentsShow,m=void 0===b?We.a:b,v=e.openInApp,g=void 0===v?We.a:v,y=e.listHeight,O=Object(p.useReducer)(sl,null),j=Be()(O,2),w=j[0],C=j[1],k=Object(Ge.c)(function(e){return Ks()("undefined"!=typeof fetch?fetch:tl,[e,el,$s].filter(Boolean))}(h)),x=Object(Ge.c)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"https://www.zhihu.com";return function(t){return function(n){var r=n.target;return ol(e).then((function(e){if(e)return t(r)}))}}}(o)),S=Object(Ge.c)((function(e){for(var t="//".concat(null!=a?a:location.host),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return k.apply(void 0,["".concat(t).concat(e)].concat(r))}));return Object(f.g)(al.Provider,{value:{data:w,dispatch:C,authRequired:x,fetcher:S,resourceType:n,resourceId:r,commentUnfoldable:i,showInteractions:s,showSecondaryComment:l,showSecondaryCommentButton:u,showLevelInfo:d,onAllCommentsShow:m,listHeight:y,openInApp:g}},t)};function ul(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=null;return function(){var o=Date.now();if(!n&&!r||o-r<t){r||(r=o);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return e.apply(this,i)}r=o}}var dl=h.a.forwardRef((function(e,t){var n=e.query,r=void 0===n?{}:n,o=e.children,a=e.innerStyle,i=e.innerRef,c=e.onClick,s=qe()(e,["query","children","innerStyle","innerRef","onClick"]),l=Object(p.useContext)(al),u=l.resourceType,d=l.resourceId,h=l.onAllCommentsShow,b=l.listHeight,m=l.openInApp,v=r.rootCommentId,g=r.anchorCommentId,y=r.openEditor,O=r.replyAuthorName,j=Object(Fs.b)(),w=Object(p.useMemo)((function(){var e=Object(Us.stringify)(Object(ce.decamelizeKeys)(qs()(Object.assign({},r,v&&{isChild:!0},{rootCommentId:void 0,isChild:void 0,anchorCommentId:null!=v?v:g},y&&{openEditor:!0,replyCommentId:g,replyRootCommentId:v,replyAuthorName:O},b&&{listHeight:b,maskTransparent:!0}),Boolean))),t=d,n=u;return r.resourceType&&r.resourceType!==u&&(n=r.resourceType,t=r.resourceId),"https://www.zhihu.com/comment/list/".concat(n,"/").concat(t,"?").concat(e)}),[r,u,d,g,v,O,y,b]);return Object(f.g)(Ds.b,Object.assign({as:"div",ref:t,href:w,onClick:function(e){if(!j.ZhihuHybrid)return e.preventDefault(),void m();null==c||c(e),null==h||h()}},s),Object(f.g)("div",{ref:i,onClick:ul((function(e){e.stopPropagation()}),1e3),css:a},o))})),fl=function(e){Ne()(n,e);var t=Zs(n);function n(){var e;Ee()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleChange=function(t,n){var r=e.props,o=r.onObserve,a=r.onChange;o&&o(t),t.forEach((function(e){a&&a(e,n)}))},e}return Te()(n,[{key:"componentDidMount",value:function(){var e=Object(Qs.findDOMNode)(this);e&&(this.observer=this.createObserver(),this.observer.observe(e))}},{key:"componentWillUnmount",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null)}},{key:"createObserver",value:function(){var e=this.props,t=e.root,n=e.rootMargin,r=e.threshold,o=e.trackVisibility,a=e.delay;return new window.IntersectionObserver(this.handleChange,{root:t,rootMargin:n,threshold:r,trackVisibility:o,delay:a})}},{key:"render",value:function(){return this.props.children}}]),n}(p.Component);function pl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fl.propTypes={root:g.a.object,rootMargin:g.a.string,threshold:g.a.oneOfType([g.a.number,g.a.arrayOf(g.a.number)]),trackVisibility:g.a.bool,delay:g.a.number,onObserve:g.a.func,onChange:g.a.func};var hl=function(e){Ne()(n,e);var t=Zs(n);function n(){var e;Ee()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),pl(xe()(e),"trackCardShowTimer",null),pl(xe()(e),"handleIntersectionChange",(function(t,n){if(t.isIntersecting&&t.intersectionRatio>0){n.disconnect();var r=e.props,o=r.view,a=void 0===o?{}:o,i=r.extra;e.trackCardShowTimer=setTimeout((function(){T.a.trackCardShow(xe()(e),a,i)}))}})),e}return Te()(n,[{key:"componentDidMount",value:function(){this.setModule()}},{key:"componentDidUpdate",value:function(){this.setModule()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.trackCardShowTimer)}},{key:"setModule",value:function(){var e=this.props,t=e.module,n=e.index,r=e.isAd,o=e.moduleName,a=e.content,i=e.list,c=e.card,s=e.attachedInfoBytes;if(t){var l=Object(Qs.findDOMNode)(this);l&&T.a.setModule(l,{module:t,index:n,is_ad:r,module_name:o},function(e,t,n,r){return Object.assign({},e&&{card:{content:e}},t&&{card:t},n&&{list:n},r&&{attached_info_bytes:r})}(a,c,i,s))}}},{key:"render",value:function(){var e=this.props,t=e.visibleThreshold,n=e.trackCardShow,r=e.children;return n?Object(f.g)(fl,{threshold:t,onChange:this.handleIntersectionChange},r):r}}]),n}(p.Component);pl(hl,"propTypes",{id:g.a.string,module:g.a.string,moduleName:g.a.string,index:g.a.number,isAd:g.a.bool,content:g.a.object,extra:g.a.object,trackCardShow:g.a.bool,attachedInfoBytes:g.a.string}),pl(hl,"defaultProps",{id:null,module:null,index:null,isAd:!1,content:null,extra:null,attachedInfoBytes:null,trackCardShow:!1,visibleThreshold:0});var bl={avatarUrl:"https://pic4.zhimg.com/50/da8e974dc_s.jpg",badge:null,id:"0"},ml=["1","0.7","0.4"],vl={name:"y94coq-CommentInput",styles:"display:flex;align-items:center;justify-content:space-between;width:100%;;label:CommentInput;"},gl={name:"15hob7-CommentInput",styles:"width:100%;align-items:center;;label:CommentInput;"},yl={name:"1qhwv8r-CommentInput",styles:"line-height:normal;;label:CommentInput;"},Ol={name:"yi8ge9-CommentInput",styles:"height:34px;align-items:center;margin-right:4px;;label:CommentInput;"},jl=function(e){var t=e.inputPlaceholder,n=e.emoticons,r=e.currentUserId,o=Object(p.useState)([]),a=Be()(o,2),i=a[0],c=a[1],s=Object(p.useState)(bl),l=Be()(s,2),u=l[0],d=l[1];return Object(p.useEffect)((function(){n.length>0&&Ye.a.dispatch("base/getFrequentlyUsedEmoticon",{count:3}).then((function(e){if(null==e?void 0:e.data)return c(e.data.map((function(e){return t=e,n.find((function(e){return e.placeholder===t}));var t})))}))}),[n]),Object(p.useEffect)((function(){r?Ye.a.dispatch("base/getData",{type:"people",id:r}).then((function(e){var t=e.data;t&&d(Object(ce.camelizeKeys)(t))})):Ye.a.dispatch("account/me").then((function(e){if(null==e?void 0:e.url_token){var t=e.avatar_url,n=e.url_token,r=e.badge_v2,o=e.badge;d({avatarUrl:t,id:n,badgeV2:r,badge:o})}}))}),[r]),Object(f.g)(m.Flex,{css:gl},Object(f.g)(Xs,{user:u}),Object(f.g)(hl,{module:"CommentEditView"},Object(f.g)(dl,{as:m.Flex,query:{openEditor:!0},css:function(e){return{flex:1,border:"1px solid ".concat(e.colors.GBK09A),marginLeft:"10px",borderRadius:"8px",height:"36px",paddingLeft:"10px",fontSize:"13px",color:e.colors.GBK06A}},innerStyle:vl,onClick:function(e){return T.a.trackEvent(e.target,{id:1203,action:"Click"})}},Object(f.g)(m.Text,{css:yl},t||"写下你的评论..."),i.length>0&&Object(f.g)(m.Flex,{css:Ol},i.filter(Boolean).map((function(e,t){var n=e.static_image_url,r=e.title;return Object(f.g)("img",{key:r,src:n,css:Object(as.a)({width:"20px",height:"20px",marginRight:"4px",opacity:ml[t]},";label:CommentInput;")})}))))))},wl={hybrid:{username:{fontSize:14,color:"GBK02A"},authorTag:{fontSize:13},content:{lineHeight:"21px"},commentTag:{fontSize:12,height:20,lineHeight:"16px",color:"GBK06A",marginTop:"6px"}},web:{username:{fontSize:15,color:"GBK03A"},authorTag:{fontSize:15},content:{lineHeight:"24px"},commentTag:{fontSize:14,height:24,lineHeight:"24px",color:"GBL05A",marginTop:"4px"}}};function Cl(e){var t=e.name,n=e.nicknameColor,r=void 0===n?{}:n,o=e.showLevelInfo,a=e.isOrg,i=e.id,c=e.className,s=e.uaType,l=Object(us.f)(),u=r.color,d=r.nightModeColor,p=Boolean(o&&u&&d&&!a),h=l.isDarkMode?d:u,b=l.isDarkMode?"#999999":"#1a1a1a",v=p?h:b,g="0"===i||""===i,y=g?m.Text:Ds.b,O=wl[s].username,j=O.fontSize,w=O.color;return Object(f.g)(y,Object.assign({},!g&&{href:"https://www.zhihu.com/".concat(a?"org":"people","/").concat(i),as:m.Text},{color:v||w,fontSize:j,fontWeight:"bold",lineHeight:"16px",css:Object(as.a)([{flex:"0 1 auto"},Object(us.d)(1)],";label:LevelInfoName;"),className:c}),t)}var kl={name:"1ronkat-AuthorLevelIcon",styles:"margin-left:6px;height:16px;display:flex;align-items:center;;label:AuthorLevelIcon;"};function xl(e){var t=e.levelInfo,n=void 0===t?{}:t,r=n.level,o=n.iconInfo,a=o.url,i=o.nightModeUrl,c=Object(us.f)().isDarkMode?i:a;return Object(f.g)("a",{href:"https://www.zhihu.com/level-detail",css:kl},Object(f.g)(m.Image,{height:"14px",src:c,alt:"等级 ".concat(r)}))}var Sl=["comment_gif","comment_img","comment_sticker"],El=function(e,t){return e instanceof NodeList?Object(f.g)(h.a.Fragment,null,[].map.call(e,(function(e,n){return Object(f.g)(p.Fragment,{key:n},t(e,n))}))):t(e)},Rl={class:"className"},Tl=function(e,t){function n(e,t){return e.nodeType===Node.TEXT_NODE?e.nodeValue:e.nodeType===Node.ELEMENT_NODE?Object(p.createElement)("A"===e.nodeName&&t?Ds.b:e.tagName.toLowerCase(),e.attributes?Array.from(e.attributes).reduce((function(e,t){return e[Rl[t.name]||t.name]=t.value,e}),{}):{},e.childNodes.length?El(e.childNodes,n):null):null}return El(e,(function(e){return t(e,(function(t){return n(e,t)}))}))},Al=function(e,t){return e.replace(/(\[[^[^\]]+\])/g,(function(e){var n=t.find((function(t){return t.placeholder===e}));return n?"<img src=".concat(n.static_image_url,' class="sticker" />'):e}))},Nl=h.a.memo((function(e){return function(e){if("undefined"==typeof DOMParser)return Object(f.g)("div",{dangerouslySetInnerHTML:{__html:e}});var t=(new DOMParser).parseFromString(e,"text/html");return Tl(t.body.childNodes,(function(e,t){return e.nodeType===Node.ELEMENT_NODE?t(!0):e.textContent}))}(e.text)})),_l=function(e){var t=e.tagInfo,n=e.richText,r=e.responseLink,o=e.className,a=Object(Ws.b)().isDarkMode;if(!t)return null;var i=t.text,c=t.color,s=t.nightColor,l=t.hasBorder,u=t.borderColor,d=t.borderNightColor,h=t.targetLink,b=h&&r,m=Object(p.useContext)(al).openInApp,v=Object(Fs.b)(),g=Object(Ge.c)((function(e){b&&!v.ZhihuHybrid&&(e.preventDefault(),m())})),y=b?Ds.b:"span";return Object(f.g)(y,Object.assign({css:function(e){return Object.assign({},l&&u&&Object(us.c)({border:"1px solid ".concat(a?d:u),borderRadius:"4px"}),b&&{textDecoration:"none"},{height:"14px",fontSize:"10px",lineHeight:"15px",boxSizing:"border-box",marginLeft:"4px",padding:"0 4px","& a":{color:e.colors.GBL01A,textDecoration:"none"}})},className:o,style:{color:a?s:c},onClick:g},Boolean(b)&&{href:h}),n?Object(f.g)(Nl,{text:i}):i,Boolean(h)&&Object(f.g)(Xe.a,{css:function(e){return{fill:e.colors[c],marginRight:"-2px"}},center:!0,size:12}))};var Il={answer:"回答",article:"文章",pin:"想法"},Ml={name:"35g1vl-Vip",styles:"margin-left:4px;;label:Vip;"},Ll={name:"gcn50p-Vip",styles:"height:14px;width:14px;;label:Vip;"},Pl=function(e){var t=e.vipInfo,n=t.vipIcon,r=(n=void 0===n?{}:n).url,o=t.isVip,a=Object(p.useContext)(al).resourceType;return Object(p.useEffect)((function(){T.a.trackCardShow(null,{id:3613,name:Il[a]})}),[a]),r&&o?Object(f.g)(Ds.a,{shouldTrackShow:!0,zaType:"Image",zaBlock:"VIP"},Object(f.g)("a",{href:"https://www.zhihu.com/vip?entry_privileges_type=member_id",css:Ml,onClick:function(){T.a.trackEvent(null,{id:3612,action:"Click",name:Il[a]})}},Object(f.g)(m.Image,{src:r,css:Ll}))):null};var Bl={name:"oyggkg-UserLine",styles:"align-items:center;line-height:16px;;label:UserLine;"},zl={name:"t6oasj-UserLine",styles:"margin-left:4px;;label:UserLine;"},Dl=function(e){var t=e.showLevelInfo,n=void 0!==t&&t,r=e.authorTags,o=void 0===r?[]:r,a=e.className,i=e.user,c=e.uaType,s=e.badgeSize,l=void 0===s?14:s,u=i.name,d=i.vipInfo,p=i.levelInfo,h=i.badge,b=i.badgeV2,v=i.isOrg,g=i.id;return Object(f.g)(m.Flex,{css:Bl,className:a},Object(f.g)(Cl,Object.assign({name:u},p,{isOrg:v,id:g,showLevelInfo:n,uaType:c})),n&&p&&Object(f.g)(xl,{levelInfo:p}),o.map((function(e){return Object(f.g)(_l,{key:e.text,responseLink:!0,richText:!0,tagInfo:e})})),(null!=b?b:h)&&"hybrid"!==c&&Object(f.g)(Bs,{size:l,badge:null!=b?b:h,css:zl}),d&&Object(f.g)(Pl,{vipInfo:d}))};Dl.propTypes={username:g.a.string.isRequired,vipInfo:g.a.object};var Fl={name:"186dd9b-UnfoldButton",styles:"height:21px;;label:UnfoldButton;"},Ul=function(e){var t=e.onClick,n=Object(us.f)().colors,r=n.GBK04A,o=n.GBK99A;return Object(f.g)("span",{css:Object(as.a)({position:"absolute",right:0,bottom:0,paddingLeft:18,backgroundImage:"linear-gradient(90deg, ".concat(Object(us.b)(o).alpha(0),", ").concat(o," 25%, ").concat(o,")"),display:"inline-block",color:r},";label:UnfoldButton;"),onClick:t},"展开",Object(f.g)(Je.a,{center:!0,color:r,css:Fl}))},Vl=function(e){var t=e.comment,n=t.content,r=t.collapsed,o=t.isDeleted,a=t.id,i=e.emoticons,c=e.className,s=e.rootCommentId,l=e.unfoldable,u=e.uaType,d=!r&&!o,h=Object(p.useRef)(),b=Object(p.useRef)(),v=Object(p.useState)(!1),g=Be()(v,2),y=g[0],O=g[1],j=Object(p.useState)(!1),w=Be()(j,2),C=w[0],k=w[1],x=Object(p.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if("undefined"==typeof DOMParser)return Object(f.g)("div",{dangerouslySetInnerHTML:{__html:e}});var n=Al(e,t),r=new DOMParser,o=r.parseFromString(n,"text/html");return Tl(o.body.childNodes,(function(e,t){return e.nodeType===Node.ELEMENT_NODE&&e.classList.contains("sticker")?t(!1):e.nodeType===Node.ELEMENT_NODE&&e.textContent.match("http")?t(!0):e.textContent}))}(n,null!=i?i:[])}),[n,i]),S=wl[u].content.lineHeight;Object(p.useLayoutEffect)((function(){var e,t;l&&!C&&(null===(e=h.current)||void 0===e?void 0:e.clientHeight)<(null===(t=b.current)||void 0===t?void 0:t.clientHeight)&&O(!0)}),[h,b,O,C,l]);var E=Object(Ge.c)((function(e){T.a.trackEvent(e.target,{id:1201,action:"OpenUrl",element_name:"Body"});var t,n=e.target;if(Sl.some((function(e){return n.classList.contains(e)}))){var r=n.href;r&&(t=r,Ye.a.dispatch("base/openImage",{images:[t],index:0})),e.preventDefault()}})),R=Object(Ge.c)((function(e){e.stopPropagation(),k(!0)}));return Object(f.g)(dl,{ref:h,innerRef:b,as:m.Box,onClick:E,fontSize:"15px",lineHeight:S,color:d?"GBK03A":"GBK07A",mt:"6px",css:Object(as.a)(Object.assign({position:"relative",overflowWrap:"break-word"},!C&&Object(us.d)(2),l&&!C&&{display:"block",overflow:"hidden",maxHeight:42},{img:{width:"1.24em",height:"1.24em",marginBottom:"-0.25em"}}),";label:CommentContent;"),className:c,zaType:"Card",query:{rootCommentId:s,anchorCommentId:a}},x,y&&!C&&Object(f.g)(Ul,{onClick:R}))},ql=function e(t){var n=function(e,t){return Object.keys(t).reduce((function(e,n){var r=e[n];if(delete e[n],r){var o=t[n],a="function"==typeof o?o(e):o;return Object.assign({},e,a,a&&a.style&&{style:Object.assign({},e.style,a.style)})}return e}),Object.assign({},e))}(t,e.mapProps),r=n.name,o=n.className,a=n.defaultClassName,i=n.size,c=n.center,s=qe()(n,["name","className","defaultClassName","size","center"]),l=Object(f.g)("svg",Object.assign({className:"".concat(a," ").concat(a,"--").concat(r).concat(o?" ".concat(o):"")},s,i&&{width:i,height:i}));return c?Object(f.g)("span",{style:e.strutStyle},"",l):l};ql.defaultProps={defaultClassName:"Icon",fill:"currentColor"},ql.mapProps={text:{size:"1.2em"}},ql.strutStyle={display:"inline-flex",alignItems:"center"};var Hl=function(e){return Object(f.g)(ql,Object.assign({viewBox:"0 0 24 24"},e),Object(f.g)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C16.9706 3 21 7.02944 21 12C21 12.9242 20.7842 14.037 20.3617 15.3551C20.2673 15.6497 20.2603 15.9655 20.3417 16.264L20.4506 16.64C21.073 18.8462 21.1396 20.1542 20.6504 20.5641C20.1634 20.972 18.8358 20.9294 16.6675 20.4363L16.264 20.3417C15.9655 20.2603 15.6497 20.2673 15.3551 20.3617C14.037 20.7842 12.9242 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 4.61093C7.9191 4.61093 4.6109 7.91913 4.6109 12C4.6109 16.0809 7.9191 19.3891 12 19.3891C12.7277 19.3891 13.6797 19.2071 14.8633 18.8277C15.4548 18.6381 16.0886 18.6241 16.6417 18.7757C17.687 19.0279 18.5219 19.1739 19.1295 19.2169L19.248 19.2241L19.349 19.228L19.3449 19.1745C19.2933 18.6329 19.1303 17.872 18.846 16.8877L18.7875 16.6878C18.6241 16.0886 18.638 15.4548 18.8276 14.8633C19.2071 13.6797 19.389 12.7277 19.389 12C19.389 7.91913 16.0808 4.61093 12 4.61093Z"}))};Hl.defaultProps={name:"CommentLikeNormal"};var Kl=function(e){return Object(f.g)(ql,Object.assign({viewBox:"0 0 43 41"},e),Object(f.g)("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.417 35.624L10.37 40.38a1.734 1.734 0 0 1-2.516-1.829l1.728-10.073a4.625 4.625 0 0 0-1.33-4.094L.933 17.25a1.734 1.734 0 0 1 .961-2.958l10.114-1.47a4.625 4.625 0 0 0 3.483-2.53l4.523-9.165a1.734 1.734 0 0 1 3.11 0l4.524 9.166a4.625 4.625 0 0 0 3.482 2.53l10.114 1.47a1.734 1.734 0 0 1 .961 2.957l-7.319 7.134a4.625 4.625 0 0 0-1.33 4.094l1.728 10.073a1.734 1.734 0 0 1-2.516 1.829l-9.047-4.756a4.625 4.625 0 0 0-4.304 0z"}))};Kl.defaultProps={name:"Star"};var Ql=function(e){return Object(f.g)(ql,Object.assign({viewBox:"0 0 43 41"},e),Object(f.g)("g",{fillRule:"evenodd"},Object(f.g)("path",{d:"M19.417 35.624L10.37 40.38a1.734 1.734 0 0 1-2.516-1.829l1.728-10.073a4.625 4.625 0 0 0-1.33-4.094L.933 17.25a1.734 1.734 0 0 1 .961-2.958l10.114-1.47a4.625 4.625 0 0 0 3.483-2.53l4.523-9.165a1.734 1.734 0 0 1 3.11 0l4.524 9.166a4.625 4.625 0 0 0 3.482 2.53l10.114 1.47a1.734 1.734 0 0 1 .961 2.957l-7.319 7.134a4.625 4.625 0 0 0-1.33 4.094l1.728 10.073a1.734 1.734 0 0 1-2.516 1.829l-9.047-4.756a4.625 4.625 0 0 0-4.304 0z",opacity:".2"}),Object(f.g)("path",{d:"M21.5.162v34.931c-.716.01-1.43.188-2.083.53L10.37 40.38a1.734 1.734 0 0 1-2.516-1.829l1.728-10.073a4.625 4.625 0 0 0-1.33-4.094L.933 17.25a1.734 1.734 0 0 1 .961-2.958l10.114-1.47a4.625 4.625 0 0 0 3.483-2.53l4.523-9.165c.29-.59.872-.94 1.486-.965z"})))};Ql.defaultProps={name:"HalfStar"};var Wl=Ke()(Array(5)),Gl={name:"1341f8n-ScoreBar",styles:"margin-right:2px;;label:ScoreBar;"},Yl={name:"1341f8n-ScoreBar",styles:"margin-right:2px;;label:ScoreBar;"},Zl=function(e){var t=e.score/2,n=Object(us.f)().colors.GRD10A,r=Object(us.b)(n).alpha(.2);return Object(f.g)(m.Flex,{flexDirection:"row",height:"20px",alignItems:"center",mt:"2px"},Wl.map((function(e,o){var a=function(e,t){return e-t>=0?1:e-t<=-1?0:.5}(t,o+1);return.5===a?Object(f.g)(Ql,{key:"".concat(o,"-").concat(a),css:Gl,color:n,size:12}):Object(f.g)(Kl,{key:"".concat(o,"-").concat(a),css:Yl,color:a?n:r,size:12})})))},Xl=function(e){return Object(f.g)(ql,Object.assign({viewBox:"0 0 24 24"},e),Object(f.g)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 4.07782C8.5 2.24411 10.4861 1.09899 12.0731 2.01775C13.7298 2.9769 14.663 4.82463 14.4516 6.72727L14.3379 7.74996H17.9194C20.4493 7.74996 22.2533 10.2038 21.4987 12.6185L19.6761 18.4508C19.1559 20.1155 17.5599 21.197 15.8279 21.0902C13.456 20.9438 9.78636 20.75 7 20.75H4.49936C3.53225 20.75 2.75 19.9658 2.75 19V9.49996C2.75 8.53346 3.5335 7.74996 4.5 7.74996H5.1371C6.55156 7.74996 7.81995 6.87883 8.32771 5.55864C8.4416 5.26254 8.5 4.94801 8.5 4.63076V4.07782ZM11.3215 3.31589C10.7346 2.97608 10 3.39961 10 4.07782V4.63076C10 5.13211 9.90771 5.62918 9.72773 6.09711C8.99716 7.99659 7.17222 9.24996 5.1371 9.24996H4.5C4.36193 9.24996 4.25 9.36189 4.25 9.49996V19C4.25 19.1386 4.36191 19.25 4.49936 19.25H7C9.83637 19.25 13.5459 19.4465 15.9203 19.593C16.9721 19.6579 17.9327 19.0008 18.2444 18.0034L20.067 12.1711C20.5198 10.7222 19.4374 9.24996 17.9194 9.24996H13.5C13.2867 9.24996 13.0834 9.15911 12.9412 9.00015C12.7989 8.84119 12.731 8.62916 12.7546 8.41713L12.9608 6.56162C13.1065 5.25035 12.4633 3.97693 11.3215 3.31589Z"}))};Xl.defaultProps={name:"CommentLikeNormal"};var Jl=function(e){return Object(f.g)(ql,Object.assign({viewBox:"0 0 24 24"},e),Object(f.g)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 4.07782C8.5 2.24411 10.4861 1.09899 12.0731 2.01775C13.7298 2.9769 14.663 4.82463 14.4516 6.72727L14.3379 7.74996H17.9194C20.4493 7.74996 22.2533 10.2038 21.4987 12.6185L19.6761 18.4508C19.1559 20.1155 17.5599 21.197 15.8279 21.0902C13.456 20.9438 9.78636 20.75 7 20.75H4.49936C3.53225 20.75 2.75 19.9658 2.75 19V9.49996C2.75 8.53346 3.5335 7.74996 4.5 7.74996H5.1371C6.55156 7.74996 7.81995 6.87883 8.32771 5.55864C8.4416 5.26254 8.5 4.94801 8.5 4.63076V4.07782Z",fill:"#0066FF"}))};Jl.defaultProps={name:"CommentLikeActive"};var $l=function(e){var t,n=e.comment,r=e.rootCommentId,o=n.likeCount,a=n.liked,i=Object(Fs.b)(),c=Object(p.useRef)(!1),s=Object(p.useContext)(al),l=s.dispatch,u=s.fetcher,d=s.authRequired,b=s.openInApp,m=a?Jl:Xl,v=(t=pt(Gs),Object(p.useEffect)(t.mount,[]),t),g=Object(Ge.c)(Ue()(De.a.mark((function e(){return De.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return setTimeout((function(){Ye.a.dispatch("iOS/hapticFeedback")}),300),e.next=3,v.start({scale:1.3,transition:{type:"tween",duration:.2,ease:[0,0,.58,1]}});case 3:return e.next=5,v.start({scale:1,transition:{type:"tween",duration:.3,ease:[.42,0,.2,1.8]}});case 5:case"end":return e.stop()}}),e)})))),y=Object(Ge.c)(function(){var e=Ue()(De.a.mark((function e(t){var o;return De.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.ZhihuHybrid){e.next=3;break}return b(),e.abrupt("return");case 3:if(!c.current){e.next=5;break}return e.abrupt("return");case 5:return c.current=!0,T.a.trackEvent(t,{action:a?"UnUpvote":"Upvote",id:a?1444:1202}),"like"===(o=a?"dislike":"like")&&g(),e.prev=9,e.next=12,u("/api/v4/comment_v5/comment/".concat(n.id,"/reaction/").concat(o),{method:"PUT"});case 12:l({type:cl,payload:{nextAction:o,id:n.id,rootCommentId:r}}),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(9),Ye.a.dispatch("ui/showToast",{icon:"fail",text:e.t0&&e.t0.toastMsg||"操作失败"});case 18:return e.prev=18,c.current=!1,e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[9,15,18,21]])})));return function(t){return e.apply(this,arguments)}}()),O=i.ZhihuHybrid?"":"赞";return Object(f.g)(h.a.Fragment,null,Object(f.g)(A.a,{zaType:"Button",zaAction:a?"UnUpvote":"Upvote",as:es.button,css:function(){return{marginLeft:"16px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,color:"inherit",font:"inherit",background:"none",outline:"none",border:"none",appearance:"none"}},initial:{scale:1},animate:v,onClick:d(y)},i.ZhihuHybrid?Object(f.g)(m,{size:20,css:function(e){return{fill:e.colors.GBK06A}}}):Object(f.g)($e.a,{size:16,css:function(e){return{fill:e.colors.GBL05A}}})),Object(f.g)("span",{css:function(e){return{marginLeft:"4px",color:e.colors[a?"GBL01A":"GBK06A"]}}},o>0?Object(Ze.cnNiceNumber)(o):O))},eu={name:"1xugp30-CommentFooter",styles:"flex-direction:column;;label:CommentFooter;"},tu={name:"860uge-CommentFooter",styles:"height:auto;padding:0;font-size:11px;line-height:16px;margin-top:6px;&:first-of-type{margin-left:0;};label:CommentFooter;"},nu={name:"mtl4uv-CommentFooter",styles:"flex-shrink:0;align-items:baseline;;label:CommentFooter;"},ru={name:"19bza57-CommentFooter",styles:"flex-shrink:0;align-items:center;;label:CommentFooter;"},ou=function(e){var t=e.comment,n=e.rootCommentId,r=e.className,o=e.uaType,a=e.isSecondary,i=t.score,c=t.createdTime,s=t.contentTag,l=t.commentTag,u=t.canLike,d=t.resourceId,h=t.resourceType,b=Object(p.useContext)(al).showInteractions,v=wl[o].commentTag,g=v.fontSize,y=v.color,O=v.height,j=v.lineHeight,w=v.marginTop,C="hybrid"===o;return Object(f.g)(m.Flex,{css:eu,className:r},i>0&&Object(f.g)(Zl,{score:i}),Object(f.g)(m.Flex,{flexDirection:"row"},s.map((function(e){return Object(f.g)(_l,{key:e.text,richText:!0,tagInfo:e,css:tu})}))),Object(f.g)(m.Flex,{fontSize:g,justifyContent:"space-between",alignItems:"center",height:O,lineHeight:j,mt:w,color:y},Object(f.g)(m.Flex,{css:nu},Object(f.g)("span",null,Object(Ys.toSmartString)(c),Boolean(l.length)&&" · "),l.map((function(e){return Object(f.g)(_l,{key:e.text,tagInfo:e,css:Object(as.a)({fontSize:g,paddingLeft:0,paddingRight:0},";label:CommentFooter;")})}))),b&&Object(f.g)(m.Flex,{css:ru},Object(f.g)(dl,{query:{openEditor:!0,anchorCommentId:t.id,rootCommentId:n,replyAuthorName:t.author.name,resourceId:d,resourceType:h}},C?Object(f.g)(Hl,{size:20,center:!0}):Object(f.g)(et.a,{size:18,center:!0}),!C&&!a&&Object(f.g)("span",{css:function(e){return{marginLeft:"4px",color:e.colors.GBL05A}}},"回复")),(!C||u)&&Object(f.g)($l,{comment:t,rootCommentId:n}))))};var au={name:"1dcx2oz-SecondaryCommentComponent",styles:"flex-direction:column;;label:SecondaryCommentComponent;"},iu={name:"4hy4b-SecondaryCommentComponent",styles:"margin-top:4px;;label:SecondaryCommentComponent;"},cu={name:"1eevzca-SecondaryCommentComponent",styles:"width:24px;height:24px;;label:SecondaryCommentComponent;"},su={name:"12bc2ol-SecondaryCommentComponent",styles:"flex:1;flex-direction:column;margin-left:8px;;label:SecondaryCommentComponent;"},lu={name:"1vk1mee-SecondaryCommentComponent",styles:"font-weight:normal;;label:SecondaryCommentComponent;"},uu={name:"mwmz17-SecondaryCommentComponent",styles:"margin-top:-4px;;label:SecondaryCommentComponent;"},du=function(e){var t=e.comment,n=e.emoticons,r=e.rootCommentId,o=e.uaType,a=t.author,i=t.authorTag,c=t.index,s=t.id,l=t.replyToAuthor,u=t.replyAuthorTag,d=wl[o].authorTag.fontSize;return Object(f.g)(m.Flex,{css:au},Object(f.g)(A.b,{content:{type:"Comment",id:t.id}},Object(f.g)(hl,{module:"CommentItem",index:c,card:{content:{type:"Comment",id:s}},view:{id:1199},trackCardShow:!0},Object(f.g)(A.e,{as:m.Flex,css:iu,zaType:"Card"},Object(f.g)(Xs,{user:a,css:cu,badgeSize:13}),Object(f.g)(m.Flex,{css:su},Object(f.g)("div",{css:function(e){return{display:"flex",fontSize:d,color:e.colors.GBK03A,alignItems:"center",fontWeight:"bold",lineHeight:"16px"}}},Object(f.g)("div",null,a.name),i.map((function(e){return Object(f.g)(_l,{key:e.text,tagInfo:e,css:lu})})),l&&Object(f.g)(h.a.Fragment,null,Object(f.g)(Xe.a,{size:12,center:!0,css:function(e){return{marginRight:"4px",fill:e.colors.GBK06A}}}),Object(f.g)("div",null,l.name),u.map((function(e){return Object(f.g)(_l,{key:e.text,tagInfo:e})})))),Object(f.g)(Vl,{comment:t,emoticons:n,rootCommentId:r,uaType:o,css:function(e){return{marginTop:"4px",color:e.colors.GBK04A}}}),Object(f.g)(ou,{comment:t,rootCommentId:r,css:uu,uaType:o,isSecondary:!0}))))))},fu=function(e){var t=e.id,n=e.count,r=e.offsetLeft;return n?Object(f.g)(dl,{as:m.Text,css:Object(as.a)({display:"flex",justifyContent:"flex-start",marginTop:"8px",marginLeft:r},";label:SecondaryCommentShowAll;"),innerStyle:function(e){return{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",fontSize:"12px",height:"28px",background:e.colors.GBK10A,color:e.colors.GBK03A,padding:"0 10px 0 16px",borderRadius:"14px"}},query:{rootCommentId:t}},Object(f.g)("span",null,"查看全部"," ".concat(Object(Ze.cnNiceNumber)(n)),"条回复"),Object(f.g)(tt.a,{center:!0,size:18,css:function(e){return{fill:e.colors.GBK03A}}})):null};var pu={name:"41k5ss-SecondaryComments",styles:"border-radius:8px;flex-direction:column;margin-top:6px;margin-left:40px;;label:SecondaryComments;"},hu=function(e){var t=e.comments,n=e.count,r=e.emoticons,o=e.rootCommentId,a=e.uaType,i=Object(p.useContext)(al),c=i.showLevelInfo,s=i.showSecondaryComment,l=i.showSecondaryCommentButton;return!s&&!l||0===t.length?null:Object(f.g)(m.Flex,{css:pu},s&&t.map((function(e,t){return Object(f.g)(A.b,{content:{type:"Comment",id:e.id},key:e.id},Object(f.g)(hl,{module:"CommentItem",content:{type:"Comment",id:e.id},index:t,view:{id:1199},trackCardShow:!0},Object(f.g)(du,{comment:e,showLevelInfo:c,emoticons:r,rootCommentId:o,uaType:a})))})),l&&Object(f.g)(fu,{id:o,count:n,offsetLeft:s?32:0}))};var bu={name:"ggkfz0-CommentItem",styles:"flex-direction:column;;label:CommentItem;"},mu={name:"10bw6yb-CommentItem",styles:"margin-top:16px;;label:CommentItem;"},vu={name:"1xuwofq-CommentItem",styles:"flex:1;flex-direction:column;margin-left:10px;;label:CommentItem;"},gu=function(e){var t=e.comment,n=e.showLevelInfo,r=e.showInteractions,o=e.emoticons,a=t.author,i=t.authorTag,c=t.childComments,s=void 0===c?[]:c,l=t.childCommentCount,u=t.index,d=t.id,h=Object(Fs.b)(),b=(null==h?void 0:h.ZhihuHybrid)||(null==h?void 0:h.Zhihu),v=b?"hybrid":"web",g=Object(p.useContext)(al).commentUnfoldable;return Object(f.g)(m.Flex,{css:bu},Object(f.g)(A.b,{content:{type:"Comment",id:t.id}},Object(f.g)(hl,{module:"CommentItem",index:u,card:{content:{type:"Comment",id:d}},view:{id:1199},trackCardShow:!0},Object(f.g)(A.e,{as:m.Flex,css:mu,zaType:"Card"},Object(f.g)(Xs,{user:a,isHybrid:b}),Object(f.g)(m.Flex,{css:vu},Object(f.g)(Dl,{user:a,showLevelInfo:n,authorTags:i,uaType:v}),Object(f.g)(Vl,{unfoldable:g,comment:t,emoticons:o,uaType:v}),Object(f.g)(ou,{comment:t,showInteractions:r,uaType:v}))))),Object(f.g)(hu,{comments:s,count:l,emoticons:o,rootCommentId:d,uaType:v}))};var yu={name:"1xcn102-PreviewCommentContent",styles:"margin:0 16px 40px;flex-direction:column;;label:PreviewCommentContent;"},Ou={name:"xpd3m8-PreviewCommentContent",styles:"font-size:15px;font-weight:500;margin-bottom:16px;;label:PreviewCommentContent;"},ju={name:"tihhxc-PreviewCommentContent",styles:"height:18px;;label:PreviewCommentContent;"},wu=function(e){var t,n=e.className,r=e.showLevelInfo,o=e.showInteractions,a=e.resourceType,i=e.resourceId,c=e.currentUserId,s=void 0===c?"":c,l=e.showCommentInput,u=e.inputPlaceholder,d=e.customHeader,b=e.customFooter,v=e.onCommentChange,g=e.commentType,y=void 0===g?"abstract_comment":g,O=e.onLoad,j=Object(p.useState)([]),w=Be()(j,2),C=w[0],k=w[1],x=Object(p.useContext)(al),S=x.fetcher,E=x.data,R=x.dispatch,A=Object(Ge.g)(E),N=Object(Ge.c)(v),_=Object(Ge.c)((function(){S("/api/v4/comment_v5/".concat(a,"s/").concat(i,"/").concat(y)).then((function(e){return R({type:il,payload:e})}))}));Object(p.useEffect)(_,[_]),Object(p.useEffect)((function(){var e=Ye.a.listen("base/onMessage",(function(e){var t=e.type,n=e.data;if("comment/listChange"===t){var r=n.status;n.resourceType===a&&String(n.resourceId)===String(i)&&(_(),N(r))}}));return function(){return e()}}),[]);var I=1===(null==E||null===(t=E.commentStatus)||void 0===t?void 0:t.type);if(Object(p.useEffect)((function(){I||Object(is.loadScript)("https://unpkg.zhimg.com/@cfe/emoticon@1.2.3/lib/emoticon.js").then((function(){return window.zh_emoticon?window.zh_emoticon.reduce((function(e,t){var n;return[].concat(Ke()(e),Ke()(null!==(n=t.stickers)&&void 0!==n?n:[]))}),[]):[]})).then(k)}),[I]),Object(p.useEffect)((function(){!A&&E&&(null==O||O())}),[A,E,O]),!E)return null;var M=E.counts.totalCounts,L=E.data,P=void 0===L?[]:L;if(I)return null;var B=M>0?Object(Ze.cnNiceNumber)(M):"";return Object(f.g)(m.Flex,{className:n,css:yu},d?d(B):Object(f.g)(m.Box,{color:"GBK02A",css:Ou},"评论 ".concat(B)),l&&Object(f.g)(jl,{inputPlaceholder:u,emoticons:C,currentUserId:s}),P.map((function(e,t){return Object(f.g)(gu,{key:e.id,comment:e,showLevelInfo:r,showInteractions:o,emoticons:C,index:t})})),P.length>0&&Object(f.g)(hl,{module:"CommentList"},Object(f.g)(dl,{as:m.Flex,css:function(e){return{marginTop:"20px",color:e.colors.GBK06A,fontSize:"13px",width:"100%",justifyContent:"center",lineHeight:"normal",alignItems:"center"}},onClick:function(e){return T.a.trackEvent(e.target,{id:1204,action:"OpenUrl",element_name:"ViewAll"})}},b?b(B):Object(f.g)(h.a.Fragment,null,Object(f.g)("span",{css:ju},"查看全部评论"),Object(f.g)(tt.a,{size:18,center:!0,css:function(e){return{color:e.colors.GBK06A,marginLeft:"4px"}}})))))};wu.propTypes={className:g.a.string,showCommentInput:g.a.bool,showLevelInfo:g.a.bool.isRequired,showSecondaryComment:g.a.bool,showSecondaryCommentButton:g.a.bool,commentUnfoldable:g.a.bool,resourceType:g.a.string.isRequired,resourceId:g.a.string.isRequired,currentUserId:g.a.string,inputPlaceholder:g.a.string,redirectUrl:g.a.string,customHeader:g.a.func,customFooter:g.a.func,onCommentChange:g.a.func,onLoad:g.a.func,preProxy:g.a.func,requestHost:g.a.string,commentType:g.a.string,showInteractions:g.a.bool},wu.defaultProps={showLevelInfo:!1,showInteractions:!0,showCommentInput:!0,showSecondaryComment:!0,showSecondaryCommentButton:!0,commentUnfoldable:!1,onCommentChange:We.a};var Cu=h.a.forwardRef((function(e,t){return Object(f.g)(ll,e,Object(f.g)(os,null,Object(f.g)(A.b,{block:"Comment"},Object(f.g)(wu,Object.assign({},e,{ref:t})))))})),ku=n(428),xu=n(1097),Su=Object(C.withRouter)(Object(j.connect)(null,{loadComments:ku.e})((function(e){var t=Object(p.useState)([]),n=Object(o.a)(t,2),r=n[0],a=n[1],i=e.parent,c=i.type,s=i.id,l=i.question,u=e.loadComments,f=e.location.pathname,h=-1!==(null==f?void 0:f.indexOf("answer")),b=-1!==(null==f?void 0:f.indexOf("question")),m=Object(j.useSelector)((function(e){return Object(he.j)(e,{type:h?"answer":b?"question":"",id:s||(null==l?void 0:l.id)})}));if(Object(p.useEffect)((function(){u(c,s).then((function(e){var t=e.payload;a(t.data)}))}),[s,c,u]),!(null==r?void 0:r.length))return null;var v=function(e,t){"zvideo"===c?Object(ee.e)(Object(ye.a)({type:c,id:s},{launch_button:t})):m?location.href="zhihu://".concat(c,"/").concat(s,"?utm_app_name=zhihu_check"):Object(ee.e)(Object(ye.a)({type:c,id:s},{launch_button:t})),e.preventDefault()};return Object(d.b)("div",{className:"CommentsForOia",children:Object(d.b)(Cu,{css:{margin:0},showInteractions:!1,resourceType:c,resourceId:String(s),showCommentInput:!1,openInApp:function(e){return v(e,xu.b.comment_list)},customHeader:function(){return null},customFooter:function(e){return e<=2?null:Object(d.b)(_.c,{css:{width:"calc(100vw - 32px) !important"},color:"blue",preset:"primary",onClick:function(e){return v(e,xu.b.comment_more)},children:"打开 App 查看更多评论"})}})})}))),Eu=n(1277),Ru=n(1278),Tu=n(960),Au=n(73),Nu=n(101),_u=n(1276),Iu=n.n(_u),Mu=n(1297),Lu=n.n(Mu),Pu=n(1309),Bu=n.n(Pu),zu=n(1362),Du=n.n(zu),Fu={answerAdmireCouldOpen:{image:Lu.a,title:"开启「赞赏」权益",content:"你已经获得了「赞赏」权益,使用「赞赏」可以得到更多收益。快去开启权益吧。",buttonText:"立即开启",buttonLink:"https://www.zhihu.com/creator/reward/community",detailViewName:"admire",cardShowId:4922,buttonClickId:4924,readAlwaysId:4926,readNextId:4928},answerAdmireCouldUse:{image:Lu.a,title:"使用「赞赏」权益",content:"你可以为这篇内容开启「赞赏」。「赞赏」开启后,读者将可以付费支持你的创作。",buttonText:"开启赞赏",detailViewName:"admire",cardShowId:4923,buttonClickId:4925,readAlwaysId:4927,readNextId:4929},promotionCouldOpen:{image:Du.a,title:"开启「自定义推广」权益",content:"你已经获得了「自定义推广」权益,使用「自定义推广」可以让内容得到更多展示机会。快去开启权益吧。",buttonText:"立即开启",buttonLink:"https://www.zhihu.com/creator/custom-promotion",detailViewName:"promotion",cardShowId:4922,buttonClickId:4924,readAlwaysId:4926,readNextId:4928},promotionCouldUse:{image:Du.a,title:"使用「自定义推广」权益",content:"你可以使用「自定义推广」权益,使这篇内容获得更多展示机会。快去使用权益吧。",buttonText:"立即使用权益",buttonLink:"https://www.zhihu.com/creator/custom-promotion",detailViewName:"promotion",cardShowId:4923,buttonClickId:4925,readAlwaysId:4927,readNextId:4929},recommendationCouldOpen:{image:Bu.a,title:"开启「内容自荐」权益",content:"你已经获得了「内容自荐」权益,优质内容通过自荐后可以展示给更多人。快去开启权益吧。",buttonText:"立即开启",buttonLink:"https://www.zhihu.com/creator/recommend",detailViewName:"recommend",cardShowId:4922,buttonClickId:4924,readAlwaysId:4926,readNextId:4928},recommendationCouldUse:{image:Bu.a,title:"使用「内容自荐」权益",content:"你可以使用「内容自荐」权益,让更多人看到这篇内容。快去使用权益吧。",buttonText:"立即自荐",detailViewName:"recommend",cardShowId:4923,buttonClickId:4925,readAlwaysId:4927,readNextId:4929}};var Uu=function(e){var t=e.notification,n=void 0===t?{}:t,r=e.className,o=e.onRead,a=e.onUseAdmire,i=e.onUseRecommend,c=Object.keys(n).find((function(e){return n[e]})),s=Fu[c]||{},l=s.title,u=s.image,f=s.content,h=s.buttonText,b=s.buttonLink,m=s.detailViewName,v=s.cardShowId,g=s.buttonClickId,y=s.readAlwaysId,j=s.readNextId;return Object(p.useEffect)((function(){c&&T.a.trackCardShow(null,{id:v,name:m})}),[c,v,m]),Object(d.b)(Au.b,{className:O()("CreatorRightsNotification",r),onClose:function(){o("next"),T.a.trackEvent(null,{id:j,name:m})},children:c&&Object(d.c)(p.Fragment,{children:[Object(d.b)("img",{className:"CreatorRightsNotification-background",src:Iu.a,alt:"blue background"}),Object(d.b)("img",{className:"CreatorRightsNotification-liukanshan",src:u,alt:"liukanshan image"}),Object(d.b)("div",{className:"CreatorRightsNotification-title",children:l}),Object(d.b)("div",{className:"CreatorRightsNotification-content",children:f}),Object(d.c)(Au.a,{className:"CreatorRightsNotification-buttonGroup",children:[b?Object(d.b)(Nu.a,{className:"CreatorRightsNotification-button",preset:"primary",color:"blue",to:b,target:"_blank",onClick:function(){o("current"),T.a.trackEvent(null,{id:g,name:m})},children:h}):Object(d.b)(_.c,{className:"CreatorRightsNotification-button",preset:"primary",color:"blue",onClick:function(){o("current"),T.a.trackEvent(null,{id:g,name:m}),"answerAdmireCouldUse"===c&&a(),"recommendationCouldUse"===c&&i()},children:h}),Object(d.b)(_.c,{className:"CreatorRightsNotification-dismiss",preset:"plain",color:"grey",onClick:function(){o("always"),T.a.trackEvent(null,{id:y,name:m})},children:"不再提醒"})]})]})})},Vu=n(1008),qu=n(1345),Hu=n(1123),Ku=n(854),Qu=n(890),Wu=n(902),Gu=n(899),Yu=n(241),Zu=n(1336),Xu=n(1340),Ju=n(862),$u=n(1311),ed=n(240),td=n(990),nd={up:1,neutral:0,down:-1};function rd(e){var t=e.id,n=e.voteupCount,r=e.voting,o=e.isOwner,a=e.answer,i=e.currentUser,c=e.disabled,s=Object(j.useDispatch)();Object(p.useEffect)((function(){!c&&i&&s(Object(ed.b)(["opposeRight"]))}),[c,i,s]);var l=Object(j.useSelector)((function(e){var t=e.entities.questions[a.question.id];return null==t?void 0:t.voteDownReason})),u=Object(j.useSelector)((function(e){return Object(ed.d)(e)})),f=Object(p.useCallback)((function(e){s(Object(oe.K)(a.id,nd[e],{zVideoId:t}))}),[t,s,a.id]);return Object(d.b)(td.a,{type:"zvideo",isShowVoteDownMenu:Boolean(!c&&i)&&u,count:n,voting:r,onVote:f,isOwner:o,voteDownReason:l,onLoadVoteDownReason:function(){s(Object(oe.k)(a.id,a.question.id))},onSelectVoteDownReason:function(e){s(Object(oe.C)(a.id,e.reasonId)).then((function(e){s(Object(fe.h)(e.payload.message))}))},onSetVoteDownReason:function(e){s(Object(ed.e)(e))}})}var od=n(913);function ad(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var id=function(e){Object(s.a)(n,e);var t=ad(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.activateReward;return Object(d.c)("div",{className:"Reward",children:[Object(d.b)("button",{className:"Reward-activateBtn",onClick:e,children:"开启赞赏"}),Object(d.b)("div",{className:"Reward-activateHint",children:"赞赏开启后,读者将可以付费支持你的创作。"})]})}}]),n}(p.Component);function cd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}id.propTypes={activateReward:g.a.func};var sd=function(e){Object(s.a)(n,e);var t=cd(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props,t=e.tagline,n=e.totalMoney,r=e.showRewarders;return Object(d.c)("div",{children:[Object(d.b)("div",{className:"Reward-tagline",children:t||re.p}),Boolean(n)&&Object(d.b)("div",{className:"Reward-money",children:Object(d.c)("span",{onClick:r,children:["¥ ",n.toFixed(2)]})})]})}}]),n}(p.Component);sd.propTypes={tagline:g.a.string,totalMoney:g.a.number,showRewarders:g.a.func};var ld=n(1136);function ud(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var dd=function(e){Object(s.a)(n,e);var t=ud(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props,t=e.modalShown,n=e.onLoad,r=e.items,o=e.voteupCount,a=e.isRewardList,i=e.onClose,c=e.notice;return Object(d.b)(F.b,{size:"fullPage",onClose:i,children:t&&Object(d.b)(ld.a,{items:r,text:"赞赏了",isFetching:!1,isDrained:!1,voteupCount:o,onLoad:n,isRewardList:a,notice:c,type:"rewardPeople"})})}}]),n}(p.Component);function fd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}dd.propTypes={onLoad:g.a.func,modalShown:g.a.bool};var pd=function(e){Object(s.a)(n,e);var t=fd(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={hoverName:""},e.hoverUser=function(t){e.setState({hoverName:t.target.dataset.name})},e}return Object(i.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.users,r=t.handleListShown,o=t.rewardMemberCount,a=t.onUserClick,i=this.state.hoverName,c=n.slice(0,5);return Object(d.c)("div",{className:"Reward-count",children:[Object(d.b)("p",{className:"Reward-User-text",onClick:r,children:"".concat(Object(Ze.formatNumber)(o)," 人已赞赏")}),Object(d.c)("div",{children:[c.map((function(t,n){return Object(d.b)(C.Link,{to:"//www.zhihu.com/".concat(t.userType,"/").concat(t.urlToken),className:"Reward-User-img","data-hover-title":i,target:"_blank",onClick:a,children:Object(d.b)("img",{src:t.avatarUrl,className:"Reward-User-avatar","data-name":t.name,"data-index":n,onMouseOver:e.hoverUser,alt:"赞赏用户"})},n)})),o>6&&Object(d.c)("span",{className:"Reward-MoreUser",onClick:r,children:[Object(d.b)("i",{}),Object(d.b)("i",{}),Object(d.b)("i",{})]})]})]})}}]),n}(p.Component);pd.propTypes={users:g.a.array,handleListShown:g.a.func,rewardMemberCount:g.a.number,onUserClick:g.a.func},pd.defaultProps={users:[]};var hd=Object(ne.b)({module:"UserList",moduleName:"*** 人已赞赏"})(pd);function bd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var md=function(e){Object(s.a)(n,e);var t=bd(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props,t=e.rewardMemberCount,n=e.handleListShown,r=e.isAuthor,o=e.users,a=e.onUserClick;return t?Object(d.b)(hd,{users:o,onUserClick:a,handleListShown:n,rewardMemberCount:t}):Object(d.b)("div",{className:"Reward-countZero",children:r?"还没有人赞赏。":"还没有人赞赏,快来当第一个赞赏的人吧!"})}}]),n}(p.Component);function vd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}md.propTypes={rewardMemberCount:g.a.number,handleListShown:g.a.func,isAuthor:g.a.bool,users:g.a.array,onUserClick:g.a.func};var gd=function(e){Object(s.a)(n,e);var t=vd(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props,t=e.tagline,n=e.onClick;return Object(d.c)("div",{children:[Object(d.b)("div",{className:"Reward-tagline",children:t||re.p}),Object(d.b)("button",{className:"Reward-rewardBtn",onClick:n,children:"赞赏"})]})}}]),n}(p.Component);function yd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}gd.propTypes={onClick:g.a.func,tagline:g.a.string};var Od=function(){return n.e(38).then(n.bind(null,2644)).then((function(e){return e.TipjarDialog}))},jd=function(e){Object(s.a)(n,e);var t=yd(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={TipjarRender:!1,modalShown:!1},e.onSubmitReward=function(t){B.a.set("isRewardable",!0),e.updateReward(t)},e.onPaySuccess=function(){var t=e.props,n=t.reward,r=t.currentUser,o=t.id,a=t.type,i=n[a][o].users,c=[r];Array.isArray(i)&&(i.push(r),c=i),e.props.onRewardSuccess(c,o,a),e.colseTijarDialog(),e.props.showNotification("你已赞赏成功!")},e.onLoad=function(t){"article"===e.props.type?"normal"===t?e.onLoadArticleRewardUser():e.onLoadArticleRewardUserDetails():e.onLoadRewardUser()},e.onLoadArticleRewardUser=function(){var t=e.props.id;e.props.getArticleRewardUser(t)},e.onLoadArticleRewardUserDetails=function(){var t=e.props,n=t.id;t.isAuthor?e.props.getPagingArticleRewardUserDetails(n):e.props.getPagingArticleRewardUser(n)},e.onLoadRewardUser=function(){var t=e.props,n=t.id;t.isAuthor?e.props.getRewardUserDetails(e.props.id):e.props.getRewardUser(n).then((function(t){var n=t.payload.data;if(n.length>0){var r={};n.forEach((function(e){r[e.urlToken]=e})),e.props.updateEntitiesUsers(r)}}))},e.handleListShown=function(t){var n=e.props.onRewardUserMoreClick;n&&n(t),e.setState({modalShown:!0})},e.handleListHide=function(){e.setState({modalShown:!1})},e.updateReward=function(t){var n=e.props,r=n.type,o=n.id,a=n.rewardInfo.canOpenReward;if("article"===r){var i=!!a||void 0;e.props.updateArticleReward(o,t,i)}else e.props.updateAnswerReward(o,t)},e.activateReward=function(){e.onSubmitReward(re.p)},e.showRewarders=function(){e.setState({modalShown:!0})},e.addReward=e.context.authRequired((function(t,n){var r=e.props,o=r.id;"article"===r.type?e.props.createArticleTipjar(o,t):e.props.createTipjar(o,t,n)}),void 0,fe.b),e.handleRewardButtonClick=function(t){var n=e.props.onRewardButtonClick;n&&n(t),e.setState({TipjarRender:!0})},e.colseTijarDialog=function(){e.setState({TipjarRender:!1})},e.removeTradeNumber=function(){var t=e.props,n=t.id,r=t.type;e.props.removeTradeNumber(n,r)},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){var e=this.props.rewardInfo;e&&e.isRewardable&&this.onLoad("normal"),this.props.imperativeRef&&(this.props.imperativeRef.current={activateReward:this.activateReward.bind(this)})}},{key:"componentWillUnmount",value:function(){this.props.imperativeRef&&(this.props.imperativeRef.current=null)}},{key:"render",value:function(){var e=this.props,t=e.currentUser,n=e.isAuthor,r=e.isMobile,o=e.id,a=e.reward,i=e.author,c=e.type,s=e.ua,l=e.rewardInfo,u=l.canOpenReward,f=l.isRewardable,p=l.tagline,h=l.rewardTotalMoney,b=l.rewardMemberCount,m=e.onRewardUserClick,v=e.balanceEnable;if(n&&t&&"organization"===t.userType)return null;var g=this.state,y=g.TipjarRender,O=g.modalShown;if(n&&u)return Object(d.b)("div",{children:Object(d.b)(id,{activateReward:this.activateReward})});if(f){var j=a&&a[c][o]||{},w=j.tradeNumber,C=j.users,k=j.notice,x=Object(d.b)(dd,{modalShown:O,items:C,voteupCount:b,onLoad:this.onLoad,isRewardList:n,notice:k,onClose:this.handleListHide}),S=Object(d.b)(md,{rewardMemberCount:b,handleListShown:this.handleListShown,onUserClick:m,users:C,isAuthor:n});if(!n)return Object(d.c)("div",{className:"Reward",children:[Object(d.b)(gd,{tagline:p,onClick:this.handleRewardButtonClick}),S,x,Object(d.b)(D.a,{getComponent:Od,author:i,tagline:p,isMobile:r,ua:s,addReward:this.addReward,colseTijarDialog:this.colseTijarDialog,tradeNumber:w,removeTradeNumber:this.removeTradeNumber,onPaySuccess:this.onPaySuccess,TipjarRender:y,type:c,balanceEnable:v})]});var E=(Number(h)||0)/100;return Object(d.c)("div",{className:"Reward",children:[Object(d.b)(sd,{tagline:p,totalMoney:E,showRewarders:this.showRewarders}),x,S]})}return null}}]),n}(p.Component);jd.propTypes={reward:g.a.object,isAuthor:g.a.bool,author:g.a.object,id:g.a.number,rewardInfo:g.a.object,currentUser:g.a.object,ua:g.a.object,type:g.a.string,isMobile:g.a.bool,balanceEnable:g.a.bool,onRewardButtonClick:g.a.func,onRewardUserClick:g.a.func,onRewardUserMoreClick:g.a.func},jd.contextTypes={authRequired:g.a.func},jd.defaultProps={rewardInfo:{},type:"answer",balanceEnable:!0};var wd=Object(b.compose)(Object(j.connect)(null,{updateAnswerReward:oe.H,updateArticleReward:pe.l,createArticleTipjar:pe.b,getRewardUserDetails:pe.i,getPagingArticleRewardUser:pe.f,getPagingArticleRewardUserDetails:pe.g,getArticleRewardUser:pe.e,updateEntitiesUsers:pe.m,getRewardUser:pe.h,createTipjar:pe.c,removeTradeNumber:pe.k,onRewardSuccess:pe.j,showNotification:fe.h}))(jd),Cd=n(959),kd=n(18),xd=function(e){return h.a.createElement(kd.a,e,h.a.createElement("path",{d:"M16.387 10.869l-3.188-4.27A1 1 0 1 1 14.8 5.401l4.92 6.59-4.883 7.491a1 1 0 1 1-1.676-1.092l3.6-5.522H7a3 3 0 0 1-3-3V7a1 1 0 1 1 2 0v2.869a1 1 0 0 0 1 1h9.387z"}))};xd.defaultProps={name:"Jump"};var Sd=xd;var Ed=function(e){var t=e.className,n=e.commercial;if(!(n&&n.tail&&n.tail.url&&n.tail.message))return null;var r=n.tail,o=r.url,a=r.message;return Object(d.c)("a",{className:O()("CommercialQuestionTail",t),href:o,children:[a,Object(d.b)(Sd,{className:"CommercialQuestionTail-Icon",center:!0,text:!0})]})},Rd=n(1030),Td=n(1090),Ad=n(33),Nd=n.n(Ad),_d=n(863),Id=n.n(_d),Md=n(160),Ld=n.n(Md),Pd=n(935),Bd=n(949),zd=n(941),Dd=n(844);function Fd(e,t){return e.length<=t?e:"".concat(e.substring(0,t),"...")}function Ud(e){var t=e.logoUrl,n=e.productName,r=e.productDesc,o=e.link,a=void 0===o?"":o,i=e.btnText,c=void 0===i?"":i,s=e.className,l=void 0===s?"":s,u=e.productNameMaxLength,d=void 0===u?6:u,f=e.productDescMaxLength,p=void 0===f?15:f,b=e.btnTextMaxLength,m=void 0===b?4:b,v=e.type,g="".concat("pc"===v?"pc":"app","_EAnswerCard");return h.a.createElement("a",{ref:e.cardRef,onClick:e.onClick,href:a,target:"_blank",className:O()("".concat(g),l)},h.a.createElement(A.e,{zaType:"Card",zaBlock:"advertPluginCard"}),h.a.createElement("img",{src:t,className:"".concat(g,"-image"),alt:"logo"}),h.a.createElement("div",{className:"".concat(g,"-content")},h.a.createElement("div",{className:O()("".concat(g,"-content-appName")),style:{WebkitBoxOrient:"vertical",maxWidth:"".concat(d+1,"em")}},Fd(n,d)),r&&h.a.createElement("div",{className:"".concat(g,"-content-desc"),style:{maxWidth:"".concat(p+1,"em")}},Fd(r,p))),h.a.createElement("div",{className:"".concat(g,"-button"),style:{maxWidth:"".concat(m+1,"em")},onClick:e.onBtnClick},Fd(c,m)),"app"===v&&h.a.createElement("div",{className:"app_EAnswerCard-bottom-close",onClick:function(t){return function(e,t){e.stopPropagation(),e.preventDefault(),t.onClose()}(t,e)}},"×"))}var Vd=n(948),qd=function(e){function t(e){var n;return Ee()(this,t),(n=Ie()(this,Le()(t).call(this,e))).onceViewTrack=function(e,t){n.viewShow||(n.viewShow=!0,T.a.trackCardShow(e,{id:5642}),Object(Pd.f)(e,{trackMethod:Pd.g,tracks:t}))},n.addDSCListener=function(){try{var e=n.props.data.pluginType;if(/^android/i.test(e)){n.appPromotionUrl=null,n.downloadInfo=null,n.landingUrl=Object(Dd.e)(n.props.data,"plugin.".concat(e,".plugin.").concat(e,".landingUrl"),"");var t=Object(Dd.e)(n.props.data,"plugin.".concat(e,".plugin.").concat(e,".downloadInfo"),"{}"),r=Object(Dd.e)(JSON.parse(t.adjson||"{}"),"ads[0].creatives[0].asset.app_promotion_url","");r&&(Vd.a({app_promotion_url:n.appPromotionUrl},"ad/getDownloadStatus").then((function(e){var t=e.status,r=e.data;t||console.log("下载插件 ad/getDownloadStatus 调用失败!"),n.setState({status:r.status})})).catch(console.log),n.appPromotionUrl||Ye.a.listen("ad/downloadStatusChange",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.status,r=void 0===t?"error":t;n.setState({status:r})}))),n.appPromotionUrl=r,n.downloadInfo=t}}catch(e){console.log(e)}},n.onBtnClick=function(e){"pc"!==Object(Dd.h)().os&&n.appPromotionUrl&&n.downloadInfo&&(e.stopPropagation(),e.preventDefault(),n.sendClickTrack(),Vd.a(n.downloadInfo,"ad/downloadApk"))},n.sendClickTrack=function(){T.a.trackEvent(n.card,{id:5641,action:"OpenUrl"}),Object(Pd.a)({trackMethod:Pd.g,tracks:n.track.click})},n.handleClick=function(e){e.stopPropagation(),n.sendClickTrack(),"pc"!==Object(Dd.h)().os&&n.landingUrl&&n.downloadInfo&&(e.preventDefault(),Vd.a(n.downloadInfo,"ad/open"))},n.sessionId=Ld()(),n.init(e),n.viewShow=!1,n.state={status:"ready"},n}return Ne()(t,e),Te()(t,[{key:"init",value:function(e){var t=e.data,n=t.plugin,r=t.suger,o=void 0===r?"":r,a=(n[t.pluginType]||{}).trackUrl,i=void 0===a?{}:a,c=Object(Dd.h)(),s={xSuger:o,sessionId:this.sessionId,os:c.os,cardType:"".concat(c.os,"_download")};this.track=Object(Dd.t)(i,s)}},{key:"componentDidMount",value:function(){var e=this.props.data.visible,t=Object(Dd.h)();T.a.setModule(this.card,{module:"Content",module_name:"".concat(t.os,"_download")}),e&&this.onceViewTrack(this.card,this.track.view),this.addDSCListener()}},{key:"componentWillReceiveProps",value:function(e){e.data.visible&&this.onceViewTrack(this.card,this.track.view)}},{key:"render",value:function(){var e=this,t=this.props.data,n=t.author,r=void 0===n?{}:n,o=t.plugin,a=t.className,i=void 0===a?"":a,c=t.pluginType,s=(o[c]||{}).plugin,l=(void 0===s?{}:s)[c],u=Object(Dd.h)(),d=this.state.status,f=void 0===d?"ready":d,p={className:i,type:"pc"===u.os?"pc":"app",btnText:l.interaction||"立即下载",onClick:this.handleClick,productNameMaxLength:13,productDescMaxLength:15,btnTextMaxLength:4,onClose:this.props.onClose};return/^ios/i.test(c)?(p.logoUrl=l.icon,p.productName=l.name,l.score>0&&(p.productDesc="Appstore 评分:".concat(l.score)),p.link=l.landingUrl):/^android/i.test(c)&&(p.logoUrl=l.icon||r.avatarUrl||"",p.productName=l.name,p.link=l.landingUrl,p.onBtnClick=this.onBtnClick,zd.c[f]&&(p.btnText=zd.c[f])),p.link?h.a.createElement(A.c,Nd()({as:Ud,shouldTrackClick:!0,zaType:"Card",zaAction:"OpenUrl",zaBlock:"advertPluginCard",cardRef:function(t){e.card=t}},p)):null}}]),t}(h.a.Component);qd.propTypes={data:g.a.object.isRequired};var Hd=function(e){var t=e.data;return t&&t.plugin&&t.plugin[t.pluginType]?h.a.createElement(Bd.a,null,h.a.createElement(qd,e)):null},Kd=function(e){function t(e){var n;return Ee()(this,t),(n=Ie()(this,Le()(t).call(this,e))).onceViewTrack=function(e,t){n.viewShow||(n.viewShow=!0,T.a.trackCardShow(n.card,{id:5642}),Object(Pd.f)(e,{trackMethod:Pd.g,tracks:t}))},n.handleClick=function(e){e.stopPropagation(),T.a.trackEvent(n.card,{id:5641,action:"OpenUrl"}),Object(Pd.a)({trackMethod:Pd.g,tracks:n.track.click});var t=Object(Dd.e)(n.props.data,"plugin.leads.plugin.leads",{}),r=n.props.data,o=r.contentType,a=r.contentToken;t.isCanvas&&(e.preventDefault(),t.creativeId=Object(Dd.g)(),Vd.a(t,"ad/openForm"));var i=t.cardType,c=t.hashId;if("message"===i){e.preventDefault();var s={inbox_id:c,initial_message:"",auto_focus:!0,title:"",source_type:o,source_id:a};Vd.a(s,"base/openInbox")}},n.isHiddenEcommerceAd=function(e){return!(!e.isCanvas||e.adjson)||!(e.isCanvas||e.token||e.landingUrl)},n.sessionId=Ld()(),n.init(e),n.viewShow=!1,n}return Ne()(t,e),Te()(t,[{key:"init",value:function(e){var t=e.data,n=t.plugin,r=t.suger,o=void 0===r?"":r,a=t.pluginType,i=Object(Dd.e)(e.data,"plugin.leads.plugin.leads",{}).cardType,c=(n[a]||{}).trackUrl,s=void 0===c?{}:c,l=Object(Dd.h)().os,u={xSuger:o,sessionId:this.sessionId,os:l,cardType:i};this.track=Object(Dd.t)(s,u)}},{key:"componentDidMount",value:function(){var e=this.props.data.visible,t=Object(Dd.h)();T.a.setModule(this.card,{module:"Content",module_name:"".concat(t.os,"_leads")}),e&&this.onceViewTrack(this.card,this.track.view);var n=Object(Dd.e)(this.props.data,"plugin.leads.plugin.leads",{}),r=n.isCanvas,o=n.adjson;r&&Vd.a({adjson:o},"ad/preload")}},{key:"componentWillReceiveProps",value:function(e){e.data.visible&&this.onceViewTrack(this.card,this.track.view)}},{key:"render",value:function(){var e=this,t=this.props.data,n=t.author,r=void 0===n?{}:n,o=t.plugin,a=void 0===o?{}:o,i=t.className,c=void 0===i?"":i,s=t.pluginType,l=Object(Dd.e)(a,"".concat(s,".plugin.").concat(s),{});return this.isHiddenEcommerceAd(l)?null:h.a.createElement(A.c,Nd()({as:Ud,shouldTrackClick:!0,zaType:"Card",zaAction:"OpenUrl",zaBlock:"advertPluginCard",cardRef:function(t){e.card=t}},{className:c,type:"app",logoUrl:r.avatarUrl,productName:r.name,productNameMaxLength:13,productDesc:l.desc,productDescMaxLength:15,link:l.landingUrl||"javascript:",btnText:l.interaction||"立即咨询",btnTextMaxLength:4,onClick:this.handleClick,onClose:this.props.onClose}))}}]),t}(h.a.Component);Kd.propTypes={data:g.a.object.isRequired};var Qd=function(e){var t=e.data;return t&&t.plugin&&t.plugin[t.pluginType]?h.a.createElement(Bd.a,null,h.a.createElement(Kd,e)):null},Wd=function(e){function t(){var e,n;Ee()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=Ie()(this,(e=Le()(t)).call.apply(e,[this].concat(o)))).state={display:!1},n.onClose=function(){n.setState({display:!0})},n.getContent=function(e){var t=e.data;if(!t||!t.plugin)return null;var r=(t=Object(Dd.b)(Object(ce.camelizeKeys)(t))).plugin,o=Object(Dd.h)();if(r.androidDownload||r.iosDownload){var a="".concat(o.os,"Download");if("pc"===o.os)a=("mac"===o.pc?["iosDownload","androidDownload"]:["androidDownload","iosDownload"]).find((function(e){return r[e]}))||"";return h.a.createElement(Hd,Nd()({},e,{data:Id()({},t,{pluginType:a}),onClose:n.onClose}))}return r.leads&&"pc"!==o.os?h.a.createElement(Qd,Nd()({},e,{data:Id()({},t,{pluginType:"leads"}),onClose:n.onClose})):null},n}return Ne()(t,e),Te()(t,[{key:"render",value:function(){var e=this.props.data,t=this.state.display;return e&&e.plugin&&!t?h.a.createElement(h.a.Fragment,null,this.getContent({data:e})):null}}]),t}(h.a.Component),Gd=n(234),Yd=n(449);function Zd(e){var t=e.loadBrandContentPlugin,n=e.contentType,r=e.contentToken,o=e.author,a=e.plugin,i=Object(p.useCallback)((function(){t(n,r)}),[n,r,t]),c="organization"===o.userType&&!a;if(Object(p.useEffect)((function(){c&&i()}),[c,i]),!a)return null;var s={contentType:n,contentToken:r,suger:{},author:o,plugin:a,visible:!0};return Object(d.b)("div",{className:"OrgEquityPlugin",children:Object(d.b)(Wd,{data:s})})}Zd.propTypes={contentType:g.a.oneOf(["answer","article"]).isRequired,contentToken:g.a.oneOfType([g.a.number,g.a.string]).isRequired,author:g.a.object.isRequired};var Xd=Object(b.compose)(Object(Gd.a)(null),Object(j.connect)((function(e,t){var n=t.contentType,r=t.contentToken;return{plugin:Object(Yd.c)(e,{contentType:n,contentToken:r})}}),{loadBrandContentPlugin:Yd.b}))(Zd),Jd=n(1130),$d=n(1174),ef=n(1327),tf=[{title:"知乎",imageSrc:"https://pic4.zhimg.com/80/v2-88158afcff1e7f4b8b00a1ba81171b61_720w.png",description:"发现更大的世界",button:"打开"},{title:"浏览器",imageSrc:"https://picb.zhimg.com/80/v2-a448b133c0201b59631ccfa93cb650f3_1440w.png",description:"",button:"继续"}],nf={uc:{imageSrc:"https://pic4.zhimg.com/80/v2-eb129ee601fe0521fbc05703a615ddd5_1440w.png",title:"UC 浏览器"},qq:{imageSrc:"https://pic1.zhimg.com/80/v2-211dd15e1000c599f5b89ecf4e1eb3b6_1440w.png",title:"QQ 浏览器"},wx:{imageSrc:"https://pic1.zhimg.com/80/v2-05fe05b84411fc88790189e95d7e84aa_1440w.png",title:"微信"},huawei:{imageSrc:"https://pic1.zhimg.com/80/v2-88a3ad0d3764917daaf92f5133a7024d_1440w.jpeg",title:"华为浏览器"},safari:{imageSrc:"https://pic2.zhimg.com/80/v2-da7d9e4b6a7ddba507299bcf5a4d0600_1440w.png",title:"Safari"},chrome:{imageSrc:"https://picb.zhimg.com/80/v2-a448b133c0201b59631ccfa93cb650f3_1440w.png",title:"Chrome"},default:{imageSrc:"https://picb.zhimg.com/80/v2-a448b133c0201b59631ccfa93cb650f3_1440w.png",title:"浏览器"}},rf=function(e){var t=e.show,n=e.onCancel,r=e.onSubmit,o=e.id,a=e.type,i=Object(Fs.b)(),c=i.origin.toLowerCase(),s=i.Android?nf.chrome.imageSrc:nf.safari.imageSrc,l=B.a.get("question:firstCheckedTrue");Object(p.useEffect)((function(){l&&t&&!i.Wechat&&(location.href="zhihu://".concat(a,"/").concat(o))}),[l,t,a,o,i.Wechat]);var u="";return u=i.UC?"uc":i.Wechat?"wx":i.MQQBrowser?"qq":/huawei|honor/g.test(c)?"huawei":/chrome/g.test(c)||/crios/g.test(c)?"chrome":i.Safari?"safari":"default",tf[1].title=nf[u].title,tf[1].imageSrc="default"===u?s:nf[u].imageSrc,Object(d.c)(ef.a,{className:"ModalWrap",show:t,onCancel:n,hideIcon:!0,maskClosable:!1,children:[t&&Object(d.b)($d.a,{className:"ModalWrap-body"}),Object(d.c)("div",{className:"ModalWrap-content",children:[Object(d.b)("div",{className:"ModalWrap-title",children:"继续浏览内容"}),tf.map((function(e,t){return Object(d.c)("div",{className:"ModalWrap-item",children:[e.imageSrc&&Object(d.b)("div",{className:"ModalWrap-itemImg",children:Object(d.b)("img",{src:e.imageSrc})}),Object(d.c)("div",{className:"ModalWrap-itemContent",children:[Object(d.b)("div",{className:"ModalWrap-itemTitle",children:e.title}),e.description&&Object(d.b)("div",{className:"ModalWrap-itemDesc",children:e.description})]}),Object(d.b)("div",{className:"ModalWrap-itemBtn",onClick:function(){return function(e){0===e?(B.a.set("question:firstCheckedTrue","true"),r()):n()}(t)},children:e.button})]},t)}))]})]})},of=n(407),af=n(1065),cf=function(e){var t=e.show,n=e.children,r=e.className,o=Object(p.useRef)();return Object(p.useEffect)((function(){var e=null;return t?(document.body.style.overflow="hidden",e=Object(of.a)(o.current)):document.body.style.overflow="auto",function(){e&&e()}}),[t]),Object(d.b)("div",{className:r,children:Object(d.c)("div",{ref:o,children:[Object(d.b)("div",{className:O()({"ModalLoading-background":t})}),Object(d.c)("div",{className:O()("ModalLoading-content",{"ModalLoading-modalShow":t}),children:[n,Object(d.b)(af.a,{})]})]})})},sf=n(1179),lf=n(1088);function uf(e){var t=e.questionId,n=e.title,r=e.href,o=e.zaTitleId,a=e.showStickyMark,i=e.onClick;return Object(d.c)("div",{itemProp:"zhihu:question",itemType:"http://schema.org/Question",itemScope:!0,children:[Object(d.b)("meta",{itemProp:"url",content:"https://www.zhihu.com/question/".concat(t)}),Object(d.b)("meta",{itemProp:"name",content:n}),a&&Object(d.b)(lf.a,{}),Object(d.b)(C.Link,Object.assign({to:r,target:"_blank","data-za-detail-view-element_name":"Title"},o&&{"data-za-detail-view-id":o},{onClick:i,children:n}))]})}uf.propTypes={questionId:g.a.number.isRequired,title:g.a.string.isRequired,href:g.a.string.isRequired,zaTitleId:g.a.number,showStickyMark:g.a.bool,onClick:g.a.func};var df=n(35),ff=n(1013),pf=n(1281);function hf(e){var t=e.markInfo,n=re.G[t.markType];if(!n)return null;var r=t.roundtable&&"https://www.zhihu.com/roundtable/".concat(t.roundtable.urlToken);return r?Object(d.b)("a",{href:r,children:n}):Object(d.b)("span",{children:n})}function bf(e){var t=e.markInfos,n=Object(p.useMemo)((function(){return t.filter((function(e){return re.G[e.markType]})).map((function(e,t){return Object(d.c)(p.Fragment,{children:[0!==t&&"、",Object(d.b)(hf,{markInfo:e})]},t)}))}),[t]);return n.length?Object(d.c)(ff.CJKSpace,{children:["收录于",n]}):null}function mf(e){var t,n=e.id,r=e.voteupCount,o=e.markInfos,a=e.actorToken,i=e.action,c=e.concernedUpvoters,s=Object(df.a)(e,["id","voteupCount","markInfos","actorToken","action","concernedUpvoters"]);return Object(d.b)(ne.a,{trackCardShow:!0,view:{id:8257},children:Object(d.c)(m.Text,Object.assign({color:"GBL05A",fontSize:14,mt:"10px",mb:"-4px"},s,{children:[o&&Object(d.c)(d.a,{children:[Object(d.b)(bf,{markInfos:o}),Boolean(r)&&" · "]}),Object(d.b)("span",{onClick:function(){return T.a.trackEvent(null,{id:8258,action:"Click"})},children:Object(d.b)(pf.a,{id:n,type:"answer",voteupCount:r,upvotedFollowees:null!==(t=null==c?void 0:c.filter((function(e){return a!==e.urlToken})))&&void 0!==t?t:[],too:"voted"===i})})]}))})}var vf=n(1323),gf=n(1298),yf=n(1319),Of=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.contentExpanded,r=t.unescapable,o=e.labelInfo,a=e.hermesLabel;return Object(d.b)(p.Fragment,{children:!n&&!r&&Object(d.b)(Rd.a,{labelInfo:o||a})})},jf=n(1285),wf=n(1388),Cf=function(){return Object(d.c)("div",{className:"SelfVisibleLable-wrap",children:[Object(d.b)(wf.a,{className:"SelfVisibleLable-lockIcon",width:16,center:!0}),"仅自己可见"]})},kf=function(e){var t=e.answer,n=e.canCollapse,r=e.showReviewingLabel,o=t.collapsedBy,a=t.reviewInfo,i=(a=void 0===a?{}:a).isReviewing,c=a.tips,s=t.isVisible,l=t.relationship,u=(l=void 0===l?{}:l).isAuthor,f=t.visibleOnlyToAuthor;return u&&f?Object(d.b)(Cf,{}):i&&s?Object(d.b)("div",{className:"AnswerItem-status",children:c},"negativeLabels"):r&&!1===s&&u?Object(d.b)("div",{children:Object(d.b)(jf.a,{})},"negativeLabelsReviewing"):"org"!==o||n?null:Object(d.c)("div",{className:"AnswerItem-status",children:["回答被提问机构移至隐藏区(",Object(d.b)("a",{href:"/org-intro#org-question",target:"_blank",children:"为什么?"}),""]},"negativeLabels")},xf=function(e){var t=e.isNormal,n=void 0===t||t,r=e.collapsedBy,o=e.suggestEdit,a=e.collapseReason,i=e.isCollapsed,c=e.question,s=(c=void 0===c?{}:c).brand,l=(s=void 0===s?{}:s).isPuQuestion;return!n&&(null==o?void 0:o.unnormalDetails)?{abnormalDetailProps:{abnormalDetail:o.unnormalDetails}}:("community"===r||l)&&i?{collapseReasonProps:{collapseReason:a}}:null},Sf=function(e){var t=e.answer,n=e.canCollapse,r=e.hideCommercialInviteLabel,o=t.collapsedBy,a=t.relevantInfo,i=(a=void 0===a?{}:a).relevantType,c=a.brandSpecialExtra;if(Object(oe.m)(t)||Object(oe.n)(t)||"org"===o&&!n){if("brand_special"===i&&!r)return{type:"answer",data:c};if("brand_best"===i)return{data:{name:"品牌精选",subText:"本回答由品牌设为精选"}}}return null},Ef=function(e){var t=e.annotationDetail,n=e.reviewInfo,r=(n=void 0===n?{}:n).isReviewing,o=e.isNormal,a=void 0===o||o,i=e.collapsedBy;return!r&&a&&"community"!==i&&t?{annotationDetail:t}:null};n(1314);function Rf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Tf=function(e){return"plain"===e||"special-plain"===e},Af=Tf,Nf={allowed:"允许规范转载",need_payment:"允许付费转载",disallowed:"禁止转载"},_f=["zhi-hu-ri-bao-51-41"],If=Object(w.createSelector)((function(e,t){return Object.assign({},e.entities.answers[t.answer.id]||t.answer,{videoContribution:t.answer.videoContribution})}),(function(e,t){return e.entities.questions[t.answer.question.id]}),(function(e,t){return t?Object.assign({},e,{question:Object.assign({},e.question,t)}):e})),Mf=function(e){Object(s.a)(n,e);var t=Rf(n);function n(){var e,r,o,i,s,l;Object(a.a)(this,n);for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];return(e=t.call.apply(t,[this].concat(f))).state={commentsShown:!1,commentsAutoFocus:!0,reportModalShown:!1,deleteModalShown:!1,collapseModalShown:!1,favlistsShown:!1,editing:!1,commentPattern:"fixed",addAnnotationModalShown:!1,cancelAnnotationModalShown:!1,guideShown:!1,shareVideoQuery:e.getShareVideoId(),shouldShowVideoDetails:!1,contentExpanded:e.props.expanded,hasFetchedLabels:!1,showWechatExpand:!1,autoExpand:!1,shownLoadingBar:!1,shownCatalogModal:!1,wxIsReady:!1},e.answerFormRef=Object(p.createRef)(),e.rewardContainerRef=Object(p.createRef)(),e.richContentRef=Object(p.createRef)(),e.handleLoadedNext=function(){e.setState({wxIsReady:!0}),e.state.shownLoadingBar&&e.createOpenInAppHandler(e.state.autoExpand?"expand_answer2":"expand_answer1")(),e.setState({shownLoadingBar:!1})},e.showOiaModal=function(){var t=e.props,n=t.blockReading,r=t.itemProp,o=t.isBaidu,a=t.shouldAllAutoExpand;("mainEntityOfPage"===r||"acceptedAnswer"===r)&&(document.referrer.includes("zhihu.com")&&a||!o&&!document.referrer.includes("sm.cn")&&n)&&e.setState({showWechatExpand:!0,autoExpand:!0})},e.onCloseReward=function(){var t=e.props.answer.id;B.a.set("isRewardable",!1),e.props.updateAnswerReward(t,"")},e.openModal=function(t,n){e.setState(Object.assign({},n))},e.openDeleteModal=function(){setTimeout((function(){e.setState({deleteModalShown:!0})}))},e.closeModal=function(){e.setState({commentsShown:!1});var t=e.props.onCloseComment;"function"==typeof t&&t()},e.closeDeleteModal=function(){e.setState({deleteModalShown:!1})},e.toggleCatalogModal=function(){e.setState({shownCatalogModal:!e.state.shownCatalogModal})},e.disableAuth=(r=e.props,o=r.router,i=(o=void 0===o?{}:o).location,s=(i=void 0===i?{}:i).pathname,l=r.isBaidu,r.isMobile&&!e.context.currentUser&&!l&&!s.startsWith("/topic")),e.loadAnswerConcernedVoters=function(){var t=e.props,n=t.concernedUpvoters,r=t.answer,o=t.loadAnswerConcernedVoters;!n&&e.context.currentUser&&o(r.id)},e.handleExpand=function(t){var n=e.props,r=n.onToggleExpand,o=n.trackPromotionClick;t&&(e.loadAnswerConcernedVoters(),o&&o()),r&&r(t),e.setState({contentExpanded:t})},e.handleReshipmentSettings=function(t){var n=e.props,r=n.answer.id,o=n.updateAnswerReshipmentSettings,a=n.fillCurrentUserIfNeeded;"need_payment"===t?Promise.resolve(a(["caEnabled"])).then((function(){e.props.currentUser.caEnabled?o(r,t):window.open("/copyright/invite")})):o(r,t)},e.handleLoadAnswerForSettings=function(){var t=e.props,n=t.answer.id;(0,t.loadAnswerForSettings)(n)},e.handleDeleteAnswer=function(){var t=e.props,n=t.answer.id;(0,t.deleteAnswer)(n)},e.handlePositionStatusChange=function(t){e.setState({positionStatus:t})},e.handleCollapseModalShow=function(){e.setState({collapseModalShown:!0})},e.handleCollapseModalHide=function(){e.setState({collapseModalShown:!1})},e.handleUpdateAnswerCollapsed=function(){var t=e.props,n=t.answer,r=n.id,o=n.collapsedBy,a=t.updateAnswerCollapsed,i=t.showNotification;return"community"===o?i("该回答因违反社区规范已被管理员折叠,暂无法公开","red"):a(r)},e.handleUpdateAnswerStick=function(){var t=e.props,n=t.answer.id;return(0,t.updateAnswerStick)(n)},e.handleRestoreAnswer=function(){var t=e.props,n=t.answer,r=n.id,o=n.question;(0,t.restoreAnswer)(o.id,r)},e.handleStartEditAnswer=function(){var t=e.props,n=t.draftStatus,r=t.hasPublishingDraft,o=t.isMobile;n&&n.loading?L.a.alert("草稿正在加载中……"):r?L.a.alert("你有一份对该回答的修改正在发布中,请等待发布完成后再次修改。"):o?e.context.startAddAnswer(e.props.answer.id):e.setState({editing:!0},(function(){e.answerFormRef.current.focus()}))},e.handleCancelEditAnswer=function(){e.setState({editing:!1});var t=e.props,n=t.onCloseEditing,r=t.onCloseComment;"function"==typeof r&&r(),"function"==typeof n&&n()},e.handleSubmitAnswer=function(t){var n=e.props,r=n.answer.id,o=n.updateAnswer;return e.handleCancelEditAnswer(),o(r,t).then((function(t){return T.a.trackEvent(e.contentItem,{action:"StatusReport"},{status:{result:"Success",event:{action:"Edit"}}}),t}))},e.handleReportOpen=function(){var t=e.props.zaInfos.report;T.a.trackEvent(e.contentItem,Object.assign({action:"Report",element:"Button",is_intent:!0},t&&{id:t})),e.context.authRequired((function(){return e.setState({reportModalShown:!0})}),re.W.report)()},e.handleReportHide=function(){e.setState({reportModalShown:!1})},e.handleFavlistsShown=function(t){var n=e.props,r=n.shouldOia,o=n.zaInfos.favlists;T.a.trackEvent(e.favButtonRef,Object.assign({action:"Collect",element:"Button",is_intent:!0},o&&{id:o})),r?e.createOpenInAppHandler("collect_answer")(t):e.disableAuth?e.handleToggleGuide():e.context.authRequired((function(){return e.setState({favlistsShown:!0})}),re.W.favlists)()},e.handleFavlistHide=function(){e.setState({favlistsShown:!1})},e.handleLogMoreClick=function(){var t=e.props.zaInfos.options;T.a.trackEvent(e.contentItem,Object.assign({action:"Click",element_name:"MoreAction"},t&&{id:t}))},e.handleShowAddAnnotationModal=function(){return e.setState({addAnnotationModalShown:!0})},e.handleCloseAddAnnotationModal=function(){return e.setState({addAnnotationModalShown:!1})},e.handleShowCancelAnnotationModal=function(){return e.setState({cancelAnnotationModalShown:!0})},e.handleCloseCancelAnnotationModal=function(){return e.setState({cancelAnnotationModalShown:!1})},e.handleToggleGuide=function(){e.setState({guideShown:!e.state.guideShown})},e.handleClickVideoMoreButton=function(){e.setState({shouldShowVideoDetails:!1})},e.startEditing=function(){var t=e.props,n=t.isAuthor,r=t.editable;e.context.currentUser&&n&&r&&e.handleStartEditAnswer()},e.addRewardTagline=function(t){var n=e.props.answer.id;Object(pe.a)(t,n)},e.createOpenInAppHandler=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.props,o=r.answer,a=o.type,i=o.id,s=r.blockReading,l=r.isSpecialQuestionOrAnswer;return function(r,o){if(r&&r.preventDefault(),s&&T.a.trackEvent(Object(c.a)(e),{id:5550,action:"Click"},{button:{text:"openapp"}}),l)location.href="zhihu://".concat(a,"/").concat(i,"?utm_app_name=zhihu_check");else{var u=xu.a[o]||xu.a[t],d=Object.assign({},s&&{yyb_ckey:"CK1430255776739"},{preventToOIA:n});xu.b[u]&&(d.launch_button=xu.b[u]),Object(ee.e)(Object(ye.a)({type:a,id:i}),d)}}},e.renderLabels=function(){var t=e.props.answer,n=t.isNormal;if((void 0===n||n)&&e.isPaidAnswer)return{labels:[],editingLabels:[]};var r=e.props,o=r.useNewLabels,a=r.canCollapse,i=r.relatedTo,c=r.showReviewingLabel,s=r.hideCommercialInviteLabel,l=e.state,u=l.contentExpanded,f=l.editing,p=kf({answer:t,canCollapse:a,showReviewingLabel:c}),h=xf(t),b=Sf({answer:t,canCollapse:a,hideCommercialInviteLabel:s}),m=Ef(t);if(!o){var v=Object(d.b)(Td.a,Object.assign({useOldLabels:!0,item:{isLabeled:!0}},h,{commercialProps:b,annotationProps:m,showLegacyPositiveLabel:Object(oe.n)(t),editing:f}));return{labels:[p,v],editingLabels:[v]}}if(p||h)return{labels:[p,Object(d.b)(Td.a,Object.assign({item:{isLabeled:!0}},h),"labels")],editingLabels:[]};var g=[Object(d.b)(Td.a,{item:t,commercialProps:b,annotationProps:m,editing:f},"labels")];return{labels:u||i?g:[],editingLabels:g}},e.renderPrefix=function(){var t=e.props,n=t.answer,r=t.relatedTo,o={contentExpanded:e.state.contentExpanded,unescapable:Boolean(r)};return Of(n,o)},e.renderVoteButton=function(){var t=e.props,n=t.answer,r=t.answer,o=r.question,a=o.questionType,i=o.isMuted,c=r.relationship,s=(c=void 0===c?{}:c).isRecognized,l=c.voting,u=r.attachment,f=r.voteupCount,p=t.shouldOia,h=t.zaInfos,b=h.voteUp,m=h.voteDown,v=t.isMuteSpecial,g=t.isMuteFreeze,y=t.isAuthor,O=e.context.currentUser,j=e.state.positionStatus,w="commercial"===a;return e.isLegacyVideoAnswer?Object(d.b)(rd,{answer:n,id:u.attachmentId,voteupCount:f,voting:l,isOwner:y,disabled:w&&i||v||g,currentUser:O}):Object(d.b)($u.a,Object.assign({answer:n,disabled:w&&i||v||g},p&&{onClick:e.createOpenInAppHandler("vote_answer")},{disableAuth:e.disableAuth,isRecognized:s,handleToggleGuide:e.handleToggleGuide,positionStatus:j,zaIds:{voteUp:b,voteDown:m}}),"vote")},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.expanded,r=t.byComment,o=t.editing,a=t.loadVideoDetails,i=t.isSearchSpecialSource,c=t.isMobile,s=t.isWechat,l=this.state.shareVideoQuery;if(l&&a(l).then((function(){e.setState({shouldShowVideoDetails:!0})})),n&&this.loadAnswerConcernedVoters(),r&&setTimeout((function(){return e.setState({commentsShown:Boolean(r)})})),o&&this.startEditing(),c&&!i&&this.showOiaModal(),c&&s)if(document.addEventListener("WeixinJSBridgeReady",(function(){e.handleLoadedNext()})),"complete"===document.readyState)this.handleLoadedNext();else{window.addEventListener("load",(function t(){window.removeEventListener("load",t),e.handleLoadedNext()}))}}},{key:"componentDidUpdate",value:function(e){!this.props.editing||e.editing||this.state.editing||this.startEditing()}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props.answer,r=n.reshipmentSettings,o=n.commentPermission,a=e.answer,i=a.reshipmentSettings,c=a.commentPermission;!r&&i&&!o&&c&&setTimeout((function(){return t.settingsTogglerEl.click()}))}},{key:"getShareVideoId",value:function(){var e=this.props,t=e.location;return e.isMobile?t.query.preview_video_id:null}},{key:"renderReshipmentSettings",value:function(e){var t=this;return Object.keys(Nf).map((function(n){return Object(d.b)(M.a,{onClick:function(){return t.handleReshipmentSettings(n)},checked:n===e,children:Nf[n]},n)}))}},{key:"renderAnswerExtraInfo",value:function(){var e=this.props,t=e.answer,n=e.actor,r=e.action,o=e.concernedUpvoters,a=e.isHuman,i=e.useNewLabels,c=e.isMobile,s=t.id,l=t.voteupCount,u=t.markInfos,f=t.isNormal;if(!((!a||!c)&&(void 0===f||f)))return null;var p=(null==u?void 0:u.length)>0&&!i;return p||l?Object(d.b)(mf,{id:s,voteupCount:l,markInfos:p&&u,actorToken:null==n?void 0:n.urlToken,action:r,concernedUpvoters:o},"AnswerItemExtraInfo"):null}},{key:"renderSettings",value:function(){var e=this,t=this.context.currentUser,n=this.props,r=n.answer,o=r.collapsedBy,a=r.reshipmentSettings,i=r.commentPermission,c=r.question.questionType,s=r.rewardInfo,l=(s=void 0===s?{}:s).isRewardable,u=void 0!==l&&l,f=r.relevantInfo,p=n.answer,h=n.canCollapse,b=n.isMobile,m=n.isAuthor;return t&&m?a&&i?Object(d.c)(I.c,{toggler:Object(d.b)(_.c,{preset:"plain",onRef:function(t){e.settingsTogglerEl=t},icon:k.a,label:!b&&"设置"}),reversed:!0,menuClassName:"AnswerItem-selfMenu",itemClassName:"AnswerItem-selectMenuItem",children:[this.renderReshipmentSettings(a),Object(d.b)(I.a,{}),Object(d.b)(Oe.c,{target:p,onChange:this.props.updateAnswerCommentPermission,current:p.commentPermission}),Object(d.b)(I.a,{}),u&&Object(d.b)(I.b,{onClick:this.onCloseReward,children:"关闭赞赏"}),Object(d.b)(I.b,{onClick:this.openDeleteModal,children:"删除"}),"commercial"===c&&h&&"nobody"===o&&(!f||"brand_special"!==f.relevantType)&&[Object(d.b)(I.a,{},"MenuDivider"),Object(d.b)(I.b,{onClick:this.handleUpdateAnswerCollapsed,children:"隐藏"},"MenuItem")]]},"settings"):Object(d.b)(_.c,{preset:"plain",onClick:this.handleLoadAnswerForSettings,icon:k.a,label:!b&&"设置"},"settings"):null}},{key:"renderReshipment",value:function(e,t){var n=this;return"need_payment"===t?Object(d.b)(I.b,{onClick:function(){T.a.trackEvent(n.contentItem,{action:"Authorize",element:"Button",is_intent:!0})},tag:"a",href:"/copyright/apply?answer=".concat(e),target:"_blank",children:"申请授权"}):"disallowed"===t?Object(d.b)(I.b,{tag:"a",target:"_blank",href:"/term/zhihu-terms#sec-licence-6",children:"禁止转载"}):null}},{key:"renderOptions",value:function(){var e=this;if(!this.context.currentUser)return null;var t=this.props,n=t.answer,r=t.canCollapse,o=t.renderExtraOptions,a=t.permission.canBrandAdminEdit,i=t.isMobile,c=t.isAuthor,s=n.id,l=n.reshipmentSettings,u=n.collapsedBy,p=n.question,h=p.questionType,b=p.brand,m=(b=void 0===b?{}:b).isPuQuestion,v=n.annotationAction,g=void 0===v?[]:v,y=n.annotationDetail,O={toggler:Object(d.b)(_.c,{preset:"plain",className:"OptionsButton",icon:x.a,"aria-label":"更多"}),reversed:!0,onOpen:this.handleLogMoreClick,menuClassName:"AnswerItem-selfMenu",itemClassName:"AnswerItem-selfMenuItem"},j="commercial"===h,w="nobody"!==u;return c?null:Object(f.e)(I.c,Object.assign({},O,{key:"options"}),i&&Object(d.b)(sf.a,{answer:n}),r&&!j&&Object(d.b)(I.b,{onClick:w?this.handleUpdateAnswerCollapsed:this.handleCollapseModalShow,children:w?"取消隐藏":"隐藏"}),a&&j&&!w&&!m&&Object(d.b)(I.b,{onClick:this.handleUpdateAnswerCollapsed,children:"隐藏"}),g&&g.some((function(e){return re.d.add===e}))&&!y&&Object(d.b)(I.b,{onClick:this.handleShowAddAnnotationModal,children:"标记内容"}),g&&g.some((function(e){return re.d.cancel===e}))&&y&&Object(d.b)(I.b,{onClick:this.handleShowCancelAnnotationModal,children:"撤销标记"}),Object(d.b)(I.b,{onClick:this.handleReportOpen,children:"举报"}),this.renderReshipment(s,l),o&&o({itemClassName:"AnswerItem-selfMenuItem",getContainer:function(){return e.contentItem}}))}},{key:"renderMeta",value:function(){var e=function(e){var t=e.thumbnail,n=e.voteupCount,r=e.question.id,o=e.id,a=e.createdTime,i=e.updatedTime,c=e.commentCount;return{image:t,upvoteCount:n,url:"https://www.zhihu.com/question/".concat(r,"/answer/").concat(o),dateCreated:new Date(1e3*a).toISOString(),dateModified:new Date(1e3*i).toISOString(),commentCount:c}}(this.props.answer);return Object.keys(e).map((function(t){return Object(d.b)("meta",{itemProp:t,content:e[t]},t)}))}},{key:"renderBrandQuestionPrizeTip",value:function(){var e=this.props.answer,t=e.id,n=e.question.prize,r=(n=void 0===n?{}:n).winnersAnswerTokens,o=n.prizes;if(!n.status)return null;var a=["一","二","三"],i=null;return o&&r&&r.forEach((function(e,n){e.includes(t)&&null===i&&(i=o&&o[1]&&o[1].name?"得".concat(a[n],"等奖"):"奖")})),i&&Object(d.c)("div",{className:"AnswerItem-brandQuestionPrizeTip",children:["该回答在有奖问答中获",i]})}},{key:"renderBrandEntityTrack",value:function(){var e=this.state.contentExpanded,t=this.props,n=t.answer,r=t.expanded,o=t.isBrandAnswer,a=n.question;return(r||e)&&(a&&"commercial"===a.questionType||o)?Object(d.b)(qu.a,{type:n.type,id:n.id}):null}},{key:"renderEditTime",value:function(){var e,t,n,r=this.props,o=r.shouldOia,a=r.answer,i=a.id,c=a.createdTime,s=a.updatedTime,l=a.question.id,u=a.playCount,f=a.attachment,p=u||(null==f||null===(e=f.zvideo)||void 0===e?void 0:e.playCount)||(null==f||null===(t=f.video)||void 0===t||null===(n=t.videoInfo)||void 0===n?void 0:n.playCount)||0,h="".concat(re.E,"/question/").concat(l,"/answer/").concat(i);return Object(d.b)(od.a,Object.assign({created:c,updated:s,href:h},this.isVideoAnswer&&p>0&&{videoPlayCount:Number(p)},o&&{onClick:this.createOpenInAppHandler("click_answer")}))}},{key:"render",value:function(){var e,t,n=this,a=this.props,i=a.answer,c=a.reward,s=a.answer,l=s.id,u=s.isNormal,f=void 0===u||u,p=s.isDelete,h=s.question,b=s.rewardInfo,v=s.question,g=v.title,y=v.id,j=v.questionType,w=v.commercial,C=v.brand,k=(C=void 0===C?{}:C).isPuQuestion,x=s.author,T=s.excerpt,I=s.content,M=s.enableConvert,P=s.editableContent,B=s.commentCount,D=s.adminClosedComment,F=s.collapsedBy,U=s.isSticky,V=s.thumbnail,q=s.thumbnailExtraInfo,H=s.reviewInfo,K=(H=void 0===H?{}:H).isReviewing,Q=H.editType,G=s.relevantInfo,Y=(G=void 0===G?{}:G).relevantType,Z=s.annotationDetail,X=s.paidInfo,J=void 0===X?{}:X,ee=s.creatorRightsNotification,te=s.attachment,ne=s.vessayInfo,oe=s.videoContribution,ae=a.relatedTo,ie=a.editable,ce=a.byComment,se=a.draft,le=a.expanded,ue=a.lastreadTouchable,de=a.preset,fe=a.canCollapse,pe=a.canStick,he=a.itemProp,be=void 0===he?"answer":he,me=a.addAnnotation,ve=a.cancelAnnotation,Oe=a.showNotification,ke=a.dataZaIndex,xe=a.blockReading,Se=a.isWechat,Ee=a.isHuaweiBrowser,Re=a.isHonor,Te=a.lessExcerpt,Ae=a.isHuman,Ne=a.ua,_e=a.shouldSpecialOia,Ie=a.shareVideoDetail,Me=a.trackPromotionClick,Le=a.formatContent,Pe=a.zaInfos,Be=Pe.expand,ze=Pe.title,De=Pe.thank,Fe=Pe.toggleComment,Ue=Pe.share,Ve=Pe.getCommentAction,qe=a.handleToggleSticky,He=a.renderActionButtons,Ke=a.permission.canBrandAdminEdit,Qe=a.readContentRightsNotification,We=a.ecommerce,Ge=a.isMobile,Ye=a.canAbstract,Ze=a.isBaidu,Xe=a.isMuteSpecial,Je=a.isMuteFreeze,$e=a.isAuthor,et=a.shouldUseArticleCard,tt=a.isTopic,nt=a.xiaomi,rt=a.showCommentForOia,ot=a.pathname,at=a.richContentKey,it=a.isQuestionPage,ct=a.useNewEditorSetting,st=a.showMobileSignInModal,lt=a.abTestShowMobileSignInModal,ut="function"==typeof qe,dt=this.context.currentUser,ft="".concat(re.E,"/question/").concat(y,"/answer/").concat(l),pt=this.state,ht=pt.reportModalShown,bt=pt.deleteModalShown,mt=pt.collapseModalShown,vt=pt.favlistsShown,gt=pt.editing,yt=pt.commentsShown,Ot=pt.commentsAutoFocus,jt=pt.commentPattern,wt=pt.addAnnotationModalShown,Ct=pt.cancelAnnotationModalShown,kt=pt.positionStatus,xt=pt.shareVideoQuery,St=pt.shouldShowVideoDetails,Et=pt.contentExpanded,Rt=pt.showWechatExpand,Tt=pt.autoExpand,At=pt.shownLoadingBar,Nt=pt.wxIsReady,_t=pt.shownCatalogModal,It=xt&&St?{title:Ie.title,thumbnail:Ie.coverUrl,isLens:!0,id:xt,isPlayable:!0,url:"https://www.zhihu.com/video/".concat(xt)}:null;if(p)return Object(d.c)("div",{className:"AnswerItem-deleted",children:["你已经删除了该问题的回答,如果需要修改,请先  ",Object(d.b)("a",{onClick:this.handleRestoreAnswer,children:"撤销删除"})]});var Mt,Lt=!(K&&"create"===Q),Pt="commercial"===j,Bt="nobody"!==F,zt=!function(e){return"special-plain"===e}(de)&&Object(d.b)(Ju.a,{className:O()("AnswerItem-authorInfo",{"AnswerItem-authorInfo--related":ae}),preset:Af(de)?"plain":"default",author:x,relatedTo:ae,id:l,userLinkV2:!0},"authorInfo"),Dt=this.renderAnswerExtraInfo(),Ft=this.renderLabels(),Ut=Ft.labels,Vt=Ft.editingLabels,qt=V||(null==te||null===(e=te.video)||void 0===e||null===(t=e.videoInfo)||void 0===t?void 0:t.thumbnail);if(gt)return Object(d.c)("div",{children:[ct?Object(d.c)(m.Flex,{alignItems:"center",justifyContent:"space-between",css:function(e){return{borderBottom:"1px solid ".concat(e.colors.GBK09A),".Tabs":{border:"none"}}},children:[Object(d.b)("div",{css:function(e){return{fontWeight:"bold",fontSize:15,color:e.colors.GBK03A,borderBottom:"1px solid ".concat(e.colors.GBK10A)}},children:this.isVideoAnswer?"本回答为视频回答":"本回答为图文回答"}),Object(d.b)(Zu.a,{handleClick:null===(Mt=this.answerFormRef.current)||void 0===Mt?void 0:Mt.toggleFullscreen})]}):Object(d.c)(d.a,{children:[this.isVideoAnswer&&Object(d.b)("div",{css:function(e){return Object.assign({padding:"4px 0 20px",fontWeight:"bold",fontSize:15,lineHeight:"21px",color:e.colors.GBK03A,borderBottom:"1px solid ".concat(e.colors.GBK10A)},it&&{marginBottom:16})},children:"本回答为视频回答"}),zt]}),!ct&&Vt,!ct&&Dt,Object(d.b)(Xu.a,{css:ct?{margin:"0 -20px -20px"}:{margin:"16px -20px 0"},className:"AnswerItem-form",isReediting:!0,imperativeRef:this.answerFormRef,question:h,answer:i,defaultValue:P,onDeleteDraft:this.handleCancelEditAnswer,onCancel:this.handleCancelEditAnswer,onSubmit:this.handleSubmitAnswer,isRewardable:b.isRewardable,addRewardTagline:this.addRewardTagline})]});var Ht=Tf(de)?[[zt].concat(Object(r.a)(Ut)),Dt]:[[zt].concat(Object(r.a)(Ut),[Dt]),null],Kt=Object(o.a)(Ht,2),Qt=Kt[0],Wt=Kt[1],Gt="mainEntityOfPage"===be||"acceptedAnswer"===be,Yt=_e&&!Gt,Zt=!It&&this.renderEditTime(),Xt=J.content,Jt=this.isPaidAnswer,$t=Jt?Xt:I,en=!ae&&Object(d.b)(uf,{questionId:y,title:g,href:ft,zaTitleId:ze,showStickyMark:ut&&this.props.isSticky,onClick:Me}),tn=f||$e,nn=nt&&ot.match(/\/question\/\d+$/g),rn=Le?Le($t||T,i):$t||T||"",on=Lt&&!Ge&&Et&&Object(Ce.a)(i,"answer"),an=Boolean(M||(null==ne?void 0:ne.enableVideoTranslate)),cn=Object(Ru.a)("answer",l);return Object(d.c)(Ku.e,{onRef:function(e){return n.contentItem=e},className:"AnswerItem","data-za-index":ke,"data-zop":JSON.stringify({authorName:x.name,itemId:l,title:g,type:"answer"}),data:i,link:ft,meta:Qt,title:en,lastreadTouchable:ue,name:l,itemProp:be,itemType:"http://schema.org/Answer",itemScope:!0,children:[f&&(!tt||Et)&&Object(d.b)(yf.b,{answer:i}),this.renderMeta(),Pt&&this.renderBrandQuestionPrizeTip(),this.renderBrandEntityTrack(),this.isLegacyVideoAnswer&&Object(d.b)("div",{css:{marginTop:16},children:Object(d.b)(N.b,{id:te.zvideo.videoId,thumbnail:te.zvideo.thumbnail,playerUrl:"https://video.zhihu.com/video/".concat(te.zvideo.videoId),isLens:!0,isPlayable:!0})}),(ae||Et)&&oe&&Object(d.b)(vf.a,Object.assign({},oe)),(ae||Et)&&this.isVideoAnswer&&Object(d.b)(gf.a,{}),tn?Object(d.c)(od.b,Object.assign({richContentKey:at,className:O()({"RichContent-mobileBaidu":Ze}),imperativeRef:this.richContentRef,canAbstract:Ye,onToggleExpend:this.handleExpand},Yt&&{expandText:"App 内查看"},xe&&Gt&&{expandText:"展开阅读全文"},Ge&&Ae&&!Gt&&{collapsedHeight:180},{cover:qt,hasVideo:Boolean(q&&"video"===q.type)||this.isVideoAnswer,videoData:It,handleClickVideoMoreButton:this.handleClickVideoMoreButton,unescapable:Boolean(ae),expanded:le,onPositionStatusChange:this.handlePositionStatusChange,before:Wt,excerpt:Le?Le(T,i):T,html:rn,prefix:this.renderPrefix(),ecommerce:We,after:Object(d.c)("div",{children:[Object(d.b)(yf.a,{answer:i}),Object(d.b)(Ed,{className:"AnswerItem-CommercialQuestionTail",commercial:w}),!Ge&&Et&&Object(d.b)(Xd,{contentType:"answer",contentToken:l,author:x}),Zt,dt&&$e&&ie&&Object(d.c)("a",{className:"AnswerItem-editButton",onClick:this.handleStartEditAnswer,children:[Object(d.b)(S.a,{text:!0,center:!0})," ",Object(d.c)("span",{className:"AnswerItem-editButtonText",children:["修改",se&&se.editableContent&&"(有未发布的编辑草稿)"]})]}),!Ge&&dt&&Object(d.b)(wd,{imperativeRef:this.rewardContainerRef,reward:c,currentUser:dt,rewardInfo:b,isAuthor:$e,id:l,author:x,ua:Ne,balanceEnable:!1})]}),data:i,onClick:xe&&Gt?function(){!Ge||Se||dt||!lt?(nn||Se)&&Ge?(n.setState({autoExpand:!1}),n.richContentRef.current.handleExpand()):(Ee||Re)&&Ge?(n.setState({autoExpand:!1}),n.createOpenInAppHandler("expand_answer1",!0)(),n.richContentRef.current.handleExpand()):dt&&Ge?(n.setState({autoExpand:!1}),n.richContentRef.current.handleExpand()):n.setState({showWechatExpand:!0,autoExpand:!1}):st(!0)}:Yt?n.createOpenInAppHandler("expand_answer"):n.disableAuth&&xe&&n.handleToggleGuide},Te?{limit:74}:{},{zaIds:{expand:Be},shouldUseArticleCard:et,children:[Lt&&Ke&&Pt&&Bt&&!k&&Object(d.b)(_.c,{className:O()("ContentItem-rightButton AnswerItem-mainAction AnswerItem-open",{"AnswerItem-mainAction--disabled":"community"===F}),onClick:this.handleUpdateAnswerCollapsed,children:"公开回答"}),Lt&&pe&&!Bt&&"brand_special"!==Y&&Object(d.b)(_.c,{className:"ContentItem-rightButton AnswerItem-mainAction AnswerItem-brandQuestionButton",onClick:this.handleUpdateAnswerStick,children:U?"取消精选":"设为精选"}),!this.props.isBaidu&&He({componentList:[{name:"vote",component:Lt&&this.renderVoteButton()},{name:"comment",component:Lt&&Object(d.b)(Wu.a,Object.assign({onInstance:function(e){return n.commentButton=e},onClick:this.openModal},Ge&&Ae&&_e&&{onClick:this.createOpenInAppHandler("comment_answer")},{commentsShown:yt,commentClosed:D,count:B,positionStatus:kt,zaInfos:{toggleComment:Fe,getCommentAction:Ve}}),"comment")},{name:"catalog",component:on&&Object(d.b)(je.a,{html:rn,sourceId:i.id,onClick:this.toggleCatalogModal},"catalog")},{name:"share",component:Lt&&!Ge&&Object(d.b)(Qu.a,{disabled:Xe||Je,id:l,type:"answer",title:g,authorName:x&&x.name,href:ft,positionStatus:kt,zaShareId:Ue},"share")},{name:"favlist",component:Lt&&(!dt||!dt.isOrg)&&Object(d.b)(Vu.a,{onRef:function(e){return n.favButtonRef=e},onClick:this.handleFavlistsShown,label:Ge?"":"收藏",disabled:Xe||Je},"favlist")},!Ge&&{name:"thank",component:Lt&&!$e&&Object(d.b)(sf.a,Object.assign({zaInfo:De,answer:i,disabled:Xe||Je},this.isLegacyVideoAnswer&&{zVideoId:te.attachmentId}),"thank")},{name:"sticky",component:!Ge&&ut&&$e&&Object(ge.a)(dt)&&Object(d.b)(_.c,{preset:"plain",onClick:qe,icon:this.props.isSticky?E.a:R.a,label:this.props.isSticky?"取消置顶":"置顶"},"sticky")},{name:"vessay",component:!Ge&&$e&&an&&Object(d.c)(A.a,{as:_.c,zaAction:"OpenUrl",zaText:"生成视频",zaType:"Button",preset:"plain",onClick:function(){return window.open(cn)},className:"ContentItem-convertVideoButton",extra:{link:{url:cn}},children:[Object(d.b)(Eu.a,{}),Object(d.b)("span",{children:"生成视频"})]})},{name:"options",component:Ge&&Ae||Lt&&this.renderOptions()},{name:"settings",component:Ge&&Ae||this.renderSettings()},{name:"annotation",component:!Et&&Object(d.b)(Hu.a,{annotationDetail:Z},"annotation")}]})]})):Zt,tn&&!Jt&&Object(d.b)(Jd.a,{content:$t,type:"answer",urlToken:String(l)}),rt&&ot.startsWith("/question")&&Object(d.b)("div",{children:Object(d.b)(Su,{parent:i})}),Object(d.b)(Gu.a,{shown:yt,parent:i,byComment:ce,commentPattern:jt,autoFocus:Ot,onClose:this.closeModal}),Object(d.b)(Yu.a,{type:"answer",urlToken:l,shown:ht,onClose:this.handleReportHide,zaEnabled:!0}),Object(d.b)(W,{addAnnotation:me,onClose:this.handleCloseAddAnnotationModal,shown:wt,type:re.e,urlToken:l,showNotification:Oe}),Object(d.b)($,{cancelAnnotation:ve,onClose:this.handleCloseCancelAnnotationModal,shown:Ct,type:re.e,urlToken:l,showNotification:Oe}),dt&&$e&&Object(d.b)(Cd.a,{title:"你确定要删除自己的答案吗?",subtitle:"答案内容不会被永久删除,你还可以撤消本次删除操作。",shown:bt,onCancel:this.closeDeleteModal,onSubmit:this.handleDeleteAnswer}),fe&&Object(d.b)(Cd.a,{title:"隐藏答案",subtitle:"隐藏后该回答将不展示也不流通,是否确定隐藏?",shown:mt,onCancel:this.handleCollapseModalHide,onSubmit:this.handleUpdateAnswerCollapsed}),Object(d.b)(Tu.a,{id:l,type:"answer",shown:vt,onClose:this.handleFavlistHide,zaEnabled:!0}),Ge&&this.state.guideShown&&Object(d.b)(z.a,{redirectUrl:ft,buttons:[Se?{name:"wechat",text:"快速登录",fill:"#fff"}:"zhihu"],urlScheme:Object(ye.a)({type:"answer",id:l}),onClose:this.handleToggleGuide}),Object(d.b)(Uu,{notification:ee,onRead:function(e){Qe("answer",l,e)},onUseAdmire:function(){n.rewardContainerRef.current.activateReward()},onUseRecommend:function(){var e=n.props.postToolsRecommend;L.a.confirm(Object(d.b)("div",{style:{textAlign:"center"},children:"该推荐将使用本月的 1 次推荐次数。"}),{title:"确定是否推荐?"}).then((function(){return e("answer",l)}),(function(){}))}}),Object(d.b)(rf,{show:Rt&&!nn&&Ge&&!Se,id:i.id,type:i.type,onCancel:function(){n.setState({showWechatExpand:!1},(function(){Tt||n.richContentRef.current.handleExpand()}))},onSubmit:function(){n.setState({showWechatExpand:!1}),Se?Nt?n.createOpenInAppHandler(Tt?"expand_answer2":"expand_answer1")():n.setState({shownLoadingBar:!0}):n.createOpenInAppHandler(Tt?"expand_answer2":"expand_answer1")()}}),Object(d.b)(cf,{show:At&&Ge}),on&&Object(d.b)(we.a,{shown:_t,html:rn,sourceId:i.id,onClose:this.toggleCatalogModal,created:i.createdTime,updated:i.updatedTime,author:x,zaContent:{type:"Answer",token:String(i.id)}})]})}},{key:"isPaidAnswer",get:function(){return"paid"===this.props.answer.answerType}},{key:"isVideoAnswer",get:function(){var e=this.props.answer.attachment;return 2===(null==e?void 0:e.type)||"zvideo"===(null==e?void 0:e.type)||"video"===(null==e?void 0:e.type)}},{key:"isLegacyVideoAnswer",get:function(){var e=this.props.answer.attachment;return"zvideo"===(null==e?void 0:e.type)}}]),n}(p.PureComponent);Mf.contextTypes={currentUser:g.a.object,authRequired:g.a.func,startAddAnswer:g.a.func},Mf.propTypes={relatedTo:g.a.oneOf(["question","answer"]),editable:g.a.bool,preset:g.a.oneOf(["special-plain","plain","primary"]),lessExcerpt:g.a.bool,shareVideoDetail:g.a.object,formatContent:g.a.func,renderExtraOptions:g.a.func,zaInfos:g.a.object,onToggleExpand:g.a.func,useNewLabels:g.a.bool,renderActionButtons:g.a.func,canAbstract:g.a.bool,trackPromotionClick:g.a.func,isSearchSpecialSource:g.a.bool,hideCommercialInviteLabel:g.a.bool},Mf.defaultProps={editable:!1,canAbstract:!1,isSearchSpecialSource:!1,preset:"primary",zaInfos:{},renderActionButtons:sf.b};var Lf=Object(b.compose)(Object(ne.b)((function(e){var t=e.answer,n=e.trackCardShow,r=void 0===n||n,o=e.zaInfos,a=void 0===o?{}:o;return Object.assign({module:"AnswerItem",card:{has_image:Boolean(t.thumbnailExtraInfo&&"image"===t.thumbnailExtraInfo.type),has_video:Boolean(t.thumbnailExtraInfo&&"video"===t.thumbnailExtraInfo.type),content:{type:"Answer",token:t.id&&t.id.toString(),upvote_num:t.voteupCount,comment_num:t.commentCount,publish_timestamp:new Date(t.createTime).getTime(),parent_token:t.question&&t.question.id.toString(),author_member_hash_id:t.author&&t.author.id,video_id:t.thumbnailExtraInfo&&t.thumbnailExtraInfo.videoId}},content:{type:"Answer",token:t.id}},a.index&&{index:a.index},a.cardShow&&{view:{id:a.cardShow}},{trackCardShow:r})})),C.withRouter,Object(j.connect)((function(e,t){var n,r,o=e.entities.drafts,a=void 0===o?{}:o,i=e.question,c=(i=void 0===i?{}:i).draftStatus,s=e.answers,l=(s=void 0===s?{}:s).paidContent,u=void 0===l?{}:l,d=e.reward,f=e.switches,p=e.video.shareVideoDetail,h=e.env,b=h.edition,m=h.userAgent,v=t.answer,g=t.relatedTo,y=t.location.pathname,O=y.split("/"),j=!1,w=!0;!O[1]||"org"!==O[1]&&"people"!==O[1]||(j=O[2]&&-1!==_f.indexOf(O[2]),w=!1);var C=function(e){var t;if(e.videoContribution)return e;if(null===(t=e.attachment)||void 0===t?void 0:t.video){var n=e.attachment.video,r=n.title,o=n.subVideoId,a=n.parentVideoId,i=n.zvideoId,c={videoId:o,zvideoId:i,title:r,playCount:n.playCount,voteupCount:n.voteupCount,isComplete:!i||a===o,startTime:n.startTime,creationReferences:n.creationReferences};return Object.assign({},e,{videoContribution:c})}return e}(If(e,t)),k=Object(me.b)(e),x=["question","answer"].includes(g),S=Object(he.c)(e)&&x,E=Object(he.i)(e),R=m.Mobile,T=m.Qzone,A=R&&E&&!T;return{draft:v&&a["question_".concat(v.question.id)],draftStatus:null==c?void 0:c[v.question.id],answer:C,ua:Object(he.l)(e),pathname:y,xiaomi:b.xiaomi,reward:d,switches:f,isHuman:S,shouldOia:Object(he.h)(e)&&!j,shouldSpecialOia:Object(he.i)(e)&&!j,isSpecialQuestionOrAnswer:Object(he.j)(e,{type:x&&g,id:x?"answer"===g?v.id:v.question.id:""}),shouldAllAutoExpand:"1"===Object(he.a)(e,"web_mweb_launch"),isMobile:Object(he.d)(e),isWechat:e.env.userAgent.Wechat,isHuaweiBrowser:/huaweibrowser/gi.test(e.env.userAgent.origin)||/huawei/gi.test(e.env.userAgent.origin)&&!e.env.userAgent.UC&&!e.env.userAgent.Wechat&&!e.env.userAgent.MQQBrowser&&!/quark/gi.test(e.env.userAgent.origin)&&!/baidu/gi.test(e.env.userAgent.origin),isHonor:/honor/gi.test(e.env.userAgent.origin)&&/MQQBrowser/gi.test(e.env.userAgent.origin),concernedUpvoters:Object(oe.g)(e,{id:v.id}),currentUser:k,shareVideoDetail:p,isBrandAnswer:Object(oe.l)(v),permission:Object(ae.Z)(e),ecommerce:Object(te.c)(e,{type:"answer",urlToken:String(v.id)}),isBaidu:Object(he.h)(e)&&b.baidu,showCommentForOia:Object(he.h)(e),blockReading:A,paidContent:u,isMuteSpecial:Object(ae.C)(C.question),isMuteFreeze:Object(ae.B)(C.question),isAuthor:null!==(n=null===(r=v.relationship)||void 0===r?void 0:r.isAuthor)&&void 0!==n?n:Object(me.i)(e,v.author),shouldUseArticleCard:"1"===Object(he.a)(e,"gue_visit_n_artcard"),useNewEditorSetting:"1"===Object(he.a)(e,"editor"),abTestShowMobileSignInModal:"1"===Object(he.a)(e,"h5_signin"),isQuestionPage:w}}),{updateAnswerReshipmentSettings:oe.G,updateAnswerCommentPermission:oe.F,updateAnswerCollapsed:oe.E,updateAnswerStick:oe.I,deleteAnswer:oe.i,restoreAnswer:oe.A,updateAnswer:oe.D,loadAnswerForSettings:oe.t,showNotification:fe.h,addAnnotation:function(e,t,n,r){return{API:{types:ue.ADD_ANNOTATION,endpoint:"v3/collaboration/annotation",method:"POST",body:Object(se.getFormData)(Object(ce.decamelizeKeys)({objectType:e,urlToken:t,reason:n,detail:r}))},UPDATE:{success:function(n){var r=de(e);return r?Object(ie.a)({},r,Object(ie.a)({},t,n)):null}}}},cancelAnnotation:function(e,t,n,r){return{API:{types:ue.CANCEL_ANNOTATION,endpoint:"v3/collaboration/annotation_cancel",method:"POST",body:Object(se.getFormData)(Object(ce.decamelizeKeys)({objectType:e,urlToken:t,reason:n,detail:r}))},UPDATE:{success:function(n){var r=de(e);return r?Object(ie.a)({},r,Object(ie.a)({},t,Object.assign({},n,{annotationDetail:null}))):null}}}},addRewardTagline:pe.a,updateAnswerReward:oe.H,getVoteDownReason:oe.k,selectVoteDownReason:oe.C,loadAnswerConcernedVoters:oe.q,fillCurrentUserIfNeeded:me.e,loadVideoDetails:be.d,readContentRightsNotification:ve.Mb,postToolsRecommend:ve.Lb,showMobileSignInModal:ae.fb}),Rd.c)(Mf)},function(e,t,n){"use strict";var r=n(43),o=n(2),a=n(1),i=n.n(a),c=n(27),s=n(11),l=n.n(s),u=n(1543),d=n(30),f=n(232),p=n(78),h=n(366),b=n(1431),m=n(783),v=n(1464),g=n(18),y=function(e){return i.a.createElement(g.a,e,i.a.createElement("path",{d:"M18.175 15.761c0 .104-.101.207-.203.207H9.265v-2.065L4 17.103 9.265 20.2v-2.065h8.707c1.215 0 2.228-1.032 2.228-2.27V10.6h-2.025v5.161zm-12.15-7.37c0-.204.101-.306.202-.306h8.708v2.043L20.2 7.064 14.935 4v2.043H6.228C5.013 6.043 4 7.063 4 8.39V13.6h2.025V8.391z"}))};y.defaultProps={name:"Sync"};var O=y,j=n(1351),w=n(1064),C=n(31),k=n(135),x=n(178),S=n(877),E=n(872),R=n(175),T=n(878),A=n(1015),N=n(1104),_=n(396),I=n(376),M=n(25),L=n(952),P=n(395),B=n(73);function z(e){var t=e.campaign,n=e.selected,r=e.onSelect,a=t.title,i=t.description;return Object(o.c)("div",{className:"VideoContributableCampaignModalCampaign",children:[Object(o.c)("div",{className:"VideoContributableCampaignModalCampaign-info",onClick:r,children:[Object(o.b)("div",{className:"VideoContributableCampaignModalCampaign-title",children:a}),Object(o.b)("div",{className:"VideoContributableCampaignModalCampaign-description",children:i})]}),Object(o.b)(S.a,{checked:n,onChange:r,size:16})]})}var D=function(e){var t=e.shown,n=e.onClose,i=e.defaultCampaignId,c=e.campaignList,s=e.onSubmit,l=Object(a.useState)((function(){return i?c.find((function(e){return e.id===i})):null})),u=Object(r.a)(l,2),d=u[0],f=u[1];return Object(o.b)(B.b,{title:"选择活动",size:"large",onClose:n,children:t&&Object(o.c)(o.a,{children:[Object(o.b)("div",{className:"VideoContributableCampaignModal-list",children:c.map((function(e){return Object(o.b)(z,{campaign:e,selected:(null==d?void 0:d.id)===e.id,onSelect:function(){f((null==d?void 0:d.id)===e.id?null:e)}},e.id)}))}),Object(o.c)(B.a,{direction:"horizontal",children:[Object(o.b)(C.c,{onClick:n,children:"返回"}),Object(o.b)(C.c,{preset:"primary",color:"blue",onClick:function(){s(d)},children:"确定"})]})]})})},F=n(90),U=n(368),V=n(799),q=n(1096),H=n(180);function K(e){var t=e.club,n=t.id,r=t.name,a=t.description,i=t.avatar,c=t.isJoined,s=t.joinType,l=t.postCount,u=t.allowSync,d=e.selected,f=e.onSelect,p=e.handleJoinButtonClick;return Object(o.c)("div",{className:"VideoSyncToClubModalItem",children:[Object(o.c)(F.Flex,{css:{width:"calc(100% - ".concat(c?20:92,"px)")},children:[Object(o.b)("img",{src:i,className:"VideoSyncToClubModalItem-avatar"}),Object(o.c)("div",{className:"VideoSyncToClubModalItem-info",onClick:f,children:[Object(o.b)("div",{className:"VideoSyncToClubModalItem-title Highlight",dangerouslySetInnerHTML:{__html:r}}),Object(o.b)("div",{className:"VideoSyncToClubModalItem-description Highlight",dangerouslySetInnerHTML:{__html:a}}),Object(o.c)("div",{className:"VideoSyncToClubModalItem-data",children:[l,"条内容"]})]})]}),c?Object(o.b)(S.a,{checked:d,onChange:f,size:16,disabled:!u}):Object(o.b)(C.c,{preset:"secondary",color:"blue",onClick:function(){return p(n,s)},children:"all"===s?"加入圈子":"申请加入"})]})}var Q=function(e){var t=e.shown,n=e.onClose,i=e.selectedClub,s=e.onSelectClub,l=Object(a.useState)(i),u=Object(r.a)(l,2),d=u[0],f=u[1],p=Object(a.useState)(""),h=Object(r.a)(p,2),b=h[0],v=h[1],g=Object(a.useState)(""),y=Object(r.a)(g,2),O=y[0],j=y[1],w=Object(c.useSelector)((function(e){return e.club.explore.candidateSyncClubs})),x=Object(c.useSelector)((function(e){var t;return(null===(t=e.search)||void 0===t?void 0:t.clubentityByQuery[O])||{isFetching:!1,isDrained:!1,ids:[]}})),S=x.isFetching,E=x.isDrained,T=x.ids,A=Object(c.useSelector)((function(e){return e.entities})),N=A.searchClub,_={data:T.filter((function(e){return Boolean(e)})).map((function(e){var t=N[e]||{},n=t.object;return Object.assign({},t,{object:(A.clubs||{})[n]})})),isLoading:S,paging:{isEnd:E}},I=Object(c.useDispatch)();Object(a.useEffect)((function(){i||f(null)}),[i]);var M=Object(a.useRef)(null),L=Object(a.useCallback)((function(){return M.current.parentElement}),[M]),z=function(){(null==M?void 0:M.current)&&(M.current.parentElement.scrollTop=0)},D=Object(a.useCallback)((function(e){var t=e.target.value;v(t),O&&!t&&(j(""),z())}),[O]),Q=Object(c.useSelector)((function(e){var t;return null===(t=e.search)||void 0===t?void 0:t.nextOffset.clubentityByQuery})),W=Object(a.useCallback)((function(e){I(Object(H.t)(Object.assign({type:"clubentity",query:e},O===e?Q:{limit:10,offset:0})))}),[Q,O,I]),G=Object(a.useCallback)((function(e){z(),O!==e&&(W(e),j(e))}),[O,W]),Y=Object(a.useCallback)((function(e){13===e.keyCode&&b.trim()&&(document.activeElement.blur(),G(b.trim()))}),[b,G]),Z=Object(a.useCallback)((function(){O?W(b):I(Object(P.b)())}),[I,b,O,W]),X=O?_:w,J=X.data,$=void 0===J?[]:J,ee=X.paging,te=(ee=void 0===ee?{}:ee).isEnd,ne=X.isLoading,re=function(e,t){"all"===t?I(Object(q.b)(e)).then((function(){I(Object(P.b)(!0))})):window.open("https://www.zhihu.com/club/".concat(e),"_blank")},oe=Object(o.c)("div",{className:"VideoSyncToClubModal-Empty",children:[Object(o.b)("img",{className:"VideoSyncToClubModal-Empty--Image",src:"https://pic4.zhimg.com/80/v2-111b363c733ca84c2fd2044eca77503b_hd.png"}),Object(o.b)("div",{className:"VideoSyncToClubModal-Empty--Text",children:"暂时没有找到「".concat(O,"」的相关圈子")})]}),ae=Object(o.b)(U.b,{getContainer:L,onLoad:Z,isLoading:Boolean(ne),placeholder:Object(o.b)(U.a,{className:"List-item"}),isDrained:Boolean(te),className:"VideoSyncToClubModal-list",children:Object(o.c)(F.Box,{height:"100%",ref:M,children:[$.map((function(e){var t=O?Object.assign({},e.object,{id:e.object.id,avatar:e.object.avatarUrl,postCount:e.object.clubPostCount}):e;return Object(o.b)(K,{club:t,selected:(null==d?void 0:d.id)===t.id,onSelect:function(){t.isJoined&&(t.allowSync?f((null==d?void 0:d.id)===t.id?null:t):R.a.alert("无法同步到取消关联主站的圈子。"))},handleJoinButtonClick:re},t.id)})),te&&Object(o.b)("div",{className:"VideoSyncToClubModal-list--notMore",children:"没有更多内容"})]})});return Object(o.b)(B.b,{title:"选择圈子",size:"large",onClose:n,maskClosable:!1,children:t&&Object(o.c)(o.a,{children:[Object(o.b)(k.a,{className:"VideoSyncToClubModal-search",value:b,placeholder:"搜索圈子",before:Object(o.b)(V.a,{size:16,className:"VideoSyncToClubModal-search--icon"}),after:Boolean(b)&&Object(o.b)(m.a,{size:12,onClick:function(){v(""),j(""),z()},className:"VideoSyncToClubModal-search--icon"}),onChange:D,onKeyUp:Y}),O&&O===_.preSearchText&&0===$.length?oe:ae,Object(o.c)(B.a,{direction:"horizontal",children:[Object(o.b)(C.c,{onClick:n,children:"返回"}),Object(o.b)(C.c,{preset:"primary",color:"blue",onClick:function(){s(d)},disabled:!d,children:"确定"})]})]})})},W=n(245),G=n(382),Y=n(1303),Z=n(1060),X=function(e){var t=e.defaultVideo,i=e.title,s=e.description,l=t.id,u=Object(c.useDispatch)(),d=Object(a.useRef)(),h=Object(a.useState)(0),b=Object(r.a)(h,2),m=b[0],v=b[1],g=Object(Z.a)("zvideo_contribution_form:should_hide_tooltip"),y=Object(r.a)(g,2),O=y[0],j=y[1],w=Object(a.useState)(!1),C=Object(r.a)(w,2),k=C[0],x=C[1],S=Object(a.useState)(!1),E=Object(r.a)(S,2),R=E[0],T=E[1],A=Object(G.m)(l).answer,N=(A=void 0===A?{}:A).canContribute,_=void 0!==N&&N,I=Object(G.n)(l),L=Object(p.d)((function(){return n.e(19).then(n.bind(null,2650))})),P=Object(a.useCallback)((function(){i?m<6e4?u(Object(M.h)("大于 1 分钟的视频才可以投稿哦")):(u(Object(G.k)(null)),x(!0),T(!1)):u(Object(M.h)("输入标题后才可以投稿哦"))}),[i,u,m]),B=Object(a.useCallback)((function(){x(!0),T(!0)}),[]);return Object(a.useEffect)((function(){u(Object(G.g)(l,"edit"))}),[u,l]),Object(a.useEffect)((function(){var e,n;t.file?(n=t.file,new Promise((function(e,t){try{var r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=function(){URL.revokeObjectURL(r.src),e(Math.floor(1e3*r.duration))},r.onerror=t,r.src=URL.createObjectURL(n)}catch(e){t(e)}}))).then((function(e){u(Object(G.f)({zvideoId:l,duration:e})),v(e)})):((null===(e=t.video)||void 0===e?void 0:e.duration)&&v(parseInt(1e3*t.video.duration)),u(Object(G.f)({zvideoId:l})))}),[t,u,l]),Object(p.i)((function(){return j(!0)}),!O&&_?5e3:null),_||I.length?Object(o.c)(f.b,{block:"Contribution",children:[Object(o.b)(f.e,{ref:d,zaType:"Block",className:"VideoUploadForm-itemTitle",css:function(e){return{"::after":{content:'"投稿到问题可以获得更多曝光哦~"',color:e.colors.GBK06A,fontWeight:"normal"}}},children:"投稿问题(选填)"}),Object(o.b)(W.a,{placement:"top-left",isOpen:!O,target:d.current,css:{".Popover-arrow":{transform:"translate(-115px, 0)"}},children:"投稿到问题,让更多人看到你的视频"}),Object(o.b)(Y.a,{zvideoId:l,showCreateButton:!0,onAdd:P,onSelect:B}),Boolean(L)&&Object(o.b)(L,{show:k,defaultVideo:t,title:i,description:s,duration:m,closeAfterEdit:R,onClose:function(){return x(!1)}})]}):null},J=n(1105),$=n(953);t.a=function(e){var t,n,i,s,g,y,B,z,F,U,V,q,H,K,W,G=e.className,Y=e.defaultVideo,Z=e.defaultCampaignId,ee=e.checkFormValid,te=e.shouldShowSyncToListCheckbox,ne=e.onRemove,re=e.onSubmit,oe=e.isEditing,ae=e.shouldShowScheduledPublish,ie=u.a(new Date,30),ce=Object(a.useState)(!1),se=Object(r.a)(ce,2),le=se[0],ue=se[1],de=Object(a.useState)(ie),fe=Object(r.a)(de,2),pe=fe[0],he=fe[1],be=Object(N.b)((function(e){return e.zvideos.tagoreCategory})),me=Object(N.a)([I.d,I.t,I.k,I.l,I.j,I.h,M.h,I.n]),ve=Object(r.a)(me,8),ge=ve[0],ye=ve[1],Oe=ve[2],je=ve[3],we=ve[4],Ce=ve[5],ke=ve[6],xe=ve[7],Se=Object(a.useState)((null==Y?void 0:Y.title)||""),Ee=Object(r.a)(Se,2),Re=Ee[0],Te=Ee[1],Ae=Object(a.useState)(null!==(t=null==Y?void 0:Y.description)&&void 0!==t?t:""),Ne=Object(r.a)(Ae,2),_e=Ne[0],Ie=Ne[1],Me=Object(a.useState)(null!==(n=null==Y||null===(i=Y.category)||void 0===i||null===(s=i.firstLevel)||void 0===s?void 0:s.id)&&void 0!==n&&n),Le=Object(r.a)(Me,2),Pe=Le[0],Be=Le[1],ze=be.find((function(e){return e.data.id===Pe})),De=Object(a.useState)(null!==(g=null==Y||null===(y=Y.category)||void 0===y||null===(B=y.secondLevel)||void 0===B?void 0:B.id)&&void 0!==g&&g),Fe=Object(r.a)(De,2),Ue=Fe[0],Ve=Fe[1];Object(a.useEffect)((function(){be.length||Oe()}),[be,Oe]);var qe=Object(a.useState)(Boolean(null==Y||null===(z=Y.category)||void 0===z||null===(F=z.firstLevel)||void 0===F?void 0:F.id)||Boolean(null==Y||null===(U=Y.category)||void 0===U||null===(V=U.secondLevel)||void 0===V?void 0:V.id)),He=Object(r.a)(qe,2),Ke=He[0],Qe=He[1],We=Object(p.b)((function(e){je(e).then((function(e){var t=e.payload.data[0];t&&(Be(t.firstLevel.id),Ve(t.secondLevel.id))}))}),300);Object(a.useEffect)((function(){Ke||We({title:Re,type:"zvideo",content:_e})}),[Re,_e,Ke,We]);var Ge=Object(a.useState)(null!==(q=null==Y?void 0:Y.topics)&&void 0!==q?q:[]),Ye=Object(r.a)(Ge,2),Ze=Ye[0],Xe=Ye[1],Je=Object(a.useState)(Boolean(null==Y||null===(H=Y.topics)||void 0===H?void 0:H.length)),$e=Object(r.a)(Je,2),et=$e[0],tt=$e[1],nt=Object(a.useState)(!1),rt=Object(r.a)(nt,2),ot=rt[0],at=rt[1],it=Object(p.b)((function(e){we(e).then((function(e){var t=e.payload.data;t.length&&Xe(t)}))}),300);Object(a.useEffect)((function(){!et&&Pe&&Ue&&it({type:"zvideo",text:Re,firstLevelCategoryId:Pe,secondLevelCategoryId:Ue,limit:$.f})}),[Re,Pe,Ue,et,it]);var ct=Object(a.useState)(null==Y?void 0:Y.imageUrl),st=Object(r.a)(ct,2),lt=st[0],ut=st[1],dt=Object(a.useCallback)((function(e){return ut(e)}),[ut]);Object(a.useEffect)((function(){(!lt&&(null==Y?void 0:Y.imageUrl)||lt===$.a&&(null==Y?void 0:Y.imageUrl)&&Y.imageUrl!==$.a)&&ut(Y.imageUrl)}),[lt,Y]);var ft=Object(a.useState)(null==Y?void 0:Y.zvideoType),pt=Object(r.a)(ft,2),ht=pt[0],bt=pt[1],mt="published"===(null==Y?void 0:Y.zvideoState),vt=Object(a.useState)(null==Y?void 0:Y.campaign),gt=Object(r.a)(vt,2),yt=gt[0],Ot=gt[1],jt=Object(a.useState)(!1),wt=Object(r.a)(jt,2),Ct=wt[0],kt=wt[1],xt=Object(a.useState)(!1),St=Object(r.a)(xt,2),Et=St[0],Rt=St[1],Tt=Object(a.useState)(te),At=Object(r.a)(Tt,2),Nt=At[0],_t=At[1],It=Object(a.useState)([]),Mt=Object(r.a)(It,2),Lt=Mt[0],Pt=Mt[1],Bt=Boolean(null==Lt?void 0:Lt.length)&&!yt,zt="published"===(null==Y?void 0:Y.zvideoState);Object(a.useEffect)((function(){Ce().then((function(e){var t=e.payload;Pt(t.data)}))}),[Ce]),Object(a.useEffect)((function(){var e=null==Lt?void 0:Lt.find((function(e){return e.id===Z}));!e||Ct||yt||Ot(e)}),[Z,Lt,Ct,yt]);var Dt=Object(a.useState)("草稿已保存"),Ft=Object(r.a)(Dt,2),Ut=Ft[0],Vt=Ft[1],qt=Object(p.b)((function(e,t){ye(e,t).then((function(){Vt("草稿已保存")}))}),300);Object(a.useEffect)((function(){Y.id&&(Vt("草稿保存中…"),qt(Y.id,{title:Re,description:_e,category:{firstLevel:Pe||void 0,secondLevel:Ue||void 0},zvideoType:ht,topicIds:Ze.map((function(e){return e.id||e.urlToken})),campaignId:null==yt?void 0:yt.id,imageUrl:lt,isVisible:Nt}))}),[Y.id,Re,_e,Pe,Ue,ht,Ze,yt,lt,Nt,qt]);var Ht=Object(p.b)((function(e){return ge(e).then((function(e){var t,n,r,o,a,i,c,s,l=e.payload;l&&(!Re&&Te(l.title),!lt&&l.imageUrl&&ut(l.imageUrl),!_e&&Ie(null!==(t=l.description)&&void 0!==t?t:""),!Pe&&Be(null!==(n=null===(r=l.category)||void 0===r||null===(o=r.firstLevel)||void 0===o?void 0:o.id)&&void 0!==n&&n),!Ue&&Ve(null!==(a=null===(i=l.category)||void 0===i||null===(c=i.secondLevel)||void 0===c?void 0:c.id)&&void 0!==a&&a),!(null==Ze?void 0:Ze.length)&&Xe(null!==(s=l.topics)&&void 0!==s?s:[]),!ht&&bt(l.zvideoType),!yt&&Ot(l.campaign))}))}),300);Object(a.useEffect)((function(){Y.id&&Ht(Y.id)}),[Y,Ht]);var Kt=Object(c.useDispatch)(),Qt=Object(c.useSelector)((function(e){return e.club.explore.joinedClubs})),Wt=!te&&(null==Qt||null===(K=Qt.data)||void 0===K?void 0:K.length)>0,Gt=Object(a.useState)(!1),Yt=Object(r.a)(Gt,2),Zt=Yt[0],Xt=Yt[1],Jt=Object(a.useState)(!1),$t=Object(r.a)(Jt,2),en=$t[0],tn=$t[1],nn=Object(a.useState)(null),rn=Object(r.a)(nn,2),on=rn[0],an=rn[1];Object(a.useEffect)((function(){Qt||te||Kt(Object(P.c)())}),[Kt,Qt,te]),Object(a.useEffect)((function(){oe&&Y.id&&xe(Y.id).then((function(e){(null==e?void 0:e.payload)&&(an(e.payload),Xt(!0))}))}),[oe,Y,xe]);var cn=function(){return te?"添加":le?"定时发布":"发布视频"},sn=Boolean(Y.id);return Object(o.b)(f.b,{block:"VideoUpLoadForm",content:{type:"Zvideo",id:Y.id},children:Object(o.c)(f.e,{zaType:"Block",className:l()("VideoUploadForm",G),children:[Object(o.c)("div",{className:"VideoUploadForm-item",children:[Object(o.b)("div",{className:"VideoUploadForm-itemTitle VideoUploadForm-itemTitle--first",children:"标题"}),Object(o.b)(k.a,{className:"VideoUploadForm-input",value:Re,onChange:function(e){Te(e.target.value)},placeholder:"输入视频标题",large:!0}),Re.length<$.e&&Object(o.c)("div",{className:"VideoUploadForm-itemError",children:["还需要输入 ",$.e-Re.length," 个字"]}),Re.length>$.d&&Object(o.c)("div",{className:"VideoUploadForm-itemError",children:["已超出 ",Re.length-$.d," 个字"]})]}),Object(o.c)("div",{className:"VideoUploadForm-item",children:[Object(o.b)("div",{className:"VideoUploadForm-itemTitle",children:"简介(选填)"}),Object(o.b)(k.a,{className:"VideoUploadForm-input VideoUploadForm-input--multiline",value:_e,onChange:function(e){Ie(e.target.value)},placeholder:"填写视频简介,让更多人找到你的视频",multiline:!0,large:!0}),_e.length>$.b&&Object(o.c)("div",{className:"VideoUploadForm-itemError",children:["已超出 ",_e.length-$.b," 个字"]})]}),sn&&Object(o.b)(X,{defaultVideo:Y,title:Re,description:_e}),Object(o.b)("div",{className:"VideoUploadForm-itemTitle",children:"所属领域"}),Object(o.c)("div",{className:"VideoUploadForm-selectContainer",children:[Object(o.c)(x.b,{className:"VideoUploadForm-select",listClassName:"VideoUploadForm-selectList",value:Pe,onChange:function(e){Be(e),Ve(!1),Qe(!0)},children:[!ze&&Object(o.b)(x.a,{value:!1,text:"选择领域"},"all"),be.map((function(e){var t=e.data;return Object(o.b)(x.a,{value:t.id,text:t.name},t.id)}))]}),ze&&Object(o.c)(x.b,{className:"VideoUploadForm-select",listClassName:"VideoUploadForm-selectList",value:Ue,onChange:function(e){Ve(e),Qe(!0)},children:[Object(o.b)(x.a,{value:!1,text:"选择领域"},"all"),ze.children.map((function(e){var t=e.data;return Object(o.b)(x.a,{value:t.id,text:t.name},t.id)}))]})]}),Object(o.b)("div",{className:"VideoUploadForm-itemTitle",children:"绑定话题"}),Object(o.b)(_.a,{className:"VideoUploadForm-topicInput",value:Ze,onChange:function(e){Xe(e),tt(!0)},max:$.f,actived:ot,onToggleActived:function(){return at(!ot)}}),Object(o.c)("div",{className:"VideoUploadForm-typeContainer",children:[Object(o.b)("div",{className:l()("VideoUploadForm-radioContainer",{"VideoUploadForm-radioContainer--disabled":mt}),children:$.g.map((function(e){return Object(o.c)("label",{className:"VideoUploadForm-radioLabel",children:[Object(o.b)(S.a,{className:"VideoUploadForm-radio",size:16,checked:e.value===ht,onChange:function(){bt(e.value)},disabled:mt}),e.label]},e.value)}))}),"reprint"===ht&&Object(o.b)("div",{className:"VideoUploadForm-typeHint",children:"请确保转载视频符合版权使用规范,如被举报侵权,视频将会被删除"})]}),ae&&Object(o.c)("div",{className:"VideoUploadForm-scheduledPublish",children:[Object(o.b)("span",{className:"VideoUploadForm-scheduledPublish--text",children:"定时发布"}),Object(o.b)(T.a,{className:"VideoUploadForm-scheduledPublish--switch",checked:le,onChange:function(e){return ue(e.target.checked)}}),le&&Object(o.c)(o.a,{children:[Object(o.b)(A.a,{className:"VideoUploadForm-scheduledPublish--timePicker",value:pe,min:ie,onChange:function(e){he(Date.parse(e))}}),Object(o.b)(b.a,{className:"VideoUploadForm-scheduledPublish--tooltip",size:18,"data-tooltip":"时间需至少设置在30分钟以后","data-tooltip-position":"top"})]})]}),yt&&Object(o.c)(o.a,{children:[Object(o.b)("div",{className:"VideoUploadForm-itemTitle",children:"视频活动"}),Object(o.b)(C.c,{preset:"plain",color:"blue",className:"VideoUploadForm-campaignTitle",onClick:function(){Rt(!0),kt(!0)},disabled:zt,children:yt.title})]}),on&&!le&&Object(o.c)(o.a,{children:[Object(o.b)("div",{className:"VideoUploadForm-itemTitle",children:"同步到圈子"}),Object(o.b)(h.a,{view:{id:8603},card:{content:{id:on.id,type:"Zvideo"}},trackCardShow:!0,children:Object(o.c)("div",{className:l()("VideoUploadForm-syncClubTitle",{"VideoUploadForm-syncClubTitle--disabled":Zt}),children:[!Zt&&Object(o.b)(m.a,{text:!0,center:!0,size:6,css:{marginRight:4},onClick:function(){an(null)}}),Object(o.b)("span",{dangerouslySetInnerHTML:{__html:on.name},onClick:function(){Zt?R.a.alert("暂不支持修改已同步的圈子"):tn(!0)}})]})})]}),(Bt||Wt)&&Object(o.c)("div",{className:"VideoUploadForm-featureList",children:[Bt&&!zt&&Object(o.c)("div",{className:"VideoUploadForm-feature",onClick:function(){Rt(!0),kt(!0)},children:[Object(o.b)(v.a,{className:"VideoUploadForm-featureIcon",size:20}),Object(o.b)("div",{className:"VideoUploadForm-featureName",children:"绑定活动"})]}),Wt&&!on&&!le&&Object(o.b)(h.a,{view:{id:8602},card:{content:{type:"Zvideo"}},trackCardShow:!0,children:Object(o.c)("div",{className:"VideoUploadForm-feature",onClick:function(){tn(!0)},children:[Object(o.b)(O,{className:"VideoUploadForm-featureIcon",size:20}),Object(o.b)("div",{className:"VideoUploadForm-featureName",children:"同步到圈子"})]})})]}),Boolean(null==Lt?void 0:Lt.length)&&Object(o.b)(D,{shown:Et,onClose:function(){Rt(!1)},defaultCampaignId:null==yt?void 0:yt.id,campaignList:Lt,onSubmit:function(e){Rt(!1),Ot(e)}}),Wt&&Object(o.b)(Q,{shown:en,onClose:function(){return tn(!1)},selectedClub:on,onSelectClub:function(e){an(e),tn(!1)}}),te&&Object(o.c)("div",{className:"VideoUploadForm-syncToList",children:[Object(o.b)(E.a,{css:{marginRight:"8px"},checked:Nt,onChange:function(e){return _t(e.target.checked)}}),"同步到个人主页「视频」列表"]}),Object(o.c)("div",{className:"VideoUploadForm-imageContainer",children:[Object(o.b)("img",{className:"VideoUploadForm-image",src:lt||$.a,alt:""}),Object(o.b)("div",{className:"VideoUploadForm-duration",children:Object(L.a)(null===(W=Y.video)||void 0===W?void 0:W.duration)}),Object(o.b)(w.a,{triggerClassName:"VideoUploadForm-imageEditButton",useCoverCrop:!1,originVideo:Y.file,onVideoPosterChange:dt,zvideoId:Y.id,id:Y.videoId})]}),Y.id&&Object(o.c)("div",{className:"VideoUploadForm-draftHint",children:[ne&&Object(o.b)(C.c,{className:"VideoUploadForm-draftRemoveButton",preset:"plain",icon:j.a,onClick:ne}),Ut]}),Object(o.b)(h.a,{module:"Content",card:{content:{type:"Zvideo",token:Y.id}},children:Object(o.b)(f.a,{zaType:"Button",zaText:cn(),zaAction:"Save",as:C.c,className:"VideoUploadForm-submitButton",preset:"primary",color:"blue",onClick:function(e){var t=Object(J.a)({title:Re,description:_e,categoryFirstLevel:ze,categorySecondLevelId:Ue,topics:Ze,zvideoType:ht},ee);if(t)return ke(t,"red");d.a.trackEvent(e.target,{id:7038,action:"Upload"},{button:{text:te?"添加":"发布视频"}});var n={id:Y.id,videoId:Y.videoId,title:Re,description:_e,category:{firstLevel:Pe,secondLevel:Ue},zvideoType:ht,topicIds:Ze.map((function(e){return e.id||e.urlToken})),campaignId:null==yt?void 0:yt.id,clubId:null==on?void 0:on.id,imageUrl:lt,publishAt:pe};re(n,le)},children:cn()})})]})})}},function(e,t,n){"use strict";var r=n(2),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(1),u=n(3),d=n.n(u),f=n(31),p=n(73);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var b=function(e){Object(i.a)(n,e);var t=h(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={logoutModalShown:!1},e.handleLogoutModalShow=function(){e.setState({logoutModalShown:!0})},e.handleLogoutModalHide=function(){e.setState({logoutModalShown:!1})},e.handleClick=function(){var t=e.context.currentUser;t&&t.urlToken?e.handleLogoutModalShow():location.href="https://www.zhihu.com/org/signup"},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this.state.logoutModalShown;return Object(r.c)(l.Fragment,{children:[Object(r.b)(f.c,{className:"OrgCreateButton",onClick:this.handleClick,children:"申请开通知乎机构号"}),e&&Object(r.c)(p.b,{className:"OrgCreateButton-logoutModal",title:"开通提示",onClose:this.handleLogoutModalHide,children:[Object(r.b)("p",{children:"若想访问机构号注册页面,请您请先退出当前帐号登录状态"}),Object(r.c)(p.a,{children:[Object(r.b)(f.c,{preset:"primary",color:"blue",onClick:function(){location.href="/logout?next=/org/signup"},children:"退出登录"}),Object(r.b)(f.c,{onClick:this.handleLogoutModalHide,children:"我再想想"})]})]})]})}}]),n}(l.Component);b.contextTypes={currentUser:d.a.object};var m=b;t.a=function(e){var t=e.showHelpCenter,n=void 0!==t&&t,o=(new Date).getFullYear();return Object(r.c)("footer",{className:"Footer",children:[n&&Object(r.c)(r.a,{children:[Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"/help-center",children:"帮助中心"}),Object(r.b)("span",{className:"Footer-dot"})]}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"//liukanshan.zhihu.com/",children:"刘看山"}),Object(r.b)("span",{className:"Footer-dot"}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"/question/19581624",children:"知乎指南"}),Object(r.b)("span",{className:"Footer-dot"}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"/term/zhihu-terms",children:"知乎协议"}),Object(r.b)("span",{className:"Footer-dot"}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"/term/privacy",children:"知乎隐私保护指引"}),Object(r.b)("br",{}),Object(r.b)("a",{className:"Footer-item",target:"_blank",href:"/app",children:"应用"}),Object(r.b)("span",{className:"Footer-dot"}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"https://app.mokahr.com/apply/zhihu",children:"工作"}),Object(r.b)("span",{className:"Footer-dot"}),Object(r.b)(m,{className:"Footer-item"}),Object(r.b)("br",{}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"https://zhuanlan.zhihu.com/p/28852607",children:"侵权举报"}),Object(r.b)("span",{className:"Footer-dot"}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"http://www.12377.cn",children:"网上有害信息举报专区"}),Object(r.b)("br",{}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"https://tsm.miit.gov.cn/dxxzsp/",children:"京 ICP 证 110745 号"}),Object(r.b)("br",{}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"https://beian.miit.gov.cn/",children:"京 ICP 备 13052560 号 - 1"}),Object(r.b)("br",{}),Object(r.c)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802020088",children:[Object(r.b)("img",{src:"https://pic3.zhimg.com/80/v2-d0289dc0a46fc5b15b3363ffa78cf6c7.png"}),"京公网安备 11010802020088 号"]}),Object(r.b)("br",{}),Object(r.c)("span",{className:"Footer-item",children:["互联网药品信息服务资格证书",Object(r.b)("br",{}),"(京)- 非经营性 - 2017 - 0067"]}),Object(r.b)("span",{className:"Footer-item",children:"违法和不良信息举报010-82716601"}),Object(r.b)("br",{}),Object(r.b)("a",{className:"Footer-item",target:"_blank",href:"/term/child-jubao",children:"儿童色情信息举报专区"}),Object(r.b)("br",{}),Object(r.b)("a",{className:"Footer-item",target:"_blank",href:"/certificates",children:"证照中心"}),Object(r.b)("span",{className:"Footer-dot"}),Object(r.b)("a",{className:"Footer-item",target:"_blank",rel:"noopener noreferrer",href:"//ir.zhihu.com",children:"Investor Relations"}),Object(r.b)("br",{}),Object(r.b)("a",{className:"Footer-item",target:"_blank",href:"/contact",children:"联系我们"}),Object(r.c)("span",{children:[" © ",o," 知乎"]})]})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(11),p=n.n(f),h=n(235),b=n(430),m=n(188),v=n(205),g=n(24);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var O=function(e){Object(a.a)(n,e);var t=y(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={enabled:!1,shown:!1},e.handleScrollUp=function(){e.state.shown&&e.canToggle()&&e.setState({shown:!1})},e.handleScrollDown=function(){!e.state.shown&&e.canToggle()&&e.setState({shown:!0})},e.handlePositionStatusChange=function(t){e.canToggle()&&("normal"!==t?e.enable():e.disable())},e}return Object(o.a)(n,[{key:"canToggle",value:function(){return!(this.props.prevent||document.activeElement&&document.activeElement.closest(".SearchBar"))}},{key:"enable",value:function(){this.setState({enabled:!0,shown:!0})}},{key:"disable",value:function(){this.setState({enabled:!1,shown:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.offset,r=t.children,o=this.state,a=o.enabled,i=o.shown;return Object(s.c)(d.Fragment,{children:[Object(s.b)(v.a,{shortcuts:[{key:"/",action:function(){return e.setState({shown:!1})}}]}),Object(s.b)(h.a,{offset:n,onPositionStatusChange:this.handlePositionStatusChange,children:Object(s.b)("div",{})}),a&&Object(s.b)(b.a,{onScrollUp:this.handleScrollUp,onScrollDown:this.handleScrollDown}),Object(s.b)(m.a.Inlet,{shown:i,children:Object(s.b)("div",{className:p()("PageHeader",{"is-shown":i}),children:r})})]})}}]),n}(d.Component);O.propTypes={prevent:u.a.bool,offset:u.a.number},O.defaultProps={prevent:!1,offset:g.i};var j=O},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(923),p=n(365),h=n(368),b=n(1121),m=n(1024);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var g=function(e){Object(a.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.isFetching,n=e.isDrained,r=e.items,o=e.voteupCount,a=e.onLoad,i=e.text,c=e.isRewardList,l=e.notice,u=e.type,d=e.currentUser,v={getContainer:function(e){return e}};return Object(s.c)("div",{className:"VoterList",children:[Object(s.b)(b.a,{header:"".concat(Object(p.formatNumber)(o)," 人").concat(i||"赞同了")}),c&&l&&Object(s.b)("div",{className:"VoterList-description",children:Object(s.b)("p",{children:l})}),Object(s.b)(h.b,Object.assign({className:"VoterList-content",isLoading:t,isDrained:n,onLoad:a,placeholder:Object(s.b)(h.a,{className:"List-item",withAvatar:!0})},v,{children:r&&r.map((function(e,t){return Object(s.b)(f.a,{children:Object(s.b)(m.a,{currentUser:d,user:e,isRewardList:c,meta:null,type:u,userLinkV2:!0})},"".concat(t,".").concat(e.urlToken))}))}))]})}}]),n}(d.Component);g.propTypes={isFetching:u.a.bool.isRequired,isDrained:u.a.bool.isRequired,items:u.a.array.isRequired,voteupCount:u.a.number.isRequired,text:u.a.string.isRequired,onLoad:u.a.func.isRequired,isRewardList:u.a.bool,type:u.a.string,currentUser:u.a.object};t.a=g},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M14.782 16.78a.737.737 0 0 1-1.052 0L9.218 12.53a.758.758 0 0 1 0-1.063L13.73 7.22a.737.737 0 0 1 1.052 0c.29.294.29.77.001 1.063L11 12l3.782 3.716c.29.294.29.77 0 1.063z",fillRule:"evenodd"}))};i.defaultProps={name:"ArrowLeft"},t.a=i},,function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,a,i,c,s=1,l={},u=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){a.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(i="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&h(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),r=function(t){e.postMessage(i+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return l[s]=o,r(s),s++},f.clearImmediate=p}function p(e){delete l[e]}function h(e){if(u)setTimeout(h,0,e);else{var t=l[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(100),n(239))},function(e,t,n){"use strict";var r=n(55);Object.defineProperty(t,"__esModule",{value:!0}),t.stripHTML=t.truncateHTML=t.getBlockType=t.parseTag=t.parseTagGroup=t.parseAttrs=t.TAG_RE=t.TAG_RE_TEMPLATE=void 0;var o=["img","br"],a=/([\w|-]+)(?:="([^"]*)")?/;function i(e){var t={};if((e=e.trim()).length)for(var n,o=new RegExp(a.source,"g");n=o.exec(e);){var i=n.slice(1),c=r(i,2),s=c[0],l=c[1];t[s]=l}return t}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r(e,5),a=n[0],c=n[1],s=n[2],l=n[3],u=n[4],d="open";"/"===c?d="close":(o.includes(s)||"/"===u)&&(d="self-close");var f=t.parseAttrs?i(l):l;return{tagHTML:a,tagName:s,tagType:d,attrs:f}}function s(e){var t=e.tagName,n=e.attrs;return"string"==typeof n?t:"invisible"===n.class?"invisible":"video-box"===n.class?"video-box":["link-card","mcn-link-card","metalink"].includes(n["data-draft-type"])?"link-card":t}function l(e){switch(e){case"invalid":return{type:"invalid"};case"noscript":case"figcaption":case"video-box":case"link-card":return{type:"replace",content:" "};case"div":case"br":case"figure":case"img":case"hr":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":case"pre":case"code":case"blockquote":case"ul":case"ol":case"li":return{type:"replace-self",content:" "};case"invisible":return{type:"hide"};default:return null}}function u(e){return!!(e.h1||e.h2||e.h3||e.h4||e.h5||e.h6||e.blockquote||e.pre||e.img||e["video-box"]||e["link-card"])||(e.br||0)+(e.p||0)+(e.li||0)>1}t.TAG_RE_TEMPLATE=new RegExp(/<(\/?)(#TAG_NAME#)\s*(#TAG_ATTRS#)\s*(\/?)>/.source.replace("#TAG_ATTRS#",/[^>]*/.source)),t.TAG_RE=new RegExp(t.TAG_RE_TEMPLATE.source.replace("#TAG_NAME#",/[\w|-]+/.source)),t.parseAttrs=i,t.parseTagGroup=c,t.parseTag=function(e,n){var r=t.TAG_RE.exec(e);if(r)return c(r,n)},t.getBlockType=s,t.truncateHTML=function(e){for(var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a.endsWith,d=void 0===i?"…":i,f=a.placeholders,p=void 0===f?{}:f,h=[],b=[],m=[],v={},g={},y=new RegExp(t.TAG_RE.source,"g"),O=0,j=0,w=0,C=0,k=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h.push(e),t||(O+=e.length),j+=e.length};n=y.exec(e);){var x=c(n,{parseAttrs:!0}),S=x.tagHTML,E=x.tagType,R=x.tagName,T="close"===E&&o.includes(R)?"invalid":s("close"!==E?x:b[b.length-1]),A=p[T]?{type:"replace",content:p[T]}:l(T);"close"!==E&&(v[T]=(v[T]||0)+1);var N=e.slice(j,n.index),_=N.length;if(O+_>=r&&0===w&&0===C){for(k(N.slice(0,r-O));m.length;){var I=m.pop();h.push("</".concat(I.tagName,">"))}break}0===w&&k(N,0!==C),"invalid"!==T&&("open"===E?b.push(x):"close"===E&&b.pop(),A?("replace"===A.type&&(0===w&&"close"!==E&&h.push(A.content),"open"===E?w++:"close"===E&&w--),0===w&&"replace-self"===A.type&&h.push(A.content),0===w&&"hide"===A.type&&("open"===E?C++:"close"===E&&C--,h.push(S))):0===w&&(h.push(S),"open"===E?m.push(x):"close"===E&&m.pop())),"video-box"!==T||g.type||"string"==typeof x.attrs||(g.type="video",g.url=x.attrs["data-poster"],g.id=x.attrs["data-lens-id"]),j=y.lastIndex}if(O<r){var M=e.slice(j).slice(0,r-O);k(M)}var L=O>r||O===r&&j<e.length||u(v);return{isTruncated:L,thumbnailInfo:g,content:"".concat(h.join("").trim().replace(/\s{2,}/g," ")).concat(L?d:"")}},t.stripHTML=function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}},function(e,t,n){"use strict";var r=n(74),o=n.n(r);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){s=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=["DIV","P","BLOCKQUOTE","PRE","CODE","OL","UL","H1","H2","H3","H4","H5","H6"],s=function(e){return c.includes(e.nodeName)||e.classList&&(e.classList.contains("video-box")||e.classList.contains("link-box")||e.classList.contains("origin_image")||e.classList.contains("content_image"))};t.a=function(e){if("undefined"==typeof window)return e;if(-1!==e.indexOf("<p>"))return e;var t=document,n=t.createElement("div");n.innerHTML=e;var r,i=a(o()(n.childNodes));try{for(i.s();!(r=i.n()).done;){var c=r.value;if("BR"===c.nodeName&&c.previousSibling&&"BR"!==c.previousSibling.nodeName&&c.nextSibling&&"BR"===c.nextSibling.nodeName){for(var l=t.createElement("p"),u=c.previousSibling;u&&!s(u)&&("BR"!==u.nodeName||u.previousSibling&&"BR"!==u.previousSibling.nodeName&&!s(u.previousSibling));){var d=l.childNodes;d.length>0?l.insertBefore(u,d[0]):l.appendChild(u),u=c.previousSibling}l.childNodes.length>0&&(n.insertBefore(l,c),c.nextSibling.parentNode.removeChild(c.nextSibling),c.parentNode.removeChild(c))}}}catch(e){i.e(e)}finally{i.f()}return n.innerHTML}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),o=n.n(r),a=n(1),i=n.n(a);function c(e){return i.a.createElement("svg",o()({},e,{viewBox:"0 0 24 24"}),i.a.createElement("path",{d:"M9.218 16.78a.737.737 0 0 0 1.052 0l4.512-4.249a.758.758 0 0 0 0-1.063L10.27 7.22a.737.737 0 0 0-1.052 0 .759.759 0 0 0-.001 1.063L13 12l-3.782 3.716a.758.758 0 0 0 0 1.063z",fillRule:"evenodd"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),o=n.n(r),a=n(1),i=n.n(a);function c(e){return i.a.createElement("svg",o()({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M13.491 10.488s-.012-5.387 0-5.998c-.037-1.987-3.035-1.987-2.997 0-.038 1.912 0 5.998 0 5.998H4.499c-1.999.01-1.999 3.009 0 3.009s5.995-.01 5.995-.01v5.999c0 2.019 3.006 2.019 2.997 0-.01-2.019 0-5.998 0-5.998s3.996.009 6.004.009c2.008 0 2.008-3-.01-3.009h-5.994z",fillRule:"evenodd"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),o=n.n(r),a=n(1),i=n.n(a);function c(e){return i.a.createElement("svg",o()({viewBox:"0 0 12 12"},e),i.a.createElement("path",{fillRule:"evenodd",d:"M3 2L2 3l3 3-3 3 1 1 3-3 3 3 1-1-3-3 3-3-1-1-3 3"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n.n(r);function a(e){var t=e.style;return o.a.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 25",style:t},o.a.createElement("path",{fill:"#FA0",d:"M17.274758,15.4469628 L19.717838,23.7077251 C19.8447617,24.1107955 19.7143932,24.5558233 19.3955281,24.8079664 C19.0766631,25.0601095 18.6426594,25.0613602 18.3225416,24.8110584 L11.9871141,19.556149 L5.67675579,24.8157738 C5.35585352,25.0642585 4.92230992,25.0611015 4.60456814,24.8079664 C4.28682636,24.5548313 4.15784801,24.1098443 4.28559448,23.7074782 L6.69918173,15.4591101 L0.383646092,10.7225632 C0.0610151875,10.4737818 -0.0766431831,10.0304757 0.0422739945,9.62323054 C0.161191172,9.21598539 0.509822814,8.93679002 0.906828141,8.93086791 L8.69117778,8.93086791 L11.125674,0.681629762 C11.2430397,0.276206583 11.5378306,0 12.0000481,0 C12.4622656,0 12.7310442,0.276206583 12.8484099,0.681629762 L15.2829062,8.93086791 L23.0932681,8.93086791 C23.4904075,8.93683682 23.8390971,9.21625563 23.9578641,9.62370313 C24.0766312,10.0311506 23.9386295,10.4745268 23.6156809,10.7230801 L17.274758,15.4469628 Z"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),o=n.n(r),a=n(1),i=n.n(a);function c(e){return i.a.createElement("svg",o()({width:"16",height:"16",viewBox:"0 0 24 25"},e),i.a.createElement("path",{fill:"none",stroke:"#FA0",strokeWidth:"1.764",d:"M11.9819001,0.879433133 C11.9795516,0.880021622 11.9838641,0.88895781 11.971605,0.931278979 L9.35049088,9.81286791 L8.69117778,9.81286791 L0.919983421,9.8127698 C0.919003912,9.81278441 0.901713576,9.82663106 0.888917203,9.87045367 C0.870461414,9.93365758 0.891089579,10.0000872 0.912838593,10.0169576 L7.7173316,15.1202144 L7.54568587,15.7068089 L5.12624332,23.9743743 C5.10962557,24.0267157 5.12267547,24.0829123 5.14588507,24.110054 L11.9857433,18.4090959 L12.5501987,18.8772825 L18.8564176,24.1084404 C18.8797348,24.0814822 18.8926963,24.023831 18.8720512,23.9578624 L16.254506,15.1071827 L16.7478316,14.7396633 L23.0777374,10.0241232 C23.1088665,10.000165 23.1295357,9.93375829 23.111104,9.87052561 C23.0983169,9.82665738 23.0810031,9.81278318 23.0932681,9.81286791 L14.6235931,9.81286791 L14.4369752,9.18051713 L12.0011958,0.92688923 C11.9873473,0.879051627 11.9964848,0.872771777 12.0017908,0.875210734 Z"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n.n(r);function a(e){return o.a.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 25",style:e.style},o.a.createElement("path",{fill:"#FA0",d:"M17.274758,15.4469628 L19.717838,23.7077251 C19.8447617,24.1107955 19.7143932,24.5558233 19.3955281,24.8079664 C19.0766631,25.0601095 18.6426594,25.0613602 18.3225416,24.8110584 L11.9871141,19.556149 L5.67675579,24.8157738 C5.35585352,25.0642585 4.92230992,25.0611015 4.60456814,24.8079664 C4.28682636,24.5548313 4.15784801,24.1098443 4.28559448,23.7074782 L6.69918173,15.4591101 L0.383646092,10.7225632 C0.0610151875,10.4737818 -0.0766431831,10.0304757 0.0422739945,9.62323054 C0.161191172,9.21598539 0.509822814,8.93679002 0.906828141,8.93086791 L8.69117778,8.93086791 L11.125674,0.681629762 C11.2430397,0.276206583 11.5378306,0 12.0000481,0 C12.4622656,0 12.7310442,0.276206583 12.8484099,0.681629762 L15.2829062,8.93086791 L23.0932681,8.93086791 C23.4904075,8.93683682 23.8390971,9.21625563 23.9578641,9.62370313 C24.0766312,10.0311506 23.9386295,10.4745268 23.6156809,10.7230801 L17.274758,15.4469628 Z"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),o=n.n(r),a=n(1),i=n.n(a);function c(e){return i.a.createElement("svg",o()({xmlns:"http://www.w3.org/2000/svg",width:"27",height:"24",viewBox:"0 0 27 24"},e),i.a.createElement("path",{fill:"#0084FF",d:"M25.0589726,39.0133333 C25.4056402,39.0133333 25.7340622,39.0755556 26.0442385,39.2 C26.3544148,39.3244444 26.6280998,39.4977778 26.8652934,39.72 C27.1024871,39.9422222 27.2849437,40.2044444 27.4126634,40.5066667 C27.540383,40.8088889 27.6042428,41.1288889 27.6042428,41.4666667 C27.6042428,41.8044444 27.540383,42.1244444 27.4126634,42.4266667 C27.2849437,42.7288889 27.1024871,42.9911111 26.8652934,43.2133333 C26.6280998,43.4355556 26.3544148,43.6133333 26.0442385,43.7466667 C25.7340622,43.88 25.4056402,43.9466667 25.0589726,43.9466667 C24.6940593,43.9466667 24.3610759,43.88 24.0600224,43.7466667 C23.758969,43.6133333 23.4898454,43.4355556 23.2526518,43.2133333 C23.0154581,42.9911111 22.8330015,42.7288889 22.7052818,42.4266667 C22.5775622,42.1244444 22.5137023,41.8044444 22.5137023,41.4666667 C22.5137023,41.1288889 22.5775622,40.8088889 22.7052818,40.5066667 C22.8330015,40.2044444 23.0154581,39.9422222 23.2526518,39.72 C23.4898454,39.4977778 23.758969,39.3244444 24.0600224,39.2 C24.3610759,39.0755556 24.6940593,39.0133333 25.0589726,39.0133333 Z M36.4442675,39.0666667 C36.7909351,39.0666667 37.1239185,39.1288889 37.4432176,39.2533333 C37.7625167,39.3777778 38.0362017,39.5511111 38.2642725,39.7733333 C38.4923433,39.9955556 38.6748,40.2577778 38.8116425,40.56 C38.948485,40.8622222 39.0169062,41.1822222 39.0169062,41.52 C39.0169062,41.8577778 38.948485,42.1777778 38.8116425,42.48 C38.6748,42.7822222 38.4923433,43.0444444 38.2642725,43.2666667 C38.0362017,43.4888889 37.7625167,43.6666667 37.4432176,43.8 C37.1239185,43.9333333 36.7909351,44 36.4442675,44 C36.0975998,44 35.7691779,43.9333333 35.4590016,43.8 C35.1488253,43.6666667 34.8797017,43.4888889 34.6516309,43.2666667 C34.4235601,43.0444444 34.2411034,42.7822222 34.1042609,42.48 C33.9674185,42.1777778 33.8989972,41.8577778 33.8989972,41.52 C33.8989972,41.1822222 33.9674185,40.8622222 34.1042609,40.56 C34.2411034,40.2577778 34.4235601,39.9955556 34.6516309,39.7733333 C34.8797017,39.5511111 35.1488253,39.3777778 35.4590016,39.2533333 C35.7691779,39.1288889 36.0975998,39.0666667 36.4442675,39.0666667 Z M41.042175,23.92 C41.5530536,23.92 41.9498968,23.9866667 42.2327046,24.12 C42.5155124,24.2533333 42.7162147,24.4177778 42.8348116,24.6133333 C42.9534084,24.8088889 43.0081454,25.0177778 42.9990226,25.24 C42.9898997,25.4622222 42.9579698,25.6533333 42.9032328,25.8133333 C42.8484958,25.9733333 42.7344604,26.3022222 42.5611266,26.8 C42.3877928,27.2977778 42.1916519,27.8444444 41.9727039,28.44 C41.7537559,29.0355556 41.5393694,29.6266667 41.3295442,30.2133333 C41.1197191,30.8 40.9600695,31.2622222 40.8505955,31.6 C40.6134019,32.3111111 40.3123484,32.8044444 39.9474351,33.08 C39.5825218,33.3555556 39.135503,33.4933333 38.6063787,33.4933333 L37.6758498,33.4933333 L35.8968975,33.4933333 L33.5705752,33.4933333 L31.025305,33.4933333 L24.2379177,33.4933333 L24.6484451,35.8933333 L38.4421678,35.8933333 C39.3179597,35.8933333 39.7558556,36.2577778 39.7558556,36.9866667 C39.7558556,37.3422222 39.6691887,37.6488889 39.4958549,37.9066667 C39.3225211,38.1644444 38.9804149,38.2933333 38.4695363,38.2933333 L37.1558484,38.2933333 L34.6105781,38.2933333 L31.463201,38.2933333 L28.2610868,38.2933333 L25.633711,38.2933333 L24.1284437,38.2933333 C23.7635304,38.2933333 23.4579155,38.2133333 23.211599,38.0533333 C22.9652826,37.8933333 22.7600188,37.6844444 22.5958078,37.4266667 C22.4315969,37.1688889 22.2993158,36.8888889 22.1989646,36.5866667 C22.0986135,36.2844444 22.0210694,36 21.9663324,35.7333333 C21.9480867,35.6266667 21.8979112,35.3688889 21.8158057,34.96 C21.7337002,34.5511111 21.633349,34.04 21.5147522,33.4266667 C21.3961554,32.8133333 21.2638743,32.1288889 21.117909,31.3733333 C20.9719437,30.6177778 20.8259784,29.8577778 20.680013,29.0933333 C20.3333454,27.2977778 19.9410636,25.2977778 19.5031677,23.0933333 L17.4505304,23.0933333 C17.1768454,23.0933333 16.9487746,23.0266667 16.7663179,22.8933333 C16.5838613,22.76 16.4333345,22.6 16.3147377,22.4133333 C16.1961409,22.2266667 16.1140354,22.0266667 16.0684212,21.8133333 C16.0228071,21.6 16,21.4044444 16,21.2266667 C16,20.8711111 16.1231582,20.5777778 16.3694747,20.3466667 C16.6157912,20.1155556 16.9487746,20 17.3684249,20 L17.9705318,20 L18.5179017,20 L19.2021142,20 L20.1326431,20 C20.4975564,20 20.789487,20.0533333 21.008435,20.16 C21.227383,20.2666667 21.4007168,20.4 21.5284364,20.56 C21.6561561,20.72 21.7473844,20.8888889 21.8021214,21.0666667 C21.8568584,21.2444444 21.9024726,21.3955556 21.9389639,21.52 C21.9754552,21.6622222 22.0119466,21.8622222 22.0484379,22.12 C22.0849292,22.3777778 22.1214206,22.64 22.1579119,22.9066667 C22.2126489,23.2266667 22.2673859,23.5644444 22.3221229,23.92 L41.042175,23.92 Z",transform:"translate(-16 -20)"}))}},function(e,t,n){e.exports=n.p+"assets/sidebar-download-qrcode.7caef4dd.png"},,function(e,t,n){},function(e,t,n){var r=n(13);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return i}));var r=n(14),o=function(){return!0},a={REDIRECT_URL:"REDIRECT_URL",CHANGE_IFRAME_HEIGHT:"CHANGE_IFRAME_HEIGHT",SHOW_APPLY_RIGHTS_SUCCESS_MODAL:"SHOW_APPLY_RIGHTS_SUCCESS_MODAL"},i=function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e),this.onIframeMessage=function(e){!1!==t.beforeMessage(e)&&e.data&&e.data.type&&t.onMessage(e.data,e)},this.close=function(){window.removeEventListener("message",t.onIframeMessage)};var o=Object.assign({},e.defaultOption,n);this.beforeMessage=o.beforeMessage,this.onMessage=o.onMessage,window.addEventListener("message",this.onIframeMessage)};i.defaultOption={beforeMessage:o,onMessage:o}},function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observe=a,t.unobserve=i,t.destroy=c;var r=new Map,o=new Map;function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{threshold:0},a=arguments[3],i=n.root,c=n.rootMargin,l=n.threshold||0;if(e&&t){var u=c?l.toString()+"_"+c:""+l.toString();i&&(u=a?a+"_"+u:null);var d=u?o.get(u):null;d||(d=new IntersectionObserver(s,n),u&&o.set(u,d));var f={callback:t,visible:!1,options:n,observerId:u,observer:u?void 0:d};return r.set(e,f),d.observe(e),f}}function i(e){if(e){var t=r.get(e);if(t){var n=t.observerId,a=t.observer,i=n?o.get(n):a;i&&i.unobserve(e);var c=!1;n&&r.forEach((function(t,r){t&&t.observerId===n&&r!==e&&(c=!0)})),i&&!c&&(i.disconnect(),o.delete(n)),r.delete(e)}}}function c(){o.forEach((function(e){e.disconnect()})),o.clear(),r.clear()}function s(e){e.forEach((function(e){var t=e.isIntersecting,n=e.intersectionRatio,o=e.target,a=r.get(o);if(a&&n>=0){var i=a.options,c=!1;Array.isArray(i.threshold)?c=i.threshold.some((function(e){return a.visible?n>e:n>=e})):void 0!==i.threshold&&(c=a.visible?n>i.threshold:n>=i.threshold),void 0!==t&&(c=c&&t),a.callback&&a.callback(c)}}))}t.default={observe:a,unobserve:i,destroy:c}},function(e,t,n){e.exports=n.p+"assets/deleteComment.97d8abc0.gif"},function(e,t,n){"use strict";n.d(t,"d",(function(){return C})),n.d(t,"a",(function(){return x})),n.d(t,"e",(function(){return S})),n.d(t,"b",(function(){return R}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(233),u=n.n(l),d=n(1),f=n(71),p=n.n(f),h=n(37),b=n.n(h),m=n(49),v=n.n(m);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var y="success",O="fail",j="request",w="error";function C(){var e=b.a.get("EDITABLE_STATSC");e&&(e.forEach((function(e){v.a.increment(e)})),b.a.delete("EDITABLE_STATSC"))}var k={get pageName(){return"UnknownPage"},reportRequest:u.a,reportSuccess:u.a,reportFail:u.a,reportFailAfterTimeout:u.a,reportError:u.a,reportFailFromFunc:function(e){return e},reportAllFromFunc:function(e){return e},reportAllFromPromise:function(e){return e},reportToSentry:u.a},x=Object(d.createContext)(),S=function(e){return p()((function(t){var n=Object(d.useContext)(x)||k;return Object(s.b)(e,Object.assign({reporter:n},t))}),e)},E=function(e){Object(a.a)(n,e);var t=g(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"componentDidCatch",value:function(e,t){var n=this.props,r=n.reporter,o=n.name;throw r&&(r.reportError(o),r.reportToSentry(o,e,{extra:{errorInfo:t}})),e}},{key:"render",value:function(){return this.props.children}}]),n}(d.Component),R=S(E);t.c=function(e){var t=function(t,n){v.a.increment("".concat(e,".").concat(t,".").concat(n,".count"))},n=function(t,n){var r="".concat(e,".").concat(t,".").concat(n,".count"),o=b.a.get("EDITABLE_STATSC")||[];o.push(r),b.a.set("EDITABLE_STATSC",o)},r=function(e){return t(e,y)},o=function(e){return t(e,O)};return{get pageName(){return e},reportRequest:function(e){return t(e,j)},reportSuccess:r,reportFail:o,reportFailAfterTimeout:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4,r=function(){n(e,O)};window.addEventListener("beforeunload",r);var a=setTimeout((function(){o(e),a=null,window.removeEventListener("beforeunload",r)}),t),i=function(){a&&(clearTimeout(a),window.removeEventListener("beforeunload",r))};return i},reportError:function(e){return t(e,w)},reportFailFromFunc:function(e,t){return function(){try{return t.apply(void 0,arguments)}catch(t){throw o(e),t}}},reportAllFromFunc:function(e,t){return function(){try{var n=t.apply(void 0,arguments);return r(e),n}catch(t){throw o(e),t}}},reportAllFromPromise:function(e,t){return t.then((function(t){return r(e),t}),(function(t){throw o(e),t}))},reportToSentry:function(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};null===(r=window.Raven)||void 0===r||r.captureException(n,Object.assign({tags:{scope:"".concat(e,":").concat(t)}},o))},stash:n}}},function(e,t,n){},function(e,t){var n="function"==typeof Float32Array;function r(e,t){return 1-3*t+3*e}function o(e,t){return 3*t-6*e}function a(e){return 3*e}function i(e,t,n){return((r(t,n)*e+o(t,n))*e+a(t))*e}function c(e,t,n){return 3*r(t,n)*e*e+2*o(t,n)*e+a(t)}function s(e){return e}e.exports=function(e,t,r,o){if(!(0<=e&&e<=1&&0<=r&&r<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&r===o)return s;for(var a=n?new Float32Array(11):new Array(11),l=0;l<11;++l)a[l]=i(.1*l,e,r);function u(t){for(var n=0,o=1;10!==o&&a[o]<=t;++o)n+=.1;--o;var s=n+.1*((t-a[o])/(a[o+1]-a[o])),l=c(s,e,r);return l>=.001?function(e,t,n,r){for(var o=0;o<4;++o){var a=c(t,n,r);if(0===a)return t;t-=(i(t,n,r)-e)/a}return t}(t,s,e,r):0===l?s:function(e,t,n,r,o){var a,c,s=0;do{(a=i(c=t+(n-t)/2,r,o)-e)>0?n=c:t=c}while(Math.abs(a)>1e-7&&++s<10);return c}(t,n,n+.1,e,r)}return function(e){return 0===e?0:1===e?1:i(u(e),t,o)}}},,function(e,t,n){"use strict";var r=n(0),o=n(2),a=n(11),i=n.n(a),c=n(1564),s=n(234),l=n(793),u=n(1557),d=n(1558),f=n(797),p=n(1559),h=n(1560),b=n(1561),m=n(1562),v=n(1563),g={online_roundtable:l.a,relevant:u.a,editor_recommendation:d.a,roundtable:l.a,special:f.a,weekly:p.a,daily:h.a,professional:b.a,zhizhi_plan_recommend:m.a,zhizhi_plan_edu_recommend:m.a,zhizhi_plan_baby_recommend:m.a,zhizhi_plan_acg_recommend:m.a,zhizhi_plan_outing_recommend:m.a,zhizhi_plan_rumour_deny:v.a,zhizhi_plan:m.a},y={alpha:1,group:"GYL02A"},O={alpha:.08,group:"GYL02A"},j={brand_special:c.a},w=Object.assign({},g,{COMMERCIAL_ICONS:j}),C=function(e){return"GBL07A"===(e||y).group?"commercial":"positive"},k=function(e){return"GBL07A"===(e||O).group?"commercial":"positive"},x=function(e){return"recognition"===e?"professional":e};t.a=Object(s.a)(null)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.labelInfo,n=e.extra,a=void 0===n?{}:n,c=e.className;if(!t)return null;var s=t.type,l=t.text,u=t.foregroundColor,d=t.backgroundColor,f=a.customIcon,p=a.customIconClassName,h=C(u),b=k(d),m=f||w[x(s)];return m?Object(o.c)("span",{className:i()("Label-icon","Label-iconColor--".concat(h),Object(r.a)({},"Label-iconColor--".concat(b,"Background"),d),c),children:[Object(o.b)(m,{center:!0,className:i()("Label-iconImg",p)}),l]}):null}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(3),f=n.n(d),p=n(923),h=n(205);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var m=function(e){Object(i.a)(n,e);var t=b(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.containerClassName,n=e.selector,o=Object(r.a)(e,["containerClassName","selector"]);return Object(l.b)(h.b,{className:t,selector:n,children:Object(l.b)(p.b,Object.assign({},o))})}}]),n}(u.Component);m.propTypes={containerClassName:f.a.string,selector:f.a.string},m.defaultProps={selector:".List-item"};var v=m},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n.n(o),i=n(18),c=function(e){return a.a.createElement(i.a,e,a.a.createElement("path",{fill:"currentColor",d:"M3.495 3A1.993 1.993 0 0 0 1.5 4.99v14.02c0 1.092.893 1.99 1.995 1.99h16.01a1.993 1.993 0 0 0 1.995-1.99V4.99c0-1.092-.893-1.99-1.995-1.99zm1.007 8a.999.999 0 1 1 0-2h6.995a.999.999 0 1 1 0 2zM3.5 14c0 .556.449 1 1.002 1h4.995a.999.999 0 1 0 0-2H4.502c-.546 0-1.002.448-1.002 1zm15.285-2.429a.5.5 0 0 1 0 .858l-3.528 2.117a.5.5 0 0 1-.757-.43V9.884a.5.5 0 0 1 .757-.429z",fillRule:"evenodd",clipRule:"evenodd"}))};c.defaultProps={name:"Catalog"};var s=c,l=n(31),u=n(881),d=n(366),f=n(30);t.a=function(e){var t=e.className,n=e.onClick,a=e.html,i=e.sourceId,c=Object(o.useCallback)((function(e){f.a.trackEvent(e.target,{id:9857,action:"Click"}),n&&n(e)}),[n]),p=Object(o.useMemo)((function(){return Object(u.c)(a,i).catalog}),[a,i]);return(null==p?void 0:p.length)?Object(r.b)(d.a,{trackCardShow:!0,view:{id:9856},children:Object(r.b)(l.c,{preset:"plain",className:t,onClick:c,icon:s,label:"目录"})}):null}},function(e,t,n){"use strict";var r=n(849),o=n(2),a=n(1),i=n(11),c=n.n(i),s=n(134),l=n(176),u=n(369),d=n.n(u),f=n(881),p=n(43),h=n(35),b=n(90),m=n(835),v=n(132),g=n(366),y=n(30),O=n(851),j=function(e){var t=e.children,n=e.targetId,r=e.active,a=e.setCursor,i=Object(h.a)(e,["children","targetId","active","setCursor"]);return Object(o.b)(b.Text,Object.assign({color:r?"GBL01A":"GBK02A",fontWeight:r?"bold":"normal",css:{fontSize:"14px"}},i,{children:Object(o.b)(g.a,{module:"Content",moduleName:String(t),children:Object(o.c)(b.Flex,{css:{cursor:"pointer",alignItems:"center",height:"48px"},sx:{borderBottom:"1px solid",borderColor:"GBK09A"},onClick:function(e){y.a.trackEvent(e.target,{id:9745,action:"Click",name:"弹窗"});var t=document.querySelector("#"+n);a(n),t&&Object(O.a)(t)},children:[Object(o.b)(b.Text,{css:Object(v.d)(1),children:t}),Object(o.b)(m.a,{size:"24px",css:function(e){return{color:e.colors.GBL05A,flex:"0 0 auto",marginLeft:"auto"}}})]})})}))},w=function(e){return Object(o.b)(j,Object.assign({},e))},C={1:w,2:function(e){return Object(o.b)(j,Object.assign({pl:"20px"},e))}},k=function(e){var t=e.catalog,n=e.className,r=e.zaContent,i=Object(a.useState)(null),s=Object(p.a)(i,2),l=s[0],u=s[1];return Object(a.useEffect)((function(){if(null==t?void 0:t.length){var e=null,n=Object(O.d)();t.forEach((function(t){var r=document.querySelector("#"+t.targetId);(null==r?void 0:r.getBoundingClientRect().top)<=n+2&&(e=t.targetId)})),u(e)}}),[]),(null==t?void 0:t.length)?Object(o.b)(g.a,{trackCardShow:!0,view:{id:9744,name:"弹窗"},content:r,module:"Content",children:Object(o.b)(b.Box,{className:c()(n),children:Object(o.b)(b.Flex,{flexDirection:"column",css:{fontSize:"12px"},children:t.map((function(e){var t=e.titleLevel,n=e.text,r=e.targetId,a=C[t]||w;return Object(o.b)(a,{targetId:r,active:l===r,setCursor:u,children:n},r)}))})})}):null};function x(){var e=Object(r.a)([""," 编辑于",""]);return x=function(){return e},e}t.a=function(e){var t=e.className,n=e.shown,r=e.onClose,i=e.html,u=e.sourceId,p=e.updated,h=e.author,b=e.zaContent,m=Object(a.useMemo)((function(){return Object(f.c)(i,u).catalog}),[i,u]);return Object(o.b)(s.b,{wrapperClassName:"CatalogModal-wrapper",className:c()("CatalogModal",t),title:"目录",subtitle:d()(x(),null==h?void 0:h.name,Object(l.toSmartString)(p)),onClose:r,children:n&&Object(o.b)(k,{css:{paddingBottom:"16px"},catalog:m,zaContent:b})})}},function(e,t,n){"use strict";var r=n(43),o=n(2),a=n(71),i=n.n(a),c=n(7),s=n(156),l=n(4),u=n(122);function d(e){return e.reduce((function(e,t){var n;return[].concat(Object(l.a)(e),Object(l.a)(null!==(n=t.stickers)&&void 0!==n?n:[]))}),[])}var f=function(){return window.zh_emoticon?Promise.resolve(d(window.zh_emoticon)):Object(u.loadScript)("https://unpkg.zhimg.com/@cfe/emoticon@1.2.2/lib/emoticon.js").then((function(){return window.zh_emoticon?d(window.zh_emoticon):[]}))},p=n(1);t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alwaysShow,n=void 0!==t&&t;return function(e){return i()((function(t){var a=Object(p.useState)(!1),i=Object(r.a)(a,2),l=i[0],u=i[1];return Object(p.useEffect)((function(){Object(s.c)()?u(!0):f().then((function(e){Object(s.e)(Object(c.camelizeKeys)(e)),u(!0)})).catch((function(){u(!0)}))}),[]),(l||n)&&Object(o.b)(e,Object.assign({},t))}),e)}}},function(e,t,n){"use strict";var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(33),h=n.n(p),b=n(1),m=n(11),v=n.n(m),g=n(30),y=n(805),O=n(327),j=n(31),w=n(857),C=n(1064),k=n(393),x=n(5);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var E={upload:"视频上传失败"};function R(e){var t=e/1e3/1e3;return t=t<10?t.toPrecision(1):Math.round(t),"".concat(t,"M")}var T=function(e){s()(n,e);var t=S(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleStart=function(){e.trackEvent("Upload")},e.handleRetry=function(t){t.stopPropagation(),e.props.session.start()},e.handleAbort=function(){e.trackEvent("Cancel")},e.handleError=function(t){e.trackEvent("StatusReport",{status:{event:{action:"Upload",path:[{module:"VideoItem"}],url:location.href},result:"Fail"}}),e.props.onVideoUploadError&&e.props.onVideoUploadError(e.props.entityKey,t)},e.handleStep=function(t,n){Object(O.a)((function(){var r,o;return null===(r=(o=e.props).onVideoProcessStep)||void 0===r?void 0:r.call(o,t,n)})),"uploaded"===t&&e.trackEvent("StatusReport",{status:{event:{action:"Add"},result:"Success"}},{id:9381})},e.handleComplete=function(t){var n=e.props.session.state,r=n.uploadTime,o=n.transcodeTime;e.trackEvent("StatusReport",{status:{event:{action:"Upload",path:[{module:"VideoItem"}],url:location.href},result:"Success"},play:{upload_time:r,transcode_time:o}}),e.handleVideoUploadComplete(t)},e}return i()(n,[{key:"componentDidMount",value:function(){this.pendingEvents=[];var e=this.props.session;this.video=e.video,this.setModule(),e.addListener("start",this.handleStart),e.addListener("abort",this.handleAbort),e.addListener("error",this.handleError),e.addListener("step",this.handleStep),e.addListener("complete",this.handleComplete),e.state.error||e.start()}},{key:"componentWillReceiveProps",value:function(e){this.video!==e.session.video&&(this.video=e.session.video,this.setModule(),this.flushPendingEvents())}},{key:"componentWillUnmount",value:function(){var e=this.props.session;e.removeListener("start",this.handleStart),e.removeListener("abort",this.handleAbort),e.removeListener("error",this.handleError),e.removeListener("step",this.handleStep),e.removeListener("complete",this.handleComplete),e.abort()}},{key:"setModule",value:function(){g.a.setModule(this,{module:"VideoItem"},{card:{content:{type:"Video",video_id:this.video?this.video.id:null}}})}},{key:"trackEvent",value:function(e,t,n){this.video?g.a.trackEvent(this,Object.assign({},n,{action:e}),t):this.pendingEvents.push({action:e,extra:t,detailView:n})}},{key:"flushPendingEvents",value:function(){var e=this,t=this.pendingEvents;this.pendingEvents=[],t.forEach((function(t){var n=t.action,r=t.extra,o=t.detailView;e.trackEvent(n,r,o)}))}},{key:"handleVideoUploadComplete",value:function(e){if(this.props.onVideoUploaded){var t=this.props.data,n=t.thumbnail,r=t.title;this.props.onVideoUploaded(this.props.entityKey,Object.assign({},e,{isLens:!0,id:e.id,isPlayable:!0,title:r||"",thumbnail:n||e.thumbnail,needUploadThumbnail:e.needUploadThumbnail||Boolean(n),url:"https://www.zhihu.com/video/".concat(e.id),playerUrl:"https://www.zhihu.com/video/".concat(e.id)}))}}},{key:"renderThumbnail",value:function(){var e=this.props,t=e.session,n=e.data,r=e.handleVideoPosterChange,o=e.isPin,a=e.coverButtonText,i=e.isVideoAnswer,c=t.state,s=c.uploading,l=c.uploadingType,u=c.error,d=c.errorData,f=c.fileSize,p=c.uploadedSize,b=n.thumbnail,m=!(o||i&&u)&&Object(x.g)(C.a,h()({triggerClassName:v()("Editable-videoUploader-uploadPosterButton",{"is-videoAnswer":i}),onVideoPosterChange:r,coverButtonText:a},this.props.data));return Object(x.g)("div",{className:"Editable-videoUploader-thumbnail"},b&&Object(x.g)("img",{src:b,alt:"视频封面",className:"Editable-videoUploader-image"}),b&&Object(x.g)("div",{className:v()("Editable-videoUploader-imageMask",{"is-videoAnswer":i})}),Object(x.g)("div",{className:v()("Editable-videoUploader-text",{"is-bright":b&&i})},Object(x.g)("div",{className:v()("Editable-videoUploader-status",{"is-videoAnswer":i})},s&&"upload"===l&&"视频上传中",u&&(E[d.type]||d.payload&&d.payload.message||"未知错误"),u&&Object(x.g)("div",{className:v()("Editable-videoUploader-retry",{"is-videoAnswer":i})},Object(x.g)(j.c,{preset:"link",color:"blue",icon:y.a,label:"重试",onClick:this.handleRetry}))),s&&Object(x.g)("div",{className:v()("Editable-videoUploader-size",{"is-videoAnswer":i})},R(p)," / ",R(f))),Object(x.g)("div",{className:v()("Editable-videoUploader-progress",{"is-videoAnswer":i})},Object(x.g)("div",{className:v()("Editable-videoUploader-progress-bar",{"is-error":u}),style:{width:u?"100%":"".concat(p/f*100,"%")}})),m)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.onClick,r=e.onMouseDown,o=e.allowVideoTitleChange,a=e.handleVideoTitleChange,i=e.isVideoAnswer;return Object(x.g)("div",{className:v()("Editable-videoUploader",t,{"is-videoAnswer":i}),onClick:n,onMouseDown:r},Object(x.g)(w.b,h()({isLens:!0,id:"0",isPlayable:!0,isVideoAnswer:i,url:"https://www.zhihu.com/video/".concat("0"),playerUrl:"https://www.zhihu.com/video/".concat("0"),thumbnail:this.renderThumbnail(),showPlayButton:!1,onBeforePlay:function(){return!1}},o()&&{isVideoTitleEditable:!0,onVideoTitleChange:a})))}}]),n}(b.Component);T.defaultProps={allowVideoTitleChange:function(){return!1},isVideoAnswer:!1};t.a=Object(k.a)((function(e){return{type:"video",value:e.data.upload.file}}))(T)},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(66),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(3),f=n.n(d),p=n(30),h=n(402),b=n(841),m=n(862);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var g=function(e){Object(i.a)(n,e);var t=v(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return(e=t.call.apply(t,[this].concat(i))).state={expanded:!0},e.handleTitleClick=function(t){p.a.trackEvent(Object(a.a)(e),{id:6121,action:"OpenUrl",element_name:"Title"}),window.open(t)},e.renderHeader=function(){var t=e.props,n=t.title,r=t.url,o=t.author;return Object(l.c)("div",{className:"AbstractCard-header",children:[Object(l.c)("div",{className:"AbstractCard-desc",children:[Object(l.b)("span",{className:"AbstractCard-title",onClick:function(){return e.handleTitleClick(r,n)},children:n}),Object(l.b)("span",{className:"AbstractCard-source",children:e.abstractSourceInfo})]}),Object(l.b)(m.a,{zaId:6120,className:"AbstractCard-author",author:o,preset:"plain"})]})},e.renderContent=function(){var t=e.props,n=t.content,r=t.member.name,o=t.theme;return Object(l.c)("div",{className:"AbstractCard-content",children:[Object(l.b)("div",{className:"AbstractCard-text AbstractCard-text--".concat(o),children:n}),Object(l.b)("div",{className:"AbstractCard-tip",children:Object(l.c)("span",{className:"AbstractCard-info",children:[r," 摘录于 ",e.createdFormat]})})]})},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){Object(b.onViewedOnce)(this.node,(function(){p.a.trackCardShow(null,{id:6118})}))}},{key:"render",value:function(){var e=this;return Object(l.c)("div",{className:"AbstractCard",ref:function(t){e.node=t},children:[this.renderHeader(),this.renderContent()]})}},{key:"abstractSourceInfo",get:function(){return"answer"===this.props.type?"下的回答内容摘录":"下的内容摘录"}},{key:"createdFormat",get:function(){var e=this.props.created;return Object(h.a)(e?new Date(1e3*e):new Date,"yyyy-MM-dd")}}]),n}(u.Component);g.propTypes={title:f.a.string.isRequired,url:f.a.string.isRequired,author:f.a.object,member:f.a.object,content:f.a.string.isRequired,created:f.a.number,theme:f.a.string.isRequired};t.a=g},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("defs",null,o.a.createElement("linearGradient",{id:"id-3811055512-a",x1:"11.015%",x2:"87.655%",y1:"18.594%",y2:"96.14%"},o.a.createElement("stop",{offset:"0%",stopColor:"#F2D9B6"}),o.a.createElement("stop",{offset:"100%",stopColor:"#BF8B43"}))),o.a.createElement("path",{fill:"url(#id-3811055512-a)",d:"M21.351 4.858A3.115 3.115 0 0 1 22.93 7.56v8.88a3.115 3.115 0 0 1-1.578 2.702l-7.774 4.44a3.185 3.185 0 0 1-3.154 0l-7.774-4.44A3.115 3.115 0 0 1 1.07 16.44V7.56c0-1.115.602-2.145 1.578-2.702l7.774-4.44a3.185 3.185 0 0 1 3.154 0l7.774 4.44zm-2.475 1.904L13.16 3.507a2.347 2.347 0 0 0-2.32 0L5.124 6.762a2.283 2.283 0 0 0-1.16 1.982v6.512c0 .817.442 1.573 1.16 1.982l5.716 3.255a2.347 2.347 0 0 0 2.32 0l5.716-3.255a2.283 2.283 0 0 0 1.16-1.982V8.744c0-.817-.442-1.573-1.16-1.982zm-9.874 4.13L12 5.76l2.998 5.131 2.466-2.12v6.343c0 .49-.4.886-.893.886H7.429a.89.89 0 0 1-.893-.887V8.771l2.466 2.12z"}))};i.defaultProps={name:"VIP"},t.a=i},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(66),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(27),f=n(31),p=n(73),h=n(119),b=n(25);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var v=function(e){Object(i.a)(n,e);var t=m(n);function n(){var e;return Object(r.a)(this,n),(e=t.call(this)).handleShieldUser=e.handleShieldUser.bind(Object(a.a)(e)),e}return Object(o.a)(n,[{key:"handleShieldUser",value:function(){var e=this.props,t=e.dispatch,n=e.user.urlToken,r=e.onClose;t(Object(h.n)(n,!0)).then((function(){return t(Object(b.h)("屏蔽成功"))})),r()}},{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.shown,r=e.user;return Object(l.b)(p.b,{onClose:t,title:"确定要屏蔽".concat(r.name,""),children:n&&Object(l.c)("div",{children:["屏蔽后,对方将不能关注你、向你发私信、评论你的实名回答、使用「@」提及你、邀请你回答问题,但仍然可以查看你的公开信息。",Object(l.c)(p.a,{direction:"horizontal",children:[Object(l.b)(f.c,{onClick:t,color:"grey",children:"取消"}),Object(l.b)(f.c,{preset:"primary",color:"blue",onClick:this.handleShieldUser,children:"确定"})]})]})})}}]),n}(u.Component);t.a=Object(d.connect)()(v)},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M18.376 5.624c-3.498-3.499-9.254-3.499-12.752 0-3.499 3.498-3.499 9.254 0 12.752 3.498 3.499 9.254 3.499 12.752 0 3.499-3.498 3.499-9.14 0-12.752zm-1.693 1.693c2.37 2.37 2.596 6.094.678 8.69l-9.367-9.48c2.708-1.919 6.32-1.58 8.69.79zm-9.48 9.48c-2.37-2.37-2.595-6.095-.676-8.69l9.48 9.48c-2.822 1.918-6.433 1.58-8.803-.79z",fillRule:"evenodd"}))};i.defaultProps={name:"Ban"},t.a=i},,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(1),a=n(110),i=n.n(a),c=n(27),s=n(71),l=n.n(s),u=n(11),d=n.n(u),f=n(1312),p=n.n(f),h=n(181),b=Object(o.memo)((function(e){var t=e.className,n=function(e){return Object.keys(e).filter((function(t){return p()(e[t])&&e[t]})).filter((function(t){return"Mobile"!==t||!e.Tablet})).map((function(e){return"Body--".concat(e)}))}(Object(c.useSelector)(h.k));return Object(r.b)(i.a,{children:Object(r.b)("body",{className:d()(t,n)})})})),m=function(e){return function(t){var n=Object(o.forwardRef)((function(n,o){return Object(r.c)(r.a,{children:[Object(r.b)(b,{className:e}),Object(r.b)(t,Object.assign({},n,{ref:o}))]})}));return l()(n,t)}};m("LightGreyBg-body"),m("WhiteBg-body"),m("GreyBg-body")},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return j}));var r=n(2),o=n(1),a=n(389),i=n(1287),c=n(14),s=n(15),l=n(16),u=n(17),d=n(9),f=n(3),p=n.n(f),h=n(11),b=n.n(h);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(d.a)(e);if(t){var o=Object(d.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var v=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,[{key:"render",value:function(){var e=this.props,t=e.showReport,n=e.className,o=e.onReportClick,a=e.onMessageDelete;return Object(r.c)("ul",{className:b()("ActionMenu",n),children:[Object(r.b)("li",{className:"ActionMenu-item",onClick:a,children:"删除"}),t&&Object(r.b)("li",{className:"ActionMenu-item",onClick:o,children:"举报"})]})}}]),n}(o.Component);v.propsTypes={className:p.a.string,showReport:p.a.bool,onMessageDelete:p.a.func.isRequired,onReportClick:p.a.func.isRequired};var g=function(e,t){var n=e.isOpen,c=e.onToggleMenu,s=e.onDeleteClick,l=e.onReportClick,u=e.showReport;Object(o.useEffect)((function(){if(n)return window.addEventListener("wheel",c),function(){window.removeEventListener("wheel",c)}}),[n,c]);var d=Object(o.useCallback)((function(e){e.stopPropagation(),c()}),[c]);return Object(r.c)(r.a,{children:[Object(r.b)("button",{type:"button",onClick:d,"aria-label":"更多",ref:t,className:"Chat-ActionMenuPopover-Button",children:Object(r.b)(i.a,{className:"Message-status--more"})}),Object(r.b)(a.a,{isOpen:n,fixed:!0,arrowed:!0,target:null==t?void 0:t.current,children:Object(r.b)(v,{onMessageDelete:s,onReportClick:l,showReport:u})})]})},y=Object(o.forwardRef)(g),O=n(43),j=function(e){var t=e.handleDeleteClick,n=e.handleReportClick,a=e.showReport,i=Object(o.useState)(!1),c=Object(O.a)(i,2),s=c[0],l=c[1],u=Object(o.useRef)(),d=Object(o.useCallback)((function(){l((function(e){return!e}))}),[]),f=Object(o.useCallback)((function(){l(!1)}),[]),p=function(e){s&&u.current&&!u.current.contains(e.target)&&(l(!1),e.stopPropagation(),e.preventDefault())};return Object(o.useEffect)((function(){return document.addEventListener("click",p),function(){document.removeEventListener("click",p)}}),[s]),{popover:Object(r.b)(y,{ref:u,isOpen:s,onToggleMenu:d,onDeleteClick:t,onReportClick:n,showReport:a}),handleMouseLeave:f}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r.a})),n.d(t,"a",(function(){return T}));var r=n(1108),o=n(2),a=n(14),i=n(15),c=n(16),s=n(17),l=n(9),u=n(4),d=n(1),f=n(19),p=n(3),h=n.n(p),b=n(27),m=n(83),v=n.n(m),g=n(30),y=n(1416),O=n(31),j=(n(84),n(68)),w=n(234),C=n(205),k=n(24);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var o=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var S={answer:h.a.object.isRequired,renderThankButtonText:h.a.func,zaInfo:h.a.number},E=[].concat(Object(u.a)(Object.keys(S)),["updateAnswerThank"]),R=function(e){Object(c.a)(n,e);var t=x(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).buttonRef=Object(d.createRef)(),e.handleUpdateThanked=e.context.authRequired((function(){var t=e.props,n=t.answer,r=n.id,o=n.relationship.isThanked,a=t.zVideoId,i=t.updateAnswerThank,c=t.zaInfo,s=!o;g.a.trackEvent(e.buttonRef.current,Object.assign({action:s?"Thank":"UnThank",element:"Button"},c&&{id:c})),i(r,s,{zVideoId:a})}),k.W.thank),e}return Object(i.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.answer,r=t.renderThankButtonText,a=t.disabled,i=v()(this.props,E),c=r(n);return Object(o.c)(d.Fragment,{children:[Object(o.b)(C.c,{keyMap:{LIKE:"l"},handlers:{LIKE:function(t){e.buttonRef.current.focus(),e.handleUpdateThanked(t)}}}),Object(o.b)(O.c,Object.assign({onRef:this.buttonRef,preset:"plain",onClick:this.handleUpdateThanked,icon:y.a,label:c,disabled:a},i))]})}}]),n}(d.Component);R.contextTypes={authRequired:h.a.func},R.propTypes=S,R.defaultProps={renderThankButtonText:function(e){var t=e.relationship;return(t=void 0===t?{}:t).isThanked?"取消喜欢":"喜欢"}};var T=Object(f.compose)(Object(b.connect)(null,{updateAnswerThank:j.J}),Object(w.a)(null))(R)},,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(27),d=n(438),f=n(137),p=n(436),h=n(36);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var m=function(e){Object(a.a)(n,e);var t=b(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleReceiveMessage=function(t){var n=e.props;(0,n.handleReceiveMessage)(t,n.currentUser.id)},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.currentUser,n=e.setChatMqttStatus,r=e.isChatMqttExisted;t&&"guest"!==t.userType&&(r||(Object(d.a)([{name:"zhihu/message/v1/im/user/".concat(t.id,"/"),onMessage:this.handleReceiveMessage}]),n(!0)))}},{key:"render",value:function(){var e=this.props.children;return Object(s.b)("div",{children:e})}}]),n}(l.Component);t.a=Object(u.connect)((function(e){return{currentUser:Object(h.b)(e),isChatMqttExisted:e.chat.global.isChatMqttExisted}}),{handleReceiveMessage:f.l,setChatMqttStatus:p.b})(m)},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M4.076 16.966a4.19 4.19 0 0 1 1.05-1.76l8.568-8.569a.524.524 0 0 1 .741 0l2.928 2.927a.524.524 0 0 1 0 .74l-8.568 8.57c-.49.49-1.096.852-1.761 1.051l-3.528 1.058a.394.394 0 0 1-.49-.488l1.06-3.53zM20.558 4.83c.59.59.59 1.546 0 2.136l-1.693 1.692a.503.503 0 0 1-.712 0l-2.812-2.812a.504.504 0 0 1 0-.712l1.693-1.693a1.51 1.51 0 0 1 2.135 0l1.389 1.389z"}))};i.defaultProps={name:"Edit"},t.a=i},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(895),a=n(847),i=n(866),c=n(850),s=n(861),l=n(846),u=n(840),d=n(838),f=(n(874),n(860)),p=n(1198),h=s.draft_tree_data_support,b=h?c:i,m=d.List,v=d.Repeat,g={insertAtomicBlock:function(e,t,n){var i=e.getCurrentContent(),c=e.getSelection(),s=l.removeRange(i,c,"backward"),d=s.getSelectionAfter(),p=l.splitBlock(s,d),g=p.getSelectionAfter(),y=l.setBlockType(p,g,"atomic"),O=a.create({entity:t}),j={key:f(),type:"atomic",text:n,characterList:m(v(O,n.length))},w={key:f(),type:"unstyled"};h&&(j=r({},j,{nextSibling:w.key}),w=r({},w,{prevSibling:j.key}));var C=[new b(j),new b(w)],k=o.createFromArray(C),x=l.replaceWithFragment(y,g,k),S=x.merge({selectionBefore:c,selectionAfter:x.getSelectionAfter().set("hasFocus",!0)});return u.push(e,S,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var o=e.getCurrentContent(),a=e.getSelection(),i=void 0;if("before"===r||"after"===r){var c=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=p(o,t,c,r)}else{var s=l.removeRange(o,n,"backward"),d=s.getSelectionAfter(),f=s.getBlockForKey(d.getFocusKey());if(0===d.getStartOffset())i=p(s,t,f,"before");else if(d.getEndOffset()===f.getLength())i=p(s,t,f,"after");else{var h=l.splitBlock(s,d),b=h.getSelectionAfter(),m=h.getBlockForKey(b.getFocusKey());i=p(h,t,m,"before")}}var v=i.merge({selectionBefore:a,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return u.push(e,v,"move-block")}};e.exports=g},function(e,t,n){"use strict";e.exports={draft_killswitch_allow_nontextnodes:!1,draft_segmented_entities_behavior:!1,draft_handlebeforeinput_composed_text:!1,draft_tree_data_support:!1}},function(e,t,n){"use strict";var r=n(847),o=n(838).Map,a={add:function(e,t,n){return i(e,t,n,!0)},remove:function(e,t,n){return i(e,t,n,!1)}};function i(e,t,n,a){var i=e.getBlockMap(),c=t.getStartKey(),s=t.getStartOffset(),l=t.getEndKey(),u=t.getEndOffset(),d=i.skipUntil((function(e,t){return t===c})).takeUntil((function(e,t){return t===l})).concat(o([[l,i.get(l)]])).map((function(e,t){var o,i;c===l?(o=s,i=u):(o=t===c?s:0,i=t===l?u:e.getLength());for(var d,f=e.getCharacterList();o<i;)d=f.get(o),f=f.set(o,a?r.applyStyle(d,n):r.removeStyle(d,n)),o++;return e.set("characterList",f)}));return e.merge({blockMap:i.merge(d),selectionBefore:t,selectionAfter:t})}e.exports=a},function(e,t,n){"use strict";var r=n(838),o=n(1187);e.exports=function(e,t,n){var a=e.getBlockMap(),i=t.getStartKey(),c=t.getStartOffset(),s=t.getEndKey(),l=t.getEndOffset(),u=a.skipUntil((function(e,t){return t===i})).takeUntil((function(e,t){return t===s})).toOrderedMap().merge(r.OrderedMap([[s,a.get(s)]])).map((function(e,t){var r=t===i?c:0,a=t===s?l:e.getLength();return o(e,r,a,n)}));return e.merge({blockMap:a.merge(u),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=n(847);e.exports=function(e,t,n,o){for(var a=e.getCharacterList();t<n;)a=a.set(t,r.applyEntity(a.get(t),o)),t++;return e.set("characterList",a)}},function(e,t,n){"use strict";var r=n(1189),o=n(1190),a=n(839);function i(e,t,n,i,c,s,l){var u=n.getStartOffset(),d=n.getEndOffset(),f=e.__get(c).getMutability(),p=l?u:d;if("MUTABLE"===f)return n;var h=o(t,c).filter((function(e){return p<=e.end&&p>=e.start}));1!=h.length&&a(!1);var b=h[0];if("IMMUTABLE"===f)return n.merge({anchorOffset:b.start,focusOffset:b.end,isBackward:!1});s||(l?d=b.end:u=b.start);var m=r.getRemovalRange(u,d,t.getText().slice(b.start,b.end),b.start,i);return n.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1})}e.exports=function(e,t,n,r,o){var a=r.getStartOffset(),c=r.getEndOffset(),s=t.getEntityAt(a),l=n.getEntityAt(c-1);if(!s&&!l)return r;var u=r;if(s&&s===l)u=i(e,t,u,o,s,!0,!0);else if(s&&l){var d=i(e,t,u,o,s,!1,!0),f=i(e,n,u,o,l,!1,!1);u=u.merge({anchorOffset:d.getAnchorOffset(),focusOffset:f.getFocusOffset(),isBackward:!1})}else if(s){var p=i(e,t,u,o,s,!1,!0);u=u.merge({anchorOffset:p.getStartOffset(),isBackward:!1})}else if(l){var h=i(e,n,u,o,l,!1,!1);u=u.merge({focusOffset:h.getEndOffset(),isBackward:!1})}return u}},function(e,t,n){"use strict";e.exports={getRemovalRange:function(e,t,n,r,o){var a=n.split(" ");a=a.map((function(e,t){if("forward"===o){if(t>0)return" "+e}else if(t<a.length-1)return e+" ";return e}));for(var i,c=r,s=null,l=null,u=0;u<a.length;u++){if(e<(i=c+a[u].length)&&c<t)null!==s||(s=c),l=i;else if(null!==s)break;c=i}var d=r+n.length,f=s===r,p=l===d;return(!f&&p||f&&!p)&&("forward"===o?l!==d&&l++:s!==r&&s--),{start:s,end:l}}}},function(e,t,n){"use strict";var r=n(839);e.exports=function(e,t){var n=[];return e.findEntityRanges((function(e){return e.getEntity()===t}),(function(e,t){n.push({start:e,end:t})})),n.length||r(!1),n}},function(e,t,n){"use strict";var r=n(895),o=n(850),a=n(838),i=n(1034),c=n(839),s=n(1032),l=a.List,u=function(e,t,n,a,i,c){var s=n.first()instanceof o,u=[],d=a.size,f=n.get(i),p=a.first(),h=a.last(),b=h.getLength(),m=h.getKey(),v=s&&(!f.getChildKeys().isEmpty()||!p.getChildKeys().isEmpty());n.forEach((function(e,t){t===i?(v?u.push(e):u.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),a=r.slice(0,t),i=o.slice(0,t),c=n.first();return e.merge({text:a+c.getText(),characterList:i.concat(c.getCharacterList()),type:a?e.getType():c.getType(),data:c.getData()})}(e,c,a)),a.slice(v?0:1,d-1).forEach((function(e){return u.push(e)})),u.push(function(e,t,n){var r=e.getText(),o=e.getCharacterList(),a=r.length,i=r.slice(t,a),c=o.slice(t,a),s=n.last();return s.merge({text:s.getText()+i,characterList:s.getCharacterList().concat(c),data:s.getData()})}(e,c,a))):u.push(e)}));var g=r.createFromArray(u);return s&&(g=function(e,t,n,r){return e.withMutations((function(t){var o=n.getKey(),a=r.getKey(),i=n.getNextSiblingKey(),c=n.getParentKey(),s=function(e,t){var n=e.getKey(),r=e,o=[];for(t.get(n)&&o.push(n);r&&r.getNextSiblingKey();){var a=r.getNextSiblingKey();if(!a)break;o.push(a),r=t.get(a)}return o}(r,e),u=s[s.length-1];if(t.get(a)?(t.setIn([o,"nextSibling"],a),t.setIn([a,"prevSibling"],o)):(t.setIn([o,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],o)),t.setIn([u,"nextSibling"],i),i&&t.setIn([i,"prevSibling"],u),s.forEach((function(e){return t.setIn([e,"parent"],c)})),c){var d=e.get(c).getChildKeys(),f=d.indexOf(o)+1,p=d.toArray();p.splice.apply(p,[f,0].concat(s)),t.setIn([c,"children"],l(p))}}))}(g,0,f,p)),e.merge({blockMap:g,selectionBefore:t,selectionAfter:t.merge({anchorKey:m,anchorOffset:b,focusKey:m,focusOffset:b,isBackward:!1})})};e.exports=function(e,t,n){t.isCollapsed()||c(!1);var r=e.getBlockMap(),a=s(n),l=t.getStartKey(),d=t.getStartOffset(),f=r.get(l);return f instanceof o&&(f.getChildKeys().isEmpty()||c(!1)),1===a.size?function(e,t,n,r,o,a){var c=n.get(o),s=c.getText(),l=c.getCharacterList(),u=o,d=a+r.getText().length,f=c.merge({text:s.slice(0,a)+r.getText()+s.slice(a),characterList:i(l,r.getCharacterList(),a),data:r.getData()});return e.merge({blockMap:n.set(o,f),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:d,focusKey:u,focusOffset:d,isBackward:!1})})}(e,t,r,a.first(),l,d):u(e,t,r,a,l,d)}},function(e,t,n){"use strict";var r=n(838),o=n(1034),a=n(839),i=r.Repeat;e.exports=function(e,t,n,r){t.isCollapsed()||a(!1);var c=n.length;if(!c)return e;var s=e.getBlockMap(),l=t.getStartKey(),u=t.getStartOffset(),d=s.get(l),f=d.getText(),p=d.merge({text:f.slice(0,u)+n+f.slice(u,d.getLength()),characterList:o(d.getCharacterList(),i(r,c).toList(),u)}),h=u+c;return e.merge({blockMap:s.set(l,p),selectionAfter:t.merge({anchorOffset:h,focusOffset:h})})}},function(e,t,n){"use strict";var r=n(838).Map;e.exports=function(e,t,n){var o=t.getStartKey(),a=t.getEndKey(),i=e.getBlockMap(),c=i.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).concat(r([[a,i.get(a)]])).map(n);return e.merge({blockMap:i.merge(c),selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=n(850),o=n(838),a=n(1035),i=(o.List,o.Map),c=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},s=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var o=r.getParentKey();o&&n.push(o),r=o?t.get(o):null}return n},l=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},u=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},d=function(e,t,n,r){return e.withMutations((function(e){c(t.getKey(),e,(function(n){return n.merge({nextSibling:l(t,e,r),prevSibling:u(t,e,r)})})),c(n.getKey(),e,(function(t){return t.merge({nextSibling:l(n,e,r),prevSibling:u(n,e,r)})})),s(t.getKey(),r).forEach((function(t){return c(t,e,(function(t){return t.merge({children:t.getChildKeys().filter((function(t){return e.get(t)})),nextSibling:l(t,e,r),prevSibling:u(t,e,r)})}))})),c(t.getNextSiblingKey(),e,(function(e){return e.merge({prevSibling:t.getPrevSiblingKey()})})),c(t.getPrevSiblingKey(),e,(function(n){return n.merge({nextSibling:l(t,e,r)})})),c(n.getNextSiblingKey(),e,(function(t){return t.merge({prevSibling:u(n,e,r)})})),c(n.getPrevSiblingKey(),e,(function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})),s(n.getKey(),r).forEach((function(t){c(t,e,(function(t){return t.merge({children:t.getChildKeys().filter((function(t){return e.get(t)})),nextSibling:l(t,e,r),prevSibling:u(t,e,r)})}))})),function(e,t){var n=[];if(!e)return n;for(var r=a(e,t);r&&t.get(r);){var o=t.get(r);n.push(r),r=o.getParentKey()?a(o,t):null}return n}(n,r).forEach((function(t){return c(t,e,(function(t){return t.merge({nextSibling:l(t,e,r),prevSibling:u(t,e,r)})}))}))}))},f=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),o=e.slice(n);e=r.concat(o).toList()}return e};e.exports=function(e,t){if(t.isCollapsed())return e;var n=e.getBlockMap(),o=t.getStartKey(),c=t.getStartOffset(),l=t.getEndKey(),u=t.getEndOffset(),p=n.get(o),h=n.get(l),b=p instanceof r,m=[];if(b){var v=h.getChildKeys(),g=s(l,n);h.getNextSiblingKey()&&(m=m.concat(g)),v.isEmpty()||(m=m.concat(g.concat([l]))),m=m.concat(s(a(h,n),n))}var y=void 0;y=p===h?f(p.getCharacterList(),c,u):p.getCharacterList().slice(0,c).concat(h.getCharacterList().slice(u));var O=p.merge({text:p.getText().slice(0,c)+h.getText().slice(u),characterList:y}),j=n.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===l})).filter((function(e,t){return-1===m.indexOf(t)})).concat(i([[l,null]])).map((function(e,t){return t===o?O:null})),w=n.merge(j).filter((function(e){return!!e}));return b&&(w=d(w,p,h,n)),e.merge({blockMap:w,selectionBefore:t,selectionAfter:t.merge({anchorKey:o,anchorOffset:c,focusKey:o,focusOffset:c,isBackward:!1})})}},function(e,t,n){"use strict";var r=n(850),o=n(838),a=n(860),i=n(839),c=o.List,s=o.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};e.exports=function(e,t){t.isCollapsed()||i(!1);var n=t.getAnchorKey(),o=t.getAnchorOffset(),u=e.getBlockMap(),d=u.get(n),f=d.getText(),p=d.getCharacterList(),h=a(),b=d instanceof r,m=d.merge({text:f.slice(0,o),characterList:p.slice(0,o)}),v=m.merge({key:h,text:f.slice(o),characterList:p.slice(o),data:s()}),g=u.toSeq().takeUntil((function(e){return e===d})),y=u.toSeq().skipUntil((function(e){return e===d})).rest(),O=g.concat([[n,m],[h,v]],y).toOrderedMap();return b&&(d.getChildKeys().isEmpty()||i(!1),O=function(e,t,n){return e.withMutations((function(e){var r=t.getKey(),o=n.getKey();l(t.getParentKey(),e,(function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,a=t.toArray();return a.splice(n,0,o),e.merge({children:c(a)})})),l(t.getNextSiblingKey(),e,(function(e){return e.merge({prevSibling:o})})),l(r,e,(function(e){return e.merge({nextSibling:o})})),l(o,e,(function(e){return e.merge({prevSibling:r})}))}))}(O,m,v)),e.merge({blockMap:O,selectionBefore:t,selectionAfter:t.merge({anchorKey:h,anchorOffset:0,focusKey:h,focusOffset:0,isBackward:!1})})}},function(e,t,n){"use strict";var r,o=n(838),a=n(1197),i=n(852),c=o.OrderedMap,s={getDirectionMap:function(e,t){r?r.reset():r=new a;var n=e.getBlockMap(),s=n.valueSeq().map((function(e){return i(r).getDirection(e.getText())})),l=c(n.keySeq().zip(s));return null!=t&&o.is(t,l)?t:l}};e.exports=s},function(e,t,n){"use strict";var r=n(1038),o=n(965),a=n(839),i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t?o.isStrong(t)||a(!1):t=o.getGlobalDir(),this._defaultDir=t,this.reset()}return e.prototype.reset=function(){this._lastDir=this._defaultDir},e.prototype.getDirection=function(e){return this._lastDir=r.getDirection(e,this._lastDir),this._lastDir},e}();e.exports=i},function(e,t,n){"use strict";var r=n(850),o=n(838),a=n(1035),i=n(839),c=o.OrderedMap,s=o.List,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},u=function(e,t,n,r,o){if(!o)return e;var a="after"===r,i=t.getKey(),c=n.getKey(),u=t.getParentKey(),d=t.getNextSiblingKey(),f=t.getPrevSiblingKey(),p=n.getParentKey(),h=a?n.getNextSiblingKey():c,b=a?c:n.getPrevSiblingKey();return e.withMutations((function(e){l(u,e,(function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(i))})})),l(f,e,(function(e){return e.merge({nextSibling:d})})),l(d,e,(function(e){return e.merge({prevSibling:f})})),l(h,e,(function(e){return e.merge({prevSibling:i})})),l(b,e,(function(e){return e.merge({nextSibling:i})})),l(p,e,(function(e){var t=e.getChildKeys(),n=t.indexOf(c),r=a?n+1:0!==n?n-1:0,o=t.toArray();return o.splice(r,0,i),e.merge({children:s(o)})})),l(i,e,(function(e){return e.merge({nextSibling:h,prevSibling:b,parent:p})}))}))};e.exports=function(e,t,n,o){"replace"===o&&i(!1);var s=n.getKey(),l=t.getKey();l===s&&i(!1);var d=e.getBlockMap(),f=t instanceof r,p=[t],h=d.delete(l);f&&(p=[],h=d.withMutations((function(e){var n=t.getNextSiblingKey(),r=a(t,e);e.toSeq().skipUntil((function(e){return e.getKey()===l})).takeWhile((function(e){var t=e.getKey(),o=t===l,a=n&&t!==n,i=!n&&e.getParentKey()&&(!r||t!==r);return!!(o||a||i)})).forEach((function(t){p.push(t),e.delete(t.getKey())}))})));var b=h.toSeq().takeUntil((function(e){return e===n})),m=h.toSeq().skipUntil((function(e){return e===n})).skip(1),v=p.map((function(e){return[e.getKey(),e]})),g=c();if("before"===o){var y=e.getBlockBefore(s);y&&y.getKey()===t.getKey()&&i(!1),g=b.concat([].concat(v,[[s,n]]),m).toOrderedMap()}else if("after"===o){var O=e.getBlockAfter(s);O&&O.getKey()===l&&i(!1),g=b.concat([[s,n]].concat(v),m).toOrderedMap()}return e.merge({blockMap:u(g,t,n,o,f),selectionBefore:e.getSelectionAfter(),selectionAfter:e.getSelectionAfter().merge({anchorKey:l,focusKey:l})})}},function(e,t,n){"use strict";var r=n(838).List,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._decorators=t.slice()}return e.prototype.getDecorations=function(e,t){var n=Array(e.getText().length).fill(null);return this._decorators.forEach((function(r,o){var a=0;(0,r.strategy)(e,(function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(n,e,t)&&(!function(e,t,n,r){for(var o=t;o<n;o++)e[o]=r}(n,e,t,o+"."+a),a++)}),t)})),r(n)},e.prototype.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},e.prototype.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},e}();e.exports=o},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var o=n(966),a=n(1039),i=n(1201),c=n(1202),s=n(1224),l=n(1227),u=n(1259),d=n(840),f=n(1),p=n(39),h=n(1043),b=n(970),m=n(855),v=n(875),g=n(945),y=n(860),O=n(1056),j=n(971),w=n(839),C=n(852),k=m.isBrowser("IE"),x=!k,S={edit:l,composite:i,drag:s,cut:null,render:null},E=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.focus=function(e){var t=r.props.editorState,n=t.getSelection().getHasFocus(),o=p.findDOMNode(r.editor);if(o){var a=b.getScrollParent(o),i=e||j(a),c=i.x,s=i.y;o instanceof HTMLElement||w(!1),o.focus(),a===window?window.scrollTo(c,s):h.setTop(a,s),n||r.update(d.forceSelection(t,t.getSelection()))}},r.blur=function(){var e=p.findDOMNode(r.editor);e instanceof HTMLElement||w(!1),e.blur()},r.setMode=function(e){r._handler=S[e]},r.exitCurrentMode=function(){r.setMode("edit")},r.restoreEditorDOM=function(e){r.setState({contentsKey:r.state.contentsKey+1},(function(){r.focus(e)}))},r.setClipboard=function(e){r._clipboard=e},r.getClipboard=function(){return r._clipboard},r.update=function(e){r._latestEditorState=e,r.props.onChange(e)},r.onDragEnter=function(){r._dragCount++},r.onDragLeave=function(){r._dragCount--,0===r._dragCount&&r.exitCurrentMode()},r._blockSelectEvents=!1,r._clipboard=null,r._handler=null,r._dragCount=0,r._editorKey=n.editorKey||y(),r._placeholderAccessibilityID="placeholder-"+r._editorKey,r._latestEditorState=n.editorState,r._latestCommittedEditorState=n.editorState,r._onBeforeInput=r._buildHandler("onBeforeInput"),r._onBlur=r._buildHandler("onBlur"),r._onCharacterData=r._buildHandler("onCharacterData"),r._onCompositionEnd=r._buildHandler("onCompositionEnd"),r._onCompositionStart=r._buildHandler("onCompositionStart"),r._onCopy=r._buildHandler("onCopy"),r._onCut=r._buildHandler("onCut"),r._onDragEnd=r._buildHandler("onDragEnd"),r._onDragOver=r._buildHandler("onDragOver"),r._onDragStart=r._buildHandler("onDragStart"),r._onDrop=r._buildHandler("onDrop"),r._onInput=r._buildHandler("onInput"),r._onFocus=r._buildHandler("onFocus"),r._onKeyDown=r._buildHandler("onKeyDown"),r._onKeyPress=r._buildHandler("onKeyPress"),r._onKeyUp=r._buildHandler("onKeyUp"),r._onMouseDown=r._buildHandler("onMouseDown"),r._onMouseUp=r._buildHandler("onMouseUp"),r._onPaste=r._buildHandler("onPaste"),r._onSelect=r._buildHandler("onSelect"),r.getEditorKey=function(){return r._editorKey},r.state={contentsKey:0},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&r(t,n)}}},t.prototype._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},t.prototype._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:C(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return f.createElement(u,e)}return null},t.prototype.render=function(){var e=this,t=this.props,n=t.blockRenderMap,o=t.blockRendererFn,i=t.blockStyleFn,s=t.customStyleFn,l=t.customStyleMap,u=t.editorState,d=t.readOnly,p=t.textAlignment,h=t.textDirectionality,b=v({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===p,"DraftEditor/alignRight":"right"===p,"DraftEditor/alignCenter":"center"===p}),m=this.props.role||"textbox",g="combobox"===m?!!this.props.ariaExpanded:null,y={blockRenderMap:n,blockRendererFn:o,blockStyleFn:i,customStyleMap:r({},a,l),customStyleFn:s,editorKey:this._editorKey,editorState:u,key:"contents"+this.state.contentsKey,textDirectionality:h};return f.createElement("div",{className:b},this._renderPlaceholder(),f.createElement("div",{className:v("DraftEditor/editorContainer"),ref:function(t){return e.editorContainer=t}},f.createElement("div",{"aria-activedescendant":d?null:this.props.ariaActiveDescendantID,"aria-autocomplete":d?null:this.props.ariaAutoComplete,"aria-controls":d?null:this.props.ariaControls,"aria-describedby":this.props.ariaDescribedBy||this._placeholderAccessibilityID,"aria-expanded":d?null:g,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:v({notranslate:!d,"public/DraftEditor/content":!0}),contentEditable:!d,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:function(t){return e.editor=t},role:d?null:m,spellCheck:x&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},f.createElement(c,y))))},t.prototype.componentDidMount=function(){this.setMode("edit"),k&&document.execCommand("AutoUrlDetect",!1,!1)},t.prototype.componentWillUpdate=function(e){this._blockSelectEvents=!0,this._latestEditorState=e.editorState},t.prototype.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestCommittedEditorState=this.props.editorState},t}(f.Component);E.defaultProps={blockRenderMap:o,blockRendererFn:g.thatReturnsNull,blockStyleFn:g.thatReturns(""),keyBindingFn:O,readOnly:!1,spellCheck:!1,stripPastedStyles:!1},e.exports=E},function(e,t,n){"use strict";var r=n(861),o=n(846),a=n(840),i=n(967),c=n(968),s=n(897),l=n(1040),u=!1,d=!1,f="",p={onBeforeInput:function(e,t){f=(f||"")+t.data},onCompositionStart:function(e){d=!0},onCompositionEnd:function(e){u=!1,d=!1,setTimeout((function(){u||p.resolveComposition(e)}),20)},onKeyDown:function(e,t){if(!d)return p.resolveComposition(e),void e._onKeyDown(t);t.which!==i.RIGHT&&t.which!==i.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===i.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!d){u=!0;var t=f;f="";var n=a.set(e._latestEditorState,{inCompositionMode:!1}),i=n.getCurrentInlineStyle(),p=c(n.getCurrentContent(),n.getSelection()),h=!t||l(n)||i.size>0||null!==p;if(h&&e.restoreEditorDOM(),e.exitCurrentMode(),t){if(r.draft_handlebeforeinput_composed_text&&e.props.handleBeforeInput&&s(e.props.handleBeforeInput(t,n)))return;var b=o.replaceText(n.getCurrentContent(),n.getSelection(),t,i,p);e.update(a.push(n,b,"insert-characters"))}else h&&e.update(a.set(n,{nativelyRenderedContent:null,forceSelection:!0}))}}};e.exports=p},function(e,t,n){"use strict";var r=n(1203);e.exports=r},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var i=n(1041),c=n(930),s=(n(840),n(1)),l=n(875),u=n(1223),d=n(852),f=function(e,t,n,r){return l({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":4===t,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},p=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),o=t.isInCompositionMode(),a=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||o&&a)return!1;var i=t.getCurrentContent(),c=n.getCurrentContent(),s=t.getDecorator(),l=n.getDecorator();return o!==a||i!==c||s!==l||n.mustForceSelection()},t.prototype.render=function(){for(var e=this.props,t=e.blockRenderMap,n=e.blockRendererFn,o=e.blockStyleFn,a=e.customStyleMap,l=e.customStyleFn,p=e.editorState,h=e.editorKey,b=e.textDirectionality,m=p.getCurrentContent(),v=p.getSelection(),g=p.mustForceSelection(),y=p.getDecorator(),O=d(p.getDirectionMap()),j=m.getBlocksAsArray(),w=[],C=null,k=null,x=0;x<j.length;x++){var S=j[x],E=S.getKey(),R=S.getType(),T=n(S),A=void 0,N=void 0,_=void 0;T&&(A=T.component,N=T.props,_=T.editable);var I=b||O.get(E),M=c.encode(E,0,0),L={contentState:m,block:S,blockProps:N,blockStyleFn:o,customStyleMap:a,customStyleFn:l,decorator:y,direction:I,forceSelection:g,key:E,offsetKey:M,selection:v,tree:p.getBlockTree(E)},P=t.get(R)||t.get("unstyled"),B=P.wrapper,z=P.element||t.get("unstyled").element,D=S.getDepth(),F="";if(o&&(F=o(S)),"li"===z)F=u(F,f(R,D,k!==B||null===C||D>C,I));var U=A||i,V={className:F,"data-block":!0,"data-editor":h,"data-offset-key":M,key:E};void 0!==_&&(V=r({},V,{contentEditable:_,suppressContentEditableWarning:!0}));var q=s.createElement(z,V,s.createElement(U,L));w.push({block:q,wrapperTemplate:B,key:E,offsetKey:M}),C=B?S.getDepth():null,k=B}for(var H=[],K=0;K<w.length;){var Q=w[K];if(Q.wrapperTemplate){var W=[];do{W.push(w[K].block),K++}while(K<w.length&&w[K].wrapperTemplate===Q.wrapperTemplate);var G=s.cloneElement(Q.wrapperTemplate,{key:Q.key+"-wrap","data-offset-key":Q.offsetKey},W);H.push(G)}else H.push(Q.block),K++}return s.createElement("div",{"data-contents":"true"},H)},t}(s.Component);e.exports=p},function(e,t,n){"use strict";var r=n(91);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var i=n(1205),c=n(1),s=n(39),l=n(839),u=n(1211),d=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,r=t.start,o=t.text,a=n.getKey(),i=r+o.length;if(e.hasEdgeWithin(a,r,i)){var c=s.findDOMNode(this);c||l(!1);var d=c.firstChild;d||l(!1);var f=void 0;d.nodeType===Node.TEXT_NODE?f=d:"BR"===d.tagName?f=c:(f=d.firstChild)||l(!1),u(e,f,a,r,i)}}},t.prototype.shouldComponentUpdate=function(e){var t=s.findDOMNode(this.leaf);return t||l(!1),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},t.prototype.componentDidUpdate=function(){this._setSelection()},t.prototype.componentDidMount=function(){this._setSelection()},t.prototype.render=function(){var e=this,t=this.props.block,n=this.props.text;n.endsWith("\n")&&this.props.isLast&&(n+="\n");var o=this.props,a=o.customStyleMap,s=o.customStyleFn,l=o.offsetKey,u=o.styleSet,d=u.reduce((function(e,t){var n={},o=a[t];return void 0!==o&&e.textDecoration!==o.textDecoration&&(n.textDecoration=[e.textDecoration,o.textDecoration].join(" ").trim()),r(e,o,n)}),{});if(s){var f=s(u,t);d=r(d,f)}return c.createElement("span",{"data-offset-key":l,ref:function(t){return e.leaf=t},style:d},c.createElement(i,null,n))},t}(c.Component);e.exports=d},function(e,t,n){"use strict";var r=n(1),o=n(39),a=n(855),i=n(839),c=a.isBrowser("IE <= 11");var s=c?r.createElement("span",{key:"A","data-text":"true"},"\n"):r.createElement("br",{key:"A","data-text":"true"}),l=c?r.createElement("span",{key:"B","data-text":"true"},"\n"):r.createElement("br",{key:"B","data-text":"true"}),u=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r._forceFlag=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){var t=o.findDOMNode(this),n=""===e.children;return t instanceof Element||i(!1),n?!function(e){return c?"\n"===e.textContent:"BR"===e.tagName}(t):t.textContent!==e.children},t.prototype.componentDidMount=function(){this._forceFlag=!this._forceFlag},t.prototype.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},t.prototype.render=function(){return""===this.props.children?this._forceFlag?s:l:r.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true"},this.props.children)},t}(r.Component);e.exports=u},function(e,t,n){"use strict";var r=n(1207),o="Unknown",a={"Mac OS":"Mac OS X"};var i=(new r).getResult(),c=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(i.browser.version),s={browserArchitecture:i.cpu.architecture||o,browserFullVersion:i.browser.version||o,browserMinorVersion:c.minor||o,browserName:i.browser.name||o,browserVersion:i.browser.major||o,deviceName:i.device.model||o,engineName:i.engine.name||o,engineVersion:i.engine.version||o,platformArchitecture:i.cpu.architecture||o,platformName:function(e){return a[e]||e}(i.os.name)||o,platformVersion:i.os.version||o,platformFullVersion:i.os.version||o};e.exports=s},function(e,t,n){var r;
/*!
* UAParser.js v0.7.22
* Lightweight JavaScript-based User-Agent string parser
* https://github.com/faisalman/ua-parser-js
*
* Copyright © 2012-2019 Faisal Salman <f@faisalman.com>
* Licensed under MIT License
*/!function(o,a){"use strict";var i="model",c="name",s="type",l="vendor",u="version",d="mobile",f="tablet",p="smarttv",h={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},b={rgx:function(e,t){for(var n,r,o,a,i,c,s=0;s<t.length&&!i;){var l=t[s],u=t[s+1];for(n=r=0;n<l.length&&!i;)if(i=l[n++].exec(e))for(o=0;o<u.length;o++)c=i[++r],"object"==typeof(a=u[o])&&a.length>0?2==a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3==a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):void 0:this[a[0]]=c?a[1].call(this,c,a[2]):void 0:4==a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):void 0):this[a]=c||void 0;s+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(h.has(t[n][r],e))return"?"===n?void 0:n}else if(h.has(t[n],e))return"?"===n?void 0:n;return e}},m={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},v={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[c,u],[/(opios)[\/\s]+([\w\.]+)/i],[[c,"Opera Mini"],u],[/\s(opr)\/([\w\.]+)/i],[[c,"Opera"],u],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[c,u],[/(konqueror)\/([\w\.]+)/i],[[c,"Konqueror"],u],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[c,"IE"],u],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[c,"Edge"],u],[/(yabrowser)\/([\w\.]+)/i],[[c,"Yandex"],u],[/(Avast)\/([\w\.]+)/i],[[c,"Avast Secure Browser"],u],[/(AVG)\/([\w\.]+)/i],[[c,"AVG Secure Browser"],u],[/(puffin)\/([\w\.]+)/i],[[c,"Puffin"],u],[/(focus)\/([\w\.]+)/i],[[c,"Firefox Focus"],u],[/(opt)\/([\w\.]+)/i],[[c,"Opera Touch"],u],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[c,"UCBrowser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],u],[/(windowswechat qbcore)\/([\w\.]+)/i],[[c,"WeChat(Win) Desktop"],u],[/(micromessenger)\/([\w\.]+)/i],[[c,"WeChat"],u],[/(brave)\/([\w\.]+)/i],[[c,"Brave"],u],[/(qqbrowserlite)\/([\w\.]+)/i],[c,u],[/(QQ)\/([\d\.]+)/i],[c,u],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[c,u],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[c,u],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[c,u],[/(MetaSr)[\/\s]?([\w\.]+)/i],[c],[/(LBBROWSER)/i],[c],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[u,[c,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[c,u],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[u,[c,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[c,/(.+)/,"$1 WebView"],u],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[c,/(.+(?:g|us))(.+)/,"$1 $2"],u],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[u,[c,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[c,"Sailfish Browser"],u],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[c,u],[/(dolfin)\/([\w\.]+)/i],[[c,"Dolphin"],u],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[c,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[c,"Chrome"],u],[/(coast)\/([\w\.]+)/i],[[c,"Opera Coast"],u],[/fxios\/([\w\.-]+)/i],[u,[c,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[u,[c,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[u,c],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[c,"GSA"],u],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[c,[u,b.str,m.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[c,u],[/(navigator|netscape)\/([\w\.-]+)/i],[[c,"Netscape"],u],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[c,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",h.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",h.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",h.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[i,l,[s,f]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[l,"Apple"],[s,f]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[l,"Apple"],[s,p]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[l,i,[s,f]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[i,[l,"Amazon"],[s,f]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[i,b.str,m.device.amazon.model],[l,"Amazon"],[s,d]],[/android.+aft([bms])\sbuild/i],[i,[l,"Amazon"],[s,p]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[i,l,[s,d]],[/\((ip[honed|\s\w*]+);/i],[i,[l,"Apple"],[s,d]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[l,i,[s,d]],[/\(bb10;\s(\w+)/i],[i,[l,"BlackBerry"],[s,d]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[i,[l,"Asus"],[s,f]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[l,"Sony"],[i,"Xperia Tablet"],[s,f]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[l,"Sony"],[s,d]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[l,i,[s,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[l,"Nvidia"],[s,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[l,"Sony"],[s,"console"]],[/(sprint\s(\w+))/i],[[l,b.str,m.device.sprint.vendor],[i,b.str,m.device.sprint.model],[s,d]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[l,[i,/_/g," "],[s,d]],[/(nexus\s9)/i],[i,[l,"HTC"],[s,f]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29|ele-l29)/i],[i,[l,"Huawei"],[s,d]],[/android.+(bah2?-a?[lw]\d{2})/i],[i,[l,"Huawei"],[s,f]],[/(microsoft);\s(lumia[\s\w]+)/i],[l,i,[s,d]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[l,"Microsoft"],[s,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[l,"Microsoft"],[s,d]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[i,[l,"Motorola"],[s,d]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[l,"Motorola"],[s,f]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[l,h.trim],[i,h.trim],[s,p]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[l,"Samsung"],[s,p]],[/\(dtv[\);].+(aquos)/i],[i,[l,"Sharp"],[s,p]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[l,"Samsung"],i,[s,f]],[/smart-tv.+(samsung)/i],[l,[s,p],i],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[l,"Samsung"],i,[s,d]],[/sie-(\w*)/i],[i,[l,"Siemens"],[s,d]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[l,"Nokia"],i,[s,d]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[i,[l,"Acer"],[s,f]],[/android.+([vl]k\-?\d{3})\s+build/i],[i,[l,"LG"],[s,f]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[l,"LG"],i,[s,f]],[/(lg) netcast\.tv/i],[l,i,[s,p]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[i,[l,"LG"],[s,d]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[l,i,[s,f]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[l,"Lenovo"],[s,f]],[/(lenovo)[_\s-]?([\w-]+)/i],[l,i,[s,d]],[/linux;.+((jolla));/i],[l,i,[s,d]],[/((pebble))app\/[\d\.]+\s/i],[l,i,[s,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[l,i,[s,d]],[/crkey/i],[[i,"Chromecast"],[l,"Google"],[s,p]],[/android.+;\s(glass)\s\d/i],[i,[l,"Google"],[s,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[i,[l,"Google"],[s,f]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[i,[l,"Google"],[s,d]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]?[\w\s]+))\s+build/i],[[i,/_/g," "],[l,"Xiaomi"],[s,d]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]?[\w\s]+))\s+build/i],[[i,/_/g," "],[l,"Xiaomi"],[s,f]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[i,[l,"Meizu"],[s,d]],[/(mz)-([\w-]{2,})/i],[[l,"Meizu"],i,[s,d]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[i,[l,"OnePlus"],[s,d]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[i,[l,"RCA"],[s,f]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[i,[l,"Dell"],[s,f]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[i,[l,"Verizon"],[s,f]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[l,"Barnes & Noble"],i,[s,f]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[i,[l,"NuVision"],[s,f]],[/android.+;\s(k88)\sbuild/i],[i,[l,"ZTE"],[s,f]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[i,[l,"Swiss"],[s,d]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[i,[l,"Swiss"],[s,f]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[i,[l,"Zeki"],[s,f]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[l,"Dragon Touch"],i,[s,f]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[i,[l,"Insignia"],[s,f]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[i,[l,"NextBook"],[s,f]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[l,"Voice"],i,[s,d]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[l,"LvTel"],i,[s,d]],[/android.+;\s(PH-1)\s/i],[i,[l,"Essential"],[s,d]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[i,[l,"Envizen"],[s,f]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[l,i,[s,f]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[i,[l,"MachSpeed"],[s,f]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[l,i,[s,f]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[i,[l,"Rotor"],[s,f]],[/android.+(KS(.+))\s+build/i],[i,[l,"Amazon"],[s,f]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[l,i,[s,f]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[s,h.lowerize],l,i],[/[\s\/\(](smart-?tv)[;\)]/i],[[s,p]],[/(android[\w\.\s\-]{0,9});.+build/i],[i,[l,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[c,u],[/rv\:([\w\.]{1,9}).+(gecko)/i],[u,c]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[c,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[c,[u,b.str,m.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[c,"Windows"],[u,b.str,m.os.windows.version]],[/\((bb)(10);/i],[[c,"BlackBerry"],u],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[c,u],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[c,"Symbian"],u],[/\((series40);/i],[c],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[c,"Firefox OS"],u],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[c,u],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[c,"Chromium OS"],u],[/(sunos)\s?([\w\.\d]*)/i],[[c,"Solaris"],u],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[c,u],[/(haiku)\s(\w+)/i],[c,u],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[u,/_/g,"."],[c,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[c,"Mac OS"],[u,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[c,u]]},g=function e(t,n){if("object"==typeof t&&(n=t,t=void 0),!(this instanceof e))return new e(t,n).getResult();var r=t||(o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),a=n?h.extend(v,n):v;return this.getBrowser=function(){var e={name:void 0,version:void 0};return b.rgx.call(e,r,a.browser),e.major=h.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return b.rgx.call(e,r,a.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return b.rgx.call(e,r,a.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return b.rgx.call(e,r,a.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return b.rgx.call(e,r,a.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,this},this};g.VERSION="0.7.22",g.BROWSER={NAME:c,MAJOR:"major",VERSION:u},g.CPU={ARCHITECTURE:"architecture"},g.DEVICE={MODEL:i,VENDOR:l,TYPE:s,CONSOLE:"console",MOBILE:d,SMARTTV:p,TABLET:f,WEARABLE:"wearable",EMBEDDED:"embedded"},g.ENGINE={NAME:c,VERSION:u},g.OS={NAME:c,VERSION:u},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=g),t.UAParser=g):void 0===(r=function(){return g}.call(t,n,t,e))||(e.exports=r);var y=o&&(o.jQuery||o.Zepto);if(y&&!y.ua){var O=new g;y.ua=O.getResult(),y.ua.get=function(){return O.getUA()},y.ua.set=function(e){O.setUA(e);var t=O.getResult();for(var n in t)y.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){"use strict";var r=n(839),o=/\./,a=/\|\|/,i=/\s+\-\s+/,c=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,s=/^(\d*)(.*)/;function l(e,t){var n=e.split(a);return n.length>1?n.some((function(e){return O.contains(e,t)})):function(e,t){var n=e.split(i);if(n.length>0&&n.length<=2||r(!1),1===n.length)return u(n[0],t);var o=n[0],a=n[1];return b(o)&&b(a)||r(!1),u(">="+o,t)&&u("<="+a,t)}(e=n[0].trim(),t)}function u(e,t){if(""===(e=e.trim()))return!0;var n,r=t.split(o),a=p(e),i=a.modifier,c=a.rangeComponents;switch(i){case"<":return d(r,c);case"<=":return-1===(n=y(r,c))||0===n;case">=":return f(r,c);case">":return function(e,t){return 1===y(e,t)}(r,c);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var o=r.length-1,a=parseInt(r[o],10);h(a)&&(r[o]=a+1+"");return f(e,n)&&d(e,r)}(r,c);default:return function(e,t){return 0===y(e,t)}(r,c)}}function d(e,t){return-1===y(e,t)}function f(e,t){var n=y(e,t);return 1===n||0===n}function p(e){var t=e.split(o),n=t[0].match(c);return n||r(!1),{modifier:n[1],rangeComponents:[n[2]].concat(t.slice(1))}}function h(e){return!isNaN(e)&&isFinite(e)}function b(e){return!p(e).modifier}function m(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function v(e,t){var n=e.match(s)[1],r=t.match(s)[1],o=parseInt(n,10),a=parseInt(r,10);return h(o)&&h(a)&&o!==a?g(o,a):g(e,t)}function g(e,t){return typeof e!=typeof t&&r(!1),e>t?1:e<t?-1:0}function y(e,t){for(var n=function(e,t){m(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var o=n;o<e.length;o++)e[o]="0"}return m(t,e.length),[e,t]}(e,t),r=n[0],o=n[1],a=0;a<o.length;a++){var i=v(r[a],o[a]);if(i)return i}return 0}var O={contains:function(e,t){return l(e.trim(),t.trim())}};e.exports=O},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!e)return null;var o={};for(var a in e)r.call(e,a)&&(o[a]=t.call(n,e[a],a,e));return o}},function(e,t,n){"use strict";e.exports=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}},function(e,t,n){"use strict";(function(t){var r=n(1212),o=n(969),a=n(1042),i=n(839);function c(e,t){if(!e)return"[empty]";var n=function e(t,n){var r=void 0!==n?n(t):[];if(t.nodeType===Node.TEXT_NODE){var o=t.textContent.length;return document.createTextNode("[text "+o+(r.length?" | "+r.join(", "):"")+"]")}var a=t.cloneNode();1===a.nodeType&&r.length&&a.setAttribute("data-labels",r.join(", "));for(var i=t.childNodes,c=0;c<i.length;c++)a.appendChild(e(i[c],n));return a}(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(n instanceof Element||i(!1),n.outerHTML)}function s(e,t){for(var n=e;n;){if(n instanceof Element&&n.hasAttribute("contenteditable"))return c(n,t);n=n.parentNode}return"Could not find contentEditable parent of node"}function l(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function u(e,t,n,i){var c=a();if(e.extend&&o(c,t)){n>l(t)&&r.logSelectionStateFailure({anonymizedDom:s(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(i.toJS())});var u=t===e.focusNode;try{e.extend(t,n)}catch(o){throw r.logSelectionStateFailure({anonymizedDom:s(t,(function(t){var n=[];return t===c&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n})),extraParams:JSON.stringify({activeElementName:c?c.nodeName:null,nodeIsFocus:t===e.focusNode,nodeWasFocus:u,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:o?""+o:null,offset:n},null,2),selectionState:JSON.stringify(i.toJS(),null,2)}),o}}else{var d=e.getRangeAt(0);d.setEnd(t,n),e.addRange(d.cloneRange())}}function d(e,t,n,o){var a=document.createRange();n>l(t)&&r.logSelectionStateFailure({anonymizedDom:s(t),extraParams:JSON.stringify({offset:n}),selectionState:JSON.stringify(o.toJS())}),a.setStart(t,n),e.addRange(a)}e.exports=function(e,n,r,a,i){if(o(document.documentElement,n)){var c=t.getSelection(),s=e.getAnchorKey(),l=e.getAnchorOffset(),f=e.getFocusKey(),p=e.getFocusOffset(),h=e.getIsBackward();if(!c.extend&&h){var b=s,m=l;s=f,l=p,f=b,p=m,h=!1}var v=s===r&&a<=l&&i>=l,g=f===r&&a<=p&&i>=p;if(v&&g)return c.removeAllRanges(),d(c,n,l-a,e),void u(c,n,p-a,e);if(h){if(g&&(c.removeAllRanges(),d(c,n,p-a,e)),v){var y=c.focusNode,O=c.focusOffset;c.removeAllRanges(),d(c,n,l-a,e),u(c,y,O,e)}}else v&&(c.removeAllRanges(),d(c,n,l-a,e)),g&&u(c,n,p-a,e)}}}).call(this,n(100))},function(e,t,n){"use strict";e.exports={logSelectionStateFailure:function(){return null}}},function(e,t,n){"use strict";var r=n(1214);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(1216),o=n(1217);function a(e){return null==e?e:String(e)}e.exports=function(e,t){var n=void 0;if(window.getComputedStyle&&(n=window.getComputedStyle(e,null)))return a(n.getPropertyValue(o(t)));if(document.defaultView&&document.defaultView.getComputedStyle){if(n=document.defaultView.getComputedStyle(e,null))return a(n.getPropertyValue(o(t)));if("display"===t)return"none"}return e.currentStyle?a("float"===t?e.currentStyle.cssFloat||e.currentStyle.styleFloat:e.currentStyle[r(t)]):a(e.style&&e.style[r(t)])}},function(e,t,n){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,(function(e,t){return t.toUpperCase()}))}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";var r=n(1219);e.exports=function(e){var t=r(e);return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}}},function(e,t,n){"use strict";var r=n(969);e.exports=function(e){var t=e.ownerDocument.documentElement;if(!("getBoundingClientRect"in e)||!r(t,e))return{left:0,right:0,top:0,bottom:0};var n=e.getBoundingClientRect();return{left:Math.round(n.left)-t.clientLeft,right:Math.round(n.right)-t.clientLeft,top:Math.round(n.top)-t.clientTop,bottom:Math.round(n.bottom)-t.clientTop}}},function(e,t,n){"use strict";var r="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;e.exports=function(e){return(e=e||document).scrollingElement?e.scrollingElement:r||"CSS1Compat"!==e.compatMode?e.body:e.documentElement}},function(e,t,n){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},function(e,t,n){"use strict";function r(){var e=void 0;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function o(){var e=void 0;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function a(){return{width:window.innerWidth||r(),height:window.innerHeight||o()}}a.withoutScrollbars=function(){return{width:r(),height:o()}},e.exports=a},function(e,t,n){"use strict";e.exports=function(e){e||(e="");var t=void 0,n=arguments.length;if(n>1)for(var r=1;r<n;r++)(t=arguments[r])&&(e=(e?e+" ":"")+t);return e}},function(e,t,n){"use strict";var r=n(1044),o=n(846),a=n(840),i=n(972),c=n(1046),s=n(1047),l=n(897),u=n(852);var d={onDragEnd:function(e){e.exitCurrentMode()},onDrop:function(e,t){var n=new r(t.nativeEvent.dataTransfer),d=e._latestEditorState,p=function(e,t){var n=null,r=null;if("function"==typeof document.caretRangeFromPoint){var o=document.caretRangeFromPoint(e.x,e.y);n=o.startContainer,r=o.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,r=e.rangeOffset}n=u(n),r=u(r);var a=u(i(n));return s(t,a,r,a,r)}(t.nativeEvent,d);if(t.preventDefault(),e.exitCurrentMode(),null!=p){var h=n.getFiles();if(h.length>0){if(e.props.handleDroppedFiles&&l(e.props.handleDroppedFiles(p,h)))return;c(h,(function(t){t&&e.update(f(d,p,t))}))}else{var b=e._internalDrag?"internal":"external";e.props.handleDrop&&l(e.props.handleDrop(p,n,b))||(e._internalDrag?e.update(function(e,t){var n=o.moveText(e.getCurrentContent(),e.getSelection(),t);return a.push(e,n,"insert-fragment")}(d,p)):e.update(f(d,p,n.getText())))}}}};function f(e,t,n){var r=o.insertText(e.getCurrentContent(),t,n,e.getCurrentInlineStyle());return a.push(e,r,"insert-fragment")}e.exports=d},function(e,t,n){"use strict";var r={isImage:function(e){return"image"===o(e)[0]},isJpeg:function(e){var t=o(e);return r.isImage(e)&&("jpeg"===t[1]||"pjpeg"===t[1])}};function o(e){return e.split("/")}e.exports=r},function(e,t,n){"use strict";var r=n(839);e.exports=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&r(!1),"number"!=typeof t&&r(!1),0===t||t-1 in e||r(!1),"function"==typeof e.callee&&r(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),o=0;o<t;o++)n[o]=e[o];return n}(e):[e]}},function(e,t,n){"use strict";var r={onBeforeInput:n(1228),onBlur:n(1230),onCompositionStart:n(1231),onCopy:n(1232),onCut:n(1233),onDragOver:n(1234),onDragStart:n(1235),onFocus:n(1236),onInput:n(1237),onKeyDown:n(1238),onPaste:n(1252),onSelect:n(1257)};e.exports=r},function(e,t,n){"use strict";(function(t){var r=n(1036),o=n(846),a=n(840),i=n(855),c=n(968),s=n(897),l=n(1040),u=n(852),d=n(1229),f=i.isBrowser("Firefox");function p(e,t,n,r){var i=o.replaceText(e.getCurrentContent(),e.getSelection(),t,n,r);return a.push(e,i,"insert-characters")}e.exports=function(e,n){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var o=e._latestEditorState,i=n.data;if(i)if(e.props.handleBeforeInput&&s(e.props.handleBeforeInput(i,o)))n.preventDefault();else{var h=o.getSelection(),b=h.getStartOffset(),m=h.getEndOffset(),v=h.getAnchorKey();if(!h.isCollapsed())return n.preventDefault(),void(i===o.getCurrentContent().getPlainText().slice(b,m)?e.update(a.forceSelection(o,h.merge({focusOffset:m}))):e.update(p(o,i,o.getCurrentInlineStyle(),c(o.getCurrentContent(),o.getSelection()))));var g,y=p(o,i,o.getCurrentInlineStyle(),c(o.getCurrentContent(),o.getSelection())),O=!1;if(O||(O=l(e._latestCommittedEditorState)),!O){var j=t.getSelection();if(j.anchorNode&&j.anchorNode.nodeType===Node.TEXT_NODE){var w=j.anchorNode.parentNode;O="SPAN"===w.nodeName&&w.firstChild.nodeType===Node.TEXT_NODE&&-1!==w.firstChild.nodeValue.indexOf("\t")}}if(!O)O=r.getFingerprint(o.getBlockTree(v))!==r.getFingerprint(y.getBlockTree(v));if(O||(g=i,O=f&&("'"==g||"/"==g)),O||(O=u(y.getDirectionMap()).get(v)!==u(o.getDirectionMap()).get(v)),O)return n.preventDefault(),void e.update(y);y=a.set(y,{nativelyRenderedContent:y.getCurrentContent()}),e._pendingStateFromBeforeInput=y,d((function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)}))}}}).call(this,n(100))},function(e,t,n){"use strict";(function(t){n(1139),e.exports=t.setImmediate}).call(this,n(100))},function(e,t,n){"use strict";(function(t){var r=n(840),o=n(969),a=n(1042);e.exports=function(e,n){if(a()===document.body){var i=t.getSelection(),c=e.editor;1===i.rangeCount&&o(c,i.anchorNode)&&o(c,i.focusNode)&&i.removeAllRanges()}var s=e._latestEditorState,l=s.getSelection();if(l.getHasFocus()){var u=l.set("hasFocus",!1);e.props.onBlur&&e.props.onBlur(n),e.update(r.acceptSelection(s,u))}}}).call(this,n(100))},function(e,t,n){"use strict";var r=n(840);e.exports=function(e,t){e.setMode("composite"),e.update(r.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)}},function(e,t,n){"use strict";var r=n(1048);e.exports=function(e,t){e._latestEditorState.getSelection().isCollapsed()?t.preventDefault():e.setClipboard(r(e._latestEditorState))}},function(e,t,n){"use strict";var r=n(846),o=n(840),a=n(970),i=n(1048),c=n(971);e.exports=function(e,t){var n=e._latestEditorState,s=n.getSelection(),l=t.target,u=void 0;if(s.isCollapsed())t.preventDefault();else{l instanceof Node&&(u=c(a.getScrollParent(l)));var d=i(n);e.setClipboard(d),e.setMode("cut"),setTimeout((function(){e.restoreEditorDOM(u),e.exitCurrentMode(),e.update(function(e){var t=r.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return o.push(e,t,"remove-range")}(n))}),0)}}},function(e,t,n){"use strict";e.exports=function(e,t){e._internalDrag=!1,e.setMode("drag"),t.preventDefault()}},function(e,t,n){"use strict";e.exports=function(e){e._internalDrag=!0,e.setMode("drag")}},function(e,t,n){"use strict";var r=n(840),o=n(855);e.exports=function(e,t){var n=e._latestEditorState,a=n.getSelection();if(!a.getHasFocus()){var i=a.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),o.isBrowser("Chrome < 60.0.3081.0")?e.update(r.forceSelection(n,i)):e.update(r.acceptSelection(n,i))}}},function(e,t,n){"use strict";(function(t){var r=n(861),o=n(846),a=n(930),i=n(840),c=n(855),s=n(972),l=n(852),u=c.isEngine("Gecko");e.exports=function(e){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=t.getSelection(),c=n.anchorNode,d=n.isCollapsed,f=c.nodeType!==Node.TEXT_NODE,p=c.nodeType!==Node.TEXT_NODE&&c.nodeType!==Node.ELEMENT_NODE;if(r.draft_killswitch_allow_nontextnodes){if(f)return}else if(p)return;if(c.nodeType===Node.TEXT_NODE&&(null!==c.previousSibling||null!==c.nextSibling)){var h=c.parentNode;c.nodeValue=h.textContent;for(var b=h.firstChild;null!==b;b=b.nextSibling)b!==c&&h.removeChild(b)}var m=c.textContent,v=e._latestEditorState,g=l(s(c)),y=a.decode(g),O=y.blockKey,j=y.decoratorKey,w=y.leafKey,C=v.getBlockTree(O).getIn([j,"leaves",w]),k=C.start,x=C.end,S=v.getCurrentContent(),E=S.getBlockForKey(O),R=E.getText().slice(k,x);if(m.endsWith("\n\n")&&(m=m.slice(0,-1)),m!==R){var T,A,N,_,I=v.getSelection(),M=I.merge({anchorOffset:k,focusOffset:x,isBackward:!1}),L=E.getEntityAt(k),P=L&&S.getEntity(L),B="MUTABLE"===(P&&P.getMutability()),z=B?"spellcheck-change":"apply-entity",D=o.replaceText(S,M,m,E.getInlineStyleAt(k),B?E.getEntityAt(k):null);if(u)T=n.anchorOffset,A=n.focusOffset,_=(N=k+Math.min(T,A))+Math.abs(T-A),T=N,A=_;else{var F=m.length-R.length;N=I.getStartOffset(),_=I.getEndOffset(),T=d?_+F:N,A=_+F}var U=D.merge({selectionBefore:S.getSelectionAfter(),selectionAfter:I.merge({anchorOffset:T,focusOffset:A})});e.update(i.push(v,U,z))}}}).call(this,n(100))},function(e,t,n){"use strict";var r=n(846),o=n(840),a=n(973),i=n(967),c=n(1239),s=n(855),l=n(897),u=n(1240),d=n(1242),f=n(1244),p=n(1245),h=n(1246),b=n(1247),m=n(1248),v=n(1249),g=n(1250),y=n(1251),O=a.isOptionKeyCommand,j=s.isBrowser("Chrome");e.exports=function(e,t){var n=t.which,a=e._latestEditorState;switch(n){case i.RETURN:if(t.preventDefault(),e.props.handleReturn&&l(e.props.handleReturn(t,a)))return;break;case i.ESC:return t.preventDefault(),void(e.props.onEscape&&e.props.onEscape(t));case i.TAB:return void(e.props.onTab&&e.props.onTab(t));case i.UP:return void(e.props.onUpArrow&&e.props.onUpArrow(t));case i.RIGHT:return void(e.props.onRightArrow&&e.props.onRightArrow(t));case i.DOWN:return void(e.props.onDownArrow&&e.props.onDownArrow(t));case i.LEFT:return void(e.props.onLeftArrow&&e.props.onLeftArrow(t));case i.SPACE:if(j&&O(t)){t.preventDefault();var s=r.replaceText(a.getCurrentContent(),a.getSelection()," ");return void e.update(o.push(a,s,"insert-characters"))}}var w=e.props.keyBindingFn(t);if(w)if("undo"!==w){if(t.preventDefault(),!e.props.handleKeyCommand||!l(e.props.handleKeyCommand(w,a))){var C=function(e,t){switch(e){case"redo":return o.redo(t);case"delete":return v(t);case"delete-word":return f(t);case"backspace":return m(t);case"backspace-word":return d(t);case"backspace-to-start-of-line":return u(t);case"split-block":return p(t);case"transpose-characters":return g(t);case"move-selection-to-start-of-block":return b(t);case"move-selection-to-end-of-block":return h(t);case"secondary-cut":return c.cut(t);case"secondary-paste":return c.paste(t);default:return t}}(w,a);C!==a&&e.update(C)}}else y(t,a,e.update)}},function(e,t,n){"use strict";var r=n(846),o=n(840),a=n(928),i=n(852),c=null,s={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),s=null;if(n.isCollapsed()){var l=n.getAnchorKey(),u=t.getBlockForKey(l).getLength();if(u===n.getAnchorOffset())return e;s=n.set("focusOffset",u)}else s=n;s=i(s),c=a(t,s);var d=r.removeRange(t,s,"forward");return d===t?e:o.push(e,d,"remove-range")},paste:function(e){if(!c)return e;var t=r.replaceWithFragment(e.getCurrentContent(),e.getSelection(),c);return o.push(e,t,"insert-fragment")}};e.exports=s},function(e,t,n){"use strict";(function(t){var r=n(840),o=n(1241),a=n(1050),i=n(974),c=n(898);e.exports=function(e){var n=c(e,(function(e){var n=e.getSelection();if(n.isCollapsed()&&0===n.getAnchorOffset())return i(e,1);var r=t.getSelection().getRangeAt(0);return r=o(r),a(e,null,r.endContainer,r.endOffset,r.startContainer,r.startOffset).selectionState}),"backward");return n===e.getCurrentContent()?e:r.push(e,n,"remove-range")}}).call(this,n(100))},function(e,t,n){"use strict";var r=n(867),o=n(1049),a=n(839);function i(e,t){for(var n=1/0,r=1/0,o=-1/0,a=-1/0,i=0;i<e.length;i++){var c=e[i];0!==c.width&&1!==c.width&&(n=Math.min(n,c.top),r=Math.min(r,c.bottom),o=Math.max(o,c.top),a=Math.max(a,c.bottom))}return o<=r&&o-n<t&&a-r<t}function c(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}e.exports=function(e){e.collapsed||a(!1);var t=(e=e.cloneRange()).startContainer;1!==t.nodeType&&(t=t.parentNode);var n=function(e){var t=getComputedStyle(e),n=document.createElement("div");n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontStyle=t.fontStyle,n.style.fontWeight=t.fontWeight,n.style.lineHeight=t.lineHeight,n.style.position="absolute",n.textContent="M";var r=document.body;r||a(!1),r.appendChild(n);var o=n.getBoundingClientRect();return r.removeChild(n),o.height}(t),s=e.endContainer,l=e.endOffset;for(e.setStart(e.startContainer,0);i(o(e),n)&&(s=e.startContainer,l=e.startOffset,s.parentNode||a(!1),e.setStartBefore(s),1!==s.nodeType||"inline"===getComputedStyle(s).display););for(var u=s,d=l-1;;){for(var f=u.nodeValue,p=d;p>=0;p--)if(!(null!=f&&p>0&&r.isSurrogatePair(f,p-1))){if(e.setStart(u,p),!i(o(e),n))break;s=u,l=p}if(-1===p||0===u.childNodes.length)break;d=c(u=u.childNodes[p])}return e.setStart(s,l),e}},function(e,t,n){"use strict";var r=n(1051),o=n(840),a=n(974),i=n(898);e.exports=function(e){var t=i(e,(function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return a(e,1);var o=t.getStartKey(),i=e.getCurrentContent().getBlockForKey(o).getText().slice(0,n),c=r.getBackward(i);return a(e,c.length||1)}),"backward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";e.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:----・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}},function(e,t,n){"use strict";var r=n(1051),o=n(840),a=n(1052),i=n(898);e.exports=function(e){var t=i(e,(function(e){var t=e.getSelection(),n=t.getStartOffset(),o=t.getStartKey(),i=e.getCurrentContent().getBlockForKey(o).getText().slice(n),c=r.getForward(i);return a(e,c.length||1)}),"forward");return t===e.getCurrentContent()?e:o.push(e,t,"remove-range")}},function(e,t,n){"use strict";var r=n(846),o=n(840);e.exports=function(e){var t=r.splitBlock(e.getCurrentContent(),e.getSelection());return o.push(e,t,"split-block")}},function(e,t,n){"use strict";var r=n(840);e.exports=function(e){var t=e.getSelection(),n=t.getEndKey(),o=e.getCurrentContent().getBlockForKey(n).getLength();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:o,focusKey:n,focusOffset:o,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(840);e.exports=function(e){var t=e.getSelection(),n=t.getStartKey();return r.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})}},function(e,t,n){"use strict";var r=n(840),o=n(867),a=n(974),i=n(898);e.exports=function(e){var t=i(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),i=t.getAnchorOffset(),c=n.getBlockForKey(r).getText()[i-1];return a(e,c?o.getUTF16Length(c,0):1)}),"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")}},function(e,t,n){"use strict";var r=n(840),o=n(867),a=n(1052),i=n(898);e.exports=function(e){var t=i(e,(function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),i=t.getAnchorOffset(),c=n.getBlockForKey(r).getText()[i];return a(e,c?o.getUTF16Length(c,0):1)}),"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return r.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")}},function(e,t,n){"use strict";var r=n(846),o=n(840),a=n(928);e.exports=function(e){var t=e.getSelection();if(!t.isCollapsed())return e;var n=t.getAnchorOffset();if(0===n)return e;var i,c,s=t.getAnchorKey(),l=e.getCurrentContent(),u=l.getBlockForKey(s).getLength();if(u<=1)return e;n===u?(i=t.set("anchorOffset",n-1),c=t):c=(i=t.set("focusOffset",n+1)).set("anchorOffset",n+1);var d=a(l,i),f=r.removeRange(l,i,"backward"),p=f.getSelectionAfter(),h=p.getAnchorOffset()-1,b=p.merge({anchorOffset:h,focusOffset:h}),m=r.replaceWithFragment(f,b,d),v=o.push(e,m,"insert-fragment");return o.acceptSelection(v,c)}},function(e,t,n){"use strict";var r=n(840);e.exports=function(e,t,n){var o=r.undo(t);if("spellcheck-change"!==t.getLastChangeType())e.preventDefault(),t.getNativelyRenderedContent()?(n(r.set(t,{nativelyRenderedContent:null})),setTimeout((function(){n(o)}),0)):n(o);else{var a=o.getCurrentContent();n(r.set(o,{nativelyRenderedContent:a}))}}},function(e,t,n){"use strict";var r=n(895),o=n(847),a=n(1044),i=n(846),c=n(1253),s=n(840),l=n(1055),u=n(968),d=n(1046),f=n(897),p=n(1256);function h(e,t,n){var r=i.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return s.push(e,r.set("entityMap",n),"insert-fragment")}e.exports=function(e,t){t.preventDefault();var n=new a(t.clipboardData);if(!n.isRichText()){var b=n.getFiles(),m=n.getText();if(b.length>0){if(e.props.handlePastedFiles&&f(e.props.handlePastedFiles(b)))return;return void d(b,(function(t){if(t=t||m){var n=e._latestEditorState,a=p(t),d=o.create({style:n.getCurrentInlineStyle(),entity:u(n.getCurrentContent(),n.getSelection())}),f=l.getCurrentBlockType(n),h=c.processText(a,d,f),b=r.createFromArray(h),v=i.replaceWithFragment(n.getCurrentContent(),n.getSelection(),b);e.update(s.push(n,v,"insert-fragment"))}}))}}var v=[],g=n.getText(),y=n.getHTML(),O=e._latestEditorState;if(!e.props.handlePastedText||!f(e.props.handlePastedText(g,y,O))){if(g&&(v=p(g)),!e.props.stripPastedStyles){var j=e.getClipboard();if(n.isRichText()&&j){if(-1!==y.indexOf(e.getEditorKey())||1===v.length&&1===j.size&&j.first().getText()===g)return void e.update(h(e._latestEditorState,j))}else if(j&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every((function(t,n){return t.getText()===e[n]}))}(v,j))return void e.update(h(e._latestEditorState,j));if(y){var w=c.processHTML(y,e.props.blockRenderMap);if(w){var C=w.contentBlocks,k=w.entityMap;if(C){var x=r.createFromArray(C);return void e.update(h(e._latestEditorState,x,k))}}}e.setClipboard(null)}if(v.length){var S=o.create({style:O.getCurrentInlineStyle(),entity:u(O.getCurrentContent(),O.getSelection())}),E=l.getCurrentBlockType(O),R=c.processText(v,S,E),T=r.createFromArray(R);e.update(h(e._latestEditorState,T))}}}},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=(n(847),n(866)),a=n(850),i=n(861),c=n(838),s=n(1053),l=n(860),u=n(1054),d=n(964),f=c.List,p=c.Repeat,h=i.draft_tree_data_support,b=h?a:o,m={processHTML:function(e,t){return s(e,u,t)},processText:function(e,t,n){return e.reduce((function(e,o,a){o=d(o);var i=l(),c={key:i,type:n,text:o,characterList:f(p(t,o.length))};if(h&&0!==a){var s=a-1,u=e[s]=e[s].merge({nextSibling:i});c=r({},c,{prevSibling:u.getKey()})}return e.push(new b(c)),e}),[])}};e.exports=m},function(e,t,n){"use strict";var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._uri=t}return e.prototype.toString=function(){return this._uri},e}();e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o=t.getStartKey(),a=t.getEndKey(),i=e.getBlockMap(),c=i.toSeq().skipUntil((function(e,t){return t===o})).takeUntil((function(e,t){return t===a})).concat([[a,i.get(a)]]).map((function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)}));return i=i.merge(c),e.merge({blockMap:i,selectionBefore:t,selectionAfter:t})}},function(e,t,n){"use strict";var r=/\r\n?|\n/g;e.exports=function(e){return e.split(r)}},function(e,t,n){"use strict";var r=n(840),o=n(39),a=n(1258),i=n(839);e.exports=function(e){if(!e._blockSelectEvents&&e._latestEditorState===e.props.editorState){var t=e.props.editorState,n=o.findDOMNode(e.editorContainer);n||i(!1),n.firstChild instanceof HTMLElement||i(!1);var c=a(t,n.firstChild),s=c.selectionState;s!==t.getSelection()&&(t=c.needsRecovery?r.forceSelection(t,s):r.acceptSelection(t,s),e.update(t))}}},function(e,t,n){"use strict";(function(t){var r=n(1050);e.exports=function(e,n){var o=t.getSelection();return 0===o.rangeCount?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:r(e,n,o.anchorNode,o.anchorOffset,o.focusNode,o.focusOffset)}}).call(this,n(100))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=n(1),i=n(875),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},t.prototype.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),t=i({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e});return a.createElement("div",{className:t},a.createElement("div",{className:i("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},t}(a.Component);e.exports=c},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(866),a=n(850),i=n(1057),c=n(1261),s=n(1262),l=n(839),u=function(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:s(e),entityRanges:c(e,t),data:e.getData().toObject()}},d=function(e,t){var n=t.entityMap,c=[],s={},d={},f=0;return e.getBlockMap().forEach((function(e){e.findEntityRanges((function(e){return null!==e.getEntity()}),(function(t){var r=e.getEntityAt(t),o=i.stringify(r);d[o]||(d[o]=r,n[o]=""+f,f++)})),function(e,t,n,i){if(e instanceof o)n.push(u(e,t));else{e instanceof a||l(!1);var c=e.getParentKey(),s=i[e.getKey()]=r({},u(e,t),{children:[]});c?i[c].children.push(s):n.push(s)}}(e,n,c,s)})),{blocks:c,entityMap:n}};e.exports=function(e){var t={entityMap:{},blocks:[]};return t=function(e,t){var n=t.blocks,r=t.entityMap,o={};return Object.keys(r).forEach((function(t,n){var r=e.getEntity(i.unstringify(t));o[n]={type:r.getType(),mutability:r.getMutability(),data:r.getData()}})),{blocks:n,entityMap:o}}(e,t=d(e,t))}},function(e,t,n){"use strict";var r=n(1057),o=n(867).strlen;e.exports=function(e,t){var n=[];return e.findEntityRanges((function(e){return!!e.getEntity()}),(function(a,i){var c=e.getText(),s=e.getEntityAt(a);n.push({offset:o(c.slice(0,a)),length:o(c.slice(a,i)),key:Number(t[r.stringify(s)])})})),n}},function(e,t,n){"use strict";var r=n(867),o=n(896),a=function(e,t){return e===t},i=function(e){return!!e},c=[];e.exports=function(e){var t=e.getCharacterList().map((function(e){return e.getStyle()})).toList(),n=t.flatten().toSet().map((function(n){return function(e,t,n){var c=[],s=t.map((function(e){return e.has(n)})).toList();return o(s,a,i,(function(t,o){var a=e.getText();c.push({offset:r.strlen(a.slice(0,t)),length:r.strlen(a.slice(t,o)),style:n})})),c}(e,t,n)}));return Array.prototype.concat.apply(c,n.toJS())}},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(866),a=n(850),i=n(963),c=n(929),s=n(861),l=n(1264),u=n(838),d=n(874),f=n(1265),p=n(1266),h=n(1267),b=n(860),m=n(839),v=s.draft_tree_data_support,g=u.List,y=u.Map,O=u.OrderedMap,j=function(e,t){var n=e.key,r=e.type,o=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||b(),data:y(o),characterList:w(e,t)}},w=function(e,t){var n=e.text,o=e.entityRanges,a=e.inlineStyleRanges,i=o||[];return f(h(n,a||[]),p(n,i.filter((function(e){return t.hasOwnProperty(e.key)})).map((function(e){return r({},e,{key:t[e.key]})}))))},C=function(e){return r({},e,{key:e.key||b()})},k=function(e,t,n){var o=t.map((function(e){return r({},e,{parentRef:n})}));return e.concat(o.reverse())},x=function(e,t){var n=Array.isArray(e.blocks[0].children),i=v&&!n?l.fromRawStateToRawTreeState(e).blocks:e.blocks;return v?function(e,t){return e.map(C).reduce((function(n,o,i){Array.isArray(o.children)||m(!1);var c=o.children.map(C),s=new a(r({},j(o,t),{prevSibling:0===i?null:e[i-1].key,nextSibling:i===e.length-1?null:e[i+1].key,children:g(c.map((function(e){return e.key})))}));n=n.set(s.getKey(),s);for(var l=k([],c,s);l.length>0;){var u=l.pop(),d=u.parentRef,f=d.getChildKeys(),p=f.indexOf(u.key),h=Array.isArray(u.children);if(!h){h||m(!1);break}var b=u.children.map(C),v=new a(r({},j(u,t),{parent:d.getKey(),children:g(b.map((function(e){return e.key}))),prevSibling:0===p?null:f.get(p-1),nextSibling:p===f.size-1?null:f.get(p+1)}));n=n.set(v.getKey(),v),l=k(l,b,v)}return n}),O())}(i,t):function(e,t){return O(e.map((function(e){var n=new o(j(e,t));return[n.getKey(),n]})))}(n?l.fromRawTreeStateToRawState(e).blocks:i,t)};e.exports=function(e){Array.isArray(e.blocks)||m(!1);var t=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach((function(e){var r=t[e],o=r.type,a=r.mutability,i=r.data;n[e]=c.__create(o,a,i||{})})),n}(e),n=x(e,t),r=n.isEmpty()?new d:d.createEmpty(n.first().getKey());return new i({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})}},function(e,t,n){"use strict";var r=n(91)||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(839),a=function(e){if(!e||!e.type)return!1;var t=e.type;return"unordered-list-item"===t||"ordered-list-item"===t},i={fromRawTreeStateToRawState:function(e){var t=e.blocks,n=[];return Array.isArray(t)||o(!1),Array.isArray(t)&&t.length?(function(e,t){for(var n=[].concat(e).reverse();n.length;){var r=n.pop();t(r);var a=r.children;Array.isArray(a)||o(!1),n=n.concat([].concat(a.reverse()))}}(t,(function(e){var t=r({},e);a(e)&&(t.depth=t.depth||0,function(e){Array.isArray(e.children)&&(e.children=e.children.map((function(t){return t.type===e.type?r({},t,{depth:(e.depth||0)+1}):t})))}(e)),delete t.children,n.push(t)})),e.blocks=n,r({},e,{blocks:n})):e},fromRawStateToRawTreeState:function(e){var t={},n=[];return e.blocks.forEach((function(e){var i=a(e),c=e.depth||0,s=r({},e,{children:[]});if(!i)return t={},void n.push(s);if(t[c]=s,c>0){var l=t[c-1];return l||o(!1),void l.children.push(s)}n.push(s)})),r({},e,{blocks:n})}};e.exports=i},function(e,t,n){"use strict";var r=n(847),o=n(838).List;e.exports=function(e,t){var n=e.map((function(e,n){var o=t[n];return r.create({style:e,entity:o})}));return o(n)}},function(e,t,n){"use strict";var r=n(867).substr;e.exports=function(e,t){var n=Array(e.length).fill(null);return t&&t.forEach((function(t){for(var o=r(e,0,t.offset).length,a=o+r(e,t.offset,t.length).length,i=o;i<a;i++)n[i]=t.key})),n}},function(e,t,n){"use strict";var r=n(838).OrderedSet,o=n(867).substr,a=r();e.exports=function(e,t){var n=Array(e.length).fill(a);return t&&t.forEach((function(t){for(var r=o(e,0,t.offset).length,a=r+o(e,t.offset,t.length).length;r<a;)n[r]=n[r].add(t.style),r++})),n}},function(e,t,n){"use strict";var r=n(1269);e.exports=function(e){var t=e.getSelection();if(!t.rangeCount)return null;var n=t.getRangeAt(0),o=r(n),a=o.top,i=o.right,c=o.bottom,s=o.left;return 0===a&&0===i&&0===c&&0===s?null:o}},function(e,t,n){"use strict";var r=n(1049);e.exports=function(e){var t=r(e),n=0,o=0,a=0,i=0;if(t.length){if(t.length>1&&0===t[0].width){var c=t[1];n=c.top,o=c.right,a=c.bottom,i=c.left}else{var s=t[0];n=s.top,o=s.right,a=s.bottom,i=s.left}for(var l=1;l<t.length;l++){var u=t[l];0!==u.height&&0!==u.width&&(n=Math.min(n,u.top),o=Math.max(o,u.right),a=Math.max(a,u.bottom),i=Math.min(i,u.left))}}return{top:n,right:o,bottom:a,left:i,width:o-i,height:a-n}}},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(e){return o.a.createElement(a.a,i({fill:"currentColor"},e),o.a.createElement("path",{d:"M4 6a2 2 0 0 1 2-2h5.75a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-5.5a.25.25 0 0 0-.25.25v11.5c0 .138.112.25.25.25h11.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6z",fillRule:"evenodd",clipRule:"evenodd"}),o.a.createElement("path",{d:"M18.293 1.293a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-10 10A1 1 0 0 1 12 16H9a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707l10-10zm-8.22 11.048a.25.25 0 0 0-.073.177v1.232c0 .138.112.25.25.25h1.232a.25.25 0 0 0 .177-.073l8.75-8.75a.25.25 0 0 0 0-.354l-1.232-1.232a.25.25 0 0 0-.354 0l-8.75 8.75z",fillRule:"evenodd",clipRule:"evenodd"}))};c.defaultProps={name:"EditSurround"},t.a=c},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12 13L8.285 9.218a.758.758 0 0 0-1.064 0 .738.738 0 0 0 0 1.052l4.249 4.512a.758.758 0 0 0 1.064 0l4.246-4.512a.738.738 0 0 0 0-1.052.757.757 0 0 0-1.063 0L12.002 13z",fillRule:"evenodd"}))};i.defaultProps={name:"ArrowDown"},t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(136),a=n(27),i=n(1307),c={Question:"8413324000",Analytics:"0513324000"};t.b=function(e){var t=Object(a.useDispatch)(),n=Object(a.useSelector)((function(t){return Object(o.Sb)(t,e)})),c=Object(i.a)(["isCreator"]).isCreator;return Object(r.useEffect)((function(){c&&t(Object(o.z)(e))}),[t,e,c]),n}},function(e,t,n){"use strict";var r=n(1),o=n(589),a="element",i="text",c="empty",s="fragment",l=function(e,t){return function e(n){var o,l=n.node;return n.type=(o=l,r.isValidElement(o)?a:function(e){return"string"==typeof e||"number"==typeof e}(o)?i:function(e){return null==e||"boolean"==typeof e}(o)?c:Array.isArray(o)?s:void 0),n.type===a?n.children=r.Children.map(l.props.children,(function(t){return e({node:t,parent:n})})):n.type===s&&(n.children=r.Children.map(l,(function(t){return e({node:t,parent:n})}))),t(n),n}({node:e,parent:null})},u=function e(t,n){return[t].concat(null==(r=n(t))?[]:function(t){return e(t,n)}(r));var r},d=function(e){var t=!1;return e.reduce((function(e,n){if(e&&n&&o(String(e.node),String(n.node))){var r=(c=n,s=u(e,(function(e){return e.parent})),l=u(c,(function(e){return e.parent})),d=s.findIndex((function(e){return l.includes(e)})),[s[d],s[d-1]]);i=r[1],(a=r[0]).children.splice(a.children.indexOf(i)+1,0,{node:" "}),t=!0}var a,i,c,s,l,d;return n})),t},f=function(e){if(!e)return null;var t=[],n=l(e,(function(e){e.type===i&&""!==e.node&&t.push(e)}));return t.length&&d(t)?function e(t){return Array.isArray(t.children)?t.type===s?r.Children.map(t.children.map(e),(function(e){return e})):r.createElement(t.node.type,t.node.props,r.Children.map(t.children.map(e),(function(e){return e}))):t.node}(n):e},p=function(e){var t=e.component,n=e.children;return r.createElement(t,{children:f(n)})};p.defaultProps={component:r.Fragment||"span"},t.CJKSpace=p},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return m}));var r=n(7),o=n(208),a=n.n(o),i=n(37),c=n.n(i),s=n(261),l=n(103),u=n(85),d=Object(s.a)("DraftOutline"),f=function(e){return e.map((function(e){var t=e.musicId,n=e.categoryId,r=e.originDuration,o=e.volume,i=e.isMine;return a()({id:t,volume:o,duration:r,categoryId:n,source:i?"member_upload":"qqmusic"})}))},p=function(e){var t=Object(l.x)(e),n=Object(l.b)(e),r=Object(l.gb)(e);return t.map((function(e){var t=e.materialId,o=e.assetUrl,i=e.materialType,c=e.isEmptySlot,s=e.coverAudioIndex,l=s.startIndex,d=s.endIndex;return{media:c?[]:[a()({id:t,url:o,type:i===u.b.VIDEO?"video":"static"})],sentences:n.slice(l,d+1).map((function(e){var t=e.text,n=e.voiceOver,o=null==r?void 0:r[null==n?void 0:n.id];return{sentence:t,reader:{type:o?"video"===o.type?"record_video":"record":"ai",speed:(null==o?void 0:o.playbackRate)||1}}}))}}))},h=function(e){return"vessay_outline:".concat(e)},b=function(e,t){return c.a.set(h(e),function(e){var t=e.vessay,n=t.common,o=n.draftId,a=n.source,i=a.type,c=a.id,s=t.track.trackData.musicTrack,l=Object(r.decamelizeKeys)({data:p(e),extra:{draftId:o},source:{type:"".concat(i,"s"),id:c},backgroundMusics:f(s)});return d(l),l}(t))},m=function(e){var t=h(e),n=c.a.get(h(e));return c.a.delete(t),n}},,function(e,t,n){e.exports=n.p+"assets/background_blue.dc578fa3.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n.n(r),a=n(131),i=Object.assign;var c=function(e){return o.a.createElement(a.a,i({width:"1.2em",height:"1.2em",viewBox:"0 0 24 24"},e),o.a.createElement("path",{d:"M19.027 10c.239.01 1.973.138 1.973 2l-.001 8.027c-.009.24-.137 1.973-2 1.973H5.003C3.138 22 3.009 20.266 3 20.027V12c0-1.862 1.733-1.99 1.972-2zm-8.481 3.004c-.475-.277-.86-.064-.86.5V18.5c0 .553.394.773.86.5l4.278-2.496c.475-.277.466-.731 0-1.003zM18 2a2 2 0 012 2v1.134a1 1 0 011.207 1.573l-1.5 1.5a1 1 0 01-1.414 0l-1.5-1.5A1 1 0 0118 5.134V4h-2a1 1 0 110-2h2zm-8 4a1 1 0 010 2H4a1 1 0 110-2h6zm2-4a1 1 0 010 2H4a1 1 0 110-2h8z",fillRule:"evenodd"}))}},function(e,t,n){"use strict";function r(e,t){return"https://www.zhihu.com/vessay/editor?type=".concat(e,"&id=").concat(t)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n.n(l),d=n(27),f=n(3),p=n.n(f),h=n(11),b=n.n(h),m=n(19),v=n(375),g=n(368),y=n(137),O=n(1167),j=n(43),w=n(31),C=n(73),k=n(78),x=n(373),S=n(60),E="3d198a56310c02c4a83efb9f4a4c027e",R=["https://www.zhihu.com/staffService/"+E];var T=Object(l.createContext)({showModal:!1,setShowModal:function(){return null}});function A(e){var t=e.item,n=e.selected,r=e.onClick,o=Object(k.c)((function(){return r(t)}));return Object(s.b)(w.c,{label:t.name,color:n?w.a.Blue:w.a.Grey,preset:w.b.Secondary,css:{marginRight:"8px"},onClick:o},t.id)}function N(e){var t=e.senderId,n=e.showModal,r=e.onClose,o=Object(l.useState)([]),a=Object(j.a)(o,2),i=a[0],c=a[1],u=Object(l.useState)(null),f=Object(j.a)(u,2),p=f[0],h=f[1],b=Object(d.useDispatch)(),m=Object(x.b)();Object(l.useEffect)((function(){n&&m("/api/v4/customer_service/question_tag",{ignoreCode:!0}).then((function(e){var t;c((null===(t=e.payload)||void 0===t?void 0:t.data)||[])})).catch((function(){return null}))}),[n,m]);var v=Object(k.c)(Object(k.b)((function(e){m("/api/v4/customer_service/choose_question_tag",{method:"POST",body:{adminId:E,tagId:e.id},ignoreCode:!0}).catch((function(){return null})),b(Object(y.p)({contentType:S.a.text,receiverId:t,data:{text:e.name}})),r(),h(null)}),300)),g=Object(k.c)((function(e){h(e.id),v(e)}));return Object(s.b)(C.b,{css:{width:"694px",".Modal-content":{padding:"0 0 55px 0",marginTop:0}},onClose:r,children:n&&Object(s.c)(s.a,{children:[Object(s.b)("div",{css:function(e){return{padding:"12px 0 10px 20px",fontSize:"20px",lineHeight:"28px",borderBottom:"1px solid "+e.colors.GBK09A,color:e.colors.GBK02A}},children:"选个问题类型,小管家为你解答"}),i.map((function(e){return Object(s.c)(l.Fragment,{children:[Object(s.b)("div",{css:function(e){return{marginTop:"20px",paddingLeft:"20px",fontSize:"15px",lineHeight:"18px",color:e.colors.GBK03A}},children:e.categoryName}),Object(s.b)("div",{css:{marginTop:"16px",paddingLeft:"20px"},children:e.items.map((function(e){return Object(s.b)(A,{item:e,selected:p===e.id,onClick:g},e.id)}))})]},e.categoryId)}))]})})}var _=n(0),I=n(1288),M=n(175),L=n(243),P=n(962),B=n(1007),z=n(241),D=n(1171),F=n(927),U=n(90),V=n(30),q=function(e){var t=e.message,n=Object(l.useRef)(),r=Object(l.useState)(!1),o=Object(j.a)(r,2),a=o[0],i=o[1];return Object(s.b)(U.Text,{ref:n,color:a?"inherit":"primary",css:{cursor:a?"text":"pointer"},onClick:function(){a||(i(!0),V.a.trackEvent(n.current,{action:"Click",id:6880}))},dangerouslySetInnerHTML:{__html:a?t.richText||t.text:t.extraContent}})};var H=function(e){var t=e.message,n=e.senderId,r=e.sendMessage,o=Object(k.c)((function(e){if("A"===e.target.tagName&&e.target.href){var t=e.target.href,o=Object(F.parse)(t.split("?")[1]).message,a=t.match(/www.zhihu.com\/inbox\/([\d\w]+)/);(null==a?void 0:a[1])&&n===a[1]&&(e.preventDefault(),r({contentType:S.a.text,receiverId:n,data:{text:o}}))}}));return Object(s.b)("div",{className:b()("TextMessage",{"TextMessage-sender":"sender"===t.userType,"TextMessage-receiver":"receiver"===t.userType}),children:t.unfriendly&&"sender"===t.userType?Object(s.b)(q,{message:t}):Object(s.b)(U.Text,{onClick:o,dangerouslySetInnerHTML:{__html:t.richText||t.text}})})},K=n(889),Q=n(152);function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var G=function(e){Object(a.a)(n,e);var t=W(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={previewImg:null,imageUrl:e.props.image.url},e.getImageStyle=function(){var t=e.props.image,n=t.width,r=t.height,o=r/n;return r>S.d||n>S.d?o>1?{height:"".concat(S.d,"px"),minWidth:"".concat(S.g,"px")}:o<1?{width:"".concat(S.d,"px"),minHeight:"".concat(S.g,"px"),height:S.d*o}:{height:"".concat(S.d,"px"),width:"".concat(S.d,"px")}:{maxWidth:"".concat(S.d,"px"),maxHeight:"".concat(S.d,"px"),width:n,height:r}},e.isTempUrl=function(e){return e.startsWith("blob")},e.handleImageClick=function(t){var n=e.state.imageUrl;e.isTempUrl(n)||e.setState({previewImg:t.target})},e}return Object(o.a)(n,[{key:"componentDidUpdate",value:function(){var e=this,t=this.props.image.url,n=this.state.imageUrl;t!==n&&Object(Q.loadImage)(t).then((function(){e.setState({imageUrl:t}),URL.revokeObjectURL(n)}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.imageUrl,r=t.previewImg;return Object(s.c)("div",{children:[Object(s.b)("img",{className:b()("ImageMessage",{"ImageMessage--temp":this.isTempUrl(n)}),src:Object(Q.imgUrl)(n,"hd"),onClick:this.handleImageClick,style:this.getImageStyle()}),r&&Object(s.b)(K.a,{className:"ImageMessage-ImageView",img:r,onClose:function(){return e.setState({previewImg:null})}})]})}}]),n}(l.Component);function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}G.propTypes={image:p.a.shape({width:p.a.number,height:p.a.number,url:p.a.string})};var Z=function(e){Object(a.a)(n,e);var t=Y(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props.sticker.url;return Object(s.b)("img",{className:"StickerMessage",src:Object(Q.imgUrl)(e,"xl")})}}]),n}(l.Component);Z.propTypes={sticker:p.a.shape({id:p.a.string,url:p.a.string})};var X=n(7),J=n(942),$=n(232),ee=n(865),te=function(e){var t=e.result,n=e.isInMessage,r=e.onClick,o=t.name,a=t.coverPath,i=void 0===a?"https://i1.wp.com/pic4.zhimg.com/80/v2-231f5c4e7db8b6c08493a220be85705e_hd.png?ssl=1":a,c=t.className,s=void 0===c?"":c,l=t.intro;return u.a.createElement("div",{className:b()("KfeCollection-MessageEventCard",s,{"KfeCollection-MessageEventCard--InMessage":n}),onClick:r},u.a.createElement("img",{src:i,className:"KfeCollection-MessageEventCard-cover"}),u.a.createElement("div",{className:"KfeCollection-MessageEventCard-content"},u.a.createElement("div",{className:"KfeCollection-MessageEventCard-title"},o),u.a.createElement("div",{className:"KfeCollection-MessageEventCard-text"},l)))},ne=function(e){var t=e.result,n=e.onClick,r=e.isInMessage,o=void 0!==r&&r,a=e.hasClickZA,i=void 0===a||a,c=t.token,s=t.id;return u.a.createElement($.b,{block:"EcomMessageEventCard",content:{type:ee.e.event,id:s}},u.a.createElement($.e,{shouldTrackClick:i,zaType:"Card",zaAction:"Unknown",zaText:"留资卡片",zaEventType:"Unknown",onClick:function(e){i&&V.a.trackEvent(e.target,{id:o?9970:10048,action:"Click",name:"留资卡片"}),n(c)}},u.a.createElement(J.a,{options:[{},o?{card:{content:{id:String(s)}}}:{},{id:o?9968:10046,name:"留资卡片"}]},u.a.createElement(te,{result:t,isInMessage:o}))))};ne.propTypes={className:p.a.string,result:p.a.object.isRequired,extra:p.a.shape({ua:p.a.object,theme:p.a.string}).isRequired};var re=ne,oe=n(55),ae=n.n(oe),ie=n(128),ce=n(588);function se(){return(se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function le(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ue,de=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(ue=ce.props)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(ue)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}(),["sx","variant"]),fe=new RegExp("^(".concat(de.join("|"),")$")),pe=/^m[trblxy]?$/,he=function(e){return function(t){var n={};for(var r in t)e(r||"")&&(n[r]=t[r]);return n}},be=he((function(e){return fe.test(e)})),me=he((function(e){return pe.test(e)})),ve=he((function(e){return!pe.test(e)})),ge=function(e){e.size;var t=le(e,["size"]);return u.a.createElement(ie.Box,se({as:"svg",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentcolor"},t))},ye=(Object(l.forwardRef)((function(e,t){return u.a.createElement(ie.Flex,se({ref:t,as:"label",tx:"forms",variant:"label"},e,{__css:{width:"100%"}}))})),Object(l.forwardRef)((function(e,t){return u.a.createElement(ie.Box,se({ref:t,as:"input",type:"text",tx:"forms",variant:"input"},e,{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}}))}))),Oe=function(e){return u.a.createElement(ge,e,u.a.createElement("path",{d:"M7 10l5 5 5-5z"}))},je=(Object(l.forwardRef)((function(e,t){return u.a.createElement(ie.Flex,me(e),u.a.createElement(ie.Box,se({ref:t,as:"select",tx:"forms",variant:"select"},ve(e),{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}})),u.a.createElement(Oe,{sx:{ml:-28,alignSelf:"center",pointerEvents:"none"}}))})),Object(l.forwardRef)((function(e,t){return u.a.createElement(ie.Box,se({ref:t,as:"textarea",tx:"forms",variant:"textarea"},e,{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}}))})),function(e){return u.a.createElement(ge,e,u.a.createElement("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))}),we=function(e){return u.a.createElement(ge,e,u.a.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},Ce=function(e){return u.a.createElement(u.a.Fragment,null,u.a.createElement(je,se({},e,{__css:{display:"none","input:checked ~ &":{display:"block"}}})),u.a.createElement(we,se({},e,{__css:{display:"block","input:checked ~ &":{display:"none"}}})))},ke=(Object(l.forwardRef)((function(e,t){var n=e.className,r=e.sx,o=e.variant,a=void 0===o?"radio":o,i=le(e,["className","sx","variant"]);return u.a.createElement(ie.Box,null,u.a.createElement(ie.Box,se({ref:t,as:"input",type:"radio"},i,{sx:{position:"absolute",opacity:0,zIndex:-1,width:1,height:1,overflow:"hidden"}})),u.a.createElement(ie.Box,se({as:Ce,"aria-hidden":"true",tx:"forms",variant:a,className:n,sx:r},be(i),{__css:{mr:2,borderRadius:9999,color:"gray","input:checked ~ &":{color:"primary"},"input:focus ~ &":{bg:"highlight"}}})))})),function(e){return u.a.createElement(ge,e,u.a.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))}),xe=function(e){return u.a.createElement(ge,e,u.a.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}))},Se=function(e){return u.a.createElement(u.a.Fragment,null,u.a.createElement(ke,se({},e,{__css:{display:"none","input:checked ~ &":{display:"block"}}})),u.a.createElement(xe,se({},e,{__css:{display:"block","input:checked ~ &":{display:"none"}}})))},Ee=(Object(l.forwardRef)((function(e,t){var n=e.className,r=e.sx,o=e.variant,a=void 0===o?"checkbox":o,i=le(e,["className","sx","variant"]);return u.a.createElement(ie.Box,null,u.a.createElement(ie.Box,se({ref:t,as:"input",type:"checkbox"},i,{sx:{position:"absolute",opacity:0,zIndex:-1,width:1,height:1,overflow:"hidden"}})),u.a.createElement(ie.Box,se({as:Se,"aria-hidden":"true",tx:"forms",variant:a,className:n,sx:r},be(i),{__css:{mr:2,borderRadius:4,color:"gray","input:checked ~ &":{color:"primary"},"input:focus ~ &":{color:"primary",bg:"highlight"}}})))})),Object(l.forwardRef)((function(e,t){var n=se({},e);return u.a.createElement(ie.Box,se({ref:t,as:"input",type:"range",tx:"forms",variant:"slider"},n,{__css:{display:"block",width:"100%",height:4,my:2,cursor:"pointer",appearance:"none",borderRadius:9999,color:"inherit",bg:"gray",":focus":{outline:"none",color:"primary"},"&::-webkit-slider-thumb":{appearance:"none",width:16,height:16,bg:"currentcolor",border:0,borderRadius:9999,variant:"forms.slider.thumb"}}}))})),Object(l.forwardRef)((function(e,t){var n=e.checked,r=le(e,["checked"]);return u.a.createElement(ie.Box,se({ref:t,as:"button",type:"button",role:"switch",tx:"forms",variant:"switch","aria-checked":n},r,{__css:{appearance:"none",m:0,p:0,width:40,height:24,color:"primary",bg:"transparent",border:"1px solid",borderColor:"primary",borderRadius:9999,"&[aria-checked=true]":{bg:"primary"},":focus":{outline:"none",boxShadow:"0 0 0 2px"}}}),u.a.createElement(ie.Box,{"aria-hidden":!0,style:{transform:n?"translateX(16px)":"translateX(0)"},sx:{mt:"-1px",ml:"-1px",width:24,height:24,borderRadius:9999,border:"1px solid",borderColor:"primary",bg:"background",transitionProperty:"transform",transitionTimingFunction:"ease-out",transitionDuration:"0.1s",variant:"forms.switch.thumb"}}))})),function(e){var t=e.className,n=void 0===t?"":t,r=e.eventData,o=e.onClose,a=e.onSubmit,i=e.extra,c=r.token,s=r.name,d=r.intro,f=r.submitText,p=i.originPhone,h=Object(l.useState)(p),m=ae()(h,2),v=m[0],g=m[1],y=function(e){V.a.trackEvent(e.target,{id:9972,action:"Submit"}),a({token:c,phone:v})};return u.a.createElement($.b,{block:"EcomMessageEventModal",content:{type:ee.e.event}},u.a.createElement($.e,{zaText:"留资卡片",zaType:"Popup"},u.a.createElement(J.a,{options:[{},{},{id:9971,name:"留资卡片"}]},u.a.createElement(C.b,{title:s,onClose:o,className:b()("KfeCollection-MessageEventModal",n),key:c},u.a.createElement("div",{className:"KfeCollection-MessageEventModal-intro"},d),u.a.createElement(ye,{className:"KfeCollection-MessageEventModal-phone",placeholder:"点击输入用户手机号码",value:v,onChange:function(e){g(e.target.value)},fontSize:"14px",color:"GBK02A",width:"100%"}),u.a.createElement("div",{className:"KfeCollection-MessageEventModal-buttonGroup"},u.a.createElement($.a,{zaType:"Button",zaAction:"Unknown",zaText:"取消",onClick:function(e){V.a.trackEvent(e.target,{id:9972,action:"Cancel"}),o()}},u.a.createElement(w.c,{className:"KfeCollection-MessageEventModal-cancelButton"},"取消")),v?u.a.createElement($.a,{zaType:"Button",zaAction:"Unknown",zaText:f||"确认报名"},u.a.createElement(w.c,{onClick:y,preset:w.b.Primary,color:w.a.Blue,type:"submit"},f||"确认报名")):u.a.createElement(w.c,{onClick:y,disabled:!v,preset:w.b.Primary,color:w.a.Blue,type:"submit"},f||"确认报名"))))))});Ee.propTypes={className:p.a.string,eventData:p.a.object.isRequired,extra:p.a.shape({ua:p.a.object,theme:p.a.string,originPhone:p.a.any}).isRequired,onClose:p.a.func,onSubmit:p.a.func};var Re=Ee,Te=n(1102),Ae=n(25),Ne=function(e){var t=e.senderId,n=e.message,r=e.isEcomMerchant,o=Object(d.useDispatch)(),a=Object(d.useSelector)((function(e){var t;return null===(t=e.account.accountInfo)||void 0===t?void 0:t.phoneNo})),i=Object(l.useState)({}),c=Object(j.a)(i,2),u=c[0],f=c[1],p=Object(l.useState)(!1),h=Object(j.a)(p,2),b=h[0],m=h[1],v=Object(l.useMemo)((function(){return Object(X.camelizeKeys)(n)}),[n]),g=v.ecomCard,O=void 0===g?{}:g,w=Object(l.useMemo)((function(){return function(e){var t,n=e.data,r=void 0===n?{}:n,o=e.title;return{cardData:Object.assign({},r,{name:r.name||o,coverPath:r.cover}),sendModalData:Object.assign({},r,{name:r.name||o,submitText:null==r||null===(t=r.formFields)||void 0===t?void 0:t.submitText})}}(O)}),[O]),C=function(){m(!1)};return Object(s.c)(s.a,{children:[1===O.cardType&&Object(s.b)(re,{result:Object.assign({},w.cardData,{id:v.id}),extra:{},isInMessage:!0,hasClickZA:!r||r&&"sender"===n.userType,onClick:function(){return e={type:"event",info:w.sendModalData,camelMessage:v},t=e.info,void(r&&"receiver"===n.userType?o(Object(Ae.h)("商家不能参与自己发起的活动哦")):(f(Object.assign({},t)),m(!0)));var e,t}}),2===O.cardType&&Object(s.b)(H,{message:Object.assign({},n,{text:"web 上暂不支持优惠券消息,请至 app 查看"})}),b&&Object(s.b)(Re,{eventData:u,extra:{originPhone:a},onSubmit:function(e){return function(e){var n=e.cardType,r=e.modalData;if(1===n){var a=r.token,i=r.phone,c={receiverId:t,phone:i};o(Object(y.o)({contentType:"ecomcard",token:a,data:c})).then((function(){C()})).catch(Te.a)}}({cardType:1,modalData:e})},onClose:C})]})},_e=n(366),Ie=function(e){return new RegExp(/https:\/\/www.zhihu.com\/inbox\/+[\s\S]*?is_ecom=1/).test(e)};var Me=function(e){var t=e.senderId,n=e.message,r=e.isEcomMerchant,o=void 0!==r&&r,a=Object(d.useDispatch)(),i=Object($.i)().trackEvent,c=Object(l.useState)(""),u=Object(j.a)(c,2),f=u[0],p=u[1],h=Object(k.c)((function(e){if(!e)return"";var t=(new DOMParser).parseFromString(e,"text/html"),n=t.querySelectorAll("a");if(!n.length)return"";n.forEach((function(e){Ie(e.href)&&e.setAttribute("data-za-not-track-link",!0)})),p(t.querySelector("body").innerHTML)}));Object(l.useEffect)((function(){h(n.richText||n.text)}),[h,n]);var m=Object(k.c)((function(e){var r,c,s,l,u=e.target,d=u.tagName,f=u.href;if("A"===d){if(f&&!Ie(f))return;if(e.stopPropagation(),e.preventDefault(),o&&"receiver"===n.userType)return void a(Object(Ae.h)("您不可以点击自己的卡片哦"));V.a.trackEvent(e.target,{id:9969,action:"Click",name:"欢迎语卡片"},{module:[{card:{content:{type:"Message",id:String(n.id)}}}]}),i({block:"EcomWelcome",action:"Unknown",eventType:"Click",elementLocation:{type:"Text",content:{type:"Message",id:n.id}}}),r=e,s=n.id,l=n.contentType,a(Object(y.p)({contentType:l,receiverId:t,data:(c={},Object(_.a)(c,l,n[l]),Object(_.a)(c,"text",r.target.text||"问题等待配置"),c),tempMessageId:s}))}}));return Object(s.b)("div",{className:b()("TextMessage","EcomWelcomeTextMessage",{"TextMessage-sender":"sender"===n.userType,"TextMessage-receiver":"receiver"===n.userType}),children:Object(s.b)($.b,{block:"MessageEcomWelcomeCard",content:{type:"Message",id:n.id},children:Object(s.b)($.e,{zaType:"Card",zaAction:"Unknown",zaText:"交付欢迎语卡片",zaEventType:"Unknown",onClick:m,children:Object(s.b)(_e.a,{trackCardShow:!0,view:{id:9968,name:"欢迎语卡片"},extra:{module:[{card:{content:{id:String(n.id)}}}]},children:Object(s.b)(U.Text,{dangerouslySetInnerHTML:{__html:f}})})})})})},Le=n(176),Pe=function(e){return(new Date).getTime()-Number(e)<864e5?Object(Le.toSmartString)(e):Object(Le.toAbsoluteDateTimeString)(e)},Be=function(e){var t=e.time;if(!t)return null;var n=new Date(t);return Object(s.b)("time",{dateTime:n.toISOString(),children:Pe(n)})},ze=Object(l.memo)(Be),De=function(e){var t=e.message,n=e.onRequestReport,r=e.onRequestBlock,o=Object(l.useRef)(),a=Object(l.useContext)(T),i=a.showModal,c=a.setShowModal;return Object(s.b)(U.Text,{ref:o,m:"20px auto",p:"10px 12px",bg:"GBK10A",color:"GBK07A",maxWidth:388,minHeight:40,fontSize:12,sx:{lineHeight:"20px",borderRadius:"8px",a:{color:"primary"}},dangerouslySetInnerHTML:{__html:Object(l.useMemo)((function(){return t.text.replace("https://www.zhihu.com/report?report_location=1","#report").replace("http://www.zhihu.com/defriend","#block")}),[t.text])},onClick:function(e){var t=e.target.href;t&&(e.preventDefault(),n&&t.endsWith("#report")?(n(),V.a.trackEvent(o.current,{action:"Click",id:6882})):r&&t.endsWith("#block")?(r(),V.a.trackEvent(o.current,{action:"Click",id:6883})):!function(e){return R.includes(e)}(t)?window.open(t,"_blank"):i||c(!0))}})},Fe=n(1178);function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var Ve=function(e){Object(a.a)(n,e);var t=Ue(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).ref=Object(l.createRef)(),e.state={isMoreActionMenuShow:!1,isReportModalShow:!1,isShieldUserModalShown:!1},e.handleDocClick=function(t){e.state.isMoreActionMenuShow&&e.ref.current&&!e.ref.current.contains(t.target)&&(t.stopPropagation(),t.preventDefault(),e.setState({isMoreActionMenuShow:!1}))},e.toggleMoreActionMenu=function(){e.setState({isMoreActionMenuShow:!e.state.isMoreActionMenuShow})},e.handleMessageDelete=function(){var t=e.props,n=t.deleteMessage,r=t.message.id,o=t.sender.id;M.a.confirm(Object(s.b)("div",{style:{textAlign:"center"},children:"是否删除该条消息"}),{title:"删除消息"}).then((function(){return n(r,o)}),(function(){}))},e.handleReSendMessage=function(){var t=e.props,n=t.deleteLocalMessage,r=t.sender.id,o=t.sendMessage,a=t.message,i=a.id,c=a.contentType;if(c!==S.a.ecomcard)if(c!==S.a.image)n(i,r),o({contentType:c,receiverId:r,data:Object(_.a)({},c,a[c]),tempMessageId:i});else{var s=a.image.url;if(s.startsWith("blob")){var l=a.file,u=e.props,d=u.uploadImage,f=u.setImageSendFailure,p=i;d(l).then((function(e){return o({contentType:S.a.image,receiverId:r,data:{image:{height:e.payload.dataRawheight,width:e.payload.dataRawwidth,url:e.payload.src}},tempMessageId:p})})).then((function(){URL.revokeObjectURL(s)})).catch((function(){f({tempMessageId:p,receiverId:r,file:l})}))}else o({contentType:c,receiverId:r,data:Object(_.a)({},c,a[c]),tempMessageId:i})}},e.handleReSendIconClick=function(){M.a.confirm(null,{title:"是否重新发送消息"}).then((function(){e.handleReSendMessage()}),(function(){}))},e.renderMessage=function(t){var n=e.props,r=n.sender.id,o=n.isEcomMerchant,a=n.sendMessage,i=t.isEcomWelcomeCard;return t.contentType===S.a.text?i?Object(s.b)(Me,{senderId:r,message:t,isEcomMerchant:o}):Object(s.b)(H,{message:t,senderId:r,sendMessage:a}):t.contentType===S.a.image?Object(s.b)(G,{image:t.image}):t.contentType===S.a.sticker?Object(s.b)(Z,{sticker:t.sticker}):t.contentType===S.a.ecomcard?Object(s.b)(Ne,{senderId:r,message:t,isEcomMerchant:o}):"web 上暂不支持此类消息,请至 app 查看"},e.toggleReportModal=function(){e.setState({isReportModalShow:!e.state.isReportModalShow})},e.renderMessageStatus=function(t){if(t===S.e.success){var n=e.state.isMoreActionMenuShow,r="receiver"===e.props.message.userType;return Object(s.b)("div",{className:"Message-status--wrapper",children:Object(s.b)(Fe.a,{ref:e.ref,isOpen:n,onToggleMenu:e.toggleMoreActionMenu,onDeleteClick:e.handleMessageDelete,onReportClick:e.toggleReportModal,showReport:!r})})}return t===S.e.loading?Object(s.b)(B.a,{className:"Message-status--loading"}):t===S.e.failure?Object(s.b)(I.a,{className:"Message-status--failure",onClick:e.handleReSendIconClick}):null},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleDocClick)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleDocClick)}},{key:"render",value:function(){var e=this,t=this.props,n=t.message,r=t.sender,o=t.receiver,a=n.type,i=n.userType,c=n.status,l=n.showTime,u=n.createdTime,d=n.id,f=this.state,p=f.isReportModalShow,h=f.isShieldUserModalShown,m=Object(s.b)(s.a,{children:l&&Object(s.b)("p",{className:"Message-time",children:Object(s.b)(ze,{time:u})})});if("risk_tip"===a||"tip"===a)return Object(s.c)(s.a,{children:[m,p&&Object(s.b)(z.a,{type:"message",urlToken:n.associateId,shown:!0,onClose:this.toggleReportModal}),h&&Object(s.b)(D.a,{shown:h,onClose:function(){return e.setState({isShieldUserModalShown:!1})},user:r}),Object(s.b)(De,{message:n,onRequestReport:this.toggleReportModal,onRequestBlock:function(){e.setState({isShieldUserModalShown:!0})}})]});var v="receiver"===i?o:r;return Object(s.c)("div",{className:"Message-wrapper",children:[m,p&&Object(s.b)(z.a,{type:"message",urlToken:d,shown:!0,onClose:this.toggleReportModal}),Object(s.c)("div",{className:b()("Message",{"Message--reverse":"receiver"===i}),children:[Object(s.b)(P.a,{user:v,size:40}),Object(s.c)("div",{className:b()("Message-content",{"Message-content--reverse":"receiver"===i}),children:[this.renderMessage(n),Object(s.b)("div",{className:"Message-status",children:this.renderMessageStatus(c)})]})]})]})}}]),n}(l.Component);Ve.propsTypes={message:p.a.object,sender:p.a.object,receiver:p.a.object};var qe=Object(d.connect)(null,{deleteMessage:y.f,deleteLocalMessage:y.e,sendMessage:y.p,setImageSendFailure:y.q,uploadImage:L.b})(Ve);function He(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var Ke=function(e){Object(a.a)(n,e);var t=He(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={showQuestionTagModal:!1},e.scrollToBottom=function(){e.messageBoxEle.scrollTop=e.messageBoxEle.scrollHeight},e.handleGetHistoryMessage=function(t){var n=e.props,r=n.isLoading,o=n.nextApiUrl,a=n.getHistoryMessages,i=n.senderId,c=n.isEnd;!t||r||c||a({senderId:i,nextApiUrl:o})},e.setShowQuestionTagModal=function(t){return e.setState({showQuestionTagModal:t})},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.getHistoryMessages,n=e.senderId,r=e.messages,o=e.setMessageRead,a=e.sender,i=void 0===a?{}:a;0!==r.length&&i.id?this.scrollToBottom():t({senderId:n}).catch((function(){location.href="//www.zhihu.com/messages"})),o(n)}},{key:"componentDidUpdate",value:function(e){var t=e.messages,n=void 0===t?[]:t,r=this.props,o=r.messages,a=r.setMessageRead,i=r.senderId,c=n[n.length-1]||{},s=o[o.length-1]||{};c.id!==s.id&&(this.scrollToBottom(),"sender"===s.userType&&a(i));var l=e.sender,u=(l=void 0===l?{}:l).id,d=this.props.sender;(d=void 0===d?{}:d).id!==u&&this.scrollToBottom()}},{key:"render",value:function(){var e=this,t=this.props,n=t.messages,r=t.receiver,o=t.sender,a=void 0===o?{}:o,i=t.senderId,c=t.isLoading,l=t.isEcomMerchant,u=this.state.showQuestionTagModal;return a.id?Object(s.c)(T.Provider,{value:{showModal:u,setShowModal:this.setShowQuestionTagModal},children:[Object(s.b)(g.b,{isLoading:c,onLoad:this.handleGetHistoryMessage,placeholder:Object(s.b)(v.a,{className:"MessagesBox-loading"}),isPrevDrained:!1,isDrained:!0,getContainer:function(e){return e},className:"MessagesBox",onRef:function(t){e.messageBoxEle=t},children:n.map((function(e){return Object(s.b)("div",{children:Object(s.b)(qe,{message:e,receiver:r,sender:a,isEcomMerchant:l})},e.tempMessageId||e.id)}))}),Object(s.b)(N,{showModal:u,onClose:function(){return e.setShowQuestionTagModal(!1)},senderId:i})]}):Object(s.b)(v.a,{className:"MessagesBox-loading"})}}]),n}(l.Component);Ke.PropsTypes={senderId:p.a.string};var Qe=Object(m.compose)(Object(d.connect)((function(e,t){var n=t.senderId,r=e.chat.chats[n]||{},o=r.receiver,a=void 0===o?{}:o,i=r.sender,c=void 0===i?{}:i,s=r.messages,l=void 0===s?[]:s,u=r.isLoading,d=void 0!==u&&u,f=r.isEnd;return{receiver:a,sender:c,messages:l,isLoading:d,isEnd:void 0===f||f,nextApiUrl:r.nextApiUrl,isEcomMerchant:(e.chat.chats||{}).isEcomMerchant}}),{getHistoryMessages:y.k,setMessageRead:y.r}),Object(O.a)())(Ke),We=n(34),Ge=n(111),Ye=n.n(Ge),Ze=n(135),Xe=n(242),Je=n(24),$e=n(961),et=n(1380);function tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var nt=function(e){Object(a.a)(n,e);var t=tt(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).checkSize=function(t){var n=e.props.showNotification;if(t.size>1024*Je.R*1024)return n("请上传小于 ".concat(Je.R,"M 的图片。"),"red"),!1},e.sendImage=function(t){var n=t.file;(0,e.props.handleSendImage)(n)},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this,t=this.props.className;return Object(s.b)($e.a,{accept:"image/png,image/jpeg",onRef:function(t){e.uploadInput=t},customUpload:this.sendImage,beforeUpload:this.checkSize,multiple:!0,children:Object(s.b)(et.a,{className:t})})}}]),n}(l.Component);nt.propTypes={senderId:p.a.string,className:p.a.string,handleSendImage:p.a.func};var rt=Object(d.connect)(null,{showNotification:Ae.h})(nt),ot=n(1381),at=n(1103),it=n(1116);function ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var st=function(e){Object(a.a)(n,e);var t=ct(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={isEmoticonsHidden:!0},e.toggleEmoticonPanel=function(){e.setState({isEmoticonsHidden:!e.state.isEmoticonsHidden})},e.handleSelectEmoticon=function(t,n){var r=e.props,o=r.insertEmoji,a=r.handleSendEmoticon;"emoji"===n?o(t.placeholder):a(t),e.toggleEmoticonPanel()},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props.className,t=this.state.isEmoticonsHidden;return Object(s.c)("div",{className:"EmoticonTool",children:[!t&&Object(s.b)("div",{className:"EmoticonTool--mask",onClick:this.toggleEmoticonPanel}),!t&&Object(s.b)(it.a,{className:"EmoticonTool-panel",onSelectEmoticon:this.handleSelectEmoticon}),Object(s.b)(ot.a,{className:b()("EmoticonTool-icon",e),onClick:this.toggleEmoticonPanel})]})}}]),n}(l.Component);st.propTypes={senderId:p.a.string,className:p.a.string};var lt=Object(at.a)()(st),ut=n(4),dt={0:{prefix:null,text:"免费",key:""},1:{prefix:"¥",key:"discountPrice"},2:{prefix:"¥",key:"discountPrice"},3:{suffix:"折",key:"discountRate"}},ft=function(e){var t=e.couponInfo,n=void 0===t?{}:t,r=n.couponType,o=dt[void 0===r?1:r],a=o.text||"discountPrice"===o.key?n[o.key]/100:n[o.key];return u.a.createElement("div",{className:b()("KfeCollection-MessageCouponCard-coupon")},o.prefix&&u.a.createElement("span",{className:b()("KfeCollection-MessageCouponCard-tag","tag-prefix")},o.prefix),a,o.suffix&&u.a.createElement("span",{className:b()("KfeCollection-MessageCouponCard-tag","tag-suffix")},o.suffix))},pt=function(e){var t=e.result,n=e.isInMessage,r=t.title,o=t.description,a=t.className,i=void 0===a?"KfeCollection-MessageCouponCard-orangeCoupon--light":a;return u.a.createElement("div",{className:b()("KfeCollection-MessageCouponCard",i,{"KfeCollection-MessageCouponCard--InMessage":n})},u.a.createElement("div",{className:"KfeCollection-MessageCouponCard-content"},u.a.createElement("div",{className:"KfeCollection-MessageCouponCard-title"},r),u.a.createElement("div",{className:"KfeCollection-MessageCouponCard-text"},o)),u.a.createElement(ft,{couponInfo:t}))},ht=function(e){var t=e.result,n=e.onClick,r=e.isInMessage,o=void 0!==r&&r,a=e.extra.theme,i=void 0===a?"light":a,c=t.id;return u.a.createElement($.b,{block:"EcomMessageCouponCard",content:{type:ee.e.coupon,id:c}},u.a.createElement($.a,{shouldTrackShow:!0,zaType:"Card",zaAction:"Unknown",zaText:"留资卡片",zaEventType:"Unknown",onClick:function(e){V.a.trackEvent(e.target,{id:10049,action:"Click",name:String(c)}),n()}},u.a.createElement(J.a,{options:[{},{},{id:10047,name:String(c)}]},u.a.createElement(pt,{result:t,isInMessage:o,theme:i}))))};ht.propTypes={className:p.a.string,result:p.a.object.isRequired,extra:p.a.shape({ua:p.a.object,theme:p.a.string,styles:p.a.object}).isRequired};var bt=ht,mt=n(255),vt=n(131),gt=Object.assign;var yt=function(e){return u.a.createElement(vt.a,gt({width:"24",height:"24",fill:"none",viewBox:"0 0 26 26"},e),u.a.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z",opacity:".01"}),u.a.createElement("path",{fill:"#646464",d:"M16.875 7.149c.182 1.255-.302 3.01-1.436 5.369-.328.6-.62 1.479-.597 1.768.013.169.08.316.215.448l3.042-3.042a1.626 1.626 0 012.228-.068l.747.742c.611.612.634 1.59.068 2.228l-1.483 1.487c.455.17 1 .51 1.314.982.315.471.532 1.493.532 3.177 0 .663-.532 1.273-1.236 1.273l-6.062-.015c-.25.193-.528.346-.826.453l-2.161.652a.85.85 0 01-.844-.212c-.203-.203-.318-.5-.2-.896-.003.003-6.924.018-6.924.018A1.247 1.247 0 012 20.259l.013-1.49c-.013-.77.13-1.155.314-1.435.181-.274.443-.54.63-.73l.014-.013c.445-.452 1.444-.737 2.777-.98 2.487-.454 2.875-.819 2.915-1.325.01-.131-.162-.851-.548-1.606-1.255-2.444-1.705-3.934-1.49-5.502C6.944 4.827 8.662 3 11.752 3c3.09 0 4.776 1.77 5.122 4.149zm.65 6.886l-5.272 5.282c-.271.332-.678 1.873-.678 1.873s1.582-.41 1.92-.721l5.235-5.229-1.205-1.205zM8.11 7.382C8.391 5.7 9.513 4.506 11.754 4.5c2.241-.005 3.397 1.221 3.635 2.863.129.883-.288 2.394-1.285 4.469-.439.8-.81 1.918-.758 2.57a2.12 2.12 0 00.649 1.393l-2.577 2.582c-.557.62-.79 1.614-.79 1.614l-7.125.02.012-1.334c0-.408.08-.634.36-.873.233-.2.552-.34.877-.439.451-.11.918-.208 1.372-.303 1.016-.214 1.972-.415 2.563-.706.866-.426 1.378-1.061 1.472-1.954.075-.707-.72-2.44-.72-2.44S7.85 8.956 8.111 7.382zm10.34 9.91l-2.713 2.71 4.26.008s-.056-1.624-.213-2.012c-.082-.155-.275-.458-1.335-.707zm.575-4.752a.375.375 0 01.489.036l.71.717a.376.376 0 01-.036.489l-.574.574-1.206-1.206.617-.61z",fillRule:"evenodd",clipRule:"evenodd"}))},Ot=Object.assign;var jt=function(e){return u.a.createElement(vt.a,Ot({width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),u.a.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z",opacity:".01"}),u.a.createElement("path",{fill:"#646464",d:"M3.004 18.5a2.285 2.285 0 002.285 2.284h13.736a2.285 2.285 0 002.285-2.285v-3.732a.763.763 0 00-.759-.846h-.01a1.526 1.526 0 01.01-3.053.763.763 0 00.759-.847V6.29a2.285 2.285 0 00-2.285-2.285H5.289A2.285 2.285 0 003.004 6.29v3.732a.763.763 0 00.759.846h.015a1.526 1.526 0 01-.015 3.053.763.763 0 00-.759.846v3.732zM17.5 12.394c0 1.423.975 2.62 2.293 2.957v3.147a.768.768 0 01-.767.768H5.289a.768.768 0 01-.767-.768v-3.147a3.054 3.054 0 000-5.915V6.29c0-.424.343-.768.767-.768h13.736c.424 0 .767.344.767.768v3.147a3.054 3.054 0 00-2.293 2.958zm-3.807 0a1.535 1.535 0 11-3.07 0 1.535 1.535 0 013.07 0zm1.517 0a3.052 3.052 0 11-6.104 0 3.052 3.052 0 016.104 0z",fillRule:"evenodd",clipRule:"evenodd"}))},wt=n(233),Ct=n.n(wt),kt=n(1067),xt=n.n(kt),St=function(e){var t=e.cardList,n=e.onSend,r=e.onClose,o=e.isEvent,a=o?re:bt;return Object(s.b)(C.b,{title:o?"活动":"优惠券",onClose:r,className:"EcomCardTool-Modal",children:Object(s.b)("ul",{className:"EcomCardTool-Modal--list",children:t.map((function(e,t){return Object(s.b)("li",{className:"EcomCardTool-Modal--cardItem",children:Object(s.b)(a,{result:e,extra:{},onClick:function(){return n(Object.assign({},e,{cardType:o?1:2}))}})},e.token||t)}))})})};St.propTypes={onClose:p.a.func.isRequired,cardList:p.a.array,onSend:p.a.func};var Et=function(e){var t=e.senderId,n=e.className,r=e.isEvent,o=e.onHandleFirstInterActive,a=Object(d.useSelector)((function(e){return e.env.theme})),i=Object(d.useDispatch)(),c=Object(l.useState)(!1),u=Object(j.a)(c,2),f=u[0],p=u[1],h=Object(l.useState)([]),m=Object(j.a)(h,2),v=m[0],g=m[1],O=Object(k.c)((function(){i(Object(y.i)({senderId:t})).then((function(e){var t;return g(null===(t=e.payload)||void 0===t?void 0:t.data)}))})),w=Object(k.c)((function(){i(Object(y.h)()).then((function(e){var t,n,r;return n=null===(t=e.payload)||void 0===t?void 0:t.data,r=!xt()(n)&&n.map((function(e){return Object.assign({},e,{className:1===(null==e?void 0:e.template.id)?"KfeCollection-MessageCouponCard-orangeCoupon--".concat(a):"KfeCollection-MessageCouponCard-blueCoupon--".concat(a),description:e.intro})}))||[],void g(Object(ut.a)(r))}))}));Object(l.useEffect)((function(){r&&O()}),[r,O]),Object(l.useEffect)((function(){r||w()}),[r,w]);var C=r?yt:jt,x=function(e){var n=e.token,r=e.cardType,a=e.id;(function(e){var n=e.token,r=e.cardType;if(o(),1===r){var a=Ye()("TempEventCard_");return i(Object(y.a)(t,a,r)),i(Object(y.n)({contentType:S.a.ecomcard,token:n,data:{receiverId:t,cardType:r},tempMessageId:a}))}return i(Object(y.n)({contentType:S.a.ecomcard,id:n,data:{receiverId:t,cardType:r}}))})({token:n||a,cardType:r}).then((function(){p(!1)})).catch(Ct.a)};return Object(s.b)($.b,{block:"EcomMessageEcomCardTool",content:{type:"Message"},children:Object(s.b)(_e.a,{trackCardShow:!0,view:{id:r?9975:9976,url:"fakeurl://dialogue/user.*"},children:Object(s.c)("div",{className:"EcomCardTool",children:[Object(s.b)($.e,{shouldTrackClick:!0,zaText:r?"留资卡片":"优惠券卡片",zaType:"Button",zaEventType:"Click",children:Object(s.b)(C,{className:b()("EcomCardTool-icon",n),width:22,height:22,onClick:function(e){f||!xt()(v)?(p(!f),Object(mt.a)(e,{id:r?9978:9979,action:"Click"})):i(Object(Ae.h)("请先去 ecom.zhihu.com 配置","red"))}})}),f&&Object(s.b)(St,{isEvent:r,cardList:v,onSend:function(e){return x(e)},onClose:function(){return p(!1)}})]})})})};Et.propTypes={senderId:p.a.string,className:p.a.string,isEvent:p.a.bool,onHandleFirstInterActive:p.a.func};var Rt=Et;function Tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var At=function(e){Object(a.a)(n,e);var t=Tt(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.senderId,n=e.insertEmoji,r=e.handleSendImage,o=e.handleSendEmoticon,a=e.onHandleFirstInterActive,i=e.isEcomMerchant;return Object(s.c)("ul",{className:"ToolBar",children:[Object(s.b)("li",{className:"ToolBar-item",children:Object(s.b)(lt,{className:"ToolBar-Icon",senderId:t,insertEmoji:n,handleSendEmoticon:o})}),Object(s.b)("li",{className:"ToolBar-item",children:Object(s.b)(rt,{className:"ToolBar-Icon",senderId:t,handleSendImage:r})}),i&&Object(s.c)(s.a,{children:[Object(s.b)("li",{className:"ToolBar-item",children:Object(s.b)(Rt,{isEvent:!0,className:"ToolBar-Icon",senderId:t,onHandleFirstInterActive:a},"event")},"event"),Object(s.b)("li",{className:"ToolBar-item",children:Object(s.b)(Rt,{isEvent:!1,className:"ToolBar-Icon",senderId:t,onHandleFirstInterActive:a},"coupon")},"coupon")]})]})}}]),n}(l.Component);At.propTypes={senderId:p.a.string,insertEmoji:p.a.func,handleSendImage:p.a.func,handleSendEmoticon:p.a.func,onHandleFirstInterActive:p.a.func};var Nt=Object(d.connect)((function(e){return{isEcomMerchant:(e.chat.chats||{}).isEcomMerchant}}))(At),_t=function(e){var t=Object(l.useState)(!1),n=Object(j.a)(t,2),r=n[0],o=n[1];return r?null:Object(s.b)(It,Object.assign({},e,{dispose:function(){return o(!0)}}))},It=function(e){var t=e.endSignal,n=void 0!==t&&t,r=e.dispose,o=Object(l.useState)(0),a=Object(j.a)(o,2),i=a[0],c=a[1];Object(l.useEffect)((function(){c(Date.now())}),[]);var s=Object(k.c)((function(e){var t=e-i;t>0&&t<=6e4&&(Object(mt.a)(null,{id:9980,action:"StatusReport"}),null==r||r())}));return Object(l.useEffect)((function(){if(n){var e=Date.now();s(e)}}),[s,n]),Object(k.i)(r,6e4),null};_t.propTypes={endSignal:p.a.bool};var Mt=_t;function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var Pt=function(e){Object(a.a)(n,e);var t=Lt(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={cursorPosition:0,firstInteractive:!1},e.inputRef=Object(l.createRef)(),e.countDownTimer=null,e.handleSetFirsetInteractive=function(){e.setState({firstInteractive:!0})},e.checkSize=function(t){var n=e.props.showNotification;return!(t.size>1024*Je.R*1024)||(n("请上传小于 ".concat(Je.R,"M 的图片。"),"red"),!1)},e.handleKeyDown=function(t){var n=e.props,r=n.inputMessage,o=n.senderId,a=n.inputValue;13===t.keyCode&&(t.ctrlKey||t.metaKey)?r({senderId:o,inputValue:"".concat(a,"\n")}):13!==t.keyCode||t.shiftKey||e.handleSendTextMessage(t)},e.handleSendImage=function(t){var n;if(t&&e.checkSize(t)){var r=e.props,o=r.uploadImage,a=r.sendMessage,i=r.senderId,c=r.addTempImageMessage,s=r.setImageSendFailure,l=Ye()("TempImage_");e.handleSetFirsetInteractive(),Object(Xe.a)(t).then((function(e){var n=URL.createObjectURL(e);Object(Q.loadImage)(n).then((function(r){var u=r.height,d=r.width;c(i,n,l,u,d),o(e).then((function(e){return a({contentType:S.a.image,receiverId:i,data:{image:{height:e.payload.dataRawheight,width:e.payload.dataRawwidth,url:e.payload.src}},tempMessageId:l})})).catch((function(){s({tempMessageId:l,receiverId:i,file:t})}))}))})),null===(n=e.inputRef.current)||void 0===n||n.focus()}},e.handleSendEmoticon=function(t){var n,r=t.id,o=t.dynamicImageUrl,a=t.staticImageUrl,i=t.title,c=e.props,s=c.senderId,l=c.sendMessage;e.handleSetFirsetInteractive(),l({contentType:"sticker",receiverId:s,data:{sticker:{sticker_id:r,url:o||a,title:i}}}),V.a.trackEvent(null,{id:3640,action:"Click",name:i}),null===(n=e.inputRef.current)||void 0===n||n.focus()},e.handleSendTextMessage=function(t){var n=e.props,r=n.senderId,o=n.sendMessage,a=n.inputValue,i=n.location.query,c=i.source_type,s=i.source_id;a.length>1e4?M.a.alert("发送文字不得超过 1 万字,请重新编辑后再次发送",{title:"发送失败"}):a.trim()&&(e.handleSetFirsetInteractive(),t.preventDefault(),o({contentType:S.a.text,receiverId:r,data:{text:a},sourceType:c,sourceId:s}),V.a.trackEvent(null,{id:5309,action:"Click"}))},e.insertEmoji=function(t){var n,r=e.props,o=r.inputMessage,a=r.senderId,i=r.inputValue,c=e.state.cursorPosition,s=[i.slice(0,c),t,i.slice(c)].join("");e.setState({cursorPosition:c+t.length}),o({senderId:a,inputValue:s}),V.a.trackEvent(null,{id:3641,action:"Click",name:t.slice(1,t.length-1)}),null===(n=e.inputRef.current)||void 0===n||n.focus()},e.handleBlur=function(t){e.setState({cursorPosition:t.target.selectionStart})},e.handleInputMessage=function(t){var n=e.props;(0,n.inputMessage)({senderId:n.senderId,inputValue:t.target.value})},e.handleInputRef=function(t){e.inputRef.current=t},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.inputRef.current&&(this.inputRef.current.focus(),this.inputRef.current.addEventListener("keydown",this.handleKeyDown))}},{key:"componentWillUnmount",value:function(){this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"render",value:function(){var e=this.props,t=e.inputValue,n=e.senderId,r=e.sender;return(null==r?void 0:r.isForbidden)?Object(s.b)("div",{className:"InputBox",css:{justifyContent:"flex-end"},children:Object(s.b)("div",{className:"InputBox-footer",children:Object(s.c)("div",{className:"InputBox-footerDesc",css:{textAlign:"center",paddingRight:0},children:["要反馈",Object(s.b)(We.Link,{to:"/messages/3d198a56310c02c4a83efb9f4a4c027e",css:function(e){return{color:e.colors.GBK06A,fontWeight:"bold",paddingLeft:"4px"}},children:"@知乎小管家"})]})})}):Object(s.c)("div",{className:"InputBox",children:[Object(s.b)(Mt,{endSignal:this.state.firstInteractive}),Object(s.b)(Nt,{senderId:n,insertEmoji:this.insertEmoji,handleSendImage:this.handleSendImage,handleSendEmoticon:this.handleSendEmoticon,onHandleFirstInterActive:this.handleSetFirsetInteractive}),Object(s.b)(Ze.a,{multiline:!0,spread:!0,value:t,className:"InputBox-input",onRef:this.handleInputRef,onChange:this.handleInputMessage,onBlur:this.handleBlur}),Object(s.c)("div",{className:"InputBox-footer",children:[Object(s.b)("div",{className:"InputBox-footerDesc",children:"按 Enter 键发送"}),Object(s.b)(w.c,{preset:"primary",color:"blue",className:"InputBox-sendBtn",onClick:this.handleSendTextMessage,disabled:!t.trim(),children:"发送"})]})]})}}]),n}(l.Component);var Bt=Object(m.compose)(We.withRouter,Object(d.connect)((function(e,t){var n=t.senderId,r=(e.chat.chats[n]||{}).inputValue;return{inputValue:void 0===r?"":r}}),{sendMessage:y.p,inputMessage:y.m,uploadImage:L.b,addTempImageMessage:y.b,setImageSendFailure:y.q,showNotification:Ae.h}))(Pt),zt=n(783);function Dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var Ft=function(e){Object(a.a)(n,e);var t=Dt(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={isAlertShow:!0},e.handleCloseAlert=function(){e.setState({isAlertShow:!1})},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.message,n=e.className;return this.state.isAlertShow?Object(s.c)("div",{className:b()("AbnormalAlert",n),children:[Object(s.b)("span",{className:"AbnormalAlert-message",dangerouslySetInnerHTML:{__html:t}}),Object(s.b)(zt.a,{className:"AbnormalAlert-icon",onClick:this.handleCloseAlert})]}):null}}]),n}(l.Component);Ft.propsTypes={message:p.a.object,className:p.a.string};var Ut=n(123),Vt=Object.assign;var qt=function(e){return u.a.createElement(vt.a,Vt({width:"200",height:"88",fill:"none",viewBox:"0 0 200 88"},e),u.a.createElement("path",{fill:"#E3EAF1",d:"M90.78 11.188H52.292v66.743h9.43l1.259 8.04 12.754-8.04H90.78V11.189zM74.51 69.597l-7.488 4.713-.734-4.713h-5.389V19.47h21.186v50.126H74.51zM45.189 41.222H31.193c0-1.473.105-2.98.123-4.557V19.477H47.27v-4.054a4.224 4.224 0 00-1.262-2.99 4.307 4.307 0 00-3.024-1.238H18.072c.088-.277.175-.555.262-.797C19.192 7.834 21.938.002 21.938.002a13.32 13.32 0 00-7.54 2.183c-1.784 1.248-2.851 2.131-4.286 6.082-1.662 4.54-3.114 8.923-4.094 11.54C4.514 23.981.875 31.328.875 31.328a18.295 18.295 0 007.872-1.906c3.5-1.854 5.249-4.696 6.421-9.01l.28-.936h7.295v17.188c0 1.56-.14 3.067-.227 4.557H9.64a8.404 8.404 0 00-5.914 2.426 8.242 8.242 0 00-2.449 5.856h20.399a55.358 55.358 0 01-2.432 11.401 52.49 52.49 0 01-9.412 16.478A103.517 103.517 0 010 86.687s9.78 3.674 16.952-2.98c4.34-4.037 8.223-11.92 10.095-17.898a87.786 87.786 0 003.499-16.34h18.65v-4.28a3.918 3.918 0 00-1.169-2.81 4.022 4.022 0 00-2.838-1.157z"}),u.a.createElement("path",{fill:"#E3EAF1",d:"M35.222 58.361l-7.226 4.661 15.746 23.305a21.572 21.572 0 002.099-6.931 9.843 9.843 0 00-.875-6.775l-9.744-14.26zm125.555-14.01v-29.23a7322.86 7322.86 0 0029.496-1.507l2.659-.156c1.207-1.248 2.764-7.485 2.152-9.443-.228-.78-.665-2.08-1.995-1.733a103.979 103.979 0 01-13.366 2.27c-8.642 1.005-12.403 1.265-24.387 2.131-20.994 1.525-39.713 2.253-39.713 2.253a7.857 7.857 0 00.64 3.114 7.923 7.923 0 001.823 2.617 8.012 8.012 0 002.713 1.697 8.085 8.085 0 003.169.507c7.12-.294 17.494-.78 28.114-1.282v28.762h-39.941c0 2.197.881 4.303 2.449 5.857a8.406 8.406 0 005.914 2.425h31.578v22.11c0 2.772-1.452 3.725-3.849 3.794h-12.247a12.979 12.979 0 002.613 4.826 13.117 13.117 0 004.385 3.335 19.423 19.423 0 008.468.866c4.251-.208 9.272-2.581 9.272-11.158V52.633h35.252c1.067 0 2.091-.42 2.845-1.167A3.965 3.965 0 00200 48.648v-4.297h-39.223z"}),u.a.createElement("path",{fill:"#E3EAF1",d:"M133.169 24.611a7.192 7.192 0 00-2.065-1.914 7.273 7.273 0 00-5.476-.882 7.26 7.26 0 00-2.571 1.167l-1.172.85 13.296 18.279 6.998-5.06-9.01-12.44zm46.048-.617L169.455 36.8l6.997 5.198 14.119-18.522-1.172-.867a7.294 7.294 0 00-8.066-.49 7.196 7.196 0 00-2.116 1.876z"}))};function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var Kt=function(e){Object(a.a)(n,e);var t=Ht(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.senderId,n=e.getEcomProfile;(0,e.getAccountInfo)(),t&&n(t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.senderId,r=e.sender,o=e.warning,a=o.status,i=o.message,c=r||{},l=c.name,u=void 0===l?"":l,d=c.vipInfo,f=((void 0===d?{}:d)||{}).vipIcon;return n?Object(s.c)("div",{className:b()("ChatBox",t),children:[a&&Object(s.b)(Ft,{message:i,className:"ChatBox-alert"}),Object(s.c)("header",{className:"ChatBox-title",children:[Object(s.b)("span",{children:u}),f&&Object(s.b)("img",{src:f.url,className:"ChatBox-titleVipIcon"})]}),Object(s.b)("div",{className:"MessagesBox-wrapper",children:Object(s.b)(Qe,{senderId:n})}),Object(s.b)(Bt,{senderId:n,sender:r})]}):Object(s.b)("div",{className:"ChatBox-empty",children:Object(s.b)(qt,{className:"ChatBox-emptyImage"})})}}]),n}(l.Component);Kt.propTypes={senderId:p.a.string,className:p.a.string};t.a=Object(d.connect)((function(e,t){var n=t.senderId,r=e.chat.chats[n]||{},o=r.receiver,a=void 0===o?{}:o,i=r.sender,c=void 0===i?{}:i,s=r.warning;return{receiver:a,sender:c,warning:void 0===s?{}:s}}),{getAccountInfo:Ut.e,getEcomProfile:y.j})(Kt)},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(4),l=n(2),u=n(1),d=n(27),f=n(68),p=n(394),h=n(390),b=n(323),m=n(3),v=n.n(m),g=n(134),y=n(378),O=n(1013),j=n(31),w=n(365),C=n(859),k=function(e){var t=e.upvotedFollowees,n=e.voteupCount,r=e.actionText,o=e.canClick,a=e.onClick;if(!n)return null;var i=t.length,c=i===n?"":"".concat(Object(w.formatNumber)(n)," 人");return Object(l.c)(O.CJKSpace,{children:[t.map((function(e,t){return Object(l.c)("span",{children:[t>0&&"、",Object(l.b)(C.a,{noBadge:!0,user:e,children:e.name},t)]},t)})),i>0&&n-i>0&&"等",o?Object(l.c)(j.c,{preset:"plain",onClick:a,children:[c,r]}):c+r]})};k.propTypes={voteupCount:v.a.number.isRequired,upvotedFollowees:v.a.array.isRequired,actionText:v.a.string.isRequired,canClick:v.a.bool,onClick:v.a.func},k.defaultProps={voteupCount:0,actionText:"赞了",upvotedFollowees:[]};var x=k,S=n(1136);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var R=function(e){Object(a.a)(n,e);var t=E(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={modalShown:e.props.defaultModalShown},e.handleListHide=function(){return e.setState({modalShown:!1})},e.handleListShown=function(){return e.setState({modalShown:!0})},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.voteupCount,n=e.upvotedFollowees,r=e.openable,o=e.type,a=e.too,i=e.isFetching,c=e.isDrained,s=e.items,u=e.onLoad;if(t<=0)return null;var d,f=this.state.modalShown;return d="pin"===o?"为该".concat(y.b[o],"鼓掌"):"column"===o?"关注":"".concat(a?"也":"","赞同了该").concat(y.b[o]),Object(l.c)("span",{className:"Voters",children:[Object(l.b)(x,{canClick:r,onClick:this.handleListShown,voteupCount:t,upvotedFollowees:n,actionText:d}),Object(l.b)(g.b,{size:"fullPage",onClose:this.handleListHide,children:f&&Object(l.b)(S.a,{isFetching:i,isDrained:c,text:"column"===o?"关注了":"赞同了",items:s,voteupCount:t,onLoad:u})})]})}}]),n}(u.Component);R.propTypes={openable:v.a.bool,upvotedFollowees:v.a.array,id:v.a.oneOfType([v.a.number,v.a.string]),type:v.a.oneOf(["pin","answer","article","column"]).isRequired,defaultModalShown:v.a.bool},R.defaultProps={openable:!0,defaultModalShown:!1};var T=R;function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var N={answer:"answers",article:"articles",pin:"pins",column:"columns"};var _=function(e){Object(a.a)(n,e);var t=A(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleLoad=function(){var t=e.props,n=t.type,r=t.id,o=t.loadAnswerVoters,a=t.loadPinVoters,i=t.loadArticleVoters,c=t.loadColumnsFollowers;switch(n){case"answer":return o(r);case"pin":return a(r);case"article":return i(r);case"column":return c(r);default:return null}},e}return Object(o.a)(n,[{key:"render",value:function(){return Object(l.b)(T,Object.assign({onLoad:this.handleLoad},this.props))}}]),n}(u.Component);_.propsTypes=Object.assign({},T.propsTypes),_.defaultProps=Object.assign({},T.defaultProps);t.a=Object(d.connect)((function(e,t){var n=t.id,r=t.type,o=e.entities.users,a=e[N[r]]||{},i=a.voters,c=void 0===i?{}:i,l=a.concernedUpvoters,u=void 0===l?{}:l,d=c[n]||{isFetching:!1,isDrained:!1,order:"normal",ids:[]},f=d.isFetching,p=d.isDrained,h=d.order,b=d.ids,m=(u[n]||{ids:[]}).ids;return{isFetching:f,isDrained:p,order:h,items:[].concat(Object(s.a)(m),Object(s.a)(b.filter((function(e){return!m.includes(e)})))).map((function(e){return o[e]}))}}),{loadAnswerVoters:f.u,loadArticleVoters:p.e,loadPinVoters:h.f,loadColumnsFollowers:b.c})(_)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return Je})),n.d(t,"b",(function(){return rt})),n.d(t,"c",(function(){return tt})),n.d(t,"d",(function(){return _e})),n.d(t,"e",(function(){return Ie})),n.d(t,"f",(function(){return Le})),n.d(t,"g",(function(){return Xe})),n.d(t,"h",(function(){return it})),n.d(t,"i",(function(){return Ye})),n.d(t,"j",(function(){return Ge})),n.d(t,"k",(function(){return Ne}));var r=n(55),o=n.n(r),a=n(80),i=n.n(a),c=n(1),s=n.n(c),l=n(783),u=n(1290),d=n(1271),f=n(835),p=n(1554),h=n(1564),b=n(18),m=function(e){return s.a.createElement(b.a,e,s.a.createElement("path",{d:"M15.333 19.333l-2.764 2.765a.333.333 0 0 1-.569-.236v-2.529h3.333zm0-13.333c.737 0 1.334.597 1.334 1.333V16A2.667 2.667 0 0 1 14 18.667H7.333A1.333 1.333 0 0 1 6 17.333v-10C6 6.597 6.597 6 7.333 6zm.394-1.987a2.933 2.933 0 0 1 2.93 2.791l.004.142v8.838c0 .693-.53 1.262-1.205 1.327l-.129.006V6.947a1.6 1.6 0 0 0-1.49-1.597l-.11-.004H7.333c0-.736.597-1.333 1.334-1.333h7.06z",fillRule:"evenodd"}))};m.defaultProps={name:"BlueBook"};var v=m,g=n(1464),y=n(793),O=n(1557),j=n(1558),w=n(797),C=n(1559),k=n(1560),x=n(1561),S=n(1562),E=n(1563),R=n(1288),T=n(834),A=n(140),N=n(90),_=n(367),I=n(132),M=n(876),L=n(152),P=n(5),B=n(30),z=n(232),D=n(78),F=n(841),U=n(20),V=n.n(U),q=n(21),H=n.n(q),K=n(22),Q=n.n(K),W=n(23),G=n.n(W),Y=n(13),Z=n.n(Y),X=n(39),J=n(3),$=n.n(J),ee=n(233),te=n.n(ee),ne=n(1313),re=n(1161),oe=n.n(re);function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Z()(e);if(t){var o=Z()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return G()(this,n)}}var ie="top",ce=Object.freeze({__proto__:null,LEFT:"left",RIGHT:"right",TOP:ie,BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right",LEFT_TOP:"left-top",LEFT_BOTTOM:"left-bottom",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom"}),se=[ie,"bottom"],le=["left","right"];function ue(e,t,n,r){var a=r.split("-"),i=o()(a,2),c=i[0],s=i[1],l=function(e){var t=e.top,n=e.bottom,r=e.left,o=e.right;return{top:Math.max(t,0),bottom:Math.min(Math.max(n,0),window.innerHeight),left:Math.max(r,0),right:Math.min(Math.max(o,0),window.innerWidth)}}(t),u={},d={},f=c;if(se.includes(c)){var p,h,b=l.right-n.width,m=l.left;if("left"===s?(p=e.left,h=m):"right"===s?(p=e.right-n.width,h=b):(p=e.left+e.width/2-n.width/2,h=m),d.left=b>m?p<m?m:p<b?p:b:h,e.width<=n.width){var v=e.left+e.width/2;u.left=v-d.left}else u.left=n.width/2;"bottom"===c&&e.bottom+n.height>l.bottom&&e.top-n.height>l.top&&(f=ie),c===ie&&e.bottom+n.height<l.bottom&&e.top-n.height<l.top&&(f="bottom");var g=f===ie?[n.height,e.top-n.height]:[0,e.bottom],y=o()(g,2);u.top=y[0],d.top=y[1]}if(le.includes(c)){var O,j,w=l.bottom-n.height,C=l.top;if(s===ie?(O=e.top,j=C):"bottom"===s?(O=e.bottom-n.height,j=w):(O=e.top+e.height/2-n.height/2,j=C),d.top=w>C?O<C?C:O<w?O:w:j,e.width<=n.width){var k=e.top+e.height/2;u.top=k-d.top}else u.top=n.height/2;"right"===c&&e.right+n.width>l.right&&e.left-n.width>l.left&&(f="left"),"left"===c&&e.right+n.width<l.right&&e.left-n.width<l.left&&(f="right");var x="left"===f?[n.width,e.left-n.width]:[0,e.right],S=o()(x,2);u.left=S[0],d.left=S[1]}return{arrowStyle:u,targetContainerStyle:d,placement:f}}var de=function(e){return Object(P.g)("svg",Object.assign({width:"26",height:"10",viewBox:"0 0 26 10"},e),Object(P.g)("path",{d:"M0 0h26v1c-4.498 0-9 9-13 9S4.5 1 0 1V0z",fillRule:"evenodd"}))},fe={top:{width:"32px",height:"16px",marginTop:"-5px",transform:"translate(-50%, 0)","&::after":{left:"50%",top:"-8px"}},bottom:{width:"32px",height:"16px",marginTop:"3px",transform:"translate(-50%, -100%) rotate(180deg)","&::after":{left:"50%",bottom:"-8px"}},left:{width:"16px",height:"32px",marginLeft:"-5px",transform:"translate(0, -50%) rotate(-90deg)","&::after":{left:"-8px",top:"50%"}},right:{width:"16px",height:"32px",marginLeft:"6px",transform:"translate(-100%, -50%) rotate(90deg)","&::after":{right:"-8px",top:"50%"}}},pe={top:{marginTop:"-16px"},bottom:{marginTop:"16px"},left:{marginLeft:"-16px"},right:{marginRight:"16px"}},he={top:{transformOrigin:"bottom center",marginTop:"-8px"},bottom:{marginTop:"8px"},left:{transformOrigin:"right center",marginLeft:"-16px"},right:{marginLeft:"16px"}},be=s.a.forwardRef((function(e,t){var n=e.withArrow,r=e.arrowStyle,o=e.placement,a=e.fixed,i=e.style,c=e.children,s=Object(I.f)();return Object(P.g)("div",{key:"popoverContent",ref:t,css:Object(A.a)({position:"absolute",background:s.colors.GBK99C,borderRadius:"4px",zIndex:203,boxShadow:"rgba(0, 0, 0, 0.16) 0 0 20px 0"},";label:PopoverContent;"),style:Object.assign({},he[o],n&&pe[o],a&&{position:"fixed"},i)},n&&Object(P.g)(de,{css:Object(A.a)({position:"absolute",overflow:"hidden",pointerEvents:"none",fill:i.backgroundColor||s.colors.GBK99C,"&:after":{content:'""',position:"absolute",boxSizing:"border-box",width:"24px",height:"24px",margin:"-12px",fill:i.backgroundColor||s.colors.GBK99C,transform:"rotate(45deg)",pointerEvents:"auto"}},";label:PopoverContent;"),style:Object.assign({},fe[o],r)}),"function"==typeof c?c(e):c)})),me=Object(ne.animated)(be),ve=function(e){Q()(n,e);var t=ae(n);function n(e){var r;return V()(this,n),r=t.call(this,e),"undefined"!=typeof document&&(r.element=document.createElement("div")),r}return H()(n,[{key:"componentDidMount",value:function(){document.body.appendChild(this.element)}},{key:"componentWillUnmount",value:function(){document.body.removeChild(this.element),delete this.element}},{key:"render",value:function(){if(this.element){var e=this.props,t=e.onRef,n=i()(e,["onRef"]);return Object(X.createPortal)(Object(P.g)("div",Object.assign({ref:t},n)),this.element)}return null}}]),n}(c.Component),ge=function(e){var t,n,r=e.renderChildren,a=e.children,i=e.transitionProps,s=e.springProps,l=e.onAfterEnter,u=e.onAfterLeave,d=Object(c.useState)(!1),f=o()(d,2),p=f[0],h=f[1],b=!!a,m=Object(ne.useSpring)((function(){return s.from})),v=o()(m,2),g=v[0],y=v[1],O=(t=a,n=Object(c.useRef)(),Object(c.useEffect)((function(){t&&(n.current=t)})),n.current),j=Object(ne.useTransition)(b,Object.assign({},i,{onRest:function(e,t){e.finished&&t.item&&2===e.value.p&&(u&&u(),h(!1))}}));return Object(c.useEffect)((function(){b?(h(!0),y(s.enter)):y(s.leave)}),[b]),Object(c.useLayoutEffect)((function(){p&&l&&l()}),[p]),p?Object(P.g)(ve,null,j((function(e,t){return t?r({transitionStyles:e,springStyles:g,item:b?a:O}):null}))):null},ye=oe()(.25,.1,.25,1),Oe={from:{opacity:0},enter:{opacity:1,config:{duration:200,easing:ye}},leave:{opacity:0,config:{duration:300,easing:ye}}},je=function(e){var t=e.isOpen,n=e.arrowed,r=e.fixed,a=e.globalClose,i=e.target,s=e.container,l=e.boundary,u=e.placement,d=e.listenResize,f=e.customStyle,p=e.backgroundColor,h=e.transitionProps,b=e.springProps,m=e.customPosition,v=e.onClose,g=e.onAfterLeave,y=e.children,O=Object(c.useState)(u),j=o()(O,2),w=j[0],C=j[1],k=Object(c.useState)({}),x=o()(k,2),S=x[0],E=x[1],R=Object(c.useState)({}),T=o()(R,2),A=T[0],N=T[1],I=Object(c.useRef)(null),M=Object(_.b)(),L=Object(D.c)((function(){var e=function(e){var t=e.target,n=e.container,r=e.placement,o=e.fixed,a=e.boundary,i=e.element,c=e.customPosition;if(i&&t){var s=t instanceof HTMLElement?t:Object(X.findDOMNode)(t),l=document.body;n&&(l=n instanceof HTMLElement?n:Object(X.findDOMNode)(n));var u=(c||ue)(s.getBoundingClientRect(),function(){var e,t,n,r,o,a,i,c,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0,u=s.getElement,d=s.padding,f=void 0===d?0:d,p=s.getBoundaryInfo;if("object"==typeof f&&(o=f.top||0,a=f.bottom||0,i=f.left||0,c=f.right||0),p)return p();var h={};u?h=u():l&&(h=l);var b=h.getBoundingClientRect(),m=b.top,v=b.right,g=b.bottom,y=b.left;return{top:m+(null!==(e=o)&&void 0!==e?e:f),right:v-(null!==(t=c)&&void 0!==t?t:f),bottom:g-(null!==(n=a)&&void 0!==n?n:f),left:y+(null!==(r=i)&&void 0!==r?r:f)}}(a,l),i.getBoundingClientRect(),r);return o||(u.targetContainerStyle.left+=window.pageXOffset,u.targetContainerStyle.top+=window.pageYOffset),u}}({target:i,container:s,placement:w,fixed:r,boundary:l,element:I.current,customPosition:m});if(e){var t=e.placement,n=e.targetContainerStyle,o=e.arrowStyle;C(t),E(n),N(o)}}));Object(c.useEffect)((function(){t&&L()}),[t]),Object(c.useLayoutEffect)((function(){if(d)return window.addEventListener("resize",L),function(){window.removeEventListener("resize",L)}}),[]);var B=Object(D.c)((function(e){var n;t&&(!document.body.contains(e.target)||(null==I||null===(n=I.current)||void 0===n?void 0:n.contains(e.target))||(null==i?void 0:i.contains(e.target))||v&&v())}));Object(c.useEffect)((function(){return a&&(M.Mobile?document.addEventListener("touchstart",B):document.addEventListener("click",B)),a&&function(){M.Mobile?document.removeEventListener("touchstart",B):document.removeEventListener("click",B)}}),[a,M,B]);var z=Object(D.c)((function(){C(u),g()})),F=Object(c.useCallback)((function(e){var t=e.transitionStyles,o=e.springStyles,a=e.item;return Object(P.g)(me,{key:"popover",ref:I,withArrow:n,arrowStyle:A,placement:w,fixed:r,style:Object.assign({},S,t,o,"function"==typeof f?f(w):f,p&&{backgroundColor:p}),onMounted:L},a)}),[n,A,w,r,S,f,p,L]);return Object(P.g)(ge,{renderChildren:F,transitionProps:h,springProps:b,onAfterEnter:L,onAfterLeave:z},t&&y)};je.propTypes={isOpen:$.a.bool,arrowed:$.a.bool,fixed:$.a.bool,globalClose:$.a.bool,placement:$.a.oneOf(Object.values(ce)),listenResize:$.a.bool,container:$.a.object,boundary:$.a.shape({getElement:$.a.func,padding:$.a.oneOfType([$.a.number,$.a.object]),getBoundaryInfo:$.a.func}),transitionProps:$.a.shape({from:$.a.object.isRequired,enter:$.a.object.isRequired,leave:$.a.object.isRequired,config:$.a.oneOfType([$.a.object,$.a.func])}),springProps:$.a.shape({from:$.a.object.isRequired,enter:$.a.object.isRequired,leave:$.a.object.isRequired}),customStyle:$.a.oneOfType([$.a.object,$.a.func]),backgroundColor:$.a.string,customPosition:$.a.func,onClose:$.a.func,onAfterLeave:$.a.func},je.defaultProps={isOpen:!1,arrowed:!0,fixed:!1,globalClose:!1,placement:"top",listenResize:!0,transitionProps:{from:{transform:"translateY(10px)",p:1},enter:{transform:"translateY(0px)",p:0},leave:{transform:"translateY(0px)",p:2},config:function(e){return e?{tension:380,friction:20}:{duration:300}}},springProps:Oe,onClose:$.a.func,onAfterLeave:te.a};var we=je,Ce={GOLDEN:{bg:"GYL02A",color:"GYL02A",colorNoAlpha:!0},BLUE:{bg:"GBL01A",color:"GBL07A"},PURPLE:{bg:"GRD07A",color:"GRD07A"},GREY:{bg:"GBK10A",color:"GBK06A",bgNoAlpha:!0,colorNoAlpha:!0}},ke=function(e){var t=e.bg,n=e.color,r=e.bgNoAlpha,o=e.colorNoAlpha,a=Object(I.f)(),i=a.colors,c=a.colorMod;return{bg:r?i[t]:c(i[t]).alpha(.08),color:o?i[n]:c(i[n]).alpha(.72)}};var xe={name:"2q0wp1-Label",styles:"flex:0 0 auto;;label:Label;"},Se={name:"2q0wp1-Label",styles:"flex:0 0 auto;;label:Label;"},Ee={name:"18mqqn8-Label",styles:"flex:0 0 auto;cursor:pointer;;label:Label;"},Re={name:"zzd7cz-Label",styles:"margin:0 -4px;flex:0 0 auto;;label:Label;"},Te=s.a.forwardRef((function(e,t){var n=e.color,r=void 0===n?Ce.BLUE:n,o=e.iconUrl,a=e.icon,c=e.name,s=e.subText,p=e.linkText,h=e.link,b=e.expandable,m=e.isExpanded,v=e.showDeleteButton,g=e.onDelete,y=e.onClick,O=e.style,j=e.css,w=i()(e,["color","iconUrl","icon","name","subText","linkText","link","expandable","isExpanded","showDeleteButton","onDelete","onClick","style","css"]),C=Object(_.b)().Mobile,k=Object(I.f)().fontWeights,x=ke(r),S=x.bg,E=x.color,R=h&&!b?M.b:"div",T=null,B=null;return v?B=l.a:b?T=m?u.a:d.a:h&&(T=f.a),Object(P.g)(R,Object.assign({ref:t,css:Object(A.a)(Object.assign({flex:"0 1 auto",display:"flex",alignItems:"center",justifyContent:"flex-start",background:S,padding:"0 8px",height:C?28:30,borderRadius:C?14:15,textDecoration:"none",fontSize:C?13:14,lineHeight:C?"16px":"18px",color:E,overflow:"hidden"},j),";label:Label;")},h&&{href:h},{style:Object.assign({cursor:T?"pointer":"default"},O),onClick:y},w),o?Object(P.g)("img",{src:Object(L.imgUrl)(o,"m"),height:C?16:19,width:C?16:19,alt:"",css:xe}):Boolean(a)&&Object(P.g)(a,{fill:E,size:C?17:20,css:Se}),Object(P.g)(N.Flex,{overflow:"hidden",flex:"0 1 auto",mx:"4px"},Object(P.g)(N.Text,{flexShrink:0,fontWeight:k.bold,mt:C?"1px":0},c)),Boolean(s||p)&&Object(P.g)(N.Text,{flex:"0 0 auto",display:"flex",alignItems:"center",mt:C?"1px":0,mr:"4px"},s||p),Boolean(B)&&Object(P.g)(B,{fill:E,size:18,onClick:g,css:Ee}),Boolean(T)&&Object(P.g)(T,{fill:E,size:C?23:26,css:Re}))}));Te.displayName="Label";var Ae={name:"134vuwg-text",styles:"margin-left:4px;text-decoration:none;color:inherit;;label:text;"},Ne=function(e){var t=e.inviter,n=i()(e,["inviter"]),r=t.name,o=t.urlToken,a=Object(P.g)(s.a.Fragment,null,"谢邀",Object(P.g)("a",{"data-za-detail-view-id":8126,href:"https://www.zhihu.com/people/".concat(o),css:Ae},"@".concat(r)));return Object(P.g)(Te,Object.assign({icon:p.a,name:a},n))};var _e=function(e){var t=e.data,n=i()(e,["data"]),r=t.url,o=t.title;return Object(P.g)(Te,Object.assign({},n,{name:"知乎蓝宝书收录",icon:v,subText:o,link:r}))};function Ie(e){var t=e.data,n=i()(e,["data"]),r=t.name,o=t.iconUrl,a=t.linkText,c=t.link;return Object(P.g)(Te,Object.assign({},n,{color:Ce.PURPLE,name:r,subText:a,iconUrl:o,icon:g.a,link:c}))}var Me={answer:"品牌特邀",article:"特邀文章"};function Le(e){var t=e.data,n=e.type,r=void 0===n?"answer":n,o=Boolean(null==t?void 0:t.subText),a=t.name,i=void 0===a?"谢邀":a,c=t.iconUrl;return Object(P.g)(Te,{iconUrl:c,icon:h.a,name:o?i:Me[r],subText:(null==t?void 0:t.subText)||"本文由品牌邀请撰写"})}var Pe=["relevant","editor_recommendation","zhizhi_plan_rumour_deny","zhizhi_plan_recommend","zhizhi_plan_edu_recommend","zhizhi_plan_baby_recommend","zhizhi_plan_acg_recommend","zhizhi_plan_outing_recommend","zhizhi_plan","online_roundtable","roundtable","special","raise_hand","weekly","daily","professional"],Be={online_roundtable:y.a,relevant:O.a,editor_recommendation:j.a,roundtable:y.a,special:w.a,raise_hand:w.a,weekly:C.a,daily:k.a,professional:x.a,zhizhi_plan_recommend:S.a,zhizhi_plan_edu_recommend:S.a,zhizhi_plan_baby_recommend:S.a,zhizhi_plan_acg_recommend:S.a,zhizhi_plan_outing_recommend:S.a,zhizhi_plan_rumour_deny:E.a,zhizhi_plan:S.a},ze={online_roundtable:"圆桌收录",relevant:"亲自答",editor_recommendation:"编辑推荐",roundtable:"圆桌收录",special:"专题收录",raise_hand:"举手行动",weekly:"周刊收录",daily:"日报收录",professional:"专业",zhizhi_plan_recommend:"致知计划",zhizhi_plan_edu_recommend:"致知计划",zhizhi_plan_baby_recommend:"致知计划",zhizhi_plan_acg_recommend:"致知计划",zhizhi_plan_outing_recommend:"致知计划",zhizhi_plan_rumour_deny:"专业辟谣",zhizhi_plan:"致知计划",science_seeking_truth_recommend:"科学求真"},De=Object.assign({},ze,{weekly:"知乎周刊收录",daily:"知乎日报收录"}),Fe={relevant:"此回答由问题相关方亲自撰写",professional:"已有 {} 人赠与了专业徽章"},Ue={online_roundtable:"圆桌",relevant:"亲自答",editor_recommendation:"编辑推荐",roundtable:"圆桌",special:"专题收录",raise_hand:"举手行动",weekly:"周刊收录",daily:"日报收录",professional:"内容专业",zhizhi_plan_recommend:"致知计划",zhizhi_plan_edu_recommend:"致知计划之教育季",zhizhi_plan_baby_recommend:"致知计划之母婴季",zhizhi_plan_acg_recommend:"致知计划之动漫游戏季",zhizhi_plan_outing_recommend:"致知计划之未来出行季",zhizhi_plan_rumour_deny:"辟谣标识"},Ve=s.a.forwardRef((function(e,t){var n=e.children,r=e.placement,a=void 0===r?"bottom":r,l=e.onClick,u=e.onPopoverClosed,d=i()(e,["children","placement","onClick","onPopoverClosed"]),f=Object(I.f)(),p=Object(c.useRef)(),h=Object(c.useState)(!1),b=o()(h,2),m=b[0],v=b[1],g=Object(c.useRef)(),y=Object(_.b)().Mobile,O=Boolean(n),j=Object(D.c)((function(e){var n,r;p.current=(r=e,(n=t)?("function"==typeof n?n(r):n.current=r,r):r)})),w=Object(D.c)((function(e){l&&l(e),O&&v(!m)})),C=Object(D.c)((function(){g.current&&clearTimeout(g.current),O&&!m&&v(!0)})),k=Object(D.c)((function(){g.current=setTimeout((function(){v(!1)}),100)}));return Object(P.g)(s.a.Fragment,null,Object(P.g)(Te,Object.assign({},d,{ref:j,expandable:O,isExpanded:m,onClick:w},!y&&{onMouseOver:C,onMouseLeave:k})),O&&Object(P.g)(we,{isOpen:m,arrowed:!0,globalClose:!0,listenResize:!0,target:p.current,placement:a,boundary:{padding:16},customStyle:{borderRadius:"8px",boxShadow:"0 -3px 10px 0 rgba(0, 0, 0, 0.1)"},backgroundColor:f.colors.GBK99C,onClose:k,onAfterLeave:u},Object(P.g)("div",{onMouseOver:C,onMouseLeave:k},n)))}));Ve.displayName="ExpandableLabel";var qe=function(e){return{icon:Be[e],title:De[e],shortTitle:ze[e],description:Fe[e],zaName:Ue[e]}},He=function(e,t){return e.includedInfos?e.includedInfos.find((function(e){return e.type===t})):null},Ke=function(e){var t=e.data,n=e.onLinkClick,r=t.type,o=t.icon,a=t.title,i=t.description,s=t.zaName,l=t.link,u=Object(_.b)().Mobile,d=Object(I.f)(),f=Object(c.useRef)(),p=Object(D.c)((function(e){B.a.trackEvent(f.current,{id:3771,name:"多个"},{button:{text:s}}),l&&n&&n(e,l,r)}));return Object(P.g)(Te,Object.assign({ref:f,color:Ce.GOLDEN,icon:o,name:a},l&&{zaText:!0,shouldTrackShow:!0,zaBlock:r},{subText:i,link:l,onClick:p,css:Object(A.a)({height:u?34:36,borderRadius:0,background:"none","&:hover":{background:l?d.colors.GBK10A:"none"}},";label:ContentItem;")}))},Qe=function(e){var t=e.data,n=e.onLinkClick,r=Object(_.b)().Mobile;return Object(P.g)(N.Box,{py:"8px",maxWidth:r?"calc(100vw - 34px)":"400px"},t.map((function(e){return Object(P.g)(Ke,{key:e.type,data:e,onLinkClick:n})})))},We=function(e){return Object(c.useMemo)((function(){var t=[];if(Pe.forEach((function(n){var r=function(e,t){switch(t){case"online_roundtable":return e.onlineRoundtable?Object.assign({},qe(t),{description:e.onlineRoundtable.name,link:"https://www.zhihu.com/roundtable/".concat(e.onlineRoundtable.urlToken)}):null;case"relevant":return e.relevantInfo&&e.relevantInfo.isRelevant?qe(t):null;case"professional":return e.recognitionInfo&&e.recognitionInfo.recognizedCount?Object.assign({},qe(t),{description:Fe[t].replace("{}",String(e.recognitionInfo.recognizedCount)),link:"#!",members:e.recognitionInfo.latestRecognizers}):null;case"zhizhi_plan":var n=e.includedInfos?e.includedInfos.find((function(e){return e.commonType===t&&!Pe.includes(e.type)})):null;return n?{icon:Be[n.type]||Be[t],title:n.name||De[n.type]||De[t],shortTitle:n.name||ze[n.type]||ze[t],description:n.title,link:n.url,zaName:Ue[n.type]||n.type}:null;case"special":case"raise_hand":var r=He(e,t);if(!r)return null;var o=qe(t);return Object.assign({},o,{title:r.subtitle||o.title,shortTitle:r.subtitle||o.shortTitle,description:r.title,link:r.url});default:var a=He(e,t);return a?Object.assign({},qe(t),{description:a.title,link:a.url}):null}}(e,n);r&&t.push(Object.assign({type:n},r))})),!t.length)return null;var n=t.length>1&&"online_roundtable"!==t[0].type,r=t[0];return n&&(r.meta="relevant"===r.type?"及 ".concat(t.length-1," 项收录"):"等 ".concat(t.length," 项收录")),{items:t,label:r,expandable:n}}),[e])},Ge=function(e){var t=e.placement,n=void 0===t?"bottom":t,r=e.data,o=e.onExpand,a=e.onLinkClick,i=We(r),s=Object(c.useRef)(),l=Object(c.useRef)(!1);if(!i)return null;var u=i.label,d=i.items,f=i.expandable,p=u.type,h=u.icon,b=u.title,m=u.shortTitle,v=u.meta,g=u.description,y=u.link,O=u.zaName,j=Boolean(y&&!f),w=j?Ve:z.e;Object(c.useLayoutEffect)((function(){B.a.setModule(s.current,{module:"Content",module_name:O}),Object(F.onViewedOnce)(s.current,(function(){B.a.trackCardShow(s.current,{id:3769,name:f?"多个":"一个"})}))}),[f,O]);var C=Object(D.c)((function(){l.current=!1})),k=Object(D.c)((function(e){f&&!l.current&&(l.current=!l.current,o&&o(i)),!f&&j&&(B.a.trackEvent(s.current,{id:3771,name:"一个"},{button:{text:O}}),a&&a(e,y,p))})),x={as:Ve,zaType:"Block"};return j?x={zaText:!0,zaBlock:p,shouldTrackShow:!0}:f&&(x=Object.assign({},x,{zaText:!0,onPopoverClosed:C})),Object(P.g)(w,Object.assign({},x,{ref:s,color:Ce.GOLDEN,icon:h,name:v&&m||b,subText:v||g,link:y,placement:n,onClick:k}),f&&Object(P.g)(Qe,{data:d,onLinkClick:a}))},Ye=function(){return Object(P.g)(Te,{color:Ce.GOLDEN,icon:O.a,name:"亲自答",subText:"此回答由问题相关方亲自撰写"})},Ze=function(e){var t=e.color,n=void 0===t?Ce.GREY:t,r=e.icon,o=e.name,a=e.subText,i=e.moreLink,c=e.renderMoreIcon,l=e.description,u=Object(_.b)().Mobile,d=ke(n).color,f=null;return f=i&&c?Object(P.g)(s.a.Fragment,null,a,Object(P.g)(M.b,{href:i,css:Object(A.a)({marginLeft:a?4:0,textDecoration:"none",color:"inherit"},";label:PopoverContent;")},c)):a,Object(P.g)(N.Box,{py:"8px",maxWidth:u?"calc(100vw - 34px)":"400px"},Object(P.g)(Te,{color:n,icon:r,name:o,subText:f,css:Object(A.a)({height:u?32:36,borderRadius:0,background:"none"},";label:PopoverContent;")}),Boolean(l)&&Object(P.g)(N.Text,{lineHeight:u?"16px":"18px",fontSize:u?"13px":"14px",color:d,mx:"12px",mb:"8px"},l))},Xe=function(e){var t=e.disclaimerInfo,n=t.excerpt,r=t.description,o=t.subDescription,a=n?"创作声明":r,i=n&&"内容".concat(n);return Object(P.g)(Ve,{name:a,subText:i},Object(P.g)(Ze,{color:Ce.BLUE,name:a,subText:i,description:o}))},Je=function(e){var t=e.annotationDetail;if(!t)return null;var n=t.detail,r=t.member,o=t.reasonDescription||"该内容已被标记",a="strong"===t.type&&R.a,i=r?"".concat(r.name,""):"";return Object(P.g)(Ve,{color:Ce.GREY,icon:a,name:o},Object(P.g)(Ze,{icon:a,name:o,description:(n||i)&&Object(P.g)("span",{dangerouslySetInnerHTML:{__html:"".concat(i).concat(n||"未填写原因")}})}))};var $e={name:"14z35ax-HelpIcon",styles:"vertical-align:bottom;;label:HelpIcon;"},et=function(e){var t=e.fill,n=Object(I.f)().colors.GBL05A;return Object(P.g)(T.a,{fill:t||n,size:18,css:$e})},tt=function(e){var t=e.collapseReason;return Object(P.g)(Ve,{color:Ce.GREY,name:"该回答已被折叠"},Object(P.g)(Ze,{name:"该回答已被折叠",renderMoreIcon:Object(P.g)(et,null),moreLink:"/question/20120168/answer/35704072",description:"折叠原因:".concat(t)}))},nt={color:"inherit",textDecoration:"underline"},rt=function(e){var t=e.abnormalDetail,n=void 0===t?{description:"回答建议修改",reason:""}:t,r=n.description,o=n.reasonId,a=n.reason,i=[10015,30005].includes(o)?Object(P.g)(s.a.Fragment,null,"不规范转载",Object(P.g)(M.b,{href:"https://www.zhihu.com/question/20258015",css:nt,onClick:function(e){return e.stopPropagation()}},a)):a,c=10027===o?Object(P.g)(s.a.Fragment,null,"作者修改内容或举证后,回答会重新展示。如果一周内未得到有效修改,回答会自动折叠。",Object(P.g)("br",null),"知乎严格按照公开的流程处理各类投诉,不收任何费用也不与任何中介机构合作。",Object(P.g)(M.b,{href:"https://www.zhihu.com/term/zhihu-terms#sec-report",css:nt},"投诉流程")):"作者修改内容通过后,回答会重新显示。如果一周内未得到有效修改,回答会自动折叠。";return Object(P.g)(Ve,{color:Ce.GREY,name:r,subText:i},Object(P.g)(Ze,{name:r,renderMoreIcon:Object(P.g)(et,null),moreLink:"https://www.zhihu.com/question/24752645",description:c}))};var ot={name:"pf9kc0-Labels",styles:"& > div, & > a{margin-right:8px;margin-bottom:8px;};label:Labels;"},at=function(e){var t=e.answerCollapsed,n=e.answerAbnormal,r=e.commercial,o=e.thanksForInviting,a=e.positive,c=e.bluebook,s=e.annotation,l=e.disclaimer,u=e.adPromotion,d=e.campaign,f=e.limit,p=void 0===f?2:f,h=i()(e,["answerCollapsed","answerAbnormal","commercial","thanksForInviting","positive","bluebook","annotation","disclaimer","adPromotion","campaign","limit"]);if(!(t||n||r||o||a||c||s||l||u||d))return null;var b=[t||n,r||o||u||c,a,s||l,d].filter(Boolean).slice(0,p);return Object(P.g)(N.Flex,Object.assign({flexDirection:"row",flexWrap:"wrap",pt:"8px",css:ot},h),b.map((function(e,t){return Object(P.g)("div",{key:t},e)})))};at.propTypes={answerCollapsed:$.a.node,answerAbnormal:$.a.node,commercial:$.a.node,thanksForInviting:$.a.node,bluebook:$.a.node,positive:$.a.node,annotation:$.a.node,disclaimer:$.a.node,adPromotion:$.a.node,campaign:$.a.node};var it=s.a.memo(at)},,function(e,t,n){"use strict";var r=n(2),o=n(11),a=n.n(o),i=n(1388);t.a=function(e){var t=e.className;return Object(r.c)("div",{className:a()("Reviewing",t),children:[Object(r.c)("div",{className:"Reviewing-top",children:[Object(r.b)(i.a,{size:16}),Object(r.b)("span",{className:"Reviewing-tip",children:"内容审核中"})]}),Object(r.b)("div",{className:"Reviewing-text",children:"内容将在审核通过后自动发布"})]})}},,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M5 14a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm7 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm7 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fillRule:"evenodd"}))};i.defaultProps={name:"Dots"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-.034 2.966c1.949 0 1.485 1.807 1.485 2.211 0 .115-.785 7.79-.785 7.79h-1.4s-.785-7.623-.785-7.738c0-.416-.463-2.263 1.485-2.263zm1.057 13.522c-.294.287-.647.43-1.056.43-.41 0-.762-.142-1.058-.43a1.429 1.429 0 0 1-.443-1.07c0-.41.148-.762.443-1.057a1.443 1.443 0 0 1 1.058-.442c.409 0 .762.143 1.056.43.296.287.443.644.443 1.07 0 .427-.147.783-.443 1.07z",fillRule:"evenodd"}))};i.defaultProps={name:"Alert"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M6 3.956v16.088C6 21.124 6.517 22 7.9 22c.326 0 .533-.087.896-.236L22 13.784c.571-.355 1.143-.87 1.143-1.784S22.57 10.571 22 10.216L8.796 2.236C8.433 2.087 8.226 2 7.9 2 6.514 2 6 2.876 6 3.956z"}))};i.defaultProps={name:"Play"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12 11l-3.716 3.782a.758.758 0 0 1-1.064 0 .738.738 0 0 1 0-1.052l4.249-4.512a.758.758 0 0 1 1.064 0l4.246 4.512a.738.738 0 0 1 0 1.052.757.757 0 0 1-1.063 0L12.002 11z",fillRule:"evenodd"}))};i.defaultProps={name:"ArrowUp"},t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),o=n.n(r),a=n(1),i=n.n(a);function c(e){return i.a.createElement("svg",o()({viewBox:"0 0 24 19",width:"24",height:"18",fill:"#e6eaee"},e),i.a.createElement("path",{fillRule:"evenodd",d:"M12.8 2.5c4.4 0 9.4 15.6 9.4 16H0S2.8 6 6 6.4c1.2 0 1.8 5.8 1.8 5.8s2.5-9.5 5-9.8zm7.8 3c-2 0-3-1.2-3-2.7 0-1.6 1.5-2.8 3-2.8 1.6 0 2.8 1.2 2.8 2.8 0 1.5-1.2 2.7-2.8 2.7z"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n.n(r);function a(e){return o.a.createElement("svg",{width:"12",height:"10",viewBox:"0 0 12 10",style:e.style},o.a.createElement("mask",{id:"ViewIcon","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"12",height:"10"},o.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4.8C12 2.56 8.72727 0 6 0C3.27273 0 0 2.56 0 4.8C0 7.04 3.27273 9.6 6 9.6C8.72727 9.6 12 7.04 12 4.8ZM3.79994 4.8C3.79994 3.58497 4.78491 2.6 5.99994 2.6C7.21496 2.6 8.19994 3.58497 8.19994 4.8C8.19994 6.01502 7.21496 7 5.99994 7C4.78491 7 3.79994 6.01502 3.79994 4.8Z",fill:"black"})),o.a.createElement("g",{mask:"url(#ViewIcon)"},o.a.createElement("rect",{x:"-2",y:"-2.8",width:"16",height:"16",fill:"#8590A6"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n.n(r);function a(e){return o.a.createElement("svg",{width:"9",height:"11",viewBox:"0 0 9 11",style:e.style},o.a.createElement("path",{d:"M0 1C0 0.447715 0.447715 0 1 0H8C8.55228 0 9 0.447715 9 1V9.13148C9 9.93018 8.10985 10.4066 7.4453 9.96353L5.0547 8.3698C4.7188 8.14587 4.2812 8.14587 3.9453 8.3698L1.5547 9.96353C0.890146 10.4066 0 9.93018 0 9.13148V1Z",fill:"#8590A6"}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n.n(r);function a(e){return o.a.createElement("svg",{width:"10",height:"12",viewBox:"0 0 10 12",style:e.style},o.a.createElement("mask",{id:"UpdateTimeIcon","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"10",height:"12"},o.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.0456 3.17377C9.79834 2.8189 10.1837 1.94914 9.91402 1.14002C9.62296 0.266822 8.67913 -0.205091 7.80593 0.0859764L4.50803 1.18527C4.40079 1.21835 4.29816 1.26195 4.20137 1.31488C3.97216 1.43959 3.78091 1.6137 3.63673 1.81892C3.50452 2.00645 3.41003 2.22248 3.3643 2.45598C3.32608 2.64908 3.32175 2.85082 3.35567 3.0525C3.38728 3.24338 3.45134 3.42332 3.54198 3.58645C3.6623 3.80402 3.82732 3.98694 4.02117 4.1273C4.21884 4.27093 4.44931 4.37218 4.69922 4.4177C4.80621 4.43741 4.91575 4.44673 5.02636 4.44494C5.3467 4.45005 5.65899 4.5474 5.9257 4.7256C6.19977 4.90873 6.41338 5.16901 6.53952 5.47354L8.07925 4.83577L6.53952 5.47355C6.66566 5.77808 6.69866 6.11317 6.63436 6.43646L8.26893 6.7616L6.63436 6.43646C6.57005 6.75975 6.41132 7.05671 6.17825 7.28978C5.94517 7.52286 5.64821 7.68159 5.32492 7.7459L5.65006 9.38047L5.32492 7.7459C5.00164 7.8102 4.66654 7.7772 4.36201 7.65106L3.72423 9.19079L4.36201 7.65106C4.05748 7.52492 3.79719 7.3113 3.61406 7.03723C3.43093 6.76316 3.33319 6.44094 3.33319 6.11132C3.33319 5.19089 2.58703 4.44473 1.66659 4.44473C0.74616 4.44473 0 5.19089 0 6.11132C0 7.10019 0.293232 8.06684 0.842616 8.88906C1.392 9.71127 2.17286 10.3521 3.08645 10.7305C4.00004 11.1089 5.00533 11.208 5.97519 11.015C6.94506 10.8221 7.83593 10.3459 8.53517 9.64671C9.2344 8.94747 9.71058 8.0566 9.9035 7.08673C10.0964 6.11687 9.99741 5.11158 9.61899 4.19799C9.46794 3.83334 9.2751 3.48985 9.0456 3.17377Z",fill:"black"})),o.a.createElement("g",{mask:"url(#UpdateTimeIcon)"},o.a.createElement("rect",{x:"-3.88873",y:"-2.77719",width:"17.777",height:"17.777",fill:"#8590A6"})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(212),o=n(56);function a(e,t){Object(o.a)(2,arguments);var n=Object(r.a)(e),a=Object(r.a)(t);return n.getTime()===a.getTime()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n.n(r),a=n(131),i=Object.assign;var c=function(e){return o.a.createElement(a.a,i({width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),o.a.createElement("path",{d:"M11.25 4a.25.25 0 00-.25.25V11H4.25a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25H11v6.75c0 .138.112.25.25.25h1.5a.25.25 0 00.25-.25V13h6.75a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H13V4.25a.25.25 0 00-.25-.25h-1.5z",clipRule:"evenodd"}))}},function(e,t,n){e.exports=n.p+"assets/liukanshan_coin.29bf8333.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2),o=n(90),a=n(78);function i(e){var t=Object(a.d)((function(){return n.e(10).then(n.bind(null,1474))}));return Object(r.b)(o.Box,{my:"14px",css:{minHeight:20},children:t?Object(r.b)(t,Object.assign({width:"70px",height:"20px",css:{display:"block"}},e)):null})}},,,function(e,t,n){"use strict";var r=n(2),o=n(11),a=n.n(o),i=n(90),c=n(1182),s=n(783),l=n(365),u=n(176),d=n(31),f=n(30),p=n(233),h=n.n(p),b=n(366),m=n(101),v=n(854);t.a=function(e){var t,n,o=e.question,p=e.question,g=p.id,y=p.title,O=p.answerCount,j=p.followerCount,w=p.updatedTime,C=p.created,k=e.headerInfo,x=e.showTime,S=e.extraFooterInfo,E=e.renderItem,R=e.enableIgnore,T=e.handleIgnoreQuestion,A=void 0===T?h.a:T,N=e.zaId,_=(N=void 0===N?{}:N).titleClick,I=N.writeAnswer,M=N.cardShow,L=N.ignoreQuestion,P=e.className,B=e.button,z=e.titleLink,D=e.zaContent;if(E)return E(o);var F="/question/".concat(g),U="https://www.zhihu.com/question/".concat(g),V=k?Object(r.c)(i.Flex,{mb:12,color:"GBL05A",alignItems:"center",css:{fontSize:"15px"},children:[Object(r.b)("img",{className:a()("QuestionItem-head--avatar",{"QuestionItem-head--avatarCircle":"circle"===(null===(t=k.avatar)||void 0===t?void 0:t.shape)}),src:null===(n=k.avatar)||void 0===n?void 0:n.url}),Object(r.b)("div",{className:"QuestionItem-head--reason",children:k.reason}),k.extra&&Object(r.b)("div",{className:"QuestionItem-head--extra",children:k.extra})]}):null,q=Object(r.b)("div",{className:"QuestionItem-title",children:Object(r.b)("a",Object.assign({href:z||F,target:"_blank",rel:"noopener noreferrer","data-za-detail-view-name":"Title"},_&&{"data-za-detail-view-id":_},{children:y}))});return Object(r.b)(b.a,{module:"QuestionItem",content:D||{type:"Question",token:String(g)},trackCardShow:Boolean(M),view:{id:M},children:Object(r.c)("div",{className:a()("QuestionItem",P),children:[V,Object(r.b)(v.e,{data:o,link:z||F,lastreadTouchable:!1,title:q,children:Object(r.c)(i.Flex,{mt:20,children:[B||Object(r.b)(m.a,{className:"QuestionItem-footer--writeAnswerButton",icon:c.a,label:"写回答",href:"".concat(U,"#write"),target:"_blank","data-za-not-track-link":!0,onClick:function(e){I&&f.a.trackEvent(e.target,{id:I,action:"OpenUrl"})}}),Object(r.b)(i.Box,{ml:16,children:Object(r.b)(v.d,{children:S||["".concat(Object(l.formatNumber)(O)," 回答"),"".concat(Object(l.formatNumber)(j)," 关注"),x&&"".concat(Object(u.toRelativeString)(w||C))]})})]})}),R&&Object(r.b)(d.c,{className:"QuestionItem-ignoreButton",preset:"plain","data-tooltip":"不感兴趣","data-tooltip-preset":"white","data-tooltip-classname":"QuestionItem-ignoreButtonTooltip",color:"GBL07A",icon:s.a,onClick:function(e){A(g),f.a.trackEvent(e.target,{id:L,action:"Click"})}})]})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(35),o=n(2),a=n(1386),i=n(1),c=n.n(i),s=n(131),l=Object.assign;var u=function(e){return c.a.createElement(s.a,l({width:"24",height:"14",viewBox:"0 0 24 14"},e),c.a.createElement("rect",{width:"24",height:"14",rx:"2"}),c.a.createElement("path",{fill:"#FFF",d:"M3.328 9.96h1.12V7.584c0-.68-.088-1.424-.144-2.064h.04l.6 1.272L6.656 9.96h1.2V4.04h-1.12V6.4c0 .672.088 1.456.152 2.072h-.04l-.592-1.28-1.72-3.152H3.328v5.92zm5.992 0h3.72v-.992h-2.536V7.384h2.08v-.992h-2.08V5.024h2.448V4.04H9.32v5.92zm5.48 0h1.448l.648-2.928c.096-.464.176-.92.256-1.368h.032c.072.448.16.904.256 1.368l.664 2.928h1.472l1.096-5.92h-1.128l-.464 2.888c-.088.616-.176 1.248-.264 1.888h-.04c-.128-.64-.248-1.28-.376-1.888l-.688-2.888h-1.008l-.688 2.888c-.128.616-.256 1.256-.376 1.888h-.032c-.088-.632-.184-1.264-.272-1.888l-.472-2.888h-1.208L14.8 9.96z"}))};function d(e){var t=e.isNewBefore,n=Object(r.a)(e,["isNewBefore"]);return t&&Object(a.a)(new Date,t)?Object(o.b)(u,Object.assign({css:{marginLeft:4},fill:"#0066FF",width:32,height:15},n)):null}},function(e,t,n){"use strict";var r=n(43),o=n(2),a=n(78),i=n(27),c=n(90),s=n(232),l=n(811),u=n(175),d=n(233),f=n.n(d),p=n(382),h=n(1060),b=n(0),m=n(1),v=n(132),g=n(138),y=n(783),O=n(916),j=function(e){var t=e.className,n=e.index,r=void 0===n?0:n,a=e.selected,i=e.onClick,l=e.onDelete,u=e.item,d=e.item,f=d.status,p=d.startTime,h=d.endTime,j=d.target,w=(j=void 0===j?{}:j).parentObject.title,C=0===f,k=Object(m.useMemo)((function(){return"".concat(Object(O.b)(p/1e3)," - ").concat(Object(O.b)(h/1e3))}),[p,h]),x=Object(o.c)(s.a,Object.assign({zaType:"Card",zaText:w,view:{elementLocation:{card:{index:r}}},as:c.Box,role:"button",className:t,width:"167px",height:"70px",color:"GBK03A",p:"8px",pb:"0",lineHeight:"normal"},C&&{onClick:i},{css:function(e){var t;return{border:"1px solid ".concat(a?"transparent":C?e.colorMod(e.colors.GBL01A).alpha(.08):e.colors.GBK09A),boxShadow:a?"inset 0 0 0 2px ".concat(e.colors.GBL01A):"none",borderRadius:"4px",":hover":(t={background:C?e.colorMod(e.colors.GBL01A).alpha(.08):e.colors.GBK10A},Object(b.a)(t,".".concat("ContributionItem-deleteButton"),{visibility:"visible"}),Object(b.a)(t,"cursor",C?"pointer":"not-allowed"),t)}},children:[Object(o.c)(c.Flex,Object.assign({},C&&{color:"GBL01A"},{fontSize:"11px",fontWeight:"600",alignItems:"center",justifyContent:"space-between",children:[Object(o.b)(c.Box,{children:k}),Object(o.b)(s.a,{zaBlock:"Delete",zaText:"删除投稿",zaType:"Button",as:c.Box,role:"button",className:"ContributionItem-deleteButton",onClick:function(e){e.stopPropagation(),null==l||l(u)},css:{cursor:"pointer",visibility:"hidden"},children:Object(o.b)(y.a,{size:12})})]})),Object(o.b)(c.Box,{mt:"4px",fontSize:"13px",css:[Object(v.d)(2),{wordBreak:"break-all"}],children:w})]}));return Object(o.b)(s.b,{block:"VideoAnswerItem",children:C?x:Object(o.b)(g.a,{toggler:x,placement:"top",arrowed:!0,toggleEvent:"hover",children:Object(o.b)(c.Box,{fontSize:"12px",p:"8px",children:"已投稿问题仅支持在回答详情页编辑"})})})},w=function(e){var t=e.className,n=e.onClick,a=e.totalCount,i=e.currentCount,u=Object(h.a)("zvideo_contribution_form:should_hide_new_tag"),d=Object(r.a)(u,2),f=d[0],p=d[1];return Object(o.c)(s.a,{zaType:"Button",zaAction:"",zaBlock:"AddVideoAnswer",zaText:"添加问题",as:c.Flex,className:t,role:"button",width:"167px",height:"70px",flexDirection:"column",color:"GBL01A",alignItems:"center",justifyContent:"center",onClick:function(e){f||p(!0),null==n||n(e)},css:function(e){return Object.assign({position:"relative",cursor:"pointer",borderRadius:"3px",border:"1px solid ".concat(e.colorMod(e.colors.GBL01A).alpha(.08)),":hover":{background:e.colorMod(e.colors.GBL01A).alpha(.08)},overflow:"hidden"},!f&&{"::after":{content:'"NEW"',position:"absolute",top:"0",right:"0",color:e.colors.GRD03A,fontSize:"8px",fontWeight:"600",width:"28px",height:"17px",lineHeight:"17px",textAlign:"center",background:e.colorMod(e.colors.GRD03A).alpha(.08),borderBottomLeftRadius:"3px"}})},children:[Object(o.b)(l.a,{size:12}),Object(o.b)(c.Box,{fontSize:"14px",fontWeight:"500",mt:"1px",children:i&&a?"继续添加 (".concat(i,"/").concat(a,")"):"添加问题"})]})};t.a=function(e){var t=e.zvideoId,n=e.showCreateButton,r=void 0!==n&&n,s=e.showSelect,l=void 0!==s&&s,d=e.onAdd,h=e.onSelect,b=Object(i.useDispatch)(),m=Object(p.o)(),v=Object(p.n)(t),g=Object(p.m)(t).answer,y=(g=void 0===g?{}:g).canContribute,O=void 0!==y&&y,C=g.totalCount,k=void 0===C?0:C,x=v.length,S=Object(a.c)((function(e){b(Object(p.k)(e.id)),b(Object(p.e)(e.id)),null==h||h(e)})),E=Object(a.c)((function(e){u.a.confirm(Object(o.b)(c.Box,{textAlign:"center",children:"已编辑的投稿内容不会被保存"}),{title:Object(o.b)(c.Box,{ml:"23px",children:"确定删除该视频投稿?"}),text:{ok:"确认删除",cancel:"继续编辑"}}).then((function(){if(e.status&&0!==e.status){var n=e.target.object.id;n&&b(Object(p.c)(t,e.id,n))}else b(Object(p.d)(t,e.id));b(Object(p.k)(null))}),f.a)}));return Object(o.c)(c.Flex,{flexWrap:"wrap",ml:"-8px",mt:"-12px",children:[v.map((function(e){return Object(o.b)(j,{selected:l&&(null==m?void 0:m.id)===e.id,onClick:function(){return S(e)},onDelete:function(){return E(e)},item:e,css:{marginLeft:"8px",marginTop:"12px"}},e.id)})),O&&x<k&&r&&Object(o.b)(w,{onClick:d,currentCount:x,totalCount:k,css:{marginLeft:"8px",marginTop:"12px"}})]})}},,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M9 9.185v5.63c0 .378.18.685.665.685.114 0 .187-.03.314-.083l4.621-2.793c.2-.124.4-.304.4-.624s-.2-.5-.4-.624L9.979 8.583c-.127-.053-.2-.083-.314-.083-.485 0-.665.307-.665.685z"}))};i.defaultProps={name:"TriangleArrowRight"},t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(33),o=n.n(r),a=n(80),i=n.n(a),c=n(1),s=n.n(c),l=n(11),u=n.n(l),d=n(1142),f=n(1143),p={close:n(1144).a,triangle:d.a,add:f.a};function h(e){var t=e.className,n=e.name,r=i()(e,["className","name"]),a=p[n];return a?s.a.createElement(a,o()({className:u()("Icon Icon--".concat(n),t)},r)):null}},function(e,t,n){"use strict";var r=n(4),o=n(1),a=n(214),i=n.n(a),c=n(27),s=n(240);t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(c.useDispatch)(),n=Object(c.useSelector)((function(t){return i()(t.switches,e)}),c.shallowEqual);return Object(o.useEffect)((function(){t(Object(s.b)(e))}),[t].concat(Object(r.a)(e))),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n.n(r),a=n(131),i=Object.assign;var c=function(e){return o.a.createElement(a.a,i({width:"20",height:"20",viewBox:"0 0 20 20"},e),o.a.createElement("path",{d:"M8.524 14.597a1.374 1.374 0 01-.999.403c-.377 0-.737-.133-1.002-.406l-3.612-3.725a1.476 1.476 0 01.006-2.05 1.386 1.386 0 011.997.01l2.614 2.704 7.56-7.774a1.385 1.385 0 011.998 0 1.482 1.482 0 010 2.055l-8.562 8.783z",fillRule:"evenodd",clipRule:"evenodd"}))}},function(e,t,n){e.exports=n.p+"assets/liukanshan_paper.d98ba9b2.svg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(94),o=n.n(r);function a(e,t,n){var r=!1,a=o()((function(){r=!1,e.apply(void 0,arguments)}),t,n);return Object.assign((function(){r=!0,a.apply(void 0,arguments)}),{cancel:a.cancel,flush:a.flush,pending:function(){return r}})}},function(e,t,n){"use strict";var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(19),f=n(3),p=n.n(f),h=n(27),b=n(83),m=n.n(b),v=n(25),g=n(240),y=n(68),O=n(24),j=n(990);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var C=function(e,t){var n=e.entities.questions[t.answer.question.id];return n&&n.voteDownReason},k={loadSwitches:g.b,showNotification:v.h,updateAnswerVote:y.K,getVoteDownReason:y.k,selectVoteDownReason:y.C,setOpposeRightStatus:g.e},x=function(e){Object(i.a)(n,e);var t=w(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleVote=e.context.authRequired((function(t){var n=e.props,r=n.answer;(0,n.updateAnswerVote)(r.id,t,{cardType:r.cardType})}),O.W.vote),e.handleLoadVoteDownReason=function(){var t=e.props,n=t.answer;(0,t.getVoteDownReason)(n.id,n.question.id)},e.handleSelectVoteDownReason=function(t){var n=e.props,r=n.answer,o=n.selectVoteDownReason,a=n.showNotification;o(r.id,t.reasonId).then((function(e){a(e.payload.message)}))},e.handleSetShowVoteDownReason=function(t){(0,e.props.setOpposeRightStatus)(t)},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this.props.loadSwitches;this.shouldShowVoteDownMenu&&e(["opposeRight"])}},{key:"render",value:function(){var e=this.props,t=e.answer,n=e.voteDownReason,o=e.opposeRightStatusIsOn,a=Object(r.a)(e,["answer","voteDownReason","opposeRightStatusIsOn"]);return Object(l.b)(j.a,Object.assign({count:t.voteupCount,voting:t.relationship&&t.relationship.voting,isOwner:t.relationship&&t.relationship.isAuthor,isShowVoteDownMenu:this.shouldShowVoteDownMenu&&o,onVote:this.handleVote,voteDownReason:n,onLoadVoteDownReason:this.handleLoadVoteDownReason,onSelectVoteDownReason:this.handleSelectVoteDownReason,onSetVoteDownReason:this.handleSetShowVoteDownReason},m()(a,Object.keys(k))))}},{key:"shouldShowVoteDownMenu",get:function(){return Boolean(!this.props.disabled&&this.context.currentUser)}}]),n}(u.Component);x.contextTypes={currentUser:p.a.object,authRequired:p.a.func},t.a=Object(d.compose)(Object(h.connect)((function(e,t){return{voteDownReason:C(e,t),opposeRightStatusIsOn:Object(g.d)(e)}}),k))(x)},function(e,t,n){var r=n(179),o=n(113);e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==r(e)}},function(e,t,n){"use strict";var r=n(1109);n.o(r,"animated")&&n.d(t,"animated",(function(){return r.animated})),n.o(r,"useSpring")&&n.d(t,"useSpring",(function(){return r.useSpring})),n.o(r,"useTransition")&&n.d(t,"useTransition",(function(){return r.useTransition}))},function(e,t,n){},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return ne})),n.d(t,"b",(function(){return Ee}));var r=n(2),o=n(27),a=n(20),i=n.n(a),c=n(21),s=n.n(c),l=n(92),u=n.n(l),d=n(22),f=n.n(d),p=n(23),h=n.n(p),b=n(13),m=n.n(b),v=n(1),g=n.n(v),y=n(39),O=n(3),j=n.n(O),w=n(233),C=n.n(w),k=n(11),x=n.n(k),S=n(232),E=n(835),R=n(841),T=n(152),A=n(30),N=n(865);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M="dark",L="light",P=function(e){f()(n,e);var t=_(n);function n(){var e;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),I(u()(e),"handleClick",(function(t,n){var r=e.props.onClick;A.a.trackEvent(e.node,{id:4240,action:"OpenUrl",name:n},{link:{url:t,anchor:n}}),r&&r({target:e.node})})),e}return s()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.goodsCard.body.link;Object(R.onViewedOnce)(this.node,(function(){A.a.trackCardShow(e.node,{id:4241,name:"课程"},{link:{url:t,anchor:"课程"}})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.theme,r=t.zaInfo,o=void 0===r?{}:r,a=t.goodsCard,i=t.className,c=n===M,s=a.header,l=s.title,u=s.subTitle,d=a.body,f=d.title,p=d.cover,h=d.coverLabel,b=d.link,m=d.desc,v=d.label,y=d.vipNote,O=a.catalog;return g.a.createElement(g.a.Fragment,null,g.a.createElement("section",{className:x()("KfeCollection-GoodsCardV2",i),"data-za-module":"Content","data-za-extra-module":JSON.stringify({card:{content:[o]}})},g.a.createElement("h1",{className:"KfeCollection-GoodsCardV2-header"},"".concat(l).concat(u?" · ".concat(u):"")),g.a.createElement(S.b,{content:Object.assign({},o,{type:N.e.paidAnswer}),block:"oldSkuCard"},g.a.createElement(S.a,{zaType:"Card",shouldTrackShow:!0,zaAction:"OpenUrl",extra:{link:{url:b}}},g.a.createElement("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"KfeCollection-GoodsCardV2-content",onClick:function(){return e.handleClick(b,f)},ref:function(t){return e.node=t}},g.a.createElement("div",{className:"KfeCollection-GoodsCardV2-cover"},g.a.createElement("img",{className:x()("KfeCollection-GoodsCardV2-cover-img",{"KfeCollection-GoodsCardV2-cover-img--dark":c}),src:Object(T.imgUrl)(p,{size:"200x0"})}),g.a.createElement("div",{className:"KfeCollection-GoodsCardV2-cover-label"},h)),g.a.createElement("div",{className:"KfeCollection-GoodsCardV2-detail"},g.a.createElement("div",null,g.a.createElement("h2",{className:"KfeCollection-GoodsCardV2-detail-title"},f),m&&g.a.createElement("p",{className:"KfeCollection-GoodsCardV2-detail-desc"},m),g.a.createElement("p",{className:"KfeCollection-GoodsCardV2-detail-label"},v)),g.a.createElement("p",{className:"KfeCollection-GoodsCardV2-detail-vipNote",dangerouslySetInnerHTML:{__html:y}}))))),O&&O.length>0&&g.a.createElement("div",{className:"KfeCollection-GoodsCardV2-catalog"},"章节目录",g.a.createElement("div",{className:"KfeCollection-GoodsCardV2-catalogSectionList"},O.map((function(e){var t=e.manuscriptUrl,n=e.sectionId,r=e.title;return g.a.createElement(S.a,{zaType:"Text",key:n,zaBlock:"catalog",extra:{link:{url:t}},zaAction:"OpenUrl"},g.a.createElement("a",{className:"KfeCollection-GoodsCardV2-catalogSectionItem",href:t,target:"_blank",rel:"noopener noreferrer",key:n,"data-za-detail-view-id":7500,"data-za-extra":JSON.stringify({button:{text:r}})},r,g.a.createElement(E.a,{className:"KfeCollection-GoodsCardV2-catalogSectionItemIcon"})))}))))))}}]),n}(g.a.Component);I(P,"propTypes",{theme:j.a.oneOf([M,L]),onClick:j.a.func}),I(P,"defaultProps",{theme:L});var B=P,z=n(31),D=n(1305),F=function(e){return-1===e.indexOf("?")?"".concat(e,"?entry=qa"):"".concat(e,"&entry=qa")};function U(e){var t=e.header,n=void 0===t?{}:t,r=e.onClick,o=n.title,a=n.subTitle,i=n.link;return g.a.createElement("a",{href:F(i),target:"_blank",rel:"noopener noreferrer",className:"KfeCollection-GoodsCardV3-header",onClick:r},g.a.createElement("div",{className:"KfeCollection-GoodsCardV3-headerTitle"},o),g.a.createElement("div",{className:"KfeCollection-GoodsCardV3-headerSubTitle"},g.a.createElement("div",null,a),g.a.createElement(D.a,{className:"KfeCollection-GoodsCardV3-headerIcon"})))}var V=function(e){var t=Object(v.useRef)(),n=e.className,r=e.zaInfo,o=void 0===r?{}:r,a=e.goodsCard,i=e.shelvesInfo,c=e.onBookshelfButtonClick,s=void 0===c?C.a:c,l=e.theme,u=void 0===l?"light":l,d=e.onClick,f=a.header,p=a.body,h=a.body,b=h.title,m=h.cover,y=h.coverLabel,O=h.link,j=h.desc,w=h.label,k=h.vipNote,_=h.icons,I=h.heatNote,M=Object(S.i)().trackEvent;Object(v.useEffect)((function(){Object(R.onViewedOnce)(t.current,(function(){A.a.trackCardShow(t.current,{id:8467,name:p.title},{button:{text:f.title}})}))}),[p,f]);var L=Object(v.useCallback)((function(e){A.a.trackEvent(e.target,{id:8468,action:"OpenUrl",name:p.title},{link:{url:f.link},button:{text:f.title}}),M({action:"OpenUrl",eventType:"Click",elementLocation:{text:f.title,block:{blockText:"newSkuCardHeader"},type:"Button",content:{type:N.e.paidAnswer}}},{link:{url:f.link}})}),[p,f,M]),P=Object(v.useCallback)((function(e){A.a.trackEvent(e.target,{id:8469,action:"OpenUrl",name:p.title},{link:{url:p.link},button:{text:f.title}}),d&&d(e)}),[p,f,d]),B=Object(v.useCallback)((function(e){var t=(null==i?void 0:i.whetherInShelf)?"去书架查看":"加入书架",n=(null==i?void 0:i.whetherInShelf)?"OpenUrl":"Collect",r={url:p.link};A.a.trackEvent(e.target,{id:8294,action:"OpenUrl",name:p.title},{link:r,button:{text:t}}),M({action:n,eventType:"Click",elementLocation:{type:"Button",text:t}},(null==i?void 0:i.whetherInShelf)?{link:{url:"https://www.zhihu.com/xen/market/vip/vip-recommend"}}:null),s(e)}),[p,s,i,M]);return g.a.createElement("section",{className:x()("KfeCollection-GoodsCardV3",n),"data-za-module":"Content","data-za-extra-module":JSON.stringify({card:{content:[o]}})},g.a.createElement(U,{header:f,onClick:L}),g.a.createElement(S.b,{content:Object.assign({},o,{type:N.e.paidAnswer}),block:"newSkuCard"},g.a.createElement(S.a,{zaType:"Card",shouldTrackShow:!0,zaAction:"OpenUrl",extra:{link:{url:O}}},g.a.createElement("a",{href:F(O),target:"_blank",rel:"noopener noreferrer",className:x()("KfeCollection-GoodsCardV3-content","KfeCollection-GoodsCardV3-content--topHeader"),onClick:P,ref:t},g.a.createElement("div",{className:"KfeCollection-GoodsCardV3-cover"},g.a.createElement("img",{className:"KfeCollection-GoodsCardV3-coverVip",src:"light"===u?null==_?void 0:_.leftTopDayIcon:null==_?void 0:_.leftTopNightIcon,alt:""}),g.a.createElement("img",{className:x()("KfeCollection-GoodsCardV3-coverImage"),src:Object(T.imgUrl)(m,{size:"200x0"})}),g.a.createElement("div",{className:"KfeCollection-GoodsCardV3-coverLabel"},y)),g.a.createElement("div",{className:"KfeCollection-GoodsCardV3-detail"},b&&g.a.createElement("h2",{className:"KfeCollection-GoodsCardV3-detailTitle"},b),j&&g.a.createElement("p",{className:"KfeCollection-GoodsCardV3-detailDescription"},j),w&&g.a.createElement("p",{className:"KfeCollection-GoodsCardV3-detailLabel"},w),I?g.a.createElement("p",{className:"KfeCollection-GoodsCardV3-detailHeatNote"},I):k&&g.a.createElement("p",{className:"KfeCollection-GoodsCardV3-detailVipNote",dangerouslySetInnerHTML:{__html:k}}),i&&g.a.createElement(z.c,{className:"KfeCollection-GoodsCardV3-bookshelfButton",preset:"plain",color:"grey",onClick:B},i.whetherInShelf?"去书架查看":"加入书架",g.a.createElement(E.a,{text:!0,center:!0})))))))};function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var K=function(e){f()(n,e);var t=q(n);function n(){var e;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),H(u()(e),"handleObserve",(function(t){var n=e.props.logPaidAnswerProgress;t.forEach((function(t){if(0!==t.intersectionRatio){var r=t.target;e.observer.unobserve(r),n&&n()}}))})),H(u()(e),"renderCard",(function(){var t=e.props,n=t.hasPurchased,r=t.result,o=void 0===r?{}:r,a=t.theme,i=t.onBookshelfButtonClick,c=void 0===i?C.a:i,s=t.onClick,l=t.className,u=o.goodsCard,d=o.shelvesInfo,f=o.zaInfo;return n?g.a.createElement(V,{goodsCard:u,zaInfo:f,hasPurchased:n,shelvesInfo:n?d:null,onBookshelfButtonClick:c,onClick:s,theme:a,className:l}):g.a.createElement(B,{goodsCard:u,zaInfo:f,onClick:s,className:l})})),e}return s()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.hasPurchased,r=t.logPaidAnswerProgress;n&&r&&"undefined"!=typeof window&&window.IntersectionObserver&&(this.target=Object(y.findDOMNode)(this),this.observer=new window.IntersectionObserver(this.handleObserve,{threshold:[.1]}),setTimeout((function(){e.observer.observe(e.target)})))}},{key:"componentWillUnmount",value:function(){this.observer&&this.observer.unobserve(this.target)}},{key:"render",value:function(){return this.renderCard()}}]),n}(g.a.Component);H(K,"propTypes",{result:j.a.object.isRequired,theme:j.a.string,hasPurchased:j.a.bool,onBookshelfButtonClick:j.a.func,logPaidAnswerProgress:j.a.func}),H(K,"defaultProps",{result:{goodsCard:{},btnInfo:{},progressInfo:{},zaInfo:{}}});var Q=K,W=n(63);function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=function(e){f()(n,e);var t=G(n);function n(){var e;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),Y(u()(e),"handleClick",(function(t,n){var r=e.props.onClick;A.a.trackEvent(e.node,{id:4240,action:"OpenUrl",name:n},{link:{url:t,anchor:n}}),"function"==typeof r&&r(e.node)})),e}return s()(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.btnInfo,n=t.btnText,r=t.link;W.a.dispatch("vip/preloadVIPHybridPopup",{url:r}),Object(R.onViewedOnce)(this.node,(function(){A.a.trackCardShow(e.node,{id:4241,name:n},{link:{url:r,anchor:n}})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.btnInfo,r=t.zaInfo,o=void 0===r?{}:r,a=t.className,i=n.btnText,c=n.link;return g.a.createElement("div",{className:x()("KfeCollection-PurchaseBtn",a)},g.a.createElement("div",{className:"KfeCollection-PurchaseBtn-mask"}),g.a.createElement(S.b,{block:"textLink",content:Object.assign({},o||{},{type:N.e.paidAnswer})},g.a.createElement(S.a,{zaType:"Text",shouldTrackShow:!0,zaAction:"OpenUrl",extra:{link:{url:c}}},g.a.createElement("a",{className:"KfeCollection-PurchaseBtn-HybridLink",href:c,target:"_blank",rel:"noopener noreferrer",onClick:function(){return e.handleClick(c,i)},ref:function(t){return e.node=t},"data-za-module":"Content","data-za-extra-module":JSON.stringify({card:{content:[o]}})},g.a.createElement("span",{className:"KfeCollection-PurchaseBtn-text"},i)," ",g.a.createElement(E.a,{className:"KfeCollection-PurchaseBtn-ArrowRight"})))))}}]),n}(g.a.Component),X=n(234),J=n(68);function $(e){var t=e.id,n=e.children,r=Object(v.useRef)(),a=Object(o.useDispatch)();return Object(v.useEffect)((function(){var e=r.current;if(t&&e){var n=e instanceof Element?e:Object(y.findDOMNode)(e);n&&Object(R.onViewedOnce)(n,(function(){return a(Object(J.y)(t))}))}}),[a,t]),Object(v.cloneElement)(n,{ref:r})}$.propTypes={id:j.a.oneOfType([j.a.number,j.a.string]).isRequired};var ee=Object(X.a)(null)($);function te(e){var t,n=e.answer,a=(Object(o.useSelector)((function(e){return Object(J.z)(e,null==n?void 0:n.id)}))||{}).result;if(!a)return null;var i=null==n||null===(t=n.paidInfo)||void 0===t?void 0:t.hasPurchased,c=a.btnInfo,s=a.zaInfo;return Object(r.c)(r.a,{children:[Object(r.b)(ee,{id:n.id,children:Object(r.b)("div",{})}),!i&&c&&Object(r.b)(Z,{btnInfo:c,zaInfo:s}),Object(r.b)(Q,{className:"AnswerItem-GoodsCard",result:a,hasPurchased:i})]})}var ne=Object(X.a)(null)((function(e){var t=e.answer;return"paid"===(null==t?void 0:t.answerType)?Object(r.b)(te,{answer:t}):null})),re=n(55),oe=n.n(re);function ae(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ce=function(e){return function(e){if(!window)return null;try{var t=document.createElement("div");t.innerHTML=e;var n,r=Array.from(t.childNodes),o=oe()(r,3),a=o[0].nodeValue,i=o[1],c=i.innerText,s=i.attributes,l=o[2].nodeValue,u={},d=ae(s);try{for(d.s();!(n=d.n()).done;){var f=n.value;u[f.name]=f.value}}catch(e){d.e(e)}finally{d.f()}return a&&c&&l?{prefixText:a,content:c,status:l,linkInfo:{name:"a",attr:u}}:null}catch(e){return null}}(e)},se=function(e){var t=e.content;t=void 0===t?[]:t;var n=oe()(t,2),r=n[0],o=n[1],a=e.className,i=e.onClick;return g.a.createElement("div",{className:x()("KfeCollection-CertainEndEllipsis",a),onClick:i},g.a.createElement("div",{className:"KfeCollection-CertainEndEllipsis-start"},r),g.a.createElement("div",{className:"KfeCollection-CertainEndEllipsis-end"},o))},le=function(e){var t=e.contentName,n=e.fallbackContent,r=e.onClick,o=Object(v.useMemo)((function(){return ce(t)}),[t]);if(null===o)return n;var a=o.prefixText,i=o.content,c=o.status,s=o.linkInfo,l=s.name,u=g.a.createElement(g.a.Fragment,null,a,g.a.createElement(l,s.attr,i.slice(0,-1))),d=g.a.createElement(g.a.Fragment,null,g.a.createElement(l,s.attr,i.slice(-1)),c);return g.a.createElement(se,{onClick:r,content:[u,d],className:"KfeCollection-PaidContentNameCertainEndEllipsis"})};var ue=function(e){var t=e.introCard,n=e.RichTextComponent,r=e.className,o=e.zaInfo,a=void 0===o?{}:o,i=e.handleTrack,c=e.extra,s=void 0===c?{}:c,l=t.statement,u=t.description,d=t.contentName,f=t.authorDesc,p=s.isNewStyle,h=s.isMobile,b=Object(S.i)().trackEvent,m=function(e,t){var n=e.target,r=e.target,o=r.text,a=r.href,c=5325===t?"userName":"bookTitle";"A"===r.tagName&&(A.a.trackEvent(n,{id:t,action:"OpenUrl"},{button:{text:o},link:{url:a}}),b({action:"OpenUrl",eventType:"Click",elementLocation:{type:"Text",block:{blockText:c},content:{type:N.e.paidAnswer}}},{link:{url:a}})),i&&i(e,a)},v=function(e){return p?"".concat(e,h?"-newStyle-mobile":"-newStyle-pc"):e};return g.a.createElement("section",{className:x()(v("KfeCollection-IntroCard"),r),"data-za-module":"Content","data-za-extra-module":JSON.stringify({card:{content:[a]}})},!p&&g.a.createElement(g.a.Fragment,null,!!l&&g.a.createElement("p",null,l),!!u&&g.a.createElement("p",null,u),(!!l||!!u)&&g.a.createElement("p",{className:"KfeCollection-IntroCard-spacing"})),g.a.createElement(le,{contentName:d,onClick:function(e){return m(e,5326)},fallbackContent:g.a.createElement("p",{onClick:function(e){return m(e,5326)},className:v("KfeCollection-IntroCard-contentName"),dangerouslySetInnerHTML:{__html:d}})}),n?g.a.createElement(n,{className:v("KfeCollection-IntroCard-authorDesc"),html:f,onClick:function(e){return m(e,5325)}}):g.a.createElement("p",{onClick:function(e){return m(e,5325)},className:v("KfeCollection-IntroCard-authorDesc"),dangerouslySetInnerHTML:{__html:f}}))},de=n(1170),fe=n(1131),pe=function(e){return g.a.createElement(fe.a,Object.assign({viewBox:"0 0 140 43"},e),g.a.createElement("defs",null,g.a.createElement("rect",{id:"zhimg_ic_primelabel_01@2x-a",width:"70",height:"30",x:"0",y:"0"})),g.a.createElement("g",{fillRule:"evenodd",transform:"translate(0 -6)"},g.a.createElement("path",{fillRule:"nonzero",d:"M80.0023638,2.63706979 L129.732029,30.638653 C135.976314,34.154746 139.822785,40.6523917 139.822785,47.6843672 L139.822785,103.687744 C139.822785,110.719509 135.976314,117.217365 129.732029,120.733248 L80.0023638,148.734831 C73.758079,152.250924 66.0649216,152.250924 59.8206368,148.734831 L10.0909714,120.733248 C3.84668657,117.217365 -7.10542736e-14,110.719509 -7.10542736e-14,103.687744 L-7.10542736e-14,47.6843672 C-7.10542736e-14,40.6523917 3.84668657,34.154746 10.0909714,30.638653 L59.8206368,2.63706979 C66.0649216,-0.879023264 73.758079,-0.879023264 80.0023638,2.63706979 Z M62.8214584,21.9369801 L62.4917192,22.1167713 L25.9257887,42.6512656 C21.4364336,45.1724346 18.6325361,49.7839786 18.5101354,54.8082708 L18.5059568,55.1514561 L18.5059568,96.2205991 C18.5059568,101.262635 21.2100909,105.930346 25.6223198,108.545528 L25.9257887,108.720635 L62.4917192,129.25513 C66.9737863,131.772206 72.4710741,131.832136 77.0014851,129.434921 L77.3312243,129.25513 L113.897155,108.720635 C118.38651,106.199617 121.190256,101.587929 121.31265,96.5637746 L121.316828,96.2205991 L121.316828,55.1514561 C121.316828,50.1092692 118.612846,45.4417025 114.200623,42.826383 L113.897155,42.6512656 L77.3312243,22.1167713 C72.8491571,19.5996952 67.3518694,19.5397648 62.8214584,21.9369801 Z M69.2442049,35.8512397 L88.2394468,68.1217272 L103.868354,54.7872625 L103.868354,94.6758324 C103.868354,97.7547043 101.333778,100.250689 98.2071383,100.250689 L40.2839921,100.24974 C37.1573717,100.249699 34.6227848,97.7537776 34.6227848,94.674925 L34.6227848,54.7872625 L50.2512033,68.1217272 L69.2442049,35.8512397 Z",mask:"url(#zhimg_ic_primelabel_01@2x-b)",opacity:".54"})))};pe.defaultProps={name:"PrivilegeLabel"};var he=pe,be=function(e){var t=e.data,n=e.className,r=e.extra,o=t||{},a=o.vipText,i=o.worthText,c=o.cardColor,s=void 0===c?0:c,l=r||{},u=l.isNewStyle,d=l.isMobile,f=function(e){return u?"".concat(e,d?"-newStyle-mobile":"-newStyle-pc"):e};return 0===s?null:g.a.createElement("div",{className:x()(f("KfeCollection-Privilege"),n)},g.a.createElement(de.a,{className:f("KfeCollection-Privilege-vipIcon")}),g.a.createElement("div",{className:f("KfeCollection-Privilege-content")},g.a.createElement("span",{className:"KfeCollection-Privilege-vipText"},a),g.a.createElement("span",null," ".concat(i))),!u&&g.a.createElement(he,{className:"KfeCollection-Privilege-label"}))},me=function(e){var t=e.data,n=e.className,r=e.extra,o=t||{},a=o.worthText,i=o.cardColor,c=void 0===i?0:i,s=r||{},l=s.isNewStyle,u=s.isMobile;return 2!==c?null:g.a.createElement("div",{className:x()(l?u?"KfeCollection-OrdinaryLabel-newStyle-mobile":"KfeCollection-OrdinaryLabel-newStyle-pc":"KfeCollection-OrdinaryLabel",n)},g.a.createElement("div",{className:"KfeCollection-OrdinaryLabel-content"},a))},ve=n(1283),ge=n(367),ye=n(132),Oe=function(e){var t=e.ua,n=void 0===t?{}:t,r=e.isDarkMode,o=void 0!==r&&r,a=e.isFixed,i=void 0!==a&&a;return g.a.createElement("div",{className:i?"KfeCollection-FabledStatement-fixed":"KfeCollection-FabledStatement"},g.a.createElement(ye.a,{isDarkMode:o,ua:n},g.a.createElement(ge.a.Provider,{value:n},g.a.createElement(ve.g,{disclaimerInfo:{excerpt:"包含虚构创作",description:"创作声明",subDescription:"内容中的情节存在虚构加工,仅供参考"}}))))};function je(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ce=function(e){f()(n,e);var t=je(n);function n(){return i()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.result,n=t.introCard,r=t.vipWorthInfo,o=t.isFabled,a=void 0!==o&&o,i=t.abParam,c=e.extra,s=c.ua,l=void 0===s?{}:s,u=c.isDarkMode,d=(r||{}).cardColor,f={isNewStyle:"1"===(i||{}).paTopLabel,isMobile:Boolean(l.Mobile)},p=f.isNewStyle&&!f.isMobile&&0!==d;return g.a.createElement("div",{className:"KfeCollection-AnswerTopCard-Container"},g.a.createElement("div",{className:p?"KfeCollection-AnswerTopCard-FlexContainer":""},2===d?g.a.createElement(me,{data:r,extra:f}):g.a.createElement(be,{data:r,className:f.isNewStyle?"":"KfeCollection-AnswerTopCard-Privilege",extra:f}),a&&f.isNewStyle&&g.a.createElement(Oe,{ua:l,isDarkMode:u,isFixed:p})),Boolean(n)&&g.a.createElement("div",null,g.a.createElement(ue,{introCard:n,extra:f})))}}]),n}(g.a.Component);we(Ce,"propTypes",{className:j.a.string,result:j.a.object.isRequired}),we(Ce,"defaultProps",{result:{articleDesc:{},vipWorthInfo:{},goodsCard:{},btnInfo:{},progressInfo:{},zaInfo:{}},extra:{ua:{}}});var ke=Ce,xe=n(53),Se=function(e){var t=e.answer,n=Object(o.useSelector)((function(e){return Object(J.z)(e,null==t?void 0:t.id)}))||{},a=n.isRequesting,i=n.error,c=n.result,s=Boolean(!a&&!i&&!c),l=Object(o.useDispatch)();Object(v.useEffect)((function(){s&&l(Object(J.v)(t.id))}),[s,l,t.id]);var u=Object(o.useSelector)(xe.l),d=Object(ye.f)().isDarkMode;return Object(r.b)(ke,{result:c,extra:{ua:u,isDarkMode:d}})},Ee=Object(X.a)(null)((function(e){var t=e.answer;return"paid"===(null==t?void 0:t.answerType)?Object(r.b)(Se,{answer:t}):null}))},function(e,t,n){"use strict";var r=n(4),o=n(43),a=n(2),i=n(1),c=n.n(i),s=n(27),l=n(34),u=n(11),d=n.n(u),f=n(1341),p=n(320),h=n.n(p),b=n(30),m=n(49),v=n.n(m),g=n(78),y=n(443),O=n(38),j=n.n(O),w=n(24),C=n(25),k=n(1104),x=n(376),S=n(382),E=n(916),R=n(31);var T=function(e){var t=e.className,n=e.text,r=e.onFiles,o=e.zaClickId,c=e.multiple,s=void 0===c||c,l=e.disabled,u=Object(i.useRef)(null);return Object(a.c)(a.a,{children:[Object(a.b)(R.c,{className:d()("VideoUploadButton",t),preset:"primary",color:"blue",disabled:l,onClick:function(e){o&&b.a.trackEvent(e.target,{id:o,action:"Upload"}),u.current.click()},children:n}),Object(a.b)("input",{type:"file",className:"VideoUploadButton-fileInput",ref:u,onChange:function(){return r(u.current.files,"Add")},accept:w.a.VIDEO.join(","),multiple:s})]})},A=n(1105);var N=n(1274),_=n(804),I=n(835),M=function(e){var t=e.dataTransfer;return t.items?Array.from(t.items).filter((function(e){return"file"===e.kind})).map((function(e){return e.getAsFile()})):Array.from(t.files)},L=function(e){var t=e.className;return Object(a.b)("div",{className:t,css:function(e){return{fontSize:14,lineHeight:"22px",color:e.colors.GBL05A,textAlign:"center",a:{textDecoration:"underline"}}},children:Object(a.c)("p",{children:["请不要添加无关的视频,详情查看"," ",Object(a.b)("a",{href:"https://www.zhihu.com/question/20118966",target:"_blank",rel:"noopener noreferrer",children:"知乎视频使用规范"}),Object(a.b)("br",{}),"上传视频,即代表你同意",Object(a.b)("a",{href:"https://www.zhihu.com/term/video",target:"_blank",rel:"noopener noreferrer",children:"《知乎视频用户协议》"})]})})};var P=function(e){var t=e.onFiles,n=e.enableZVideoListSelectorEntry,r=e.multiple,o=e.onOpenZVideoList;return Object(a.c)("div",{className:"VideoUploadHint",onDragEnter:function(e){return e.preventDefault()},onDragOver:function(e){return e.preventDefault()},onDrop:function(e){e.preventDefault();var n=M(e);t(n,"Drag")},children:[Object(a.b)("div",{className:"VideoUploadHint-iconBg",children:Object(a.b)(_.a,{className:"VideoUploadHint-icon"})}),Object(a.b)("div",{className:"VideoUploadHint-title",children:"拖放要上传的视频文件"}),Object(a.b)(T,{className:"VideoUploadHint-button",text:"上传视频",onFiles:t,zaClickId:7036,multiple:r}),r&&Object(a.b)("div",{className:"VideoUploadHint-uploadHint",children:"一次最多上传 20 个视频"}),n&&Object(a.c)("div",{className:"VideoUploadHint-listEntry",onClick:function(e){b.a.trackEvent(e.target,{id:8622,action:"Click"},{button:{text:"选择已发布的视频"}}),o()},children:["选择已发布的视频 ",Object(a.b)(I.a,{center:!0})]}),Object(a.b)(L,{className:"VideoUploadHint-footer"})]})},B=n(90),z=n(368),D=n(159),F=n(872),U=n(176),V=n(132);function q(e){var t=e.item,n=e.onCheck,r=Object(i.useState)(!1),c=Object(o.a)(r,2),s=c[0],l=c[1],u=t.id,d=t.title,f=t.description,p=t.imageUrl,h=t.publishedAt,b=t.video,m=null==b?void 0:b.duration;return Object(a.c)(B.Flex,{p:"20px 24px",justifyContent:"space-between",alignItems:"center",children:[Object(a.c)(B.Flex,{flex:1,children:[Object(a.c)(B.Box,{width:112,height:70,flexShrink:0,marginRight:"16px",css:{position:"relative",borderRadius:3,overflow:"hidden"},children:[Object(a.b)(B.Image,{width:"100%",height:"100%",src:p,alt:"",css:{objectFit:"cover"}}),Object(a.b)(B.Text,{fontSize:12,lineHeight:"14px",color:"GBK99A",css:{position:"absolute",bottom:4,right:7,textShadow:"0 0 5px rgba(0,0,0,0.5)"},children:Object(E.b)(m)})]}),Object(a.c)(B.Flex,{flexDirection:"column",justifyContent:"center",flex:1,children:[Object(a.b)(B.Text,{fontSize:14,fontWeight:500,lineHeight:"20px",color:"GBK03A",css:[Object(V.d)(1)],children:d}),Object(a.b)(B.Text,{mt:"6px",fontSize:14,lineHeight:"20px",color:"GBK04A",css:[Object(V.d)(1)],children:f}),Object(a.b)(B.Text,{mt:"8px",fontSize:13,lineHeight:"16px",color:"GBK06A",children:Object(U.toRelativeString)(h)})]})]}),Object(a.b)(F.a,{css:{marginLeft:16,flexShrink:0},checked:s,onChange:function(e){l(e.currentTarget.checked),n(u)}})]})}function H(e){var t,n=e.onClose,r=e.onSubmit,c=Object(i.useState)([]),l=Object(o.a)(c,2),u=l[0],d=l[1],f=Object(s.useSelector)((function(e){return e.zvideos.insertable}))||{},p=f.isLoading,h=f.data,b=f.paging,m=Object(s.useDispatch)(),v=Object(i.useCallback)((function(){m(Object(x.i)())}),[m]),g=Object(i.useCallback)((function(e){u.includes(e)?d(u.filter((function(t){return t!==e}))):d(u.concat([e]))}),[u]);return Object(a.c)(B.Box,{height:688,children:[Object(a.b)(B.Box,{m:"40px auto",fontSize:24,fontWeight:500,lineHeight:"30px",color:"GBK02A",textAlign:"center",children:"选择已发布的视频"}),Object(a.b)(z.b,{css:{marginBottom:100},onLoad:v,isLoading:null!=p&&p,isDrained:null!==(t=null==b?void 0:b.isEnd)&&void 0!==t&&t,getContainer:function(e){return e.parentElement.parentElement.parentElement},children:h.map((function(e,t){return Object(a.b)(D.a,{children:Object(a.b)(q,{item:e,onCheck:g})},t)}))}),Object(a.c)(B.Flex,{bg:"GBK99A",p:"32px 25px",width:"100%",height:100,justifyContent:"center",css:{position:"absolute",left:0,right:0,bottom:0},children:[Object(a.b)(R.c,{css:{flex:1},onClick:n,children:"返回"}),Object(a.b)(R.c,{disabled:0===u.length,css:{flex:1,marginLeft:18},preset:"primary",color:"blue",onClick:function(){r(u),n()},children:"添加"})]})]})}var K=n(73),Q=n(393),W=n(1168),G=n(1125),Y=n(35),Z=n(131),X=Object.assign;var J=function(e){return c.a.createElement(Z.a,X({width:"16",height:"16",viewBox:"0 0 16 16"},e),c.a.createElement("g",{fill:"none",fillRule:"evenodd"},c.a.createElement("circle",{cx:"8",cy:"8",r:"8",fill:"#06F"}),c.a.createElement("path",{stroke:"#fff",d:"M4.5 8L7 10.5l4.5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})))},$=Object.assign;var ee=function(e){return c.a.createElement(Z.a,$({width:"16",height:"16",viewBox:"0 0 16 16"},e),c.a.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#fff",stroke:"#999",fillRule:"evenodd",strokeWidth:"1.5"}))},te=Object.assign;var ne=function(e){return c.a.createElement(Z.a,te({width:"16",height:"16",viewBox:"0 0 16 16"},e),c.a.createElement("g",{fill:"none",fillRule:"evenodd"},c.a.createElement("circle",{cx:"8",cy:"8",r:"8",fill:"#3a76d0"}),c.a.createElement("path",{stroke:"#ebebeb",d:"M4.5 8L7 10.5l4.5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})))},re=Object.assign;var oe=function(e){return c.a.createElement(Z.a,re({width:"16",height:"16",viewBox:"0 0 16 16"},e),c.a.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#2e2e2e",stroke:"#646464",fillRule:"evenodd",strokeWidth:"1.5"}))},ae=function(e){var t=e.checked,n=Object(Y.a)(e,["checked"]),r=function(e,t){return e?t?ne:oe:t?J:ee}(Object(s.useSelector)((function(e){return"dark"===e.env.theme})),t);return Object(a.c)(a.a,{children:[Object(a.b)("input",Object.assign({type:"checkbox",checked:t},n)),Object(a.b)(r,{className:"CheckboxIcon"})]})},ie=n(1133),ce=n(952);var se=function(e){var t=e.className,n=e.imageUrl,r=e.duration,o=e.title,i=e.titleHint,c=e.titleBottom,s=e.tool;return Object(a.c)("div",{className:d()("VideoUploadItemInfo",t),children:[n&&Object(a.c)("div",{className:"VideoUploadItemInfo-imageContainer",children:[Object(a.b)("img",{className:"VideoUploadItemInfo-image",src:n,alt:""}),Object(a.b)("div",{className:"VideoUploadItemInfo-duration",children:Object(ce.a)(r)})]}),Object(a.c)("div",{className:"VideoUploadItemInfo-titleContainer",children:[Object(a.b)("div",{className:"VideoUploadItemInfo-title",children:o}),Object(a.b)("div",{className:"VideoUploadItemInfo-titleHint",children:i}),c]}),Object(a.b)("div",{className:"VideoUploadItemInfo-toolContainer",children:s})]})};var le=function(e){var t=e.className,n=e.current,r=e.max;return Object(a.b)("div",{className:d()("VideoUploadProgress",t),children:Object(a.b)("div",{className:"VideoUploadProgress-current",style:{width:"".concat(n/r*100,"%")}})})},ue=n(953);function de(e){var t=e/1e3/1e3;return"".concat(t>=1?Math.round(t):t.toFixed(1),"MB")}var fe=["CHANGE_MIND","TOO_SLOW","NO_PROGRESS","OTHER"].sort((function(){return.5-Math.random()})),pe={CHANGE_MIND:"我不想发了",TOO_SLOW:"上传速度太慢",NO_PROGRESS:"上传卡住了",OTHER:"其他"};var he=function(e){var t=Object(s.useDispatch)(),n=e.className,r=e.infoClassName,c=e.formClassName,l=e.video,u=e.shouldShowSyncToListCheckbox,f=void 0!==u&&u,p=e.forwardToZVideoPage,h=e.createVideoDraft,b=e.updateVideoDraft,m=e.onUploadError,v=e.onRemove,y=e.onPublish,O=e.handleVideoStateChange,w=e.shouldShowScheduledPublish,C=l.status,k=l.file,S=!!l.queryVideoId,E=Object(i.useRef)(),T=Object(i.useRef)(null),A=Object(i.useRef)(null),N=Object(i.useState)(!1),_=Object(o.a)(N,2),I=_[0],M=_[1],L=Object(i.useState)(!1),P=Object(o.a)(L,2),B=P[0],z=P[1],D=Object(i.useState)(""),F=Object(o.a)(D,2),U=F[0],V=F[1],q=Object(i.useState)(""),H=Object(o.a)(q,2),Y=H[0],Z=H[1],X=Object(i.useState)({uploadedSize:0}),J=Object(o.a)(X,2),$=J[0],ee=J[1],te=Object(i.useState)(!1),ne=Object(o.a)(te,2),re=ne[0],oe=ne[1],ce=Object(g.c)((function(){T.current&&(T.current.getSession("video",k).abort(),T.current=null,oe(!1))}));Object(i.useEffect)((function(){"uploading"!==C||re||(T.current=new Q.b({usage:"zvideo",apiRoot:j.a.fetchRoot.lens}),oe(!0))}),[C,k,re]);var he=Object(g.c)((function(){if(T.current){var e=T.current.getSession("video",k);O(e.state),ee(e.state),e.state.completed&&e.off("change",he)}})),be=re&&T.current&&0===$.uploadedSize;Object(i.useEffect)((function(){be&&(T.current.getSession("video",k).on("change",he),E.current=Date.now())}),[be,k,he]);var me=Object(g.c)((function(e,t){return"uploaded"===e?null==h?void 0:h(Object.assign({},t,{isLens:!0,isPlayable:!0,thumbnail:ue.a,url:"https://www.zhihu.com/video/".concat(t.id),playerUrl:"https://www.zhihu.com/video/".concat(t.id)})):"cover"===e?(ce(),null==b?void 0:b({imageUrl:t.thumbnail||ue.a})):void 0})),ve=Object(g.c)((function(){if(ce(),v(),U){var e=Math.round($.uploadedSize/k.size*100),n="取消时上传进度:".concat(e,"%"),r=Y?"「".concat(n,"」").concat(Y,"}"):n,o=(l||{}).id,a=Math.round((Date.now()-E.current)/1e3);t(Object(x.u)({reason:U,reasonDetail:r,zvideoId:o,uploadProgress:String(e),uploadedSize:String(Math.round($.uploadedSize)),zvideoTotalSize:String(k.size),uploadDurationSec:String(a)}))}Z(""),V("")})),ge=function(){"uploading"!==C?M(!0):z(!0)},ye=function(){return z(!1)},Oe=function(){return M(!1)},je=function(e){var t=e.target.name;V(t)},we=Object(i.useCallback)((function(e){Z(e.currentTarget.value)}),[Z]),Ce=["uploading","uploaded"].includes(C),ke=Object(i.useMemo)((function(){return de(k.size)}),[k.size]);return Object(a.c)("div",{className:d()("VideoUploadItem","VideoUploadItem--".concat(C),n),children:["pending"===C&&Object(a.b)(se,{className:r,title:k.name,titleHint:"等待上传 ".concat(ke),tool:Object(a.b)(R.c,{preset:"plain",onClick:ve,children:"取消上传"})}),"uploading"===C&&Object(a.b)(se,{className:r,title:k.name,titleHint:"UPLOADING_SUCCESS"===$.uploadingStatus?"上传完成,正在生成默认视频封面":"正在上传 ".concat(Math.round($.uploadedSize/k.size*100),"% ").concat(de($.uploadedSize)," / ").concat(ke),titleBottom:Object(a.b)(le,{className:"VideoUploadItem-progress",current:$.uploadedSize,max:k.size}),tool:Object(a.b)(R.c,{className:"VideoUploadItem-toolLastButton",preset:"plain",onClick:ge,children:"取消上传"})}),re&&Object(a.b)(W.a,{ref:A,className:"VideoUploadItem-videoUploader",coverButtonText:"编辑视频封面",uploadManager:T.current,onVideoProcessStep:me,onVideoUploadError:function(e){"uploaded"!==C&&m(e)},data:{upload:{file:k}},isPin:!0}),"uploadError"===C&&Object(a.b)(se,{className:r,title:k.name,titleHint:"上传失败,请尝试重新上传",tool:Object(a.b)(R.c,{preset:"plain",onClick:ve,children:"删除视频"})}),"uploaded"===C&&Object(a.b)(se,{className:r,title:k.name,titleHint:"上传完成 ".concat(S?"":ke),tool:S?"":Object(a.b)(R.c,{preset:"plain",onClick:ge,children:"删除视频"})}),"published"===C&&!p&&Object(a.b)(se,{className:r,imageUrl:l.imageUrl,duration:l.video.duration,title:l.title,titleHint:Object(a.b)("a",{href:"https://www.zhihu.com/zvideo/".concat(l.id),target:"_blank",rel:"noopener noreferrer",children:"发布成功,点击前往详情页查看"})}),Ce&&Object(a.b)(ie.a,{className:c,defaultVideo:l,defaultCampaignId:e.defaultCampaignId,shouldShowSyncToListCheckbox:f,shouldShowScheduledPublish:w,onRemove:ge,onSubmit:y,checkFormValid:function(){return"uploaded"!==C?"请在视频上传完成后发布":null}}),Object(a.b)(K.b,{className:"VideoUploadItem-modal",title:"确定取消上传该视频?",subtitle:"未上传成功的内容不会被保留",onClose:ye,children:B&&Object(a.c)("div",{className:"VideoUploadItem-modalContent",children:[Object(a.b)("p",{children:"为什么取消上传?你的建议也许能帮助我们"}),fe.map((function(e){return Object(a.c)("label",{children:[Object(a.b)(ae,{name:e,onChange:je,checked:U===e}),Object(a.b)("span",{className:"VideoUploadItem-OptionItem-Title",children:pe[e]})]},e)})),"OTHER"===U&&Object(a.b)(G.a,{className:"VideoUploadItem-feedback",placeholder:"请在这里填上你的反馈",value:Y,onChange:we,large:!0,maxLength:300}),Object(a.c)(K.a,{direction:"horizontal",children:[Object(a.b)(R.c,{preset:"primary",onClick:ye,children:"继续上传"}),Object(a.b)(R.c,{preset:"primary",onClick:ve,color:"blue",children:"取消上传"})]})]})}),Object(a.b)(K.b,{className:"VideoUploadItem-modal",title:"确定取消发布视频?",onClose:Oe,children:I&&Object(a.c)("div",{className:"VideoUploadItem-modalContent",children:[Object(a.b)("p",{css:{textAlign:"center"},children:"上传成功的内容将会保存至「草稿箱」"}),Object(a.c)(K.a,{direction:"horizontal",children:[Object(a.b)(R.c,{preset:"primary",onClick:Oe,children:"继续发布"}),Object(a.b)(R.c,{preset:"primary",onClick:ve,color:"blue",children:"取消发布"})]})]})})]})},be=n(980),me=n(868);var ve=function(){var e=Object(i.useState)([]),t=Object(o.a)(e,2),n=t[0],r=t[1],c=Object(s.useDispatch)(),l=Object(i.useRef)([]);Object(i.useEffect)((function(){c(Object(x.e)()).then((function(e){var t=e.payload.data;r(t)}))}),[c]);var u=Object(i.useCallback)((function(e){var t=e.index;if(!l.current[t]){l.current[t]=!0;var r=n[t];b.a.trackCardShow(null,{id:9517},{link:{url:r.url},button:{text:String(r.id)}})}}),[n]),d=Object(i.useCallback)((function(e){return Object(a.b)(B.Link,{href:e.url,target:"_blank",css:{display:"flex",flex:"0 0 100%"},"data-za-detail-view-id":9518,"data-za-extra":JSON.stringify({link:{url:e.url},button:{text:String(e.id)}}),children:Object(a.b)(me.a,{ratio:7.5,css:{width:"100%"},children:Object(a.b)(B.Image,{src:e.imageUrl,alt:"",size:"100%",css:{objectFit:"cover"}})})})}),[]);return 0===n.length?null:Object(a.b)(B.Flex,{css:{justifyContent:"center",height:"100%",overflowX:"scroll",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},children:Object(a.b)(be.a,{items:n.slice(0,5),renderItem:d,enableArrows:!0,interval:3e3,css:{maxWidth:1e3,margin:20,borderRadius:4},onSlide:u})})};n(1127);t.a=Object(l.withRouter)((function(e){var t,n=e.type,c=void 0===n?"create":n,l=e.defaultCampaignId,u=e.enableMultipleUpload,p=void 0!==u&&u,m=e.enableZVideoListSelectorEntry,O=void 0!==m&&m,R=e.shouldShowSyncToListCheckbox,_=void 0!==R&&R,I=e.onClose,M=e.onSubmit,L=e.forwardToZVideoPage,B=void 0!==L&&L,z=e.isInModal,D=void 0!==z&&z,F=e.shouldPublish,U=void 0===F||F,V=e.showBanner,q=void 0!==V&&V,K=e.shouldShowScheduledPublish,Q=void 0!==K&&K,W=e.route,G=e.router,Y=e.location.query.videoId,Z=Object(i.useState)(Y?[{queryVideoId:Y,tempId:h()(),file:{size:0,name:"已上传视频"},status:"uploaded",imageUrl:ue.a}]:[]),X=Object(o.a)(Z,2),J=X[0],$=X[1],ee=Object(i.useState)({}),te=Object(o.a)(ee,2),ne=te[0],re=te[1],oe=Object(i.useState)(!1),ae=Object(o.a)(oe,2),ie=ae[0],ce=ae[1],se=(Object(s.useSelector)((function(e){return e.zvideos.insertable}))||{}).data,le=Object(k.a)([x.b,x.t,x.o,x.p,C.h,x.i,x.r,S.j]),de=Object(o.a)(le,8),fe=de[0],pe=de[1],be=de[2],me=de[3],ge=de[4],ye=de[5],Oe=de[6],je=de[7],we=Object(i.useRef)();we.current=J;var Ce=Object(g.c)((function(e,t){var n=Object.assign({},J[e],{status:"uploaded",videoId:t.id,imageUrl:t.thumbnail,video:{id:t.id,duration:t.duration}});return $(J.map((function(t,r){return e===r?n:t}))),fe(n).then((function(t){var r=t.payload;$(we.current.map((function(t,o){return e===o?Object.assign({},n,{id:r.id}):t})))}))}));Object(i.useEffect)((function(){Y&&Ce(0,{id:Y}).then((function(){return Object(y.b)(Y,{apiRoot:j.a.fetchRoot.lens})})).then((function(e){e&&$((function(t){return[Object.assign({},t[0],{imageUrl:e})]}))}))}),[Y,Ce]),Object(i.useEffect)((function(){var e,t=null===(e=J[0])||void 0===e?void 0:e.id;if(t){var n=Object(N.a)(Y);n&&pe(t,{vessayOutline:n})}}),[J,Y,pe]);var ke=Object(i.useCallback)((function(e,t){var n=Object(E.a)(e,{multiple:p,numLimit:w.T-J.length}),o=n.message,a=n.abortUpload,i=n.validFiles;o&&(ge(o,a?"red":"white"),a)||(b.a.trackEvent(null,{id:9479,action:t,path:[{module:"Content"}]},{module:[{card:{content:[{video_count:null==i?void 0:i.length}]}}]}),$([].concat(Object(r.a)(J),Object(r.a)(null==i?void 0:i.map((function(e){return{tempId:h()(),file:e,title:Object(A.b)(e.name),status:"pending"}}))))))}),[p,J,ge]),xe=function(e){var t=Math.round(e.uploadedSize/e.fileSize*100);re({uploadProgress:t,fileSize:e.fileSize})},Se=Object(i.useCallback)((function(){(null==se?void 0:se.length)>0?ce(!0):ye().then((function(e){e.payload.data.length?ce(!0):ge("还没有发布过视频")}))}),[se,ye,ge]);Object(i.useEffect)((function(){if(!J.some((function(e){return"uploading"===e.status}))){var e=J.findIndex((function(e){return"pending"===e.status}));-1!==e&&$(J.map((function(t,n){return n!==e?t:Object.assign({},t,{status:"uploading",uploadedSize:0})})))}}),[J,$]);var Ee=Object(i.useCallback)((function(){G.setRouteLeaveHook(W,null),window.onbeforeunload=null}),[G,W]);Object(i.useEffect)((function(){if(W&&G){if(J.some((function(e){return"uploading"===e.status}))){var e,t,n=ne.uploadProgress,r=ne.fileSize,o=Math.round(1024*(null===(e=navigator)||void 0===e||null===(t=e.connection)||void 0===t?void 0:t.downlink)||1024e3);v.a.timing("VideoUpload.default.upload_cancel.downlink",o),v.a.timing("VideoUpload.default.upload_cancel.fileSize",r),v.a.timing("VideoUpload.default.upload_cancel.uploadProgress",n),G.setRouteLeaveHook(W,(function(){return"确定离开该页面?有暂未发布的视频,离开后内容将被清空"})),window.onbeforeunload=function(){return"确定离开该页面?有暂未发布的视频,离开后内容将被清空"}}else Ee();return Ee}}),[G,W,J,Ee,ne]);var Re=Object(i.useCallback)((function(e){$(J.filter((function(t,n){return e!==n})))}),[J]),Te=Object(i.useCallback)((function(e,t){var n;e&&ge(e),je(t),n=t,b.a.trackEvent(null,{id:9382,action:"StatusReport",path:[{module:"Content"}]},{module:[{card:{content:[{type:"Zvideo",id:String(n)}]}}],status:{result:"Success",event:{action:"Upload"}}})}),[ge,je]),Ae=Object(i.useCallback)((function(e,t,n){if(null==M||M([t.id]),null==I||I(),U){var r=t.id,o=t.publishAt,a=t.clubId;n&&o?me(r,Math.floor(o/1e3)).then((function(){Te("内容已保存在草稿箱,将在 ".concat(f.a(o,"yyyy/MM/dd HH:mm")," 时间发布"),r),Re(e)})):be(r).then((function(){Te(null,r),$(J.map((function(n,r){return e!==r?n:Object.assign({},n,t,{status:"published"})}))),a&&Oe(r,a),B&&(b.a.trackPageShow({id:9516}),window.location.href="https://www.zhihu.com/zvideo/".concat(r))}))}}),[M,I,U,be,me,Te,Oe,J,Re,B]);return ie?Object(a.b)(H,{onSubmit:M,onClose:function(){ce(!1)}}):void 0===Y&&0===J.length?Object(a.c)(a.a,{children:[q&&Object(a.b)(ve,{}),Object(a.b)(P,{onFiles:ke,enableZVideoListSelectorEntry:O,multiple:p,onOpenZVideoList:Se})]}):B&&"published"===(null===(t=J[0])||void 0===t?void 0:t.status)?Object(a.b)("div",{className:"ZVideoUploader-published",children:Object(a.b)("span",{children:"发布成功,跳转中..."})}):Object(a.c)("div",{className:d()("ZVideoUploader-form",{"ZVideoUploader-modalForm":D}),children:[Object(a.c)("div",{className:"ZVideoUploader-titleArea",children:[Object(a.b)("span",{className:"ZVideoUploader-title",children:"insert"===c?"添加视频":"上传视频"}),p&&Object(a.b)(T,{text:"添加视频",onFiles:ke,zaClickId:7037,disabled:J.length>=w.T})]}),J.map((function(e,t){var n;return Object(a.b)(he,{className:"ZVideoUploader-videoUploadItem",video:e,forwardToZVideoPage:B,handleVideoStateChange:xe,shouldShowSyncToListCheckbox:_,shouldShowScheduledPublish:Q,defaultCampaignId:l,createVideoDraft:function(e){return Ce(t,e)},updateVideoDraft:function(e){return function(e,t){var n=Object.assign({},J[e],t);$(J.map((function(t,r){return e===r?n:t}))),n.id&&pe(n.id,t)}(t,e)},onUploadError:function(){$(J.map((function(e,n){return t!==n?e:Object.assign({},e,{status:"uploadError"})})))},onRemove:function(){return Re(t)},onPublish:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Ae.apply(void 0,[t].concat(n))}},e.tempId||e.id||(null===(n=e.video)||void 0===n?void 0:n.id))}))]})}))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(1),a=n.n(o),i=n(365),c=n(887),s=n(131),l=Object.assign;var u=function(e){return a.a.createElement(s.a,l({width:"8",height:"10",fill:"none",viewBox:"0 0 8 10"},e),a.a.createElement("path",{fill:"#121212",d:"M1.315 9.302a.6.6 0 01-.915-.51v-7.52a.6.6 0 01.914-.51l6.11 3.754a.6.6 0 010 1.022l-6.11 3.764z",fillRule:"evenodd",clipRule:"evenodd"}))};function d(e){var t=e.videoId,n=e.zvideoId,a=e.title,s=e.playCount,l=void 0===s?0:s,d=e.voteupCount,f=void 0===d?0:d,p=e.isComplete,h=void 0!==p&&p,b=e.startTime,m=void 0===b?0:b,v=e.creationReferences,g=Number(m/1e3),y=Object(o.useRef)(),O=Object(o.useRef)({currentTime:0}),j=Object(o.useRef)(Object(c.c)(t,"*",!0));Object(o.useEffect)((function(){var e=j.current.subscribeMessage((function(e,t){e===c.b.DOM.TIMEUPDATE&&(O.current.currentTime=t.currentTime)}));return function(){return e.unsubscribe()}}),[]);return Object(r.c)("div",{className:"VideoContributionAnswer-container",children:[Object(r.b)("div",{className:"VideoContributionAnswer-video",children:Object(r.b)("iframe",{ref:y,className:"VideoContributionAnswer-player",src:"https://www.zhihu.com/video/".concat(t),allowFullScreen:!0})}),Object(r.c)("div",{className:"VideoContributionAnswer-stateBar",onClick:function(){j.current.dispatchMessage(y.current.contentWindow,c.a.PLAYER.PAUSE,{});var e=(O.current.currentTime+g).toFixed(1);window.open("https://www.zhihu.com/zvideo/".concat(n,"?playTime=").concat(e))},children:[Object(r.c)("div",{className:"VideoContributionAnswer-state",children:[Object(r.b)("div",{className:"VideoContributionAnswer-state--title",children:a}),Object(r.c)("div",{className:"VideoContributionAnswer-state--data",children:[Boolean(null==v?void 0:v.plaintext)&&"".concat(v.plaintext," · "),Object(i.cnNiceNumber)(l),"播放",f>0?" · ".concat(Object(i.cnNiceNumber)(f),"赞同"):null]})]}),!h&&Object(r.c)("div",{className:"VideoContributionAnswer-action",children:[Object(r.b)(u,{style:{marginRight:"6px"}}),"完整版"]})]})]})}},,,,function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(11),i=n.n(a),c=n(783),s=n(407);t.a=function(e){var t=e.show,n=e.setModal,a=e.children,l=e.className,u=e.onCancel,d=e.hideIcon,f=e.maskClosable,p=void 0===f||f,h=function(){n?n(!1):u&&u()},b=Object(o.useRef)();return Object(o.useEffect)((function(){var e=null;return t?(document.body.style.overflow="hidden",e=Object(s.a)(b.current)):document.body.style.overflow="auto",function(){e&&e()}}),[t]),Object(r.b)("div",{className:l,children:Object(r.c)("div",{ref:b,children:[Object(r.b)("div",Object.assign({className:i()({"ModalExp-background":t})},p&&{onClick:h})),Object(r.c)("div",{className:i()("ModalExp-content",{"ModalExp-modalShow":t}),onClick:function(e){e.stopPropagation()},children:[!d&&Object(r.b)(c.a,{size:24,fill:"#d3d3d3",className:"ModalExp-closeIcon",onClick:h}),a]})]})})}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(3),d=n.n(u),f=n(73),p=n(31),h=n(783),b=n(1181),m=n(1280);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var g=function(e){Object(a.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.memberHashId,n=e.isModalShow,r=e.handleCloseModal;return Object(s.b)(f.b,{className:"ChatBoxModal",spread:!0,onClose:r,contentClassName:"ChatBoxModal-content",closeButton:Object(s.b)(p.c,{preset:"plain",className:"ChatBoxModal-closeButton",onClick:r,"aria-label":"关闭",children:Object(s.b)(h.a,{className:"ChatBoxModal-closeIcon"})}),children:n&&Object(s.b)(b.a,{handleReceiveMessage:this.handleReceiveMessage,children:Object(s.b)(m.a,{type:"default",senderId:t,className:"Chat-ChatBox"},t)})})}}]),n}(l.Component);g.propTypes={memberHashId:d.a.string,handleCloseModal:d.a.func,isModalShow:d.a.bool}},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M2.224 21.667s4.24-1.825 4.788-2.056C15.029 23.141 22 17.714 22 11.898 22 6.984 17.523 3 12 3S2 6.984 2 11.898c0 1.86.64 3.585 1.737 5.013-.274.833-1.513 4.756-1.513 4.756zm5.943-9.707c.69 0 1.25-.569 1.25-1.271a1.26 1.26 0 0 0-1.25-1.271c-.69 0-1.25.569-1.25 1.27 0 .703.56 1.272 1.25 1.272zm7.583 0c.69 0 1.25-.569 1.25-1.271a1.26 1.26 0 0 0-1.25-1.271c-.69 0-1.25.569-1.25 1.27 0 .703.56 1.272 1.25 1.272z",fillRule:"evenodd"}))};i.defaultProps={name:"WeChat"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{fill:"#FB6622",d:"M15.518 3.06c8.834-.854 7.395 7.732 7.394 7.731-.625 1.439-1.673.309-1.673.309.596-7.519-5.692-6.329-5.692-6.329-.898-1.067-.029-1.711-.029-1.711zm4.131 6.985c-.661 1.01-1.377.126-1.376.126.205-3.179-2.396-2.598-2.396-2.598-.719-.765-.091-1.346-.091-1.346 4.882-.551 3.863 3.818 3.863 3.818zM5.317 7.519s4.615-3.86 6.443-1.328c0 0 .662 1.08-.111 2.797.003-.003 3.723-1.96 5.408.159 0 0 .848 1.095-.191 2.649 0 0 2.918-.099 2.918 2.715 0 2.811-4.104 6.44-9.315 6.44-5.214 0-8.026-2.092-8.596-3.102 0 0-3.475-4.495 3.444-10.33zm10.448 7.792s.232-4.411-5.71-4.207c-6.652.231-6.579 4.654-6.579 4.654.021.39.097 3.713 5.842 3.713 5.98 0 6.447-4.16 6.447-4.16zm-9.882.86s-.059-3.632 3.804-3.561c3.412.06 3.206 3.165 3.206 3.165s-.026 2.979-3.684 2.979c-3.288 0-3.326-2.583-3.326-2.583zm2.528 1.037c.672 0 1.212-.447 1.212-.998 0-.551-.543-.998-1.212-.998-.672 0-1.215.447-1.215.998 0 .551.546.998 1.215.998z",fillRule:"evenodd"}))};i.defaultProps={name:"Weibo"},t.a=i},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(35),o=n(2),a=n(90),i=n(3),c=n.n(i),s=n(804),l=n(1533);function u(e){var t,n,r=e.preset,i=e.deltaFixed,c=e.compareCount,u=void 0===c?null:c,d=e.originCount,f="small"===r,p=(n=void 0===d?null:d,null===(t=u)||null===n||0===t?null:(n-t)/t);if(null===p)return"--";var h=p>=0?{color:"GBL01A",icon:s.a}:{color:"GRD01A",icon:l.a},b=h.color,m=h.icon;return Object(o.c)(o.a,{children:[Object(o.b)(a.Text,{color:b,as:"span",children:Object(o.b)(m,{text:!0,center:!0})})," ",Object(o.b)(a.Text,{color:f&&b,as:"span",children:"".concat(i&&Math.abs(p)>10?"1000+":Math.abs(Math.round(1e4*p)/100),"%")})]})}function d(e){var t=e.className,n=e.textClassName,i=e.text,c=Object(r.a)(e,["className","textClassName","text"]),s="small"===c.preset;return Object(o.c)(a.Flex,{css:{fontSize:12,alignItems:"center",justifyContent:"space-between"},className:t,children:[Object(o.b)(a.Text,{className:n,color:s?"GBK06A":"GBL08A",children:i}),Object(o.b)(a.Text,{sx:{fontWeight:"bold"},css:{marginLeft:4},children:Object(o.b)(u,Object.assign({},c))})]})}d.propTypes={preset:c.a.oneOf(["normal","small"])},t.b=d},,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M2 18.242c0-.326.088-.532.237-.896l7.98-13.203C10.572 3.57 11.086 3 12 3c.915 0 1.429.571 1.784 1.143l7.98 13.203c.15.364.236.57.236.896 0 1.386-.875 1.9-1.955 1.9H3.955c-1.08 0-1.955-.517-1.955-1.9z",fillRule:"evenodd"}))};i.defaultProps={name:"TriangleUp"},t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),o=n(90),a=n(1553),i=n(232);function c(e){var t=e.handleClick;return Object(r.c)(i.a,{as:o.Flex,zaAction:"Unknown",zaText:"全屏编辑",zaType:"Button",aliginItem:"center",fontSize:14,color:"GBL05A",pr:"20px",lineHeight:"55px",css:{cursor:"pointer"},onClick:t,children:[Object(r.b)(o.Text,{mr:"10px",children:"全屏编辑"}),Object(r.b)(a.a,{text:!0,center:!0})]})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),o=n(1),a=n.n(o),i=n(90),c=n(155),s={textAnswer:"textAnswer",videoAnswer:"videoAnswer"},l=[{key:s.textAnswer,name:"图文回答"},{key:s.videoAnswer,name:"视频回答"}];function u(e,t){var n=e.activeTabKey,o=e.onChange;return Object(r.b)(c.b,{children:l.map((function(e){var a=e.key,l=e.name;return Object(r.b)(c.a,{css:{padding:"0 10px",":first-of-type":{paddingLeft:20}},children:Object(r.b)(i.Text,{ref:a===s.videoAnswer?t:null,onClick:function(){return o(a)},css:function(e){return Object.assign({color:e.colors.GBK03A,cursor:"pointer"},n===a&&{fontWeight:"bold",borderBottom:"4px solid ".concat(e.colors.GBL01A)})},children:l})},a)}))})}t.b=a.a.forwardRef(u)},function(e,t,n){e.exports=n.p+"assets/logo.804f083e.png"},,function(e,t,n){"use strict";n.d(t,"a",(function(){return Ar}));var r=n(43),o=n(849),a=n(14),i=n(66),c=n(15),s=n(16),l=n(17),u=n(9),d=n(2),f=n(3),p=n.n(f),h=n(1),b=n.n(h),m=n(27),v=n(19),g=n(34),y=n(11),O=n.n(y),j=n(90),w=n(369),C=n.n(w),k=n(1386),x=n(1543),S=n(1553),E=n(1555),R=n(1351),T=n(836),A=n(1556),N=n(31),_=n(84),I=n(911),M=n(250),L=n(235),P=n(375),B=n(175),z=n(176),D=n(37),F=n.n(D),U=n(366),V=n(1310),q=n(321),H=n(134),K=n(976),Q=n(30),W=n(232),G=n(1337);function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Z=function(e){Object(s.a)(n,e);var t=Y(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).handleHide=function(){F.a.set("AnswerOrg::know",!0),e.props.onClose()},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.shown,n=e.onClose;return Object(d.b)(H.b,{title:"机构帐号提问规则",subtitle:"这是一个「机构提问」,请在回答前了解以下规则",onClose:n,children:t&&Object(d.c)("div",{children:[Object(d.c)("ul",{className:"AnswerModal-list",children:[Object(d.b)("li",{children:"1. 提问机构如需使用你的回答,由提问机构联系你,共同商定确认使用条件。"}),Object(d.b)("li",{children:"2.「机构提问」下的回答,站内传播与社区公共提问下的回答有所区别。"}),Object(d.b)("li",{children:"3. 提问机构可能「隐藏」回答,被「隐藏」回答不在社区内流通。"})]}),Object(d.b)("a",{className:"AnswerModal-moreLink",href:"/org-intro#org-question",target:"_blank",children:"了解更多"}),Object(d.c)(H.a,{direction:"horizontal",children:[Object(d.b)(N.c,{onClick:this.handleHide,children:"不再显示"}),Object(d.b)(N.c,{color:"blue",preset:"primary",onClick:n,children:"知道了"})]})]})})}}],[{key:"getKnown",value:function(){return F.a.get("AnswerOrg::know")}}]),n}(h.Component),X=n(73);function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var $=function(e){Object(s.a)(n,e);var t=J(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).handleHide=function(){F.a.set("AnswerBrand::know",!0),e.props.onClose()},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.shown,n=e.onClose;return Object(d.b)(X.b,{title:"品牌提问规则",subtitle:"这是一个「品牌提问」,请在回答前了解:",onClose:n,children:t&&Object(d.c)("div",{children:[Object(d.b)("p",{children:"「品牌提问」由品牌方管理,回答由品牌方筛选后展示,传播与社区提问有所区别。回答著作权归作者所有。"}),Object(d.b)("a",{className:"AnswerModal-moreLink",href:"/introduction/brand_question",target:"_blank",children:"了解品牌提问"}),Object(d.c)(X.a,{direction:"horizontal",children:[Object(d.b)(N.c,{onClick:this.handleHide,children:"知道了,继续回答"}),Object(d.b)(N.c,{color:"blue",preset:"primary",onClick:n,children:"取消"})]})]})})}}],[{key:"getKnown",value:function(){return F.a.get("AnswerBrand::know")}}]),n}(h.Component),ee=n(1320);n(1127);var te=function(e){var t=e.show,n=e.type,r=e.onSubmit,o=e.onClose,a=e.defaultCampaignId,i=e.enableZVideoListSelectorEntry,c=e.enableMultipleUpload;return t?Object(d.b)(X.b,{className:"ZVideoUploader-modal",onClose:o,size:"fullPage",children:Object(d.b)(ee.a,{type:n,onSubmit:r,onClose:o,defaultCampaignId:a,enableZVideoListSelectorEntry:i,enableMultipleUpload:c,shouldShowSyncToListCheckbox:!0,isInModal:!0,shouldPublish:!1})}):null},ne=n(441),re=n(988),oe=n(444),ae=n(406),ie=n(102),ce=n(68),se=n(400),le=n(25),ue=n(36),de=n(53),fe=n(425),pe=n(132),he=n(1271),be=n(1290),me=n(240);function ve(e){var t=e.title,n=e.isSecondary,r=e.customTitle,o=e.children;return Object(d.c)(j.Flex,{pl:n?"20px":0,py:"20px",justifyContent:"space-between",alignItems:"center",css:function(e){return Object.assign({},Object(pe.c)({borderTop:"1px solid ".concat(e.colors.GBK09A)}))},children:[r||Object(d.b)(j.Text,{color:"GBL05A",fontSize:14,fontWeight:"bold",children:t}),o]})}var ge=n(78),ye=n(878),Oe=n(872),je=n(135),we=n(24);function Ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ke=function(e){Object(s.a)(n,e);var t=Ce(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).onChangeInputType=function(e){r.setState({checked:e.target.checked})},r.onChangeInputValue=function(e){r.setState({text:e.target.value})},r.submit=function(){var e=r.state.text;r.props.submitRewardText(e)};var o,i=e.tagline;return r.state={text:(o=i,o.replace(/^「/,"").replace(/」$/,"")||we.p),checked:!0},r}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.edit,r=this.state,o=r.text,a=r.checked;return Object(d.c)(H.b,{onClose:t,className:"RewardForm-rewardModal",children:[Object(d.b)("p",{className:"RewardForm-rewardTitle",children:n?"编辑赞赏描述":"开启赞赏"}),Object(d.b)(je.a,{className:"RewardForm-rewardInput",maxLength:"20",type:"text",value:o,onChange:this.onChangeInputValue}),Object(d.c)("div",{className:"RewardForm-remark",children:[!n&&Object(d.c)("label",{className:"RewardForm-protocol",children:[Object(d.b)(Oe.a,{className:"RewardForm-rewardCheckbox",onChange:this.onChangeInputType,checked:a,size:16}),"我已同意",Object(d.b)("a",{className:"RewardForm-rewardLink",href:"/terms/tipjar",children:"《知乎赞赏功能使用协议》"})]}),Object(d.b)("p",{className:"RewardForm-prompting",children:"还可以输入".concat(20-o.length,"个字")})]}),Object(d.b)(N.c,{className:O()("RewardForm-rewardSubmit",{"RewardForm-rewardSubmit-disabled":!a}),onClick:this.submit,disabled:!a,children:"确定"})]})}}]),n}(h.Component);ke.propTypes={onClose:p.a.func,submitRewardText:p.a.func,edit:p.a.bool,tagline:p.a.string},ke.defaultProps={tagline:we.p};var xe=n(379),Se=n(71),Ee=n.n(Se);function Re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Te=Object(h.createContext)({updateFormData:function(){},formData:{}}),Ae=function(e){var t=function(t){Object(s.a)(r,t);var n=Re(r);function r(){var e;Object(a.a)(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return(e=n.call.apply(n,[this].concat(o))).state={},e.answerFormDataProps={updateFormData:function(t){return e.setState(t)},getFormData:function(){return e.state}},e}return Object(c.a)(r,[{key:"render",value:function(){return Object(d.b)(Te.Provider,{value:this.answerFormDataProps,children:Object(d.b)(e,Object.assign({},this.props,this.answerFormDataProps))})}}]),r}(h.Component);return Ee()(t,e)},Ne=function(e){var t,n=Object(ue.b)(e),r=Object.values(e.entities.answers).filter((function(e){var t;return(null===(t=e.author)||void 0===t?void 0:t.urlToken)===(n&&n.urlToken)}))[0]||{};return null==r||null===(t=r.rewardInfo)||void 0===t?void 0:t.tagline};function _e(e){var t=e.answer,n=(t=void 0===t?{}:t).rewardInfo,o=(n=void 0===n?{}:n).isRewardable,a=void 0!==o&&o,i=e.question,c=i.id,s=i.relationship.isAnonymous,l=e.isAnswerRewardable,u=Object(h.useState)(!1),f=Object(r.a)(u,2),p=f[0],b=f[1],v=Object(m.useSelector)(Ne),g=Object(h.useState)(!1),y=Object(r.a)(g,2),O=y[0],j=y[1],w=Object(h.useContext)(Te),C=w.getFormData,k=w.updateFormData,x=Object(m.useDispatch)(),S=C().rewardTagline,E=Object(h.useState)(a||S),R=Object(r.a)(E,2),T=R[0],A=R[1];return Object(h.useEffect)((function(){k({rewardTagline:v})}),[v,k]),Object(h.useEffect)((function(){l&&(F.a.get("rewardNotication")||(j(!0),F.a.set("rewardNotication",!0)))}),[l]),Object(ge.i)((function(){return j(!1)}),O?2e3:null),l?Object(d.c)(d.a,{children:[Object(d.b)(ye.a,{checked:T,onChange:function(e){if(!s)return!e.target.checked||S?(k({rewardTagline:""}),A(!1),void Object(xe.n)(c,!1)):void b(!0);x(Object(le.h)("匿名回答无法开启赞赏,请先取消匿名","red"))},forceControlled:!0}),p&&Object(d.b)(ke,{submitRewardText:function(e){k({rewardTagline:e}),A(!0),x(Object(xe.n)()),b(!1)},onClose:function(){return b(!1)},tagline:S,edit:!1})]}):null}var Ie=n(877),Me={allowed:"允许规范转载",need_payment:"允许付费转载",disallowed:"禁止转载"},Le=function(e){var t=e.checked,n=e.onChange,r=e.text,o=e.disabled;return Object(d.c)(j.Flex,{ml:"16px",alignItems:"center",as:"label",children:[Object(d.b)(Ie.a,{disabled:o,size:13,checked:t,onChange:n}),Object(d.b)(j.Text,{ml:"4px",fontSize:13,children:r})]})};function Pe(e){var t=e.currentUser,n=Object(h.useContext)(Te),o=n.updateFormData,a=(0,n.getFormData)().reshipmentSettings,i=Object(h.useState)("allowed"),c=Object(r.a)(i,2),s=c[0],l=c[1],u="disallowed"!==s;Object(h.useEffect)((function(){a?l(a):t.caEnabled&&l("need_payment")}),[a,t]);var f=function(e){"need_payment"!==e||t.caEnabled||window.open("/copyright/invite"),l(e),o({reshipmentSettings:e})};return Object(d.c)(d.a,{children:[Object(d.b)(ve,{title:"允许转载",children:Object(d.b)(ye.a,{checked:u,onChange:function(){f(u?"disallowed":t.caEnabled?"need_payment":"allowed")},forceControlled:!0})}),Object(d.b)(ve,{title:"转载设置",isSecondary:!0,children:Object(d.b)(j.Flex,{css:{opacity:u?1:.3},children:Object.keys(Me).map((function(e){return"disallowed"===e||"need_payment"===e&&t.isOrg?null:Object(d.b)(Le,{disabled:!u,text:Me[e],checked:e===s,onChange:function(t){t.target.checked&&f(e)}},e)}))})})]})}function Be(e){var t=e.isAnonymous,n=e.handleToggleAnonymous,r=e.isSmall;return Object(d.b)(ye.a,{css:r?{transform:"scale(0.5)"}:{},checked:t,onChange:n,forceControlled:!0})}var ze=n(893);function De(e){var t=e.isSmall,n=Object(h.useContext)(Te),r=n.updateFormData,o=(0,n.getFormData)().pushActivity,a=Object(ze.a)();Object(h.useEffect)((function(){r({pushActivity:void 0===o||o})}),[o,r]);return Object(d.b)(ye.a,{css:t?{transform:"scale(0.5)"}:{},checked:o,onChange:function(e){var t=e.target.checked;Q.a.trackEvent(null,{id:8361,action:"Click"},{button:{text:t?"开":"关"}}),t?r({pushActivity:!0}):(Q.a.trackCardShow(null,{id:8362}),a.confirm("设置后,关注你的其他用户将无法在「首页 - 关注」阅读这篇回答",{title:"关闭推送给关注者吗",ok:"关闭推送"}).then((function(){Q.a.trackEvent(null,{id:8363,action:"Click"}),r({pushActivity:!1})})).catch((function(){})))},forceControlled:!0})}var Fe=n(0),Ue={all:"开放评论",censor:"预审评论",nobody:"关闭评论"},Ve={all:"允许任何人评论",follower:"允许关注我的人评论",followee:"允许我关注的人评论",paid:"付费用户可评论",censor:"答主筛选显示",nobody:"禁止评论"},qe=function(e){var t=e.checked,n=e.onChange,r=e.text,o=e.disabled;return Object(d.c)(j.Flex,{ml:"16px",alignItems:"center",as:"label",children:[Object(d.b)(Ie.a,{size:12,checked:t,onChange:n,disabled:o}),Object(d.b)(j.Text,{ml:"4px",fontSize:13,children:r})]})};function He(){var e=Object(m.useSelector)(ue.h),t=Object(h.useContext)(Te),n=t.updateFormData,o=(0,t.getFormData)().commentPermission,a=Object(h.useState)("all"),i=Object(r.a)(a,2),c=i[0],s=i[1],l="all"!==c;Object(h.useEffect)((function(){o&&s(o)}),[o]);var u=function(e){e!==c&&(s(e),e&&n({commentPermission:e}))},f=e?Ue:Object.keys(Ve).filter((function(e){if("paid"!==e)return"follower"!==e})).reduce((function(e,t){return Object.assign({},e,Object(Fe.a)({},t,Ve[t]))}),{});return Object(d.c)(d.a,{children:[Object(d.b)(ve,{title:"评论限制",children:Object(d.b)(ye.a,{checked:l,onChange:function(){u(l?"all":Object.keys(f)[1])},forceControlled:!0})}),Object(d.b)(ve,{title:"限制类型",isSecondary:!0,children:Object(d.b)(j.Flex,{justifyContent:"space-between",css:{opacity:l?1:.3},children:Object.keys(f).map((function(e){return"all"===e?null:Object(d.b)(qe,{text:f[e],checked:e===c,onChange:function(t){t.target.checked&&u(e)},disabled:!l},e)}))})})]})}var Ke=n(1270),Qe=n(372),We=n(1342),Ge=function(e){var t=e.questionId,n=e.currentUser,r=Object(m.useSelector)((function(e){return e.question.bio})),o=Object(m.useSelector)((function(e){return e.topic.bios})),a=(r[t]||{result:{type:"headline"}}).result;return"topic"===a.type&&(a.bio=o[a.topic.id]||a.bio),a.bio&&"headline"!==a.type?a.bio:n.headline?Object(d.b)(Qe.a,{inline:!0,html:(a||{}).bio||n.headline}):""};function Ye(e){var t=e.question,n=e.currentUser,o=Object(h.useState)(!1),a=Object(r.a)(o,2),i=a[0],c=a[1];return Object(d.c)(d.a,{children:[Object(d.c)(j.Flex,{maxWidth:454,color:"GBL05A",alignItems:"center",css:{cursor:"pointer"},onClick:function(){c(!0)},children:[Object(d.b)(Ke.a,{size:20}),Object(d.b)(j.Text,{ml:"5px",fontSize:13,color:"GBK06A",css:[Object(pe.d)(1)],children:Object(d.b)(Ge,{questionId:t.id,currentUser:n})})]}),Object(d.b)(We.a,{shown:i,question:t,onClose:function(){return c(!1)}})]})}var Ze=n(581),Xe=n(1015);function Je(e){var t=e.setScheduledPublish,n=Object(h.useRef)(),r=new Date;return Object(d.b)(Xe.a,{css:function(e){return{fontSize:13,color:e.colors.GBL05A}},onRef:n,value:r,min:r,max:Ze.a(r,7),onChange:function(e,r){t(!0,e),Q.a.setModule(n.current,{module:"Unknown",module_name:r.date?"日期":r.hours?"小时":r.minutes?"分钟":void 0}),Q.a.trackEvent(n.current,{action:"Click",id:5731,name:"回答"})}})}var $e=n(4),et=n(834),tt=n(798),nt=function(e){var t=e.openModal,n=e.handleHelpClick,r=function(e){n(e)};return Object(d.b)(X.b,{title:"什么是「创作声明」?",subtitle:"",onClose:function(){r(!1)},className:"DisclaimerEntry-helpWrap",children:t&&Object(d.c)("div",{children:[Object(d.c)("div",{className:"DisclaimerEntry-helpContent",children:[Object(d.b)("span",{className:"DisclaimerEntry-helpContentBold",children:"「创作声明」"}),"是为自己创作的添加个人声明的工具。当你在创作特定内容(如内容存在虚构或剧透等情节)时,可设置创作声明,该声明将会展示在回答或文章开头。创作声明表达的是创作者对内容负责的态度。知乎鼓励创作者设置创作声明,以方便知友更好地辨识和理解内容信息。你也可以在编辑内容时,关闭创作声明。"]}),Object(d.b)("button",{className:"DisclaimerEntry-helpBtn",onClick:function(){r(!1)},children:"我知道了"})]})})},rt={type:"none",description:"无声明"},ot=function(){var e=Object(h.useState)(!1),t=Object(r.a)(e,2),n=t[0],o=t[1];return Object(d.c)(d.a,{children:[Object(d.c)(j.Flex,{color:"GBL05A",alignItems:"center",children:[Object(d.b)(j.Text,{mr:"4px",fontSize:14,fontWeight:"bold",children:"创作声明"}),Object(d.b)(et.a,{text:!0,center:!0,css:{cursor:"pointer"},onClick:function(){o(!0),Q.a.trackEvent(null,{id:5604,action:"Click"}),Q.a.trackEvent(void 0,{id:7840,action:"Click"})}})]}),Object(d.b)(nt,{openModal:n,handleHelpClick:function(){return o(!1)}})]})},at=function(e){var t=e.question,n=e.answer,r=e.isSmall,o=e.positionStatus,a=Object(h.useContext)(Te),i=a.getFormData,c=a.updateFormData,s=Object(m.useDispatch)(),l=Object(m.useSelector)((function(e){return e.question.disclaimers[t.id]})),u=i().disclaimerType,f=null==l?void 0:l.find((function(e){return e.type===u})),p=Object(m.useSelector)((function(e){return Object(ce.d)(e,null==n?void 0:n.id)})),b=(null==l?void 0:l.length)>0&&(!(null==n?void 0:n.id)||p);Object(h.useEffect)((function(){p&&c(function(e){var t,n,r,o,a="open"===(null==e||null===(t=e.disclaimerInfo)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.status);return{isDisclaimerChecked:a,disclaimerType:a?null==e||null===(r=e.disclaimerInfo)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.type:"none"}}(p))}),[Boolean(p)]),Object(h.useEffect)((function(){l||s(Object(ie.M)(t.id))}),[]);return b?Object(d.b)(_.c,{positionStatus:o,toggler:Object(d.c)(j.Flex,Object.assign({alignItems:"center",color:"GBL05A",fontSize:r?12:13,css:{position:"relative",cursor:"pointer"}},r&&{marginLeft:"8px",padding:"0 10px",height:20,bg:"GBK10A",css:{borderRadius:10}},{children:[Object(d.b)(j.Text,{mr:"4px",color:r?"GBL05A":"GBK06A",children:(null==f?void 0:f.description)||rt.description}),Object(d.b)(tt.a,{text:!0,center:!0})]})),menuClassName:"AnswerItem-selfMenu",itemClassName:"AnswerItem-selectMenuItem",children:[].concat(Object($e.a)(l),[rt]).map((function(e){return Object(d.b)(I.a,{onClick:function(){return function(e){c({isDisclaimerChecked:"none"!==e.type,disclaimerType:e.type})}(e)},checked:e.type===u,children:e.description},e.type)}))}):null};function it(e){var t,n=e.question,r=e.answer,o=e.isVideoAnswer,a=e.handleToggleAnonymous,i=e.positionStatus,c=e.isReediting,s=e.setScheduledPublish,l=e.canScheduledPublish,u=e.settingExpanded,f=e.handleExpand,p=e.isFullScreen,b=e.inEditor,v=Object(m.useDispatch)(),g=Object(m.useSelector)(ue.b),y=Object(m.useSelector)((function(e){return e.switches})).isAnswerRewardable;Object(h.useEffect)((function(){void 0===y&&v(Object(me.b)(["isAnswerRewardable"]))}),[v,y]);var O=null==n||null===(t=n.relationship)||void 0===t?void 0:t.isAnonymous,w="show"===Object(de.n)("gue_anonymous"),C=(n||{}).questionType,k=g&&!g.isOrg,x=k&&("normal"===C||"commercial"===C&&w||O)&&!o,S=Boolean(n||r)&&!(null==r?void 0:r.id);return o&&c?null:Object(d.c)(j.Box,Object.assign({p:"0 20px",width:"100%"},p&&{mx:"auto",maxWidth:688},{bg:"GBK99A",css:function(e){return Object.assign({position:"relative"},u?Object(pe.c)({borderTop:"1px solid ".concat(e.colors.GBK09A)}):{boxShadow:"0 -1px 3px ".concat(e.colorMod(e.colors.GBK02B).alpha(.12))},(b&&!u||!b&&u)&&{height:0,overflow:"hidden"})},children:[Object(d.c)(j.Flex,{py:"13px",justifyContent:"space-between",alignItems:"center",css:function(e){return Object.assign({},Object(pe.c)({borderBottom:"1px solid ".concat(e.colors.GBK09A)}))},children:[Object(d.c)(j.Flex,{alignItems:"center",children:[Object(d.b)(j.Text,{mr:"4px",fontSize:15,fontWeight:"bold",color:"GBK03A",children:"发布设置"}),!u&&!o&&Object(d.c)(d.a,{children:[Object(d.c)(j.Flex,{ml:"16px",alignItems:"center",children:[Object(d.b)(ot,{}),Object(d.b)(at,{isSmall:!0,question:n,answer:r,positionStatus:i})]}),x&&!c&&Object(d.c)(j.Flex,{ml:"16px",alignItems:"center",children:[Object(d.b)(j.Text,{fontSize:14,fontWeight:"bold",color:"GBL05A",children:"匿名发布"}),Object(d.b)(Be,{isSmall:!0,isAnonymous:O,answer:r,handleToggleAnonymous:a})]}),!c&&Object(d.c)(j.Flex,{ml:"16px",alignItems:"center",children:[Object(d.b)(j.Text,{fontSize:14,fontWeight:"bold",color:"GBL05A",children:"推送给关注者"}),Object(d.b)(De,{isSmall:!0})]})]})]}),Object(d.c)(W.a,{as:j.Flex,zaAction:"Unknown",zaText:u?"收起":"全部设置",zaType:"Button",alignItems:"center",color:"GBL05A",css:{cursor:"pointer"},onClick:f,children:[Object(d.b)(j.Text,{fontSize:14,mr:"4px",children:u?"收起":"全部设置"}),u?Object(d.b)(he.a,{size:20,center:!0}):Object(d.b)(be.a,{size:20,center:!0})]})]}),Object(d.c)("div",{css:{maxHeight:u?"auto":0,overflowY:"hidden"},children:[!o&&Object(d.b)(ve,{customTitle:Object(d.b)(ot,{}),children:Object(d.b)(at,{question:n,answer:r,positionStatus:i})}),x&&!c&&Object(d.b)(ve,{title:"匿名发布",children:Object(d.b)(Be,{isAnonymous:O,answer:r,handleToggleAnonymous:a})}),!c&&l&&Object(d.b)(ve,{title:"定时发布",children:Object(d.b)(Je,{setScheduledPublish:s})}),!c&&k&&Object(d.b)(ve,{title:"编辑一句话介绍 / 话题经验",children:Object(d.b)(Ye,{question:n,currentUser:g})}),(n||r)&&!o&&y&&Object(d.b)(ve,{title:"开启赞赏",children:Object(d.b)(_e,{question:n,answer:r,isAnswerRewardable:!0})}),S&&!o&&Object(d.b)(ve,{title:"推送给关注者",children:Object(d.b)(De,{})}),!c&&Object(d.c)(d.a,{children:[Object(d.b)(Pe,{currentUser:g}),Object(d.b)(He,{})]})]})]}))}var ct=n(810);function st(e){var t=e.type,n=e.textCount,r=e.draftStatus,o=e.removeDraft,a=e.handleSubmit,i=e.isReediting,c=e.scheduledPublishAt,s=e.onCancelEdit,l=e.draft,u=e.canSubmit,f=e.isFullScreen;return Object(d.c)(j.Flex,Object.assign({justifyContent:"space-between",alignItems:"center",p:"10px 20px",width:"100%"},f&&{mx:"auto",maxWidth:688},{bg:"GBK99A",css:function(e){return{boxShadow:"0 -1px 3px ".concat(e.colorMod(e.colors.GBK02B).alpha(.12))}},children:[Object(d.c)(j.Flex,{alignItems:"center",children:[Object(d.b)(j.Text,{width:86,height:34,lineHeight:"34px",textAlign:"center",fontSize:14,color:"GBK99A",bg:"GBL01A",css:{borderRadius:3,cursor:u?"pointer":"not-allowed",opacity:u?1:.3},onClick:a,children:i?"提交修改":c?"定时发送":"发布".concat("answer"===t?"回答":"文章")}),i&&Object(d.b)(j.Text,{color:"GBL07A",ml:"10px",onClick:s,css:{cursor:"pointer"},children:l?"保存草稿并离开":"取消"})]}),Object(d.c)(j.Text,{fontSize:14,color:"GBL05A",children:[n?"共 ".concat(n," 字"):"",n&&r?"":"",r,r&&Object(d.b)(ct.a,{text:!0,center:!0,css:{marginLeft:8,cursor:"pointer"},onClick:o})]})]}))}var lt=n(959),ut=function(e){var t=e.shown,n=e.onClose;return Object(d.b)(X.b,{onClose:n,title:"该问题暂时只支持客户端进行回答",children:t&&Object(d.b)("div",{className:"SlideshowEditBlockModal",children:Object(d.b)(N.c,{preset:N.b.Primary,color:N.a.Blue,onClick:n,children:"知道了"})})})};ut.propTypes={shown:p.a.bool.isRequired,onClose:p.a.func.isRequired};var dt=ut,ft=n(1423),pt=n(451),ht=n(1341),bt=n(368),mt=n(998),vt=n(131),gt=Object.assign;var yt=function(e){return b.a.createElement(vt.a,gt({width:"150",height:"120",viewBox:"0 0 150 120"},e),b.a.createElement("path",{fill:"#EBEEF5",d:"M102 30.998A2.996 2.996 0 0098.998 28H50.002A2.996 2.996 0 0047 30.998v58.147l.193-.125c1.453-.939 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.939 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.939 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.939 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.453-.939 3.473-.94 4.927 0l2.537 1.64 2.536-1.64c1.413-.913 3.363-.94 4.807-.075V30.998zm-1.508 60.542c-.464-.3-1.209-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.209-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.209-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.209-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.209-.298-1.67 0l-4.165 2.692-4.165-2.692c-.464-.3-1.209-.298-1.67 0l-4.316 2.79A1.997 1.997 0 0144 93V30.997A5.996 5.996 0 0150.002 25h48.996A5.996 5.996 0 01105 30.998V93a2 2 0 01-.396 1.2l-4.112-2.66z"}),b.a.createElement("path",{fill:"#F7F8FA",d:"M55 38.999c0-.552.439-.999.999-.999H75c.552 0 .999.439.999.999V58a.993.993 0 01-.999.999H56a.993.993 0 01-.999-.999V39zm25 .501c0-.828.675-1.5 1.498-1.5h11.004c.827 0 1.498.666 1.498 1.5 0 .828-.675 1.5-1.498 1.5H81.498A1.495 1.495 0 0180 39.5zm0 9c0-.828.675-1.5 1.498-1.5h11.004c.827 0 1.498.666 1.498 1.5 0 .828-.675 1.5-1.498 1.5H81.498A1.495 1.495 0 0180 48.5zm0 9c0-.828.675-1.5 1.498-1.5h11.004c.827 0 1.498.666 1.498 1.5 0 .828-.675 1.5-1.498 1.5H81.498A1.495 1.495 0 0180 57.5zm-25 9c0-.828.677-1.5 1.505-1.5h35.99a1.499 1.499 0 110 3h-35.99A1.499 1.499 0 0155 66.5zm0 9c0-.828.665-1.5 1.505-1.5h24.99a1.499 1.499 0 110 3h-24.99A1.499 1.499 0 0155 75.5z"}))};function Ot(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var jt={current:"当前草稿",saved:"自动保存",published:"发布过的版本"},wt=function(e){Object(s.a)(n,e);var t=Ot(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).formatDate=function(e){return ht.a("current"===e.versionType?1e3*e.updatedAt:1e3*e.createdAt,"yyyy-MM-dd HH:mm")},e.handleDraftClick=function(e){e.preventDefault()},e}return Object(c.a)(n,[{key:"renderCurrentDraft",value:function(){var e=this.props,t=e.currentDraft,n=e.onRevert,r=t.isFetching,o=t.data;return Object(d.c)("div",{className:"DraftHistory-main",children:[r&&Object(d.b)(P.a,{className:"DraftHistory-loading"}),!r&&o&&Object(d.c)(h.Fragment,{children:[o.draft.title&&Object(d.b)("div",{className:"DraftHistory-draftTitle",children:o.draft.title}),Object(d.b)(mt.a,{className:"DraftHistory-draft",html:o.draft.content,onClick:this.handleDraftClick}),Object(d.c)("div",{className:"DraftHistory-actions",children:[Object(d.c)("div",{className:"DraftHistory-meta",children:[this.formatDate(o)," ",jt[o.versionType]]}),Object(d.b)(N.c,{className:"DraftHistory-revert",disabled:"current"===o.versionType,onClick:function(){return n(o)},children:"恢复此版本"})]})]})]})}},{key:"render",value:function(){var e=this,t=this.props,n=t.history,r=t.currentVersion,o=t.currentDraft,a=t.getHistory,i=t.onSelect;return n?n.isFetching&&!n.items?Object(d.b)("div",{className:"DraftHistory",children:Object(d.b)(P.a,{className:"DraftHistory-loading"})}):Object(d.c)("div",{className:"DraftHistory",children:[Object(d.c)("div",{className:"DraftHistory-side",children:[Object(d.b)("div",{className:"DraftHistory-title",children:"历史版本"}),Object(d.b)(bt.b,{className:"DraftHistory-history",getContainer:function(e){return e},isLoading:n.isFetching,isDrained:n.isDrained,onLoad:a,children:Object(d.b)("div",{children:n.items&&n.items.map((function(t,n){return Object(d.c)("a",{href:"#",className:O()("DraftHistory-version",{"DraftHistory-version--selected":r&&t.versionType===r.versionType&&t.id===r.id}),onClick:function(e){e.preventDefault(),i(t)},children:[Object(d.b)("div",{className:"DraftHistory-versionDate",children:e.formatDate(t)}),Object(d.b)("div",{className:"DraftHistory-versionType",children:jt[t.versionType]})]},n)}))})})]}),n.items&&!n.items.length&&Object(d.b)("div",{className:"DraftHistory-main",children:Object(d.c)("div",{className:"DraftHistory-empty",children:[Object(d.b)(yt,{className:"DraftHistory-emptyIcon"}),Object(d.b)("div",{className:"DraftHistory-emptyText",children:"还没有历史版本"})]})}),o&&this.renderCurrentDraft()]}):null}}]),n}(h.Component);wt.propTypes={history:p.a.object,currentVersion:p.a.object,currentDraft:p.a.object,onSelect:p.a.func,onRevert:p.a.func};var Ct=wt;function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var xt=function(e){Object(s.a)(n,e);var t=kt(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).state={currentVersion:null},e.getHistory=function(){var t=e.props,n=t.type,r=t.id;(0,t.getHistory)(n,r)},e.handleSelect=function(t){e.setState({currentVersion:t})},e.handleRevert=function(t){var n=e.props,r=n.revert,o=n.onReverted;r(t.versionType,t.id).then((function(){o&&o(t)}))},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.type,n=e.id;(0,e.getHistory)(t,n)}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.drafts,o=n.getDraft,a=this.state.currentVersion,i=t.currentVersion;!a||i&&i.versionType===a.versionType&&i.id===a.id||r["".concat(a.versionType,"_").concat(a.id)]||o(a.versionType,a.id)}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.type,n=e.id;(0,e.reset)(t,n)}},{key:"render",value:function(){var e=this.props,t=e.history,n=e.drafts,r=this.state.currentVersion;return Object(d.b)(Ct,{history:t,currentVersion:r,currentDraft:r?n["".concat(r.versionType,"_").concat(r.id)]:null,getHistory:this.getHistory,onSelect:this.handleSelect,onRevert:this.handleRevert})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.history&&e.history.items&&e.history.items.length&&!t.currentVersion?{currentVersion:e.history.items[0]}:null}}]),n}(h.Component);xt.propTypes={type:p.a.string.isRequired,id:p.a.number.isRequired,onReverted:p.a.func};var St=Object(m.connect)((function(e,t){var n=t.type,r=t.id;return{history:e.draftHistory.history["".concat(n,"_").concat(r)],drafts:e.draftHistory.drafts}}),{getHistory:pt.c,getDraft:pt.b,revert:pt.e,reset:pt.d})(xt);function Et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Rt=function(e){Object(s.a)(n,e);var t=Et(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).handleReverted=function(t){var n=e.props,r=n.onClose,o=n.onReverted;o&&o(t),r&&r(),Q.a.trackEvent(null,{id:5016,action:"Click"})},e.handleClose=function(){var t=e.props.onClose;t&&t(),Q.a.trackEvent(null,{id:5015,action:"Click"})},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.shown,n=e.type,r=e.id;return Object(d.b)(X.b,{className:"DraftHistoryModal",size:"fullPage",onClose:this.handleClose,children:t&&Object(d.b)(St,{type:n,id:r,onReverted:this.handleReverted})})}}]),n}(h.Component);Rt.propTypes={shown:p.a.bool.isRequired,onClose:p.a.func,type:p.a.string.isRequired,id:p.a.number.isRequired,onReverted:p.a.func},Rt.defaultProps={shown:!0};var Tt=Rt,At=Object(h.forwardRef)((function(e,t){var n,o=e.type,a=e.id,i=e.getId,c=e.handleReverted,s=Object(h.useState)(!1),l=Object(r.a)(s,2),u=l[0],f=l[1],p=Object(ge.c)((function(){return f(!0)})),b=Object(ge.c)((function(){return f(!1)}));return Object(h.useImperativeHandle)(t,(function(){return{handleOpen:p,handleClose:b}}),[p,b]),Object(d.b)(Tt,{shown:u,onClose:function(){return f(!1)},type:o,id:null!==(n=null==i?void 0:i())&&void 0!==n?n:a,onReverted:c})})),Nt=function(e){var t=e.type,n=e.id,r=e.syncDraft,o=e.getId,a=e.shouldShowToolbarButton,i=void 0===a?function(){return!0}:a,c={};c.draftModalRef=Object(h.createRef)(null);return{initialize:function(e){Object.assign(c,e)},handleCommand:function(e){return"toggle-draft-history-modal"===e?(c.draftModalRef.current.handleOpen(),"handled"):"not-handled"},components:[Object(d.b)(At,{type:t,id:n,getId:o,ref:c.draftModalRef,handleReverted:function(e){c.getEditorRef().props.resetWithValue(e.draft.content)}},"draft_history_modal")],toolbar:{section:"menu",label:"历史版本",icon:ft.a,onClick:function(){r.flush(),c.draftModalRef.current.handleOpen(),Q.a.trackEvent(null,{id:5013,action:"Click",name:"历史版本入口"})},shouldShow:i}}},_t=n(18),It=function(e){return b.a.createElement(_t.a,e,b.a.createElement("path",{d:"M17 3a1 1 0 0 1 .89 1.458l-.058.097-1.537 2.305C19.405 8.202 21.5 11 21.5 14.43 21.5 19.093 17.609 22 12 22s-9.5-2.907-9.5-7.571c0-3.43 2.096-6.227 5.205-7.569L6.168 4.555a1 1 0 0 1 .72-1.55L7 3h10zm-5 5c-4.273 0-7.5 2.761-7.5 6.429C4.5 17.826 7.37 20 12 20s7.5-2.174 7.5-5.571C19.5 10.76 16.273 8 12 8zm2.47.97l1.06 1.06a.25.25 0 0 1 0 .354L12.914 13h2.336a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25H13v1h2.25a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25H13v.75a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V18H8.75a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25H11v-1H8.75a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h2.336L8.47 10.384a.25.25 0 0 1 0-.354l1.06-1.06a.25.25 0 0 1 .354 0l1.94 1.939a.25.25 0 0 0 .353 0l1.94-1.94a.25.25 0 0 1 .353 0zM15.13 5H8.868l.668 1h4.928l.667-1z"}))};It.defaultProps={name:"Income"};var Mt=It,Lt=n(904),Pt=n(905),Bt=n(1118),zt=n(1092),Dt=Object(h.forwardRef)((function(e,t){var n=e.getStore,o=e.getContentInfo,a=Object(h.useState)(!1),i=Object(r.a)(a,2),c=i[0],s=i[1],l=o(),u=l.id,f=l.type;Object(h.useImperativeHandle)(t,(function(){return{setShowUserProfitCardSelector:s}}),[]);var p=function(){return Object(zt.a)(n().getEditorState()).filter((function(e){return"ad-link-card"===e.getType()}))};return Object(d.b)(d.a,{children:Object(d.b)(X.b,{className:"UserProfitCardSelector",size:"large",onClose:function(){s(!1)},children:c&&Object(d.b)("div",{className:"UserProfitCardSelector-content",children:Object(d.b)(K.a,{className:"UserProfitCardSelector-iframe",src:"https://www.zhihu.com/selection/profit-selector?contentId=".concat(u,"&contentType=").concat(f),onMessage:function(e){var t=n().getEditorRef();if("ProfitCardSelector/submitProfitCardInfo"===(null==e?void 0:e.type)&&(null==e?void 0:e.payload)){var r=e.payload,o=r.type,a=r.id,i=r.url;if(r.preventClose||s(!1),"inserLinkCard"===o&&t.props.handleCommand("insert-link-card:".concat(i)),"insertMCNLinkCard"===o){if(Object(zt.a)(n().getEditorState()).filter((function(e){return"mcn-link-card"===e.getType()})).size>=30)return void B.a.alert(null,{title:"一篇内容最多可添加 ".concat(30," 个商品")});t.props.handleCommand("insert-mcn-link-card:".concat(a))}if("insertAdLinkCard"===o){if(a.startsWith("ZhiTask_"))if(p().filter((function(e){return e.getData().id.startsWith("ZhiTask_")})).size>=5)return void B.a.alert("一篇内容最多可添加 ".concat(5," 个「知+自选」卡片"));if(a.startsWith("fee_"))if(p().filter((function(e){return e.getData().id.startsWith("fee_")})).size>=1)return void B.a.alert("一篇内容最多可添加 ".concat(1," 个「付费回答」卡片"));t.props.handleCommand("insert-ad-link-card:".concat(a))}}}})})})})})),Ft=function(e){var t=e.shouldDisabled,n=e.shouldShow,r=void 0===n?function(){return!0}:n,o=e.getContentInfo,a=void 0===o?function(){}:o,i={};return i.containerRef=Object(h.createRef)(),{initialize:function(e){Object.assign(i,e)},toolbar:{label:"用户收益",icon:Mt,shouldShow:r,shouldDisabled:function(){return!!(null==t?void 0:t())||null},section:Lt.a.CUSTOM_MAIN,toolType:Bt.b.ENTITY,onClick:function(){i.containerRef.current.setShowUserProfitCardSelector(!0),Q.a.trackEvent(null,{id:6097,action:"Click"})},priority:1},toolbarV2:{label:"收益",text:"收益",icon:Mt,shouldShow:r,shouldDisabled:function(){return!!t()||null},section:Pt.a.BUSINESS_MEDIA,toolType:Bt.b.ENTITY,onClick:function(){i.containerRef.current.setShowUserProfitCardSelector(!0),Q.a.trackEvent(null,{id:6097,action:"Click"})},priority:1},components:Object(d.b)(Dt,{ref:i.containerRef,getStore:function(){return i},getContentInfo:a})}},Ut=function(e){return b.a.createElement(_t.a,e,b.a.createElement("path",{d:"M9.586 3a1 1 0 0 1 .707.293l1.414 1.414a1 1 0 0 0 .707.293H21a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h6.586zM4 11v6.75c0 .138.112.25.25.25h15.5a.25.25 0 0 0 .25-.25V11H4zm0-2h16V7.25a.25.25 0 0 0-.25-.25h-8.164a1 1 0 0 1-.707-.293L9.464 5.293A1 1 0 0 0 8.757 5H4.25a.25.25 0 0 0-.25.25V9z"}))};Ut.defaultProps={name:"Folder"};var Vt=Ut;var qt=function(e){var t=e.shown,n=e.onClose,r=e.onSubmit,o=Object(h.useCallback)((function(e){var t=e.type,o=e.payload;"browser/closeCurrentPage"!==t?"editor/submitAttachment"!==t||r(o.files):n()}),[r,n]);return Object(d.b)(X.b,{className:"BaiduFileSelector",size:"large",onClose:n,children:t&&Object(d.b)("div",{className:"BaiduFileSelector-content",children:Object(d.b)(K.a,{className:"BaiduFileSelector-iframe",src:"https://www.zhihu.com/appview/editor/attachment/baidu",onMessage:o})})})},Ht=Object(h.forwardRef)((function(e,t){var n=Object(h.useState)(!1),o=Object(r.a)(n,2),a=o[0],i=o[1];return Object(h.useImperativeHandle)(t,(function(){return{setBaiduFileSelectorShown:i}}),[]),Object(d.b)(qt,{shown:a,onClose:function(){return i(!1)},onSubmit:function(t){i(!1),e.onSubmit(t)}})})),Kt=function(){var e={},t=function(t){e.getEditorRef().props.handleCommand("insert-file-link-card:".concat(JSON.stringify(t)))},n=function(){return Object(zt.a)(e.getEditorState()).filter((function(e){return"file-link-card"===e.getType()}))};return e.containerRef=Object(h.createRef)(),{initialize:function(t){Object.assign(e,t)},components:Object(d.b)(Ht,{handleSubmit:t,ref:e.containerRef,onSubmit:t}),toolbar:{section:Lt.a.CUSTOM_MAIN,label:"上传附件",icon:Vt,toolType:Bt.b.ENTITY,onClick:function(){n().size>=10?B.a.alert(null,{title:"一篇内容最多可添加 ".concat(10," 个附件")}):e.containerRef.current.setBaiduFileSelectorShown(!0)},priority:2},toolbarV2:{section:Pt.a.BUSINESS_MEDIA,label:"上传附件",text:"网盘",icon:Vt,toolType:Bt.b.ENTITY,onClick:function(){n().size>=10?B.a.alert(null,{title:"一篇内容最多可添加 ".concat(10," 个附件")}):e.containerRef.current.setBaiduFileSelectorShown(!0)},priority:2}}},Qt=n(1554),Wt=n(862),Gt=function(e){var t=e.className,n=e.onClose,r=e.shown,o=e.allInviters,a=e.onChoose;return Object(d.b)(H.b,{title:"添加「谢邀」卡片",subtitle:"选择邀请人,添加感谢他的卡片",onClose:n,className:t,css:{width:"536px"},children:r&&o.map((function(e){return Object(d.c)(j.Flex,{css:{padding:"12px 0"},children:[Object(d.b)(Wt.a,{author:e}),Object(d.b)(N.c,{color:"color",preset:"blue",css:{height:"32px",marginLeft:"auto"},onClick:function(){Q.a.trackEvent(null,{id:7682,action:"Click"}),a&&a(e)},children:"选择"})]},e.id)}))})},Yt=n(1090),Zt=function(e){var t=e.shown,n=e.hasShown,r=e.children,o=Object(h.useRef)(n),a=Object(h.useRef)(t);return Object(h.useEffect)((function(){!t&&a.current&&(o.current=!0),a.current=t}),[t]),t&&!o.current&&r},Xt=function(e){var t=e.className,n=e.shown,o=e.hasShown,a=e.inviters,i=e.onConfirm,c=e.onCancel,s=Object(h.useState)(n),l=Object(r.a)(s,2),u=l[0],f=l[1],p=Object(h.useRef)(n);return Object(h.useEffect)((function(){p.current!==n&&f(n),p.current=n}),[n]),(null==a?void 0:a.length)>0&&Object(d.b)(Zt,{shown:u,hasShown:o,children:Object(d.c)(j.Flex,{className:t,pb:"12px",px:"16px",mx:"-20px",mb:"16px",color:"GBK05A",alignItems:"center",sx:{borderBottom:"1px solid",borderColor:"GBK09A",fontSize:"15px",lineHeight:"20px",position:"relative",zIndex:"0"},children:[a.map((function(e,t){return Object(d.b)(j.Image,{src:a[0].avatarUrl,size:24,sx:{borderRadius:"50%",border:"2px solid",borderColor:"GBK99A",position:"relative",zIndex:a.length-t,marginLeft:t?"-14px":"0"}},e.id)})),Object(d.b)(j.Text,{ml:"8px",children:a[0].name+(a.length>1?"等 ".concat(a.length," 人"):"")}),"邀请你回答",Object(d.b)(j.Text,{color:"primary",ml:"16px",css:{cursor:"pointer"},onClick:function(){Q.a.trackEvent(null,{id:7683,action:"Click",path:[{module_name:1===a.length?"0":"1"}]},{button:{text:"添加谢邀"}}),i&&i(a)},children:"添加谢邀"}),Object(d.b)(j.Text,{ml:"16px",css:{cursor:"pointer"},onClick:function(){f(!1),Q.a.trackEvent(null,{id:7683,action:"Click",path:[{module_name:1===a.length?"0":"1"}]},{button:{text:"忽略"}}),c&&c()},children:"忽略"})]})})};var Jt=Object(h.forwardRef)((function(e,t){var n=e.getAllInviters,o=e.inviterQuery,a=e.getStore,i=e.getInitialThankInviterInfo,c=Object(h.useState)(!1),s=Object(r.a)(c,2),l=s[0],u=s[1],f=Object(h.useState)(i()),p=Object(r.a)(f,2),b=p[0],m=p[1],v=Object(h.useState)(null),g=Object(r.a)(v,2),y=g[0],O=g[1],j=Object(ge.c)((function(){return u(!1)}));return Object(h.useImperativeHandle)(t,(function(){return{openInviterListModal:function(){return u(!0)},getInvitersData:function(){return y},getThankInviterInfo:function(){return b}}}),[y,b]),Object(h.useEffect)((function(){n().then((function(e){var t=e.payload;O(t.data);var n=a();n.setEditorState(n.getEditorState())}))}),[]),Object(d.c)(d.a,{children:[b&&Object(d.b)(Yt.a,{css:{marginBottom:16,marginTop:"4px !important"},showDeleteButton:!0,item:{isLabeled:!0},inviter:b,onDelete:function(){m(null)}}),(null==y?void 0:y.length)>0&&Object(d.b)(Xt,{hasShown:Boolean(o)||Boolean(b),shown:!b,inviters:y,onConfirm:function(e){(null==e?void 0:e.length)&&(1!==e.length?u(!0):m(e[0]))}}),Object(d.b)(Gt,{onClose:j,shown:l,allInviters:y,onChoose:function(e){m(e),j()}})]})})),$t=function(e){var t=e.getShouldShowToolbarButton,n=e.getAllInviters,r=e.inviterQuery,o=e.getInitialThankInviterInfo,a={},i=Object(h.createRef)(null);return{initialize:function(e){Object.assign(a,e)},componentsBeforeEditor:[{component:Object(d.b)(Jt,{getAllInviters:n,inviterQuery:r,ref:i,getStore:function(){return a},getInitialThankInviterInfo:o}),priority:0}],getExtraPluginData:function(){var e,t,n;return t=o,n=null===(e=i.current)||void 0===e?void 0:e.getThankInviterInfo(),t?n?n.id===t.id?{}:{thankInviterStatus:"open",thankInviter:n.id}:{thankInviterStatus:"close"}:n?{thankInviterStatus:"open",thankInviter:n.id}:{}},toolbar:{label:"添加谢邀",section:Lt.a.CUSTOM_MAIN,priority:3,icon:Qt.a,onClick:function(){i.current.openInviterListModal()},shouldShow:t,shouldDisabled:function(){var e,t,n;return Boolean(!(null===(e=i.current)||void 0===e||null===(t=e.getInvitersData())||void 0===t?void 0:t.length)||(null===(n=i.current)||void 0===n?void 0:n.getThankInviterInfo()))}},toolbarV2:{label:"添加谢邀",section:Pt.a.BUSINESS_MEDIA,text:"谢邀",icon:Qt.a,priority:3,onClick:function(){i.current.openInviterListModal()},shouldShow:t,shouldDisabled:function(){var e,t,n;return Boolean(!(null===(e=i.current)||void 0===e||null===(t=e.getInvitersData())||void 0===t?void 0:t.length)||(null===(n=i.current)||void 0===n?void 0:n.getThankInviterInfo()))}}}},en=n(1026),tn=n(1302),nn=n(7),rn=n(997),on=n(373),an=n(799),cn=function(e){var t=e.tab,n=e.tabType,o=e.tabChange,a=e.searchPublicList,i=Object(h.useState)(""),c=Object(r.a)(i,2),s=c[0],l=c[1];return Object(d.c)(j.Flex,{alignItems:"center",justifyContent:"space-between",css:function(e){return{height:"50px",padding:"0 20px",boxShadow:"inset 0px -0.5px 0px ".concat(e.colors.GBK09A)}},children:[Object(d.b)(j.Flex,{children:t.map((function(e){return Object(d.b)("div",{className:O()("MaterialLibraryHeader-classify",{active:n===e.type}),onClick:function(){o(e.type)},children:e.name},e.type)}))}),"public"===n&&Object(d.b)(j.Box,{width:"198px",children:Object(d.b)(je.a,{className:"MaterialLibraryHeader-search materials_library_public_search",placeholder:"搜索公共素材库",onChange:function(e){l(e.target.value)},after:Object(d.b)(an.a,{text:!0,onClick:function(){a({keyword:s,isFirst:!0})}}),onKeyUp:function(e){13===e.keyCode&&a({keyword:s,isFirst:!0})}})})]})};cn.propTypes={tab:p.a.array,tabType:p.a.string,tabChange:p.a.func,searchPublicList:p.a.func};var sn=cn,ln=n(828),un=n(783),dn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fn=function(e){return b.a.createElement(_t.a,dn({fill:"currentColor"},e),b.a.createElement("path",{d:"M9.586 3a1 1 0 0 1 .707.293l1.414 1.414a1 1 0 0 0 .707.293H21a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h6.586zm-.122 2.293A1 1 0 0 0 8.757 5H4.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h15.5a.25.25 0 0 0 .25-.25V7.25a.25.25 0 0 0-.25-.25h-8.164a1 1 0 0 1-.707-.293L9.464 5.293zM14.75 11a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25H13v1.75a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V13H9.25a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25H11V9.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25V11h1.75z",fillRule:"evenodd",clipRule:"evenodd"}))};fn.defaultProps={name:"FolderPlus"};var pn=fn,hn=function(e){var t=e.type,n=e.className,o=e.inputShowName,a=void 0===o?"":o,i=e.resetInput,c=e.folderId,s=e.getFoldersList,l=e.navActiveId,u=Object(on.b)(),f=Object(h.useRef)(),p=Object(h.useState)(a),b=Object(r.a)(p,2),m=b[0],v=b[1];return Object(d.b)("input",{ref:f,type:"text",className:O()("MaterialLibrary-input-module",n),placeholder:"请输入文件名称",autoFocus:"autofocus",onChange:function(e){var t=e.target.value;v(t)},value:m,onBlur:function(){i&&i(""),"add"!==t&&m&&u("/api/v4/materials/pc_editor/folders/".concat(c),{method:"PUT",body:{name:m}}).then((function(){var e;null===(e=f.current)||void 0===e||e.blur(),s&&s(null,l)})).catch((function(e){var t,n,r;B.a.alert((null===(t=e.payload)||void 0===t?void 0:t.message)||(null===(n=e.payload)||void 0===n||null===(r=n.error)||void 0===r?void 0:r.message)||"网络错误,稍后重试吧!")}))},onKeyUp:function(e){var t;13===e.keyCode&&(null===(t=f.current)||void 0===t||t.blur())}})};hn.propTypes={inputShowName:p.a.string,resetInput:p.a.func};var bn=hn,mn=function(e){var t,n=e.folders,o=void 0===n?{}:n,a=e.navActiveId,i=e.getFoldersList,c=e.navClick,s=Object(on.b)(),l=Object(h.useState)(""),u=Object(r.a)(l,2),f=u[0],p=u[1],b=Object(h.useState)(""),m=Object(r.a)(b,2),v=m[0],g=m[1],y=function(e,t){"nav-edit"===e?(p(t.id),g(t.name)):"nav-delete"===e&&B.a.confirm(Object(d.c)("div",{className:"MaterialLibrary-alert",children:[Object(d.b)("h2",{children:"是否删除已选择分类?"}),Object(d.b)("p",{children:"分类中的图片将归入未分类中"})]}),{text:{ok:"删除",cancel:"取消"}}).then((function(){s("/api/v4/materials/pc_editor/folders/".concat(t.id),{method:"DELETE",body:{delete_material:!1}}).then((function(e){var t,n;(null===(t=e.payload)||void 0===t?void 0:t.success)?(B.a.alert("已成功删除分组,该分组的图片已移动至「我的图片-未分类」"),i()):B.a.alert((null===(n=e.payload)||void 0===n?void 0:n.message)||"网络错误,稍后重试吧!")}))}),(function(){}))};return(null==o?void 0:o.hidden)?null:Object(d.c)("div",{className:"MaterialLibraryNav",children:[Object(d.c)("div",{className:"MaterialLibraryNav-nav",children:[Object(d.c)(j.Flex,{className:"MaterialLibraryNav-Mine",justifyContent:"space-between",alignItems:"center",children:[Object(d.c)(j.Flex,{justifyContent:"space-between",alignItems:"center",children:[Object(d.b)(ln.a,{className:"nav-icon"}),null==o?void 0:o.name]}),Object(d.b)("div",{className:"nav-num",children:null==o?void 0:o.materialCount})]}),null==o||null===(t=o.child)||void 0===t?void 0:t.map((function(e){return Object(d.c)(j.Flex,{className:O()("MaterialLibraryNav-Folder",{active:a===e.id}),justifyContent:"space-between",alignItems:"center",onClick:function(){c(e.id)},children:[Object(d.c)(j.Flex,{justifyContent:"space-between",alignItems:"center",children:[Object(d.b)(Vt,{className:"nav-icon"}),f!==e.id&&Object(d.b)("div",{className:"nav-name",children:e.name})]}),f!==e.id&&Object(d.b)("div",{className:O()("nav-num",{"disable-hover":!e.supportEdit&&!e.supportDelete}),children:e.materialCount||0}),f!==e.id&&(e.supportEdit||e.supportDelete)&&Object(d.c)(j.Flex,{className:"nav-handle",children:[e.supportEdit&&Object(d.b)(W.a,{as:j.Flex,zaType:"Button",zaText:"编辑",alignItems:"center",justifyContent:"center",onClick:function(t){t.stopPropagation(),y("nav-edit",e)},width:"16px",height:"16px",css:function(e){return{borderRadius:"12px",backgroundColor:e.colors.GBK99A,cursor:"pointer"}},children:Object(d.b)(Ke.a,{fill:"currentColor",size:10})}),e.supportDelete&&Object(d.b)(W.a,{as:j.Flex,zaType:"Button",zaText:"删除",alignItems:"center",justifyContent:"center",onClick:function(t){t.stopPropagation(),y("nav-delete",e)},width:"16px",height:"16px",css:function(e){return{marginLeft:"4px",borderRadius:"12px",backgroundColor:e.colors.GBK99A,cursor:"pointer"}},children:Object(d.b)(un.a,{fill:"currentColor",size:10})})]}),f===e.id&&Object(d.b)(bn,{folderId:e.id,navActiveId:a,inputShowName:v,getFoldersList:i,resetInput:function(e){p(e)}})]},e.id)}))]}),Object(d.c)(j.Flex,{className:"MaterialLibraryNav-Add",justifyContent:"space-between",alignItems:"center",onClick:function(){var e;(null==o||null===(e=o.child)||void 0===e?void 0:e.length)>15?B.a.alert("分组已达上限,请删除已有的分类后再行添加"):B.a.confirm(Object(d.c)("div",{className:"MaterialLibrary-alert",children:[Object(d.b)("h2",{children:"添加分类"}),Object(d.b)(bn,{type:"add",className:"MaterialLibraryNav-input-module"})]}),{text:{ok:"添加",cancel:"取消"}}).then((function(){var e,t=null===(e=document.querySelector(".MaterialLibrary-input-module"))||void 0===e?void 0:e.value;s("/api/v4/materials/pc_editor/folders",{method:"POST",body:{name:t,material_type:"image"}}).then((function(){i()})).catch((function(e){var t,n,r;B.a.alert((null===(t=e.payload)||void 0===t?void 0:t.message)||(null===(n=e.payload)||void 0===n||null===(r=n.error)||void 0===r?void 0:r.message)||"网络错误,稍后重试吧!")}))}),(function(){}))},children:[Object(d.b)(pn,{className:"nav-icon"}),"添加分类"]})]})};mn.propTypes={folders:p.a.object,getFoldersList:p.a.func,navClick:p.a.func};var vn=mn,gn=n(35),yn=n(999),On=n(242),jn=n(254),wn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cn=function(e){return b.a.createElement(_t.a,wn({fill:"currentColor"},e),b.a.createElement("path",{d:"M6 20h12a2 2 0 0 0 2-2V8.828a2 2 0 0 0-.586-1.414l-2.828-2.828A2 2 0 0 0 15.172 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2zm.5-2h11a.5.5 0 0 0 .5-.5V9.207a.5.5 0 0 0-.146-.353l-2.708-2.708A.5.5 0 0 0 14.793 6H6.5a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5zm4.086-9.886a2 2 0 0 1 2.828 0l2.44 2.44a.5.5 0 0 1 0 .707l-.708.707a.5.5 0 0 1-.707 0L13 10.528V13.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-2.972l-1.438 1.44a.5.5 0 0 1-.707 0l-.708-.707a.5.5 0 0 1 0-.708l2.44-2.439zM7.5 15a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-9z",fillRule:"evenodd",clipRule:"evenodd"}))};Cn.defaultProps={name:"UpLoad"};var kn=Cn,xn=function(e){var t=e.handleUploadImage,n=Object(h.useRef)();return Object(d.c)(d.a,{children:[Object(d.b)("input",{css:{display:"none"},ref:n,type:"file",onChange:t,accept:"image/*",multiple:!0}),Object(d.c)(W.a,{zaType:"Button",zaText:"本地上传图片",as:j.Flex,role:"button",width:"96px",height:"96px",fontSize:"12px",color:"GBL05A",alignItems:"center",justifyContent:"center",flexDirection:"column",ml:"14px",mb:"10px",onClick:function(){return n.current.click()},css:function(e){return{verticalAlign:"top",display:"inline-flex",cursor:"pointer",borderRadius:"2px",backgroundColor:e.colorMod(e.colors.GBL05A).alpha(.08)}},children:[Object(d.b)(kn,{}),Object(d.b)(j.Box,{children:"本地上传"})]})]})},Sn=n(1296),En=n(1308),Rn=function(){return Object(d.b)(j.Box,{color:"GBK02A",width:"96px",css:function(e){return{position:"absolute",left:"4px",bottom:"4px",width:"32px",height:"16px",lineHeight:"16px",textAlign:"center",fontSize:"12px",background:e.colorMod(e.colors.GBK02A).alpha(.8),color:e.colors.GBK99B,borderRadius:"2px"}},children:"GIF"})},Tn=function(){return Object(d.b)(j.Box,{color:"GBK02A",width:"96px",css:function(e){return{position:"absolute",left:"4px",bottom:"4px",width:"48px",height:"16px",lineHeight:"16px",textAlign:"center",fontSize:"12px",background:e.colors.GBL05A,color:e.colors.GBK99A,borderRadius:"2px",zIndex:1}},children:"已删除"})},An=function(e){var t=e.data,n=e.tabType,r=e.chooseImage,o=e.insertImageSingle,a=e.getLatestList,i=Object(on.b)();return Object(d.c)(j.Box,{color:"GBK02A",width:"96px",css:{display:"inline-block",marginBottom:"10px",marginLeft:"14px",verticalAlign:"top"},children:[Object(d.c)(j.Box,{width:"96px",height:"96px",css:function(e){return{borderRadius:"2px",cursor:"pointer",position:"relative",backgroundColor:e.colorMod(e.colors.GBK02A).alpha(.08),"&:hover > .MaterialLibrary-imgListItemHover":{display:"flex"}}},children:[Object(d.b)(j.Image,{src:null==t?void 0:t.origin,loading:"lazy",size:"100%",css:{position:"absolute",left:0,right:0,objectFit:"cover",borderRadius:"inherit",opacity:(null==t?void 0:t.deleted)?"0.3":"1"}}),Object(d.c)("div",{className:"MaterialLibrary-imgListItemHover",children:[Object(d.b)(W.a,{as:j.Flex,zaType:"Button",zaText:"添加图片",alignItems:"center",justifyContent:"center",title:"添加",onClick:function(){o(t)},width:"24px",height:"24px",css:function(e){return{borderRadius:"2px",position:"absolute",top:"2px",right:"2px",backgroundColor:e.colors.GBL01A,display:(null==t?void 0:t.deleted)?"none":"flex"}},children:Object(d.b)(Sn.a,{fill:"currentColor",size:18})}),(null==t?void 0:t.deleted)?Object(d.b)(W.a,{as:j.Flex,zaType:"Button",zaText:"选择图片",alignItems:"center",justifyContent:"center",title:"选择",onClick:function(){B.a.confirm(Object(d.c)("div",{className:"MaterialLibrary-alert",children:[Object(d.b)("h2",{children:"是否从最近使用删除图片?"}),Object(d.b)("p",{children:"插入至内容中的图片不会受到影响"})]}),{text:{ok:"删除",cancel:"取消"}}).then((function(){i("/api/v4/materials/pc_editor/recently-materials",{method:"DELETE",body:{material_type:"image",material_ids:[null==t?void 0:t.materialId]}}).then((function(e){var t,n;(null===(t=e.payload)||void 0===t?void 0:t.success)?a({isFirst:!0}):B.a.alert((null===(n=e.payload)||void 0===n?void 0:n.message)||"网络错误,稍后重试吧!")}))}),(function(){}))},width:"24px",height:"24px",css:function(e){return{borderRadius:"2px",position:"absolute",bottom:"2px",right:"2px",backgroundColor:e.colors.GBL01A}},children:Object(d.b)(ct.a,{fill:"currentColor",size:18})}):Object(d.b)(W.a,{as:j.Flex,zaType:"Button",zaText:"选择图片",alignItems:"center",justifyContent:"center",title:"选择",onClick:function(){r("latest"===n?t.materialId:t.uniqueId)},width:"24px",height:"24px",css:function(e){return{borderRadius:"2px",position:"absolute",bottom:"2px",right:"2px",border:"2px solid ".concat(e.colors.GBK99A)}}})]}),(null==t?void 0:t.checked)&&Object(d.b)(W.a,{as:j.Flex,zaType:"Button",zaText:"选择图片",alignItems:"center",justifyContent:"center",title:"添加",onClick:function(){r("latest"===n?t.materialId:t.uniqueId)},width:"24px",height:"24px",css:function(e){return{borderRadius:"2px",position:"absolute",bottom:"4px",right:"4px",backgroundColor:e.colors.GBL01A,color:e.colors.GBK99A}},children:Object(d.b)(En.a,{fill:"currentColor",size:13})}),"dynamic"===t.subtype&&Object(d.b)(Rn,{}),t.deleted&&Object(d.b)(Tn,{})]}),Object(d.b)(j.Box,{mt:"4px",fontSize:"10px",lineHeight:"20px",css:Object(pe.d)(1),title:"文件名称",children:null==t?void 0:t.name})]})};An.propTypes={data:p.a.string,tabType:p.a.string,chooseImage:p.a.func,insertImageSingle:p.a.func,getLatestList:p.a.func};var Nn=An,_n=function(e){var t=e.tabType,n=(e.onLoad,e.checkboxValue),o=e.handleAllData,a=e.keywordCatch,i=e.isEmpty,c=e.isPageError,s=Object(h.useState)("all"),l=Object(r.a)(s,2);l[0],l[1];return Object(d.c)(j.Flex,{justifyContent:"space-between",css:{padding:"10px 20px 10px 8px"},children:[Object(d.c)("div",{children:[!1,a&&"public"===t&&!i&&!c&&Object(d.c)(j.Box,{color:"GBK03A",width:"200px",css:{margin:"0px 12px",fontSize:"12px"},children:["以下为「",a,"」相关搜索内容"]})]}),"private"===t||"latest"===t||"public"===t?Object(d.c)(j.Flex,{alignItems:"center",css:function(e){return{fontSize:"13px",color:e.colors.GBL04A}},children:[Object(d.b)(Oe.a,{type:"checkbox",checked:n,onChange:function(e){o(e.target.checked)},size:15,style:{marginRight:"5px"}}),"本页全选"]}):Object(d.b)("div",{})]})};_n.propTypes={tabType:p.a.string,onLoad:p.a.func,checkboxValue:p.a.bool,handleAllData:p.a.func,keywordCatch:p.a.string,isEmpty:p.a.bool};var In=_n,Mn=n(178),Ln=function(e){var t,n,r,o=e.dataList,a=e.getFoldersList,i=e.getLatestList,c=e.navActiveId,s=e.folders,l=e.sourceType,u=e.sourceId,f=e.isMine,p=e.tabType,b=e.insertImage,m=e.onClose,v=Object(on.b)(),g=null==s||null===(t=s.child)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.id,y=Object(h.useMemo)((function(){return o.filter((function(e){return!0===e.checked}))}),[o]),w=function(e){var t=[];return y.forEach((function(n){"latest"===p||e?t.push(n.materialId):t.push(n.uniqueId)})),t};return Object(d.c)(j.Flex,{css:{padding:"13px 20px"},children:[Object(d.b)("button",{className:O()("MaterialLibrary-handleButton insert",{active:y.length>0}),css:function(e){return{background:e.colorMod(e.colors.GBL01A).alpha(.3)}},onClick:function(){var e=[];y.forEach((function(t){e.push(null==t?void 0:t.origin)})),b(e),v("/api/v4/materials/pc_editor/recently-materials",{method:"POST",body:{source_type:l,source_id:String(u),material_type:"image",material_ids:w(!0)}}),m()},children:"插入选择图片"}),f&&y.length>0&&(null==s||null===(r=s.child)||void 0===r?void 0:r.length)>1&&Object(d.b)("button",{className:"MaterialLibrary-handleButton change",onClick:function(){var e,t,n;0!==y.length&&(g=null==s||null===(e=s.child)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.id,B.a.confirm(Object(d.c)("div",{className:"MaterialLibrary-alert",children:[Object(d.c)("h2",{children:["为已选择共 ",y.length," 张图片分类"]}),Object(d.b)(Mn.b,{buttonClassName:"MaterialLibraryContent-select",listClassName:"MaterialLibraryContent-option",onChange:function(e){g=e},children:null==s||null===(n=s.child)||void 0===n?void 0:n.map((function(e){var t=e.name,n=e.id;return Object(d.b)(Mn.a,{value:n,text:t,children:t},n)}))})]}),{text:{ok:"确定",cancel:"取消"}}).then((function(){v("/api/v4/materials/pc_editor/material-move",{method:"POST",body:{folder_id:c,target_folder_id:g,folder_material_ids:w()}}).then((function(e){var t,n;(null===(t=e.payload)||void 0===t?void 0:t.success)?a(null,c):B.a.alert((null===(n=e.payload)||void 0===n?void 0:n.message)||"网络错误,稍后重试吧!")}))}),(function(){})))},children:"变更分类"}),(f||"latest"===p)&&y.length>0&&Object(d.b)("button",{className:"MaterialLibrary-handleButton delete",onClick:function(){0!==y.length&&B.a.confirm(Object(d.c)("div",{className:"MaterialLibrary-alert",children:[Object(d.c)("h2",{children:["是否删除已选择共 ",y.length," 张图片?"]}),Object(d.b)("p",{children:"插入至内容中的图片不会受到影响"})]}),{text:{ok:"删除",cancel:"取消"}}).then((function(){var e=f?"/api/v4/materials/pc_editor/folders/".concat(c,"/materials"):"/api/v4/materials/pc_editor/recently-materials";v(e,{method:"DELETE",body:Object(Fe.a)({material_type:"image"},"latest"===p?"material_ids":"folder_material_ids",w())}).then((function(e){var t,n;(null===(t=e.payload)||void 0===t?void 0:t.success)?"latest"===p?i({isFirst:!0}):a(null,c):B.a.alert((null===(n=e.payload)||void 0===n?void 0:n.message)||"网络错误,稍后重试吧!")}))}),(function(){}))},children:"删除图片"})]})};Ln.propTypes={dataList:p.a.array};var Pn=Ln,Bn={private:"上传图片",latest:"上传图片",public:"搜索其他内容"},zn=function(e){var t=e.tabType,n=e.dataList,r=e.onLoad,o=e.isMine,a=e.folders,i=e.getFoldersList,c=e.getLatestList,s=e.navActiveId,l=e.insertImage,u=e.isLoading,f=e.isFetching,p=e.sourceType,h=e.sourceId,b=e.keywordCatch,m=e.isPageError,v=e.handleUploadImage,g=e.refreshImageList,y=e.clickHanlder,O=e.insertImageSingle,w=e.handleAllData,C=e.chooseImage,k=e.checkboxValue,x=e.uploadImageRef,S=e.onClose,E=e.restProps,R={private:"图片库为空,请上传个人图片吧",public:"没有找到".concat(b?"「"+b+"」":"","相关内容"),latest:"最近使用为空,请搜索网络素材或上传图片"};return Object(d.c)(j.Flex,{flexDirection:"column",width:"100%",children:[Object(d.b)(In,{tabType:t,onLoad:r,checkboxValue:k,handleAllData:w,keywordCatch:b,isEmpty:0===n.length&&!u,isPageError:m}),0===n.length&&!u&&!m&&Object(d.c)(d.a,{children:[Object(d.b)("input",{css:{display:"none"},ref:x,type:"file",onChange:v,accept:"image/*",multiple:!0}),Object(d.b)(yn.a.EI1A,{image:"default",content:R[t],buttonText:Bn[t],buttonOnClick:y})]}),!u&&!f&&m&&Object(d.b)(yn.a.EI1A,{image:"loadingError",content:"网络连接失败",buttonText:"刷新页面",buttonOnClick:g}),n.length>0&&Object(d.c)(bt.b,Object.assign({css:{flex:1,overflow:"auto"},getContainer:function(e){return e},onLoad:r,isLoading:u},E,{children:[o&&Object(d.b)(xn,{handleUploadImage:v},n.length),n.map((function(e,n){return Object(d.b)(Nn,{data:e,tabType:t,chooseImage:C,insertImage:l,insertImageSingle:O,getLatestList:c},n)})),Object(d.b)("i",{className:"MaterialLibraryList-placeholder"}),Object(d.b)("i",{className:"MaterialLibraryList-placeholder"}),Object(d.b)("i",{className:"MaterialLibraryList-placeholder"}),Object(d.b)("i",{className:"MaterialLibraryList-placeholder"}),Object(d.b)("i",{className:"MaterialLibraryList-placeholder"}),Object(d.b)("i",{className:"MaterialLibraryList-placeholder"})]})),f&&Object(d.b)("div",{className:"MaterialLibraryList-loading",children:"加载中..."}),(null==n?void 0:n.length)>0&&Object(d.b)(Pn,{dataList:n,getFoldersList:i,getLatestList:c,navActiveId:s,folders:a,sourceType:p,sourceId:h,isMine:o,tabType:t,insertImage:l,onClose:S})]})},Dn=function(e){var t=e.tabType,n=e.materialList,o=e.onLoad,a=e.isMine,i=void 0!==a&&a,c=e.folders,s=e.getFoldersList,l=e.getLatestList,u=e.navActiveId,f=e.insertImage,p=e.tabChange,b=e.isLoading,m=e.isFetching,v=e.sourceType,g=e.sourceId,y=e.keywordCatch,O=e.isPageError,j=e.onClose,w=Object(gn.a)(e,["tabType","materialList","onLoad","isMine","folders","getFoldersList","getLatestList","navActiveId","insertImage","tabChange","isLoading","isFetching","sourceType","sourceId","keywordCatch","isPageError","onClose"]),C=Object(on.b)(),k=Object(h.useRef)(),x=Object(h.useState)(n||[]),S=Object(r.a)(x,2),E=S[0],R=S[1],T=Object(h.useState)(!1),A=Object(r.a)(T,2),N=A[0],_=A[1];Object(h.useEffect)((function(){var e=Object($e.a)(n);_(!1),R(e)}),[n,R]);return Object(d.b)(zn,{tabType:t,dataList:E,onLoad:o,isMine:i,folders:c,getFoldersList:s,getLatestList:l,navActiveId:u,insertImage:f,isLoading:b,isFetching:m,sourceType:v,sourceId:g,keywordCatch:y,isPageError:O,handleUploadImage:function(e){var t=e.target.files;if(null==t?void 0:t.length)if((null==t?void 0:t.length)>100)B.a.alert("添加图片请不要超过 100 张哦~");else for(var n=[],r=function(e){Object(On.a)(t[e]).then((function(r){Object(jn.a)(r).then((function(r){var o;(n=n.concat({name:null===(o=t[e])||void 0===o?void 0:o.name,source:null==r?void 0:r.original_hash})).length===t.length&&function(e){C("/api/v4/materials/pc_editor/folders/".concat(u,"/materials"),{method:"POST",body:{material_type:"image",materials:e}}).then((function(e){var t,n;(null===(t=e.payload)||void 0===t?void 0:t.success)?s(null,u):B.a.alert((null===(n=e.payload)||void 0===n?void 0:n.message)||"网络错误,稍后重试吧!")})).catch((function(e){var t,n,r;B.a.alert((null===(t=e.payload)||void 0===t?void 0:t.message)||(null===(n=e.payload)||void 0===n||null===(r=n.error)||void 0===r?void 0:r.message)||"网络错误,稍后重试吧!")}))}(n)}))}))},o=0;o<t.length;o++)r(o)},refreshImageList:function(){"latest"===t?l({isFirst:!0}):s(null,u)},clickHanlder:function(){"private"===t?k.current.click():"latest"===t?p("private"):document.querySelector(".materials_library_public_search").focus()},insertImageSingle:function(e){f([null==e?void 0:e.origin]),C("/api/v4/materials/pc_editor/recently-materials",{method:"POST",body:{source_type:v,source_id:String(g),material_type:"image",material_ids:[null==e?void 0:e.materialId]}}),j()},handleAllData:function(e){var t=Object($e.a)(E);t.forEach((function(t){!0!==t.deleted&&(t.checked=e)})),_(e),R(t)},chooseImage:function(e){var n=Object($e.a)(E),r=n.find((function(n){return("latest"===t?n.materialId:n.uniqueId)===e}));r.checked=!(null==r?void 0:r.checked),R(n)},checkboxValue:N,uploadImageRef:k,onClose:j,restProps:w})};Dn.propTypes={imgList:p.a.array,onLoad:p.a.func,navActiveId:p.a.any};var Fn=Dn,Un=[{type:"public",name:"公共素材"},{type:"private",name:"个人素材"},{type:"latest",name:"最近使用"}],Vn=function(e){var t=e.isShow,n=void 0!==t&&t,o=e.onClose,a=e.sourceType,i=e.sourceId,c=e.insertImage,s=Object(on.b)(),l=Object(h.useState)("public"),u=Object(r.a)(l,2),f=u[0],p=u[1],b=Object(h.useState)([]),m=Object(r.a)(b,2),v=m[0],g=m[1],y=Object(h.useState)([]),O=Object(r.a)(y,2),w=O[0],C=O[1],k=Object(h.useState)(!0),x=Object(r.a)(k,2),S=x[0],E=x[1],R=Object(h.useState)(!0),T=Object(r.a)(R,2),A=T[0],N=T[1],_=Object(h.useState)(!1),I=Object(r.a)(_,2),M=I[0],L=I[1],P=Object(h.useState)(""),z=Object(r.a)(P,2),D=z[0],F=z[1],U=Object(h.useState)(""),V=Object(r.a)(U,2),q=V[0],H=V[1],K=Object(h.useState)(""),Q=Object(r.a)(K,2),W=Q[0],G=Q[1],Y=Object(h.useState)(!1),Z=Object(r.a)(Y,2),J=Z[0],$=Z[1],ee=function(e,t){var n,r=Object(nn.camelizeKeys)(e||{});E(!1),N(!1),L(null==r||null===(n=r.paging)||void 0===n?void 0:n.isEnd);var o=w.concat((null==r?void 0:r.data)||[]);C(t?(null==r?void 0:r.data)||[]:o)},te=function(e,t){var n;(E(!1),N(!1),t)?$(!0):B.a.alert((null==e?void 0:e.message)||(null==e||null===(n=e.error)||void 0===n?void 0:n.message)||"网络错误,稍后重试吧!")},ne=function(e){var t=e.id,n=e.isFirst;E(!0),N(n),$(!1),s("/api/v4/materials/pc_editor/folders/".concat(t||W,"/materials?offset=").concat(n?0:null==w?void 0:w.length,"&limit=24")).then((function(e){ee(e.payload,n)})).catch((function(e){te(e.payload,n)}))},re=function(e){var t=e.id,n=e.subType,r=e.isFirst,o=e.keyword;E(!0),N(r),$(!1),o?H(o):r&&H(""),F(n),s(Object(rn.a)("/api/v4/materials/pc_editor/folders/".concat(t||W,"/search"),{offset:r?0:null==w?void 0:w.length,limit:24,keyword:r?o:o||q,source_type:a,source_id:i,sub_type:n||D})).then((function(e){ee(e.payload,r)})).catch((function(e){te(e.payload,r)}))},oe=function(e,t){s("/api/v4/materials/pc_editor/folders?type=".concat(e||f,"&material_type=image")).then((function(n){var r,o,a,i,c,s,l,u=Object(nn.camelizeKeys)((null===(r=n.payload)||void 0===r?void 0:r.data)||{});(g(u),G(t||(null==u||null===(o=u.child)||void 0===o||null===(a=o[0])||void 0===a?void 0:a.id)),"public"===e)?re({id:t||(null==u||null===(i=u.child)||void 0===i||null===(c=i[0])||void 0===c?void 0:c.id),isFirst:!0}):ne({id:t||(null==u||null===(s=u.child)||void 0===s||null===(l=s[0])||void 0===l?void 0:l.id),isFirst:!0})})).catch((function(e){te(e.payload,!0)}))},ae=function(e){var t=e.isFirst;E(!0),N(t),$(!1),s(Object(rn.a)("/api/v4/materials/pc_editor/recently-materials",{offset:t?0:null==w?void 0:w.length,limit:24,material_type:"image"})).then((function(e){ee(e.payload,t)})).catch((function(e){te(e.payload,t)}))},ie=function(e){S||(p(e),C([]),E(!0),N(!0),H(""),"latest"===e?ae({isFirst:!0}):oe(e))};return Object(h.useEffect)((function(){oe(f)}),[]),n?Object(d.b)(X.b,{css:{minWidth:"746px"},contentClassName:"MaterialLibrary-Modal-content",onClose:o,children:Object(d.c)("div",{children:[Object(d.b)(sn,{tab:Un,tabType:f,tabChange:ie,searchPublicList:re}),Object(d.c)("div",{className:"MaterialLibrary-content",children:["private"===f&&Object(d.b)(vn,{folders:v,navActiveId:W,navClick:function(e){C([]),G(e),ne({id:e,isFirst:!0})},getFoldersList:oe}),Object(d.b)(j.Flex,{overflow:"hidden",flex:"1",children:Object(d.b)(Fn,{tabType:f,materialList:w,isMine:"private"===f,css:{display:"flex",flexWrap:"wrap",justifyContent:"space-between",alignContent:"flex-start",height:"100%",marginLeft:"-14px",padding:"0 20px 0"},isLoading:S,isFetching:A,isDrained:M,onLoad:"public"===f?re:"latest"===f?ae:ne,folders:v,getFoldersList:oe,getLatestList:ae,navActiveId:W,insertImage:c,tabChange:ie,sourceType:a,sourceId:i,keywordCatch:q,isPageError:J,onClose:o})})]})]})}):null};Vn.propTypes={isShow:p.a.bool,sourceType:p.a.string,sourceId:p.a.number,onClose:p.a.func,insertImage:p.a.func};var qn=Vn,Hn=function(e,t){var n=e.sourceType,o=e.sourceId,a=e.insertImage,i=Object(h.useState)(!1),c=Object(r.a)(i,2),s=c[0],l=c[1],u=Object(ge.c)((function(){return l(!1)})),f=Object(ge.c)((function(){return l(!0)}));return Object(h.useImperativeHandle)(t,(function(){return{onOpen:f,onClose:u}}),[f,u]),s?Object(d.b)(qn,{isShow:s,onClose:u,sourceType:n,sourceId:o,insertImage:a}):null};Hn.propType={sourceType:p.a.string.isRequired,sourceId:p.a.number.isRequired,insertImage:p.a.func.isRequired};var Kn=Object(h.forwardRef)(Hn),Qn=function(e){var t=e.sourceType,n=e.sourceId,r=b.a.createRef(null),o={},a=!1,i=null;return{initialize:function(e){Object.assign(o,e)},components:[Object(d.b)(Kn,{ref:r,sourceType:t,sourceId:n,insertImage:function(e){var t;t=function(){for(var t=0;t<e.length;t++)n={value:e[t]},a?i=Object(en.a)(i,"image","IMMUTABLE",{upload:n,size:"normal"}):o.setEditorState(Object(en.a)(o.getEditorState(),"image","IMMUTABLE",{upload:n,size:"normal"}));var n},a=!0,i=o.getEditorState(),t(),o.setEditorState(i),a=!1}},"material_library")],toolbarV2:[{section:Pt.a.BASIC_MEDIA,parentName:"image",label:"图片库",text:Object(d.c)(j.Flex,{alignItems:"center",css:{position:"relative",width:"66px"},children:["图片库",Object(d.b)(tn.a,{css:function(e){return{position:"absolute",top:"2px",right:"-11px",fill:"".concat(e.colors.GBL01A)}},isNewBefore:new Date(2021,6,1)})]}),priority:2,onClick:function(){var e;null===(e=r.current)||void 0===e||e.onOpen()}}]}},Wn=n(1159),Gn=n(1182),Yn=n(958),Zn=n(1338),Xn=n.n(Zn),Jn=n(416),$n={editableInit:"Editable.Init",editableEdit:"Editable.Edit",draftLoad:"DraftLoad",draftSave:"DraftSave",addAnswer:"AddAnswer"},er=function(e,t){var n=e.isToolbarSticky,r=e.useNewEditorSetting,o=e.answer,a=e.isFullscreen,i=e.toolbarMenuAttention,c=e.scheduledPublishAt,s=e.initialScheduledPublishAt,l=e.placeholder,u=e.draft,f=e.defaultValue,p=e.isLegacyVideoAnswer,b=e.defaultVideo,m=e.question,v=e.videoAnswerEditable,g=e.videoAnswerPublished,y=e.editableReady,j=e.handleChangeContent,w=e.handleAfterChangeContent,C=e.handleFocusWithAuth,k=e.handleSelectText,x=e.handleSubmit,S=e.handleError,E=e.handleLoadStart,R=e.handleLoadEnd,T=e.handleUploadStart,A=e.handleUploadEnd,N=e.handleUploadError,_=e.handleBeforeVideoUpload,I=e.handleMCNLinkCardEdit,L=e.isVideoAnswer,P=e.handleInsertZVideo,B=e.getToolbarSidePlugins,z=e.getToolbarMenuPlugins,D=e.createEditorPlugins,F=e.getEditorBeforePlugins,U=e.setUseScheduledPublish,V=Object(h.useRef)(null);return Object(d.b)(Wn.b,{name:$n.editableEdit,children:Object(d.b)(Jn.a,{className:O()("AnswerForm-editor","AnswerForm-container",{isToolbarSticky:n,useNewEditorSetting:r}),ref:t,allowDragAndDrop:!0,allowLinkCard:!0,allowMention:!0,allowToolbar:!0,allowUploadDocument:!0,allowVideoTitleChange:!L,allowReference:!0,allowImageEditor:!0,allowZVideo:!L,allowTable:!L,allowCatalog:!L,catalogEnabled:Object(Yn.a)(o,"answer"),allowHeaderThree:!1,allowToolbarSticky:!a,toolbarStickyOffset:we.i,onInsertZVideo:P,getToolbarSidePlugins:B,getToolbarMenuPlugins:z,getEditorBeforePlugins:F,toolbarMenuAttention:i,createEditorPlugins:D,toolbarProps:{menuCallout:c&&s&&Object(d.c)(M.b,{className:"AnswerForm-scheduledPublishCallout",onClose:function(){U(!1),Q.a.trackEvent(t,{action:"Click",id:5734,name:"回答"})},children:["发布时间:",Object(d.b)(Xe.a,{onRef:V,value:s,min:s,max:Ze.a(s,7),onChange:function(e,t){U(!0,e),Q.a.setModule(V.current,{module:"Unknown",module_name:t.date?"日期":t.hours?"小时":t.minutes?"分钟":void 0}),Q.a.trackEvent(V.current,{action:"Click",id:5731,name:"回答"})}}),Object(d.c)("a",{href:"/draft?type=answer&filter=schedule",target:"_blank","data-za-detail-view-id":5732,"data-za-detail-view-name":"回答",style:{marginLeft:"2em"},children:[Object(d.b)(Gn.a,{text:!0,center:!0})," 管理待发布内容"]})]})},minRows:r?6:3,placeholder:l,defaultValue:u?u.editableContent:f,videoAnswerEditable:v,videoAnswerPublished:g,isLegacyVideoAnswer:p,defaultVideo:b,onReady:y,onChange:j,onAfterChange:w,onFocus:C,onSelectText:k,onSubmit:x,onError:S,onLoadStart:E,onLoadEnd:R,onUploadStart:T,onUploadEnd:A,onUploadError:N,onBeforeVideoUpload:_,logo:Xn.a,location:m.title,editingContentType:"answer",onMCNLinkCardEdit:I,useToolbarV2:r,useEditableV2:!0})})};er.propTypes={isToolbarSticky:p.a.bool.isRequired,useNewEditorSetting:p.a.bool.isRequired,answer:p.a.object.isRequired,isFullscreen:p.a.bool.isRequired,toolbarMenuAttention:p.a.string,scheduledPublishAt:p.a.number,initialScheduledPublishAt:p.a.number,placeholder:p.a.string.isRequired,draft:p.a.object,defaultValue:p.a.string,isLegacyVideoAnswer:p.a.bool,defaultVideo:p.a.object,question:p.a.object,videoAnswerEditable:p.a.bool,videoAnswerPublished:p.a.bool,editableReady:p.a.func.isRequired,handleChangeContent:p.a.func.isRequired,handleAfterChangeContent:p.a.func.isRequired,handleFocusWithAuth:p.a.func.isRequired,handleSelectText:p.a.func.isRequired,handleSubmit:p.a.func.isRequired,handleError:p.a.func.isRequired,handleLoadStart:p.a.func.isRequired,handleLoadEnd:p.a.func.isRequired,handleUploadStart:p.a.func.isRequired,handleUploadEnd:p.a.func.isRequired,handleUploadError:p.a.func.isRequired,handleBeforeVideoUpload:p.a.func.isRequired,handleMCNLinkCardEdit:p.a.func.isRequired,isVideoAnswer:p.a.bool.isRequired,handleInsertZVideo:p.a.func.isRequired,getToolbarSidePlugins:p.a.func.isRequired,createEditorPlugins:p.a.func.isRequired,getToolbarMenuPlugins:p.a.func.isRequired,getEditorBeforePlugins:p.a.func.isRequired,setUseScheduledPublish:p.a.func.isRequired};var tr=Object(h.forwardRef)(er),nr=n(234),rr=n(950),or=n(835);function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ir={type:"none",description:"无声明"},cr=function(e){Object(s.a)(n,e);var t=ar(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];return(e=t.call.apply(t,[this].concat(o))).state={openModal:!1},e.handleChange=function(t){e.props.onChange(t.target.checked),Q.a.trackEvent(null,{id:5603,action:"Click"})},e.handleHelpClick=function(t){e.setState({openModal:t}),Q.a.trackEvent(null,{id:5604,action:"Click"}),Q.a.trackEvent(Object(i.a)(e),{id:7840,action:"Click"})},e.handleHelpClose=function(t){e.setState({openModal:t})},e.handleReshipmentDisclaimers=function(t){e.props.onChange(t),Q.a.trackEvent(Object(i.a)(e),{id:7831,action:"Click"},{button:{text:t.description}})},e.handleStatementClick=function(){Q.a.trackEvent(Object(i.a)(e),{id:7841,action:"Click"})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){Q.a.trackCardShow(null,{id:5602})}},{key:"componentDidUpdate",value:function(e,t){this.state.openModal&&!t.openModal&&Q.a.trackCardShow(null,{id:7843})}},{key:"renderReshipmentDisclaimers",value:function(){var e=this,t=this.props,n=t.disclaimers,r=t.disclaimerChecked;return[].concat(Object($e.a)(n),[ir]).map((function(t){return Object(d.b)(I.a,{onClick:function(){return e.handleReshipmentDisclaimers(t)},checked:t.type===r,children:t.description},t.type)}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.disclaimers,r=t.disclaimerChecked,o=n.find((function(e){return e.type===r}));return Object(d.c)("div",{className:"DisclaimerEntry",children:[Object(d.b)("span",{className:"DisclaimerEntry-help",onClick:function(){return e.handleHelpClick(!0)},children:Object(d.b)(et.a,{className:"DisclaimerEntry-helpIcon",text:!0,center:!0})}),Object(d.b)(nt,{openModal:this.state.openModal,handleHelpClick:function(t){return e.handleHelpClose(t)}}),Object(d.b)(_.c,{toggler:Object(d.b)(N.c,{preset:"plain",onRef:function(t){e.settingsTogglerEl=t},className:"DisclaimerEntry-selfMenu",children:Object(d.c)("span",{onClick:function(){return e.handleStatementClick()},children:["创作声明:",(null==o?void 0:o.description)||ir.description,Object(d.b)(or.a,{center:!0,text:!0,className:"DisclaimerEntry-arrow"})]})}),menuClassName:"AnswerItem-selfMenu",itemClassName:"AnswerItem-selectMenuItem",children:this.renderReshipmentDisclaimers()})]})}}]),n}(h.Component),sr=function(e){var t=e.question,n=e.answer,r=Object(m.useDispatch)(),o=Object(m.useSelector)((function(e){return Object(ce.d)(e,null==n?void 0:n.id)})),a=Object(m.useSelector)((function(e){return e.question.disclaimers[t.id]})),i=Object(h.useContext)(Te),c=i.getFormData,s=i.updateFormData,l=c(),u=l.isDisclaimerChecked,f=l.disclaimerType,p=(null==a?void 0:a.length)>0&&(!(null==n?void 0:n.id)||o);return Object(h.useEffect)((function(){o&&s(function(e){var t,n,r,o,a="open"===(null==e||null===(t=e.disclaimerInfo)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.status);return{isDisclaimerChecked:a,disclaimerType:a?null==e||null===(r=e.disclaimerInfo)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.type:"none"}}(o))}),[Boolean(o)]),Object(h.useEffect)((function(){a||r(Object(ie.M)(t.id))}),[]),p?Object(d.b)(cr,{disclaimers:a,checked:u,disclaimerChecked:f,onChange:function(e){s({isDisclaimerChecked:"none"!==e.type,disclaimerType:e.type})}}):Object(d.b)(j.Box,{width:"157px",mr:"40px"})},lr=n(450);function ur(e){var t=e.shown,n=e.onClose;return Object(d.b)(X.b,{title:"商业声明",subtitle:"",onClose:n,children:t&&Object(d.c)(j.Box,{children:[Object(d.b)(j.Text,{fontSize:15,lineHeight:"22px",color:"GBK02A",children:"「商业声明」是为自己创作的内容添加商业声明的工具。当你创作的内容中包含商业推广信息时,建议进行声明,选择「本内容含有商业推广」,并选择具体推广方式。对商业推广信息的正确声明有助于内容展示。"}),Object(d.b)(N.c,{preset:"primary",color:"blue",onClick:n,css:{width:166,height:32,lineHeight:"32px",fontSize:14,margin:"25px 0 0 93px"},children:"知道了"})]})})}var dr=n(574),fr=function(e){var t=e.checked,n=e.onChange,r=e.text;return Object(d.c)(j.Flex,{flex:1,alignItems:"center",as:"label",css:{cursor:"pointer"},children:[Object(d.b)(Ie.a,{size:16,checked:t,onChange:n}),Object(d.b)(j.Text,{ml:"8px",fontSize:"15px",lineHeight:"21px",children:r})]})},pr=function(e){var t=e.text,n=e.checked,r=e.onClick,o=e.showCheckIcon,a=Object(gn.a)(e,["text","checked","onClick","showCheckIcon"]);return Object(d.c)(j.Flex,Object.assign({justifyContent:"space-between",alignItems:"center",px:"12px",height:30,lineHeight:"30px",fontSize:14,color:n?"GBL01A":"GBK06A",css:function(e){return Object.assign({cursor:"pointer",borderRadius:15,backgroundColor:n?e.colorMod(e.colors.GBL01A).alpha(.08):"transparent"},{border:"1px solid ".concat(n?"transparent":e.colors.GBK09A)})}},a,{onClick:r,children:[Object(d.b)(j.Text,{children:t}),n&&o&&Object(d.b)(dr.a,{text:!0,center:!0})]}))};function hr(e){var t=e.shown,n=e.onClose,o=e.isCurrentReported,a=e.commercialTypes,i=e.currentSelectedTypes,c=e.setCommercialReportInfo,s=Object(h.useState)(!1),l=Object(r.a)(s,2),u=l[0],f=l[1],p=Object(h.useState)([]),b=Object(r.a)(p,2),m=b[0],v=b[1];Object(h.useEffect)((function(){f(o)}),[o]),Object(h.useEffect)((function(){v(i)}),[i]);return t?Object(d.b)(X.b,{title:"商业推广",subtitle:"",onClose:n,children:Object(d.c)(j.Box,{children:[Object(d.c)(j.Flex,{justifyContent:"space-between",alignItems:"center",children:[Object(d.b)(fr,{checked:!u,onChange:function(){return f(!1)},text:"本内容不含商业推广"}),Object(d.b)(fr,{checked:u,onChange:function(){return f(!0)},text:"本内容含有商业推广"})]}),u&&Object(d.c)(j.Box,{mt:"20px",children:[Object(d.b)(j.Text,{mb:"10px",fontSize:15,lineHeight:"21px",color:"GBK02A",children:"推广方式(必选)"}),Object(d.b)(j.Flex,{flexWrap:"wrap",children:a.map((function(e){var t=e.value,n=e.name;return Object(d.b)(pr,{flexShrink:0,mb:"10px",mr:"8px",text:n,checked:m.includes(t),onClick:function(){return function(e){if(m.includes(e)){var t=m.filter((function(t){return t!==e}));v(t)}else v(m.concat([e]))}(t)}},t)}))})]}),Object(d.c)(H.a,{direction:"horizontal",css:{marginTop:32},children:[Object(d.b)(N.c,{onClick:n,color:"grey",children:"取消"}),Object(d.b)(N.c,{disabled:u&&0===m.length,preset:"primary",color:"blue",onClick:function(){c({isCurrentReported:u,currentSelectedTypes:m}),n()},children:"确认"})]})]})}):null}var br=function(e){var t,n=e.question,o=e.answerId,a=n.relationship.isAnonymous,i=Object(m.useDispatch)(),c=Object(h.useContext)(Te).updateFormData,s=Object(m.useSelector)((function(e){return e.commercialReport})),l=(s||{}).commercialTypes,u=void 0===l?[]:l,f=(null==s||null===(t=s.answers)||void 0===t?void 0:t[o])||{},p=f.isCommercialReported,b=f.selectedCommercialTypes,v=void 0===b?[]:b,g=Object(h.useState)(!1),y=Object(r.a)(g,2),O=y[0],w=y[1],C=Object(h.useState)([]),k=Object(r.a)(C,2),x=k[0],S=k[1],E=Object(h.useState)(!1),R=Object(r.a)(E,2),T=R[0],A=R[1],N=Object(h.useState)(!1),_=Object(r.a)(N,2),I=_[0],M=_[1];Object(h.useEffect)((function(){(0===u.length||o)&&i(Object(lr.b)("answer",o))}),[]),Object(h.useEffect)((function(){o&&(w(p),S(v.map((function(e){return e.value}))))}),[o,p,JSON.stringify(v)]);return 0===u.length?null:Object(d.c)(j.Flex,{px:"24px",pb:"12px",mx:"auto",width:"100%",maxWidth:694,css:{opacity:a?.3:1},children:[Object(d.c)(j.Flex,{fontSize:14,color:"GBL05A",children:[Object(d.b)(et.a,{text:!0,center:!0,onClick:function(){return M(!0)},css:{cursor:"pointer"}}),Object(d.c)(j.Text,{ml:"10px",color:"#606a80",children:["商业声明:本内容",O&&!a?"含有":"不含","商业推广"]})]}),Object(d.c)(j.Flex,{fontSize:14,ml:"8px",color:"#8490a8",css:{cursor:"pointer"},onClick:function(){a?i(Object(le.h)("匿名回答无法添加商业推广,请先取消匿名","red")):A(!0)},children:[Object(d.b)(Gn.a,{text:!0,center:!0}),Object(d.b)(j.Text,{ml:"4px",children:"修改"})]}),Object(d.b)(hr,{onClose:function(){return A(!1)},shown:T,isCurrentReported:O,commercialTypes:u,currentSelectedTypes:x,setCommercialReportInfo:function(e){var t=e.isCurrentReported,r=e.currentSelectedTypes;c({commercialReportInfo:{isReport:t,commercialTypes:r}}),w(t),S(r),i(Object(lr.c)({questionId:n.id,isCommercialReported:t}))}}),Object(d.b)(ur,{onClose:function(){return M(!1)},shown:I})]})},mr=function(e){var t,n=Object(ue.b)(e),r=Object.values(e.entities.answers).filter((function(e){var t;return(null===(t=e.author)||void 0===t?void 0:t.urlToken)===(n&&n.urlToken)}))[0]||{};return null==r||null===(t=r.rewardInfo)||void 0===t?void 0:t.tagline},vr=function(e){var t=e.answer,n=(t=void 0===t?{}:t).rewardInfo,o=(n=void 0===n?{}:n).isRewardable,a=void 0!==o&&o,i=e.question,c=i.id,s=i.relationship.isAnonymous,l=Object(h.useState)(!1),u=Object(r.a)(l,2),f=u[0],p=u[1],b=Object(m.useSelector)((function(e){return e.switches})).isAnswerRewardable,v=Object(m.useSelector)(mr),g=Object(h.useState)(!1),y=Object(r.a)(g,2),O=y[0],j=y[1],w=Object(h.useContext)(Te),C=w.getFormData,k=w.updateFormData,x=Object(h.useState)(a),S=Object(r.a)(x,2),E=S[0],R=S[1],T=Object(m.useDispatch)(),A=C().rewardTagline;return Object(h.useEffect)((function(){k({rewardTagline:v})}),[v,k]),Object(h.useEffect)((function(){T(Object(me.b)(["isAnswerRewardable"]))}),[T]),Object(h.useEffect)((function(){b&&(F.a.get("rewardNotication")||(j(!0),F.a.set("rewardNotication",!0)))}),[b]),Object(ge.i)((function(){return j(!1)}),O?2e3:null),b?Object(d.c)("div",{className:"AnswerForm-openRewardButton",children:[Object(d.c)("label",{className:"AnswerForm-openRewardLabel",htmlFor:"AnswerForm-openRewardInput",children:[Object(d.b)(Oe.a,{className:"AnswerForm-openRewardCheckbox",checked:E,onChange:function(e){if(!s)return!e.target.checked||A?(k({rewardTagline:""}),R(!1),void Object(xe.n)(c,!1)):void p(!0);T(Object(le.h)("匿名回答无法开启赞赏,请先取消匿名","red"))},id:"AnswerForm-openRewardInput",size:16}),"开启赞赏"]}),f&&Object(d.b)(ke,{submitRewardText:function(e){k({rewardTagline:e}),R(!0),T(Object(xe.n)()),p(!1)},onClose:function(){return p(!1)},tagline:A,edit:!1}),O&&Object(d.b)("span",{className:"AnswerForm-Notication",children:"你的回答可以开启赞赏了"})]}):null},gr=function(e){var t=e.answer,n=Object(h.useContext)(Te),r=n.updateFormData,o=(0,n.getFormData)().pushActivity,a=Object(ze.a)(),i=!(null==t?void 0:t.id);Object(h.useEffect)((function(){i&&r({pushActivity:!0})}),[i,r]);return i?Object(d.c)("label",{htmlFor:"pushFollowSwitch",css:{display:"flex",alignItems:"center"},children:[Object(d.b)(Oe.a,{checked:o,onChange:function(e){var t=e.target.checked;Q.a.trackEvent(null,{id:8361,action:"Click"},{button:{text:t?"开":"关"}}),t?r({pushActivity:!0}):(Q.a.trackCardShow(null,{id:8362}),a.confirm("设置后,关注你的其他用户将无法在「首页 - 关注」阅读这篇回答",{title:"关闭推送给关注者吗",ok:"关闭推送"}).then((function(){Q.a.trackEvent(null,{id:8363,action:"Click"}),r({pushActivity:!1})})).catch((function(){})))},id:"pushFollowSwitch",size:16}),Object(d.b)(j.Text,{fontSize:"14px",color:"GBL05A",ml:"9px",children:"推送给我的关注者"})]}):null},yr=Object(nr.a)(null)((function(e){var t=e.answer,n=e.question,r=Object(rr.a)();return Object(d.c)(d.a,{children:[Object(d.c)("div",{className:"AnswerForm-footerContent AnswerForm-container",children:[Object(d.b)(sr,{answer:t,question:n}),Object(d.b)(vr,{answer:t,question:n}),Object(d.b)(gr,{answer:t,question:n})]}),r&&Object(d.b)(br,{answerId:null==t?void 0:t.id,question:n})]})})),Or=n(826),jr=n(825),wr=function(e){var t=e.question,n=Object(m.useSelector)(ue.b);return t.relationship.isAnonymous?Object(d.b)(Wt.a,{className:"AnswerAdd-info",noLink:!0,author:we.h}):n&&n.isOrg?Object(d.b)(Wt.a,{className:"AnswerAdd-info",noLink:!0,author:n}):Object(d.b)(Wt.a,{className:"AnswerAdd-info",noLink:!0,author:n,children:Object(d.b)(j.Text,{color:"GBK04A",children:Object(d.b)(Ge,{questionId:t.id,currentUser:n})})})};function Cr(e){var t=e.question,n=e.handleHistoryVersion,r=e.handleImportDoc,o=Object(h.useRef)();return Object(d.b)(d.a,{children:Object(d.c)(j.Flex,{p:"11px 20px",justifyContent:"space-between",mx:"auto",width:"100%",maxWidth:688,children:[Object(d.b)(wr,{question:t}),Object(d.c)(j.Flex,{justifyContent:"center",alignItems:"center",p:"7px 12px",height:34,fontSize:14,fontWeight:500,color:"GBL05A",bg:"GBK10A",css:{borderRadius:3},children:[Object(d.c)(W.a,{as:j.Text,zaAction:"Unknown",zaText:"文档导入",zaType:"Button",pr:"8px",css:function(e){return{cursor:"pointer",borderRight:"1px solid ".concat(e.colors.GBK08A)}},onClick:r,children:[Object(d.b)(Or.a,{center:!0,text:!0,css:{marginRight:4}}),"文档导入"]}),Object(d.b)(_.c,{arrowed:!1,toggler:Object(d.b)(N.c,{preset:"plain",onRef:o,children:Object(d.b)(jr.a,{css:{paddingLeft:8,position:"relative",top:1}})}),children:Object(d.b)(W.a,{as:_.b,zaAction:"Unknown",zaText:"历史版本",zaType:"Button",onClick:n,css:{padding:"10px 20px"},children:"历史版本"})})]})]})})}function kr(){var e=Object(o.a)(["草稿保存于",""]);return kr=function(){return e},e}function xr(){var e=Object(o.a)(["草稿保存于",""]);return xr=function(){return e},e}function Sr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Er={allowed:"允许规范转载",need_payment:"允许付费转载",disallowed:"禁止转载"},Rr=function(e){Object(s.a)(n,e);var t=Sr(n);function n(e,r){var o;Object(a.a)(this,n),(o=t.call(this,e,r)).editableReady=function(){var e,t,n,r,a=o.props,i=a.reporter,c=a.draft;(null===(e=(t=o).cancelEditableStatscTimeout)||void 0===e||e.call(t),i.reportSuccess($n.editableInit),c)&&(null===(n=(r=o).cancelDraftLoadStatscTimeout)||void 0===n||n.call(r),i.reportSuccess($n.draftLoad))},o.onCompositionStart=function(){o.composition=!0,o.syncDraft.cancel()},o.onCompositionEnd=function(){o.composition=!1,o.prevValue&&o.syncDraft(o.prevValue),o.prevValue=null},o.onChangeContent=function(e){o.loggingDeltaTime||(o.loggingDeltaTime=!0,o.startCompositionTime=Math.floor((new Date).getTime()/1e3)),o.hasEdited=!0,o.setState({content:e,isEmpty:e.isEmpty,isTyping:!0}),o.composition?o.prevValue=e:o.syncDraft(e)},o.onInsertDoc=function(){return o.editable.handleKeyCommand("insert-doc")},o.onAfterChangeContent=function(e){var t=e.getSelection().getIsBackward(),n=document.getSelection();if(n.rangeCount){var r=n.getRangeAt(0).cloneRange();r.collapse(t);var o=r.getBoundingClientRect();if(0===o.height){var a=r.commonAncestorContainer;1===a.nodeType&&(o=a.getBoundingClientRect())}if(0!==o.height){var i=o.bottom-(window.innerHeight-117);i>0&&window.scrollBy(0,i)}}},o.onDeleteDraftModalShow=function(){o.setState({deleteDraftModalShown:!0})},o.onDeleteDraft=function(){var e=o.props,t=e.isReediting,n=e.activeTabKey;t||(n===G.a.videoAnswer?o.editable.clearAllContent():o.editable.reset(),o.setState({draft:"",content:{toHTML:function(){return""}},isEmpty:!0})),o.deleteDraft();var r=o.props.onDeleteDraft;r&&r()},o.onDeleteDraftModalHide=function(){o.setState({deleteDraftModalShown:!1})},o.checkVideoSectionReady=function(e){if(!e)return B.a.alert("没有上传视频,请上传后提交",{title:"无视频"}),!1;var t=e.videoId,n=e.isOriginal;if(t){if("zvideo"===e.type&&null==n)return B.a.alert("没有视频类型,请选择视频为原创或转载后提交",{title:"无视频类型"}),!1}else{var r=o.editable.checkVideoStatus();if(r.isUploading)return B.a.alert("视频上传中,请上传完成后提交",{title:"视频上传中"}),!1;if(r.hasError)return B.a.alert("视频上传失败,请重新上传后提交",{title:"上传失败"}),!1}return!0},o.checkEditorContentReady=function(){return o.editable.hasVideo("upload")?(o.handleError("video-uploading"),!1):o.editable.hasImage("upload")?(o.handleError("image-uploading"),!1):o.editable.hasImage("error")||o.editable.hasVideo("error")&&!o.editable.hasVideo("error-review")?(B.a.alert("草稿中含有上传失败的内容,请更改后重新提交",{title:"上传失败"}),!1):!o.editable.hasVideo("error-review")&&!o.editable.hasVideo("censor")||(B.a.alert("视频中包含未通过审核的信息,请更改后重新提交",{title:"视频未通过审核"}),!1)},o.getSubmitData=function(e,t,n){var r,a=o.state,c=a.reshipmentSettings,s=a.commentPermission,l=a.scheduledPublishAt,u=o.props,f=u.answer,p=u.disclaimers,h=u.settings,b=u.isReediting,m=u.getFormData,v=u.isOffice,g=u.useNewEditorSetting,y={content:t},O=m(),j=O.isDisclaimerChecked,w=O.disclaimerType,C=O.commercialReportInfo,S=O.rewardTagline,E=O.pushActivity,R=O.commentPermission,T=O.reshipmentSettings;if(!b)if(g){var A=o.props.currentUser.caEnabled?"need_payment":"allowed";y.reshipmentSettings=T||A,y.commentPermission=R||"all"}else y.reshipmentSettings=c||"allowed",y.commentPermission=s||"all";if(e)return{content:t,attachment:n,reshipmentSettings:y.reshipmentSettings,commentPermission:y.commentPermission};if(y.rewardSetting={canReward:Boolean(S),tagline:S},p&&p.length&&(!f||h)&&(y.disclaimerStatus=j?"open":"close",y.disclaimerType=w||"none"),v&&(y.commercialReportInfo=C),l){if(Q.a.trackEvent(Object(i.a)(o),{action:"Click",id:5733,name:"回答"}),k.a(l,x.a(new Date,30)))return void B.a.alert(Object(d.b)("div",{style:{textAlign:"center"},children:"只能设置 30 分钟后的定时时间"}),{title:"定时发布"});y.publishAt=Math.floor(l/1e3)+0}return void 0!==E&&(y.pushActivity=E),y.tableOfContentsEnabled=o.editable.hasCatalog(),Object.assign(y,null===(r=o.editable)||void 0===r?void 0:r.getExtraPluginData()),y},o.canSubmit=function(){var e,t,n=null===(e=o.editable)||void 0===e?void 0:e.toHTML(),r=o.isVideoAnswer?null===(t=o.editable)||void 0===t?void 0:t.getAttachment():null;return o.isVideoAnswer?Boolean(r||n):Boolean(n)},o.handleSubmit=o.context.authRequired((function(){var e=o.props.reporter;e.reportRequest($n.addAnswer);try{var t=o.props,n=t.answer,r=t.isReediting,a=t.onSubmit,c=t.showNotification,s=t.question,l=s.id,u=s.questionType,d=t.currentUser,f=t.updateSettingsDisclaimer,p=t.loadLabel,h=t.onCancel;if(!o.editable)return h(),void e.reportSuccess($n.addAnswer);if(!o.canSubmit())return void e.reportSuccess($n.addAnswer);var b=o.editable.toHTML(),m=o.isVideoAnswer?o.editable.getAttachment():null;if(o.isVideoAnswer&&!o.checkVideoSectionReady(m))return void e.reportSuccess($n.addAnswer);if(!o.checkEditorContentReady())return void e.reportSuccess($n.addAnswer);var v=o.getSubmitData(o.isVideoAnswer,b,m);Promise.resolve(a(v)).then((function(){n&&v.disclaimerStatus&&f(n.id,v.disclaimerStatus,v.disclaimerType),n&&p("answer",n.id)})).then((function(){Q.a.trackCardShow(null,{id:7879}),r||Q.a.trackEvent(null,{id:4931,action:"StatusReport"},{module:[{card:{content:[{type:"Answer",parent_token:String(l),author_member_hash_id:d.id}]}}],status:{result:"Success",event:{action:"Submit"}}})})).then((function(){"commercial"===u&&c("已发布!由品牌筛选后进入推荐区。")})).then((function(){e.reportSuccess($n.addAnswer)})).catch((function(t){var n;t.status&&"5"!==(null===(n=t.status)||void 0===n?void 0:n.toString()[0])||(e.reportFail($n.addAnswer),e.reportToSentry($n.addAnswer,t)),r||Q.a.trackEvent(Object(i.a)(o),{id:4931,action:"StatusReport"},{status:{result:"Fail",event:{action:"Submit"}}})}));var g=r?"Edit":"Answer";"Answer"===g&&Q.a.trackEvent(Object(i.a)(o),{id:4930}),Q.a.trackEvent(Object(i.a)(o),{action:g,is_intent:!1})}catch(t){throw e.reportFail($n.addAnswer),e.reportToSentry($n.addAnswer,t),t}})),o.onCancel=function(){var e=o.props.onCancel;o.editable.hasVideo("upload")?o.handleError("video-uploading-draft"):o.editable.hasImage("upload")?o.handleError("image-uploading-draft"):(o.hasEdited&&o.syncDraftImmediately(),e&&e())},o.onFocus=function(){"org"===o.props.question.questionType&&o.shouldAnswerOrgQuestionModalShow&&o.handleAnswerOrgQuestionModalShow(),o.setState({focusing:!0})},o.onFocusWithAuth=function(){return o.onFocusAuthChecked?o.onFocus():(o.onFocusAuthChecked=!0,o.context.authRequired(o.onFocus)())},o.onSelectText=function(e){o.setState({selectedText:e.replace(/\s/g,"")})},o.onLoadStart=function(){o.setState({loadingShown:!0})},o.onLoadEnd=function(){o.setState({loadingShown:!1})},o.handleInsertZVideo=function(){o.setState({showZVideoUploader:!0})},o.getAllInviters=function(){var e=o.props,t=e.question;return(0,e.fetchAllInviters)(t.id)},o.getToolbarSidePlugins=function(){var e=o.state,t=e.isFullscreen,n=e.isLeaveActive;return(!t||n)&&Object(d.b)(M.a,{icon:Object(d.b)(S.a,{text:!0}),className:"AnswerForm-enterFullscreenButton",onClick:o.toggleFullscreen},"enterFullscreen")},o.getToolbarMenuPlugins=function(){var e=o.state.scheduledPublishAt;return Object(d.b)(h.Fragment,{children:o.canUseScheduledPublish&&Object(d.c)(M.c,{onClick:function(){o.setUseScheduledPublish(!e),Q.a.trackEvent(Object(i.a)(o),{action:"Click",id:5730,name:"回答"})},children:[Object(d.b)(E.a,{text:!0}),e?"取消定时发布":"定时发布"]})})},o.setUseScheduledPublish=function(e,t){if(e)if(t)o.setState({scheduledPublishAt:t});else{var n=x.a(new Date,30);o.setState({initialScheduledPublishAt:n,scheduledPublishAt:n})}else B.a.confirm("取消后,当前设定的定时发布将不会生效,确定要取消发布吗?",{title:"取消定时发布",text:{cancel:"我再想想"}}).then((function(){o.setState({scheduledPublishAt:void 0}),Q.a.trackEvent(Object(i.a)(o),{action:"Click",id:5737,name:"回答"})})).catch((function(){Q.a.trackEvent(Object(i.a)(o),{action:"Click",id:5736,name:"回答"})})),Q.a.trackCardShow(Object(i.a)(o),{id:5735,name:"回答"})},o.getEditorState=function(){return o.editable.state.editorState?o.editable.state.editorState:o.editable.getEditorState()},o.toggleFullscreen=function(){var e=o.state.isFullscreen,t=function(){var e=o.scroller.querySelector(".Editable");return e?e.offsetTop:0};o.scrollTop=e?o.scroller.scrollTop-t():Math.max(-o.scroller.getBoundingClientRect().top,0),o.setState({isFullscreen:!e},(function(){o.state.isFullscreen?o.scrollTop>0&&(o.scroller.scrollTop=o.scrollTop+t()):window.scrollTo(0,o.scroller.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top+o.scrollTop)}))},o.exitFullscreen=function(){o.cloneEditor.resetWithValue(o.getCloneContent());o.fullscreenContent.addEventListener("animationend",(function e(){o.fullscreenContent.removeEventListener("animationend",e),o.setState({isLeaveActive:!1}),o.toggleFullscreen()})),o.setState({isLeaveActive:!0})},o.handleFullscreenRef=function(e){e?q.hide():(q.show(),o.setState({isToolbarSticky:!1}))},o.handleScroll=function(){o.isHandleScrollPending||(o.isHandleScrollPending=!0,requestAnimationFrame((function(){var e=o.state,t=e.isFullscreen,n=e.isToolbarSticky,r=!1;if(t&&o.scroller){var a=o.scroller.querySelector(".Editable-toolbar");r=!!a&&o.scroller.scrollTop===a.offsetTop}r!==n&&o.setState({isToolbarSticky:r}),o.isHandleScrollPending=!1})))},o.handleUploadStart=function(){o.setState({isUploading:!0})},o.handleUploadEnd=function(){o.setState({isUploading:!1})},o.handleUploadError=function(e,t){switch(t){case"video":o.handleError("video-upload-error");break;case"image":o.handleError("image-upload-error",e)}},o.handleAnswerOrgQuestionModalShow=function(){o.setState({answerModalShown:!0}),o.shouldAnswerOrgQuestionModalShow=!1},o.handleAnswerModalHide=function(){o.setState({answerModalShown:!1})},o.syncDraftImmediately=o.props.reporter.reportFailFromFunc($n.draftSave,(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.state.content,n=o.props.reporter,r=t.toHTML(),a=o.state.lastUpdatedTime,c=Math.floor((new Date).getTime()/1e3);e=!a||o.startCompositionTime-a>180?c-o.startCompositionTime:c-a,o.setState({isTyping:!1});var s,l=o.props.answer,u=(l=void 0===l?{}:l).attachment;s=o.videoAnswerEditable||"zvideo"===(null==u?void 0:u.type)?"video_answer":"video"===(null==u?void 0:u.type)?"video_answer_v2":"normal";var d=o.isVideoAnswer?t.getAttachment():null,f=o.isVideoAnswer?Boolean(d||r):Boolean(r);f?n.reportAllFromPromise($n.draftSave,o.updateDraft(r,e,s,d).then((function(e){e.payload&&e.payload.updatedTime&&o.setState({lastUpdatedTime:e.payload.updatedTime}),o.loggingDeltaTime=!1,delete o.startCompositionTime})).then((function(){Q.a.trackEvent(Object(i.a)(o),{action:"AutoSave"})}))):(o.deleteDraft(),n.reportSuccess($n.draftSave))})),o.syncDraft=Object(V.a)(o.syncDraftImmediately,2e3),o.updateDraft=function(){for(var e=o.props,t=e.question.id,n=e.draft,r=e.addDraft,a=e.updateDraft,i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return n?a.apply(void 0,[t].concat(c)):r.apply(void 0,[t].concat(c))},o.focus=function(){o.editable&&o.editable.focus()},o.hasVideo=function(){return!!o.editable&&o.editable.hasVideo()},o.hasADLinkCard=function(){return!!o.editable&&o.editable.hasADLinkCard()},o.hasFeeConsultCard=function(){return!!o.editable&&o.editable.hasFeeConsultCard()},o.hasMCNLinkCard=function(){return!!o.editable&&o.editable.hasMCNLinkCard()},o.hasCommercialReport=function(){var e=o.props.getFormData().commercialReportInfo;return null==e?void 0:e.isReport},o.handleChangeCommentPermission=function(e,t){var n=void 0===t?e:t;o.setState({commentPermission:n})},o.handleReshipmentSettings=function(e){"need_payment"!==e||o.props.currentUser.caEnabled||window.open("/copyright/invite"),o.setState({reshipmentSettings:e})},o.handleError=function(e,t){Object(fe.b)(e,t,o.props.showNotification)},o.handleBeforeVideoUpload=function(){var e=o.props.question;return!e.relationship||!e.relationship.isAnonymous},o.handleReverted=function(e){o.editable.resetWithValue(e.draft.content)},o.getDraftStatus=function(){var e=o.props.draft,t=o.state,n=t.isTyping,r=t.dateNow;return e?e.updating||n?"草稿保存中…":e.updated&&r<1e3*e.updatedTime+6e4?"草稿已保存":e.updateFailed?Object(d.b)("span",{className:"AnswerForm-draftStatus--failed",children:"草稿保存失败"}):C()(xr(),Object(z.toRelativeString)(e.updatedTime)):""},o.handleSettingExpand=function(){var e=o.state.settingExpanded;o.setState({settingExpanded:!e},(function(){var t=o.expandedSettingsRef;if(o.state.isFullscreen){o.scroller.scrollTo(0,e?-(null==t?void 0:t.offsetTop):null==t?void 0:t.offsetTop)}else{var n=o.expandedSettingsRef;window.scrollTo(0,e?-(null==n?void 0:n.offsetTop):null==n?void 0:n.offsetTop)}e&&o.focus()}))},o.handleEditGGRCard=function(e){var t=e.type,n=e.payload,r=o.state.mcnEditingGood,a=o.props.updateLinkCard;"goodsEditor/submitNewGoodsInfo"!==t?"goodsEditor/closeGoodsEditor"!==t||o.setState({mcnEditingGood:null}):a(Object.assign({},r,{title:null==n?void 0:n.title})).finally((function(){o.setState({mcnEditingGood:null}),o.editable.handleCommand("edit-mcn-link-card:".concat(r.id))}))},o.showDraftHistoryModal=function(){o.editable.handleCommand("toggle-draft-history-modal")},o.createEditorPlugins=function(){var e;return[Nt({type:"question",id:o.props.question.id,syncDraft:o.syncDraft}),$t({getShouldShowToolbarButton:function(){return!o.isVideoAnswer},getAllInviters:o.getAllInviters,inviterQuery:o.props.inviterQuery,getInitialThankInviterInfo:function(){return o.props.thankInviterInfo}}),Ft({shouldDisabled:function(){return o.props.question.relationship.isAnonymous},shouldShow:function(){return o.props.showUserProfitButton&&!o.isVideoAnswer},getContentInfo:function(){var e;return{type:"answer",id:null===(e=o.props.answer)||void 0===e?void 0:e.id}}}),Kt(),Qn({sourceType:"answer",sourceId:null===(e=o.props.question)||void 0===e?void 0:e.id})]},o.renderRichInput=function(){var e=o.props,t=e.useNewEditorSetting,n=e.answer,r=(n=void 0===n?{}:n).attachment,a=e.answer,i=e.question,c=e.isReediting,s=e.isPuQuestion,l=e.draft,u=e.defaultValue,f=o.state,p=f.isToolbarSticky,h=f.isFullscreen,b=f.toolbarMenuAttention,m=f.scheduledPublishAt,v=f.initialScheduledPublishAt,g="".concat(c?"修改":"写","回答...");if("commercial"===i.questionType&&!s){g="这是一个「".concat("品牌提问","」,请在回答前了解:「").concat("品牌提问","」由品牌方管理,回答由品牌方筛选后展示,传播与社区提问有所区别。回答著作权归作者所有。")}o.isVideoAnswer&&(g="详细介绍下视频(选填)");var y,O=o.videoAnswerEditable||"video_answer"===(null==l?void 0:l.type)||"zvideo"===(null==r?void 0:r.type);if(l)y=l.attachment;else if("zvideo"===(null==r?void 0:r.type))y=r.zvideo;else if("video"===(null==r?void 0:r.type)){var j;y=Object.assign({},null===(j=r.video)||void 0===j?void 0:j.videoInfo,{videoId:r.attachmentId})}var w={isToolbarSticky:p,useNewEditorSetting:t,ref:function(e){return o.editable=e},answer:a,question:i,isFullscreen:h,toolbarMenuAttention:b,scheduledPublishAt:m,initialScheduledPublishAt:v,placeholder:g,draft:l,defaultValue:u,isLegacyVideoAnswer:O,defaultVideo:y,videoAnswerEditable:o.videoAnswerEditable,videoAnswerPublished:o.videoAnswerPublished,editableReady:o.editableReady,handleChangeContent:o.onChangeContent,handleAfterChangeContent:o.onAfterChangeContent,handleFocusWithAuth:o.onFocusWithAuth,handleSelectText:o.onSelectText,handleSubmit:o.handleSubmit,handleError:o.handleError,handleLoadStart:o.onLoadStart,handleLoadEnd:o.handleLoadEnd,handleUploadStart:o.handleUploadStart,handleUploadEnd:o.handleUploadEnd,handleUploadError:o.handleUploadError,handleBeforeVideoUpload:o.handleBeforeVideoUpload,handleMCNLinkCardEdit:function(e,t){o.setState({mcnEditingGood:t})},isVideoAnswer:o.isVideoAnswer,handleInsertZVideo:o.handleInsertZVideo,getToolbarSidePlugins:o.getToolbarSidePlugins,createEditorPlugins:o.createEditorPlugins,getToolbarMenuPlugins:o.getToolbarMenuPlugins,getEditorBeforePlugins:o.getEditorBeforePlugins,setUseScheduledPublish:o.setUseScheduledPublish};return Object(d.b)(tr,Object.assign({},w))};var c=o.props,s=c.defaultValue,l=c.draft,u=l?l.editableContent:s,f=l?l.updatedTime:0;return o.state={draft:u,content:{toHTML:function(){return""}},isEmpty:!u,isTyping:!1,reshipmentSettings:null,commentPermission:null,answerModalShown:!1,focusing:!1,selectedText:null,loadingShown:!1,isUploading:!1,rewardNotication:!0,checked:e.isRewardable,isFullscreen:!1,isToolbarSticky:!1,isLeaveActive:!1,toolbarMenuAttention:null,dateNow:0,rewardModalShown:!1,lastUpdatedTime:f,showZVideoUploader:!1,mcnEditingGood:null,initialScheduledPublishAt:void 0,scheduledPublishAt:void 0,thankInviterInfo:e.thankInviterInfo||e.inviterFromNotification,footerPositionStatus:"",settingExpanded:!1},o.hasEdited=!1,o}return Object(c.a)(n,[{key:"canUseScheduledPublish",get:function(){var e=this.props,t=e.currentUser,n=e.isReediting,r=e.activeTabKey;return t&&t.autoSendingCreations&&r===G.a.textAnswer&&!n}}]),Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.reporter,o=t.draft;n.reportRequest($n.editableInit),this.cancelEditableStatscTimeout=n.reportFailAfterTimeout($n.editableInit),o&&(n.reportRequest($n.draftLoad),this.cancelDraftLoadStatscTimeout=n.reportFailAfterTimeout($n.draftLoad)),this.shouldAnswerOrgQuestionModalShow=!Z.getKnown(),this.onFocusAuthChecked=!1;var a=this.props,i=a.fillCurrentUserIfNeeded,c=a.getUserProfitPermission,s=i(["lastCommentPermission","caEnabled","autoSendingCreations","mcn_user_info"]);c(),Promise.resolve(s).then((function(){ne.a.getActionsByNames(["a_draft_history",e.canUseScheduledPublish&&"auto_pub_answer"].filter(Boolean)).then((function(t){var n=Object(r.a)(t,1)[0];n&&(e.setState({toolbarMenuAttention:n.description}),ne.a.markAsShown(n),"auto_pub_answer"===n.guide_name&&Q.a.trackCardShow(e,{id:5738}))})),Q.a.trackCardShow(e,{id:5729,name:"回答"})})),document.addEventListener("compositionstart",this.onCompositionStart),document.addEventListener("compositionend",this.onCompositionEnd),window.onbeforeunload=function(){return e.state.isUploading||e.composition||e.syncDraft.pending()||e.props.draft&&e.props.draft.updating?"草稿尚未保存完毕,确定离开此页?":void 0},this.setState({dateNow:Date.now()}),this.reRenderTimer=setInterval((function(){return e.setState({dateNow:Date.now()})}),6e4);var l=this.props,u=l.answer,d=l.settings,f=l.loadSettings;u&&!d&&f(u.id),this.props.imperativeRef&&(this.props.imperativeRef.current={focus:this.focus.bind(this),hasVideo:this.hasVideo.bind(this),hasADLinkCard:this.hasADLinkCard.bind(this),hasMCNLinkCard:this.hasMCNLinkCard.bind(this),hasFeeConsultCard:this.hasFeeConsultCard.bind(this),toggleFullscreen:this.toggleFullscreen,hasCommercialReport:this.hasCommercialReport,hasEditorContent:function(){return!e.state.isEmpty}})}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props.reporter,r=this.state,o=e.currentUser,a={};r.reshipmentSettings||void 0===o.caEnabled||(a.reshipmentSettings=o.caEnabled?"need_payment":"allowed"),r.commentPermission||void 0===o.lastCommentPermission||(a.commentPermission=o.lastCommentPermission),Object.keys(a).length&&this.setState(a),this.draftLoaded||this.state.draft||this.props.draft||!e.draft||(n.reportRequest($n.draftLoad),n.reportAllFromFunc($n.draftLoad,(function(){var n=e.draft.editableContent;n&&(t.setState({draft:n,isEmpty:!n}),t.editable&&!t.editable.toHTML()&&t.editable.resetWithValue(n))}))(),this.draftLoaded=!0)}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.focusing,o=n.thankInviterInfo,a=this.props,i=a.tagline,c=a.inviterFromNotification;if(i){var s=F.a.get("rewardNotication");r&&!s&&(this.setState({rewardNotication:!1}),F.a.set("rewardNotication",!0),this.timeout=setTimeout((function(){t.setState({rewardNotication:!0})}),2e3))}o||!c||e.inviterFromNotification||this.setState({thankInviterInfo:c})}},{key:"componentWillUnmount",value:function(){this.syncDraft.cancel(),document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd),window.onbeforeunload=null,this.timeout&&clearTimeout(this.timeout),this.reRenderTimer&&clearInterval(this.reRenderTimer),this.props.imperativeRef&&(this.props.imperativeRef.current=null)}},{key:"getCloneContent",value:function(){return this.getEditorState().getCurrentContent()}},{key:"deleteDraft",value:function(){var e=this.props,t=e.question,n=e.draft,r=e.deleteDraft;n&&r(t.id)}},{key:"renderReshipmentSettings",value:function(e){var t=this;return Object.keys(Er).map((function(n){return Object(d.b)(I.a,{onClick:function(){return t.handleReshipmentSettings(n)},checked:n===e,children:Er[n]},n)}))}},{key:"renderFooter",value:function(){var e=this,t=this.props,n=t.draft,r=t.isReediting,o=t.question.commercial,a=t.answer,i=t.question,c=t.useNewEditorSetting,s=t.handleToggleAnonymous,l=this.state,u=l.commentPermission,f=l.focusing,p=l.isEmpty,h=l.isTyping,b=l.isFullscreen,m=l.loadingShown,v=l.reshipmentSettings,g=l.selectedText,y=l.dateNow,j=l.scheduledPublishAt,w=null;if(m)w=Object(d.b)(P.a,{count:3});else if(g)w="".concat(g.length," 个字");else if(n){var k=null;k=n.updating||h?"草稿保存中…":n.updated&&y<1e3*n.updatedTime+6e4?"草稿已保存":n.updateFailed?Object(d.b)("span",{className:"AnswerForm-draftStatus--failed",children:"草稿保存失败"}):C()(kr(),Object(z.toRelativeString)(n.updatedTime)),w=Object(d.c)("div",{children:[Object(d.b)(N.c,{preset:"plain",className:"AnswerForm-delete","aria-label":"删除草稿","data-tooltip":"删除草稿",onClick:this.onDeleteDraftModalShow,icon:R.a}),k]})}else o&&o.tip&&o.tip.message&&(w=o.tip.message);var x=Object(d.b)("div",{className:O()("AnswerForm-footer",{"AnswerForm-footer--hidden":!b&&!f&&p,useNewEditorSetting:c}),children:c?Object(d.c)(d.a,{children:[Object(d.b)(it,{question:i,answer:a,isVideoAnswer:this.isVideoAnswer,handleToggleAnonymous:s,isFullScreen:b,positionStatus:this.state.footerPositionStatus,isReediting:r,setScheduledPublish:this.setUseScheduledPublish,canScheduledPublish:this.canUseScheduledPublish,handleExpand:this.handleSettingExpand,settingExpanded:this.state.settingExpanded}),Object(d.b)(st,{isFullScreen:b,type:"answer",questionId:i.id,textCount:null==g?void 0:g.length,draftStatus:this.getDraftStatus(),removeDraft:this.onDeleteDraftModalShow,isReediting:r,scheduledPublishAt:j,onCancelEdit:this.onCancel,draft:n,handleSubmit:this.handleSubmit,canSubmit:this.canSubmit()})]}):Object(d.c)(d.a,{children:[Object(d.c)("div",{className:"AnswerForm-footerContent AnswerForm-container",children:[Object(d.b)("div",{className:"AnswerForm-status",children:w}),Object(d.c)("div",{className:"AnswerForm-footerRight",children:[r?Object(d.b)("a",{className:"AnswerForm-cancel",onClick:this.onCancel,children:n?"保存草稿并离开":"取消"}):Object(d.c)(_.c,{toggler:Object(d.b)(N.c,{preset:"plain",onRef:function(t){e.settingsTogglerEl=t},icon:T.a,label:"设置"}),reversed:!0,menuClassName:"AnswerItem-selfMenu",itemClassName:"AnswerItem-selectMenuItem",children:[this.renderReshipmentSettings(v),Object(d.b)(_.a,{}),Object(d.b)(re.c,{onChange:this.handleChangeCommentPermission,current:u})]}),Object(d.b)(N.c,{className:"AnswerForm-submit",preset:"primary",color:"blue",onClick:this.handleSubmit,children:r?"提交修改":j?"定时发送":"提交回答"})]})]}),!this.isVideoAnswer&&Object(d.b)(yr,{answer:a,question:i})]})});return!b?Object(d.b)(L.a,{bottom:!0,container:function(){return e.form},children:x}):x}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.isReediting,o=t.question,a=t.currentUser,i=t.answer,c=t.answer,s=(c=void 0===c?{}:c).answerType,l=t.activeTabKey,u=t.handleTabChange,f=t.useNewEditorSetting,p=this.state,b=p.deleteDraftModalShown,m=p.isFullscreen,v=p.isLeaveActive,g=p.showZVideoUploader,y=p.mcnEditingGood;return Object(d.b)(U.a,{module:"AnswerEditView",content:{type:"Answer",parent_token:String(o.id),author_member_hash_id:a.id},children:Object(d.c)("form",{ref:function(t){e.form=t},className:O()("AnswerForm",n),onSubmit:function(e){return e.preventDefault()},noValidate:!0,children:[m&&Object(d.b)("div",{className:O()("AnswerForm-fullscreenBackdrop",{isLeaveActive:v})}),Object(d.c)("div",{className:O()({"AnswerForm-fullscreenContent":m,isLeaveActive:v}),ref:function(t){return e.fullscreenContent=t},children:[f&&m&&Object(d.c)(j.Box,{bg:"GBK99A",css:{position:"relative",boxShadow:"0 0 32px rgba(0, 0, 0, 0.06);"},children:[Object(d.b)("div",{className:"AnswerForm-container",ref:this.handleFullscreenRef,children:Object(d.c)(j.Flex,{justifyContent:"space-between",alignItems:"center",children:[r?Object(d.b)(j.Box,{fontSize:15,fontWeight:"bold",lineHeight:"21px",color:"GBK03A",children:this.videoAnswerPublished?"本回答为视频回答":"本回答为图文回答"}):Object(d.b)(G.b,{activeTabKey:l,onChange:u}),Object(d.c)(W.a,{as:j.Flex,zaAction:"Unknown",zaText:"退出全屏编辑",zaType:"Button",aliginItem:"center",fontSize:14,color:"GBL05A",lineHeight:"55px",onClick:this.toggleFullscreen,css:{cursor:"pointer"},children:[Object(d.b)(j.Text,{mr:"10px",children:"退出全屏编辑"}),Object(d.b)(A.a,{text:!0,center:!0})]})]})}),Object(d.b)(Cr,{question:o,handleImportDoc:this.onInsertDoc,handleHistoryVersion:this.showDraftHistoryModal})]}),Object(d.c)("div",{className:O()({"AnswerForm-fullscreenScroller":m,useNewEditorSetting:f}),ref:function(t){return e.scroller=t},onScroll:this.handleScroll,children:[m&&!f&&Object(d.c)("div",{className:"AnswerForm-container",ref:this.handleFullscreenRef,children:[Object(d.b)("div",{className:"AnswerForm-title",children:o.title}),r?this.videoAnswerPublished?Object(d.b)("div",{css:function(e){return{padding:"4px 0 20px 20px",fontWeight:"bold",fontSize:15,lineHeight:"21px",color:e.colors.GBK03A}},children:"本回答为视频回答"}):null:Object(d.b)(G.b,{activeTabKey:l,onChange:u})]}),f&&!m&&Object(d.b)(Cr,{question:o,handleImportDoc:this.onInsertDoc,handleHistoryVersion:this.showDraftHistoryModal}),m&&!f&&Object(d.c)(N.c,{className:"AnswerForm-exitFullscreenButton",onClick:this.exitFullscreen,onMouseDown:function(e){return e.preventDefault()},children:[Object(d.b)(A.a,{text:!0,center:!0})," 退出全屏"]}),this.renderRichInput(),f&&Object(d.b)("div",{ref:function(t){e.expandedSettingsRef=t},children:Object(d.b)(it,{inEditor:!0,question:o,answer:i,isVideoAnswer:this.isVideoAnswer,handleToggleAnonymous:this.props.handleToggleAnonymous,isReediting:r,setScheduledPublish:this.setUseScheduledPublish,canScheduledPublish:this.canUseScheduledPublish,handleExpand:this.handleSettingExpand,settingExpanded:this.state.settingExpanded,isFullScreen:m})})]}),this.renderFooter()]}),m&&Object(h.cloneElement)(this.renderRichInput(),{readOnly:!0,className:"AnswerForm-cloneEditor",defaultValue:this.getCloneContent(),allowToolbarSticky:!1,toolbarMenuAttention:null,ref:function(t){return e.cloneEditor=t}}),"org"===o.questionType&&Object(d.b)(Z,{shown:this.state.answerModalShown,onClose:this.handleAnswerModalHide}),"commercial"===o.questionType&&Object(d.b)($,{shown:this.state.answerModalShown,onClose:this.handleAnswerModalHide}),Object(d.b)(lt.a,{title:"清除草稿",subtitle:r?"你确定要清除保存的草稿并取消编辑吗?":"你确定要清除保存的草稿吗?",shown:b,onCancel:this.onDeleteDraftModalHide,onSubmit:this.onDeleteDraft}),g&&Object(d.b)(te,{show:g,enableZVideoListSelectorEntry:!0,showFooter:!0,type:"insert",onClose:function(){e.setState({showZVideoUploader:!1})},onSubmit:function(t){e.setState({showZVideoUploader:!1}),e.editable.handleCommand("insert-zvideo-card:".concat(JSON.stringify(t)))}}),Object(d.b)(H.b,{className:"AnswerForm-MCNEditor",title:"编辑商品",onClose:function(){e.setState({mcnEditingGood:null})},children:Boolean(y)&&Object(d.b)(K.a,{className:"AnswerForm-MCNEditorIframe",src:"https://www.zhihu.com/selection/goods-editor?title=".concat(y.title,"&originTitle=").concat(y.originTitle,"&source=").concat(y.source,"&sourceId=").concat(y.sourceId,"&productTypeName=").concat(y.productTypeName),onMessage:this.handleEditGGRCard})}),Object(d.b)(dt,{onClose:function(){e.props.onCancel()},shown:"slideshow"===s})]})})}},{key:"videoAnswerPublished",get:function(){var e=this.props.answer,t=(e=void 0===e?{}:e).attachment;return["zvideo","video"].includes(null==t?void 0:t.type)}},{key:"videoAnswerEditable",get:function(){return this.props.activeTabKey===G.a.videoAnswer}},{key:"isVideoAnswer",get:function(){return this.videoAnswerPublished||this.videoAnswerEditable}}]),n}(h.Component);Rr.propTypes={activeTabKey:p.a.string,handleTabChange:p.a.func,question:p.a.object,isReediting:p.a.bool,defaultValue:p.a.string,getFormData:p.a.func,reporter:p.a.object},Rr.defaultProps={isReediting:!1},Rr.contextTypes={authRequired:p.a.func};var Tr={addDraft:ie.b,updateDraft:ie.ib,deleteDraft:ie.j,showNotification:le.h,fillCurrentUserIfNeeded:ue.e,loadSettings:ce.x,updateSettingsDisclaimer:ce.L,loadLabel:se.e,getUserProfitPermission:oe.b,updateLinkCard:ae.c,fetchAllInviters:ie.o},Ar=Object(v.compose)(g.withRouter,Object(m.connect)((function(e,t){var n,r,o=e.entities,a=o.questions,i=o.drafts,c=void 0===i?{}:i,s=e.question,l=t.location.query.inviter,u=Object(ue.b)(e),d=Object(ie.d)(e,t.question.id),f=l&&(null==d||null===(n=d.find)||void 0===n?void 0:n.call(d,(function(e){return e.id===l})));return{question:a[t.question.id]||t.question,draft:c["question_".concat(t.question.id)],currentUser:u,isPuQuestion:Boolean(s&&s.brand&&s.brand.isPuQuestion),disclaimers:s.disclaimers[t.question.id],settings:t.answer?e.answers.settings[t.answer.id]:null,showUserProfitButton:e.userProfit.permission.visible,thankInviterInfo:null===(r=Object(se.c)(e,t.answer))||void 0===r?void 0:r.thankInviterInfo,allInviters:d,inviterQuery:l,inviterFromNotification:f,isOffice:Object(de.e)(e),useNewEditorSetting:"1"===Object(de.a)(e,"editor")}}),Tr),Ae,Wn.e)(Rr)},function(e,t,n){"use strict";n.d(t,"a",(function(){return G}));var r=n(409),o={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function a(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var i={date:a({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:a({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:a({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},c={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,n){var r,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,i=o.width?String(o.width):a;r=e.formattingValues[i]||e.formattingValues[a]}else{var c=e.defaultWidth,s=o.width?String(o.width):e.defaultWidth;r=e.values[s]||e.values[c]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t,n){var r=String(t),o=n||{},a=o.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],c=r.match(i);if(!c)return null;var s,l=c[0],u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return s="[object Array]"===Object.prototype.toString.call(u)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(u,(function(e){return e.test(l)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(u,(function(e){return e.test(l)})),s=e.valueCallback?e.valueCallback(s):s,{value:s=o.valueCallback?o.valueCallback(s):s,rest:r.slice(l.length)}}}var u,d={code:"en-US",formatDistance:function(e,t,n){var r;return n=n||{},r="string"==typeof o[e]?o[e]:1===t?o[e].one:o[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:i,formatRelative:function(e,t,n,r){return c[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(u={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),r=t||{},o=n.match(u.matchPattern);if(!o)return null;var a=o[0],i=n.match(u.parsePattern);if(!i)return null;var c=u.valueCallback?u.valueCallback(i[0]):i[0];return{value:c=r.valueCallback?r.valueCallback(c):c,rest:n.slice(a.length)}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},f=n(414),p=n(72),h=n(415),b=n(56);function m(e){Object(b.a)(1,arguments);var t=1,n=Object(p.a)(e),r=n.getUTCDay(),o=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function v(e){Object(b.a)(1,arguments);var t=Object(p.a)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=m(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var i=m(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function g(e){Object(b.a)(1,arguments);var t=v(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=m(n);return r}var y=n(133);function O(e,t){Object(b.a)(1,arguments);var n=t||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,a=null==o?0:Object(y.a)(o),i=null==n.weekStartsOn?a:Object(y.a)(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Object(p.a)(e),s=c.getUTCDay(),l=(s<i?7:0)+s-i;return c.setUTCDate(c.getUTCDate()-l),c.setUTCHours(0,0,0,0),c}function j(e,t){Object(b.a)(1,arguments);var n=Object(p.a)(e,t),r=n.getUTCFullYear(),o=t||{},a=o.locale,i=a&&a.options&&a.options.firstWeekContainsDate,c=null==i?1:Object(y.a)(i),s=null==o.firstWeekContainsDate?c:Object(y.a)(o.firstWeekContainsDate);if(!(s>=1&&s<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(r+1,0,s),l.setUTCHours(0,0,0,0);var u=O(l,t),d=new Date(0);d.setUTCFullYear(r,0,s),d.setUTCHours(0,0,0,0);var f=O(d,t);return n.getTime()>=u.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function w(e,t){Object(b.a)(1,arguments);var n=t||{},r=n.locale,o=r&&r.options&&r.options.firstWeekContainsDate,a=null==o?1:Object(y.a)(o),i=null==n.firstWeekContainsDate?a:Object(y.a)(n.firstWeekContainsDate),c=j(e,t),s=new Date(0);s.setUTCFullYear(c,0,i),s.setUTCHours(0,0,0,0);var l=O(s,t);return l}var C=n(127),k="midnight",x="noon",S="morning",E="afternoon",R="evening",T="night";function A(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;if(0===a)return n+String(o);var i=t||"";return n+String(o)+i+Object(C.a)(a,2)}function N(e,t){return e%60==0?(e>0?"-":"+")+Object(C.a)(Math.abs(e)/60,2):_(e,t)}function _(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Object(C.a)(Math.floor(o/60),2)+n+Object(C.a)(o%60,2)}var I={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return h.a.y(e,t)},Y:function(e,t,n,r){var o=j(e,r),a=o>0?o:1-o;if("YY"===t){var i=a%100;return Object(C.a)(i,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Object(C.a)(a,t.length)},R:function(e,t){var n=v(e);return Object(C.a)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Object(C.a)(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Object(C.a)(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Object(C.a)(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return h.a.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Object(C.a)(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){Object(b.a)(1,arguments);var n=Object(p.a)(e),r=O(n,t).getTime()-w(n,t).getTime();return Math.round(r/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Object(C.a)(o,t.length)},I:function(e,t,n){var r=function(e){Object(b.a)(1,arguments);var t=Object(p.a)(e),n=m(t).getTime()-g(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Object(C.a)(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):h.a.d(e,t)},D:function(e,t,n){var r=function(e){Object(b.a)(1,arguments);var t=Object(p.a)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Object(C.a)(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Object(C.a)(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Object(C.a)(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Object(C.a)(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?x:0===o?k:o/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?R:o>=12?E:o>=4?S:T,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return h.a.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):h.a.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Object(C.a)(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Object(C.a)(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):h.a.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):h.a.s(e,t)},S:function(e,t){return h.a.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return N(o);case"XXXX":case"XX":return _(o);case"XXXXX":case"XXX":default:return _(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return N(o);case"xxxx":case"xx":return _(o);case"xxxxx":case"xxx":default:return _(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+A(o,":");case"OOOO":default:return"GMT"+_(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+A(o,":");case"zzzz":default:return"GMT"+_(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e,a=Math.floor(o.getTime()/1e3);return Object(C.a)(a,t.length)},T:function(e,t,n,r){var o=(r._originalDate||e).getTime();return Object(C.a)(o,t.length)}};function M(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function L(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var P={p:L,P:function(e,t){var n,r=e.match(/(P+)(p+)?/),o=r[1],a=r[2];if(!a)return M(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",M(o,t)).replace("{{time}}",L(a,t))}},B=n(211),z=["D","DD"],D=["YY","YYYY"];function F(e){return-1!==z.indexOf(e)}function U(e){return-1!==D.indexOf(e)}function V(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,K=/^'([^]*?)'?$/,Q=/''/g,W=/[a-zA-Z]/;function G(e,t,n){Object(b.a)(2,arguments);var o=String(t),a=n||{},i=a.locale||d,c=i.options&&i.options.firstWeekContainsDate,s=null==c?1:Object(y.a)(c),l=null==a.firstWeekContainsDate?s:Object(y.a)(a.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=i.options&&i.options.weekStartsOn,h=null==u?0:Object(y.a)(u),m=null==a.weekStartsOn?h:Object(y.a)(a.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!i.localize)throw new RangeError("locale must contain localize property");if(!i.formatLong)throw new RangeError("locale must contain formatLong property");var v=Object(p.a)(e);if(!Object(r.a)(v))throw new RangeError("Invalid time value");var g=Object(B.a)(v),O=Object(f.a)(v,g),j={firstWeekContainsDate:l,weekStartsOn:m,locale:i,_originalDate:v},w=o.match(H).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,P[t])(e,i.formatLong,j):e})).join("").match(q).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return Y(n);var o=I[r];if(o)return!a.useAdditionalWeekYearTokens&&U(n)&&V(n,t,e),!a.useAdditionalDayOfYearTokens&&F(n)&&V(n,t,e),o(O,n,i.localize,j);if(r.match(W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return w}function Y(e){return e.match(K)[1].replace(Q,"'")}},function(e,t,n){"use strict";var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(3),d=n.n(u),f=n(1),p=n(73),h=n(27),b=n(119),m=n(153),v=n(102),g=n(31),y=n(375),O=n(20),j=n.n(O),w=n(21),C=n.n(w),k=n(22),x=n.n(k),S=n(23),E=n.n(S),R=n(13),T=n.n(R),A=n(1383),N=n(11),_=n.n(N),I=n(5);function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T()(e);if(t){var o=T()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E()(this,n)}}var L=function(e){x()(n,e);var t=M(n);function n(){var e;j()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleChange=function(t){e.props.onChange(t)},e}return C()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,r=e.name,o=e.type,a=e.value,i=e.checked,c=JSON.stringify(a);return Object(I.g)("label",{className:_()("CheckItem",t)},Object(I.g)("input",{className:"CheckItem-input",type:o,name:r,value:c,onChange:this.handleChange,checked:i}),Object(I.g)("div",{className:"CheckItem-box"},Object(I.g)("div",{className:"CheckItem-inner"},n),Object(I.g)(A.a,{className:"CheckItem-icon",size:20})))}}]),n}(f.Component);L.propTypes={name:d.a.string,onChange:d.a.func,checked:d.a.bool,className:d.a.string,type:d.a.string,value:d.a.any},L.defaultProps={name:"checkitems",type:"checkbox"};var P=L,B=n(811),z=n(135),D=n(398),F=n(1107),U=n(862),V=n(372);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var H=function(e){Object(i.a)(n,e);var t=q(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={value:null},e.handleModify=function(){e.setState({modifying:!0})},e.handleChange=function(t){e.setState({value:t.target.value})},e.handleCancel=function(){e.setState({value:null,modifying:!1})},e.handleSubmit=function(t){t.preventDefault(),e.props.onBioChange(e.state.value),e.handleCancel()},e.handleSelect=function(){e.props.onSelect(e.props.value)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.user,n=e.bio,r=e.title,o=e.checked,a=e.rich,i=this.state,c=i.modifying,s=i.value;return c?Object(l.c)("div",{className:"TopicBioItem",children:[Object(l.b)("div",{className:"TopicBioItem-title",children:r}),Object(l.c)("form",{onSubmit:this.handleSubmit,children:[Object(l.b)("div",{className:"TopicBioItem-inner",children:Object(l.b)(U.a,{className:"TopicBioItem-authorInfo",noLink:!0,author:t,children:Object(l.b)(z.a,{className:"TopicBioItem-input",defaultValue:n,onChange:this.handleChange,placeholder:r,autoFocus:!0})})}),Object(l.c)("div",{className:"TopicBioItem-inputFooter",children:[Object(l.b)(D.a,{current:s?s.length:0,max:40}),Object(l.c)("div",{className:"TopicBioItem-actions",children:[Object(l.b)(g.c,{preset:"plain",type:"reset",onClick:this.handleCancel,children:"取消"}),Object(l.b)(g.c,{preset:"primary",color:"blue",type:"submit",children:"保存"})]})]})]})]}):n?Object(l.c)("div",{className:"TopicBioItem",children:[Object(l.b)("div",{className:"TopicBioItem-title",children:r}),Object(l.b)(P,{name:"topic-bio",type:"radio",onChange:this.handleSelect,value:this.props.value,checked:o,children:Object(l.b)(U.a,{noLink:!0,author:t,className:"TopicBioItem-authorInfo",children:Object(l.c)("div",{children:[a?Object(l.b)(V.a,{inline:!0,className:"TopicBioItem-bio",html:n}):Object(l.b)("span",{className:"TopicBioItem-bio",children:n}),Object(l.b)(F.a,{className:"TopicBioItem-modifyButton",onClick:this.handleModify})]})})})]}):Object(l.b)("div",{className:"TopicBioItem",children:Object(l.c)(g.c,{className:"TopicBioItem-addButton",size:"spread",preset:"link",onClick:this.handleModify,children:[Object(l.b)(B.a,{text:!0,center:!0})," 添加",r]})})}}]),n}(f.Component);H.propTypes={user:d.a.object.isRequired,title:d.a.node.isRequired,value:d.a.object.isRequired,onBioChange:d.a.func.isRequired,onSelect:d.a.func.isRequired,checked:d.a.bool.isRequired};var K=H;function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var W=function(e,t){var n=e.type,r=e.topic,o=(r=void 0===r?{}:r).id,a=t.type,i=t.topic,c=(i=void 0===i?{}:i).id;return n===a&&o===c},G=function(e){Object(i.a)(n,e);var t=Q(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={value:null},e.handleSelect=function(t){return e.setState({value:t})},e.handleChoose=function(){return e.props.onBioChoose(e.state.value)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=this;if(this.props.isFetching)return Object(l.b)("div",{className:"TopicBios-loading",children:Object(l.b)(y.a,{})});var t=this.props,n=t.user,r=t.question.topics,o=t.bios,a=t.currentBio,i=t.onHeadlineUpdate,c=t.onBioUpdate,s=this.state.value||a,u={type:"headline"};return Object(l.c)("div",{children:[Object(l.c)("div",{className:"TopicBioItems",children:[Object(l.b)(K,{title:"一句话介绍",user:n,bio:n.headline,value:u,onBioChange:i,onSelect:this.handleSelect,checked:W(s,u),rich:!0}),r.map((function(t){var r={type:"topic",topic:{id:t.id}};return Object(l.b)(K,Object.assign({title:"在 ".concat(t.name," 话题下的话题经验"),user:n},function(e,t){return e.find((function(e){return e.topic.id===t}))}(o,t.id),{value:r,onBioChange:function(e){return c(t.id,e)},onSelect:e.handleSelect,checked:W(s,r)}),t.id)}))]}),Object(l.b)(p.a,{children:Object(l.b)(g.c,{color:"blue",preset:"primary",onClick:this.handleChoose,children:"完成"})})]})}}]),n}(f.Component);G.propTypes={onHeadlineUpdate:d.a.func.isRequired,onBioUpdate:d.a.func.isRequired,onBioChoose:d.a.func.isRequired,question:d.a.object.isRequired,user:d.a.object.isRequired};var Y=G;function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var X=function(e){Object(i.a)(n,e);var t=Z(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleUpdateHeadline=function(t){e.props.updateProfile(null,{headline:t})},e.handleUpdateBio=function(t,n){e.props.updateBio(t,n)},e.handleBioChoose=function(t){t&&e.props.chooseBio(e.props.question.id,t),e.props.onClose()},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.loadBios(this.props.question.id)}},{key:"render",value:function(){return Object(l.b)(Y,Object.assign({onHeadlineUpdate:this.handleUpdateHeadline,onBioUpdate:this.handleUpdateBio,onBioChoose:this.handleBioChoose},this.props))}}]),n}(f.Component);X.contextTypes={currentUser:d.a.object},X.propTypes={question:d.a.object.isRequired};var J=Object(h.connect)((function(e,t){var n=e.currentUser,r=e.question.bio,o=e.entities,a=o.questions,i=o.users,c=e.topic.bios,s=t.question.id,l=a[s],u=(r[s]||{result:{type:"headline"}}).result;return{isFetching:c.isFetching,currentBio:{type:u.type,topic:u.topic},bios:l.topics.map((function(e){return{topic:e,bio:c[e.id]}})),question:l,user:i[n]}}),{updateProfile:b.m,updateBio:m.hb,chooseBio:v.e,loadBios:v.E})(X);function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var ee=function(e){Object(i.a)(n,e);var t=$(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.shown,n=e.onClose,o=Object(r.a)(e,["shown","onClose"]);return Object(l.b)(p.b,{title:"编辑话题经验",subtitle:Object(l.c)("span",{children:["可以填写你从事的职业、取得的资格或过往经历,",Object(l.b)("br",{}),"让你在这个问题下的回答更具说服力。"]}),onClose:n,size:"large",hotKeyClosable:!1,maskClosable:!1,children:t&&Object(l.b)(J,Object.assign({},o,{onClose:n}))})}}]),n}(f.Component);ee.propTypes=Object.assign({shown:d.a.bool.isRequired,onClose:d.a.func.isRequired},J.propTypes);t.a=ee},function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(20),o=n.n(r),a=n(21),i=n.n(a),c=n(22),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(74),h=n.n(p),b=n(1),m=n(11),v=n.n(m),g=n(31),y=n(5);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var j=function(e){s()(n,e);var t=O(n);function n(){var e;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleClick=function(){var t=e.props;(0,t.onSelect)(t.page)},e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.text,n=e.isCurrent,r=e.className;return Object(y.g)(g.c,{preset:g.b.Plain,className:v()("PaginationButton",{"PaginationButton--current":n},r),onClick:this.handleClick,disabled:n},t)}}]),n}(b.Component);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var o=f()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u()(this,n)}}var C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Array.from({length:t},(function(t,n){return n+e}))},k=function(e){s()(n,e);var t=w(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){var e,t=this.props,n=t.onSelect,r=t.className,o=t.clickCallback,a=this.props.current,i=this.props.total,c=o&&(e=o,function(){e.apply(void 0,arguments)})||n,s=function(e,t){var n="...";return t<=5?C(1,t):e>t-3?[1,n].concat(h()(C(t-3,3)),[t]):e<=3?[1].concat(h()(C(2,3)),[n,t]):[1,n].concat(h()(C(e-Math.floor(1.5),3)),[n,t])}(a,i);return Object(y.g)("div",{className:v()("Pagination",r)},a>1&&a<=i&&Object(y.g)(j,{className:"PaginationButton-prev",onSelect:c,text:"上一页",page:a-1}),s.map((function(e,t){return"number"==typeof e?Object(y.g)(j,{onSelect:c,text:e,page:e,key:t,isCurrent:a===e}):Object(y.g)("button",{disabled:!0,key:t,className:"PaginationButton PaginationButton--ellipsis"},e)})),a>0&&a<i&&Object(y.g)(j,{className:"PaginationButton-next",onSelect:c,text:"下一页",page:a+1}))}}]),n}(b.Component);k.defaultProps={current:1,total:1,onSelect:function(){}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(19),d=n(27),f=n(1062),p=n.n(f),h=n(320),b=n.n(h),m=n(161),v=n(448);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}function y(e,t){var n=t.os,r=t.id,o=t.sessionId,a=t.type;return e.replace("__OS__",n).replace("__REQUESTID__",o).replace("__SESSIONID__",o).replace("__ATOKEN__",r).replace("__AID__",r).replace("__PAGETYPE__",a)}var O=function(e){Object(a.a)(n,e);var t=g(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={urls:null,logged:!1},e.handleObserve=function(t){t&&e.log()},e.log=function(){e.state.logged||Promise.resolve(e.state.urls||e.load().then((function(t){return t?(t=e.normalize(t),e.setState({urls:t}),t):[]}))).then((function(e){return e.forEach((function(e){return e&&Object(m.c)(e)}))})).then((function(){return e.setState({logged:!0})}))},e.load=function(){var t=e.props,n=t.type,r=t.id;return(0,t.loadBrandEntityTrackUrl)({type:n,id:r}).then((function(e){return e&&e.payload&&e.payload.data}))},e.normalize=function(t){var n=b()(),r=e.props,o=r.ua,a=r.id,i=r.type,c=encodeURIComponent("其他");o.Android?c="android":o.iOS&&(c="ios");var s={os:c,id:a,sessionId:n,type:i};return t.map((function(e){return y(e,s)}))},e}return Object(o.a)(n,[{key:"render",value:function(){return!this.state.logged&&Object(s.b)(p.a,{rootMargin:"0px 0px 0px 0px",onChange:this.handleObserve})}}]),n}(l.Component),j=Object(u.compose)(Object(d.connect)((function(e){return{ua:e.env.userAgent}}),{loadBrandEntityTrackUrl:v.b}))(O)},,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M16.464 4s.051-2-1.479-2H9C7.194 2 7.465 4 7.465 4H4.752c-2.57 0-2.09 3.5 0 3.5l1.213 13.027S5.965 22 7.475 22h8.987c1.502 0 1.502-1.473 1.502-1.473l1.2-13.027c2.34 0 2.563-3.5 0-3.5h-2.7zM8.936 18.5l-.581-9h1.802v9H8.936zm4.824 0v-9h1.801l-.61 9H13.76z",fillRule:"evenodd"}))};i.defaultProps={name:"Trash"},t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(40),n(845),n(74),n(863),n(55),n(63),n(7),n(941);var r=n(844);n(935);var o=function(e){var t=e.adjson,n=e.style,o=e.template,a=e.data,i=Object(r.e)(t,"ads[0]",{}),c=Object(r.e)(t,"ads",[]),s=Object(r.e)(i,"creatives[0]",{}),l=Object(r.e)(i,"creatives",[]),u=!!n&&n.toLocaleLowerCase().indexOf("download")>-1;return{ad:i,ads:c,creatives:l,creative:s,style:n,isDownload:u,template:o,oldAd:a.ad}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return v}));var r=n(863),o=n.n(r),a=n(80),i=n.n(a),c=n(7),s=n(844),l=n(941);function u(e){var t=e.oldData,n=e.adjson;if("{}"!==JSON.stringify(n))return l.g[Object(s.e)(n,"ads[0].style")];var r,o,a=Object(s.e)(t.ad,"creatives[0].appPromotionUrl");return"".concat((r=Object(s.e)(t,"ad.adVerb"),o={singlePu:"PROMOTE_SMALL_IMAGE_CARD_PU",single:"PROMOTE_SMALL_IMAGE_CARD",word:"PROMOTE_WORD",multiple:"PROMOTE_MULTI_IMAGES_CARD"},Object.keys(o).find((function(e){return o[e]===r})))).concat(a?"Download":"")}function d(e){var t=e.oldData,n=e.adjson;return"{}"!==JSON.stringify(n)?l.d[Object(s.e)(n,"ads[0].style")]:l.e[Object(s.e)(t,"ad.style")]}function f(e){var t,n,r=e.oldData,o=e.adjson;return"{}"!==JSON.stringify(o)?l.h[Object(s.e)(o,"ads[0].style")]:(t=Object(s.e)(r,"ad.adVerb"),n={small:"PROMOTE_SUBJECT_CARD_SMALL_IMAGE",multiple:"PROMOTE_SUBJECT_CARD_MULTI_IMAGE"},Object.keys(n).find((function(e){return n[e]===t})))}function p(e){var t=e.oldData,n=e.adjson;return"{}"!==JSON.stringify(n)?Object(s.e)(n,"ads[0].experimentInfo"):Object(s.e)(t,"ad.experimentInfo")}function h(e){var t=e.oldData,n=e.adjson;return"{}"!==JSON.stringify(n)?Object(s.e)(n,"ads[0].webExperiment"):Object(s.e)(t,"ad.webExperiment")}function b(e){var t=e.ad,n=e.related,r=(t.partyId,t.creatives),a=t.downloadSilent,c=void 0!==a&&a,l=t.isNewWebview,u=void 0!==l&&l,d=t.isSpeeding,f=t.cdnMap,p=t.displayAdvertisingTag,h=i()(t,["partyId","creatives","downloadSilent","isNewWebview","isSpeeding","cdnMap","displayAdvertisingTag"]),b=Object(s.e)(r[0],"canvas"),m={displayAdvertisingTag:p,downloadSilent:c,isNewWebview:u,isCdnSpeeding:d,cdnMap:f},v=r.map((function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.voteupCount,r=t.commentCount,a=t.followerCount,c=t.answerCount,l=e.landingUrl,u=e.appPromotionUrl,d=e.deepUrl,f=e.packageName,p=e.title,h=e.nativeUrl,b=void 0===h?"":h,m=e.window,v=e.imageRatioExtra,g=e.brand,y=void 0===g?{}:g,O=e.thumbnailExtraInfo,j=e.cta,w=(j=void 0===j?{}:j).value,C=void 0===w?"":w,k=e.description,x=e.protoInfo,S=e.image,E=e.gallery,R=void 0===E?[]:E,T=e.thirdSdkInfo,A=e.showNum,N=void 0===A?{}:A,_=e.recommend,I=i()(e,["landingUrl","appPromotionUrl","deepUrl","packageName","title","nativeUrl","window","imageRatioExtra","brand","thumbnailExtraInfo","cta","description","protoInfo","image","gallery","thirdSdkInfo","showNum","recommend"]),M=Object(s.e)(x,"contentType"),L=y.name,P=y.logo,B=Object(s.e)(R,"length")>=2?R.map((function(e){return e.url})):[S],z=R&&R.map((function(e){return{image:e.url,desc:e.description}})),D=o()({landingUrl:l,appPromotionUrl:u,deepUrl:d,packageName:f,title:p,nativeUrl:b,window:m,imageRatioExtra:v,desc:k,cta:C,imgs:B,brandName:L,brandLogo:P,recommend:_,gallery:R,galleries:z},I),F=o()({contentType:M,voteupNum:n,commentNum:r,followNum:a,answerNum:c},N),U={asset:D,protoInfo:F,videoInfo:O,thirdSdkInfo:T};return U}(e,n)}));return o()({},h,{canvas:b,creatives:v,expand:m})}function m(e){var t=e.type,n=e.oldData,r=e.adjson;switch(t){case"large":case"intext":return d({oldData:n,adjson:r});case"subject":return f({oldData:n,adjson:r});case"bonus":case"pccard":return function(e){var t=e.adjson;if("{}"!==JSON.stringify(t))return l.h[Object(s.e)(t,"ads[0].style")]}({adjson:r});case"mfeed":return function(e){var t=e.oldData,n=e.adjson;return"{}"!==JSON.stringify(n)?l.f[Object(s.e)(n,"ads[0].style")]:{PROMOTE_SMALL_IMAGE_CARD:"small",PROMOTE_MULTI_IMAGES_CARD:"multiple",PROMOTE_WORD:"word",PROMOTE_URL_CARD:"large",PROMOTE_CARD:"small"}[Object(s.e)(t,"ad.adVerb")]}({oldData:n,adjson:r});default:return u({oldData:n,adjson:r})}}function v(e,t){if(["large","intext","recommend"].includes(t)&&function(e){return!e||!(e.ad||e.adjson)}(e))return null;var n=Object(c.camelizeKeys)(e),r=Object(s.e)(e,"adjson"),a=Object(c.camelizeKeys)(Object(s.w)(r)),i=m({type:t,oldData:n,adjson:a}),l=p({oldData:n,adjson:a}),u=h({oldData:n,adjson:a});return{data:n,adjson:r?function(e,t){return{ads:e.ads.map((function(e){return o()({adjsonStr:t},e)}))}}(a,r):function(e,t){var n=e.related,r=void 0===n?{}:n,a=e.adList,i=e.ad;return{ads:(a||[{ad:i}]).map((function(e){var n=e.ad;return o()({adjsonStr:t},b({ad:n,related:r}))}))}}(n,r),style:i,experimentInfo:l,webExperiment:u}}},function(e,t,n){e.exports=n.p+"assets/creator_entrance.a883e0a5.png"},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M2 6a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V6zm13.96 2.2l-5.008 5.008-2.651-2.652-1.768 1.768 4.42 4.42 6.776-6.777L15.96 8.2z",fillRule:"evenodd"}))};i.defaultProps={name:"CheckboxOn"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M5 6v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1zM2 6a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V6z"}))};i.defaultProps={name:"CheckboxOff"},t.a=i},,function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(1343),p=n(12),h=n(6);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var m=function(e){Object(a.a)(n,e);var t=b(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isDrained,n=e.page,r=e.prePage,o=e.onLoad,a=e.isNextLoaded;t||o(Object(h.c)(n),r),a||o(Object(h.c)(n+1),r)}},{key:"componentWillReceiveProps",value:function(e){var t=e.isFetching,n=e.isDrained,r=e.isNextLoaded,o=e.page,a=e.prePage,i=e.onLoad,c=e.total;n||t||i(Object(h.c)(o),a),!r&&o<c&&o!==this.props.page&&i(Object(h.c)(o+1),a)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.total,r=e.page,o=e.onPaginationClick,a=e.isFetching,i=e.placeholder;return Object(s.c)("div",{children:[t,a&&i,n>1&&Object(s.b)(f.a,{current:r,total:n,clickCallback:o})]})}}]),n}(d.Component);m.propTypes={isFetching:u.a.bool.isRequired,isDrained:u.a.bool.isRequired,onLoad:u.a.func.isRequired,total:u.a.number,page:u.a.number,prePage:u.a.number,placeholder:u.a.node,onPaginationClick:u.a.func.isRequired,isNextLoaded:u.a.bool},m.defaultProps={prePage:p.b,page:1}},function(e,t,n){"use strict";var r=n(125);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(1360));e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){e.exports=n.p+"assets/liukanshan_loudspeaker.292ada3b.svg"},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return at}));var r=n(2),o=n(1),a=n.n(o),i=n(27),c=n(29),s=n(19),l=n(11),u=n.n(l),d=n(158),f=n(1134),p=n(14),h=n(15),b=n(66),m=n(16),v=n(17),g=n(9),y=n(43),O=n(35),j=n(3),w=n.n(j),C=n(208),k=n.n(C),x=n(30),S=n(842),E=n(365),R=n(144);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(g.a)(e);if(t){var o=Object(g.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}function A(){return n.e(46).then(n.bind(null,2651))}var N=function(e){Object(m.a)(n,e);var t=T(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"render",value:function(){return Object(r.b)(R.a,Object.assign({getComponent:A},this.props))}}]),n}(o.Component),_=n(36),I=n(102),M=n(131),L=Object.assign;var P=function(e){return a.a.createElement(M.a,L({width:"40",height:"40",viewBox:"0 0 40 40"},e),a.a.createElement("g",{fill:"#06F",fillRule:"evenodd"},a.a.createElement("circle",{cx:"20",cy:"20",r:"20",opacity:".12"}),a.a.createElement("path",{d:"M23.487 10.463c1.896 0 2.583.193 3.277.555a3.824 3.824 0 011.607 1.573c.371.678.569 1.35.569 3.206v8.472c0 1.855-.198 2.527-.569 3.205a3.824 3.824 0 01-1.607 1.573c-.694.363-1.381.556-3.277.556h-6.96c-1.895 0-2.583-.193-3.276-.556a3.824 3.824 0 01-1.608-1.573c-.37-.678-.568-1.35-.568-3.205v-8.472c0-1.855.197-2.528.568-3.206.37-.678.915-1.21 1.608-1.573.693-.362 1.38-.556 3.277-.556h6.959zm0 2.08h-6.96c-1.407 0-1.836.081-2.273.31a1.72 1.72 0 00-.735.72c-.234.427-.317.847-.317 2.224v8.472c0 1.377.083 1.796.317 2.224.172.316.412.551.735.72.437.229.866.31 2.274.31h6.959c1.407 0 1.836-.081 2.274-.31a1.72 1.72 0 00.735-.72c.234-.428.317-.847.317-2.224v-8.472c0-1.377-.083-1.797-.317-2.225a1.72 1.72 0 00-.735-.72c-.438-.228-.867-.309-2.274-.309zm-1.991 9.778v1.873h-5.955V22.32h5.955zm2.977-3.328v1.872h-8.932v-1.872h8.932zm0-3.33v1.873h-8.932v-1.872h8.932z",fillRule:"nonzero"})))},B=Object.assign;var z=function(e){return a.a.createElement(M.a,B({width:"40",height:"40",viewBox:"0 0 40 40"},e),a.a.createElement("g",{fill:"none",fillRule:"evenodd"},a.a.createElement("circle",{cx:"20",cy:"20",r:"20",fill:"#F4C807",opacity:".12"}),a.a.createElement("path",{d:"M6 6h28v28H6z"}),a.a.createElement("path",{fill:"#F4C807",d:"M20.406 11.772l-2.172 2.176h-2.29c-1.438 0-1.875.085-2.322.324-.33.176-.575.422-.751.752-.24.448-.324.886-.324 2.326v7.12c0 1.44.085 1.878.324 2.326.176.33.421.576.75.752.421.225.834.314 2.08.323l7.35.001c1.438 0 1.876-.084 2.323-.324.33-.176.575-.422.751-.752.24-.448.324-.886.324-2.326v-4.905l2.172-2.175v7.08c0 1.94-.202 2.643-.58 3.352a3.95 3.95 0 01-1.643 1.645c-.708.379-1.41.58-3.346.58h-7.108c-1.936 0-2.639-.201-3.347-.58a3.95 3.95 0 01-1.642-1.645c-.378-.71-.58-1.413-.58-3.352v-7.12c0-1.94.202-2.643.58-3.352a3.95 3.95 0 011.642-1.645c.708-.379 1.41-.58 3.347-.58h4.462zm6.908-2.053c.384.116.747.338 1.168.759l.188.189c.42.421.642.785.758 1.17a1.98 1.98 0 010 1.163c-.116.385-.337.749-.758 1.17l-6.9 6.911c-.62.622-.827.81-1.078 1.004-.251.193-.496.34-.784.47-.288.131-.553.226-1.392.48l-1.088.332a1.303 1.303 0 01-1.625-1.629l.33-1.09c.255-.84.35-1.104.48-1.393.13-.29.277-.534.47-.785.193-.252.381-.46 1.001-1.081l6.9-6.911c.42-.421.784-.643 1.168-.76a1.97 1.97 0 011.162 0zm-3.204 4.096l-4.797 4.805c-.547.548-.709.723-.852.91-.112.146-.19.276-.265.443-.097.214-.175.44-.4 1.182l-.094.31.31-.095c.74-.225.965-.303 1.179-.4.167-.076.297-.154.442-.266.187-.143.361-.305.909-.853l4.797-4.805-1.23-1.23zm2.546-2.43c-.109.033-.23.11-.443.324l-.874.875 1.228 1.231.875-.876c.213-.213.29-.334.323-.444a.24.24 0 000-.153c-.033-.11-.11-.23-.323-.445l-.189-.188c-.213-.214-.334-.291-.443-.325a.238.238 0 00-.154 0z",fillRule:"nonzero"})))},D=Object.assign;var F=function(e){return a.a.createElement(M.a,D({width:"40",height:"40",viewBox:"0 0 40 40"},e),a.a.createElement("g",{fill:"#26BFBF",fillRule:"evenodd"},a.a.createElement("circle",{cx:"20",cy:"20",r:"20",opacity:".12"}),a.a.createElement("path",{d:"M21.987 11.686v2.169h-6.125c-1.43 0-1.863.064-2.297.306-.332.128-.574.383-.74.702-.255.447-.332.893-.332 2.297v7.018c0 1.442.09 1.876.332 2.297.166.345.408.587.74.766.434.23.868.319 2.297.319h7.018c1.43 0 1.863-.077 2.297-.32.345-.165.587-.408.766-.74.216-.408.296-.816.305-2.054l.001-6.316.025.025h2.17v6.074c0 1.914-.217 2.616-.587 3.318a3.92 3.92 0 01-1.634 1.62c-.689.383-1.403.575-3.317.575h-7.018c-1.915 0-2.616-.204-3.318-.575a3.891 3.891 0 01-1.62-1.62c-.384-.702-.575-1.404-.575-3.318v-7.018c0-1.914.204-2.629.574-3.318a3.996 3.996 0 011.62-1.633c.703-.383 1.404-.574 3.318-.574h6.1zm1.889 6.954c1.059 1.06 1.059 2.807 0 3.88l-.039.038a2.719 2.719 0 01-3.879 0l-2.45-2.553a.801.801 0 00-1.123 0l-.05.052c-.32.357-.32.893 0 1.212a.75.75 0 00.726.217c.51-.128 1.047.23 1.149.74a.946.946 0 01-.727 1.148 2.649 2.649 0 01-2.527-.74 2.796 2.796 0 010-3.905l.038-.025c1.098-1.085 2.808-1.085 3.892 0l2.463 2.488a.764.764 0 001.11 0l.038-.025a.855.855 0 000-1.187.876.876 0 00-.74-.217c-.51.128-1.02-.204-1.148-.727-.128-.51.204-1.021.727-1.149l.013-.013a2.703 2.703 0 012.527.766zm4.338-9.315v2.578h2.578v1.722h-2.578v2.59h-1.723v-2.602h-2.59v-1.71h2.59V9.325h1.723z",fillRule:"nonzero"})))},U=Object.assign;var V=function(e){return a.a.createElement(M.a,U({width:"40",height:"40",viewBox:"0 0 40 40"},e),a.a.createElement("g",{fill:"#FF9607",fillRule:"evenodd"},a.a.createElement("circle",{cx:"20",cy:"20",r:"20",opacity:".12"}),a.a.createElement("path",{d:"M24.233 24.777v-9.555c0-.942-.748-1.706-1.67-1.706H13.61c-.922 0-1.67.764-1.67 1.707v9.554c0 .943.748 1.707 1.67 1.707h8.954c.921 0 1.669-.764 1.669-1.707zm3.478-10.349a2.302 2.302 0 013.297.243c.367.434.57.989.57 1.563v7.532c0 1.32-1.047 2.389-2.337 2.389a2.308 2.308 0 01-1.53-.583l-1.475-1.306v.512c0 2.073-1.644 3.753-3.672 3.753H13.61c-2.028 0-3.672-1.68-3.672-3.753v-9.555c0-2.074 1.644-3.754 3.672-3.754h8.954c2.028 0 3.672 1.68 3.672 3.754v.51l1.475-1.305zm-1.475 7.13l2.786 2.466a.33.33 0 00.219.083.338.338 0 00.334-.341v-7.532a.346.346 0 00-.082-.223.329.329 0 00-.47-.035l-2.787 2.466v3.116z",fillRule:"nonzero"})))},q=n(1418),H=n.n(q),K=n(1419),Q=n.n(K),W=n(1420),G=n.n(W),Y=n(1421),Z=n.n(Y);function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(g.a)(e);if(t){var o=Object(g.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var J={answer:[P,H.a,"#ffc601"],article:[z,Q.a,"#ff6084"],pin:[F,G.a,"#25c7c7"],video:[V,Z.a,'"ff9015']};function $(e){var t=e.preset,n=e.type,o=Object(O.a)(e,["preset","type"]);if("old"===t){var a=Object(y.a)(J[n],1)[0];return Object(r.b)(a,Object.assign({},o))}var i=Object(y.a)(J[n],3),c=i[1],s=i[2];return Object(r.b)("div",{className:"GlobalWrite-iconContainer",css:function(e){return{background:e.colorMod(s).alpha(.12),"&:hover":{background:e.colorMod(s).alpha(.22)}}},children:Object(r.b)("img",{className:"GlobalWrite-icon",src:c,alt:""})})}var ee={answer:{id:2744,action:"OpenUrl",elementName:"Answer"},article:{id:2752,action:"OpenUrl",elementName:"Post"},pin:{id:2753,action:"Click",elementName:"Pin"},draft:{id:2750,action:"OpenUrl"}},te=function(e){Object(m.a)(n,e);var t=X(n);function n(){var e;Object(p.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={loadWritePin:!1,showWritePin:!1},e.openWritePin=e.context.authRequired((function(){return e.context.realNameRequired((function(){e.createClickButtonHandler("pin")(),e.setState({loadWritePin:!0,showWritePin:!0})}))()})),e.closeWritePin=function(){e.setState({showWritePin:!1})},e.openUploadVideo=e.context.authRequired((function(){return e.context.realNameRequired((function(){window.open("/zvideo/upload-video")}))()})),e.createClickButtonHandler=function(t){return e.context.realNameRequired((function(){var n=ee[t],r=n.action,o=n.elementName,a=n.id;x.a.trackEvent(Object(b.a)(e),k()({id:a,action:r,element_name:o},Boolean),"draft"===t?{link:{url:"https://www.zhihu.com".concat(e.props.creatorQuestionRightPass?"/creator/manage/creation/draft":"/draft")}}:null),"answer"===t?window.open(e.props.currentUser.isOrg?"/organization/question/recommend#recommend":e.props.creatorQuestionRightPass?"/creator/featured-question/invited":"/question/waiting"):"article"===t&&(window.open("//zhuanlan.zhihu.com/write"),x.a.trackEvent(Object(b.a)(e),{id:8038,action:"OpenUrl"},{link:{url:"https://zhuanlan.zhihu.com/write"}}))}))},e}return Object(h.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.currentUser,n=e.fillCurrentUserIfNeeded,r=e.laterQuestionsCount,o=e.getLaterQuestionsCount,a=e.imperativeRef,i=e.withComponent;n([i&&"draftCount","organization"===t.userType&&"isOrgCreatepinWhiteUser"].filter(Boolean)),i&&null===r&&o(),a&&(a.current={createClickHandler:this.createClickButtonHandler,openUploadVideo:this.openUploadVideo,openWritePin:this.openWritePin})}},{key:"render",value:function(){var e=this,t=this.props,n=t.currentUser,o=t.laterQuestionsCount,a=t.withComponent,i=t.preset,c=this.state,s=c.loadWritePin,l=c.showWritePin,d=(n||{}).draftCount,f=n&&(!n.isOrg||n.isOrg&&n.isOrgCreatepinWhiteUser);if(!a)return Object(r.b)(r.a,{children:s&&Object(r.b)(N,{show:l,onClose:this.closeWritePin})});var p=S.d;return"new"===i&&(p="div"),Object(r.c)(p,{className:u()("GlobalWrite","GlobalWrite--".concat(i)),children:[Object(r.c)("div",{className:"GlobalWrite-navTop",children:[Object(r.c)("a",{className:"GlobalWrite-topItem",target:"_blank",rel:"noopener noreferrer",title:"回答",onClick:this.createClickButtonHandler("answer"),children:[Object(r.b)($,{preset:i,type:"answer",className:"GlobalWrite-navIcon"}),Object(r.b)("div",{className:"GlobalWrite-topTitle",children:"回答问题"}),n.isOrg&&Object(r.b)("div",{className:"GlobalWrite-exposeMore",children:"曝光更多"})]}),Object(r.c)("div",{className:"GlobalWrite-topItem",onClick:function(t){x.a.trackEvent(t.target,{id:8619,action:"Add"}),e.openUploadVideo()},children:[Object(r.b)($,{preset:i,type:"video",className:"GlobalWrite-navIcon"}),Object(r.b)("div",{className:"GlobalWrite-topTitle",children:"发视频"})]}),Object(r.c)("a",{className:"GlobalWrite-topItem",target:"_blank",rel:"noopener noreferrer",title:"写文章",onClick:this.createClickButtonHandler("article"),children:[Object(r.b)($,{preset:i,type:"article",className:"GlobalWrite-navIcon"}),Object(r.b)("div",{className:"GlobalWrite-topTitle",children:"写文章"})]}),f&&Object(r.c)("div",{className:"GlobalWrite-topItem",onClick:this.openWritePin,children:[Object(r.b)($,{preset:i,type:"pin",className:"GlobalWrite-navIcon"}),Object(r.b)("div",{className:"GlobalWrite-topTitle",children:"写想法"})]})]}),Object(r.c)("div",{className:"GlobalWrite-navBottom",children:[Object(r.b)("a",{className:"GlobalWrite-answerLater",href:"/question/later",target:"_blank",title:"稍后答","data-za-detail-view-id":5370,children:Object(r.c)("div",{className:"GlobalWrite-navWrapper",children:[Object(r.b)("div",{className:"GlobalWrite-navTitle",children:"稍后答"}),Boolean(o)&&Object(r.b)("div",{className:"GlobalWrite-navNumber",children:Object(E.formatNumber)(o)})]})}),Object(r.b)("a",{className:"GlobalWrite-navDraft",href:this.props.creatorQuestionRightPass?"/creator/manage/creation/draft":"/draft",target:"_blank",rel:"noopener noreferrer",title:"草稿",onClick:this.createClickButtonHandler("draft"),"data-za-not-track-link":!0,children:Object(r.c)("div",{className:"GlobalWrite-navWrapper",children:[Object(r.b)("div",{className:"GlobalWrite-navTitle",children:"草稿箱"}),Boolean(d)&&Object(r.b)("div",{className:"GlobalWrite-navNumber",children:Object(E.formatNumber)(d)})]})})]}),s&&Object(r.b)(N,{show:l,onClose:this.closeWritePin})]})}}]),n}(o.Component);te.defaultProps={preset:"old",withComponent:!0},te.contextTypes={authRequired:w.a.func,realNameRequired:w.a.func};var ne=Object(i.connect)((function(e){var t;return{currentUser:Object(_.b)(e),laterQuestionsCount:null===(t=e.question)||void 0===t?void 0:t.laterQuestions.count}}),{fillCurrentUserIfNeeded:_.e,getLaterQuestionsCount:I.t})(te),re=n(101),oe=n(364),ae=n(18),ie=function(e){return a.a.createElement(ae.a,e,a.a.createElement("path",{d:"M5.74 4h12.52c.961 0 1.74.775 1.74 1.73V16.27c0 .955-.779 1.73-1.74 1.73h-3.825l-1.658 2.044a1 1 0 0 1-1.554 0l-1.658-2.044H5.74C4.78 18 4 17.224 4 16.27V5.73C4 4.775 4.778 4 5.74 4zM12 16a.976.976 0 0 0 .705-.287.951.951 0 0 0 .295-.712.954.954 0 0 0-.295-.714A.976.976 0 0 0 12 14a.962.962 0 0 0-.705.295A.961.961 0 0 0 11 15c0 .284.098.522.295.713A.975.975 0 0 0 12 16zm1.278-4.924a36.81 36.81 0 0 0 1.023-.975c.19-.193.354-.422.492-.688.138-.266.207-.575.207-.928 0-.448-.12-.864-.363-1.246a2.517 2.517 0 0 0-1.029-.906C13.164 6.111 12.652 6 12.072 6c-.624 0-1.17.133-1.638.399-.468.265-.824.6-1.068 1.005-.244.405-.366.804-.366 1.2 0 .19.077.368.231.531a.747.747 0 0 0 .567.246c.38 0 .638-.234.774-.703.144-.449.32-.788.528-1.019.208-.23.532-.345.972-.345.376 0 .683.114.921.342.238.229.357.51.357.841 0 .17-.039.328-.117.473a1.782 1.782 0 0 1-.288.396c-.114.118-.3.294-.555.526a9.71 9.71 0 0 0-.696.688c-.172.194-.31.418-.414.673a2.391 2.391 0 0 0-.156.906c0 .278.071.488.213.63a.716.716 0 0 0 .525.211c.4 0 .638-.216.714-.648.044-.203.077-.345.099-.426.022-.081.053-.162.093-.243.04-.081.101-.17.183-.268.082-.098.191-.21.327-.34z",fillRule:"evenodd"}))};ie.defaultProps={name:"HelpBubble"};var ce=ie,se=n(1679),le=function(e){return a.a.createElement(ae.a,e,a.a.createElement("path",{d:"M19 19.5H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10.5a2 2 0 0 1-2 2zm0-12a.5.5 0 0 0-.5-.5h-13a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5h3.75c1 0 1 2 2.75 2s1.75-2 2.75-2h3.75a.5.5 0 0 0 .5-.5v-2z",fillRule:"evenodd"}))};le.defaultProps={name:"Balance"};var ue=le,de=function(e){return a.a.createElement(ae.a,e,a.a.createElement("path",{d:"M21.515 10.131c-1.1.567-1.471.996-1.471 1.869s.388 1.348 1.471 1.869c.356.26.485.429.485.934v2.803c0 .766-.647 1.394-1.471 1.394H3.47C2.663 19 2 18.387 2 17.606v-2.803c0-.26.08-.674.517-.934.615-.2 1.456-.613 1.456-1.869 0-.965-.793-1.578-1.472-1.869-.452-.23-.485-.52-.485-.934V6.394C2.016 5.628 2.663 5 3.487 5H20.53C21.337 5 22 5.613 22 6.394v2.803c0 .398 0 .628-.485.934zM10.5 12c0 .834.672 1.5 1.5 1.5.834 0 1.5-.672 1.5-1.5 0-.834-.672-1.5-1.5-1.5-.834 0-1.5.672-1.5 1.5zm5 0c0 .834.672 1.5 1.5 1.5.834 0 1.5-.672 1.5-1.5 0-.834-.672-1.5-1.5-1.5-.834 0-1.5.672-1.5 1.5zm-10 0c0 .834.672 1.5 1.5 1.5.834 0 1.5-.672 1.5-1.5 0-.834-.672-1.5-1.5-1.5-.834 0-1.5.672-1.5 1.5z"}))};de.defaultProps={name:"Coupon"};var fe=de,pe=n(1740),he=n(791),be=n(1741),me=n(1742),ve=n(1532),ge=n(1182),ye=n(1743),Oe=n(1744),je=Object.assign;var we=function(e){return a.a.createElement(M.a,je({width:"18",height:"18",viewBox:"0 0 18 18"},e),a.a.createElement("path",{d:"M9 1.5c2.835 0 5.152 2.195 5.247 4.949l.003.176v.253A2.25 2.25 0 0115.75 9v2.25a2.25 2.25 0 01-1.5 2.122v.257c0 .547-.2 1.073-.557 1.482l-.102.109-1.06 1.06a.75.75 0 01-1.124-.99l.063-.07 1.06-1.061a.75.75 0 00.213-.432l.007-.098V13.5H12a.75.75 0 01-.75-.75V7.5a.75.75 0 01.75-.75h.75v-.125C12.75 4.628 11.076 3 9 3 6.98 3 5.34 4.541 5.254 6.464l-.004.286H6a.75.75 0 01.743.648l.007.102v5.25a.75.75 0 01-.648.743L6 13.5H4.5a2.25 2.25 0 01-2.245-2.096l-.005-.154V9c0-.98.626-1.814 1.5-2.122v-.253C3.75 3.79 6.105 1.5 9 1.5z",fillRule:"evenodd"}))},Ce=[{key:"star",number:void 0,label:"我的收藏",url:"/collections/mine",icon:oe.a,visible:!0},{key:"questionList",number:void 0,label:"我关注的问题",icon:ce,visible:!0},{key:"invite",number:void 0,label:"我的邀请",url:"/question/invited",icon:se.a,visible:!0},{key:"balance",number:void 0,label:"我的余额",url:"/balance",icon:ue,visible:!1},{key:"coupon",number:void 0,label:"我的礼券",url:"/coupon",icon:fe,visible:!1},{key:"service",number:void 0,label:"站务中心",url:"/community",icon:pe.a,visible:!0},{key:"help-center",number:void 0,label:"帮助中心",url:"/help-center",icon:we,visible:!0},{key:"copyright",number:void 0,label:"版权服务中心",url:"/copyright",icon:he.a,visible:!0}],ke=[{key:"live",number:void 0,label:"Live",url:"/lives",icon:be.a,color:"#ffcf00",visible:!0},{key:"pub",number:void 0,label:"书店",url:"/pub/",icon:me.a,color:"#43d480",visible:!0},{key:"org",number:void 0,label:"圆桌",url:"/roundtable",icon:ve.a,color:"#0066FF",visible:!0},{key:"edit",number:void 0,label:"专栏",url:"//zhuanlan.zhihu.com",icon:ge.a,color:"#0f88eb",visible:!0},{key:"infinity",number:void 0,label:"付费咨询",url:"/consult",icon:ye.a,color:"#5478f0",visible:!0},{key:"wiki",number:void 0,label:"百科",url:"/wiki",icon:Oe.a,color:"#5868D1",visible:!0}];function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(g.a)(e);if(t){var o=Object(g.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var Se=function(e){Object(m.a)(n,e);var t=xe(n);function n(){var e;Object(p.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleLog=function(e,t,n){var r=ke.find((function(e){return e.url===n})).label;x.a.trackEvent(e.target,{action:"OpenUrl",element:"Link",name:t,id:2745},{button:{text:r},link:{url:n}})},e}return Object(h.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.categoryData,o=t.children,a=n.filter((function(e){return e.visible})).map((function(t){var n=t.key,o=t.label,a=t.url,i=t.color,c=t.icon;return Object(r.b)("li",{className:"GlobalSideBar-categoryItem",children:Object(r.c)(re.a,{preset:"plain",href:a,target:"_blank",title:o,onClick:function(t){return e.handleLog(t,n,a)},style:{color:i},"data-za-not-track-link":!0,children:[Object(r.b)("span",{className:"GlobalSideBar-categoryIcon",children:Object(r.b)(c,{})}),Object(r.b)("span",{className:"GlobalSideBar-categoryLabel",children:o})]})},n)}));return Object(r.c)(S.d,{className:"GlobalSideBar-category",children:[o,Object(r.b)("ul",{className:"GlobalSideBar-categoryList",children:a})]})}}]),n}(o.Component);function Ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(g.a)(e);if(t){var o=Object(g.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var Re=function(e){Object(m.a)(n,e);var t=Ee(n);function n(){var e;Object(p.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).createClickButtonHandler=function(e){return function(t){x.a.trackEvent(t.target,{action:"OpenUrl",id:2746},{button:{text:e}})}},e}return Object(h.a)(n,[{key:"componentDidUpdate",value:function(e){var t=function(e){return e.navData.filter((function(e){return e.visible})).length};this.props.onHeightChange&&t(e)!==t(this.props)&&this.props.onHeightChange()}},{key:"render",value:function(){var e=this,t=this.props.navData.filter((function(e){return e.visible})).map((function(t){var n=t.key,o=t.label,a=t.icon,i=t.url,c=t.number;return Object(r.b)("li",{className:u()("GlobalSideBar-navItem","GlobalSideBar-".concat(n,"Item")),children:Object(r.c)(re.a,{preset:"plain",to:i,target:"_blank",className:"GlobalSideBar-navLink",activeClassName:"GlobalSideBar-navLink--active",onClick:e.createClickButtonHandler(o),"data-za-not-track-link":!0,children:[Object(r.b)(a,{className:"GlobalSideBar-navIcon",size:18}),Object(r.b)("span",{className:"GlobalSideBar-navText",children:o}),"number"==typeof c&&Object(r.b)("span",{className:"GlobalSideBar-navNumber",children:Object(E.formatNumber)(c)})]})},n)}));return Object(r.b)(S.d,{children:Object(r.b)("ul",{className:"GlobalSideBar-navList",children:t})})}}]),n}(o.Component);var Te=function(e){var t=e.items.filter((function(e){return e.visible}));return t.length?Object(r.b)("div",{className:"GlobalBalance",children:t.map((function(e){return Object(r.b)("a",{className:"GlobalBalance-item",href:e.url,target:"_blank",rel:"noopener noreferrer",children:e.label},e.key)}))}):null},Ae=n(1370);var Ne=function(e){var t=e.position,n=e.delay,o=e.onLoadBanner,a=e.onHideImage,i=e.onHeightChange;return Object(r.b)(Ae.a,{location:t,delay:n,onLoadBanner:o,onHideImage:a,onHeightChange:i,isMobile:!1})},_e=n(980);var Ie=function(e){var t=e.defaultItems,n=e.onHeightChange,a=Object(o.useState)(t.map((function(e){return Object.assign({},e,{status:"loading"})}))),i=Object(y.a)(a,2),c=i[0],s=i[1],l=Object(o.useCallback)((function(e,t){s(c.map((function(n){return e(n)?t(n):n})))}),[c]);return Object(r.b)(_e.a,{className:"GlobalSideBar-carouselAD",items:c.filter((function(e){return"hidden"!==e.status})),loopStyle:"startover",resetOffsetWhenItemsLengthChange:!0,renderItem:function(e){var t=e.position,o=e.delay;return Object(r.b)(Ne,{position:t,delay:o,onLoadBanner:function(e){l((function(e){return e.position===t}),(function(t){return Object.assign({},t,{status:e?"loaded":"hidden"})}))},onHideImage:function(){l((function(e){return e.position===t}),(function(e){return Object.assign({},e,{status:"hidden"})}))},onHeightChange:n},t)},interval:5e3,css:{".Carousel-bullets":{bottom:17}},onBulletClick:function(e,t){x.a.trackEvent(null,{id:9512,name:String(t+1)})}})};function Me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(g.a)(e);if(t){var o=Object(g.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var Le=function(){return n.e(29).then(n.bind(null,2652))},Pe=function(e){Object(m.a)(n,e);var t=Me(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"render",value:function(){return Object(r.b)(R.a,Object.assign({getComponent:Le},this.props))}}]),n}(o.Component),Be=n(950),ze={url:"https://www.zhihu.com/knowledge-plan/education?utm_source=global_event_banner",imageUrl:"https://pic4.zhimg.com/80/v2-f37157090d166b6f23fa4e401e76c553_r.png",startTime:1584892800,endTime:1585151999,officePreview:!1,zaCardShowId:8227,zaClickId:8228};var De=function(){var e=Object(o.useRef)(),t=function(){var e=ze,t=e.startTime,n=e.endTime,r=e.officePreview,o=Object(Be.a)()&&r||Date.now()>=1e3*t&&Date.now()<=1e3*n;return Object.assign({},e,{enable:o})}(),n=t.url,a=t.imageUrl,i=t.zaCardShowId,c=t.zaClickId,s=t.enable;return Object(o.useEffect)((function(){i&&s&&x.a.trackCardShow(null,{id:i})}),[i,s]),s?Object(r.b)(S.d,{css:{display:"flex",flexDirection:"column"},children:Object(r.b)("a",{href:n,target:"_blank",rel:"noopener noreferrer",ref:e,"data-za-detail-view-id":c,css:{fontSize:0},children:Object(r.b)("img",{src:a,width:"100%",alt:""})})}):null},Fe=n(234),Ue=n(401);function Ve(e){var t=e.split(" ")[0].split("-"),n=Object(y.a)(t,3),r=n[0],o=n[1],a=n[2],i=e.split(" ")[1].split(":"),c=Object(y.a)(i,2),s=c[0],l=c[1];return new Date(r,o-1,a,s,l)}var qe=Object(Fe.a)(null)((function(){var e=Object(o.useRef)(),t=Object(i.useDispatch)(),n=function(){var e=Object(i.useSelector)((function(e){var t,n;return null===(t=e.topstory)||void 0===t||null===(n=t.banner)||void 0===n?void 0:n.right})),t=Object(Be.a)();if(!e)return null;var n=Ve(e.startTime),r=Ve(e.endTime),o=Date.now(),a=o>n.getTime()&&o<r.getTime(),c=t&&"1"===e.officePreview;return a||c?e:null}();if(Object(o.useEffect)((function(){t(Object(Ue.g)("right"))}),[t]),Object(o.useEffect)((function(){x.a.trackCardShow(null,{id:8227})}),[n]),!n)return null;var a=n.url,c=n.imageUrl;return Object(r.b)("a",{href:a,target:"_blank",rel:"noopener noreferrer",ref:e,"data-za-detail-view-id":8228,css:{fontSize:0,margin:"10px 10px -4px"},children:Object(r.b)("img",{src:c,width:"100%",height:"100%",alt:""})})})),He=n(1137),Ke=n(835),Qe=Object.assign;var We=function(e){return a.a.createElement(M.a,Qe({width:"24",height:"24",viewBox:"0 0 24 24"},e),a.a.createElement("path",{d:"M12 2c5.523 0 10 4.477 10 10 0 1.49-.326 2.902-.91 4.172v4.464a.455.455 0 01-.454.455h-4.464A9.963 9.963 0 0112 22C6.477 22 2 17.523 2 12S6.477 2 12 2zm0 1.818a8.182 8.182 0 103.753 15.454h3.52v-3.52A8.182 8.182 0 0012 3.819zm0 4.546a3.636 3.636 0 110 7.272 3.636 3.636 0 010-7.272z",fillRule:"evenodd"}))},Ge=n(395),Ye=function(){var e=Object(i.useDispatch)(),t=Object(o.useState)(1),n=Object(y.a)(t,2),a=n[0],c=n[1],s=Object(i.useSelector)((function(e){return e.club.explore.joinedClubs}))||{},l=s.data,u=void 0===l?[]:l,d=s.paging,f=(d=void 0===d?{}:d).totals,p=void 0===f?0:f,h=Math.ceil(p/4);Object(o.useEffect)((function(){e(Object(Ge.c)(!0,8))}),[e]),Object(o.useEffect)((function(){4*a!==u.length&&a!==h||e(Object(Ge.c)())}),[u.length,e,a,h]);var b=Object(o.useCallback)((function(e){window.open("/club/".concat(e))}),[]),m=Object(o.useCallback)((function(e){c("left"===e?1===a?1:a-1:a===h?h:a+1)}),[c,h,a]);if(0===u.length)return null;var v=u.slice(4*(a-1),4*a);return Object(r.c)("div",{className:"ClubSliderList",children:[Object(r.c)("div",{className:"ClubSliderList-header",children:[Object(r.b)(We,{className:"ClubSliderList-icon",size:17}),Object(r.b)("span",{children:"我的圈子"})]}),Object(r.b)("div",{className:"ClubSliderList-list",children:v.map((function(e){return Object(r.c)("div",{onClick:function(){return b(e.id)},className:"ClubSliderList-item",children:[Object(r.b)("div",{className:"ClubSliderList-img",children:Object(r.b)("img",{src:e.avatar})}),Object(r.b)("span",{className:"ClubSliderList-name",children:e.name})]},e.id)}))}),p>0&&Object(r.c)("div",{className:"ClubSliderList-pagination",children:[Object(r.b)("button",{className:"ClubSliderList-arrow",onClick:function(){return m("left")},children:Object(r.b)(He.a,{center:!0,text:!0})}),Object(r.b)("span",{children:"".concat(a,"/").concat(h)}),Object(r.b)("button",{className:"ClubSliderList-arrow",onClick:function(){return m("right")},children:Object(r.b)(Ke.a,{center:!0,text:!0})})]})]})},Ze=n(1371),Xe=n(1093),Je=n(1272),$e=n(1368),et=n(366),tt=n(24),nt=function(e,t){return e.map((function(e){var n=t.find((function(t){return t.key===e.key}));return n?Object.assign({},e,n):e}))},rt=function(e){return e.topstory&&e.topstory.sidebar},ot=Object(c.createSelector)(rt,_.h,(function(e,t){return nt(ke,[e&&{key:"pub",number:e.latestAddedBookCount},e&&{key:"org",number:e.latestRoundtableCount},{key:"infinity",visible:!t}].filter(Boolean))})),at=Object(s.compose)(Object(Fe.a)(null),Object(et.b)({module:"RightSideBar"}))(Object(o.memo)(it));function it(e){var t=e.preset,n=void 0===t?"old":t,a=e.omit,c=(a=void 0===a?{}:a).noNav,s=a.noWrite,l=a.noClub,p=a.noCreator,h=a.noBanner,b=a.noCategory,m=a.noAd,v=a.noCarouselAd,g=void 0===v||v,y=a.noBalance,O=void 0===y||y,j=a.noFooter,w=a.noAppBanner,C=Object(i.useDispatch)(),k=Object(i.useSelector)(rt),x=Object(i.useSelector)(_.b),S=Object(i.useSelector)(ot),E=Object(Je.b)(Je.a.Question),R=function(e,t,n){return nt(Ce,[e&&{key:"star",number:e.unreadItemCountOfFollowedFavlist},t&&{key:"questionList",url:"/people/".concat(t.urlToken||t.id,"/following/questions"),number:t.followingQuestionCount},{key:"invite",url:n?"/creator/featured-question/invited":"/question/waiting?type=invite"},e&&{key:"balance",visible:!0},e&&{key:"coupon",visible:e.needShowGiftCertificate}].filter(Boolean))}(k,x,E),T=Object(i.useSelector)(_.h),A=Object(o.useRef)(null),N=!T&&!c;Object(o.useEffect)((function(){!k&&x&&C(Object(Ue.f)()),N&&C(Object(_.e)(["followingQuestionCount"]))}),[]);var I=Object(o.useCallback)((function(){var e,t;null===(e=A.current)||void 0===e||null===(t=e.check)||void 0===t||t.call(e)}),[]),M=Xe.a;return"new"===n&&(M="div"),Object(r.c)(M,{className:u()("GlobalSideBar","GlobalSideBar--".concat(n)),offset:tt.i+10,ref:A,children:[!s&&Object(r.b)(ne,{preset:n,creatorQuestionRightPass:E}),!l&&x&&Object(r.b)(Ye,{}),!p&&Object(r.b)($e.a,{className:"GlobalSideBar-creator",iconStyle:"small",onHeightChange:I,showWallEProtectLink:"new"!==n}),T&&Object(r.b)(Pe,{}),!h&&Object(r.b)(De,{}),!b&&Object(r.b)(Se,{categoryData:S,children:Object(r.b)(qe,{})}),!O&&Object(r.b)(Te,{items:R.filter((function(e){return["balance","coupon"].includes(e.key)}))}),!g&&Object(r.b)(Ie,{defaultItems:[{position:"new_home_up",key:"new_home_up",delay:0},{position:"new_home_bottom",key:"new_home_bottom",delay:1e3}],onHeightChange:I}),!m&&Object(r.b)(Ne,{position:"new_home_up",onHeightChange:I}),N&&Object(r.b)(Re,{navData:R,onHeightChange:I}),!T&&!m&&Object(r.b)(Ne,{position:"new_home_bottom",delay:1e3,onHeightChange:I}),!w&&Object(r.b)(Ze.a,{type:"home"}),!j&&Object(r.b)(d.a,{children:Object(r.b)(f.a,{showHelpCenter:!N})})]})}},,function(e,t,n){"use strict";var r=n(43),o=n(2),a=n(1),i=n.n(a),c=n(27),s=n(90),l=n(11),u=n.n(l),d=n(1022),f=n(136),p=n(36),h=n(1272),b=n(131),m=Object.assign;var v=function(e){return i.a.createElement(b.a,m({width:"16",height:"16",viewBox:"0 0 16 16"},e),i.a.createElement("path",{d:"M8 3l.737.339.428.187.377.158.326.127c.15.055.282.1.395.133.55.161 1.297.157 2.237-.014l-.002 3.784c0 3.07-2.52 4.76-4.498 5.286-1.977-.527-4.498-2.216-4.498-5.286L3.5 3.93c.94.17 1.686.175 2.237.014C6.187 3.812 6.941 3.497 8 3zm2.38 3.066L7.599 8.834 6.32 7.566a.4.4 0 00-.554.554l1.55 1.55a.5.5 0 00.568 0l3.05-3.05a.4.4 0 00-.554-.554z"}))},g=n(14),y=n(15),O=n(16),j=n(17),w=n(9),C=n(842),k=n(796),x=n(835),S=n(30),E=n(1354),R=n.n(E);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(w.a)(e);if(t){var o=Object(w.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(j.a)(this,n)}}var A=function(e){Object(O.a)(n,e);var t=T(n);function n(){return Object(g.a)(this,n),t.apply(this,arguments)}return Object(y.a)(n,[{key:"componentDidMount",value:function(){S.a.trackCardShow(this,{id:4783})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.linkClassName,r=e.hintClassName,i=e.children,c=e.title,s=e.entranceMessage,l=e.showRedDot,d=e.zaClickId,f="small"===e.iconStyle;return Object(o.b)(C.d,{className:u()("CreatorEntrance",t),children:Object(o.c)("a",{className:u()("CreatorEntrance-link",n,{"CreatorEntrance-Link--smallIcon":f}),href:"/creator",target:"_blank","data-za-detail-view-id":d,children:[Object(o.c)("div",{className:u()("CreatorEntrance-hint",r,{"CreatorEntrancePage-hint--smallIcon":f}),children:[f?Object(o.c)(a.Fragment,{children:[Object(o.b)(k.a,{className:"CreatorEntrance-creatorIcon"}),Object(o.b)("div",{className:"CreatorEntrance-text",children:Object(o.b)("div",{className:"CreatorEntrance-indexPageTitle",children:c})})]}):Object(o.c)(a.Fragment,{children:[Object(o.b)("img",{className:"CreatorEntrance-image",src:R.a,alt:"zhihu creator icon"}),Object(o.c)("div",{className:"CreatorEntrance-text",children:[Object(o.b)("div",{className:"CreatorEntrance-title",children:c}),Object(o.b)("div",{className:"CreatorEntrance-entranceMessage",children:s})]})]}),l&&Object(o.b)("div",{className:"CreatorEntrance-seen"}),Object(o.b)(x.a,{className:u()("CreatorEntrance-arrow",{"CreatorEntrance-arrow--smallIcon":f})})]}),i]})})}}]),n}(a.Component);A.defaultProps={iconStyle:"large"};var N=A,_=n(1333);function I(e){var t=e.onHeightChange,n=Object(h.b)(h.a.Analytics),r=Object(c.useSelector)((function(e){return e.creator.creatorStatistics}));Object(a.useEffect)((function(){n&&t&&t()}),[t,n]);var i=Object(c.useDispatch)();Object(a.useEffect)((function(){i(Object(f.eb)())}),[i]);var s=r||{},l=s.yesterdayReadCount,p=s.theDayBeforeYesterdayReadCount,b=s.yesterdayUpvotedCount,m=s.theDayBeforeYesterdayUpvotedCount;return Object(o.c)("div",{className:"ProfileSideCreator-analytics",children:[Object(o.c)("div",{className:"ProfileSideCreator-readCountItem",children:[Object(o.b)("div",{className:"ProfileSideCreator-readCountTitle",children:"昨日阅读(播放)数"}),Object(o.b)("div",{className:u()("ProfileSideCreator-readCountNumber",{"ProfileSideCreator-readCountNumber__isNull":null===l}),children:null===l?"计算中":Object(d.a)(l)}),Object(o.b)(_.b,{textClassName:"ProfileSideCreator-countDeltaText",deltaFixed:!0,originCount:l,compareCount:p,text:"较前日"})]}),Object(o.c)("div",{className:"ProfileSideCreator-readCountItem",children:[Object(o.b)("div",{className:"ProfileSideCreator-readCountTitle",children:"昨日赞同数"}),Object(o.b)("div",{className:u()("ProfileSideCreator-readCountNumber",{"ProfileSideCreator-readCountNumber__isNull":null===b}),children:null===b?"计算中":Object(d.a)(b)}),Object(o.b)(_.b,{textClassName:"ProfileSideCreator-countDeltaText",deltaFixed:!0,originCount:b,compareCount:m,text:"较前日"})]})]})}function M(e){return Object(o.c)(s.Link,Object.assign({href:"/creator/explore/wall-e",target:"_blank",display:"flex",alignItems:"center",fontSize:"12px",color:"GBL05A"},e,{children:["瓦力保镖为你的创作提供持续保护",Object(o.b)(v,{size:17,center:!0,css:{marginLeft:2}})]}))}t.a=function(e){var t=e.className,n=e.iconStyle,i=void 0===n?"large":n,l=e.showWallEProtectLink,u=void 0===l||l,d=e.onHeightChange,h=Object(a.useState)(!1),b=Object(r.a)(h,2),m=b[0],v=b[1],g=Object(c.useDispatch)(),y=Object(c.useSelector)(p.h),O=Object(c.useSelector)(f.ac),j=Object(c.useSelector)((function(e){return e.creator.applyStatus}));if(Object(a.useEffect)((function(){y||g(Object(f.bb)()).catch((function(){return null})).then((function(){v(!0)}))}),[g,y]),!m||0===j.creatorStatus||y)return null;var w=O?{zaClickId:6848,title:Object(o.c)(s.Flex,{css:{justifyContent:"space-between"},children:["创作中心",Object(o.b)(s.Text,{as:"span",sx:{color:"GBL01A"},children:"去开通"})]})}:{zaClickId:2288,title:Object(o.c)(s.Box,{children:["创作中心",j.level&&Object(o.c)(s.Text,{as:"span",sx:{color:"GBL01A",marginLeft:"8px"},children:["Lv ",j.level]})]}),entranceMessage:j.entranceMsg||"查看详细",children:Object(o.c)(o.a,{children:[Object(o.b)(I,{onHeightChange:d}),u&&"small"===i&&Object(o.b)(s.Box,{width:"100%",px:"8px",py:"10px",sx:{borderTop:"1px solid",borderColor:"GBK10A"},children:Object(o.b)(M,{})}),u&&"small"!==i&&Object(o.b)(s.Box,{width:"100%",px:"20px",children:Object(o.b)(M,{py:"12px",sx:{borderTop:"1px solid",borderColor:"GBK10A"}})})]})},C=w.title,k=w.entranceMessage,x=w.children,S=w.zaClickId;return Object(o.b)(N,{className:t,hintClassName:"ProfileSideCreator-creatorEntranceHint",title:C,entranceMessage:k,showRedDot:j.notification&&j.notification.accessed>0,zaClickId:S,iconStyle:i,children:x})}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return H}));var r=n(33),o=n.n(r),a=n(20),i=n.n(a),c=n(21),s=n.n(c),l=n(23),u=n.n(l),d=n(13),f=n.n(d),p=n(92),h=n.n(p),b=n(22),m=n.n(b),v=n(1),g=n.n(v),y=n(3),O=n.n(y),j=n(7),w=n(1352),C=n(1353),k=n(1384),x=n(844),S=n(30),E=n(44),R=n.n(E),T=n(949),A=n(1407),N="https://www.zhihu.com",_={qihoo_pc_js:"".concat(N,"/inner_bottom_360.html"),baidu_pc_js:"u6559262",default:"".concat(N,"/inner_bottom.html")},I={qihoo_pc_js:"".concat(N,"/inner_top_360.html"),baidu_pc_js:"u6559261",default:"".concat(N,"/inner_top.html")},M={qihoo_pc_js:"".concat(N,"/inner_top_360.html"),baidu_pc_js:"u6559261",default:"".concat(N,"/inner_top.html")},L={qihoo_pc_js:"".concat(N,"/inner_bottom_360.html"),baidu_pc_js:"u6559262",default:"".concat(N,"/inner_bottom.html")},P={qihoo_pc_js:"".concat(N,"/home_top_360.html"),baidu_pc_js:"u6559258",default:"".concat(N,"/home_top.html")},B={qihoo_pc_js:"".concat(N,"/home_bottom_360.html"),baidu_pc_js:"u6559260",default:"".concat(N,"/home_bottom.html")},z="".concat(N,"/home_bottom.html"),D={new_answer_down_sticky:_,new_answer_up:I,new_question_up:M,new_question_down_sticky:L,new_home_up:P,new_home_bottom:B},F="https://www.zhihu.com/commercial_api/banners_v3/",U={new_home_up:"home_up",new_home_bottom:"home_bottom",new_answer_up:"answer_up",new_answer_down_sticky:"answer_down_sticky",new_question_up:"question_up",new_question_down_sticky:"question_down_sticky"},V=n(935),q=function(e){function t(){var e,n;i()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=u()(this,(e=f()(t)).call.apply(e,[this].concat(o)))).state={item:null},n.getAdsenseSource=function(e){var t=n.props.location,r=n.state.item.template,o=D[t];return o[r||e]||o.default||z},n.trackImpression=function(){var e=n.state.item;if(e){var t=Object(w.a)(e).ad,r=t.impressionTracks,o=t.debugTracks,a={impressionTracks:r,viewTracks:t.viewTracks,debugTracks:o};Object(V.d)(n.card,a)}},n.loadBannerRequest=function(e){var t=e.id,r=e.location,o=e.query,a=e.onLoadBanner;Object(x.l)({id:t,location:r,query:o,url:"".concat(F).concat(U[r])}).then((function(e){a(e),e&&n.setState({item:Object(C.b)({adjson:e},"pccard")})}))},n.load=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.props,t=e.delay;clearTimeout(n.loadTimeout),t>0?n.loadTimeout=setTimeout((function(){n.loadBannerRequest(e)}),t):n.loadBannerRequest(e)},n.handleIframeLoad=function(){setTimeout(n.props.onHeightChange,300)},n.handleImageLoad=function(){var e=n.state.item;if(e){n.debugTracks("image_onload"),n.trackImpression();var t=Object(w.a)(e).creative,r=Object(x.e)(t,"asset.landingUrl","");S.a.trackEvent(h()(n),{action:"Load"},{link:{url:r}}),setTimeout(n.props.onHeightChange,300)}},n.debugTracks=function(e){var t=n.state.item;if(t){var r=Object(w.a)(t).ad.debugTracks,o=void 0===r?[]:r,a={et:e},i=R.a.stringify(a);o.map((function(e){return e?Object(x.u)(i?"".concat(e).concat(e.includes("?")?"&":"?").concat(i):e):null}))}},n.handleClose=function(){var e=n.state.item;if(e){var t=Object(w.a)(e).ad.closeTracks,r=void 0===t?[]:t;Object(V.b)(r),n.hideImage()}},n.handleLog=function(e){var t=n.state.item,r=Object(w.a)(t),o=r.ad,a=r.creative,i=o.clickTracks,c=void 0===i?[]:i,s=Object(x.e)(a,"asset.landingUrl","");S.a.trackEvent(e.target,{action:"OpenUrl",url:window.location.href},{link:{url:s}}),Object(V.a)(c)},n.hideImage=function(){var e=n.card.offsetHeight;n.card.style.height="".concat(e,"px"),n.timeout=setTimeout((function(){n.card.classList.add("Pc-card--hidden"),n.card.style.height=0,n.timeout=setTimeout((function(){n.props.onHideImage(),n.props.onHeightChange()}),300)}),17)},n}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){this.load()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.id,r=t.location,o=e.id,a=e.location;n===o&&r===a||(clearTimeout(this.timeout),this.setState({item:null}),this.load(e))}},{key:"render",value:function(){var e=this,t=this.state.item;if(!t)return null;var n=Object(w.a)(t),r=n.ad,o=void 0===r?{displayAdvertisingTag:"",template:""}:r,a=n.creative,i=void 0===a?{asset:{}}:a,c=o.expand.displayAdvertisingTag,s=o.template,l=i.asset,u=l.imgs,d=void 0===u?[]:u,f=l.landingUrl,p=void 0===f?"":f,h={title:"third_ad",className:"Banner-adsense",src:this.getAdsenseSource(s),adId:this.getAdsenseSource(s),scrolling:"no",frameBorder:"0",onLoad:this.handleIframeLoad};return g.a.createElement("div",{className:"Pc-card Card",ref:function(t){e.card=t}},g.a.createElement("a",{className:"Banner-link",href:p,target:"_blank",onClick:this.handleLog},Object(x.k)(s)?g.a.createElement(k.a,{value:h,template:s}):g.a.createElement(g.a.Fragment,null,c&&g.a.createElement("div",{className:"Banner-adTag"},"广告"),g.a.createElement("img",{className:"Banner-image",src:d[0],alt:"广告",onLoad:this.handleImageLoad,onError:function(){return e.debugTracks("image_onerror")},ref:function(t){e.image=t}}))),this.props.isMobile||g.a.createElement("div",{className:"Pc-card-button-close ",onClick:this.handleClose,"data-tooltip":"不再显示","data-tooltip-position":"bottom"},g.a.createElement(A.c,{name:"close",className:"Pc-card-button-close-svg "})))}}]),t}(v.Component);function H(e){return g.a.createElement(T.a,null,g.a.createElement(q,o()({},e,{data:Object(j.camelizeKeys)(e.data)})))}q.propTypes={id:O.a.string,location:O.a.string.isRequired,onLoadBanner:O.a.func,onHideImage:O.a.func,onHeightChange:O.a.func,isMobile:O.a.bool},q.defaultProps={isMobile:!1,onLoadBanner:function(){},onHideImage:function(){},onHeightChange:function(){}}},function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(842);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var h={unregistered:{url:"http://zhi.hu/BDXoI",qrcode:n(1149)},home:{url:"http://zhi.hu/BDXoI",qrcode:n(1149)},question:{url:"http://zhi.hu/BDXoI",qrcode:n(1149)}},b=function(e){Object(a.a)(n,e);var t=p(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"renderContent",value:function(){var e=this.props.type;return Object(s.b)(f.d,{className:"AppBanner",children:Object(s.b)("a",{className:"AppBanner-link",href:h[e].url,children:Object(s.c)("div",{className:"AppBanner-layout",children:[Object(s.b)("img",{className:"AppBanner-qrcode",src:h[e].qrcode,alt:"QR Code of Downloading Zhihu App"}),Object(s.c)("div",{className:"AppBanner-content",children:[Object(s.b)("div",{className:"AppBanner-title",children:"下载知乎客户端"}),Object(s.b)("div",{className:"AppBanner-description",children:"与世界分享知识、经验和见解"})]})]})})})}},{key:"render",value:function(){return this.context.currentUser?null:this.renderContent()}}]),n}(d.Component);b.contextTypes={currentUser:u.a.object},b.propTypes={type:u.a.oneOf(Object.keys(h)),getSidebar:u.a.func},b.defaultProps={type:"unregistered",getSidebar:function(){return null}};t.a=b},,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M17.007 11.504c0 .65-.13 1.26-.36 1.83l3 3.073S23 14.136 23 11.504C23 8.008 17.255 4 11.995 4c-1.4 0-2.741.25-3.982.701l2.161 2.16c.57-.23 1.18-.36 1.831-.36a5.004 5.004 0 0 1 5.002 5.003zM2.57 4.342l2.067 2.075C3.499 7.258 1 9.119 1 11.504c0 3.336 5.79 7.503 11.005 7.503 1.55 0 3.031-.3 4.382-.84l.42.42 2.125 2.118s.782.571 1.314 0-.074-1.305-.074-1.305L3.955 3.183s-.76-.742-1.385-.19c-.626.554 0 1.35 0 1.35zm4.963 4.96l1.55 1.552c-.05.21-.08.43-.08.65 0 1.66 1.341 3.001 3.002 3.001.22 0 .44-.03.65-.08l1.551 1.551c-.67.33-1.41.53-2.2.53a5.004 5.004 0 0 1-5.003-5.002c0-.79.2-1.53.53-2.201zm4.312-.78l3.151 3.152.02-.16c0-1.66-1.34-3.001-3.001-3.001l-.17.01z",opacity:".9",fillRule:"evenodd"}))};i.defaultProps={name:"EyeSlash"},t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(t){return setTimeout(t,e)}))};function o(e){var t=[];return e.reduce((function(e,n){return e.then((function(){return n().then((function(e){t.push(e)}))}))}),Promise.resolve()).then((function(){return t}))}},,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M13.25 5.5H6.868c-.755 0-1.368.613-1.368 1.368v10.264c0 .755.613 1.368 1.368 1.368h10.264c.755 0 1.368-.613 1.368-1.368V10.75H20v6.467A2.783 2.783 0 0 1 17.217 20H6.783A2.783 2.783 0 0 1 4 17.217V6.783A2.783 2.783 0 0 1 6.783 4h6.467v1.5zM8.158 13.4a1.033 1.033 0 0 1 1.744-.078l.258.37a.782.782 0 0 0 1.303-.031l1.332-2.113a1.173 1.173 0 0 1 2.01.043l2.03 3.537A1.25 1.25 0 0 1 15.748 17H8.25a1.252 1.252 0 0 1-1.085-1.873l.992-1.728zM9.5 11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3.75-5.5a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5zM18.5 4V2.25a.75.75 0 1 1 1.5 0V4h1.75a.75.75 0 1 1 0 1.5H20v1.75a.75.75 0 1 1-1.5 0V5.5h-1.75a.75.75 0 1 1 0-1.5h1.75zm.75 7.5a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5z"}))};i.defaultProps={name:"AddImage"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M7.523 13.5h8.954c-.228 2.47-2.145 4-4.477 4-2.332 0-4.25-1.53-4.477-4zM12 21a9 9 0 1 1 0-18 9 9 0 0 1 0 18zm0-1.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15zm-3-8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm6 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"}))};i.defaultProps={name:"Emotion"},t.a=i},,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-2.762-5.37c.243.246.452.37.78.37.33 0 .576-.203.827-.443.25-.24 7.052-7.054 7.052-7.054a.988.988 0 0 0-.311-1.354.973.973 0 0 0-1.345.315l-6.222 6.077-2.31-2.418a.971.971 0 0 0-1.368-.19.988.988 0 0 0-.188 1.377s2.841 3.074 3.085 3.32z",fillRule:"evenodd"}))};i.defaultProps={name:"CheckCircle"},t.a=i},function(e,t,n){"use strict";var r=n(33),o=n.n(r),a=n(55),i=n.n(a),c=n(1),s=n.n(c);var l={baidu_pc_js:function(e){var t=e.value,n=void 0===t?{}:t,r=n.className,o=n.adId,a=n.onLoad,l=Object(c.useState)("_".concat(Math.random().toString(36).slice(2))),u=i()(l,1)[0];function d(){var e;(e=document.getElementById("baidu-ad-js"))||((e=document.createElement("script")).setAttribute("src","//cpro.baidustatic.com/cpro/ui/cm.js"),e.setAttribute("defer","defer"),e.setAttribute("id","baidu-ad-js"),document.body.appendChild(e)),window.slotbydup=window.slotbydup||[],window.slotbydup.push({id:o,container:u,async:!0}),a&&a()}return Object(c.useEffect)((function(){d()}),[d]),s.a.createElement("div",{id:u,className:"".concat(u," ").concat(r)})},goole_pc_js:function(e){var t=e.value;return s.a.createElement("iframe",o()({},t,{title:"google广告"}))},maozhua_pc_js:function(e){var t=e.value,n=void 0===t?{}:t;return s.a.createElement("iframe",o()({},n,{title:"猫爪广告"}))},ruoying_pc_js:function(e){var t=e.value,n=void 0===t?{}:t;return s.a.createElement("iframe",o()({},n,{title:"若影广告"}))}};t.a=function(e){var t=e.template,n=l[t];return s.a.createElement(n,e)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72),o=n(56);function a(e,t){Object(o.a)(2,arguments);var n=Object(r.a)(e),a=Object(r.a)(t);return n.getTime()<a.getTime()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72),o=n(56);function a(e,t){Object(o.a)(2,arguments);var n=Object(r.a)(e),a=Object(r.a)(t);return n.getTime()>a.getTime()}},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M18 8c.1-3.308-2.592-6-5.9-6-3.308 0-6 2.692-6 6v2H5.002C4 10 4 11 4 11v9s0 2 2 2h12c2 0 2-1.97 2-1.97V11s0-1-1-1h-1V8zm-6-4c2.143.018 4.005 1.597 4 4v2H8V7.996C8.013 5.562 9.857 3.982 12 4z",fillRule:"evenodd"}))};i.defaultProps={name:"Lock"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z",fillRule:"evenodd"}))};i.defaultProps={name:"Like"},t.a=i},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(1306),o=(n(1291),n(33)),a=n.n(o),i=n(1),c=n.n(i);n(1142),n(1144);n(1143);n(1145),n(1146),n(1147),n(1148);function s(e){return c.a.createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg"},e,{viewBox:"0 0 12 10"}),c.a.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(-2 -3)"},c.a.createElement("rect",{width:"16",height:"16"}),c.a.createElement("rect",{width:"12",height:"2",x:"2",y:"3",fill:"#9FADC7",fillRule:"nonzero",rx:"1"}),c.a.createElement("rect",{width:"12",height:"2",x:"2",y:"7",fill:"#9FADC7",fillRule:"nonzero",rx:"1"}),c.a.createElement("rect",{width:"7",height:"2",x:"2",y:"11",fill:"#9FADC7",fillRule:"nonzero",rx:"1"})))}function l(e){return c.a.createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg"},e,{viewBox:"0 0 12 12"}),c.a.createElement("path",{fill:"#9FADC7",d:"M3,2.66666667 L13,2.66666667 C13.5522847,2.66666667 14,3.11438192 14,3.66666667 L14,12.6600825 C14,13.2123673 13.5522847,13.6600825 13,13.6600825 C12.7827311,13.6600825 12.5713728,13.5893212 12.3979007,13.4585037 L8.60209931,10.596043 C8.24569125,10.3272712 7.75430875,10.3272712 7.39790069,10.596043 L3.60209931,13.4585037 C3.16114346,13.791034 2.53410906,13.7031377 2.2015788,13.2621819 C2.07076131,13.0887097 2,12.8773515 2,12.6600825 L2,3.66666667 C2,3.11438192 2.44771525,2.66666667 3,2.66666667 Z",transform:"translate(-2 -2)"}))}n(1292),n(1293),n(1294),t.c=r.a},,,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(27),p=n(11),h=n.n(p),b=n(1172),m=n(31),v=n(870),g=n(241),y=n(66),O=n(807),j=n(30),w=n(25),C=n(1329),k=n(24);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var S=function(e){Object(a.a)(n,e);var t=x(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={modalShown:!1},e.handleSendMessage=function(){var t=e.props,n=t.onModalOpen,r=t.user.allowMessage,o=t.dispatch,a=t.doNotCheckAllowMessageSetting;r||void 0===r&&a?(e.setState({modalShown:!0}),n&&n()):o(Object(w.h)(k.U.blocked,"red")),j.a.trackEvent(Object(y.a)(e),{action:"Message",element:"Button",is_intent:!0})},e.handleCloseModal=function(){var t=e.props.onModalClose;e.setState({modalShown:!1}),t&&t()},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.user,n=e.preset,r=e.color,o=e.icon,a=e.label,i=e.className,c=e.tooltip,l=e.tooltipPreset,u=this.state.modalShown,d="3d198a56310c02c4a83efb9f4a4c027e"===t.id;return Object(s.c)(s.a,{children:[Object(s.b)(m.c,{preset:n,color:r,className:i,icon:o,label:a,onClick:this.context.authRequired(this.handleSendMessage,d?k.W.serviceAccountMessage:k.W.message),"data-tooltip":c,"data-tooltip-preset":l}),Object(s.b)(C.a,{memberHashId:t.id,handleCloseModal:this.handleCloseModal,isModalShow:u})]})}}]),n}(d.Component);S.propTypes={onModalOpen:u.a.func,onModalClose:u.a.func},S.defaultProps={preset:"outline",color:"grey",icon:O.a,label:"发私信",doNotCheckAllowMessageSetting:!1},S.contextTypes={authRequired:u.a.func};var E=Object(f.connect)()(S),R=n(119);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var A=function(e){Object(a.a)(n,e);var t=T(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={reportModalShown:!1},e.handleShieldUser=function(){var t=e.props,n=t.user.urlToken,r=t.updateUserBlocking,o=t.showNotification;r(n,!1).then((function(){return o("屏蔽已取消")}))},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.user,r=t.user,o=r.urlToken,a=r.isBlocking,i=r.isOrg,c=t.className,l=t.buttonClassName,u=t.onModalOpen,d=t.onModalClose,f=this.context.authRequired,p=this.state.reportModalShown,y=h()("MemberButtonGroup",c);return a?Object(s.c)("div",{className:y,children:[Object(s.c)(m.c,{className:l,preset:"primary",color:"red",onClick:this.handleShieldUser,children:[Object(s.b)(b.a,{center:!0,text:!0})," 已屏蔽"]}),!i&&Object(s.c)(m.c,{className:l,onClick:f((function(){e.setState({reportModalShown:!0}),u&&u()}),k.W.report),children:["举报用户",Object(s.b)(g.a,{shown:p,onClose:function(){e.setState({reportModalShown:!1}),d&&d()},type:"member",urlToken:o,zaEnabled:!0})]})]}):Object(s.c)("div",{className:y,children:[Object(s.b)(v.a,{id:o,type:n.type,gender:n.gender,isFollowing:n.isFollowing,className:l,preset:v.a.PRESETS.primary}),Object(s.b)(E,{user:n,className:l,onModalOpen:u,onModalClose:d})]})}}]),n}(d.Component);A.contextTypes={authRequired:u.a.func},A.propTypes={user:u.a.object.isRequired,buttonClassName:u.a.string,onModalOpen:u.a.func,onModalClose:u.a.func};t.a=Object(f.connect)(null,{updateUserBlocking:R.n,showNotification:w.h})(A)},,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M2 8.437C2 5.505 4.294 3.094 7.207 3 9.243 3 11.092 4.19 12 6c.823-1.758 2.649-3 4.651-3C19.545 3 22 5.507 22 8.432 22 16.24 13.842 21 12 21 10.158 21 2 16.24 2 8.437z",fillRule:"evenodd"}))};i.defaultProps={name:"Heart"},t.a=i},,function(e,t,n){e.exports=n.p+"assets/MenuAnswer.b921bb5b.png"},function(e,t,n){e.exports=n.p+"assets/MenuArticle.238665f9.png"},function(e,t,n){e.exports=n.p+"assets/MenuPin.22db5689.png"},function(e,t,n){e.exports=n.p+"assets/MenuVideo.bf386b99.png"},,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(e){return o.a.createElement(a.a,i({fill:"currentColor"},e),o.a.createElement("path",{d:"M12.75 6a.25.25 0 0 1 .25.25v4.969a.5.5 0 0 0 .213.41l4.156 2.908a.25.25 0 0 1 .061.349l-.86 1.228a.25.25 0 0 1-.348.062l-5.009-3.506a.5.5 0 0 1-.213-.41V6.25a.25.25 0 0 1 .25-.25h1.5z"}),o.a.createElement("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z",fillRule:"evenodd",clipRule:"evenodd"}))};c.defaultProps={name:"Time"},t.a=c},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72),o=n(56);function a(e){Object(o.a)(1,arguments);var t=Object(r.a)(e),n=t.getDay();return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72),o=n(56);function a(e){var t,n;if(Object(o.a)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!=typeof e||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Object(r.a)(e);(void 0===n||n>t||isNaN(t))&&(n=t)})),n||new Date(NaN)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72),o=n(56);function a(e){var t,n;if(Object(o.a)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!=typeof e||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Object(r.a)(e);(void 0===n||n<t||isNaN(t))&&(n=t)})),n||new Date(NaN)}},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M13.8 4.903h-3.6v.943c0 .314-.082.609-.228.864H13.8V4.903zm3.6 0h2.85c.414 0 .75.333.75.735v.337a.742.742 0 0 1-.75.735H17.4V4.903zm-10.8 0H3.75a.742.742 0 0 0-.75.735v.337c0 .404.336.735.75.735h3.082a1.721 1.721 0 0 1-.232-.864v-.943zM3 9.252c0-.407.335-.735.75-.735h16.5c.414 0 .75.33.75.737v10.274a.742.742 0 0 1-.75.736H3.75A.74.74 0 0 1 3 19.53V9.252zm4.5 1.975v1.807h1.8v-1.807H7.5zm0 4.516v1.807h1.8v-1.807H7.5zm3.6 0v1.807h1.8v-1.807h-1.8zm3.6 0v1.807h1.8v-1.807h-1.8zm-3.6-4.516v1.807h1.8v-1.807h-1.8zm3.6 0v1.807h1.8v-1.807h-1.8zM7.5 4.893c0-.494.4-.893.9-.893.497 0 .9.4.9.893V6.72c0 .494-.4.894-.9.894a.898.898 0 0 1-.9-.894V4.893zm7.2 0c0-.494.4-.893.9-.893.497 0 .9.4.9.893V6.72c0 .494-.4.894-.9.894a.898.898 0 0 1-.9-.894V4.893z"}))};i.defaultProps={name:"Calendar"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-1.25a8.75 8.75 0 1 0 0-17.5 8.75 8.75 0 0 0 0 17.5zm0-2.431a1.17 1.17 0 0 1-.846-.344 1.143 1.143 0 0 1-.354-.856c0-.328.118-.61.354-.847.236-.235.518-.353.846-.353.328 0 .61.115.846.344.236.23.354.515.354.856 0 .342-.118.626-.354.856-.236.229-.518.344-.846.344zm1.534-6.228c-.163.154-.755.587-.843 1.532-.09.518-.377.777-.857.777a.86.86 0 0 1-.63-.254c-.17-.17-.255-.421-.255-.755 0-.419 0-1.055.684-1.895.206-.231.485-.506.835-.825.307-.28 1.158-.941 1.152-1.674a1.357 1.357 0 0 0-.428-1.01c-.286-.273-.655-.41-1.106-.41-.528 0-.917.138-1.166.414-.25.277-.46.684-.634 1.222-.163.563-.472.845-.928.845a.896.896 0 0 1-.68-.295c-.185-.197-.278-.41-.278-.64 0-.473.147-.952.44-1.438.292-.486.72-.888 1.28-1.207C10.683 6.16 11.339 6 12.087 6c.696 0 2.318.166 3.078 1.487.291.459.436.957.436 1.495 0 .423-.134 1.218-.839 1.94-.228.23-.637.62-1.227 1.169z",fillRule:"evenodd"}))};i.defaultProps={name:"HelpOutline"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M10.241 19.313a.97.97 0 0 0-.77.2 7.908 7.908 0 0 1-3.772 1.482.409.409 0 0 1-.38-.637 5.825 5.825 0 0 0 1.11-2.237.605.605 0 0 0-.227-.59A7.935 7.935 0 0 1 3 11.25C3 6.7 7.03 3 12 3s9 3.7 9 8.25-4.373 9.108-10.759 8.063z",fillRule:"evenodd"}))};i.defaultProps={name:"Comment"},t.a=i},,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M20.044 3H3.956C2.876 3 2 3.517 2 4.9c0 .326.087.533.236.896L10.216 19c.355.571.87 1.143 1.784 1.143s1.429-.572 1.784-1.143l7.98-13.204c.149-.363.236-.57.236-.896 0-1.386-.876-1.9-1.956-1.9z",fillRule:"evenodd"}))};i.defaultProps={name:"TriangleDown"},t.a=i},,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n(34),a=Object(r.createContext)({}),i=n(126);t.a=Object(o.withRouter)((function(e){var t=e.to,n=e.router,o=Object(r.useContext)(a);return o.url||(o.url=t),Object(r.useEffect)((function(){Object(i.isAbsoluteUrl)(t)?window.location.replace(t):n.replace(t)}),[n,t]),null}))},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72),o=n(56);function a(e){Object(o.a)(1,arguments);var t=Object(r.a)(e),n=t.getHours();return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72),o=n(56);function a(e){Object(o.a)(1,arguments);var t=Object(r.a)(e),n=t.getMinutes();return n}},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M13.362 19.12l-1.951 1.73-.014.012a.595.595 0 0 1-.84-.078L9.178 19.12H7.481a2.985 2.985 0 0 1-2.966-3.292l.708-6.962c.151-1.489.348-2.183.789-2.891a3.963 3.963 0 0 1 1.635-1.481C8.395 4.126 9.103 4 10.596 4h5.923a2.985 2.985 0 0 1 2.966 3.292l-.708 6.962c-.151 1.488-.348 2.182-.789 2.89a3.963 3.963 0 0 1-1.635 1.482c-.748.367-1.456.494-2.949.494h-.042zm1.21-6.804a.198.198 0 0 1-.197-.23l.24-1.566a.199.199 0 0 1 .197-.169h1.01a.797.797 0 0 0 .795-.773.624.624 0 0 0-.624-.625h-.884a.198.198 0 0 1-.195-.233l.302-1.75a.676.676 0 0 0-.662-.789.9.9 0 0 0-.886.743l-.334 1.865a.199.199 0 0 1-.196.164h-1.62a.198.198 0 0 1-.196-.234l.314-1.748a.673.673 0 0 0-.659-.79.9.9 0 0 0-.886.743l-.334 1.865a.199.199 0 0 1-.195.164H8.51a.797.797 0 0 0-.795.773c0 .345.28.625.624.625h.942a.198.198 0 0 1 .197.23l-.24 1.566a.199.199 0 0 1-.197.17H7.979a.797.797 0 0 0-.794.772c0 .345.279.625.623.625h.959a.198.198 0 0 1 .196.23l-.308 1.968a.678.678 0 0 0 .666.78c.43 0 .796-.313.863-.74l.323-2.07a.199.199 0 0 1 .197-.168h1.64a.198.198 0 0 1 .196.23l-.306 1.96a.685.685 0 0 0 .673.788.883.883 0 0 0 .872-.748l.322-2.062a.199.199 0 0 1 .197-.168h1.01a.809.809 0 0 0 .805-.779.618.618 0 0 0-.618-.619h-.924zm-1.518-1.735l-.24 1.566a.199.199 0 0 1-.196.17h-1.623a.198.198 0 0 1-.197-.23l.24-1.567a.199.199 0 0 1 .197-.169h1.623a.198.198 0 0 1 .196.23z",fillRule:"evenodd"}))};i.defaultProps={name:"Hashtag"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M2.931 7.89c-1.067.24-1.275 1.669-.318 2.207l5.277 2.908 8.168-4.776c.25-.127.477.198.273.39L9.05 14.66l.927 5.953c.18 1.084 1.593 1.376 2.182.456l9.644-15.242c.584-.892-.212-2.029-1.234-1.796L2.93 7.89z",fillRule:"evenodd"}))};i.defaultProps={name:"Share"},t.a=i},,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(3),u=n.n(l),d=n(1),f=n(90),p=n(176),h=n(365),b=n(1388),m=n(854),v=n(902),g=n(899),y=n(870),O=n(890),j=n(859),w=n(366);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var k=function(e){Object(a.a)(n,e);var t=C(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={commentPattern:"fixed",commentsShown:!1,commentsAutoFocus:!0},e.handleCommentsShown=function(t,n){e.setState(n)},e.handleCommentsHide=function(){e.setState({commentsShown:!1})},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.preset,r=t.favlist,o=t.favlist,a=o.id,i=o.type,c=o.title,l=o.updatedTime,u=o.answerCount,d=o.followerCount,w=o.isFollowing,C=o.isPublic,k=o.creator,x=void 0===k?{}:k,S=o.commentCount,E=t.status,R=t.action,T=t.lastreadTouchable,A=t.zaInfos,N=A.follow,_=A.options,I=t.renderOptions,M=this.state,L=M.commentsShown,P=M.commentsAutoFocus,B=M.commentPattern,z="/collection/".concat(a),D=Object(s.b)("a",{href:z,target:"_blank",rel:"noopener noreferrer",children:c});if(n===m.c.plain)return Object(s.b)(m.e,{data:r,link:z,title:D});var F={id:a,type:i};return n===m.c.default?Object(s.b)(m.e,{data:r,link:z,title:Object(s.c)(f.Flex,{alignItems:"center",children:[D,!C&&Object(s.b)(f.Text,{color:"GBL05A",ml:".3em",children:Object(s.b)(b.a,{center:!0,size:18})})]}),meta:E||Object(s.c)(m.d,{children:["".concat(Object(p.toDateString)(l)," 更新"),"".concat(Object(h.formatNumber)(u)," 条内容"),"".concat(Object(h.formatNumber)(d)," 人关注")]}),extra:R}):Object(s.c)(m.e,{data:r,link:z,onRef:function(t){e.contentItem=t},title:D,lastreadTouchable:T,children:[Object(s.c)(m.b,{children:[Object(s.c)("div",{children:[Object(s.b)("span",{children:"关注数:"}),Object(h.formatNumber)(d)]}),Object(s.c)("div",{children:[Object(s.b)("span",{children:"最后更新于:"}),Object(p.toDateString)(l)]}),Object(s.c)("div",{children:[Object(s.b)("span",{children:"作者:"}),Object(s.b)(j.a,{user:x})]})]},"favlist-item-cells"),Object(s.c)(m.a,{children:[Object(s.b)(y.a,Object.assign({},F,{isFollowing:w,zaId:N})),Object(s.b)(v.a,{onClick:this.handleCommentsShown,commentsShown:L,count:S}),Object(s.b)(O.a,Object.assign({},F,{title:c,authorName:x&&x.name})),I&&I((function(){return e.contentItem}),_)]},"favlist-item-actions"),Object(s.b)(g.a,{parent:r,commentPattern:B,shown:L,autoFocus:P,onClose:this.handleCommentsHide})]})}}]),n}(d.Component);k.propTypes={preset:u.a.oneOf(Object.values(m.c)),zaInfos:u.a.shape({follow:u.a.number,options:u.a.number}),renderOptions:u.a.func},k.defaultProps={preset:m.c.default,zaInfos:{}},t.a=Object(w.b)((function(e){var t=e.favlist,n=e.trackCardShow,r=void 0===n||n;return{module:"CollectionItem",card:{content:{type:"Collection",token:String(t.id),item_num:t.answerCount,follower_num:t.followerCount,publish_timestamp:1e3*t.updateTime,author_member_hash_id:(t.creator||{}).id}},trackCardShow:r}}))(k)},,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(11),f=n.n(d);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var h=function(e){Object(i.a)(n,e);var t=p(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.alt,o=Object(r.a)(e,["className","alt"]);return Object(l.b)("img",Object.assign({className:f()("ImageAlias",t),alt:n},o))}}]),n}(u.Component);t.a=h},,function(e,t,n){"use strict";var r=n(35),o=n(14),a=n(15),i=n(16),c=n(17),s=n(9),l=n(2),u=n(1),d=n(11),f=n.n(d),p=n(34),h=n(31);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var m=function(e){Object(i.a)(n,e);var t=b(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this.props,t=e.to,n=e.className,o=e.children,a=Object(r.a)(e,["to","className","children"]),i=f()("QuestionMainAction",n);return t?Object(l.b)(p.Link,Object.assign({to:t,className:i},a,{children:o})):Object(l.b)(h.c,Object.assign({className:i},a,{children:o}))}}]),n}(u.Component);t.a=m},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M10.786 8.41a8.938 8.938 0 0 0-3.968-2.528c-.305-1.719.814-3.337 2.442-3.741 1.221-.405 2.646.101 3.46 1.011 1.045 1.38.915 3.64.814 4.348-.102 1.315-1.221 3.034-1.323 3.135-.305-.809-.814-1.517-1.425-2.225zm-2.442 2.832c-1.526.202-3.052 1.01-4.171 2.123-1.12-.404-1.934-1.314-2.137-2.427-.316-2.427 1.526-3.64 2.849-3.842 1.628-.371 2.849.505 4.07 1.415 1.146 1.012 2.035 2.63 2.035 2.73-.916-.202-1.832-.1-2.646 0zm4.986.303c.509-.607.931-1.586 1.12-2.225.318-1.039.61-3.134.203-4.651 1.323-1.011 3.154-1.011 4.477.303 1.235 1.146 1.017 2.933.814 3.438-.663 1.581-1.933 2.326-3.256 2.832-1.221.404-3.256.303-3.358.303zm-2.645 1.011c-.51.607-.916 1.416-1.221 2.326-.407 1.314-.643 3.06-.102 4.55-1.323 1.011-3.256 1.011-4.477-.202-1.198-1.124-1.018-2.932-.814-3.438.599-1.605 1.933-2.326 3.256-2.831.916-.304 3.256-.405 3.358-.405zm9.259-1.82c1.017.404 1.933 1.315 2.035 2.427.233 2.57-1.526 3.64-2.849 3.842-1.526 0-2.85-.505-4.07-1.415-1.018-.81-2.035-2.528-2.035-2.63.916.203 1.831.102 2.645 0 1.628-.404 3.053-1.112 4.274-2.224zm-6.716 4.854c1.065 1.08 2.442 2.022 4.07 2.528.306 1.719-.814 3.235-2.442 3.741-1.22.405-2.645-.101-3.46-1.011-1.1-1.481-1.017-3.54-.915-4.247.102-1.315 1.221-3.034 1.323-3.135.305.708.721 1.44 1.424 2.124z"}))};i.defaultProps={name:"Org"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M16.036 4.994a1 1 0 0 0-.997-.995H9.032a.996.996 0 0 0-.997.996V12H5.03c-1.1 0-1.36.633-.578 1.416l6.878 6.878c.39.39 1.026.385 1.412 0l6.878-6.88c.782-.78.523-1.415-.58-1.415h-3.004V4.994z"}))};i.defaultProps={name:"SolidArrowDown"},t.a=i},,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(43),o=n(2),a=n(1),i=n(233),c=n.n(i),s=Object(a.createContext)([!0,c.a,c.a]);s.displayName="DisplayPriorityContext";var l=function(){return Object(a.useContext)(s)},u=function(e){var t=e.children,n=e.readyStatus,r=e.shownStatus,i=e.index,c=e.setReadyStatusList,l=Object(a.useRef)(n);Object(a.useEffect)((function(){l.current=n}),[n]);var u=Object(a.useCallback)((function(){"pending"===l.current&&c((function(e){return e.map((function(e,t){return t===i?"resolved":e}))}))}),[c,i]),d=Object(a.useCallback)((function(){"pending"===l.current&&c((function(e){return e.map((function(e,t){return t===i?"rejected":e}))}))}),[c,i]),f=Object(a.useMemo)((function(){return[r,u,d]}),[r,u,d]);return Object(o.b)(s.Provider,{value:f,children:t})};t.a=function(e){var t=e.children,n=Object(a.useState)((function(){return a.Children.map(t,(function(){return"pending"}))})),i=Object(r.a)(n,2),c=i[0],s=i[1],l=Object(a.useMemo)((function(){var e=!1;return c.map((function(t){return!e&&("rejected"!==t&&(e=!0,"pending"!==t))}))}),[c]);return Object(o.b)(o.a,{children:a.Children.map(t,(function(e,t){return Object(o.b)(u,{readyStatus:c[t],shownStatus:l[t],index:t,setReadyStatusList:s,children:e},t)}))})}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(133),o=n(442),a=n(56);function i(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(t);return Object(o.a)(e,6e4*n)}},,,,,,function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=s(n(1756)),a=s(n(1)),i=s(n(3)),c=(s(n(1757)),n(1758));function s(e){return e&&e.__esModule?e:{default:e}}i.default.any,i.default.func,i.default.node;var l=function(e){function t(n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,o));return a.performAppear=function(e,t){a.currentlyTransitioningKeys[e]=!0,t.componentWillAppear?t.componentWillAppear(a._handleDoneAppearing.bind(a,e,t)):a._handleDoneAppearing(e,t)},a._handleDoneAppearing=function(e,t){t.componentDidAppear&&t.componentDidAppear(),delete a.currentlyTransitioningKeys[e];var n=(0,c.getChildMapping)(a.props.children);n&&n.hasOwnProperty(e)||a.performLeave(e,t)},a.performEnter=function(e,t){a.currentlyTransitioningKeys[e]=!0,t.componentWillEnter?t.componentWillEnter(a._handleDoneEntering.bind(a,e,t)):a._handleDoneEntering(e,t)},a._handleDoneEntering=function(e,t){t.componentDidEnter&&t.componentDidEnter(),delete a.currentlyTransitioningKeys[e];var n=(0,c.getChildMapping)(a.props.children);n&&n.hasOwnProperty(e)||a.performLeave(e,t)},a.performLeave=function(e,t){a.currentlyTransitioningKeys[e]=!0,t.componentWillLeave?t.componentWillLeave(a._handleDoneLeaving.bind(a,e,t)):a._handleDoneLeaving(e,t)},a._handleDoneLeaving=function(e,t){t.componentDidLeave&&t.componentDidLeave(),delete a.currentlyTransitioningKeys[e];var n=(0,c.getChildMapping)(a.props.children);n&&n.hasOwnProperty(e)?a.keysToEnter.push(e):a.setState((function(t){var n=r({},t.children);return delete n[e],{children:n}}))},a.childRefs=Object.create(null),a.state={children:(0,c.getChildMapping)(n.children)},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},t.prototype.componentDidMount=function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t,this.childRefs[t])},t.prototype.componentWillReceiveProps=function(e){var t=(0,c.getChildMapping)(e.children),n=this.state.children;for(var r in this.setState({children:(0,c.mergeChildMappings)(n,t)}),t){var o=n&&n.hasOwnProperty(r);!t[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(var a in n){var i=t&&t.hasOwnProperty(a);!n[a]||i||this.currentlyTransitioningKeys[a]||this.keysToLeave.push(a)}},t.prototype.componentDidUpdate=function(){var e=this,t=this.keysToEnter;this.keysToEnter=[],t.forEach((function(t){return e.performEnter(t,e.childRefs[t])}));var n=this.keysToLeave;this.keysToLeave=[],n.forEach((function(t){return e.performLeave(t,e.childRefs[t])}))},t.prototype.render=function(){var e=this,t=[],n=function(n){var r=e.state.children[n];if(r){var i="string"!=typeof r.ref,c=e.props.childFactory(r),s=function(t){e.childRefs[n]=t};c===r&&i&&(s=(0,o.default)(r.ref,s)),t.push(a.default.cloneElement(c,{key:n,ref:s}))}};for(var i in this.state.children)n(i);var c=r({},this.props);return delete c.transitionLeave,delete c.transitionName,delete c.transitionAppear,delete c.transitionEnter,delete c.childFactory,delete c.transitionLeaveTimeout,delete c.transitionEnterTimeout,delete c.transitionAppearTimeout,delete c.component,a.default.createElement(this.props.component,c,t)},t}(a.default.Component);l.displayName="TransitionGroup",l.propTypes={},l.defaultProps={component:"span",childFactory:function(e){return e}},t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default=r,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.nameShape=void 0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}};o(n(1));var r=o(n(3));function o(e){return e&&e.__esModule?e:{default:e}}t.nameShape=r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,leave:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterActive:r.default.string,leave:r.default.string,leaveActive:r.default.string,appear:r.default.string,appearActive:r.default.string})])},,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M10.47 12.47l1.06 1.06a.25.25 0 0 1 0 .354L6.413 19h4.337a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-7.5a.25.25 0 0 1-.25-.25v-7.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v4.335l5.116-5.115a.25.25 0 0 1 .354 0zM20.75 3a.25.25 0 0 1 .25.25v7.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V6.413l-5.116 5.117a.25.25 0 0 1-.354 0l-1.06-1.06a.25.25 0 0 1 0-.354L17.585 5H13.25a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h7.5z"}))};i.defaultProps={name:"FullscreenEnter"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M19.722 18a.249.249 0 0 1-.242-.2 1 1 0 0 0-.906-.797L18.5 17h-.875a5.135 5.135 0 0 1-.527 1.003L17 18c1.524 0 2.783 1.237 2.974 2.72a.25.25 0 0 1-.249.28h-1.503a.249.249 0 0 1-.242-.2 1 1 0 0 0-.906-.797L17 20H7c-.465 0-.855.375-.967.818a.243.243 0 0 1-.237.182H4.385c-.266 0-.386-.12-.374-.262a3 3 0 0 1 2.876-2.736h.014a5.162 5.162 0 0 1-.527-1.001L5.5 17c-.465 0-.855.374-.967.818a.243.243 0 0 1-.237.182H2.885c-.266 0-.386-.12-.374-.262a3 3 0 0 1 2.876-2.736L5.5 15H6L6 14.895a4.736 4.736 0 0 1-3.684-5.329l.03-.173.442-2.365a3 3 0 0 1 1.94-5.017.25.25 0 0 1 .27.25v1.514a.249.249 0 0 1-.2.245A1 1 0 1 0 5.98 5.2a.25.25 0 0 1 .245-.2h1.514a.25.25 0 0 1 .25.271 3 3 0 0 1-3.342 2.708l-.334 1.782a2.735 2.735 0 0 0 2.089 3.172 5.012 5.012 0 0 1 1.076-1.637 2.006 2.006 0 0 1-.426-1.754 1.972 1.972 0 0 1 1.492-1.491A2.003 2.003 0 0 1 11 10h2a2.002 2.002 0 0 1 2.457-1.949c.741.164 1.328.75 1.492 1.492.148.669-.039 1.299-.426 1.754a5.021 5.021 0 0 1 1.077 1.64 2.903 2.903 0 0 0 2.248-3.406l-.031-.139-.357-1.427a3 3 0 0 1-3.448-2.692.251.251 0 0 1 .25-.273h1.515c.118 0 .22.083.243.198a1 1 0 1 0 1.178-1.178.248.248 0 0 1-.198-.243V2.263c0-.148.126-.264.273-.251A3.001 3.001 0 0 1 21.27 6.96l.486 1.946a4.906 4.906 0 0 1-3.759 5.992c.002.033.002.068.002.102h.5c1.524 0 2.783 1.236 2.975 2.72a.25.25 0 0 1-.25.28h-1.503zM13.5 12h-3C9.12 12 8 13.344 8 15c0 1.614 1.061 2.929 2.391 2.997L10.5 18h3c1.38 0 2.5-1.344 2.5-3 0-1.614-1.061-2.929-2.392-2.997L13.5 12z",fillRule:"evenodd"}))};i.defaultProps={name:"Crab"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12.9 11.433v-5.1a.9.9 0 1 0-1.8 0v6a.9.9 0 0 0 .9.9h4.8a.9.9 0 1 0 0-1.8h-3.9zM2.652 8.246a3.3 3.3 0 0 1 4.43-4.851 10.241 10.241 0 0 0-4.43 4.851zm14.266-4.851a3.3 3.3 0 0 1 4.43 4.851 10.241 10.241 0 0 0-4.43-4.851zM12 21.333a9 9 0 1 1 0-18 9 9 0 0 1 0 18z",fillRule:"evenodd"}))};i.defaultProps={name:"Clock"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M10.75 13a.25.25 0 0 1 .25.25v7.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-4.337L3.883 21.53a.25.25 0 0 1-.354 0l-1.06-1.06a.25.25 0 0 1 0-.354L7.585 15 3.25 15a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h7.5zm9.72-10.53l1.06 1.06a.25.25 0 0 1 0 .354l-5.117 5.115L20.75 9a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-7.5a.25.25 0 0 1-.25-.25v-7.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v4.335l5.116-5.115a.25.25 0 0 1 .354 0z"}))};i.defaultProps={name:"FullscreenExit"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M15.465 4.544l2.272.406c.67.12 1.193.644 1.313 1.313l.406 2.272c.042.231.132.45.266.643l1.32 1.894a1.624 1.624 0 0 1 0 1.856l-1.32 1.894a1.624 1.624 0 0 0-.266.643l-.406 2.272a1.624 1.624 0 0 1-1.313 1.313l-2.272.406c-.231.042-.45.132-.643.266l-1.894 1.32a1.624 1.624 0 0 1-1.856 0l-1.894-1.32a1.624 1.624 0 0 0-.643-.266l-2.272-.406a1.624 1.624 0 0 1-1.313-1.313l-.406-2.272a1.624 1.624 0 0 0-.266-.643l-1.32-1.894a1.624 1.624 0 0 1 0-1.856l1.32-1.894c.134-.193.224-.412.266-.643l.406-2.272c.12-.67.644-1.193 1.313-1.313l2.272-.406c.231-.042.45-.132.643-.266l1.894-1.32a1.624 1.624 0 0 1 1.856 0l1.894 1.32.643.266zM12 14.187c.526 0 .977-.209 1.351-.625.375-.416.562-.916.562-1.501V8.659c0-.584-.187-1.085-.562-1.501-.374-.416-.825-.625-1.35-.625-.527 0-.978.209-1.352.625a2.166 2.166 0 0 0-.562 1.501v3.402c0 .585.187 1.085.562 1.501.374.416.825.625 1.351.625zm3.436-3.159a.373.373 0 0 0-.278-.121c-.107 0-.199.04-.277.121a.402.402 0 0 0-.117.289v.82c0 .79-.27 1.466-.812 2.027-.54.562-1.191.843-1.952.843-.76 0-1.412-.281-1.953-.843a2.818 2.818 0 0 1-.81-2.027v-.82a.402.402 0 0 0-.118-.289.373.373 0 0 0-.277-.121c-.107 0-.2.04-.278.121a.401.401 0 0 0-.117.289v.82c0 .944.303 1.765.91 2.463.606.698 1.356 1.098 2.248 1.2v1.94c-.002.22.13.33.395.33s.397-.11.395-.33V15.8c.892-.102 1.642-.502 2.248-1.2.607-.698.91-1.52.91-2.463v-.82a.401.401 0 0 0-.117-.289z",fillRule:"evenodd"}))};i.defaultProps={name:"LabelRelevant"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12.868 2.899l6.597 3.8c.537.31.868.881.868 1.5v7.602c0 .619-.33 1.19-.868 1.5l-6.597 3.8c-.537.31-1.199.31-1.736 0l-6.597-3.8a1.731 1.731 0 0 1-.868-1.5V8.199c0-.619.33-1.19.868-1.5l6.597-3.8a1.74 1.74 0 0 1 1.736 0zm-2.614 11.85a.29.29 0 0 1 .255.148l1.239 2.207a.289.289 0 0 0 .504 0l1.24-2.207a.29.29 0 0 1 .254-.148l2.52.023a.29.29 0 0 0 .253-.434l-1.284-2.192a.288.288 0 0 1 0-.292l1.284-2.192a.288.288 0 0 0-.253-.434l-2.52.023a.29.29 0 0 1-.255-.148l-1.239-2.207a.289.289 0 0 0-.504 0l-1.24 2.207a.29.29 0 0 1-.254.148l-2.52-.023a.29.29 0 0 0-.253.434l1.284 2.192a.288.288 0 0 1 0 .292L7.48 14.338a.288.288 0 0 0 .253.434l2.52-.023z",fillRule:"evenodd"}))};i.defaultProps={name:"LabelEditorRecommendation"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M3.85 5.266c1.093-.4 2.175-.6 3.245-.6 1.338 0 2.675.313 4.01.939a.6.6 0 0 1 .346.543v10.31a.24.24 0 0 1-.342.216c-1.337-.626-2.675-.94-4.014-.94-1.186 0-2.387.246-3.604.738a.6.6 0 0 1-.824-.557V6.957a1.8 1.8 0 0 1 1.182-1.69zm9.045.339c1.335-.626 2.672-.938 4.01-.938 1.07 0 2.152.2 3.246.6a1.8 1.8 0 0 1 1.182 1.69v8.958a.6.6 0 0 1-.824.557c-1.217-.492-2.418-.737-3.604-.737-1.339 0-2.677.313-4.014.94a.24.24 0 0 1-.342-.218V6.148a.6.6 0 0 1 .346-.543zm4.01 11.282c1.311 0 2.619.27 3.918.806.419.172.62.656.45 1.081a.813.813 0 0 1-1.065.457c-1.108-.457-2.207-.684-3.303-.684-1.08 0-2.163.22-3.254.664h.001a1.8 1.8 0 0 1-.649.121l-2.079.001c-.195 0-.39-.04-.568-.12-1.094-.445-2.18-.666-3.261-.666-1.096 0-2.195.227-3.303.684a.813.813 0 0 1-1.065-.457.834.834 0 0 1 .45-1.081c1.3-.536 2.607-.806 3.918-.806a10.009 10.009 0 0 1 3.391.604 3 3 0 0 0 1.025.18l.973.001a3 3 0 0 0 1.028-.18 10.01 10.01 0 0 1 3.393-.604z",fillRule:"evenodd"}))};i.defaultProps={name:"LabelWeekly"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M10.037 3.2h3.926c2.377 0 3.24.248 4.109.712a4.846 4.846 0 0 1 2.016 2.016c.464.87.712 1.732.712 4.109v3.926c0 2.377-.248 3.24-.712 4.109a4.846 4.846 0 0 1-2.016 2.016c-.87.464-1.732.712-4.109.712h-3.926c-2.377 0-3.24-.248-4.109-.712a4.846 4.846 0 0 1-2.016-2.016c-.464-.87-.712-1.732-.712-4.109v-3.926c0-2.377.248-3.24.712-4.109a4.846 4.846 0 0 1 2.016-2.016c.87-.464 1.732-.712 4.109-.712zM12 17.61a1.027 1.027 0 0 0 0-2.053A3.557 3.557 0 1 1 15.557 12a1.027 1.027 0 1 0 2.053 0A5.61 5.61 0 1 0 12 17.61z",fillRule:"evenodd"}))};i.defaultProps={name:"LabelDaily"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M15.712 4.011l2.435.435a1.74 1.74 0 0 1 1.407 1.407l.435 2.435c.044.247.141.482.285.688l1.414 2.03a1.74 1.74 0 0 1 0 1.989l-1.414 2.029a1.74 1.74 0 0 0-.285.688l-.435 2.435a1.74 1.74 0 0 1-1.407 1.407l-2.435.435a1.74 1.74 0 0 0-.688.285l-2.03 1.414a1.74 1.74 0 0 1-1.989 0l-2.029-1.414a1.74 1.74 0 0 0-.688-.285l-2.435-.435a1.74 1.74 0 0 1-1.407-1.407l-.435-2.435a1.74 1.74 0 0 0-.285-.688l-1.414-2.03a1.74 1.74 0 0 1 0-1.989l1.414-2.029a1.74 1.74 0 0 0 .285-.688l.435-2.435a1.74 1.74 0 0 1 1.407-1.407l2.435-.435a1.74 1.74 0 0 0 .688-.285l2.03-1.414a1.74 1.74 0 0 1 1.989 0l2.029 1.414.688.285zM11.875 8.84a4.21 4.21 0 1 0 0 8.42 4.21 4.21 0 0 0 0-8.42zm2.086 4.044l-.8.815.19 1.152c.063.386-.149.555-.487.37l-.989-.545-.988.544c-.332.183-.551.025-.486-.37l.188-1.15-.8-.816c-.268-.274-.192-.54.186-.598l1.106-.168.494-1.047c.166-.352.432-.359.601 0l.494 1.047 1.106.168c.37.057.46.319.185.598zm2.066-6.143h-2.65a.298.298 0 0 0-.291.217l-.817 1.504s1.75.098 2.782 1.027l1.22-2.298a.268.268 0 0 0 .062-.164c0-.158-.137-.286-.306-.286zM11.73 8.46l-.816-1.503a.298.298 0 0 0-.292-.217h-2.65c-.169 0-.306.128-.306.286a.27.27 0 0 0 .062.164l1.22 2.298c1.033-.929 2.782-1.027 2.782-1.027z"}))};i.defaultProps={name:"LabelProfessional"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12.3 3a9.3 9.3 0 1 1 0 18.6 9.3 9.3 0 0 1 0-18.6zM7.209 9.9v2.075a.729.729 0 0 1 .194 1.43l-.104.022-.09.006v1.055l.008.109c.037.248.2.461.43.562l.103.036 8.725 2.365.098.02a.733.733 0 0 0 .801-.535l.02-.095.006-.097v-1.96a.729.729 0 0 1-.099-1.452l.099-.007-.008-.11a.733.733 0 0 0-.444-.566l-.105-.034L7.71 10.47l-.106-.03c-.233-.078-.361-.207-.39-.436L7.21 9.9zm7.277 4.993a.729.729 0 1 1-.001 1.458.729.729 0 0 1 0-1.458zm-2.55-2.188a1.094 1.094 0 1 1-.002 2.187 1.094 1.094 0 0 1 .002-2.187zm-2.422-1.07a.6.6 0 1 1 0 1.2.6.6 0 0 1 0-1.2zM12.925 7.2l-.108-.116a1.663 1.663 0 0 0-1.813-.355l-.14.067L7.554 8.56l-.089.057c-.41.307-.332.987.136 1.183l.1.032 8.806 2.156.058.007a.22.22 0 0 0 .19-.32l-.03-.043-2.024-2.363a.723.723 0 0 1-.379.107.703.703 0 0 1-.712-.694c0-.144.045-.278.122-.389l.063-.079-.87-1.014z",fillRule:"evenodd"}))};i.defaultProps={name:"Cheese"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12.3 3a9.3 9.3 0 1 1 0 18.6 9.3 9.3 0 0 1 0-18.6zm4.5 15H7.2v.6h9.6V18zm-9.99-5.785l-.394 1.082c-.028.078.008.167.084.213l.04.02.678.247-.162.443 8.989 3.272.161-.444.678.247c.087.032.18.004.226-.063l.019-.036.393-1.082L6.81 12.215zm.25-.673l-.045.11 10.713 3.899c.326-.897-.162-1.906-1.097-2.311l-.119-.047-7.05-2.567c-.971-.353-2.02.056-2.403.916zm6.467-5.502l-1.462 4.895 2.255.821 2.026-4.69a1.5 1.5 0 1 0-2.82-1.026z",fillRule:"evenodd"}))};i.defaultProps={name:"Stamp"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M15.712 4.011l2.435.435a1.74 1.74 0 0 1 1.407 1.407l.435 2.435c.044.247.141.482.285.688l1.414 2.03a1.74 1.74 0 0 1 0 1.989l-1.414 2.029a1.74 1.74 0 0 0-.285.688l-.435 2.435a1.74 1.74 0 0 1-1.407 1.407l-2.435.435a1.74 1.74 0 0 0-.688.285l-2.03 1.414a1.74 1.74 0 0 1-1.989 0l-2.029-1.414a1.74 1.74 0 0 0-.688-.285l-2.435-.435a1.74 1.74 0 0 1-1.407-1.407l-.435-2.435a1.74 1.74 0 0 0-.285-.688l-1.414-2.03a1.74 1.74 0 0 1 0-1.989l1.414-2.029a1.74 1.74 0 0 0 .285-.688l.435-2.435a1.74 1.74 0 0 1 1.407-1.407l2.435-.435a1.74 1.74 0 0 0 .688-.285l2.03-1.414a1.74 1.74 0 0 1 1.989 0l2.029 1.414.688.285zM7.874 14.585l-.551 1.838a.204.204 0 0 0 .255.254l1.836-.55c.347-.105.662-.293.918-.548l4.46-4.462a.273.273 0 0 0 0-.385l-1.524-1.524a.273.273 0 0 0-.386 0l-4.46 4.461c-.256.256-.444.57-.548.916zm8.581-6.317l-.723-.723a.786.786 0 0 0-1.111 0l-.882.88a.262.262 0 0 0 0 .371l1.465 1.465a.262.262 0 0 0 .37 0l.881-.881a.786.786 0 0 0 0-1.112z",fillRule:"evenodd"}))};i.defaultProps={name:"BadgeWrite"},t.a=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(27),d=n(43),f=n(66),p=n(3),h=n.n(p),b=n(11),m=n.n(b),v=n(94),g=n.n(v),y=n(30),O=n(177),j=n(31),w=n(135),C=n(799),k=n(842),x=n(923),S=n(138),E=n(375),R=n(366),T=n(917),A=n(1482),N=n(34),_=n(365),I=n(372),M=n(1089),L=n(1024);function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var B=function(e,t){return e&&e.replace(new RegExp(null==t?void 0:t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),(function(e){return"<em>".concat(e,"</em>")}))},z=function(e){Object(a.a)(n,e);var t=P(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={mounted:!1},e.handleInvite=function(){var t=e.props,n=t.user.urlToken,r=t.onInvite;y.a.trackEvent(Object(f.a)(e),{id:3314}),r(n)},e.getContainer=function(){return document.querySelector(".Modal-content .QuestionInvitation-content")},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.contributionsCount,r=e.topic,o=e.isInvited,a=e.keyword,i=e.reason,c=t.name,l=Object.assign({},t,{name:Object(s.b)(I.a,{inline:!0,html:B(c,a)})}),u=Object(s.b)(L.a,{user:l,status:i||(n?Object(s.c)("div",{children:["在话题 ",Object(s.b)(M.a,{topic:r})," 下有 ",Object(s.c)(N.Link,{to:"/people/".concat(t.urlToken,"/answers/topic/").concat(r.id),children:[Object(_.formatNumber)(n)," 个回答"]})]}):Object(s.b)(I.a,{html:t.headline})),action:Object(s.b)(j.c,{color:o?void 0:"blue",disabled:o,onClick:this.handleInvite,children:o?"已邀请":"邀请回答"}),meta:null}),d={module:"UserItem",index:this.props.index,content:{member_hash_id:t.id},view:{id:a?4436:4437},extra:{search:{raw_query:a||""}},trackCardShow:!0};return this.state.mounted?Object(s.b)(R.a,Object.assign({getContainer:this.getContainer},d,{children:u})):u}}]),n}(l.Component),D=n(854),F=n(32);function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var V=function(e){Object(a.a)(n,e);var t=U(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleClick=function(){var t=e.props,n=t.questionId,r=t.closeAutoInvite,o=t.openAutoInvite;return"close"===t.item.status?(y.a.trackEvent(null,{id:3313}),o(n)):r(n)},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props.item,t=void 0===e?{}:e,n=t.avatar,r=t.description,o=t.status,a=t.title,i="close"===o;return Object(s.b)(D.e,{data:t,image:Object(s.b)(O.a,{size:38,url:n}),title:a,meta:Object(s.b)(D.d,{children:r}),className:"AutoInviteItem-wrapper--desktop",extra:Object(s.b)(j.c,{preset:"link",className:i?"AutoInviteItem-button--closed":"AutoInviteItem-button--open",onClick:this.handleClick,children:i?"开启邀请":"已开启"})})}}]),n}(l.Component);V.propTypes={questionId:h.a.number.isRequired,item:h.a.object};var q=Object(u.connect)(null,{openAutoInvite:F.S,closeAutoInvite:F.d})(V),H=n(1121);function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var Q=function(e){var t=e.user;return Object(s.b)("div",{className:"InviteeItem",children:Object(s.c)("div",{className:"InviteeItem-content",children:[Object(s.b)(O.a,{url:t.avatarUrl,size:32,className:"InviteeItem-image"}),Object(s.b)("h4",{className:"InviteeItem-title",children:t.name})]})})},W=function(e){Object(a.a)(n,e);var t=K(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={expanded:!1,keyword:null},e.onChange=g()((function(t){e.props.onChange(t)}),300),e.handleChange=function(t){var n=t.target.value;e.setState({keyword:n}),n&&e.onChange(n)},e.handleExpand=function(){y.a.trackEvent(Object(f.a)(e),{action:"LoadMore",element:"Button"}),e.setState({expanded:!0})},e.handleInvite=function(t){var n=e.state.keyword;return(0,e.props.onInvite)(t,n)},e}return Object(o.a)(n,[{key:"renderHeader",value:function(){var e=this.props,t=e.invitees,n=(e.expandCount,Object(s.b)(w.a,{className:"QuestionInvitation-input",placeholder:"搜索你想邀请的人",onChange:this.handleChange,after:Object(s.b)(C.a,{size:18,fill:"grey"}),"data-tooltip":"也可以搜索职业、公司等资料","data-tooltip-position":"bottom"})),r=[t.length?Object(s.c)("span",{children:["你已邀请 ",Object(s.b)(S.a,{toggler:Object(s.c)(j.c,{className:"Invitees-toggler",preset:"plain",children:[Object(s.b)("span",{className:"Invitees-togglerUsers",children:t.slice(0,2).map((function(e,t){return Object(s.c)("span",{children:[0===t?"":"、",Object(s.b)("span",{children:e.name})]},t)}))}),t.length>2&&" 等 ".concat(t.length," 人")]}),toggleEvent:"hover",targetClassName:"Invitees-popover",arrowed:!0,children:Object(s.b)("div",{className:"Invitees",children:t.map((function(e){return Object(s.b)(Q,{user:e},e.urlToken)}))})})]}):Object(s.b)("h2",{className:"QuestionInvitation-title",children:"你可以邀请下面用户,快速获得回答"}),n],o=Object(d.a)(r,2),a=o[0],i=o[1];return Object(s.b)(H.a,{header:a,options:i})}},{key:"render",value:function(){var e=this,t=this.props,n=t.isFetching,r=t.isDrained,o=t.items,a=t.searchItems,i=t.expandCount,c=t.autoInvitationItem,l=t.question,u=(l=void 0===l?{}:l).id,d=this.state,f=d.expanded,p=d.keyword,h=p?a:o,b=Boolean((void 0===i||i>0)&&!p&&h.length&&c&&c.status),v=b?i-1:i,g=!v||f,y=i?k.d:"div";return Object(s.c)(y,{className:"QuestionInvitation",children:[this.renderHeader(),n?Object(s.b)("div",{className:m()("QuestionInvitation-content","QuestionInvitation-content--centered"),children:Object(s.b)(E.a,{})}):Object(s.c)("div",{className:m()("QuestionInvitation-content",{"QuestionInvitation-content--centered":!h.length}),children:[h.length?Object(s.b)(R.a,{module:"UserList",children:Object(s.c)(x.b,{children:[b&&Object(s.b)(q,{questionId:u,item:c}),(g?h:h.slice(0,v)).map((function(t){return Object(s.b)(x.a,{className:m()({"List-item--mobile":!1}),children:Object(s.b)(z,Object.assign({},t,{keyword:p,onInvite:e.handleInvite}))},t.user.urlToken)}))]})}):Object(s.c)(T.k,{children:[Object(s.b)(T.f,{}),Object(s.b)("div",{children:r?"没有可以邀请的人":"没有找到你想邀请的人"})]}),h.length>v&&!g&&Object(s.b)(A.a,{onClick:this.handleExpand,children:"更多推荐结果"})]})]})}}]),n}(l.Component);W.propTypes={expandCount:h.a.number,items:h.a.array,searchItems:h.a.array,onInvite:h.a.func.isRequired};var G=Object(R.b)({module:"InvitationFrame"})(W),Y=n(102);function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var X=function(e){Object(a.a)(n,e);var t=Z(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).handleChange=function(t){var n=e.props,r=n.question.id;(0,n.loadItems)(r,"invitationCandidates",{keyword:t})},e.handleInvite=function(t,n){e.props.updateInvitation(e.props.question.id,t,n?"search":"normal")},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.question,n=t.id,r=t.status,o=(r=void 0===r?{}:r).isLocked,a=r.isClose,i=r.isEvaluate,c=r.isSuggest,s=e.loadItems,l=e.loadAutoInvitation;e.isDrained||o||a||i||c||(s(n,"invitationCandidates"),s(n,"invitees"),l(n))}},{key:"render",value:function(){var e=this.props.question.status,t=e.isLocked,n=e.isClose,r=e.isEvaluate,o=e.isSuggest;return t||n||r||o?null:Object(s.b)(G,Object.assign({onChange:this.handleChange,onInvite:this.handleInvite},this.props))}}]),n}(l.Component);t.a=Object(u.connect)((function(e,t){var n=t.question.id,r=e.entities,o=r.users,a=r.topics,i=e.question,c=i.invitationCandidates,s=i.invitees,l=i.autoInvitation,u=function(e){var t=e.member,n=e.isInvited,r=e.topicContributions,i=e.reason,c=r&&r.sort((function(e,t){return t.contributionsCount-e.contributionsCount}))[0]||{},s=c.topic,l=c.contributionsCount;return{user:o[t],topic:a[s],isInvited:n,contributionsCount:l,reason:i}},d=c[n]||{isFetching:!1,isDrained:!1,items:[],searchItems:[]},f=d.isFetching,p=d.isDrained,h=d.items,b=d.searchItems,m=(s[n]||{items:[]}).items;return{isFetching:f,isDrained:p,items:h.map(u),searchItems:b.map(u),invitees:m.map((function(e){return o[e]})),autoInvitationItem:l[n]}}),{loadItems:Y.O,updateInvitation:Y.jb,loadAutoInvitation:Y.D})(X)},,,,function(e,t,n){"use strict";var r=n(2),o=n(1),a=n.n(o),i=n(131),c=Object.assign;var s=function(e){return a.a.createElement(i.a,c({viewBox:"0 0 15 15"},e),a.a.createElement("g",{fill:"#ffab2e",fillRule:"evenodd"},a.a.createElement("path",{d:"M10.925 14.302c.173.13.408.13.58-.002a.514.514 0 00.175-.572l-1.323-4.296 3.435-2.456c.175-.13.25-.36.185-.572a.5.5 0 00-.468-.36H9.275L7.96 1.754c-.064-.21-.21-.354-.46-.354-.14 0-1.027 3.53-.988 6.32.04 2.788.98 3.85.98 3.85l3.433 2.732z"}),a.a.createElement("path",{d:"M7.5 1.4a.47.47 0 00-.474.354l-1.318 4.29H1.49a.499.499 0 00-.467.36.523.523 0 00.185.572l3.42 2.463-1.307 4.286c-.066.21.004.44.176.572.172.13.407.132.58.003l3.42-2.734L7.5 1.4z"})))},l=Object.assign;var u=function(e){return a.a.createElement(i.a,l({width:"15",height:"15",viewBox:"0 0 15 15"},e),a.a.createElement("g",{fillRule:"evenodd"},a.a.createElement("path",{fill:"#d7d8d9",d:"M10.925 14.302c.173.13.408.13.58-.002a.514.514 0 00.175-.572l-1.323-4.296 3.435-2.456c.175-.13.25-.36.185-.572a.5.5 0 00-.468-.36H9.275L7.96 1.754c-.064-.21-.21-.354-.46-.354-.14 0-1.027 3.53-.988 6.32.04 2.788.98 3.85.98 3.85l3.433 2.732z"}),a.a.createElement("path",{fill:"#ffab2e",d:"M7.5 1.4a.47.47 0 00-.474.354l-1.318 4.29H1.49a.499.499 0 00-.467.36.523.523 0 00.185.572l3.42 2.463-1.307 4.286c-.066.21.004.44.176.572.172.13.407.132.58.003l3.42-2.734L7.5 1.4z"})))},d=Object.assign;var f=function(e){return a.a.createElement(i.a,d({viewBox:"0 0 15 15"},e),a.a.createElement("g",{fill:"#d7d8d9",fillRule:"evenodd"},a.a.createElement("path",{d:"M10.925 14.302c.173.13.408.13.58-.002a.514.514 0 00.175-.572l-1.323-4.296 3.435-2.456c.175-.13.25-.36.185-.572a.5.5 0 00-.468-.36H9.275L7.96 1.754c-.064-.21-.21-.354-.46-.354-.14 0-1.027 3.53-.988 6.32.04 2.788.98 3.85.98 3.85l3.433 2.732z"}),a.a.createElement("path",{d:"M7.5 1.4a.47.47 0 00-.474.354l-1.318 4.29H1.49a.499.499 0 00-.467.36.523.523 0 00.185.572l3.42 2.463-1.307 4.286c-.066.21.004.44.176.572.172.13.407.132.58.003l3.42-2.734L7.5 1.4z"})))};t.a=function(e){var t=e.score;if(0===t)return null;var n=Math.round(2*t)/2;return Object(r.b)("div",{className:"Rating",children:Array.from({length:5}).map((function(e,t){var o=function(e,t){return t>=e+1?s:t>=e+.5?u:f}(t,n);return Object(r.b)(o,{size:15},t)}))})}},,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M9.676 11.252c-.243.433-.542.85-.494 1.237.189 1.509 2.938 1.807 3.746 2.816.59.736.835 1.852.892 3.725.01.303 0 .97-.867.97H1.933c-.915 0-.925-.643-.915-.936.062-1.877.292-3.02.895-3.76.812-.994 3.743-1.267 3.872-2.872.03-.361-.246-.74-.493-1.18C3.917 8.802 3.39 4 7.466 4s3.506 4.941 2.21 7.252zm8.073.79l.002.641c1.57 1.766 4.47 1.307 4.851 3.166.125.61.328 1.538.384 3.232.009.284.014.919-.905.919-.92 0-5.523-.021-6.875-.019 0-2.806-.144-5.987-2.707-6.285.537-.331 1.725-.504 2.178-1.013l.002-.64c-.881.118-2.679-.541-2.679-.541.61-.64.747-1.387 1.192-4.317.355-2.93 2.835-2.903 3.022-2.903.187 0 2.667-.027 3.028 2.903.439 2.93.577 3.677 1.186 4.317 0 0-1.797.659-2.68.54z",fillRule:"evenodd"}))};i.defaultProps={name:"Users"},t.a=i},,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M4 10V8a1 1 0 1 1 2 0v2h2a1 1 0 0 1 0 2H6v2a1 1 0 0 1-2 0v-2H2a1 1 0 0 1 0-2h2zm10.455 2c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm-7 6c0-2.66 4.845-4 7.272-4C17.155 14 22 15.34 22 18v1.375c0 .345-.28.625-.625.625H8.08a.625.625 0 0 1-.625-.625V18z",fillRule:"evenodd"}))};i.defaultProps={name:"Invite"},t.a=i},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(4),o=n(1059),a=n(365),i=function(e){return{name:"description",property:"og:description",content:e}},c=function(e,t){var n=[];if(e&&e.content){var r=Object(o.c)(e.content,100);r&&n.push(i(r))}if(t){var a=t.map((function(e){return e.name})).join(",");a&&n.push({name:"keywords",content:a})}return n},s=function(e,t){var n=[];if(e&&e.detail){var a=Object(o.c)(e.detail,100);a&&n.push(i(a))}else t&&t.content&&n.push.apply(n,Object(r.a)(c(t)));if(e.topics){var s=e.topics.map((function(e){return e.name})).join(",");if(s){var l={name:"keywords",content:s};n.push(l)}}return n},l=function(e){if(e){var t=e.headline,n=void 0===t?"":t,r=e.answerCount,o=void 0===r?0:r,c=e.voteupCount,s=void 0===c?0:c,l="".concat(n," 回答数 ").concat(Object(a.formatNumber)(o),",获得 ").concat(Object(a.formatNumber)(s)," 次赞同");return[i(l)]}return[]}},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("g",{fillRule:"evenodd"},o.a.createElement("path",{d:"M4.125 21h15.75c.621 0 1.125-.593 1.125-1.324 0-.73-.504-1.323-1.125-1.323H4.125c-.621 0-1.125.593-1.125 1.323C3 20.407 3.504 21 4.125 21z"}),o.a.createElement("path",{d:"M15.69 3.826c0-.457-.418-.826-.92-.826H9.23c-.508 0-.92.37-.92.827V9.64H5.538c-1.015 0-1.255.526-.533 1.175l6.344 5.709a1 1 0 0 0 1.302 0l6.344-5.71c.722-.648.483-1.175-.535-1.175h-2.77V3.826z",fillRule:"nonzero"})))};i.defaultProps={name:"StickyUnset"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("g",{fillRule:"evenodd"},o.a.createElement("path",{d:"M4.125 3h15.75C20.496 3 21 3.593 21 4.324c0 .73-.504 1.323-1.125 1.323H4.125C3.504 5.647 3 5.054 3 4.324 3 3.593 3.504 3 4.125 3z"}),o.a.createElement("path",{d:"M15.69 20.174c0 .457-.418.826-.92.826H9.23c-.508 0-.92-.37-.92-.827V14.36H5.538c-1.015 0-1.255-.526-.533-1.175l6.344-5.709a1 1 0 0 1 1.302 0l6.344 5.71c.722.648.483 1.175-.535 1.175h-2.77v5.813z",fillRule:"nonzero"})))};i.defaultProps={name:"StickySet"},t.a=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M5.74 4h12.52c.961 0 1.74.775 1.74 1.73V16.27c0 .955-.779 1.73-1.74 1.73h-3.825l-1.658 2.044a1 1 0 0 1-1.554 0l-1.658-2.044H5.74C4.78 18 4 17.224 4 16.27V5.73C4 4.775 4.778 4 5.74 4zM7 8.98c0 .554.449.996 1.003.996h4.994A.992.992 0 0 0 14 8.981a.997.997 0 0 0-1.003-.995H8.003A.992.992 0 0 0 7 8.98zm0 4c0 .554.446.996.995.996h8.01a.993.993 0 0 0 .995-.995.993.993 0 0 0-.995-.995h-8.01A.993.993 0 0 0 7 12.98z",fillRule:"evenodd"}))};i.defaultProps={name:"Community"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M13.693 10.354l1.634-7.542c.195-.901-.16-1.083-.798-.39l-9.18 9.97c-.638.693-.377 1.254.582 1.254h5.376l-1.634 7.542c-.195.901.16 1.083.798.39l9.18-9.97c.638-.693.377-1.254-.582-1.254h-5.376z"}))};i.defaultProps={name:"Live"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M16 17.649V2.931a.921.921 0 0 0-.045-.283.943.943 0 0 0-1.182-.604L4.655 5.235A.932.932 0 0 0 4 6.122v14.947c0 .514.421.931.941.931H19.06c.52 0 .941-.417.941-.93V7.292a.936.936 0 0 0-.941-.931h-.773v12.834a.934.934 0 0 1-.83.924L6.464 21.416c-.02.002 2.94-.958 8.883-2.881a.932.932 0 0 0 .653-.886z",fillRule:"evenodd"}))};i.defaultProps={name:"Ebook"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M11.267 10.188h-2.69a.26.26 0 0 0-.261.26v.508c0 .149.117.26.262.26h2.896v1.54H8.578a.26.26 0 0 0-.262.259v.508c0 .15.117.26.262.26h2.896v2.31c0 .139.119.257.265.257h.522a.258.258 0 0 0 .265-.257v-2.31h2.896a.26.26 0 0 0 .262-.26v-.508a.257.257 0 0 0-.262-.26h-2.896v-1.54h2.896a.26.26 0 0 0 .262-.26v-.507a.257.257 0 0 0-.262-.26h-2.69l2.51-2.636a.26.26 0 0 0-.004-.366l-.423-.413a.253.253 0 0 0-.36.01L12 9.418 9.545 6.784a.248.248 0 0 0-.36-.011l-.423.413a.264.264 0 0 0-.004.366l2.509 2.636zM12 19.973c-1.101 0-2.16-.15-3.152-.43-.532.18-5.27 2.177-4.743 1.179.527-.998 1.58-2.746.806-3.25C3.11 15.936 2 13.822 2 11.486 2 6.8 6.477 3 12 3s10 3.8 10 8.487-4.477 8.486-10 8.486z"}))};i.defaultProps={name:"Infinity"},t.a=i},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M21 9.749v9.91c0 .74-.604 1.341-1.35 1.341H4.35C3.604 21 3 20.4 3 19.659V9.319c0-.503.283-.963.733-1.193l4.892-2.5V3.341c0-.74.604-1.341 1.35-1.341.267 0 .527.078.749.225l9.675 6.408c.375.249.601.668.601 1.116zM8.297 8.307L5.372 9.802A.223.223 0 0 0 5.25 10v8.54c0 .124.1.224.225.224h8.586a.223.223 0 1 0 .124-.41l-4.959-3.259a1.339 1.339 0 0 1-.601-1.116V8.506a.224.224 0 0 0-.328-.199z"}))};i.defaultProps={name:"KnowledgeBase"},t.a=i},,,,,,,,,,function(e,t,n){"use strict";var r=a(n(1755)),o=a(n(1549));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={TransitionGroup:o.default,CSSTransitionGroup:r.default}},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=l(n(1)),a=l(n(3)),i=l(n(1549)),c=l(n(1759)),s=n(1551);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}s.nameShape.isRequired,a.default.bool,a.default.bool,a.default.bool,(0,s.transitionTimeout)("Appear"),(0,s.transitionTimeout)("Enter"),(0,s.transitionTimeout)("Leave");var f=function(e){function t(){var n,r;u(this,t);for(var a=arguments.length,i=Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=r=d(this,e.call.apply(e,[this].concat(i))),r._wrapChild=function(e){return o.default.createElement(c.default,{name:r.props.transitionName,appear:r.props.transitionAppear,enter:r.props.transitionEnter,leave:r.props.transitionLeave,appearTimeout:r.props.transitionAppearTimeout,enterTimeout:r.props.transitionEnterTimeout,leaveTimeout:r.props.transitionLeaveTimeout},e)},d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return o.default.createElement(i.default,r({},this.props,{childFactory:this._wrapChild}))},t}(o.default.Component);f.displayName="CSSTransitionGroup",f.propTypes={},f.defaultProps={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},t.default=f,e.exports=t.default},function(e,t){e.exports=function(){for(var e=arguments.length,t=[],n=0;n<e;n++)t[n]=arguments[n];if(0!==(t=t.filter((function(e){return null!=e}))).length)return 1===t.length?t[0]:t.reduce((function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}))}},function(e,t,n){e.exports=n(58)(27)},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=function(e){if(!e)return e;var t={};return r.Children.map(e,(function(e){return e})).forEach((function(e){t[e.key]=e})),t},t.mergeChildMappings=function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var a in e)t.hasOwnProperty(a)?o.length&&(r[a]=o,o=[]):o.push(a);var i=void 0,c={};for(var s in t){if(r.hasOwnProperty(s))for(i=0;i<r[s].length;i++){var l=r[s][i];c[r[s][i]]=n(l)}c[s]=n(s)}for(i=0;i<o.length;i++)c[o[i]]=n(o[i]);return c};var r=n(1)},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=f(n(1359)),a=f(n(1361)),i=f(n(1760)),c=n(1761),s=f(n(1)),l=f(n(3)),u=n(39),d=n(1551);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=[];c.transitionEnd&&b.push(c.transitionEnd),c.animationEnd&&b.push(c.animationEnd);l.default.node,d.nameShape.isRequired,l.default.bool,l.default.bool,l.default.bool,l.default.number,l.default.number,l.default.number;var m=function(e){function t(){var n,r;p(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=h(this,e.call.apply(e,[this].concat(a))),r.componentWillAppear=function(e){r.props.appear?r.transition("appear",e,r.props.appearTimeout):e()},r.componentWillEnter=function(e){r.props.enter?r.transition("enter",e,r.props.enterTimeout):e()},r.componentWillLeave=function(e){r.props.leave?r.transition("leave",e,r.props.leaveTimeout):e()},h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach((function(e){clearTimeout(e)})),this.classNameAndNodeQueue.length=0},t.prototype.transition=function(e,t,n){var r=(0,u.findDOMNode)(this);if(r){var i=this.props.name[e]||this.props.name+"-"+e,s=this.props.name[e+"Active"]||i+"-active",l=null,d=void 0;(0,o.default)(r,i),this.queueClassAndNode(s,r);var f=function(e){e&&e.target!==r||(clearTimeout(l),d&&d(),(0,a.default)(r,i),(0,a.default)(r,s),d&&d(),t&&t())};n?(l=setTimeout(f,n),this.transitionTimeouts.push(l)):c.transitionEnd&&(d=function(e,t){return b.length?b.forEach((function(n){return e.addEventListener(n,t,!1)})):setTimeout(t,0),function(){b.length&&b.forEach((function(n){return e.removeEventListener(n,t,!1)}))}}(r,f))}else t&&t()},t.prototype.queueClassAndNode=function(e,t){var n=this;this.classNameAndNodeQueue.push({className:e,node:t}),this.rafHandle||(this.rafHandle=(0,i.default)((function(){return n.flushClassNameAndNodeQueue()})))},t.prototype.flushClassNameAndNodeQueue=function(){this.unmounted||this.classNameAndNodeQueue.forEach((function(e){e.node.scrollTop,(0,o.default)(e.node,e.className)})),this.classNameAndNodeQueue.length=0,this.rafHandle=null},t.prototype.render=function(){var e=r({},this.props);return delete e.name,delete e.appear,delete e.enter,delete e.leave,delete e.appearTimeout,delete e.enterTimeout,delete e.leaveTimeout,delete e.children,s.default.cloneElement(s.default.Children.only(this.props.children),e)},t}(s.default.Component);m.displayName="CSSTransitionGroupChild",m.propTypes={},t.default=m,e.exports=t.default},function(e,t,n){"use strict";var r=n(125);t.__esModule=!0,t.default=void 0;var o,a=r(n(1550)),i="clearTimeout",c=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-l)),r=setTimeout(e,n);return l=t,r},s=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};a.default&&["","webkit","moz","o","ms"].some((function(e){var t=s(e,"request");if(t in window)return i=s(e,"cancel"),c=function(e){return window[t](e)}}));var l=(new Date).getTime();(o=function(e){return c(e)}).cancel=function(e){window[i]&&"function"==typeof window[i]&&window[i](e)};var u=o;t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(125);t.__esModule=!0,t.default=t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var o,a,i,c,s,l,u,d,f,p,h,b=r(n(1550)),m="transform";if(t.transform=m,t.animationEnd=i,t.transitionEnd=a,t.transitionDelay=u,t.transitionTiming=l,t.transitionDuration=s,t.transitionProperty=c,t.animationDelay=h,t.animationTiming=p,t.animationDuration=f,t.animationName=d,b.default){var v=function(){for(var e,t,n=document.createElement("div").style,r={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},o=Object.keys(r),a="",i=0;i<o.length;i++){var c=o[i];if(c+"TransitionProperty"in n){a="-"+c.toLowerCase(),e=r[c]("TransitionEnd"),t=r[c]("AnimationEnd");break}}!e&&"transitionProperty"in n&&(e="transitionend");!t&&"animationName"in n&&(t="animationend");return n=null,{animationEnd:t,transitionEnd:e,prefix:a}}();o=v.prefix,t.transitionEnd=a=v.transitionEnd,t.animationEnd=i=v.animationEnd,t.transform=m=o+"-"+m,t.transitionProperty=c=o+"-transition-property",t.transitionDuration=s=o+"-transition-duration",t.transitionDelay=u=o+"-transition-delay",t.transitionTiming=l=o+"-transition-timing-function",t.animationName=d=o+"-animation-name",t.animationDuration=f=o+"-animation-duration",t.animationTiming=p=o+"-animation-delay",t.animationDelay=h=o+"-animation-timing-function"}var g={transform:m,end:a,property:c,timing:l,delay:u,duration:s};t.default=g},,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return Oe}));var r=n(2),o=n(158),a=n(424),i=n(0),c=n(43),s=n(1),l=n(3),u=n.n(l),d=n(27),f=n(31),p=n(73),h=n(36),b=n(102),m=n(25),v=n(417),g=[{value:"标点或格式错误",text:"标点或格式错误"},{value:"不构成提问",text:"不构成提问"},{value:"包含主观判断",text:"包含主观判断"},{value:"缺乏可信来源",text:"缺乏可信来源"},{value:"other",text:"其他"}],y=[{title:"为什么修改问题?",subtitle:"请选择修改理由"},{title:"修改问题",subtitle:"描述精确的问题更易得到解答"},{title:"其他",subtitle:"请对你的举报补充说明"}],O=u.a.shape({level:u.a.oneOf(["error","warning"]),text:u.a.string}),j=n(384),w=n.n(j),C="form.setInput",k="form.setState",x="form.setErrors",S="ui.setState",E="reset",R={step:0,title:"",detail:{toHTML:function(){return""}},topics:[],reason:g[0].value,otherReason:"",onceChanged:!1,videoQuestionConfirmShown:!1,videoQuestionConfirmAllowContinue:!1,videoQuestionConfirmTitle:"",videoQuestionConfirmText:"",uploadModalShown:!1,errors:{title:null,detail:null,reason:null,topics:null}};function T(e,t){var n=t.type,r=t.payload;switch(n){case C:var o,a=Object(c.a)(r,2),s=a[0],l=a[1];return Object.assign({},e,(o={},Object(i.a)(o,s,l),Object(i.a)(o,"onceChanged",function(e,t){var n=Object(c.a)(t,2),r=n[0],o=n[1];if(e.onceChanged)return!0;var a=e[r];return"reason"===r?1===e.step&&e.reason===o:"topics"===r?!w()(o,a):a!==o}(e,r)),o));case k:return Object.assign({},e,r);case x:return Object.assign({},e,{errors:Object.assign({},e.errors,r)});case S:var u=Object(c.a)(r,2),d=u[0],f=u[1];return Object.assign({},e,Object(i.a)({},d,f));case E:return Object.assign({},R);default:return e}}var A=function(e,t){var n=Object(s.useRef)();Object(s.useEffect)((function(){n.current=t}));var r=Object(s.useState)(e),o=Object(c.a)(r,2),a=o[0],i=o[1];return Object(s.useEffect)((function(){e!==a&&(n.current([e,a]),i(e))}),[e,a]),null},N=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.errors;if(!t||"title"===t){var o=e.title,a=null;0!==o.length||n?o.length>51?a={level:"error",text:"问题标题超出 ".concat(o.length-51," 个字")}:o.length>0&&o.length<3?a={level:"error",text:"问题字数太少了吧"}:o.length>0&&-1===o.indexOf("?")&&-1===o.indexOf("")?a={level:"error",text:"你还没有给问题添加问号"}:(o.match(/(\?|)/g)||[]).length>1&&(a={level:"warning",text:"多个问题建议拆分"}):a={level:"error",text:"问题标题不能为空"},r=Object.assign({},r,{title:a})}if(!t||"reason"===t){var i=e.reason,c=e.otherReason,s=null;i&&("other"!==i||c)||(s={level:"error",text:i?"必填":"必选"}),r=Object.assign({},r,{reason:s})}if((!t||"topics"===t)&&e.topics){var l=e.topics,u=null;0!==l.length||n||(u={level:"error",text:"至少添加一个话题"}),r=Object.assign({},r,{topics:u})}return r},_=n(835),I=n(154),M=function(e){var t=e.onSelect,n=Object(I.b)();return Object(r.b)("div",{children:g.map((function(e){return Object(r.c)("div",{css:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",lineHeight:"48px",boxShadow:"inset 0 -1px 0 0 ".concat(n.colors.GBK10A),"&:last-child":{marginBottom:"16px"}},onClick:function(){return t(e.value)},children:[e.text,Object(r.b)(_.a,{css:{fill:n.colors.GBL05A}})]},e.value)}))})};M.propTypes={onSelect:u.a.func.isRequired};var L=M,P=function(e){var t=e.title,n=e.text,o=e.shown,a=e.allowConfirm,i=void 0===a||a,c=e.onSubmit,s=e.onClose,l=e.buttonText,u=void 0===l?{}:l;return Object(r.b)(p.b,{title:t,onClose:s,children:o&&Object(r.c)("div",{color:"GBK03A",css:{margin:"50px 16px 0",fontSize:"20px",textAlign:"center"},children:[n,Object(r.c)(p.a,{children:[i&&Object(r.b)(f.c,{preset:"primary",color:"blue",onClick:c,children:u.ok||"确认"}),Object(r.b)(f.c,{onClick:s,children:u.cancel||"取消"})]})]})})};P.propTypes={title:u.a.string,text:u.a.string,shown:u.a.bool,allowConfirm:u.a.bool,onSubmit:u.a.func.isRequired,onClose:u.a.func.isRequired,buttonText:u.a.shape({ok:u.a.string,cancel:u.a.string})};var B=P,z=n(90),D=n(135),F=n(35),U=function(e){var t=e.children,n=e.css,o=Object(F.a)(e,["children","css"]);return Object(r.b)(z.Flex,Object.assign({alignItems:"center",mb:"8px",color:"GBL05A",css:n},o,{children:t}))},V=function(e){var t=e.children,n=e.css,o=Object(F.a)(e,["children","css"]);return Object(r.b)(z.Box,Object.assign({ml:"auto",css:n},o,{children:t}))},q=function(e){var t=e.children,n=e.css,o=Object(F.a)(e,["children","css"]);return Object(r.b)(z.Text,Object.assign({as:"span",color:"GBK03A",css:n},o,{children:t}))},H=function(e){var t=e.before,n=e.after,o=e.headerLabel,a=e.headerRight,i=e.children,c=Object(F.a)(e,["before","after","headerLabel","headerRight","children"]),s=o||a;return Object(r.c)(z.Box,Object.assign({mb:"12px",css:{"& .Popover":{display:"block"},"& .TagInput":{lineHeight:0}}},c,{children:[t,s&&Object(r.c)(U,{children:[o&&Object(r.b)(q,{children:o}),a&&Object(r.b)(V,{children:a})]}),i,n]}))};H.Header=U,H.HeaderLabel=q,H.HeaderRight=V;var K=H,Q={warning:"GYL01A",error:"GRD03A"},W=function(e){var t=e.children,n=e.level,o=Object(F.a)(e,["children","level"]);return Object(r.b)(z.Text,Object.assign({as:"span",color:Q[n]},o,{children:t}))},G=function(e){return Object(r.b)(a.a,{message:"一个未知的错误信息 ".concat(typeof e.children),children:Object(r.b)(W,Object.assign({},e))})},Y=W,Z=function(e){var t=e.onInputRef,n=e.title,o=e.onChange,a=e.onBlur,i=e.titleError,l=e.before,u=e.after,d=Object(s.useState)(!1),f=Object(c.a)(d,2),p=f[0],h=f[1],b=null;if(p){var m=51-n.length;m>=0?m<10&&(b="还可以输入 ".concat(m," 个字")):b=Object(r.c)(Y,{level:"error",children:["问题标题超出 ",-m," 个字"]})}else i&&(b=Object(r.b)(Y,{level:i.level,children:i.text}));var v=Object(s.useCallback)((function(e){h(!0),o&&o(e)}),[o]),g=Object(s.useCallback)((function(e){h(!1),a&&a(e)}),[a]),y=Object(s.useRef)();return Object(s.useEffect)((function(){setTimeout((function(){var e;return null===(e=y.current)||void 0===e?void 0:e.focus()}),60)}),[]),Object(r.c)(r.a,{children:[Object(r.b)(K,{children:Object(r.c)(z.Flex,{children:[l,Object(r.b)(D.a,{css:{border:"0 none",fontSize:"15px"},onRef:function(e){y.current=e,t(e)},required:!0,multiline:!0,spread:!0,large:!0,rows:2,placeholder:"问题标题",value:n,onChange:v,onBlur:g}),u]})}),b&&Object(r.b)(K,{headerRight:b})]})};Z.propTypes={onInputRef:u.a.func,title:u.a.string,titleError:O,onChange:u.a.func,onBlur:u.a.func};var X=Z,J=n(832),$=n(833),ee=n(829),te=n(250),ne=n(425),re=n(416),oe=function(e){var t=e.onEditableRef,n=e.defaultValue,o=e.onChange,a=e.detailError,i=e.isAnonymous,l=Object(d.useDispatch)(),u=Object(s.useCallback)((function(){return l(m.h.apply(void 0,arguments))}),[l]),f=Object(s.useRef)(),p=Object(s.useState)(!1),h=Object(c.a)(p,2),b=h[0],v=h[1],g=Object(s.useCallback)((function(){f.current&&f.current.handleKeyCommand("insert-image")}),[]),y=Object(s.useCallback)((function(){f.current&&f.current.handleKeyCommand("insert-video")}),[]),O=Object(s.useCallback)((function(e,t){Object(ne.b)(e,t,u,m.c)}),[u]),j=Object(s.useCallback)((function(e,t){switch(t){case"video":O("video-upload-error");break;case"image":O("image-upload-error",e)}}),[O]);return Object(r.c)(r.a,{children:[Object(r.b)(K,{mb:"16px",headerLabel:"问题描述(可选):",headerRight:Object(r.c)(r.a,{children:[Object(r.b)(te.a,{label:"".concat(b?"收起":"展开","工具栏"),isActive:b,icon:J.a,onClick:function(){return v(!b)}}),Object(r.b)(te.a,{label:"插入图片",icon:$.a,onClick:g}),Object(r.b)(te.a,{label:"上传视频",icon:ee.a,onClick:y})]}),marginTop:"24px",children:Object(r.b)(re.a,{ref:function(e){f.current=e,t&&t(e)},allowDragAndDrop:!0,allowLinkCard:!0,minRows:2,allowToolbar:b,allowVideoTitleChange:!0,allowHeaderThree:!1,placeholder:"问题背景、条件等详细信息",defaultValue:n,onError:O,onUploadError:j,onChange:o,onBeforeVideoUpload:function(){return!i},editingContentType:"question"})}),a&&Object(r.b)(K,{headerRight:Object(r.b)(Y,{level:a.level,children:a.text})})]})};oe.propTypes={onEditableRef:u.a.func,defaultValue:u.a.string,detailError:O,onChange:u.a.func.isRequired,isAnonymous:u.a.bool};var ae=oe,ie=n(440),ce=n(396),se=function(e){var t=e.topic;return Object(r.b)(ie.a,{css:{marginRight:"8px"},children:Object(r.b)("a",{target:"_blank",rel:"noopener noreferrer",href:"//www.zhihu.com/topic/".concat(t.id||t.urlToken),children:t.name})})};function le(e){var t=e.topics,n=void 0===t?[]:t,o=e.onChange,a=e.permitEditTopics,i=Object(s.useState)(null),l=Object(c.a)(i,2),u=l[0],d=l[1],f=Object(s.useState)(n),p=Object(c.a)(f,2),h=p[0],b=p[1],m=Object(s.useState)(!1),v=Object(c.a)(m,2),g=v[0],y=v[1],O=Object(s.useCallback)((function(e){var t;b(e);var n=null===(t=N({topics:e},"topics"))||void 0===t?void 0:t.topics;d(n),o&&o(e,n)}),[o]);return Object(r.c)(K,{mb:"24px",children:[u&&Object(r.b)(Y,{as:"div",level:u.level,children:u.text}),a?Object(r.b)(ce.a,{actived:g,value:h,onChange:O,onToggleActived:function(){return y(!g)}}):h.map((function(e){return Object(r.b)(se,{topic:e},e.name)}))]})}le.propTypes={topics:u.a.arrayOf(u.a.object),onChange:u.a.func,permitEditTopics:u.a.bool};var ue=le,de=n(34),fe=n(178),pe=function(e){var t=e.onInputRef,n=e.questionType,o=e.reason,a=e.otherReason,i=e.onReasonChange,c=e.onInputChange,s=e.reasonError,l=Object(I.b)(),u=Boolean(!o&&s),d=Boolean("other"===o&&!a&&s);return Object(r.b)("div",{className:"EditQuestionReasonInput",children:Object(r.b)(K,{mb:"0",before:Object(r.c)(K.Header,{mb:"0",children:[Object(r.b)(fe.b,{css:{marginRight:"8px"},needsReposition:!0,plain:!0,text:o?null:"请选择一个修改理由",value:o,onChange:i,children:g.map((function(e){return Object(r.b)(fe.a,{value:e.value,text:e.text},e.value)}))}),u&&Object(r.b)(Y,{level:s.level,children:s.text}),!["org","commercial"].includes(n)&&Object(r.b)(K.HeaderRight,{children:Object(r.b)(de.Link,{className:"EditQuestion-whyEdit",target:"blank",to:"/question/19550238/answer/95068125",children:"为什么问题可以被公共编辑?"})})]}),children:"other"===o&&Object(r.b)(z.Box,{css:d&&{"& input::placeholder":{color:l.colors.GRD03A}},children:Object(r.b)(D.a,{onRef:t,spread:!0,large:!0,value:a,placeholder:"请输入修改理由(必填)",onChange:c})})})})};pe.propTypes={onInputRef:u.a.func,questionType:u.a.string.isRequired,reason:u.a.string,otherReason:u.a.string,reasonError:O,onReasonChange:u.a.func,onInputChange:u.a.func};var he=pe;function be(e){if(!e)return"提交修改时发生未知错误";if("string"==typeof e)return e;var t=e.status,n=e.message,r=e.name;return n?["Network request failed","Failed to fetch"].some((function(e){return n.indexOf(e)>-1}))?"提交修改时发生网络请求错误":n.startsWith("request http")?"提交修改时发生错误".concat(t?""+t:""):"提交修改时发生错误:".concat(n):"提交修改时发生错误:".concat(r||"Unknown")}function me(e){var t=e.onSuccess,n=e.onFailure,r=Object(d.useSelector)((function(e){var t=e.notification;return t[m.c]||t.updateQuestion}));return Object(s.useEffect)((function(){if(r){var e=r.id,o=r.code,a=r.text;e?t(e):n(function(e,t){switch(e){case 103003:return["title",{level:"error",text:"已经存在的问题"}];case 103001:return["detail",{level:"error",text:"过长的补充说明"}];default:return["overall",{text:be(t)}]}}(o,a))}}),[r]),null}me.propTypes={onSuccess:u.a.func.isRequired,onFailure:u.a.func.isRequired};var ve=function(e){return["title","reason","topics"].find((function(t){var n;return"error"===(null===(n=e[t])||void 0===n?void 0:n.level)}))};function ge(e){var t=e.onClose,n=e.show,o=e.id,a=e.title,l=e.detail,u=e.topics,g=e.questionType,O=e.isAnonymous,j=e.brand,w=e.permitEditTopics,_=Object(d.useSelector)(h.b),I=Object(d.useDispatch)(),M=Object(s.useCallback)((function(){return I(m.h.apply(void 0,arguments))}),[I]),P=Object(s.useRef)({titleInput:null,editable:null,reasonInput:null}),z=function(e){var t;if("title"===e)null===(t=P.current.titleInput)||void 0===t||t.focus();else if("reason"===e){var n;null===(n=P.current.reasonInput)||void 0===n||n.focus()}},D=Object(s.useReducer)(T,Object.assign({},R,{title:a,detail:l,topics:u})),F=Object(c.a)(D,2),U=F[0],V=F[1],q=U.step,H=U.title,K=U.reason,Q=U.otherReason,W=U.onceChanged,Y=U.uploadModalShown,Z=U.videoQuestionConfirmShown,J=U.videoQuestionConfirmAllowContinue,$=U.videoQuestionConfirmTitle,ee=U.videoQuestionConfirmText,te=U.errors,ne=te.title,re=te.detail,oe=te.reason,ie=te.overall;A(n,(function(e){Object(c.a)(e,1)[0]&&V({type:k,payload:{title:a,detail:{toHTML:function(){return l}},topics:u,onceChanged:!1}})}));var ce=Object(s.useCallback)((function(){V({type:E}),M("问题修改成功!"),t()}),[M,t]),se=Object(s.useCallback)((function(e){var t=Object(c.a)(e,2),n=t[0],r=t[1];V({type:x,payload:Object(i.a)({},n,r)}),z(n)}),[]),le=Object(s.useMemo)((function(){return ve(te)}),[te]),de=Object(s.useCallback)((function(e){var t=e.target.value;V({type:C,payload:["title",t]})}),[]),fe=Object(s.useCallback)((function(){V({type:x,payload:N({title:H},"title")})}),[H]),pe=Object(s.useCallback)((function(e){V({type:C,payload:["detail",e]})}),[]),be=Object(s.useCallback)((function(e,t){V({type:C,payload:["topics",e]}),V({type:x,payload:{topics:t}})}),[]),ge=Object(s.useCallback)((function(e){V({type:k,payload:{reason:e,step:1}}),"other"===e&&setTimeout((function(){return z("reason")}))}),[]),ye=Object(s.useCallback)((function(e){var t=e.target.value;V({type:C,payload:["otherReason",t]}),"reason"===le&&t&&V({type:x,payload:{reason:null}})}),[le]),Oe=Object(s.useCallback)((function(){var e;(null===(e=P.current.editable)||void 0===e?void 0:e.hasVideo("upload"))?V({type:S,payload:["uploadModalShown",!0]}):t()}),[t]),je=function(){var e=U.title,t=U.detail,n=U.topics,r=U.reason,a=U.otherReason,i={question:{title:e},meta:{reason:"other"===r?a:r}},c=t.toHTML();c!==l&&(i.question.detail=c),n!==u&&(i.question.topicUrlTokens=n.map((function(e){return e.urlToken||e.id}))),Object.keys(i.question).length>0&&I(Object(b.lb)(o,i))},we=function(){V({type:S,payload:["videoQuestionConfirmShown",!1]})},Ce=function(){V({type:S,payload:["uploadModalShown",!1]})},ke=Object(s.useCallback)((function(){Ce(),t()}),[t]),xe=Boolean(!W||le),Se=0===q,Ee=Se?y[0]:{css:{width:"595px","& .Modal-content":{paddingBottom:ie?0:"32px"}}};return Object(r.c)(r.a,{children:[Object(r.b)(me,{onSuccess:ce,onFailure:se}),Object(r.b)(p.b,Object.assign({footer:ie&&Object(r.b)(G,{level:"error",children:ie.text}),onClose:Oe,hotKeyClosable:!1,maskClosable:!1},Ee,{children:n&&(Se?Object(r.b)(L,{onSelect:ge}):Object(r.c)("div",{className:"QuestionAsk",children:[Object(r.b)(B,{title:$,text:ee,shown:Z,allowConfirm:J,onSubmit:function(){we(),je()},onClose:we,buttonText:{ok:"发布",cancel:"继续编辑"}}),Object(r.b)(B,{text:"关闭弹窗将丢失上传中的视频内容",shown:Y,onSubmit:ke,onClose:Ce}),Object(r.c)("form",{onSubmit:function(e){return e.preventDefault()},noValidate:!0,children:[Object(r.b)(X,{onInputRef:function(e){return P.current.titleInput=e},title:H,onChange:de,onBlur:fe,titleError:ne,before:Object(r.b)(v.a,{isAnonymous:O,questionType:g,brand:j,css:{flexShrink:0,marginTop:"3px",marginRight:"16px"}})}),Object(r.b)(ae,{onEditableRef:function(e){return P.current.editable=e},defaultValue:l,onChange:pe,detailError:re,isAnonymous:O}),Object(r.b)(ue,{topics:u,onChange:be,permitEditTopics:w}),Object(r.b)(he,{onInputRef:function(e){return P.current.reasonInput=e},questionType:g,reason:K,otherReason:Q,reasonError:oe,onReasonChange:ge,onInputChange:ye}),Object(r.b)(p.a,{css:{marginTop:ie?"16px":"25px"},children:Object(r.b)(f.c,{preset:"primary",color:"blue",disabled:xe,onClick:function(){var e=N(U);V({type:x,payload:e});var t=ve(e);if(t)z(t);else{var n=P.current.editable;if(!function(e,t){return e.hasVideo("upload")?(t("请等待视频上传完成后发布","red",m.c),!0):!!e.hasImage("upload")&&(t("请等待图片上传完成后发布","red",m.c),!0)}(n,M)){var r=function(e,t){return e.hasVideo()&&!t.isOrg?{videoQuestionConfirmShown:!0,videoQuestionConfirmAllowContinue:!0,videoQuestionConfirmText:"包含视频的编辑将在审核完成后生效,是否继续?"}:e.hasImage("error")||e.hasVideo("error")&&!e.hasVideo("error-review")?{videoQuestionConfirmShown:!0,videoQuestionConfirmAllowContinue:!1,videoQuestionConfirmTitle:"上传失败",videoQuestionConfirmText:"草稿中含有上传失败的内容,请更改后重新提交"}:e.hasVideo("error-review")||e.hasVideo("censor")?{videoQuestionConfirmShown:!0,videoQuestionConfirmAllowContinue:!1,videoQuestionConfirmTitle:"视频未通过审核",videoQuestionConfirmText:"视频中包含未通过审核的信息,请更改后重新提交"}:null}(n,_);r?V({type:k,payload:r}):je()}}},children:"提交修改"})})]})]}))}))]})}ge.propTypes={id:u.a.number,title:u.a.string,detail:u.a.string,topics:u.a.arrayOf(u.a.object),show:u.a.bool,onClose:u.a.func,isAnonymous:u.a.bool,brand:u.a.object,permitEditTopics:u.a.bool},ge.defaultProps={onClose:function(){}};var ye=ge;function Oe(e){return Object(r.b)(o.a,{children:Object(r.b)(a.a,{children:Object(r.b)(ye,Object.assign({},e))})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(3),d=n.n(u),f=n(11),p=n.n(f),h=n(1389),b="TopicVoteCheckbox";function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var v=[0,1,2,3,4,5,6,7].map((function(e){return Object(s.b)("div",{className:"".concat(b,"-Sparkle")},e)}));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var y={Recommend:function(e){Object(a.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.onChange,r=e.checked,o=e.onClick,a=e.tooltipPosition;return Object(s.c)("div",Object.assign({className:p()(b,"".concat(b,"--recommend"),t),"data-tooltip":"推荐"},a&&{"data-tooltip-position":a},{children:[Object(s.b)("input",{id:"topic-recommend",type:"checkbox",checked:r,onChange:n,onClick:o}),Object(s.c)("label",{htmlFor:"topic-recommend",children:[Object(s.b)(h.a,{size:19}),v]})]}))}}]),n}(l.Component),Against:function(e){Object(a.a)(n,e);var t=g(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.onChange,r=e.checked,o=e.onClick,a=e.tooltipPosition;return Object(s.c)("div",Object.assign({className:p()(b,"".concat(b,"--against"),t),"data-tooltip":"不推荐"},a&&{"data-tooltip-position":a},{children:[Object(s.b)("input",{id:"topic-against",type:"checkbox",checked:r,onChange:n,onClick:o}),Object(s.b)("label",{htmlFor:"topic-against",children:Object(s.b)(h.a,{size:19})})]}))}}]),n}(l.Component)};function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var j=function(e){return e.stopPropagation()},w=function(e){Object(a.a)(n,e);var t=O(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){var e=this.props,t=e.noAnimation,n=e.status,r=e.onVoteChange,o=e.tooltipPosition;return Object(s.b)("span",{className:"VotableTopicCard",onClick:j,children:Object(s.c)("span",{className:p()("VotableTopicCard-RecommendStatus",{"VotableTopicCard-VoteActions--noAnimation":t}),children:[Object(s.b)(y.Recommend,{className:"".concat("VotableTopicCard","-VoteCheckbox"),checked:"like"===n,onChange:function(e){r(e,"recommend")},tooltipPosition:o}),Object(s.b)(y.Against,{className:"".concat("VotableTopicCard","-VoteCheckbox"),checked:"dislike"===n,onChange:function(e){r(e,"unrecommend")},tooltipPosition:o})]})})}}]),n}(l.Component);w.propTypes={noAnimation:d.a.bool.isRequired,status:d.a.oneOf(["like","dislike","none"]).isRequired,noBorder:d.a.bool.isRequired,onVoteChange:d.a.func.isRequired,tooltipPosition:d.a.string};var C=w,k=n(30),x=n(365),S=n(24);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var R="Upvote",T="UnUpvote",A="Downvote",N="UnDownvote",_=function(e){Object(a.a)(n,e);var t=E(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={noAnimation:!!e.props.metaInfo.vote&&"none"!==e.props.metaInfo.vote.status},e.handleVoteChange=e.context.authRequired((function(t,n){var r=e.props,o=r.metaInfo.vote.status,a=r.onUpdateVoteTopic;e.state.noAnimation&&e.setState({noAnimation:!1});var i={actionType:"",voteFor:"",method:""};"recommend"===n?"like"===o?(i.actionType=T,i.voteFor="like",i.method="DELETE"):(i.actionType=R,i.voteFor="like",i.method="POST"):"dislike"===o?(i.actionType=N,i.voteFor="dislike",i.method="DELETE"):(i.actionType=A,i.voteFor="dislike",i.method="POST"),i.actionType&&(k.a.trackEvent(t.target,{action:i.actionType,id:4176}),a(i))}),S.W.vote),e}return Object(o.a)(n,[{key:"renderVotableTopicCard",value:function(){var e=this.state.noAnimation,t=this.props,n=t.tooltipPosition,r=t.metaInfo,o=(r=void 0===r?{}:r).vote,a=(o=void 0===o?{}:o).status;return Object(s.b)(C,{noBorder:!0,status:a,noAnimation:e,onVoteChange:this.handleVoteChange,tooltipPosition:n})}},{key:"renderReviewCardExtraInfo",value:function(){var e=this.props,t=e.metaInfo,n=t.vote,r=t.meta.title,o=e.ReviewCardExtraInfoComponent,a=e.reviewerCountFormatter;if(!o)return null;var i,c=n.totalVotes,l=n.ratio,u=n.ratioStatus,d=n.status,f=(10*l).toFixed(1),p=a(c);return i="none"===d?"你推荐么?":"like"===d?"已推荐":"不推荐",Object(s.b)(o,{reviewerCount:p,insufficientText:i,percent:f,ratioStatus:u,title:r})}},{key:"render",value:function(){return Object(s.c)(l.Fragment,{children:[this.renderReviewCardExtraInfo(),this.props.children,this.renderVotableTopicCard()]})}}]),n}(l.Component);_.propTypes={onUpdateVoteTopic:d.a.func.isRequired,metaInfo:d.a.shape({meta:d.a.object.isRequired,vote:d.a.shape({status:d.a.oneOf(["none","dislike","like"]).isRequired})}),ReviewCardExtraInfoComponent:d.a.oneOfType([d.a.func,d.a.string,d.a.object]).isRequired,reviewerCountFormatter:d.a.func.isRequired,tooltipPosition:d.a.string},_.defaultProps={reviewerCountFormatter:function(e){return Object(x.cnNiceNumber)(e).trim()}},_.contextTypes={authRequired:d.a.func}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(2),o=n(232),a=n(1),i=n.n(a),c=n(131),s=Object.assign;var l=function(e){return i.a.createElement(c.a,s({width:"52",height:"60",fill:"none",viewBox:"0 0 52 60"},e),i.a.createElement("path",{fill:"#121212",d:"M28.052 54.284c-1.881 0-3.76.015-5.638 0a2.041 2.041 0 00-1.36.464 607.935 607.935 0 01-5.391 4.22 4.752 4.752 0 01-.834.539 1.566 1.566 0 01-2.15-1.844c.287-.885.573-1.764.893-2.631.19-.504.184-.716-.46-.816-2.357-.361-4.407-1.312-5.856-3.307a9.136 9.136 0 01-1.526-3.58c-.117-.572-.286-.546-.781-.38-.75.255-.94.681-.722 1.391.05.187.07.38.057.573a1.186 1.186 0 01-.967 1.237 1.146 1.146 0 01-1.395-.707c-.137-.31-.226-.501-.632-.49a1.21 1.21 0 01-1.203-.842c-.226-.555.017-.993.404-1.334.286-.263.286-.427.08-.75a1.229 1.229 0 01.286-1.718 1.175 1.175 0 011.652.243c.352.419.65.413 1.16.272 1.577-.438 2.368-1.305 2.388-3.04.017-1.486.415-2.96.592-4.447.19-1.577-.12-3.132-.309-4.687-.246-2.004-.572-4.008-.89-5.99-.163-1.067.527-1.755 1.589-1.574 1.343.223 1.325.22 1.506-1.146.269-2.027.54-4.051.859-6.07a1.323 1.323 0 00-.627-1.491c-2.374-1.638-3.568-4.052-4.06-6.835-.556-3.083.779-5.463 3.035-7.41C10.008.188 12.73-.199 15.592.082c1.612.138 3.19.556 4.66 1.234a6.373 6.373 0 012.577 2.072c.364.525.773.65 1.366.648 5.234-.02 10.465 0 15.696 0 2.13 0 4.097.495 5.775 1.875 2.448 2.004 3.341 4.644 3.07 7.73a2.295 2.295 0 01-.05.287c-.211 1.145-.252 1.987.86 2.975a5.4 5.4 0 01.463 7.381 16.1 16.1 0 01-2.64 2.694 1.59 1.59 0 00-.658 1.114c-.724 5.225-1.52 10.44-2.176 15.673-.647 5.191-4.089 9.18-9.08 10.307a13.87 13.87 0 01-3.192.238h-4.208l-.003-.026z"}),i.a.createElement("path",{fill:"#FEFEFE",d:"M14.872 57.128c.53-1.552.971-2.9 1.452-4.232.163-.453 0-.53-.4-.533-.86 0-1.719-.023-2.578-.083-1.614-.114-2.949-.839-4.094-1.95a1.63 1.63 0 01-.51-1.325c.055-1.117.075-2.236.075-3.353a.736.736 0 01.59-.83c.615-.178 1.216-.407 1.82-.622.53-.186.77-.572.61-1.114-.171-.572-.644-.638-1.145-.492-.386.109-.767.252-1.145.372-.484.155-.722 0-.71-.535.023-1.068 0-2.139.029-3.21.06-3.533-.396-7.02-.931-10.502-.023-.14-.052-.286-.066-.42-.054-.642.103-.791.727-.636 1.315.32 2.64.604 3.934.999 2.005.613 3.995.438 5.97-.12 2.365-.67 4.558-1.767 6.769-2.812a1.245 1.245 0 00.724-1.145c.086-1.257.192-2.514.286-3.768.058-.733.22-.86.897-.573 1.95.753 3.902 1.5 5.838 2.29.838.349 1.774.38 2.634.09 2.075-.67 4.017-1.695 6.02-2.537.894-.367.923-.367 1.29.55.638 1.586 1.245 3.183 1.923 4.755.23.533.095.833-.317 1.145a45.216 45.216 0 01-5.492 3.57c-1 .556-1.06.682-.859 1.822 1.005 5.483 1.46 11.026 1.867 16.575a1.45 1.45 0 01-.527 1.302c-1.958 1.793-4.263 2.577-6.903 2.577-3.722-.034-7.421 0-11.132 0a1.72 1.72 0 00-1.2.45c-1.723 1.414-3.516 2.78-5.446 4.295z"}),i.a.createElement("path",{fill:"#06F",d:"M38.851 18.987a3.811 3.811 0 00-.048-.438c-.34-1.406.043-2.505 1.23-3.401.702-.53.734-1.111.353-1.684-.38-.573-.936-.687-1.74-.286-.287.146-.359.086-.427-.19a1.897 1.897 0 00-.255-.572 1.123 1.123 0 00-1.369-.49 1.194 1.194 0 00-.83 1.275c.028.253.073.505.135.753-.439-.06-.828-.287-1.26-.104a1.189 1.189 0 00-.81.911 1.042 1.042 0 00.498 1.168c.47.286.962.513 1.457.745a.658.658 0 01.472.624c.03.784.092 1.569.16 2.348a.552.552 0 01-.392.65 3.398 3.398 0 01-2.811.06c-2.274-.96-4.581-1.821-6.892-2.712-1.165-.452-1.844-.034-1.955 1.206-.138 1.514-.287 3.029-.375 4.55a.97.97 0 01-.613.936c-2.156.996-4.312 2.004-6.671 2.436a7.73 7.73 0 01-3.25-.071c-.902-.212-1.792-.479-2.697-.668-.432-.088-.527-.286-.47-.681.338-2.306.664-4.612.977-6.918.051-.386.22-.5.572-.403a2.817 2.817 0 001.55-.029c.59-.157.981.055 1.394.438a9.752 9.752 0 003.85 2.22c.994.285 1.492-.133 1.298-1.146-.172-.885-.315-1.778-.533-2.654a1.199 1.199 0 01.4-1.312 21.19 21.19 0 003.31-4.008c.986-1.526 1.518-3.17 1.146-5.005-.1-.5.074-.607.541-.607 5.016.014 10.036 0 15.052.014 2.05 0 3.89.573 5.322 2.14 1.55 1.703 1.781 3.721 1.604 5.926-.115 1.412-.627 2.15-2.079 2.577-1.786.521-3.453 1.451-5.17 2.204a1.43 1.43 0 01-.674.198z"}),i.a.createElement("path",{fill:"#FEFEFE",d:"M17.928 18.369c-1.045-.361-1.773-1.045-2.506-1.718-.38-.35-.821-.573-1.354-.47-2.256.484-3.862-.704-5.28-2.167-1.775-1.835-2.64-4.112-2.27-6.646.395-2.7 3.238-5.193 5.987-5.471 2.206-.249 4.44.04 6.51.842 3.396 1.328 4.53 4.612 2.65 7.73a18.546 18.546 0 01-3.723 4.387 1.19 1.19 0 00-.441 1.371c.183.673.278 1.377.427 2.142z"}),i.a.createElement("path",{fill:"#06F",d:"M42.013 45.892a154.544 154.544 0 00-.917-9.388 72.47 72.47 0 00-.632-4.157.701.701 0 01.389-.86c1.01-.623 2.004-1.273 3.012-1.906.175-.109.355-.355.555-.238.2.118.106.433.078.653a1194.67 1194.67 0 01-.825 5.927c-.435 3.008-.877 6.017-1.326 9.027a1.65 1.65 0 01-.334.942z"}),i.a.createElement("path",{fill:"#B7B7B6",d:"M45.351 20.628c-.286-.287-.424-.47-.364-.719 0-.037.155-.089.166-.074.159.232.229.513.198.793z"}),i.a.createElement("path",{fill:"#121212",d:"M25.105 32.77c.029 1.146-.587 1.776-1.718 1.801-1.13.026-1.958-.738-1.966-1.872-.01-1.134.835-1.835 2.164-1.855 1.08-.015 1.477.503 1.52 1.926z"}),i.a.createElement("path",{fill:"#444",d:"M14.326 6.69c.206-.165.42-.318.644-.458a.965.965 0 011.414.352c.454.783.784 1.63.98 2.514.12.455-.212.518-.516.59-.303.071-.627.134-.722-.318-.111-.533-.206-1.074-.369-1.595-.094-.306-.157-.787-.676-.621-.475.149-.572.498-.372.962.22.527.375 1.076.59 1.603.26.641-.24.747-.621.873s-.9.407-1.117-.286a39.818 39.818 0 01-1.076-4.28c-.118-.573.312-.665.701-.782.39-.117.69-.054.807.418.086.346.09.719.333 1.028zm-3.207 4.217l1.145-.426c.23-.08.427-.058.53.197a.384.384 0 01-.057.452.385.385 0 01-.132.092c-.83.41-1.704.722-2.606.93-.535.113-.81-.285-.63-.858.264-.836.573-1.655.88-2.508-.398-.092-.74.114-1.094.2-.223.054-.43.089-.544-.172a.425.425 0 01.215-.601 5.775 5.775 0 012.56-.504c.497.023.66.407.506.885-.235.71-.478 1.426-.773 2.313zm7.753-1.852c-.346.051-.55-.115-.658-.467-.18-.573-.287-1.145-.427-1.718-.183-.716.25-.887.75-1.034.553-.163.684.255.822.645.137.39.303.859.452 1.271.301.845-.003 1.277-.939 1.303z"}),i.a.createElement("path",{fill:"#4A4B4A",d:"M18.045 3.666a.925.925 0 01.899.925.873.873 0 01-.934.893.86.86 0 01-.89-.901c.034-.582.39-.848.925-.917z"}))},u=function(e){var t=e.title,n=void 0===t?"快速登录,查看完整内容":t,a=e.zaBlock,i=void 0===a?"LoginPopupWithHeader":a;return Object(r.b)(o.e,{zaType:"Popup",zaText:n,zaBlock:i,children:Object(r.c)("div",{css:{background:"#EDF4FF",padding:"15px 0 13px"},children:[Object(r.b)(l,{css:{position:"absolute",left:"24px",top:"-16px",width:"51px"}}),Object(r.b)("div",{css:{fontSize:"16px",fontWeight:"bold",textAlign:"center"},children:n})]})})}},,,function(e,t,n){"use strict";var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(27),d=n(799),f=n(186),p=n(264),h=n(102);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var m=function(e){Object(a.a)(n,e);var t=b(n);function n(){var e;Object(r.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={value:"",items:[]},e.handleChange=function(t){var n=e.props.dispatch;e.setState({value:t});var r=t.match(/^https:\/\/www.zhihu.com\/question\/(\d+)/);r?n(Object(h.V)(r[1])).then((function(t){var n=t.payload;e.setState({items:[{name:n.title,urlToken:n.id}]})})):Object(p.b)(t).then((function(t){e.setState({items:t})}))},e.handleSelect=function(t,n){var r=e.props,o=r.dispatch,a=r.question.id,i=r.onSubmitted,c=n.urlToken,s=o(Object(h.g)(a,c));i&&i({id:c},s)},e}return Object(o.a)(n,[{key:"render",value:function(){var e=this.state,t=e.value,n=e.items;return Object(s.b)("div",{className:"QuestionRedirectionCreator",children:Object(s.b)("div",{className:"QuestionRedirectionCreator-content",children:Object(s.b)(f.b,{value:t,items:n,inputProps:{spread:!0,large:!0,after:Object(s.b)(d.a,{fill:"grey",size:20})},menuProps:{targetClassName:"QuestionRedirectionCreator-menu"},onChange:this.handleChange,onSelect:this.handleSelect})})})}}]),n}(l.Component);t.a=Object(u.connect)()(m)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(863),o=n.n(r),a=n(80),i=n.n(a),c=n(7),s=n(844),l=n(1353);function u(e){var t=e.id,n=e.adZoneId,r=e.template,o=void 0===r?"":r,a=e.style,i=void 0===a?"":a,c=e.impressionTracks,s=e.viewTracks,l=e.clickTracks,u=e.closeTracks,d=e.effectTracks,f=void 0===d?[]:d,p=e.debugTracks,h=void 0===p?[]:p,b=e.conversionTracks,m=e.videoTracks,v=void 0===m?[]:m,g=e.extraConversionTracks,y=void 0===g?[]:g,O=e.conversionTrackJs,j=void 0===O?[]:O,w=e.zaAdInfo,C=e.zaAdInfoJson,k=void 0===C?"":C,x=e.creatives,S=e.prefetch,E=void 0===S?{}:S,R=e.expand,T=void 0===R?{}:R,A=e.canvas,N=void 0===A?{}:A,_=e.experimentInfo,I=void 0===_?"":_;return{id:t,adZoneId:n,template:o,style:i,impressionTracks:c,viewTracks:s,clickTracks:l,closeTracks:u,effectTracks:f,debugTracks:h,conversionTracks:b,videoTracks:v,extraConversionTracks:y,conversionTrackJs:j,zaAdInfo:w,zaAdInfoJson:k,creatives:function(e){return e.map((function(e){return function(e){var t=e.id,n=void 0===t?"":t,r=e.asset,o=e.videoInfo,a=void 0===o?{playlis:{hd:{},ld:{},sd:{}}}:o,i=e.protoInfo,c=void 0===i?{}:i,s=e.thirdSdkInfo,l=void 0===s?"":s,u=e.videoWatchNum,d=void 0===u?"":u;return{id:n,asset:function(e){var t=e.brandName,n=e.brandLogo,r=e.title,o=e.desc,a=void 0===o?"":o,i=e.imgs,c=void 0===i?[]:i,s=e.gif,l=void 0===s?"":s,u=e.landingUrl,d=e.nativeUrl,f=void 0===d?"":d,p=e.appPromotionUrl,h=void 0===p?"":p,b=e.deepUrl,m=void 0===b?"":b,v=e.imgSize,g=e.recommends,y=void 0===g?[{}]:g,O=e.footer,j=e.cta,w=e.resource,C=void 0===w?{}:w,k=e.activity,x=void 0===k?{}:k,S=e.sponsor,E=void 0===S?{}:S,R=e.window,T=void 0===R?{}:R,A=e.appInfo,N=void 0===A?{}:A,_=e.recommend,I=void 0===_?{}:_,M=e.videoSpec,L=void 0===M?{}:M,P=e.imageRatioExtra,B=void 0===P?{}:P,z=e.packageName,D=e.icon,F=e.galleries;return{brandName:t,brandLogo:n,title:r,desc:a,imgs:c,gif:l,landingUrl:u,nativeUrl:f,appPromotionUrl:h,deepUrl:m,imgSize:v,recommends:y,footer:O,cta:j,resource:C,activity:x,sponsor:E,window:T,appInfo:N,recommend:I,videoSpec:L,imageRatioExtra:B,packageName:z,icon:D,galleries:void 0===F?[{}]:F}}(r),videoInfo:a,protoInfo:c,thirdSdkInfo:l,videoWatchNum:d}}(e)}))}(x),prefetch:E,expand:T,canvas:N,experimentInfo:I}}var d={PROMOTE_ARTICLE:"发表了一篇文章",PROMOTE_QUESTION:"提了一个问题"};function f(e){var t=e.ad,n=(t.partyId,t.creatives),r=t.downloadSilent,a=void 0!==r&&r,c=t.isNewWebview,l=void 0!==c&&c,u=t.isSpeeding,f=t.cdnMap,p=t.displayAdvertisingTag,h=t.adVerb,b=t.loadTracks,m=t.closeTrack,v=i()(t,["partyId","creatives","downloadSilent","isNewWebview","isSpeeding","cdnMap","displayAdvertisingTag","adVerb","loadTracks","closeTrack"]),g=Object(s.e)(t,"creatives[0].impressionTracks",[]),y=Object(s.e)(t,"creatives[0].clickTracks",[]),O={displayAdvertisingTag:p,downloadSilent:a,isNewWebview:l,isCdnSpeeding:u,cdnMap:f},j=d[h],w=n.map((function(e){return function(e,t){var n=Object(s.e)(e,"target",{}),r=n.voteupCount,a=n.commentCount,c=n.followerCount,l=n.answerCount,u=i()(n,["voteupCount","commentCount","followerCount","answerCount"]),d=e.landingUrl,f=e.appPromotionUrl,p=e.deepUrl,h=e.packageName,b=e.title,m=e.nativeUrl,v=void 0===m?"":m,g=e.window,y=e.imageRatioExtra,O=e.brand,j=void 0===O?{}:O,w=e.thumbnailExtraInfo,C=e.cta,k=(C=void 0===C?{}:C).value,x=void 0===k?"":k,S=e.button,E=e.description,R=(e.protoInfo,e.image),T=e.gallery,A=void 0===T?[]:T,N=e.thirdSdkInfo,_=(e.showNum,e.recommend),I=e.contentType,M=i()(e,["landingUrl","appPromotionUrl","deepUrl","packageName","title","nativeUrl","window","imageRatioExtra","brand","thumbnailExtraInfo","cta","button","description","protoInfo","image","gallery","thirdSdkInfo","showNum","recommend","contentType"]),L=j.name,P=j.logo,B=Object(s.e)(A,"length")>=2?A.map((function(e){return e.url})):[R],z=A&&A.map((function(e){return{image:e.url,desc:e.description}}));return{asset:o()({landingUrl:d,appPromotionUrl:f,deepUrl:p,packageName:h,title:b,nativeUrl:v,window:g,imageRatioExtra:y,desc:E,cta:S||x,imgs:B,brandName:L,brandLogo:P,recommend:_,gallery:A,galleries:z,icon:t},M),protoInfo:o()({voteupNum:r,commentNum:a,contentType:I,answerNum:l,followNum:c,target:JSON.stringify(n)},u),videoInfo:w,thirdSdkInfo:N}}(e,j)}));return o()({viewTracks:g,impressionTracks:b,closeTracks:[m],clickTracks:y,creatives:w,expand:O},v)}function p(e){if(!e||!e.ad&&!e.adjson)return null;var t=Object(c.camelizeKeys)(e),n=Object(s.e)(e,"adjson"),r=Object(c.camelizeKeys)(Object(s.w)(n)),a=Object(l.a)({oldData:t,adjson:r});return{data:t,adjson:n?function(e,t){if(!e.ads)return null;var n=e.ads;return{ads:(void 0===n?[]:n).map((function(e){return o()({adjsonStr:t},u(e))}))}}(r,n):function(e,t){return{ads:[{ad:e.ad}].map((function(e){var n=e.ad;return o()({adjsonStr:t},f({ad:n}))}))}}(t,n),experimentInfo:a}}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M12 2a10 10 0 1 0 0 20c5.523 0 10-4.477 10-10S17.523 2 12 2zm2.081 15.497c-.407.163-.818.318-1.231.464a3.224 3.224 0 0 1-1.069.161c-.624 0-1.107-.15-1.452-.457a1.471 1.471 0 0 1-.518-1.156c0-.183.013-.369.038-.559.026-.187.068-.402.125-.642l.644-2.276c.054-.205.102-.412.145-.618.037-.177.056-.356.057-.536 0-.29-.06-.493-.179-.607-.121-.115-.35-.171-.687-.171a1.814 1.814 0 0 0-.513.076 7.067 7.067 0 0 0-.45.15l.171-.702c.398-.163.8-.31 1.21-.441.387-.123.75-.184 1.093-.184.619 0 1.096.15 1.432.45.334.297.503.686.503 1.163 0 .1-.012.274-.035.523-.02.232-.062.462-.13.686l-.64 2.268a7.016 7.016 0 0 0-.143.622 3.374 3.374 0 0 0-.06.53c0 .303.068.508.202.617.135.108.369.164.701.164.156 0 .331-.027.53-.08.198-.056.337-.103.427-.144l-.17.7zM13.97 8.29c-.292.275-.68.424-1.08.416a1.55 1.55 0 0 1-1.085-.416 1.331 1.331 0 0 1-.45-1.011c0-.393.15-.733.45-1.013.302-.281.665-.42 1.085-.42.421 0 .781.139 1.08.42.298.28.447.62.447 1.013 0 .396-.15.732-.447 1.011z",fillRule:"evenodd"}))};i.defaultProps={name:"Info"},t.a=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){var r=n(14),o=n(15),a=n(16),i=n(17),c=n(9),s=n(2),l=n(1),u=n(27),d=n(2586),f=n(102),p=n(161);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(i.a)(this,n)}}var b=function(t){Object(a.a)(i,t);var n=h(i);function i(){var t;Object(r.a)(this,i);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return(t=n.call.apply(n,[this].concat(a))).getTrackUrls=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.props,a=o.pageType,i=o.advancedStyle,c=i.viewTracks,s=i.clickTracks,l="view"===n?c:s,u=Object.assign({},{eru:encodeURIComponent(e.location.href),ct:1,pt:"question"===a?1:2,rt:1},r),d=Object.keys(u).map((function(e){return"&".concat(e,"=").concat(u[e])})).join("");return l.map((function(e){return"".concat(e).concat(d)}))},t.handleViewTrack=function(e){t.getTrackUrls("view",e).forEach(p.c)},t.handleClickTrack=function(e){t.getTrackUrls("click",e).forEach(p.c)},t}return Object(o.a)(i,[{key:"componentWillMount",value:function(){var e=this.props,t=e.questionId;(0,e.loadBrandQuestionAdvancedStyle)(t)}},{key:"componentDidUpdate",value:function(e){var t=e.advancedStyle,n=(t=void 0===t?{}:t).cardType,r=this.props,o=r.advancedStyle,a=(o=void 0===o?{}:o).cardType,i=r.onLoad;!n&&a&&"function"==typeof i&&i()}},{key:"render",value:function(){var e=this.props,t=e.brand,n=e.advancedStyle;return n&&n.id?Object(s.b)(d.a,{brand:t,advancedStyle:n,handleViewTrack:this.handleViewTrack,handleClickTrack:this.handleClickTrack,isMobileView:!1}):null}}]),i}(l.Component);t.a=Object(u.connect)((function(e){var t=e.question;return{brand:t.brand,advancedStyle:t.advancedStyle}}),{loadBrandQuestionAdvancedStyle:f.G})(b)}).call(this,n(100))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(e){return o.a.createElement(a.a,i({fill:"currentColor"},e),o.a.createElement("path",{d:"M6.824 2.934l-3.36 3.359a1 1 0 0 0 0 1.414l3.36 3.359a.25.25 0 0 0 .353 0l1.06-1.06a.25.25 0 0 0 0-.354L6.587 8H13a5 5 0 0 1 0 10H4.25a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25H13a7 7 0 1 0 0-14H6.586l1.652-1.652a.25.25 0 0 0 0-.353l-1.06-1.06a.25.25 0 0 0-.354 0z"}))};c.defaultProps={name:"Undo"},t.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1295),o=n(56);function a(e){return Object(o.a)(1,arguments),Object(r.a)(e,Date.now())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1295),o=n(1003),a=n(56);function i(e){return Object(a.a)(1,arguments),Object(r.a)(e,Object(o.a)(Date.now(),1))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(18),i=function(e){return o.a.createElement(a.a,e,o.a.createElement("path",{d:"M19.49 14.362l-2.03-1.83 1.116-1.137a1.352 1.352 0 0 1 1.921-.009c.535.535.54 1.4.01 1.94l-1.016 1.036zm-4.883 4.935a2.3 2.3 0 0 1-1.12.63l-1.136.264c-.29.058-.668-.105-.56-.56l.27-1.158a2.3 2.3 0 0 1 .599-1.09l3.809-3.84 2.03 1.829-3.892 3.925zM4.06 5H19.94C20.526 5 21 5.448 21 6s-.474 1-1.059 1H4.06C3.474 7 3 6.552 3 6s.474-1 1.059-1zM4 11h9a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h4a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z",fillRule:"evenodd"}))};i.defaultProps={name:"Preview"},t.a=i},,,,,,,,,,,,,function(e,t,n){e.exports=n.p+"assets/placeholder.765f50e5.svg"},function(e,t,n){e.exports=n.p+"assets/liukanshan_desert.547bd049.svg"},function(e,t,n){e.exports=n.p+"assets/empty.2df52de0.png"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(2),o=n(11),a=n.n(o),i=n(377),c=n(842),s=n(101),l=n(980),u=n(24),d={question:"提问",answer:"回答",post:"文章",live:"Live",ebook:"电子书"},f=function(e){var t=e.src,n=e.style;return Object(r.b)("div",{className:"AdvancedViewer-imgField",style:Object.assign({},n,t?{backgroundImage:"url(".concat(t,")"),backgroundSize:"cover",backgroundPosition:"center"}:{})})};function p(e){var t=e.isMobileView,n=e.advancedStyle,o=(n=void 0===n?{}:n).cardType,a=n.url,c=n.material,s=e.handleViewTrack,p=e.handleClickTrack;if(!(null==c?void 0:c.length))return null;var h=function(e){return"function"==typeof p?{onClick:function(){p(e)}}:{}},b=function(e,t){return Object(r.c)("a",Object.assign({className:"AdvancedViewer-commodityItem",target:"_blank",rel:"noopener noreferrer",href:a},h({etu:a,pi:t+1}),{children:[Object(r.b)("img",{src:e.image,role:"presentation"}),e.mainTitle&&Object(r.c)("div",{className:"AdvancedViewer-commodityIntro",children:[Object(r.b)("span",{className:"AdvancedViewer-mainTitle",children:e.mainTitle}),Object(r.b)("span",{className:"AdvancedViewer-subTitle",children:e.subTitle})]})]}),"AdvancedViewer-commodity-".concat(t))};if("image"===o)return Object(r.b)("a",Object.assign({className:"AdvancedViewer-material AdvancedViewer-image",target:"_blank",rel:"noopener noreferrer",href:a},h({etu:a}),{children:Object(r.b)(f,{src:c[0].image,style:t?{width:375,height:156.25}:{}})}));if("image_text"===o)return Object(r.c)("a",Object.assign({className:"AdvancedViewer-material AdvancedViewer-imageText",target:"_blank",rel:"noopener noreferrer",href:a},h({etu:a}),{children:[t&&Object(r.b)("div",{className:"AdvancedViewer-intro",children:c[0].intro}),Object(r.b)(f,{src:c[0].image}),!t&&Object(r.b)("div",{className:"AdvancedViewer-intro",children:c[0].intro})]}));if("commodity"===o)return c.length&&Object(r.b)("div",{className:"AdvancedViewer-material AdvancedViewer-commodity",children:t?c.map(b):Object(r.b)(l.a,{items:c,renderItem:b})});if("recommended"===o){var m=function(e,t){return Object(r.c)("a",Object.assign({className:"AdvancedViewer-recommendedItem",href:e.url,target:"_blank",rel:"noopener noreferrer"},h({etu:e.url,pi:t+1}),{children:[Object(r.c)("div",{className:"AdvancedViewer-summary",children:[Object(r.c)("div",{className:"AdvancedViewer-wrap",children:[Object(r.b)("div",{className:"AdvancedViewer-title",children:e.title}),e.intro&&Object(r.b)("div",{className:"AdvancedViewer-desc",children:e.intro.replace(/<[\s\S]*?>/g,"")})]}),Object(r.c)("span",{className:"AdvancedViewer-data",children:[d[e.type]," · ",e.statisticText]})]}),Object(r.b)(f,{src:e.image||u.o})]}))};return Object(r.b)("div",{className:"AdvancedViewer-material AdvancedViewer-recommended",children:c.map((function(e,t){return s?Object(r.b)(i.a,Object.assign({},(n={pi:t+1},"function"==typeof s?{onChange:function(e,t){e.isIntersecting&&(t.disconnect(),s(n))}}:{}),{children:m(e,t)}),t):m(e,t);var n}))})}return null}function h(e){var t,n=e.isMobileView,o=e.brand,l=o.name,u=o.logo,d=e.advancedStyle,f=(d=void 0===d?{}:d).brandRecommendText,h=d.buttonText,b=d.url,m=d.cardType,v=e.handleViewTrack,g=e.handleClickTrack,y=function(e){return"function"==typeof g?{onClick:function(){g(e)}}:{}},O=l&&l.charCodeAt(l.length-1),j=O>=0&&O<=128?"".concat(l," "):l,w=n&&"recommended"!==m,C=f||"".concat(j,"的品牌推荐"),k=Object(r.c)(c.d,{className:a()("AdvancedViewer",{"is-mobile":n}),children:[!w&&Object(r.b)(c.b,{className:"AdvancedViewer-header",children:Object(r.b)("span",{className:"AdvancedViewer-headerText",children:C})}),Object(r.b)("div",{className:"AdvancedViewer-content",children:Object(r.b)(p,Object.assign({},e))}),!n&&m&&"recommended"!==m&&Object(r.b)("div",{className:"AdvancedViewer-footer",children:Object(r.b)(s.a,Object.assign({className:"AdvancedViewer-button",target:"_blank",to:b},y({etu:b}),{children:h||"了解更多"}))}),w&&Object(r.c)("div",{className:"AdvancedViewer-footer",children:[Object(r.c)("div",{className:"AdvancedViewer-brand",children:[Object(r.b)("img",{className:"AdvancedViewer-logo",src:u,role:"presentation"}),Object(r.b)("span",{className:"AdvancedViewer-brandName",children:C})]}),Object(r.b)(s.a,Object.assign({className:"AdvancedViewer-button",target:"_blank",to:b},y({etu:b}),{children:h||"查看详情"}))]})]});return v?Object(r.b)(i.a,Object.assign({},"function"==typeof v?{onViewed:function(){v(t)}}:{},{children:k})):k}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(34),a=n(43),i=n(14),c=n(15),s=n(16),l=n(17),u=n(9),d=n(1),f=n.n(d),p=n(3),h=n.n(p),b=n(27),m=n(232),v=n(110),g=n.n(v),y=n(121),O=n.n(y),j=n(366),w=n(176),C=n(75),k=n(2228),x=n.n(k);var S=function(){return Object(r.b)(C.a,{title:"该内容仅作者可见",subtitle:"",errorImage:x.a})},E=n(19),R=n(102),T=n(234),A=Object(r.b)(g.a,{meta:[{name:"robots",content:"noindex"}]}),N=Object(E.compose)(Object(T.a)(null))((function(e){var t=e.entity,n=t.type,o=t.id,a=t.isVisible,i=t.isCollapsed,c=t.suggestEdit,s=void 0===c?{}:c,l=t.adminClosedComment,u="";"question"===n?u=o:"answer"===n&&(u=t.question.id);var d=Object(b.useSelector)((function(e){return Object(R.bb)(e,{id:u})}));if(d){var f=d.status,p=d.adminClosedComment,h=d.isMuted,m=d.visibleOnlyToAuthor,v=d.reviewInfo,g=void 0===v?{}:v;if((null==f?void 0:f.isClose)||(null==f?void 0:f.isSuggest)||(null==f?void 0:f.isEvaluate)||p||h||m||g.editIsReviewing)return A}return"question"===n&&d.redirection?Object(r.b)("link",{rel:"canonical",href:"https://www.zhihu.com/question/".concat(d.redirection.to.id)}):"answer"===n&&((null==s?void 0:s.status)||i||l||!a)?A:"article"!==n||!(null==s?void 0:s.status)&&!l&&a?"":A})),_=n(1687),I=n(122),M=n(36),L=n(530),P=n(68),B=n(25),z=n(106),D=n(31),F=n(134),U=n(53);function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var q=function(e){Object(s.a)(n,e);var t=V(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleToggleAnonymousConfirm=function(){var t=e.props,n=t.question.id,r=t.updateQuestionAnonymous;(0,t.onClose)(),r(n)},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.props.fillCurrentUserIfNeeded(["mcn_user_info"])}},{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.question,o=e.shown,a=e.isMCNUser,i=e.isOffice,c=n.relationship.isAnonymous;return Object(r.b)(F.b,{title:c?"确认取消匿名身份?":"确认使用匿名身份?",onClose:t,size:"default",children:o&&Object(r.c)("div",{children:[c?Object(r.b)("div",{className:"Anonymous-confirm",children:Object(r.b)("p",{children:"取消匿名身份后, 提问、回答、赞同和关注将以实名显示。"})}):Object(r.c)("div",{className:"Anonymous-confirm",children:[Object(r.b)("p",{children:"使用匿名身份后:"}),Object(r.c)("ul",{children:[Object(r.b)("li",{children:"提问、回答、赞同、关注会显示为匿名"}),Object(r.b)("li",{children:"除提问者本人,不能匿名编辑问题"}),Object(r.b)("li",{children:"不能邀请别人回答问题"}),Object(r.b)("li",{children:"不能使用视频功能"}),Object(r.b)("li",{children:"不能将回答同步到圈子"}),a&&Object(r.b)("li",{children:"不能使用商品信息发布功能"}),i&&Object(r.b)("li",{children:"不包含商业推广和进行商业声明"})]})]}),Object(r.c)(F.a,{direction:"horizontal",children:[Object(r.b)(D.c,{onClick:t,color:"grey",children:"取消"}),Object(r.b)(D.c,{preset:"primary",color:"blue",onClick:this.handleToggleAnonymousConfirm,children:"确认"})]})]})})}}]),n}(d.Component);q.propTypes={question:h.a.object.isRequired};var H=Object(b.connect)((function(e){var t,n=Object(M.b)(e);return{isMCNUser:2===(null==n||null===(t=n.mcnUserInfo)||void 0===t?void 0:t.status),isOffice:Object(U.e)(e)}}),{updateQuestionAnonymous:R.mb,fillCurrentUserIfNeeded:M.e})(q),K=Object(o.withRouter)((function(e){var t=e.params.id,n=Object(b.useSelector)((function(e){return e.entities.questions[t]})),o=Object(b.useSelector)((function(e){return Object.keys(e.entities.answers).filter((function(n){var r;return(null===(r=e.entities.answers[n].question)||void 0===r?void 0:r.id)===Number(t)})).map((function(t){return e.entities.answers[t]}))})),a=Object(b.useSelector)((function(e){return e.env.userAgent.origin}));if(!/googlebot/i.test(a))return null;var i=o.map((function(e){var n=e.excerpt,r=e.createdTime,o=e.voteupCount,a=e.author.name,i=e.id;return n?{"@type":"Answer",text:n,dateCreated:new Date(1e3*r).toISOString(),upvoteCount:o,url:"https://www.zhihu.com/question/".concat(t,"/answer/").concat(i),author:{"@type":"Person",name:a}}:null})).filter(Boolean),c=n.title,s=n.excerpt,l=n.answerCount,u=n.created,d=n.author.name;return(null==i?void 0:i.length)&&c?Object(r.b)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"QAPage",mainEntity:{"@type":"Question",name:c,text:s||c,answerCount:l,dateCreated:new Date(1e3*u).toISOString(),author:{"@type":"Person",name:d},suggestedAnswer:i}})}}):null})),Q=n(159),W=n(2229),G=n.n(W);function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Z=function(e){Object(s.a)(n,e);var t=Y(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={time:e.props.seconds},e.handleClearInterval=function(){e.interval&&clearInterval(e.interval)},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this;this.interval=setInterval((function(){e.setState({time:e.state.time-1},(function(){if(0===e.state.time){e.handleClearInterval();var t=e.props.id;location.href="/question/".concat(t)}}))}),1e3)}},{key:"componentWillUnmount",value:function(){this.handleClearInterval()}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.destination,o=this.state.time;return Object(r.b)(Q.b,{title:t,subtitle:"".concat(o," 秒后自动跳转至").concat(n),errorImage:G.a})}}]),n}(d.Component);Z.defaultProps={seconds:5,destination:"回答所在的问题页",title:"该回答已被删除"};var X=n(849),J=n(369),$=n.n(J),ee=n(1290),te=n(235),ne=n(217),re=n(30),oe=n(981),ae=n(1135),ie=n(158),ce=n(1090),se=n(1345),le=n(0),ue=n(11),de=n.n(ue),fe=n(177),pe=n(370),he="SpecialQuestionAuthor";function be(e){var t=e.author,n=e.className,a=e.isMobile,i=t.avatarUrl,c=t.name,s=t.badge,l=t.badgeV2;return Object(r.b)("div",{className:de()("".concat(he,"-Wrapper"),n),children:Object(r.c)(o.Link,{className:de()("".concat(he),Object(le.a)({},"ROOT_CLASS--mobile",a)),to:"/".concat(t.isOrg?"org":"people","/").concat(t.urlToken||t.id),children:[Object(r.b)(fe.a,{size:a?22:28,url:i,alt:c,round:!0}),Object(r.b)("span",{className:"".concat(he,"-Author"),children:t.name}),Object(r.b)(pe.c,{className:"".concat(he,"-Badge"),badge:l||s,size:a?16:18}),Object(r.b)("span",{className:"".concat(he,"-Suffix"),children:"的提问"})]})})}be.propTypes={author:h.a.object.isRequired,isMobile:h.a.bool};var me=n(1540),ve=(n(1821),n(245)),ge=n(841),ye=n(37),Oe=n.n(ye),je=n(862);function we(e){var t=e.question,n=e.isAuthorCurrentUser,o=e.hasExtraContent,i=t.author,c=Object(d.useState)(!1),s=Object(a.a)(c,2),l=(s[0],s[1],Object(d.useRef)(),Object(d.useRef)());return Object(d.useEffect)((function(){;""}),[n]),Object(d.useEffect)((function(){Object(ge.onViewedOnce)(l.current,(function(){re.a.trackCardShow(l.current,{id:7064})}))}),[]),Object(r.c)("div",{className:de()("QuestionAuthor",{"QuestionAuthor--hasExtraContent":o}),ref:l,children:[Object(r.b)(je.a,{preset:"plain",author:i,zaId:7063,zaExtra:{link:{url:"//www.zhihu.com/people/".concat(i.urlToken)}},noHeadline:!0}),""]})}var Ce=n(35),ke=n(90),xe=n(365),Se=n(152),Ee=n(868),Re=n(848),Te=n(131),Ae=Object.assign;var Ne=function(e){return f.a.createElement(Te.a,Ae({width:"99",height:"99",viewBox:"0 0 99 99"},e),f.a.createElement("path",{fill:"currentColor",d:"M118.269 98.6a4.063 4.063 0 01-2.54-.893L69.501 60.79l-44.83 36.055a4.06 4.06 0 01-4.972.1 4.2 4.2 0 01-1.419-4.834L29.43 61.626c.801-2.153 3.175-3.234 5.29-2.423 2.12.812 3.191 3.216 2.39 5.366l-5.897 16.387 35.73-28.735a4.053 4.053 0 015.09-.008l38.454 30.708-13.8-45.548a4.2 4.2 0 011.421-4.524L129.74 8.185H97.734L51.044 41.93A4.068 4.068 0 0145.31 41c-1.33-1.863-.918-4.466.917-5.815L93.995.648a4.067 4.067 0 012.408-.79h45.412a4.11 4.11 0 013.887 2.823 4.2 4.2 0 01-1.385 4.64L105.371 37.69l16.82 55.522a4.193 4.193 0 01-1.6 4.658 4.066 4.066 0 01-2.322.73M16.219 18.143a3.63 3.63 0 01-2.935-1.468c-1.16-1.577-.784-3.772.834-4.9L30.328.514c1.62-1.13 3.869-.765 5.028.812 1.16 1.577.785 3.772-.834 4.9L18.314 17.488a3.669 3.669 0 01-2.095.655M32.28 29.114a3.46 3.46 0 01-2.005-6.277L84.62-15.959a3.45 3.45 0 014.815.814 3.46 3.46 0 01-.812 4.822L34.28 28.474a3.435 3.435 0 01-2 .64M3.407 7.171c-1.053 0-2.092-.53-2.757-1.53-1.104-1.655-.764-3.97.757-5.17l2.202-1.737c1.52-1.2 3.648-.831 4.751.823 1.104 1.656.764 3.971-.757 5.171L5.4 6.466a3.204 3.204 0 01-1.994.705",fillRule:"evenodd"}))};function _e(){var e=Object(X.a)(["收录",""," · ","知友推荐"]);return _e=function(){return e},e}var Ie=function(e){var t,n=e.items,o=null==n||null===(t=n[0])||void 0===t?void 0:t.image;return Object(r.b)(ke.Box,{css:function(e){return{flex:"0 0 44px",borderRadius:"4px",position:"relative","::after":{content:'""',position:"absolute",top:4,bottom:4,borderRadius:"inherit",right:"-4px",background:"".concat(e.colorMod(e.colors.GBK09A).alpha(.8)),width:"10px",zIndex:0}}},children:Object(r.b)(Ee.a,{bg:"GBK09C",ratio:1,css:{zIndex:1},children:o&&Object(r.b)(ke.Image,{size:"100%",src:Object(Se.imgUrl)(o,"100w"),css:{borderRadius:"inherit",objectFit:"cover"}})})})},Me=function(e){return[{width:"33px",right:"10px",zIndex:3},{width:"29px",right:"5px",zIndex:2},{width:"24px",right:0,zIndex:1}][e]},Le=function(e){var t=e.items,n=null==t?void 0:t.map((function(e){return e.image}));return Object(r.b)(ke.Box,{css:{flex:"0 0 44px",borderRadius:"4px"},children:Object(r.b)(Ee.a,{ratio:1,children:(null==n?void 0:n.length)>0&&n.map((function(e,t){return Object(r.b)(ke.Box,{css:Object.assign({borderRadius:"inherit",position:"absolute",bottom:0},Me(t)),children:Object(r.b)(Ee.a,{bg:"GBK09C",ratio:3/4,css:{zIndex:1},children:e&&Object(r.b)(ke.Image,{size:"100%",src:Object(Se.imgUrl)(e,"100w"),css:{borderRadius:"inherit",objectFit:"cover",boxShadow:"0.5px 0 2px 0 rgba(0, 0, 0, 0.1)"}})})},t)}))})})},Pe=function(e){var t=e.questionId,n=e.isInAnswerPage,o=Object(Ce.a)(e,["questionId","isInAnswerPage"]),i=Object(b.useSelector)((function(e){return Object(R.cb)(e,t)})),c=Object(b.useDispatch)(),s=Object(me.b)(),l=Object(a.a)(s,3),u=l[0],f=l[1],p=l[2];if(Object(d.useEffect)((function(){i||c(Object(R.W)(t)).catch(p)}),[i,t,p,c]),Object(d.useEffect)((function(){i&&("not found"!==i.message?f():p())}),[i,p,f]),!i||"not found"===i.message||!u)return null;var h=i.name,v=i.num,g=i.upvoteNum,y=i.rankFieldType,O=i.items,w=i.urlToken,C=2===y,k=C?Le:Ie;return Object(r.b)(j.a,{module:"Content",view:{id:8766,name:n?"answer":"question"},content:{token:w,parent_token:String(t)},trackCardShow:!0,children:Object(r.b)(m.b,{content:{type:"Topic",token:String(w)},children:Object(r.b)(m.e,{zaText:!0,shouldTrackClick:!0,as:"div","data-za-extra":JSON.stringify({button:{text:h}}),css:{position:"relative",zIndex:0},zaType:"Card",zaAction:"OpenUrl",zaBlock:"blueStar_questionPage_detailCard",zaEventType:"Click",extra:{link:{url:"https://www.zhihu.com/blue-star/ranking/".concat(w,"?origin_from=").concat(n?"answer":"question")}},children:Object(r.c)(ke.Flex,Object.assign({as:Re.a,my:"14px",py:"8px",px:"12px",alignItems:"center",css:function(e){return{backgroundImage:"linear-gradient(to left, ".concat(e.colorMod(e.colors.GBL01A).alpha(.1),", ").concat(e.colorMod(e.colors.GBL01A).alpha(.04),")"),backgroundColor:e.colors.GBK99C,borderRadius:"5px",position:"relative",overflow:"hidden"}},"data-za-detail-view-id":"8767","data-za-detail-view-name":n?"answer":"question","data-za-extra":JSON.stringify({button:{text:h}}),href:"https://www.zhihu.com/blue-star/ranking/".concat(w,"?origin_from=").concat(n?"answer":"question")},o,{children:[Object(r.b)(Ne,{css:function(e){return{position:"absolute",width:"40.5px",height:"49.5px",top:-5,right:-1,color:e.colors.GBK99A}}}),Object(r.b)(k,{items:O}),Object(r.c)(ke.Flex,{ml:"14px",alignItems:"center",children:[Object(r.b)(ke.Text,{color:"GBK02A",fontWeight:"bold",css:{fontSize:"17px",lineHeight:"18px"},children:"小蓝星 · ".concat(h)}),Object(r.b)(ke.Text,{color:"GBK05A",css:{fontSize:"14px",lineHeight:"16px",marginLeft:"10px"},children:C?$()(_e(),Object(xe.cnNiceNumber)(v),C?"部影视":"个商品",Object(xe.cnNiceNumber)(g)):"来自知友的真实反馈"})]})]}))})})})},Be=n(440),ze=n(1089);function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Fe=function(e){Object(s.a)(n,e);var t=De(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.item;return Object(r.b)(Be.a,{className:"QuestionTopic",children:Object(r.b)(ze.a,{noHoverCard:!1,topic:e})})}}]),n}(d.Component),Ue=Object(j.b)((function(e){return{module:"TopicItem",content:{type:"Topic",token:e.item.id},trackCardShow:!0}}))(Fe),Ve=n(1783),qe=n(1271),He=n(889),Ke=n(998),Qe=n(1059),We=n(1182),Ge=function(e){var t=e.text,n=Object(Ce.a)(e,["text"]);return Object(r.b)(D.c,Object.assign({preset:"plain"},n,{icon:We.a,label:t||"修改"}))};function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Ze=function(e){Object(s.a)(n,e);var t=Ye(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.tips;return Object(r.b)("div",{className:"QuestionReviewInfo",children:Object(r.b)("p",{children:e})})}}]),n}(d.PureComponent);Ze.propsTypes={tips:h.a.string};function Xe(e){var t,n,o=e.html,i=e.excerpt,c=e.thumbnailInfo,s=e.collapsed,l=e.onExpand,u=e.editable,f=e.onEdit,p=e.isVisible,h=e.isAuthor,b=i.length<o.length,m=(b||i.length>=75)&&s,v=!h&&!p,g=Object(d.useMemo)((function(){var e;return null==c||null===(e=c.thumbnails)||void 0===e?void 0:e.find((function(e){return"video"===e.type}))}),[c]),y=null==c||null===(t=c.thumbnails)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.url,O=Object(d.useState)(null),j=Object(a.a)(O,2),w=j[0],C=j[1];return Object(r.b)("div",{css:{minHeight:"10px"},children:Object(r.c)("div",{className:de()("QuestionRichText",{"QuestionRichText--expandable":b,"QuestionRichText--collapsed":s,"QuestionRichText--video":g&&s}),onClick:function(e){m&&"function"==typeof l&&l(e);var t=e.target;"IMG"===t.tagName&&t.classList.contains("zh-lightbox-thumb")&&C(t)},children:[g&&s&&Object(r.b)("div",{className:"QuestionRichText--wrapImgae",children:Object(r.b)("img",{src:y,alt:"video",className:"QuestionRichText--image"})}),!v&&Object(r.c)("div",{children:[m?Object(r.b)("span",{children:Object(Qe.b)(i,75)}):Object(r.b)(Ke.a,{itemProp:"text",tag:"span",html:o}),m&&Object(r.c)(D.c,{preset:"plain",className:"QuestionRichText-more",children:["显示全部 ",Object(r.b)(qe.a,{center:!0})]})]}),u&&!m&&Object(r.b)(Ge,{onClick:f}),w&&Object(r.b)(He.a,{img:w,onClose:function(){return C(null)}})]})})}function Je(e){var t=e.reviewInfo,n=e.thumbnailInfo,o=e.html,a=e.excerpt,i=(t||{}).tips,c=Object(d.useMemo)((function(){var e;return null==n||null===(e=n.thumbnails)||void 0===e?void 0:e.find((function(e){return"video"===e.type}))}),[n]),s=Boolean(o&&a);return Object(r.c)("div",{children:[i&&c&&Object(r.b)(Ze,{tips:i}),s?Object(r.b)(Xe,Object.assign({},e)):null]})}var $e=n(371),et=n(66),tt=n(175),nt=n(2007),rt=n(2215),ot=n(547),at=n(101);function it(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ct=function(e){Object(s.a)(n,e);var t=it(n);function n(){var e;Object(i.a)(this,n);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return(e=t.call.apply(t,[this].concat(a))).getRenderProps=function(){var t=e.props,n=t.draft,o=t.question,a=o.id,i=o.relationship,c=(i=void 0===i?{}:i).myAnswer;return c?c.isDeleted?{icon:Object(r.b)(nt.a,{size:17,className:"QuestionButton-icon"}),text:"撤销删除",props:{onClick:e.handleRestoreAnswer}}:{icon:Object(r.b)(rt.a,{size:17,className:"QuestionButton-icon"}),text:"查看回答",props:{to:"/question/".concat(a,"/answer/").concat(c.answerId),onClick:e.handleFocusAnswer},Wrapper:at.a}:{icon:Object(r.b)(We.a,{size:16,center:!0,className:"QuestionButton-icon"}),text:n?"编辑回答":"写回答",props:{onClick:e.handleAddAnswer}}},e.handleFocusAnswer=function(){var t=document.querySelector(".AnswerCard");t&&(t.classList.add("is-focus"),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout((function(){return t.classList.remove("is-focus")}),300))},e.handleRestoreAnswer=function(){var t=e.props,n=t.question,r=n.relationship.myAnswer,o=n.id,a=t.restoreAnswer,i=t.showNotification;r.isDeleted&&a(o,r.answerId).then((function(){return i("已撤销删除回答")}))},e.handleAddAnswer=e.context.authRequired((function(t){var n=e.props,r=n.draft,o=n.question.reviewInfo,a=(o=void 0===o?{}:o).tips,i=n.zaId,c=n.cancelScheduledPublish,s=t.currentTarget,l=function(){a?e.props.showNotification(a,"red"):(i&&re.a.trackEvent(null,{id:i}),re.a.trackEvent(Object(et.a)(e),{action:r&&r.editableContent?"Edit":"Answer",is_intent:!0,name:s.textContent}),e.context.startAddAnswer())};r&&r.schedule?tt.a.confirm("如果继续编辑该回答,原定时发送设置将会失效,需重新设置定时发送时间,是否继续编辑?",{title:"编辑回答",text:{ok:"继续编辑",cancel:"我再想想"}}).then((function(){c(e.props.question.id).then(l)}),(function(){})):l()})),e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){Object(ot.b)()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,o=e.size,a=e.preset,i=e.color,c=void 0===i?"blue":i,s=e.onClick,l=this.getRenderProps(),u=l.icon,f=l.text,p=l.props,h=l.Wrapper,b=void 0===h?D.c:h,m=Object(r.c)(d.Fragment,{children:[u,f]});return Object(r.b)(b,Object.assign({},p,s&&{onClick:s},{color:c,size:o,preset:a,className:n,children:t||m}))}}]),n}(d.Component);ct.contextTypes={authRequired:h.a.func,startAddAnswer:h.a.func};var st=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){return{draft:Object(R.n)(e,{id:t.params.id}),question:Object(R.bb)(e,{id:t.params.id})}}),{restoreAnswer:P.A,cancelScheduledPublish:P.e,showNotification:B.h}))(ct),lt=n(870),ut=n(885),dt=n(1097);function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var pt={follow_question:dt.b.follow,write_answer:dt.b.write_answer},ht=function(e){Object(s.a)(n,e);var t=ft(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).createOpenInAppHandler=function(t){var n=e.props,r=n.question.id,o=n.isSpecialQuestionOrAnswer;return function(){o?location.href="zhihu://question/".concat(r,"?utm_app_name=zhihu_check&utm_content=").concat(t):Object($e.e)(Object(ut.a)({type:"question",id:r},{launch_button:pt[t]}))}},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.question,n=e.question,o=n.relationship,a=n.relationship.isAuthor,i=n.isNormal,c=n.status,s=(c=void 0===c?{}:c).isLocked,l=n.questionType,u=n.isMuted,d=n.id,f=e.shouldOia,p=e.inTopBar,h="commercial"===l&&u;return Object(r.c)("div",{className:"QuestionButtonGroup",children:[a&&h?Object(r.b)(at.a,{preset:"primary",a:!0,to:"https://e.zhihu.com",color:"green",children:"推广问题"}):Object(r.b)(lt.a,Object.assign({id:d,zaId:p?3408:3309,type:"question",preset:"primary",isFollowing:(o&&{}.hasOwnProperty.call(o,"isFollowing")?o:t).isFollowing,disabled:h},f&&{onClick:this.createOpenInAppHandler("follow_question")})),i&&!s&&Object(r.b)(st,Object.assign({color:"blue",zaId:p?3409:3311},f&&{onClick:this.createOpenInAppHandler("write_answer")}))]})}}]),n}(d.Component),bt=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n;return{shouldOia:Object(U.h)(e),isSpecialQuestionOrAnswer:Object(U.j)(e,{type:"question",id:null===(n=t.question)||void 0===n?void 0:n.id})}})))(ht),mt=n(20),vt=n.n(mt),gt=n(21),yt=n.n(gt),Ot=n(22),jt=n.n(Ot),wt=n(23),Ct=n.n(wt),kt=n(13),xt=n.n(kt),St=n(5);function Et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xt()(e);if(t){var o=xt()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ct()(this,n)}}var Rt=function(e){jt()(n,e);var t=Et(n);function n(){var e;vt()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={count:Math.round(e.props.count)},e.next=function(){var t=e.props.onEnd,n=e.state.count-1;e.setState({count:n}),0===n&&(clearInterval(e.handle),t&&t())},e}return yt()(n,[{key:"componentDidMount",value:function(){this.state.count<=0||(this.handle=setInterval(this.next,this.props.interval))}},{key:"componentWillUnmount",value:function(){clearInterval(this.handle)}},{key:"render",value:function(){var e=this.state.count;return Object(St.g)("span",null,e)}}]),n}(d.Component);Rt.propTypes={count:h.a.number.isRequired,interval:h.a.number,onEnd:h.a.func},Rt.defaultProps={interval:1e3};var Tt=Rt,At=n(783),Nt=n(213),_t=n(47),It=n(372),Mt=n(859),Lt=n(1654);function Pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Bt=function(e){Object(s.a)(n,e);var t=Pt(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={redirectionLoading:!1,redirectionHidden:!1,invitersHidden:!1,invitationModalShown:!1},e.redirect=function(){var t=e.props,n=t.router,r=t.location.query,o=t.question,a=o.id,i=o.redirection;i&&i.to&&i.to.id&&"1"!==r.nr&&n.push("/question/".concat(i.to.id,"?rf=").concat(a))},e.handleRedirectionClose=function(){e.setState({redirectionHidden:!0,invitersHidden:!0}),e.timeout=setTimeout((function(){e.setState({invitersHidden:!1})}),1e3)},e.handleCloseInviters=function(){e.setState({invitersHidden:!0})},e.handleDeleteInviters=function(t){var n=e.props,r=n.question.id;(0,n.deleteInviters)(r),e.handleCloseInviters(),re.a.trackEvent(t.target,{action:"Ignore"})},e.handleCancelAnonymous=function(){(0,e.props.onInvitationTipClose)(),e.context.toggleAnonymous(!1)},e.handleInvite=function(t){e.setState({invitersHidden:!0,invitationModalShown:!0}),re.a.trackEvent(t.target,{action:"Invite",is_intent:!0})},e.handleInvitationModalHide=function(){e.setState({invitationModalShown:!1})},e}return Object(c.a)(n,[{key:"componentWillMount",value:function(){Object(_t.isBrowser)()&&this.nextQuestion(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.props.question.id!==e.question.id&&this.nextQuestion(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"nextQuestion",value:function(e){var t=this,n=this.context.currentUser,r=e.location.query,o=e.question.id,a=e.fromQuestion,i=e.loadItems,c=e.loadQuestion;clearTimeout(this.timeout),this.setState({redirectionLoading:!1,redirectionHidden:!1,invitersHidden:!1}),n&&"guest"!==n.userType&&i(o,"inviters"),r.rf&&/^\d+$/.test(r.rf)&&!a&&(this.setState({redirectionLoading:!0}),c(Number(r.rf)).catch((function(){})).then((function(){t.setState({redirectionLoading:!1})})))}},{key:"revokeRedirection",value:function(e){var t=this.props,n=t.router,r=t.question.id;(0,t.revokeQuestionRedirection)(e).then((function(){n[e===r?"replace":"push"]("/question/".concat(e))})),this.handleRedirectionClose()}},{key:"renderCommercialMuteStatus",value:function(){var e=this.props.question,t=e.questionType,n=e.isMuted;return e.relationship.isAuthor&&"commercial"===t&&n?Object(r.b)("div",{className:"QuestionStatus-bar",children:Object(r.c)("div",{className:"QuestionStatus-bar-inner",children:[Object(r.c)("div",{className:"QuestionStatus-bar-commercialMuted",children:["该品牌提问尚未激活,无法在社区内流通。请"," ",Object(r.b)("a",{href:"https://e.zhihu.com",target:"_blank",rel:"noopener noreferrer",children:"前往广告平台"})," ","进行设置。"]}),Object(r.b)("p",{children:"未激活的品牌提问页可以添加回答,但相关动态不在社区内流通,包括不会出现在知乎首页、用户主页,也不会被搜索到。当与该品牌提问关联的广告开始投放时,提问被激活,并开始流通。"})]})}):null}},{key:"renderMute",value:function(){var e=this.props,t=e.isMuteSpecial,n=e.isMuteFreeze;return t?Object(r.b)("div",{className:"QuestionStatus-bar",children:Object(r.c)("div",{className:"QuestionStatus-bar-inner",children:[Object(r.b)("strong",{children:"问题已解散"}),Object(r.b)("p",{children:"当前问题下的回答暂时无法查看。"})]})}):n?Object(r.b)("div",{className:"QuestionStatus-bar",children:Object(r.c)("div",{className:"QuestionStatus-bar-inner",children:[Object(r.b)("strong",{children:"问题已冻结"}),Object(r.b)("p",{children:"除浏览外不开放其他用户互动功能。"})]})}):null}},{key:"renderBar",value:function(){var e=this.props.question.status.unnormalDetails;return e&&Object(r.b)("div",{className:"QuestionStatus-bar",children:Object(r.c)("div",{className:"QuestionStatus-bar-inner",children:[Object(r.c)("strong",{children:[e.description,"。"]}),Object(r.c)("em",{children:["原因:",e.reason,"。"]}),1033!==e.reasonId&&Object(r.b)(It.a,{html:e.note})]})})}},{key:"renderNotification",value:function(){var e=this,t=this.props,n=t.location.query,o=t.question,a=o.id,i=o.redirection,c=o.relationship,s=(c=void 0===c?{}:c).myAnswer,l=t.inviters,u=t.fromQuestion,d=t.isAnswerPage,f=this.state,p=f.redirectionLoading,h=f.redirectionHidden,b=f.invitersHidden,m=null,v=null;if(!p)if(i&&i.to&&i.to.id&&!h){var g=i.to,y=g.id,O=g.title,w="1"!==n.nr&&!d;m=w?"redirect-countdown":"redirect",v=Object(r.c)("div",{className:"QuestionStatus-notification-inner",children:[Object(r.c)("div",{className:"QuestionStatus-notification-content",children:[w?Object(r.c)("span",{children:["此问题将在 ",Object(r.b)(Tt,{count:5,onEnd:this.redirect})," ","秒后跳转至"]}):Object(r.b)("span",{children:"此问题已重定向至"})," ",Object(r.b)(at.a,{preset:"plain",to:"/question/".concat(y,"?rf=").concat(a),children:O})]}),Object(r.c)("div",{className:"QuestionStatus-notification-actions",children:[Object(r.b)(D.c,{preset:"plain",className:"QuestionStatus-notification-primary",onClick:function(){return e.revokeRedirection(a)},children:"撤销重定向"}),Object(r.b)("div",{className:"QuestionStatus-notification-divider"}),Object(r.b)(D.c,{preset:"plain",onClick:this.handleRedirectionClose,children:"关闭"})]})]})}else if(u&&u.redirection&&u.redirection.to&&u.redirection.to.id&&u.redirection.to.id===a&&!h){var C=u.id,k=u.title;m="redirect-from",v=Object(r.c)("div",{className:"QuestionStatus-notification-inner",children:[Object(r.c)("div",{className:"QuestionStatus-notification-content",children:["从问题"," ",Object(r.b)(at.a,{preset:"plain",to:"/question/".concat(C,"?nr=1"),children:k})," ","跳转而来"]}),Object(r.c)("div",{className:"QuestionStatus-notification-actions",children:[Object(r.b)(D.c,{preset:"plain",className:"QuestionStatus-notification-primary",onClick:function(){return e.revokeRedirection(C)},children:"撤销重定向"}),Object(r.b)("div",{className:"QuestionStatus-notification-divider"}),Object(r.b)(D.c,{preset:"plain",onClick:this.handleRedirectionClose,children:"关闭"})]})]})}else l&&l.length&&!b&&!s&&(v=Object(r.b)(j.a,{module:"InvitationCard",trackCardShow:!0,children:Object(r.c)("div",{className:"QuestionStatus-notification-inner",children:[Object(r.c)("div",{className:"QuestionStatus-notification-content",children:[l.map((function(e,t){return Object(r.c)("span",{children:[0!==t&&"、",Object(r.b)(Mt.a,{user:e,noBadge:!0,noHoverCard:!0,"data-za-detail-view-element_name":"User"})]},e.urlToken)}))," ","邀请你回答此问题"]}),Object(r.c)("div",{className:"QuestionStatus-notification-actions",children:[Object(r.b)(D.c,{preset:"plain",className:"QuestionStatus-notification-primary",onClick:this.handleInvite,children:"邀请别人"}),Object(r.b)("div",{className:"QuestionStatus-notification-divider"}),Object(r.b)(D.c,{preset:"plain",onClick:this.handleDeleteInviters,children:"忽略邀请"})]}),Object(r.b)("div",{children:Object(r.b)(D.c,{className:"QuestionStatus-notification-closeButton",preset:"plain",onClick:this.handleCloseInviters,icon:At.a})})]})}));return Object(r.b)(Nt.a,{className:"QuestionStatus-notification",notification:v?{key:m,text:v}:null})}},{key:"renderInvitationTip",value:function(){var e=this.props,t=e.invitationTipShown,n=e.onInvitationTipClose;return Object(r.b)(Nt.a,{className:"QuestionStatus-notification",notification:t?{text:Object(r.c)("div",{className:"QuestionStatus-notification-inner",children:[Object(r.b)("div",{className:"QuestionStatus-notification-content",children:"在匿名状态下无法邀请他人回答"}),Object(r.c)("div",{className:"QuestionStatus-notification-actions",children:[Object(r.b)(D.c,{preset:"plain",className:"QuestionStatus-notification-primary",onClick:this.handleCancelAnonymous,children:"取消匿名"}),Object(r.b)("div",{className:"QuestionStatus-notification-divider"}),Object(r.b)(D.c,{preset:"plain",onClick:n,children:"关闭"})]})]})}:null})}},{key:"render",value:function(){var e=this.props.question,t=this.state.invitationModalShown;return Object(r.c)("div",{className:"QuestionStatus",children:[this.renderCommercialMuteStatus(),this.renderMute(),this.renderBar(),this.renderNotification(),this.renderInvitationTip(),Object(r.b)(F.b,{size:"fullPage",onClose:this.handleInvitationModalHide,children:t&&Object(r.b)(Lt.a,{question:e})})]})}}]),n}(d.Component);Bt.contextTypes={currentUser:h.a.object,toggleAnonymous:h.a.func};var zt=Object(E.compose)(Object(T.a)({replacement:null}),o.withRouter,Object(b.connect)((function(e,t){var n=e.entities.questions,r=e.question.inviters,o=t.location.query,a=t.question.id,i={isMuteSpecial:Object(R.C)(t.question),isMuteFreeze:Object(R.B)(t.question),inviters:r[a]};if(o.rf&&/^\d+$/.test(o.rf)){var c=n[Number(o.rf)];c&&(i.fromQuestion=c)}return i}),{loadItems:R.O,loadQuestion:R.Q,revokeQuestionRedirection:R.eb,deleteInviters:R.k}))(Bt),Dt=n(73),Ft=n(977),Ut=n(4),Vt=n(1136);function qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Ht=function(e){Object(s.a)(n,e);var t=qt(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).load=function(){var t=e.props,n=t.parent.id;(0,t.loadQuestionFollowers)(n)},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.parent.followerCount,n=e.isFetching,o=e.isDrained,a=e.items,i=e.currentUser;return Object(r.b)(Vt.a,{currentUser:i,isFetching:n,isDrained:o,items:a,voteupCount:t,onLoad:this.load,text:"关注了"})}}]),n}(d.Component),Kt=Object(b.connect)((function(e,t){var n=t.parent.id,r=e.entities.users,o=e.question,a=o.followers,i=o.concernedFollowers,c=a[n]||{isFetching:!1,isDrained:!1,order:"normal",ids:[]},s=c.isFetching,l=c.isDrained,u=c.order,d=c.ids,f=(i[n]||{ids:[]}).ids;return{isFetching:s,isDrained:l,order:u,items:[].concat(Object(Ut.a)(f),Object(Ut.a)(d.filter((function(e){return!f.includes(e)})))).map((function(e){return r[e]})),currentUser:Object(M.b)(e)}}),{loadQuestionFollowers:R.T})(Ht),Qt=n(273);function Wt(){var e=Object(X.a)(["","也关注了该问题"]);return Wt=function(){return e},e}function Gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Yt=function(e){Object(s.a)(n,e);var t=Gt(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={followersShown:!1},e.showFollowers=function(){e.setState({followersShown:!0})},e.closeFollowers=function(){e.setState({followersShown:!1})},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.question,n=e.currentUser,o=e.concernedFollowers,a=t.followerCount,i=t.visitCount,c=this.state.followersShown;return Object(r.c)("div",{className:"QuestionFollowStatus",children:[Object(r.c)(Ft.a,{divider:!0,className:"QuestionFollowStatus-counts",children:[n?Object(r.b)(Ft.a.Item,{tag:D.c,preset:"plain",onClick:this.showFollowers,name:"关注者",value:a}):Object(r.b)(Ft.a.Item,{name:"关注者",value:a}),Object(r.b)(Ft.a.Item,{name:"被浏览",value:i})]}),Boolean(o&&o.length)&&Object(r.c)(D.c,{preset:"plain",className:"QuestionFollowStatus-people",onClick:this.showFollowers,children:[Object(r.b)("span",{className:"QuestionFollowStatus-people-tip",children:$()(Wt(),1===o.length?o[0].name:"他们")}),o.map((function(e){return Object(r.b)(Mt.a,{user:e,avatar:!0,avatarProps:{size:26,round:!0},noLink:!0,noBadge:!0,noHoverCard:!0},e.id)}))]}),Object(r.b)(Dt.b,{size:"fullPage",onClose:this.closeFollowers,children:c&&Object(r.b)(Kt,{parent:t})})]})}}]),n}(d.Component),Zt=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n=t.params;return{currentUser:Object(M.b)(e),concernedFollowers:Object(R.f)(e,{id:n.id})}}),{loadQuestionConcernedFollowers:R.S}),Object(Qt.a)({shouldLoad:function(e){return e.currentUser&&!e.concernedFollowers},load:function(e){return e.loadQuestionConcernedFollowers(e.params.id)}}))(Yt),Xt=n(574),Jt=n(808),$t=n(1679),en=n(1287),tn=n(84),nn=n(24),rn=n(959),on=n(890),an=n(241),cn=n(1792),sn=n(44),ln=n(1432),un=n(1101),dn=n(52);function fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var pn=function(e){Object(s.a)(n,e);var t=fn(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={commentsShown:!1},e.handleCommentsShow=function(){var t=e.props,n=t.question.reviewInfo.tips,r=t.handleReviewingNotification;n?r():(re.a.trackEvent(Object(et.a)(e),{action:"Comment",element:"Button",is_intent:!0}),e.setState({commentsShown:!0}))},e.handleCommentsClose=function(){e.setState({commentsShown:!1})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.router,n=e.router.location,r=n.pathname,o=n.search,a=Boolean(/^\/question\/(\d*)$/.test(r)),i=Object(sn.parse)(location.search.slice(1)).answer_deleted_redirect;if(a&&"true"!==i){var c=Object(dn.a)(location.hash);this.setState({byComment:c}),c&&(t.replace("".concat(r).concat(o)),this.handleCommentsShow())}}},{key:"componentWillReceiveProps",value:function(e){this.props.question.id!==e.question.id&&this.setState({commentsShown:!1})}},{key:"render",value:function(){var e=this.props,t=e.question,n=e.textStyle,o=e.isMuteSpecial,a=t.commentCount,i=t.adminClosedComment,c=this.state.commentsShown,s="",l=a&&!i;return s="textNumber"===n?l?"评论 ".concat(Object(xe.formatNumber)(a)):"":l?"".concat(Object(xe.formatNumber)(a)," 条评论"):"添加评论",Object(r.c)("div",{className:"QuestionHeader-Comment",children:[Object(r.b)(D.c,{preset:"plain",onClick:this.handleCommentsShow,icon:ln.a,label:s,disabled:o}),Object(r.b)(F.b,{size:"fullPage",onClose:this.handleCommentsClose,children:c&&Object(r.b)(un.a,{type:"question",parent:t,byComment:this.state.byComment,commentNeedsReview:"censor"===t.commentPermission})})]})}}]),n}(d.Component);pn.propTypes={question:h.a.object.isRequired,handleReviewingNotification:h.a.func.isRequired};var hn=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){return{isMuteSpecial:Object(R.C)(t.question)}})))(pn),bn=n(40),mn=n.n(bn),vn=n(57),gn=n(1389);var yn=function(e){var t=Object(d.useRef)(null),n=e.authRequired,o=e.questionId,a=Object(b.useDispatch)(),i=Object(b.useSelector)((function(e){return Object(R.bb)(e,{id:o})})),c=i.relationship,s=c.voting,l=c.isFollowing,u=i.voteupCount,f=i.canVote;Object(d.useEffect)((function(){re.a.trackCardShow(t.current,{name:String(u),id:7228})}),[]);var p=function(){if(!l){var e="0"===String(s);return a(Object(R.nb)(o,e))}},h=de()("GoodQuestionAction-commonBtn",{"GoodQuestionAction-highLightBtn":"1"===String(s)}),m=n(Object(vn.a)(mn.a.mark((function e(){var n;return mn.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a(Object(R.qb)(o,s));case 2:return e.next=4,p();case 4:n="0"===String(s)?"Upvote":"UnUpvote",re.a.trackEvent(t.current,{action:n,name:String(u),id:7229});case 6:case"end":return e.stop()}}),e)}))));return Object(r.b)("div",{className:"GoodQuestionAction",children:f&&Object(r.b)(D.c,{onRef:function(e){return t.current=e},className:h,preset:"plain",onClick:m,icon:gn.a,label:u>0?"好问题 ".concat(u):"好问题"})})},On=n(1388),jn=n(1377),wn={true:{title:"确定解锁问题编辑?",subtitle:"该问题编辑已锁定,解锁后可被其他用户编辑,要解锁编辑吗?",confirmText:"解锁问题编辑"},false:{title:"确定锁定问题编辑?",subtitle:"锁定后,其他用户将不可编辑你提出的问题",confirmText:"锁定问题编辑"}};function Cn(e){var t=e.showModal,n=e.showEncourageAuthorEditLock,o=e.handleConfirmEditLock,i=e.handleEditLockShown,c=n?"编辑已锁定":"锁定编辑",s=Object(d.useRef)(),l=Object(d.useState)(!1),u=Object(a.a)(l,2),f=u[0],p=u[1];Object(d.useEffect)((function(){Oe.a.get("question::hasSeenShowEditLockHint")||Object(jn.b)([Object(jn.a)(3e3).then((function(){Oe.a.set("question::hasSeenShowEditLockHint",!0),p(!0)})),Object(jn.a)(3e3).then((function(){p(!1)}))])}),[]),Object(d.useEffect)((function(){Object(ge.onViewedOnce)(s.current,(function(){re.a.trackCardShow(s.current,{id:7666},{button:{text:c}})}))}),[c]);var h=Object(d.useCallback)((function(){re.a.trackEvent(s.current,{id:7669,action:"Click"},{button:{text:c}}),i()}),[i,c]),b=function(e){var t=e?wn[n].confirmText:"取消";re.a.trackEvent(null,{id:7678,action:"Select",name:t},{button:{text:c}}),e?o():i()};return Object(r.c)(r.a,{children:[Object(r.b)(D.c,{preset:"plain",onClick:h,label:c,icon:On.a,onRef:s}),Object(r.b)(ve.a,{className:"QuestionEditLockMenu-Hint",isOpen:f,target:s.current,placement:"top",children:"锁定后问题不可被其他用户编辑"}),Object(r.b)(rn.a,Object.assign({needCancel:!1,showButtonHorizontal:!0,showConfirmButtonRight:!0,onCancel:function(){return b(!1)},onSubmit:function(){return b(!0)},shown:t},wn[n]))]})}function kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var xn={invitationShown:!1,reportShown:!1,editLockShown:!1,lockTipsShown:!1,deleteShown:!1,redirectionCreatorShown:!1},Sn=[{key:"all",name:"开放评论"},{key:"censor",name:"预审评论"},{key:"nobody",name:"关闭评论"}],En=[{key:"open",name:"开放回答"},{key:"censor",name:"预审回答"}],Rn=function(e){Object(s.a)(n,e);var t=kn(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state=xn,e.handleReviewingNotification=function(){var t=e.props.question.reviewInfo.tips;e.props.showNotification(t,"red")},e.handleInvite=e.context.authRequired((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventId,r=void 0===n?3312:n;re.a.trackEvent(null,{id:r});var o,a=e.props,i=a.question,c=i.relationship.isAnonymous,s=i.status,l=(s=void 0===s?{}:s).isLocked,u=s.isClose,d=s.isEvaluate,f=s.isSuggest,p=i.reviewInfo,h=(p=void 0===p?{}:p).tips,b=a.onInvitationTipShow;h?e.handleReviewingNotification():c?b():(l?o="锁定":u?o="关闭":(d||f)&&(o="建议修改"),o?e.props.showNotification("该问题已被".concat(o,",不能邀请人回答此问题"),"red"):e.handleInvitationShow())}),nn.W.invite),e.handleInvitationShow=function(){return e.setState({invitationShown:!0})},e.handleInvitationHide=function(){return e.setState({invitationShown:!1})},e.handleReport=function(){e.setState({reportShown:!e.state.reportShown})},e.handleEditLockShown=function(){e.setState({editLockShown:!e.state.editLockShown})},e.handleLockClick=function(){return e.props.question.status.isLocked?e.handleUpdateQuestionLocked():e.handleLockTipsShow()},e.handleOpenStatusChange=function(t){var n=e.props;(0,n.updateBrandQuestionOpenStatus)(n.question.id,t)},e.handleUpdateQuestionLocked=function(){var t=e.props,n=t.question.id;(0,t.updateQuestionLocked)(n)},e.handleLockTipsShow=function(){return e.setState({lockTipsShown:!0})},e.handleLockTipsHide=function(){return e.setState({lockTipsShown:!1})},e.handleDelete=function(){return e.setState({deleteShown:!0})},e.handleDeleteModalClose=function(){return e.setState({deleteShown:!1})},e.handleConfirmDelete=function(){e.handleDeleteModalClose();var t=e.props,n=t.question,r=n.id,o=n.questionType,a=t.deleteQuestion,i=t.deleteBrandQuestion;return("commercial"===o?i:a)(r).then((function(){location.href="/"}))},e.handleConfirmEditLock=function(){e.handleEditLockShown();var t=e.props;(0,t.toggleQuestionEditLock)(t.question.id)},e.handleRedirectionCreatorShow=function(){e.props.question.reviewInfo.tips?e.handleReviewingNotification():e.setState({redirectionCreatorShown:!0})},e.handleRedirectionCreatorClose=function(){e.setState({redirectionCreatorShown:!1})},e.handleRedirectionCreated=function(t,n){var r=e.props,o=r.router,a=r.question.id,i=t.id;e.handleRedirectionCreatorClose(),n.then((function(){o.push("/question/".concat(i,"?rf=").concat(a))}))},e.handleCommentPermissionChange=function(t){var n=e.props;(0,n.updateQuestionPermission)(n.question.id,t)},e.handleShareMenuTogglerClick=function(){var t=e.props.question.reviewInfo;return!(t=void 0===t?{}:t).tips||(e.handleReviewingNotification(),!1)},e.toggleAnonymous=function(){var t=e.props,n=t.question.reviewInfo,r=n.tips,o=n.editTips,a=t.isCurrentAnswerCommercialReported;r?e.handleReviewingNotification():o?e.props.showNotification(o,"red"):a?e.props.showNotification("已经进行商业声明的内容不能启用匿名","red"):e.context.toggleAnonymous()},e.getQuestionStatus=function(){return Object(dt.c)(e.props.question.status)},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props.getHandleInvite;e&&e(this.handleInvite)}},{key:"componentWillReceiveProps",value:function(e){this.props.question.id!==e.question.id&&this.setState(xn)}},{key:"renderCommercialMenuItems",value:function(e){var t=this,n=this.props,o=n.permission.canBrandAdminEdit,a=n.question,i=a.status,c=(i=void 0===i?{}:i).isLocked,s=a.commentPermission,l=a.brandOpenStatus,u=a.brand,f=(u=void 0===u?{}:u).isPuQuestion;if(!o)return null;var p=Sn,h=En;return Object(r.c)(d.Fragment,{children:[p.map((function(n){var o=n.key,a=n.name,i=!s&&"all"===o||s===o;return Object(r.c)(tn.b,{className:e,onClick:function(){return t.handleCommentPermissionChange(o)},children:[i&&Object(r.b)(Xt.a,{className:"MenuItem-icon",text:!0,center:!0})," ",a]},o)})),Object(r.b)("li",{className:"Menu-divider"}),(f&&(h=[{key:"open",name:"开放回答"}]),Object(r.c)(r.a,{children:[!c&&h.map((function(n){var o=n.key,a=n.name,i=l===o;return Object(r.c)(tn.b,{className:e,onClick:function(){return!i&&t.handleOpenStatusChange(o)},children:[i&&Object(r.b)(Xt.a,{className:"MenuItem-icon",text:!0,center:!0})," ",a]},o)})),!f&&Object(r.b)(tn.b,{className:e,onClick:t.handleLockClick,children:c?"开放回答":"关闭回答"}),Object(r.b)("li",{className:"Menu-divider"})]}))]})}},{key:"renderMobileMenuItems",value:function(e){var t=this.props,n=t.question.id,o=t.shouldOia;return e.map((function(e){var t=e.text,a=e.handler;return Object(r.b)(tn.b,{onClick:o?function(){return Object($e.e)(Object(ut.a)({type:"question",id:n},{utm_content:"invite"}))}:a,children:t},t)}))}},{key:"renderLogMenuItem",value:function(){var e=this.props,t=e.question.id;return e.shouldOia?Object(r.b)(tn.b,{onClick:function(){return Object($e.e)(Object(ut.a)({type:"question",id:t}))},children:"查看问题日志"}):Object(r.b)(tn.b,{tag:at.a,a:!0,to:"/question/".concat(t,"/log"),children:"查看问题日志"})}},{key:"render",value:function(){var e=this.state,t=e.invitationShown,n=e.reportShown,o=e.editLockShown,a=e.lockTipsShown,i=e.deleteShown,c=e.redirectionCreatorShown,s=this.props,l=s.question,u=s.question,d=u.id,f=u.title,p=u.answerCount,h=u.collapsedAnswerCount,b=u.relationship,m=b.isAuthor,v=b.isAnonymous,g=u.questionType,y=u.isEditable,O=u.author.urlToken,j=u.showEncourageAuthorEditLock,w=s.isMuteSpecial,C=s.isMuteFreeze,k=s.publicEditPermission,x=(k=void 0===k?{}:k).isQuestionRedirectEditable,S=s.currentUserUrlToken,E=s.permission.canBrandAdminEdit,R=s.editQuestionButton,T=this.context.currentUser,A="commercial"===g,N=T&&!m,_=T&&m&&"boolean"==typeof j,I=A?E:Boolean(m&&0===p&&0===h),M=[N&&{text:"举报",icon:Jt.a,handler:this.handleReport}].filter(Boolean),L=O===S,P=Object(dt.e)(y,L,x),B=this.shouldShowAnonymousMenuItem,z=B||this.shouldShowMenu,U=de()("QuestionHeader-menu-item",{"QuestionHeader-menu-item--com":A});return Object(r.c)("div",{className:"QuestionHeaderActions",children:[Object(r.b)(D.c,{color:"grey",style:{marginRight:16},onClick:this.handleInvite,label:"邀请回答",icon:$t.a,disabled:w||C}),Object(r.b)(yn,{questionId:d,authRequired:this.context.authRequired}),Object(r.b)(hn,{question:l,handleReviewingNotification:this.handleReviewingNotification}),Object(r.b)(on.a,{id:d,title:f,href:"/question/".concat(d),onTogglerClick:this.handleShareMenuTogglerClick,type:"question",disabled:w||C}),R,_&&Object(r.b)(Cn,{showModal:o,showEncourageAuthorEditLock:j,handleEditLockShown:this.handleEditLockShown,handleConfirmEditLock:this.handleConfirmEditLock}),z&&Object(r.c)(tn.c,{toggler:Object(r.b)(D.c,{preset:"plain","aria-label":"更多",icon:en.a}),menuClassName:"QuestionHeader-menu",itemClassName:U,children:[!1,B&&Object(r.b)(tn.b,{onClick:this.toggleAnonymous,children:v?"取消匿名身份":"使用匿名身份"}),A&&this.renderCommercialMenuItems(U),I&&Object(r.b)(tn.b,{onClick:this.handleDelete,children:"删除问题"}),P&&!T.isOrg&&"normal"===g&&Object(r.b)(tn.b,{onClick:this.handleRedirectionCreatorShow,children:"问题重定向"}),!A&&this.renderLogMenuItem(),M.map((function(e){var t=e.text,n=e.handler,o=e.disabled;return Object(r.b)(tn.b,{onClick:n,disabled:o,children:"举报问题"},t)}))]}),Object(r.b)(an.a,{type:"question",urlToken:d,shown:n,status:this.getQuestionStatus(),onClose:this.handleReport,zaEnabled:!0}),Object(r.b)(F.b,{size:"fullPage",onClose:this.handleInvitationHide,children:t&&Object(r.b)(Lt.a,{question:l})}),Object(r.b)(rn.a,{title:A?"关闭回答":"锁定问题",subtitle:"".concat(A?"关闭":"锁定","后该问题将无法添加新回答,你确定要").concat(A?"关闭":"锁定","吗?"),shown:a,onCancel:this.handleLockTipsHide,onSubmit:this.handleUpdateQuestionLocked}),Object(r.b)(F.b,{size:"large",title:"问题重定向",onClose:this.handleRedirectionCreatorClose,children:c&&Object(r.b)(cn.a,{question:l,onSubmitted:this.handleRedirectionCreated})}),Object(r.b)(rn.a,{title:"删除问题",subtitle:"你确定要删除这个问题吗?相关的评论也将被删除。",onCancel:this.handleDeleteModalClose,onSubmit:this.handleConfirmDelete,shown:i})]})}},{key:"shouldShowAnonymousMenuItem",get:function(){var e=this.context.currentUser;if(e&&!e.isOrg){var t=this.props,n=t.question,r=n.questionType,o=n.relationship.isAnonymous,a=t.allowCommercialAnonymousAnswer;if(o)return!0;if("normal"===r)return!0;if("commercial"===r&&a)return!0}return!1}},{key:"shouldShowMenu",get:function(){var e=this.props,t=e.question.questionType,n=e.permission.canBrandAdminEdit,r="commercial"===t;return!r||!(!r||!n)}}]),n}(d.PureComponent);Rn.contextTypes={currentUser:h.a.object,authRequired:h.a.func,toggleAnonymous:h.a.func};var Tn=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){return{shouldOia:Object(U.h)(e),isMuteSpecial:Object(R.C)(t.question),isMuteFreeze:Object(R.B)(t.question),publicEditPermission:e.publicEditPermission,currentUserUrlToken:e.currentUser,permission:Object(R.Z)(e),allowCommercialAnonymousAnswer:"show"===Object(U.a)(e,"gue_anonymous"),isCurrentAnswerCommercialReported:Object(R.A)(e,t.question)}}),{deleteQuestion:R.l,deleteBrandQuestion:R.i,updateQuestionLocked:R.ob,toggleQuestionEditLock:R.gb,showNotification:B.h,updateQuestionPermission:R.pb,updateBrandQuestionOpenStatus:R.hb}))(Rn);function An(e){var t=e.brand,n=e.noDivider,o=t.name,a=t.logo,i=t.target,c=t.description,s=t.typeDescription,l=i?"a":"div";return Object(r.c)("div",{className:de()("BrandQuestionSymbol",{"is-mobile":!1}),children:[Object(r.c)(l,Object.assign({className:"BrandQuestionSymbol-brandLink"},i&&{href:"/".concat("organization"===i.userType?"org":"people","/").concat(i.urlToken)},{children:[Object(r.b)("img",{role:"presentation",src:a,className:"BrandQuestionSymbol-logo"}),Object(r.b)("span",{className:"BrandQuestionSymbol-name",children:o}),i&&Object(r.b)(pe.c,{badge:i.badge})]})),Object(r.b)("span",{css:{marginLeft:5},children:c}),Boolean(s)&&Object(r.b)("span",{className:"BrandQuestionSymbol-typeDesc",children:s}),!n&&Object(r.b)("div",{className:"BrandQuestionSymbol-divider"})]})}var Nn=n(1341);function _n(e,t){var n=new Date(e),r=new Date(t),o=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),a=Date.UTC(r.getFullYear(),r.getMonth(),r.getDate());return Math.floor((a-o)/864e5)}var In=Object.assign;var Mn=function(e){return f.a.createElement(Te.a,In({viewBox:"0 0 72 18"},e),f.a.createElement("g",{fillRule:"evenodd"},f.a.createElement("rect",{width:"72",height:"18",rx:"2"}),f.a.createElement("text",{fill:"#FFF",fontSize:"12",fontWeight:"500"},f.a.createElement("tspan",{x:"19",y:"13"},"有奖问答")),f.a.createElement("path",{fill:"#FFF",d:"M13.4 5.8H11a.4.4 0 01-.4-.3l.1-.4 1.6-1.7c.4-.4 1-.5 1.6-.2.5.3.8 1 .7 1.5-.2.6-.7 1-1.3 1zm0-1.9L13 4l-.7.8h1c.3 0 .5-.2.5-.4 0-.3-.2-.5-.5-.5zM10 6.4v1.5H5.8a.8.8 0 110-1.5H10zm.8 0h4.3a.8.8 0 010 1.5H11V6.4zM10 8.7v6H8.4c-.8 0-1.1-.2-1.5-.4-.3-.1-.5-.4-.7-.7-.2-.3-.3-.7-.3-1.5v-.9c0-.8.1-1.1.3-1.5l.7-.7c.4-.2.7-.3 1.5-.3h1.7zm.8 0h1.7c.8 0 1.1.1 1.5.3l.7.7c.2.4.3.7.3 1.5v1c0 .7-.1 1-.3 1.4-.2.3-.4.6-.7.7-.4.2-.7.3-1.5.3h-1.7V8.7zm-3.3-3c-.6 0-1.1-.4-1.3-1-.1-.5.2-1.2.7-1.5.5-.3 1.2-.2 1.6.2l1.6 1.7s.1.3 0 .4c0 .2-.2.2-.3.3H7.6zM8 4a.4.4 0 00-.5 0c-.2 0-.4.3-.3.5 0 .2.2.3.4.3h1L8 4z",fillRule:"nonzero"})))};function Ln(e){var t=["一","二","三"],n=function(){var t=e.question,n=t.id,a=t.prize,i=a.endTime,c=a.rule,s=a.status;return Object(r.c)("div",{className:"BrandQuestionPrizes-tips",children:[Object(r.c)("div",{className:"BrandQuestionPrizes-tip",children:[Object(r.c)("span",{className:"BrandQuestionPrizes-tipTitle",children:["活动时间",""]}),Nn.a(new Date(1e3*i),"yyyy-MM-dd HH:mm")," 截止"]}),Object(r.c)("div",{className:"BrandQuestionPrizes-tip",children:[Object(r.c)("span",{className:"BrandQuestionPrizes-tipTitle",children:["活动规则",""]}),c]}),Object(r.c)("div",{className:"BrandQuestionPrizes-tip",children:[Object(r.c)("span",{className:"BrandQuestionPrizes-tipTitle",children:["获奖公示",""]}),"ongoing"===s&&"获奖名单将在活动结束后公布","finished"===s&&"品牌开奖中,即将公布获奖名单","awarded"===s&&Object(r.b)(o.Link,{target:"_blank",to:"/organization/question/".concat(n,"/winners"),children:"查看获奖名单"}),!1]}),Object(r.c)("div",{className:"BrandQuestionPrizes-rule",children:["品牌方为本问题设置了有奖问答,添加回答即视为参与活动,并同意遵守",Object(r.b)("a",{className:"BrandQuestionPrizes-ruleLink",href:"https://www.zhihu.com/organization/ophelp/norm/53",target:"_blank",rel:"noopener noreferrer",children:"《有奖问答活动管理办法》"})]})]})},a=e.handleToggle,i=e.expanded,c=e.question,s=c.id,l=c.prize,u=c.relationship,d=(u=void 0===u?{}:u).isAuthor,f=c.permission,p=(f=void 0===f?{}:f).isSuperUser;if(!l||!l.status)return null;var h=l.endTime,b=l.prizes,m=l.status,v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=new Date(t),r=Math.floor(n.getTime()/1e3),o=e-r;if(o<0)return null;var a,i=0,c=1,s=60*c,l=60*s,u=24*l;if(o>u){var d=new Date(1e3*e);i=_n(n,d),a="天"}else o>l?(i=Math.floor(o/l),a="小时"):o>s?(i=Math.floor(o/s),a="分钟"):(i=o,a="秒");return{quantity:i,unit:a}}(h);return Object(r.c)("div",{className:de()("BrandQuestionPrizes",{"is-mobile":!1}),children:[Object(r.c)("div",{className:"BrandQuestionPrizes-info",children:[Object(r.c)("div",{className:"BrandQuestionPrizes-bar",onClick:a,children:[Object(r.c)("div",{className:"BrandQuestionPrizes-desc",children:[Object(r.c)("div",{className:"BrandQuestionPrizes-symbol",children:[Object(r.b)(Mn,{alt:"logo",width:72,height:18,fill:"ongoing"===m?"#ff9607":"#999999"}),"ongoing"===m&&Object(r.c)("span",{children:["距离结束还有",Object(r.b)("em",{children:v.quantity}),v.unit]}),"finished"===m&&"待开奖","awarded"===m&&"已开奖"]}),Object(r.c)("div",{className:"BrandQuestionPrizes-name",children:["奖品:",b[0].name,b.length>1&&"等"]})]}),Object(r.c)("div",{className:"BrandQuestionPrizes-images",children:[b.map((function(e,t){var n=e.imageUrl;return n&&Object(r.b)("img",{src:n,role:"presentation"},"BrandQuestionPrizes-images".concat(t))})),Object(r.b)(qe.a,{text:!0,center:!0,fill:"#9fadc7"})]})]}),i&&Object(r.b)("div",{className:"BrandQuestionPrizes-detail",children:b.map((function(e,n){var o=e.imageUrl,a=e.name,i=e.value,c=e.quantity;return Object(r.c)("div",{className:"BrandQuestionPrizes-prize",children:[Object(r.c)("div",{className:"BrandQuestionPrizes-intro",children:[o&&Object(r.b)("img",{className:"BrandQuestionPrizes-prizeImage",src:o,role:"presentation"}),Object(r.c)("div",{className:"BrandQuestionPrizes-prizeInfo",children:[Object(r.c)("div",{className:"BrandQuestionPrizes-prizeName",children:[b.length>1&&"".concat(t[n],"等奖:"),a]}),Object(r.c)("div",{className:"BrandQuestionPrizes-prizeValue",children:["价值 ¥ ",i]})]})]}),Object(r.c)("div",{className:"BrandQuestionPrizes-prizeQuantity",children:[c," 份"]})]},"BrandQuestionPrizes-prize".concat(n))}))}),i&&!1]}),i&&n(),i&&Object(r.b)("hr",{className:"BrandQuestionPrizes-split"}),(p||d)&&Object(r.c)(at.a,{className:"BrandQuestionPrizes-edit",to:"/organization/question/".concat(s,"/setting/").concat("finished"===m?"winners":"prize"),children:["ongoing"===m&&"编辑有奖回答","finished"===m&&"填写获奖名单"]})]})}var Pn=n(403);function Bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var zn=function(e){Object(s.a)(n,e);var t=Bn(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this,t=this.props.question,n=t.id,o=t.permission,a=void 0===o?{}:o,i=a.isSuperUser,c=a.canBrandAdminEdit,s=a.haveCard;return c||i?Object(r.b)(tn.c,{className:"BrandQuestionSettingMenu",toggler:Object(r.b)(D.c,{children:"设置样式"}),children:Object(r.c)(d.Fragment,{children:[Object(r.b)(tn.b,{className:"BrandQuestionSettingMenu-item",onClick:function(){e.context.router.push("/organization/question/".concat(n,"/setting/topbanner"))},children:"设置提问头图"}),Object(r.b)(tn.b,{className:"BrandQuestionSettingMenu-item",onClick:function(){e.context.router.push("/organization/question/".concat(n,"/setting/prize"))},children:"编辑有奖问答"}),s&&Object(r.b)(tn.b,{className:"BrandQuestionSettingMenu-item",onClick:function(){e.context.router.push("/organization/question/".concat(n,"/setting/advanced"))},children:"编辑品牌推荐"})]})}):null}}]),n}(d.Component);zn.contextTypes={currentUser:h.a.object,router:h.a.object};var Dn=Object(E.compose)(Object(b.connect)((function(e,t){return{question:e.entities.questions[t.question.id]}})),Object(Pn.a)())(zn),Fn=n(811),Un=n(1068),Vn=n(390);function qn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Hn=function(e){Object(s.a)(n,e);var t=qn(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleFollow=function(){var t=e.props.pin,n=(t=void 0===t?{}:t).author.isFollowing?1977:1976;e.handleTrack(n)},e.handleTrack=function(t){var n=e.props.pin,r=(n=void 0===n?{}:n).author;re.a.trackEvent(Object(et.a)(e),{id:t},{button:{text:r.name}})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.target,r=n.type,o=n.id,a=t.getPinContents;"pin"===r&&a(o,{failsafe:!0}).then((function(t){var n=t.payload,r=(void 0===n?{}:n).author,o=(r=void 0===r?{}:r).name;re.a.trackCardShow(e,{id:1969},{button:{text:o}})}))}},{key:"render",value:function(){var e=this,t=this.props.pin;if(!t||!t.content)return null;var n=t.author,o=t.id,a=t.content[0].content.replace(/<a.*class="hash_tag".*?<\/a>/g,""),i=n||{},c=i.type,s=i.urlToken,l=i.isFollowing,u="https://www.zhihu.com/pin/".concat(o);return Object(r.c)("div",{className:"QuestionRelatedCard",children:[Object(r.b)("div",{className:"QuestionRelatedCard-title",children:"相关报道"}),Object(r.c)("div",{className:"QuestionRelatedCard-content",children:[Object(r.b)("span",{dangerouslySetInnerHTML:{__html:Object(Un.truncateHTML)(a,110).content}}),u&&Object(r.b)("a",{className:"QuestionRelated-jump",href:u,onClick:function(){e.handleTrack(1975)},children:"查看详情"})]}),s&&Object(r.c)("div",{className:"QuestionRelatedCard-footer",children:[Object(r.c)("div",{children:["来自",Object(r.b)("a",{className:"QuestionRelatedCard-from",href:"https://www.zhihu.com/people/".concat(s),target:"_blank",rel:"noopener noreferrer",onClick:function(){e.handleTrack(1971)},children:n.name})]}),Object(r.b)("div",{onClick:this.handleFollow,children:Object(r.c)(lt.a,{className:"QuestionRelatedCard-follow",type:c,id:s,isFollowing:l,children:[Object(r.b)(Fn.a,{text:!0,center:!0},"icon"),"关注机构"]})})]})]})}}]),n}(d.Component);Hn.propTypes={target:h.a.shape({type:h.a.string,id:h.a.string}).isRequired};var Kn=Object(E.compose)(Object(b.connect)((function(e,t){return{pin:Object(Vn.g)(e,t.target.id)}}),{getPinContents:Vn.e}),Object(j.b)((function(e){return{module:"PinItem",card:{content:{type:"Pin",id:e.target.id}}}})))(Hn);function Qn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Wn=function(e){Object(s.a)(n,e);var t=Qn(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.question.author;return Object(r.b)("div",{className:"OrgQuestionSymbol",children:Object(r.c)("div",{className:de()("OrgQuestionSymbol-inner",{"OrgQuestionSymbol-inner--mobile":!1}),children:[Object(r.c)("div",{className:"OrgQuestionSymbol-main QuestionHeader-main",children:[Object(r.b)("div",{className:"OrgQuestionSymbol-avatar",children:Object(r.b)(Mt.a,{user:e,avatar:!0,avatarProps:{size:38}})}),Object(r.c)("div",{className:"OrgQuestionSymbol-name",children:[Object(r.b)(Mt.a,{user:e})," 的提问"]})]}),Object(r.b)("div",{className:"OrgQuestionSymbol-tip",children:Object(r.b)(at.a,{preset:"plain",a:!0,to:"/org-intro#org-question",target:"_blank",children:"了解机构提问"})})]})})}}]),n}(d.Component),Gn=n(139),Yn=n(842),Zn=n(1480),Xn=n(161);function Jn(){var e=Object(X.a)(["","人评价"]);return Jn=function(){return e},e}var $n=function(e){var t=e.percent,n=e.reviewerCount,o=e.ratioStatus,a=e.title;return Object(r.c)("div",{className:"QuestionTopicReviewCardExtraInfo-cardTitleContainer",children:[Object(r.b)("h3",{className:"QuestionTopicReviewCardExtraInfo-cardTitle",children:a}),"normal"===o?Object(r.c)("div",{children:[" ",Object(r.b)("span",{className:"QuestionTopicReviewCardExtraInfo-percentNum",children:"".concat((10*t).toFixed(),"%")})," ",Object(r.c)("span",{children:["知友推荐 · ",$()(Jn(),n)]})]}):Object(r.b)("span",{children:"  推荐数据积累中"})]})};$n.propType={percent:h.a.number.isRequired,reviewerCount:h.a.string.isRequired};var er=$n,tr=n(32),nr=n(1784),rr=Object(E.compose)(Object(b.connect)(null,(function(e,t){var n=t.metaInfo.id,r=t.questionId;return{onUpdateVoteTopic:function(t){var o=t.voteFor,a=t.method;return e(Object(tr.hb)({questionId:r,id:n,voteFor:o,method:a}))}}})),o.withRouter)(nr.a);function or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ar=function(e){Object(s.a)(n,e);var t=or(n);function n(){var e;Object(i.a)(this,n);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return(e=t.call.apply(t,[this].concat(a))).trackReviewCardOpenUrl=function(e){re.a.trackEvent(e.target,{id:4175,action:"OpenUrl",name:name})},e.renderUnpublishedCard=function(t,n,o){return Object(r.c)(Yn.d,{className:"QuestionHeaderTopicMeta",children:[e.renderCardImage("QuestionHeaderTopicMeta-SideImg"),Object(r.c)("div",{className:"QuestionHeaderTopicMeta-Content",children:[Object(r.c)("div",{className:"QuestionHeaderTopicMeta-UnpublishedTitleContainer",children:[Object(r.b)("h3",{className:"QuestionHeaderTopicMeta-UnpublishedTitle",children:t}),"  ",Object(r.c)("span",{className:"QuestionHeaderTopicMeta-Info QuestionHeaderTopicMeta-UnpublishedInfo",children:["暂无评分",Boolean(n)&&" · ".concat(n," 上映")]})]}),Object(r.b)("div",{className:"QuestionHeaderTopicMeta-Info QuestionHeaderTopicMeta-UnpublishedInfo",dangerouslySetInnerHTML:{__html:o}})]})]})},e}return Object(c.a)(n,[{key:"renderCardImage",value:function(e){var t=this.props,n=t.meta,o=t.meta.meta,a=o.title,i=o.avatar,c=n.avatarUrl,s=n.category;return Object(r.b)(Zn.a,{className:de()("".concat(e),{"QuestionHeaderTopicMeta-SideImg--goods":"n_goods"===s}),src:i||c,alt:a})}},{key:"renderTopReviewCard",value:function(){var e=this.props,t=e.meta,n=e.questionId,o=t.meta,a=o.title,i=o.summary,c=o.description2,s=o.description1,l=o.pubInfo,u=t.excerpt,d=i||u||c||s;if(1===l.status||2===l.status){var f=l.pubDate;return this.renderUnpublishedCard(a,f,d)}return Object(r.b)(Yn.d,{className:"QuestionHeaderTopicMeta",children:Object(r.c)("div",{className:"QuestionHeaderTopicMeta-CardMain",children:[this.renderCardImage("QuestionHeaderTopicMeta-SideImg"),Object(r.b)("div",{className:"QuestionHeaderTopicMeta-Content",children:Object(r.b)(rr,{metaInfo:t,questionId:n,ReviewCardExtraInfoComponent:er,reviewerCountFormatter:xe.formatNumber,children:Object(r.b)("div",{className:"QuestionHeaderTopicMeta-Info",dangerouslySetInnerHTML:{__html:d}})})})]})})}},{key:"render",value:function(){var e=this.props.meta;if(!e)return null;var t=e.category,n=e.id,o=e.vote,a=e.isVote,i=o&&a;if(!i)return null;var c=["like","dislike"].includes(o.status);return Object(r.b)(j.a,Object.assign({module:"TopicItem",moduleName:t},i&&{view:{id:4174,name:c?"已评价":"未评价"}},{card:{content:Object.assign({type:"Topic"},Object(Xn.a)("topic",n),{sub_type:"MetaCard"})},trackCardShow:!0,children:Object(r.b)("a",{href:"/topic/".concat(n),target:"_blank",rel:"noopener noreferrer","data-za-not-track-link":!0,onClick:this.trackReviewCardOpenUrl,children:this.renderTopReviewCard()})}))}}]),n}(d.PureComponent),ir=Object(T.a)(null)(ar),cr=function(e){var t=Object(Gn.default)({},e),n=Object(me.b)(),o=Object(a.a)(n,2),i=o[0],c=o[1];return Object(d.useEffect)((function(){c()}),[]),i?Object(r.b)(ir,Object.assign({},t)):null},sr=Object.assign;var lr=function(e){return f.a.createElement(Te.a,sr({viewBox:"0 0 24 24"},e),f.a.createElement("path",{d:"M17.248 6.5H13.11a.71.71 0 01-.657-.446.731.731 0 01.154-.787l2.812-3.045a2.395 2.395 0 012.926-.392c.95.558 1.527 1.767 1.243 2.844A2.431 2.431 0 0117.248 6.5zm-.114-3.357a.798.798 0 00-.572.24l-1.265 1.474h1.95c.447 0 .695-.44.695-.893a.815.815 0 00-.808-.821zM11.286 7.61v2.857H3.429a1.429 1.429 0 010-2.857h7.857zm1.428 0h7.857a1.429 1.429 0 010 2.857h-7.857V7.611zm-1.428 4.286V22.61H6.23c-.892 0-1.215-.093-1.541-.267a1.817 1.817 0 01-.756-.756c-.175-.326-.267-.65-.267-1.54V14.46c0-.892.092-1.215.267-1.541.174-.326.43-.582.756-.756.326-.174.649-.267 1.54-.267h5.056zm1.428 0h5.055c.892 0 1.215.093 1.541.267.326.174.582.43.756.756.175.326.267.65.267 1.54v5.587c0 .892-.092 1.215-.267 1.541-.174.326-.43.582-.756.756-.326.174-.649.267-1.54.267h-5.056V11.897zM6.752 6.5a2.431 2.431 0 01-2.341-1.826c-.284-1.077.293-2.286 1.243-2.844a2.395 2.395 0 012.926.392l2.812 3.045a.731.731 0 01.153.787.711.711 0 01-.656.446H6.752zm.686-3.117a.798.798 0 00-.976-.13c-.317.185-.585.637-.49.996a.81.81 0 00.78.608h1.951L7.438 3.383z"}))};function ur(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var dr=function(e){Object(s.a)(n,e);var t=ur(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={remainedTime:null},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.totalCountdownTime,r=t.onFinish;"number"==typeof n?(this.setState({remainedTime:n}),this.timer=setInterval((function(){e.setState({remainedTime:e.state.remainedTime-5})}),5e3)):"function"==typeof r&&r()}},{key:"componentDidUpdate",value:function(){var e=this.props.onFinish;this.state.remainedTime<=0&&(clearInterval(this.timer),"function"==typeof e&&e())}},{key:"componentWillUnmount",value:function(){clearInterval(this.timer)}},{key:"renderCountdownTime",value:function(){var e=this.state.remainedTime;if(e<60)return Object(r.c)(d.Fragment,{children:["距结束不足 ",Object(r.b)("span",{children:"1"})," 分钟"]});var t,n,o=(t=e,n=Math.floor(t/60),{hours:Math.floor(n/60),minutes:n%60}),a=o.hours,i=o.minutes;return 0===a?Object(r.c)(d.Fragment,{children:["距结束还有 ",Object(r.b)("span",{children:i})," 分钟"]}):Object(r.c)(d.Fragment,{children:["距结束还有 ",Object(r.b)("span",{children:a})," 小时"," ",i>0&&Object(r.c)(d.Fragment,{children:[Object(r.b)("span",{children:i})," 分钟"]})]})}},{key:"render",value:function(){var e=this.props.className;return null===this.state.remainedTime?Object(r.b)("div",{className:e,children:"距结束还有"}):Object(r.b)("div",{className:e,children:this.renderCountdownTime()})}}]),n}(d.Component);function fr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}dr.propTypes={totalCountdownTime:h.a.number.isRequired,onFinish:h.a.func};var pr=function(e){Object(s.a)(n,e);var t=fr(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={expanded:!1,bodyHeight:0},e.contentRef=Object(d.createRef)(),e.handleExpand=function(){var t=e.contentRef.current;e.setState({expanded:!0,bodyHeight:"".concat(t.offsetHeight+1,"px")}),re.a.trackEvent(Object(et.a)(e),{id:5036,action:"Expand"})},e.handleCollapse=function(){e.setState({expanded:!1,bodyHeight:0}),re.a.trackEvent(Object(et.a)(e),{id:5037,action:"Fold"})},e.handleClickHeader=function(){e.state.expanded?e.handleCollapse():e.handleExpand()},e.handleCountdownFinish=function(){var t=e.props;(0,t.removeBrandQuestionRedPacket)(t.questionId)},e}return Object(c.a)(n,[{key:"renderCountdown",value:function(){var e=this.props.redPacket,t=e.countDownType,n=e.countDownValue,o="".concat("CommercialAnswerRedPacket","-countdown");return 2===t?Object(r.b)(dr,{className:o,totalCountdownTime:n,onFinish:this.handleCountdownFinish}):Object(r.c)("div",{className:o,children:["还剩 ",Object(r.b)("span",{children:Object(xe.cnNiceNumber)(n)}),"个红包"]})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.redPacket,o=n.title,a=n.image,i=n.iconText,c=n.content,s=this.state,l=s.expanded,u=s.bodyHeight;return Object(r.b)(j.a,{view:{id:5035},trackCardShow:!0,children:Object(r.c)("div",{className:de()("CommercialAnswerRedPacket",t,Object(le.a)({},"".concat("CommercialAnswerRedPacket","--expanded"),l)),children:[Object(r.c)("div",{className:"".concat("CommercialAnswerRedPacket","-header"),onClick:this.handleClickHeader,children:[Object(r.c)("div",{className:"".concat("CommercialAnswerRedPacket","-main"),children:[Object(r.c)("div",{className:"".concat("CommercialAnswerRedPacket","-subtitle"),children:[Object(r.c)("div",{className:"".concat("CommercialAnswerRedPacket","-badge"),children:[Object(r.b)("span",{children:Object(r.b)(lr,{size:11})}),Object(r.b)("span",{children:i})]}),this.renderCountdown()]}),Object(r.b)("div",{className:"".concat("CommercialAnswerRedPacket","-title"),children:o})]}),Object(r.b)("div",{className:"".concat("CommercialAnswerRedPacket","-image"),children:Object(r.b)("img",{src:Object(Se.imgUrl)(a,"xl")})}),Object(r.b)("div",{className:"".concat("CommercialAnswerRedPacket","-icon"),children:l?Object(r.b)(ee.a,{size:20}):Object(r.b)(qe.a,{size:20})})]}),Object(r.b)("div",{className:"".concat("CommercialAnswerRedPacket","-body"),style:{height:u},children:Object(r.b)("div",{ref:this.contentRef,className:"".concat("CommercialAnswerRedPacket","-content"),dangerouslySetInnerHTML:{__html:c}})})]})})}}]),n}(d.Component),hr=Object(b.connect)(null,{removeBrandQuestionRedPacket:R.db})(pr),br=n(835),mr=Object(T.a)(null)((function(e){var t,n,o,a=e.id,i=e.question,c=function(e,t){var n=Object(b.useSelector)((function(t){var n,r;return null==t||null===(n=t.question)||void 0===n||null===(r=n.questionBanners)||void 0===r?void 0:r[e]})),r=Object(b.useDispatch)();return Object(d.useEffect)((function(){t&&r(Object(R.u)(e))}),[t,r,e]),n}(a,null==i?void 0:i.isBannered),s=null==c||null===(t=c[0])||void 0===t||null===(n=t.imagePc)||void 0===n?void 0:n[0],l=null==c||null===(o=c[0])||void 0===o?void 0:o.verbPc;if(Object(d.useEffect)((function(){s&&re.a.trackCardShow(null,{id:7707},{button:{text:l}})}),[s,l]),!s)return null;var u=c[0],f=u.targetLinkPc,p=u.entryVerbPc,h=u.imagePc,m=h[0].url,v=h[0].color;return f&&l&&p&&m?Object(r.b)(ke.Link,{className:"Card",css:{display:"block",fontSize:0,marginBottom:16},href:f,onClick:function(e){re.a.trackEvent(e.target,{id:7708,action:"OpenUrl"},{link:{url:f},button:{text:l}})},target:"_blank",children:Object(r.c)("div",{className:"BackgroundContainer",css:function(e){return{background:"".concat(e.colorMod(v).alpha(1))}},children:[Object(r.c)("div",{className:"BackgroundContainer-content",children:[Object(r.b)(ke.Image,{src:m,css:{height:"100%",width:"100%",objectFit:"cover"}}),Object(r.b)("div",{className:"BackgroundContainer-modal",css:function(e){return{background:"linear-gradient(270deg, ".concat(e.colorMod(v).alpha(1),", ").concat(e.colorMod(v).alpha(.2),")")}}})]}),Object(r.c)("div",{className:"ContentContainer",children:[Object(r.b)("div",{children:l}),Object(r.c)("div",{className:"ContentContainer-title",children:[Object(r.b)("div",{children:p}),Object(r.b)(br.a,{size:24,center:!0})]})]})]})}):null}));function vr(){var e=Object(X.a)(["","提问:"]);return vr=function(){return e},e}function gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var yr=function(e){Object(s.a)(n,e);var t=gr(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={collapsed:!0,editShown:!1,invitationTipShown:!1,brandQuestionPrizesExpanded:!1},e.getHandleInvite=function(t){t&&(e.handleInvite=t)},e.handleExpand=function(){e.setState({collapsed:!1}),re.a.trackEvent(null,{id:6783,action:"Click"})},e.handleCollapse=function(){e.setState({collapsed:!0,shareMenuPositionStatus:"normal"})},e.handleEditShow=e.context.authRequired((function(){var t=(e.props.question.reviewInfo||{}).editTips;t?e.props.showNotification(t,"red"):e.setState({editShown:!0})})),e.handleEditClose=function(){e.setState({editShown:!1})},e.handleInvitationShow=function(){e.setState({invitationModalShown:!0})},e.handleInvitationHide=function(){e.setState({invitationModalShown:!1})},e.handleInvitationTipShow=function(){e.setState({invitationTipShown:!0})},e.handleInvitationTipClose=function(){e.setState({invitationTipShown:!1})},e.handleRedirectionCreatorShow=function(){e.setState({redirectionCreatorShown:!0})},e.handleRedirectionCreatorClose=function(){e.setState({redirectionCreatorShown:!1})},e.handleRedirectionCreated=function(t,n){var r=e.props,o=r.router,a=r.question.id,i=t.id;e.handleRedirectionCreatorClose(),n.then((function(){o.push("/question/".concat(i,"?rf=").concat(a))}))},e.handleDelete=function(){var t=e.props,n=t.question.id,r=t.isCommercialQuestion,o=t.deleteQuestion,a=t.deleteBrandQuestion;return r?a(n).then((function(){location.href="/"})):o(n).then((function(){location.href="/"}))},e.handleConfirmDelete=function(){e.handleDeleteModalClose(),e.handleDelete()},e.handleDeleteModalShow=function(){e.setState({deleteModalShown:!0})},e.handleDeleteModalClose=function(){e.setState({deleteModalShown:!1})},e.handlePositionStatusChange=function(t){e.setState({shareMenuPositionStatus:t})},e.handleUpdateQuestionLocked=function(){var t=e.props,n=t.question.id;(0,t.updateQuestionLocked)(n)},e.handleLockTipsShow=function(){return e.setState({lockTipsShown:!0})},e.handleLockTipsHide=function(){return e.setState({lockTipsShown:!1})},e.handleBrandQuestionPrizesToggle=function(){e.setState({brandQuestionPrizesExpanded:!e.state.brandQuestionPrizesExpanded})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.isAnswerPage,e.question.id),n=e.isCommercialQuestion,r=e.loadBrand,o=e.loadQuestionCommercialBanner,a=e.loadBrandQuestionRedPacket,i=e.loadBrandQuestionPermission,c=e.loadBrandQuestionOpenStatus,s=e.loadBrandQuestionAdvancedStyle,l=e.loadBrandQuestionPrize,u=this.context.currentUser;this.context.currentUser&&Object(oe.c)("question",t,oe.a),n&&(r(t),o(t),s(t),a(t).then((function(e){e&&e.payload||l(t)})),u&&"guest"!==u.userType&&(i(t),c(t)))}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.question.id,r=t.isAnswerPage,o=e.question,a=o.id,i=o.relationship.isAnonymous,c=e.isAnswerPage;!this.state.collapsed&&e.question&&this.props.question&&e.question.detail.length!==this.props.question.detail.length&&this.setState({collapsed:!0,editShown:!1}),n===a&&r===c||this.setState({collapsed:!0,invitationTipShown:!1}),i||this.setState({invitationTipShown:!1})}},{key:"componentDidUpdate",value:function(e,t){var n=this.state.collapsed,r=t.collapsed;if(n&&!r){var o=this.container.getBoundingClientRect().top;window.scrollTo(0,window.pageYOffset+o-document.documentElement.clientHeight)}}},{key:"renderEditModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.permitEditTopics,n=this.props,o=n.question,a=n.brand,i=o.id,c=o.title,s=o.editableDetail,l=o.topics,u=o.questionType,d=o.relationship.isAnonymous,f=this.state.editShown;return Object(r.b)(Ve.a,{id:i,title:c,detail:s,topics:l,questionType:u,isAnonymous:d,show:f,onClose:this.handleEditClose,brand:a,permitEditTopics:t})}},{key:"renderFooter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.permitEditQuestion,n=e.permitEditTopics,o=this.props,a=o.question,i=o.isCommercialQuestion,c=this.state.collapsed,s=this.context.currentUser,l=i&&!0;return Object(r.c)("div",{className:"QuestionHeader-footer",children:[Object(r.b)("div",{className:"QuestionHeader-footer-inner",children:Object(r.c)("div",{className:"QuestionHeader-main QuestionHeader-footer-main",children:[Object(r.b)(bt,{question:a}),l&&Object(r.b)(Dn,{question:a}),Object(r.b)(Tn,{question:a,onInvitationTipShow:this.handleInvitationTipShow,getHandleInvite:this.getHandleInvite,editQuestionButton:t&&Object(r.b)(Ge,{onClick:this.handleEditShow,text:"修改问题"})}),Object(r.b)("div",{className:"QuestionHeader-actions",children:!c&&Object(r.c)(D.c,{preset:"plain",onClick:this.handleCollapse,children:["收起 ",Object(r.b)(ee.a,{center:!0})]})})]})}),s&&this.renderEditModal({permitEditTopics:n})]})}},{key:"renderSpecialQuestionAuthor",value:function(){var e=this.props.question.author;return Object(r.c)(d.Fragment,{children:[Object(r.b)(be,{className:"QuestionHeader-specialQuestionAuthor",author:e}),Object(r.b)("div",{className:"QuestionHeader-topicDivider"})]})}},{key:"render",value:function(){var e=this,t=this.props,n=t.location,o=t.question,i=t.isAnswerPage,c=t.isCommercialQuestion,s=t.isOrgQuestion,l=t.isAuthorCurrentUser,u=t.brand,d=t.publicEditPermission,f=t.meta,p=t.permission.canBrandAdminEdit,h=o.title,b=o.detail,m=o.topics,v=void 0===m?[]:m,g=o.author,y=o.showAuthor,O=o.showEncourageAuthor,w=o.excerpt,C=o.thumbnailInfo,k=o.isEditable,x=o.id,S=o.reviewInfo,E=o.relatedCards,R=void 0===E?[]:E,T=o.annotationDetail,A=o.redPacket,N=o.isVisible,_=o.relationship.isAuthor,I=this.state,M=I.collapsed,L=I.invitationTipShown,P=I.brandQuestionPrizesExpanded,B=Object(a.a)(f,1)[0],z=v.map((function(e){return{name:e.name,id:e.id}})),D=d||{},F=D.isQuestionEditable,U=D.isQuestionTopicEditable,V=Object(dt.e)(k,l,F)||p,q=Object(dt.e)(k,l,U)||p,H=this.renderFooter({permitEditQuestion:V,permitEditTopics:q});return Object(r.c)("div",{"data-zop-question":JSON.stringify({title:h,topics:z,id:x,isEditable:k}),children:[Object(r.b)(ie.a,{children:Object(r.b)(zt,{question:o,location:n,invitationTipShown:L,onInvitationTipClose:this.handleInvitationTipClose,isAnswerPage:i})}),c&&(!M||!i)&&Object(r.b)(se.a,{type:o.type,id:o.id}),Object(r.b)(j.a,{module:"QuestionDescription",card:{content:{type:"Question",token:String(x)}},children:Object(r.c)("div",{children:[!1===N&&_&&Object(r.c)("div",{className:"QuestionReviewing",children:[Object(r.b)("div",{className:"QuestionReviewing-title",children:"内容审核中"}),Object(r.b)("div",{className:"QuestionReviewing-text",children:"内容将在审核通过后自动发布"})]}),Object(r.c)("div",{className:"QuestionHeader",ref:function(t){e.container=t},children:[Object(r.c)("div",{className:"QuestionHeader-content",children:[Object(r.c)("div",{className:"QuestionHeader-main",children:[Object(r.b)(mr,{id:x,question:o}),Object(r.c)("div",{className:"QuestionHeader-tags",children:[c&&Object(r.b)(An,{brand:u}),Object(r.c)("div",{className:"QuestionHeader-topics",children:[Boolean(y&&!(c&&(null==u?void 0:u.name)))&&this.renderSpecialQuestionAuthor(),v.map((function(e){return Object(r.b)(Ue,{item:e},e.id)}))]})]}),Object(r.c)("h1",{className:"QuestionHeader-title",children:[s&&$()(vr(),g.name),h]}),Boolean(!y&&!s&&!c&&O)&&Object(r.b)(we,{question:o,isAuthorCurrentUser:l,hasExtraContent:this.hasExtraContentUnderAuthor}),Object(r.b)(ce.a,{item:o,annotationProps:T&&{annotationDetail:T}}),R[0]&&Object(r.b)(Kn,{target:R[0]}),A&&Object(r.b)(hr,{questionId:x,redPacket:A}),Object(r.b)(Ln,{question:o,expanded:P,handleToggle:this.handleBrandQuestionPrizesToggle}),Object(r.c)(me.a,{children:[Object(r.b)(Pe,{questionId:x,isInAnswerPage:i}),!c&&Object(r.b)(cr,{meta:B,questionId:x})]}),Object(r.b)(Je,{html:b,reviewInfo:S,excerpt:w,thumbnailInfo:C,collapsed:M,onExpand:this.handleExpand,onEdit:this.handleEditShow,isVisible:N,isAuthor:_})]}),Object(r.b)("div",{className:"QuestionHeader-side",children:Object(r.b)("div",{className:"QuestionHeader-follow-status",children:Object(r.b)(Zt,{question:o})})})]}),M?H:Object(r.b)(te.a,{bottom:!0,container:function(){return e.container},onPositionStatusChange:this.handlePositionStatusChange,children:H}),s&&Object(r.b)(Wn,{question:o})]})]})}),Object(r.b)(ae.a,{children:Object(r.c)("div",{className:"QuestionHeader-content",children:[Object(r.b)("div",{className:"QuestionHeader-main",children:Object(r.b)("h1",{className:"QuestionHeader-title",onClick:function(){Object(ne.scrollTo)(window,{top:0,behavior:"smooth"})},children:h})}),Object(r.b)(j.a,{module:"ToolBar",card:{content:{type:"Question",token:String(x)}},children:Object(r.b)("div",{className:"QuestionHeader-side",children:Object(r.b)(bt,{question:o,inTopBar:!0})})})]})})]})}},{key:"hasExtraContentUnderAuthor",get:function(){var e=this.props,t=e.question,n=e.isCommercialQuestion,r=e.meta,o=t.relatedCards,i=void 0===o?[]:o,c=t.annotationDetail,s=t.redPacket,l=t.prize,u=Object(a.a)(r,1)[0];return c||i[0]||s||(null==l?void 0:l.status)||u&&!n}}]),n}(d.PureComponent);yr.contextTypes={authRequired:h.a.func,currentUser:h.a.object},yr.propTypes={question:h.a.object,location:h.a.object,isAnswerPage:h.a.bool};var Or=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n=e.question.brand,r=e.publicEditPermission,o=e.currentUser,a=t.question,i=a.questionType,c=a.author;return{brand:n,publicEditPermission:r,currentUserUrlToken:o,permission:Object(R.Z)(e),isCommercialQuestion:"commercial"===i,isOrgQuestion:"org"===i,isAuthorCurrentUser:Object(M.i)(e,c)}}),{loadBrand:R.F,updateQuestionLocked:R.ob,deleteQuestion:R.l,deleteBrandQuestion:R.i,showNotification:B.h,loadQuestionCommercialBanner:R.R,loadBrandQuestionRedPacket:R.L,loadBrandQuestionPermission:R.J,loadBrandQuestionOpenStatus:R.I,loadBrandQuestionAdvancedStyle:R.G,loadBrandQuestionPrize:R.K}))(yr),jr=n(1159),wr=n(1789);function Cr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}function kr(e){var t=e.toString();return 1===t.length?"0".concat(t):t}var xr=function(e){var t=Object(w.parseInputTime)(e);return t?"".concat(t.getFullYear(),"-").concat(kr(t.getMonth()+1),"-").concat(kr(t.getDate()),"T").concat(kr(t.getHours()),":").concat(kr(t.getMinutes()),":").concat(kr(t.getSeconds())):""};function Sr(){var e=document.querySelector("#js-answerAddCard");e?e.scrollIntoView({block:"end"}):window.scrollTo(0,0)}var Er=function(e){Object(s.a)(n,e);var t=Cr(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={anonymousConfirmShown:!1,answering:!1,hideIsMutedCover:!1,signFlowModalShown:!1},e.editableStatscReporter=Object(jr.c)("AnswerPage"),e.getPublicEditPermission=function(){var t=e.props,n=t.question,r=t.currentUserUrlToken,o=t.getPublicEditPermission,a=O()(n,"author.urlToken","");O()(n,"isEditable",!1)&&r&&a!==r&&o()},e.handleToggleAnonymous=function(){var t=e.props,n=t.showNotification,r=t.reward.question,o=void 0===r?{}:r,a=t.id;a&&o[a]&&o[a].isRewardable?n("已开启赞赏的回答无法设为匿名,请先关闭赞赏","red"):e.setState({anonymousConfirmShown:!e.state.anonymousConfirmShown})},e.startAddAnswer=function(){var t=e.props,n=t.params.answerId,r=t.location.query.group_id;n||r?(e.context.router.push("/question/".concat(e.props.id)),setTimeout(e.focusAddAnswer)):e.focusAddAnswer()},e.endAddAnswer=function(){e.setState({answering:!1})},e.focusAddAnswer=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Sr(),e.setState({answering:Date.now()},(function(){t&&setTimeout(Sr)}))},e}return Object(c.a)(n,[{key:"getChildContext",value:function(){return{toggleAnonymous:this.handleToggleAnonymous,startAddAnswer:this.startAddAnswer,endAddAnswer:this.endAddAnswer}}},{key:"componentDidMount",value:function(){var e=this;Object(jr.d)();var t,n=this.props,r=n.question,o=n.answer,a=n.currentUser;(!(t=null==o?void 0:o.updatedTime)||Date.now()-1e3*t>6e4)&&Object(I.loadScript)("https://zz.bdstatic.com/linksubmit/push.js",{crossOrigin:void 0}),Promise.resolve(r?this.fetchDraft():this.fetchQuestionAndDraft()).then((function(){var t=e.props.draft;if(!e.props.params.answerId){var n="#draft"===location.hash||"#write"===location.hash;(t&&!t.schedule||!t&&n)&&e.focusAddAnswer(n)}})),this.getPublicEditPermission(),a&&"guest"!==a.userType||this.setState({signFlowModalShown:!0})}},{key:"componentDidUpdate",value:function(e){this.props.params.id!==e.params.id&&this.fetchQuestionAndDraft()}},{key:"componentWillUnmount",value:function(){this.subscription&&this.subscription.unsubscribe(),this.scrollSubscription&&this.scrollSubscription.unsubscribe()}},{key:"fetchQuestionAndDraft",value:function(){var e=this.props,t=e.id,n=e.loadQuestion;return Promise.all([n(t),this.fetchDraft()])}},{key:"fetchDraft",value:function(){var e,t=this.props.loadDraft;return this.context.currentUser&&(e=t(this.props.params.id)),this.setState({anonymousConfirmShown:!1}),e}},{key:"renderMeta",value:function(){var e=this.props.question,t=Object(dt.d)(e);return Object.keys(t).map((function(e){return Object(r.b)("meta",{itemProp:e,content:t[e]},e)}))}},{key:"renderJSONLD",value:function(){var e=this.props,t=e.location,n=e.question,o=e.answer,i=e.params.answerId,c=e.ua;if(!/baiduspider/i.test(c.origin))return null;var s=Boolean(i),l=s?o:n;if(l){var u=s?[l.createdTime,l.updatedTime]:[l.created,l.updatedTime],d=Object(a.a)(u,2),f=d[0],p=d[1],h=xr(f),b=xr(p);return Object(r.b)("script",{type:"application/ld+json",children:'\n {\n "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",\n "@id": "https://www.zhihu.com'.concat(t.pathname,'",\n "appid": "否",\n "pubDate": "').concat(h,'",\n "upDate": "').concat(b,'"\n }')})}}},{key:"handleSignFlowModalClose",value:function(){this.setState({signFlowModalShown:!1})}},{key:"render",value:function(){var e,t=this,n=this.props,o=n.location,a=n.params,i=n.children,c=n.question,s=n.router.location.query,l=n.meta,u=n.answer,f=n.firstAnswer,p=Boolean(a.answerId);if(!c)return Object(r.b)("div",{});if("true"===s.answer_deleted_redirect)return Object(r.b)(Z,{id:c.id});var h=c.questionType,b=c.isMuted,v=c.title,y=c.relationship,O=y.isAuthor,w=y.myAnswer,C=c.visibleOnlyToAuthor;if(!p&&!O&&C||p&&(null==u?void 0:u.visibleOnlyToAuthor)&&!(null==u||null===(e=u.relationship)||void 0===e?void 0:e.isAuthor))return Object(r.b)(S,{});var k=this.state,x=k.anonymousConfirmShown,E=k.answering,R=k.hideIsMutedCover,T=k.signFlowModalShown,A=p?u:c;return Object(r.b)(m.b,{content:{type:"Question",token:String(null==c?void 0:c.id)},children:Object(r.b)(j.a,{module:"QuestionItem",card:{content:{type:"Question",token:String(c.id)}},children:Object(r.c)("div",{className:"QuestionPage",itemScope:!0,itemType:"http://schema.org/Question",children:[Object(r.b)(K,{}),A&&Object(r.b)(N,{entity:A}),T&&Object(r.b)(z.b,{showQrcodeFirst:!0,titlePart:Object(r.b)(wr.a,{title:"登录知乎,问答干货一键收藏"}),maskClosable:!1,defaultType:"login",onClose:function(){t.handleSignFlowModalClose()}}),Object(r.b)(g.a,Object.assign({title:v},!p&&{meta:Object(_.c)(c,f)})),this.renderMeta(),this.renderJSONLD(),"commercial"===h&&b&&!R&&O&&Object(r.b)("div",{className:"QuestionPage-commercialIsMutedCover",onClick:function(){t.setState({hideIsMutedCover:!0})}}),C&&O&&!p&&Object(r.b)("div",{className:"QuestionPage-visibleYourself",children:"仅自己可见"}),Object(r.b)(Or,{meta:l,question:c,location:o,onToggleAnonymous:this.handleToggleAnonymous,isAnswerPage:p}),Object(r.b)(jr.a.Provider,{value:this.editableStatscReporter,children:Object(d.cloneElement)(d.Children.only(i),{question:c,answering:E})}),Object(r.b)(H,{question:c,myAnswer:w,shown:x,onClose:this.handleToggleAnonymous})]})})})}}]),n}(d.PureComponent);Er.fetchData=function(e){var t=e.dispatch,n=e.getState,r=e.params,o=r.id,a=r.answerId;return n().env.userAgent.isBot?Promise.all([t(Object(R.X)(o,a)),t(Object(R.Y)(o)),t(Object(R.Q)(o))]):t(Object(R.Q)(o))},Er.contextTypes={router:h.a.object,currentUser:h.a.object,authRequired:h.a.func},Er.childContextTypes={toggleAnonymous:h.a.func,startAddAnswer:h.a.func,endAddAnswer:h.a.func};var Rr=Object(b.connect)((function(e,t){var n=t.params,r=n.id,o=n.answerId,a=e.question.meta,i=e.entities.drafts,c=void 0===i?{}:i,s=e.env,l=s.referer,u=s.userAgent,d=e.reward,f=void 0===d?{}:d,p=e.currentUser,h=Boolean(o);return Object.assign({id:r,meta:a[r]||[],question:Object(R.bb)(e,{id:r}),reward:f,draft:c["question_".concat(r)],referer:l,ua:u,currentUserUrlToken:p,currentUser:Object(M.b)(e)},h?{answer:Object(P.c)(e,{id:o})}:{firstAnswer:Object(P.j)(e,{id:r})})}),{loadQuestion:R.Q,loadDraft:R.N,updateQuestionAnonymous:R.mb,showNotification:B.h,getPublicEditPermission:L.b})(Er),Tr=n(368),Ar=n(1366),Nr=n(1301);var _r=function(e){var t=e.className,n=e.type,o=n.icon,a=n.text,i=e.active,c=void 0!==i&&i,s=e.onClick;return Object(r.c)("div",{className:de()("QuestionType",t,{"QuestionType--active":c}),onClick:s,children:[Object(r.b)(o,{className:"QuestionType-icon",size:18}),a]})},Ir=n(543);var Mr=Object(b.connect)((function(e,t){var n=t.location.query.type;return{allWaitingQuestions:e.question.waitingQuestions,defaultType:Ir.b.find((function(e){return e.queryName===n}))||Ir.b[0]}}),{getWaitingQuestions:R.x,getWaitingInvitedQuestions:R.w,deleteWaitingQuestion:R.m,ignoreToolsQuestionInvite:R.z})((function(e){var t=e.allWaitingQuestions,n=e.defaultType,i=e.getWaitingQuestions,c=e.getWaitingInvitedQuestions,s=e.deleteWaitingQuestion,l=e.ignoreToolsQuestionInvite,u=Object(d.useRef)(null),f=Object(d.useState)(n.name),p=Object(a.a)(f,2),h=p[0],b=p[1],m=Object(d.useState)(Ir.b.reduce((function(e,t){var n=t.name;return Object.assign({},e,Object(le.a)({},n,0))}),{})),v=Object(a.a)(m,2),y=v[0],O=v[1],j=t[h].paging,w=function(){return c((null==j?void 0:j.next)?j.next:"notifications/v3/timeline/entry/invite?invite_with_time_slice=1&limit=20&offset=0")},C=Object(d.useState)(new Set),k=Object(a.a)(C,2),x=k[0],S=k[1],E=t[h],R=E.isEnd,T=E.isLoading,A=E.questions.filter((function(e){var t=Object(Ir.a)(e,h).question,n=t.ignoreId,r=t.id;return!x.has(n||r)}));return Object(r.c)("div",{className:"QuestionWaiting",children:[Object(r.b)(g.a,{title:"等你来答"}),Object(r.c)(Yn.d,{className:"QuestionWaiting-mainColumn",children:[Object(r.b)(te.a,{offset:62,children:function(e){var n=e.isFixed;return Object(r.c)("div",{className:de()("QuestionWaiting-typesContainer",{"QuestionWaiting-typesContainer--fixed":n}),children:[n&&Object(r.b)("div",{className:"QuestionWaiting-typesTopper"}),Object(r.b)("div",{className:de()("QuestionWaiting-types",{"QuestionWaiting-types--fixed":n}),children:Ir.b.map((function(e){return Object(r.b)(o.Link,{to:e.queryName?"/question/waiting?type=".concat(e.queryName):"/question/waiting","data-za-detail-view-id":5362,"data-za-extra":JSON.stringify({button:{text:e.text}}),children:Object(r.b)(_r,{className:"QuestionWaiting-type",type:e,active:e.name===h,onClick:function(){return function(e){O(Object.assign({},y,Object(le.a)({},h,window.pageYOffset)));var n=e.name,r=e.request,o=r.endpoint,a=r.query;t[e.name].questions.length||("invite"!==e?i({type:n,endpoint:o,query:a}):w()),b(n),window.scrollTo(0,y[n])}(e)}})},e.name)}))})]})}}),Object(r.b)(Tr.b,{ref:u,className:"QuestionWaiting-questions",onLoad:function(){"invite"===h?w():i({type:h,endpoint:n.request.endpoint,query:n.request.query,offset:A.length})},isLoading:T,placeholder:Object(r.b)(Tr.a,{className:"QuestionWaiting-placeholder"}),isDrained:R,children:A.map((function(e){var t,n=Object(Ir.a)(e,h),o=n.question,a=n.headerInfo,i=n.extraFooter,c=n.showTime,d=n.button,f=n.titleLink,p=n.zaContent;return Object(r.b)(Nr.a,{className:"QuestionWaiting-questionItem",question:o,headerInfo:a,extraFooterInfo:i,showTime:c,enableIgnore:!0,handleIgnoreQuestion:(t=o.ignoreId||o.id,function(){S(new Set(x).add(t)),"invite"===h?l(t):s(t),u.current.maybeRun()}),button:d,titleLink:f,zaContent:p,zaId:{titleClick:5364,expand:5365,cardShow:5363,writeAnswer:5367,ignoreQuestion:5366}},e.id)}))})]}),Object(r.b)(Ar.a,{omit:{noBanner:!0,noCategory:!0}})]})})),Lr=n(18),Pr=function(e){return f.a.createElement(Lr.a,e,f.a.createElement("path",{d:"M12.004 4.15a7.85 7.85 0 1 1-5.772 13.17.85.85 0 0 1 1.25-1.153 6.15 6.15 0 1 0-1.559-5.087l1.208.343a.542.542 0 0 1 .112.996l-2.597 1.42a.542.542 0 0 1-.732-.21l-1.44-2.561a.542.542 0 0 1 .62-.787l1.182.334a7.852 7.852 0 0 1 7.728-6.465zm-.178 3.792c.385 0 .7.31.7.69l-.003 3.495 2.564 1.693c.315.207.425.671.185.977-.24.305-.69.33-.99.126 0 0-2.53-1.663-2.844-1.9-.315-.236-.315-.551-.315-.551l.003-3.84c0-.38.315-.69.7-.69z",fillRule:"evenodd"}))};Pr.defaultProps={name:"Later"};var Br=Pr,zr=n(810),Dr=n(233),Fr=n.n(Dr);var Ur=function(e){var t=e.className,n=e.titleClassName,o=e.sourceClassName,i=e.hideButtonClassName,c=e.question,s=c.id,l=c.title,u=c.detail,f=c.excerpt,p=c.isDeleted,h=e.mainSource,b=e.subSource,m=e.mainTool,v=e.subTool,g=e.zaId,y=void 0===g?{}:g,O=e.onMouseEnter,w=void 0===O?Fr.a:O,C=e.onMouseLeave,k=void 0===C?Fr.a:C,x=e.onExpand,S=void 0===x?Fr.a:x,E=e.onCollapse,R=void 0===E?Fr.a:E,T="https://www.zhihu.com/question/".concat(s),A=Object(d.useState)(!0),N=Object(a.a)(A,2),_=N[0],I=N[1],M=Object(d.useCallback)((function(e){I(!0),R(e),re.a.trackEvent(e.target,{id:y.collapse,action:"Collapse"})}),[I,R,y]),L=Object(d.useCallback)((function(e){I(!1),S(e),re.a.trackEvent(e.target,{id:y.expand,action:"Expand"})}),[I,S,y]);return p?Object(r.c)("div",{className:de()("ListQuestionItem","ListQuestionItem--deleted",t),children:[Object(r.b)("div",{className:"ListQuestionItem-hint",children:"该问题已被删除"}),Object(r.b)("div",{className:"ListQuestionItem-mainTool",children:m})]}):Object(r.b)(j.a,{module:"QuestionItem",card:{content:{type:"Question",token:String(s)}},trackCardShow:Boolean(y.cardShow),view:{id:y.cardShow},children:Object(r.c)("div",{className:de()("ListQuestionItem",t),onMouseEnter:w,onMouseLeave:k,children:[(h||b)&&Object(r.c)("div",{className:de()("ListQuestionItem-source",o),children:[h&&Object(r.b)("div",{className:"ListQuestionItem-mainSource",children:h}),b&&Object(r.b)("div",{className:"ListQuestionItem-subSource",children:b})]}),Object(r.b)("a",{className:de()("ListQuestionItem-title",n,{"ListQuestionItem-title--noDetail":!u}),href:T,target:"_blank",rel:"noopener noreferrer","data-za-detail-view-id":y.titleClick,children:l}),u&&Object(r.b)(Je,{className:"ListQuestionItem-RichText",html:u,reviewInfo:{},excerpt:f,collapsed:_,onExpand:L,editable:!1}),Object(r.c)("div",{className:"ListQuestionItem-tool",children:[Object(r.c)("div",{className:"ListQuestionItem-mainTool",children:[Object(r.b)(at.a,{className:"ListQuestionItem-writeAnswerButton",color:"blue",icon:We.a,label:"写回答",href:"".concat(T,"#write"),target:"_blank","data-za-not-track-link":!0,onClick:function(e){re.a.trackEvent(e.target,{id:y.writeAnswer,action:"Answer"})}}),m]}),(v||!v&&!_)&&Object(r.c)("div",{className:"ListQuestionItem-subTool",children:[v,!_&&Object(r.c)("div",{className:de()("ListQuestionItem-hideButton",i),onClick:M,children:["收起",Object(r.b)(ee.a,{className:"ToolsQuestionItem-hideButtonIcon",center:!0})]})]})]})]})})},Vr=n(2230),qr=n.n(Vr);function Hr(e){var t=e.laterQuestions,n=e.getLaterQuestions,i=e.updateLaterQuestion,c=Object(d.useRef)(null),s=Object(d.useState)(new Set),l=Object(a.a)(s,2),u=l[0],f=l[1],p=t.count,h=t.isEnd,b=t.isLoading,m=t.questions.filter((function(e){return!u.has(e.id)}));return Object(r.c)("div",{className:"QuestionLater",children:[Object(r.c)(Yn.d,{className:"QuestionLater-mainColumn",children:[Object(r.c)("div",{className:"QuestionLater-title",children:[Object(r.b)(Br,{className:"QuestionLater-titleIcon",size:30}),"我的稍后答",Boolean(p)&&Object(r.b)("div",{className:"QuestionLater-titleNumber",children:p})]}),!b&&0===m.length&&Object(r.c)("div",{className:"QuestionLater-empty",children:[Object(r.b)("img",{className:"QuestionLater-emptyImage",src:qr.a,alt:""}),Object(r.c)("div",{className:"QuestionLater-emptyText",children:["还没有稍后答,",Object(r.b)(o.Link,{className:"QuestionLater-emptyLink",to:"/question/waiting",children:"看看为你推荐的问题"})]})]}),Object(r.b)(Tr.b,{ref:c,className:"QuestionLater-questions",onLoad:function(){return n(20,m.length)},isLoading:b,placeholder:Object(r.b)(Tr.a,{className:"QuestionLater-placeholder"}),isDrained:h,children:m.map((function(e){return Object(r.b)(Ur,{className:"QuestionLater-questionItem",question:e,zaId:{titleClick:5372,expand:5373,cardShow:5375,writeAnswer:5374},mainTool:Object(r.c)(d.Fragment,{children:[Object(r.c)(D.c,{className:de()("QuestionLater-deletingButton"),preset:"outline",color:"grey",onClick:function(t){f(new Set(u).add(e.id)),i(e.id,!1),c.current.maybeRun(),re.a.trackEvent(t.target,{id:5376,action:"Delete"})},children:[Object(r.b)(zr.a,{size:22}),"移除"]}),!e.isDeleted&&Object(r.c)("div",{className:"QuestionLater-info",children:[Object(xe.formatNumber)(e.answerCount)," 个回答"," · ",Object(xe.formatNumber)(e.visitCount)," 个浏览"]})]})},e.id)}))})]}),Object(r.b)(Ar.a,{omit:{noWrite:!0,noCreator:!0,noBanner:!0,noCategory:!0}})]})}Hr.fetchData=function(e){return(0,e.dispatch)(Object(R.t)())};var Kr=Object(b.connect)((function(e){return{laterQuestions:e.question.laterQuestions}}),{getLaterQuestions:R.s,updateLaterQuestion:R.kb})(Hr),Qr=n(1376);var Wr=function(e){var t=e.users,n=void 0===t?[]:t;return 0===n.length?null:1===n.length?Object(r.b)(Mt.a,{user:n[0]}):2===n.length?Object(r.c)(d.Fragment,{children:[Object(r.b)(Mt.a,{user:n[0]})," 和 ",Object(r.b)(Mt.a,{user:n[1]})]}):3===n.length?Object(r.c)(d.Fragment,{children:[Object(r.b)(Mt.a,{user:n[0]}),"、",Object(r.b)(Mt.a,{user:n[1]})," 和"," ",Object(r.b)(Mt.a,{user:n[2]})]}):n.length>3?Object(r.c)(d.Fragment,{children:[Object(r.b)(Mt.a,{user:n[0]}),"、",Object(r.b)(Mt.a,{user:n[1]})," 和"," ",Object(r.b)(Mt.a,{user:n[2]})," 等 ",n.length," 人"]}):null};var Gr=function(e){var t=e.user,n=t.isFollowed,o=t.isFollowing,a=t.gender,i=null;return n&&o?i="互相关注":o&&(i="你关注了".concat(function(e){return 0===e?"她":1===e?"他":"TA"}(a))),i?Object(r.b)("div",{className:"RelationLabel",children:i}):null},Yr=n(358),Zr=Yr.a[0];function Xr(e){var t=e.allInvitedQuestions,n=e.getInvitedQuestions,o=e.ignoreInvitedQuestion,i=e.updateLaterQuestion,c=Object(d.useRef)(null),s=Object(d.useState)(Zr),l=Object(a.a)(s,2),u=l[0],f=l[1],p=Object(d.useState)(new Set),h=Object(a.a)(p,2),b=h[0],m=h[1],v=Object(d.useState)(new Set),g=Object(a.a)(v,2),y=g[0],O=g[1],j=Object(d.useState)(Yr.a.reduce((function(e,t){var n=t.name;return Object.assign({},e,Object(le.a)({},n,0))}),{})),w=Object(a.a)(j,2),C=w[0],k=w[1],x=t[u.name],S=x.isEnd,E=x.isLoading,R=x.questions.filter((function(e){var t=e.question;return!b.has(t.id)}));return Object(r.c)("div",{className:"QuestionInvited",children:[Object(r.c)(Yn.d,{className:"QuestionInvited-mainColumn",children:[Object(r.c)("div",{className:"QuestionInvited-title",children:["邀请回答",Boolean(t.total.count)&&Object(r.b)("div",{className:"QuestionInvited-titleNumber",children:t.total.count-C.total})]}),Object(r.b)("div",{className:"QuestionInvited-tabs",children:Yr.a.map((function(e){return Object(r.c)("div",{className:de()("QuestionInvited-tab",{"QuestionInvited-tab--active":e.name===u.name}),onClick:function(){return function(e){t[e.name].questions.length||n(e,20,0),re.a.trackEvent(null,{id:5377},{button:{text:e.text}}),f(e)}(e)},children:[Object(r.b)("div",{className:"QuestionInvited-tabTitle",children:e.text}),Object(r.b)("div",{className:"QuestionInvited-tabMeta",children:t[e.name].count-C[e.name]})]},e.name)}))}),Object(r.b)(Tr.b,{ref:c,className:"QuestionInvited-questions",onLoad:function(){return n(u,20,R.length)},isLoading:E,placeholder:Object(r.b)(Tr.a,{className:"QuestionInvited-placeholder"}),isDrained:S,children:R.map((function(e){var t=e.inviters,n=e.question;return Object(r.b)(Ur,{className:"QuestionInvited-questionItem",question:n,zaId:{titleClick:5378,expand:5379,cardShow:5380,writeAnswer:5381},mainSource:Object(r.c)("div",{className:"QuestionInvited-questionItemMainSource",children:[Object(r.b)(Wr,{users:t})," 邀请你回答"]}),subSource:1===t.length&&Object(r.b)(Gr,{user:t[0]}),mainTool:Object(r.c)(d.Fragment,{children:[Object(r.c)(D.c,{className:de()("QuestionInvited-deletingButton"),preset:"outline",color:"grey",onClick:function(e){m(new Set(b).add(n.id)),k(Object.assign({},C,Object(le.a)({total:C.total+1},u.name,C[u.name]+1))),o(n.id),c.current.maybeRun(),re.a.trackEvent(e.target,{id:5382,action:"Ignore"})},children:[Object(r.b)(Qr.a,{size:18}),"忽略"]}),Object(r.c)(D.c,{className:de()("QuestionInvited-laterButton",{"QuestionInvited-laterButton--active":y.has(n.id)}),preset:"outline",color:"grey",onClick:function(e){var t=!y.has(n.id),r=new Set(y);t?r.add(n.id):r.delete(n.id),O(r),i(n.id,t),re.a.trackEvent(e.target,{id:5383,action:t?"Add":"UnAdd"})},children:[y.has(n.id)?null:Object(r.b)(Br,{}),y.has(n.id)?"已添加":"稍后答"]}),Object(r.c)("div",{className:"QuestionInvited-info",children:[Object(xe.formatNumber)(n.answerCount)," 个回答"," · ",Object(xe.formatNumber)(n.visitCount)," 个浏览"]})]})},n.id)}))})]}),Object(r.b)(Ar.a,{omit:{noWrite:!0,noCreator:!0,noBanner:!0,noCategory:!0}})]})}Xr.fetchData=function(e){return(0,e.dispatch)(Object(R.r)())};var Jr=Object(b.connect)((function(e){return{allInvitedQuestions:e.question.invitedQuestions}}),{getInvitedQuestions:R.q,ignoreInvitedQuestion:R.y,updateLaterQuestion:R.kb})(Xr),$r=n(132),eo=n(797),to=n(78),no=n(409),ro=n(2135),oo=n(2136),ao=n(402),io=n(72),co=n(56);var so=n(1463),lo=n(1462),uo=n(876);function fo(e){if(!Object(no.a)(e))return"";var t="";return Object(ro.a)(e)?t+="今天":Object(oo.a)(e)?t+="昨天":t+=Object(ao.a)(e,"yyyy/MM/dd"),0!==function(e){Object(co.a)(1,arguments);var t=Object(io.a)(e),n=t.getSeconds();return n}(e)?t+=" "+Object(ao.a)(e,"HH:mm:ss"):0!==Object(so.a)(e)?t+=" "+Object(ao.a)(e,"HH:mm"):0!==Object(lo.a)(e)&&(t+=" "+Object(lo.a)(e)+"点"),t}var po=function(e){var t=e.event,n=e.status,o=t.isOnline,a=t.events;if(!o&&0===n)return null;var i=Object($r.f)(),c=i.colors,s=c.GBL05A,l=c.GBK09A,u=c.GBK99A,d=c.GBL01A,f=i.fontWeights;return Object(r.b)(ke.Box,{pt:"16px",css:Object.assign({},Object($r.c)({borderTop:"1px solid ".concat(l)}),{"&::after":{content:"''",display:"block",position:"absolute",width:"2px",height:"calc(100% - 30px - 52px)",backgroundColor:s,opacity:.12,left:"24px",top:"30px"}}),children:a.map((function(e,t){var o=e.content,a=e.created,i=e.url,c=0===t;return 1===n&&t>2?null:Object(r.c)(uo.b,{zaBlock:"EventItem",target:"_blank","data-za-detail-view-id":6621,href:i,pl:"40px",css:{paddingLeft:"40px",paddingRight:"16px",position:"relative",display:"block",paddingBottom:"16px","&::after":Object.assign({content:"''",zIndex:1,display:"block",position:"absolute",left:"25px",top:"0.5em",transform:"translateX(-50%)",boxShadow:"0px 0px 0px 2px ".concat(u),borderRadius:"50%",width:"6px",height:"6px",background:s},c&&{background:d,border:"2px solid ".concat(u),boxShadow:"0 0 0 1px ".concat(d)})},children:[Object(r.b)(ke.Text,{css:Object.assign({color:s},c&&{color:d,fontWeight:f.bold}),children:fo(1e3*a)}),Object(r.c)(ke.Flex,{flexDirection:"row",alignItems:"center",mt:"6px",color:"GBK02A",css:Object.assign({},c&&{fontWeight:f.bold}),children:[Object(r.b)(ke.Text,{flex:"0 1 auto",css:Object($r.d)(1),children:o}),Object(r.b)(br.a,{text:!0,css:{color:s,flex:"0 0 auto"}})]})]},a+i)}))})},ho=function(e){var t=e.slice(0,2).map((function(e){return e.content})).join("、");return t.length<=16?t:e[0]&&e[0].content},bo=function(e){var t=e.event,n=e.status,o=e.onClick,a=t.url,i=!a,c=null,s=qe.a,l=6623;return 0===n?c="显示全部":1==n?(c=i?"展开全部进展":"查看全部进展",l=i?6623:6622,s=i?qe.a:br.a):2==n&&(c="收起",s=ee.a),Object(r.c)(Re.a,{zaAction:a?"OpenUrl":null,zaBlock:"ViewAll","data-za-detail-view-id":l,target:"_blank",flex:"0 0 auto",ml:"8px",color:"GBL05A",css:{display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer"},onClick:function(e){a||(e.preventDefault(),o(!1))},href:a,children:[c,Object(r.b)(s,{})]})},mo=function(e){var t=e.event,n=e.status,o=e.onChangeStatus,a=t.isOnline,i=t.url,c=t.events;if(a&&c.length<=3&&!i)return null;var s=Object(d.useRef)(),l=Object(to.c)((function(){0===n||1===n?o(2):2===n&&o(a?1:0),setTimeout((function(){var e;return null===(e=s.current)||void 0===e?void 0:e.check()}))}));return Object(r.b)(te.a,{ref:s,bottom:!0,children:Object(r.c)(ke.Flex,{flexDirection:"row",alignItems:"center",justifyContent:a||2===n?"flex-end":"flex-start",bg:"GBK99B",pl:"20px",pr:"13px",height:"48px",css:function(e){return Object($r.c)({borderTop:"1px solid ".concat(e.colors.GBK09A)})},children:[!a&&2!==n&&Object(r.c)(ke.Text,{children:[ho(c),"等 ",c.length," 个事件进展"]}),Object(r.b)(bo,{event:t,status:n,onClick:l})]})})},vo=function(e){var t=e.event,n=t.isOnline,o=t.url,i=Object(d.useState)((function(){return o||n?1:0})),c=Object(a.a)(i,2),s=c[0],l=c[1];return Object(r.c)(r.a,{children:[Object(r.b)(po,{event:t,status:s}),Object(r.b)(mo,{event:t,status:s,onChangeStatus:l})]})},go={special_event:"事件讨论",timeline_event:"最新进展"};var yo=function(e){var t,n=e.question;if(!(null===(t=n.event)||void 0===t?void 0:t.events))return null;var o=Object($r.f)().colors,a=o.GBK09A,i=o.GBL01A,c=n.event,s=n.id,l=c.url,u=c.type,d=c.title,f=c.isOnline,p=function(e){var t=e.match(/special\/(\d+)/);return t&&t[1]}(l);return Object(r.b)(m.b,{block:"SpecialTimeline",content:{type:"SpecialTopic",token:p},children:Object(r.b)(j.a,{trackCardShow:!0,module:"Content",content:{type:"SpecialTopic",token:p,parent_token:String(s)},extra:{button:{text:f?"online":"offline"}},view:{id:6620},children:Object(r.c)(m.e,{as:Yn.d,zaType:"Card",css:{fontSize:15},children:[Object(r.c)(ke.Flex,{flexDirection:"row",alignItems:"center",pl:"18px",height:"48px",css:Object($r.c)({borderTop:"1px solid ".concat(a)}),children:[Object(r.b)(eo.a,{css:{color:i},size:20}),Object(r.c)(ke.Text,{fontWeight:"bold",ml:"10px",children:[go[u]," · ",d]})]}),Object(r.b)(vo,{event:c})]})})})},Oo=n(923),jo=n(1482),wo=n(112),Co=n.n(wo),ko=n(33),xo=n.n(ko),So=n(80),Eo=n.n(So),Ro=n(949),To=n(1352),Ao=n(1794),No=n(935),_o=n(1306),Io=function(e){function t(){var e,n;vt()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=Ct()(this,(e=xt()(t)).call.apply(e,[this].concat(o)))).state={display:!1},n.handleCloseByDocument=function(e){e.target.closest("div")&&"Pc-word-card-sign-label"!==e.target.closest("div").className&&n.setState({display:!1})},n.handleClick=function(){n.setState((function(e){return{display:!e.display}}));var e=n.sign.querySelector(".Pc-word-card-sign-label").getBoundingClientRect(),t=e.left,r=e.top,o=e.width,a=e.height+15,i=Math.floor(o/2);n.sign.querySelector(".Pc-word-card-sign-popup").style.top="".concat(r+a,"px"),n.sign.querySelector(".Pc-word-card-sign-popup").style.left="".concat(t-i,"px")},n.handleClose=function(){n.props.onClose&&n.props.onClose()},n.handleRef=function(e){n.sign=e},n}return jt()(t,e),yt()(t,[{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleCloseByDocument)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleCloseByDocument)}},{key:"render",value:function(){return f.a.createElement("div",{className:"Pc-word-card-sign",ref:this.handleRef},f.a.createElement("div",{className:"Pc-word-card-sign-label",onClick:this.handleClick},"广告​",f.a.createElement(_o.a,{name:"triangle",className:"Pc-word-card-sign-svg"})),f.a.createElement("div",{className:"Pc-word-card-sign-popup ".concat(this.state.display?"Pc-word-card-sign-popup--isShowed":"Pc-word-card-sign-popup--isHidden")},f.a.createElement("span",{className:"Pc-word-card-sign-popup-arrow"}),f.a.createElement("div",{className:"Pc-word-card-sign-popup-menu"},f.a.createElement("button",{type:"button",onClick:this.handleClose},"不感兴趣"),f.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"/promotion-intro"},"知乎广告介绍"))))}}]),t}(d.Component);Io.propTypes={onClose:h.a.func};var Mo=function(e){function t(){var e,n;vt()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=Ct()(this,(e=xt()(t)).call.apply(e,[this].concat(o)))).state={display:!0},n.handleClick=function(e){e.stopPropagation();var t=Object(To.a)(n.props).ad.clickTracks;Object(No.a)(t)},n.handleClose=function(){var e=Object(To.a)(n.props).ad.closeTracks;Object(No.b)(e).then((function(){n.setState((function(e){return{display:!e.display}})),n.props.onClose&&n.props.onClose()}))},n.handleRef=function(e){n.root=e},n}return jt()(t,e),yt()(t,[{key:"componentDidMount",value:function(){if(this.root&&!this.props.preview){var e=Object(To.a)(this.props).ad,t=e.impressionTracks,n=e.debugTracks,r={impressionTracks:t,viewTracks:e.viewTracks,debugTracks:n};Object(No.d)(this.root,r),Object(No.c)(n,!!this.props.data.adjson)}}},{key:"render",value:function(){if(!this.state.display)return null;var e=Object(To.a)(this.props),t=e.ad,n=e.creative,r=t.expand.displayAdvertisingTag,o=n.asset,a=o.title,i=o.desc,c=o.cta,s=o.landingUrl,l=o.brandName,u=o.brandLogo;return f.a.createElement("div",{className:"Pc-word",ref:this.handleRef},f.a.createElement("div",{className:"Pc-word-card"},f.a.createElement(Lo,{href:s,onClick:this.handleClick},f.a.createElement(Po,{data:{name:l,logo:u}})),r&&f.a.createElement(Io,{onClose:this.handleClose}),f.a.createElement(Lo,{href:s,onClick:this.handleClick},f.a.createElement("h2",{className:"Pc-word-card-title"},a),f.a.createElement("div",{className:"Pc-word-card-content "},i&&f.a.createElement(f.a.Fragment,null,f.a.createElement("span",null,i),f.a.createElement("span",{className:"Pc-word-card-content-cta "},c))))))}}]),t}(d.Component);function Lo(e){var t=e.children,n=Eo()(e,["children"]);return f.a.createElement("a",xo()({target:"_blank"},n),t)}function Po(e){var t=e.data,n=t.name,r=t.logo;return f.a.createElement("div",{className:"Pc-word-card-brand"},f.a.createElement("div",{className:"Pc-word-card-brand-wrapper"},f.a.createElement("img",{width:"20",height:"20",src:r,alt:"logo"}),f.a.createElement("span",null,n)))}function Bo(e){var t=Object(Ao.a)(e.data);return t&&t.adjson?f.a.createElement(Ro.a,null,f.a.createElement(Mo,xo()({},e,t))):null}Mo.propTypes={data:h.a.object.isRequired,onClose:h.a.func};var zo=n(884),Do=n(1132),Fo=n(6);var Uo={isDrained:!1,isFetching:!1,ids:[]};function Vo(e,t){var n=t.id,r=t.resource;return e.question[r][n]||Uo}var qo=function(e){var t=e.item,n=Object(Ce.a)(e,["item"]);return Object(r.b)(zo.a,{children:Object(r.b)(Do.a,Object.assign({editable:!0,expanded:!0,relatedTo:"question",answer:t,zaInfos:{cardShow:4351,index:String(n.dataZaIndex)}},n))},t.id)},Ho=function(e,t,n){var r=t.relationship,o=r.canCollapseAnswers,a=r.canStickAnswers,i=t.hasPublishingDraft,c=e.map((function(e,t){return qo({item:e,canCollapse:o,canStick:a,hasPublishingDraft:i,itemProp:0===t?"acceptedAnswer":"suggestedAnswer",dataZaIndex:t})}));return n?c:Object(ie.b)(2,c)},Ko=function(e,t){return e.map((function(e){return t[e]})).filter((function(e){return e&&!e.isDelete}))},Qo=Object(_t.isBrowser)()?Co()(Ko,(function(e,t){return"".concat(e.join(","),"-").concat(t.length)})):Ko;function Wo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Go=function(e){Object(s.a)(n,e);var t=Wo(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).load=function(){var t=e.props,n=t.isFetching,r=t.id,o=t.loadNotificationAnswers;n||o(r)},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isDrained,n=e.id,r=e.items,o=e.router;r.length||o.replace(location.pathname),(t||r.length)&&Object(R.P)(n)}},{key:"render",value:function(){var e=this.props,t=e.question,n=t.id,o=t.answerCount,a=e.question,i=e.items,c=e.isFetching,s=e.isDrained;return Object(r.c)("div",{className:"QuestionAnswers-answers",children:[Object(r.b)(Yn.d,{children:Object(r.c)(jo.a,{to:"/question/".concat(n),children:["查看全部 ",Object(xe.formatNumber)(o)," 条回答"]})}),Object(r.c)(Yn.d,{children:[Object(r.c)(Oo.b,{children:[Ho(i,a),c&&Object(r.b)(Tr.a,{className:"List-item"})]}),!s&&!c&&Object(r.b)(jo.a,{onClick:this.load,children:"更多"})]}),Object(r.b)(Yn.d,{children:Object(r.c)(jo.a,{to:"/question/".concat(n),children:["查看全部 ",Object(xe.formatNumber)(o)," 条回答"]})})]})}}]),n}(d.PureComponent),Yo=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n=Vo(e,{id:t.id,resource:"notificationAnswers"}),r=n.isFetching,o=n.isDrained,a=n.ids;return{isFetching:r,isDrained:o,items:Qo(a,e.entities.answers)}}),{loadNotificationAnswers:R.P}))(Go),Zo=n(917),Xo=n(178),Jo=n(1164);function $o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ea=[{text:"默认排序",value:"default"},{text:"".concat("按","时间排序"),value:"updated"}],ta={updatedAnswers:"updated",answers:"default"};var na=function(e){Object(s.a)(n,e);var t=$o(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleResourceChange=function(t){e.props.router.push("/question/".concat(e.props.question.id).concat("default"===t?"":"/answers/".concat(t)))},e}return Object(c.a)(n,[{key:"componentWillReceiveProps",value:function(e){JSON.stringify(this.props.permission)!==JSON.stringify(e.permission)&&this.loadQuestionAnswerCount(e)}},{key:"loadQuestionAnswerCount",value:function(e){var t=e.question,n=t.id,r=t.questionType,o=e.permission.canBrandAdminEdit,a=e.loadBrandQuestionAnswerCount;"commercial"===r&&o&&a(n)}},{key:"renderAnswerListHeader",value:function(){var e=this.props,t=e.resource,n=e.question,o=n.id,a=n.answerCount,i=n.questionType,c=n.brand,s=(c=void 0===c?{}:c).isPuQuestion,l=e.commonAnswerCount,u=e.hiddenAnswerCount,d=e.permission.canBrandAdminEdit,f=s?"":",由品牌推荐";return"commercial"===i&&void 0!==s?d?Object(r.c)("div",{className:"QuestionAnswers-navs",children:[Object(r.c)(D.c,{preset:"plain",className:de()("QuestionAnswers-nav",{"is--active":["answers","updatedAnswers"].includes(t)}),onClick:function(){location.href="/question/".concat(o)},children:[Object(xe.formatNumber)(l)," 个回答",f]}),Object(r.c)(D.c,{preset:"plain",className:de()("QuestionAnswers-nav",{"is--active":"hiddenAnswers"===t}),onClick:function(){location.href="/question/".concat(o,"/answers/hidden")},children:[Object(xe.formatNumber)(u)," 个隐藏回答"]})]}):Object(r.c)("span",{children:[Object(xe.formatNumber)(a)," 个回答 ",f]}):Object(r.c)("span",{children:[Object(xe.formatNumber)(a)," 个回答"]})}},{key:"render",value:function(){var e=this.props,t=e.resource,n=e.children;return Object(r.b)(Yn.d,{className:"AnswersNavWrapper",children:Object(r.b)(Jo.a,Object.assign({title:this.renderAnswerListHeader()},{options:"hiddenAnswers"===t?Object(r.b)("span",{children:"按时间排序"}):Object(r.b)(Xo.b,{listClassName:"Answers-select",needsReposition:!0,plain:!0,value:ta[t],onChange:this.handleResourceChange,children:ea.map((function(e){var t=e.value,n=e.text;return Object(r.b)(Xo.a,{value:t,text:n},t)}))})},{children:n}))})}}]),n}(d.PureComponent),ra=Object(E.compose)(o.withRouter,Object(b.connect)((function(e){var t=e.question;return{commonAnswerCount:t.commonAnswerCount,hiddenAnswerCount:t.hiddenAnswerCount,permission:Object(R.Z)(e)}}),{loadBrandQuestionAnswerCount:R.H}))(na),oa=n(1358),aa=n(12);function ia(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ca=function(e){Object(s.a)(n,e);var t=ia(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handlePaginationClick=function(t){e.props.router.push("".concat(location.pathname,"?page=").concat(t))},e.handleUpdatedAnswersLoad=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aa.b,r=e.props,o=r.question.id,a=r.loadItems;a(o,"updatedAnswers",{offset:t,limit:n})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.question.id,n=e.page,r=e.isDrained,o=e.items,a=e.loadItems;!r&&o.length<aa.b&&a(t,"updatedAnswers",{offset:Object(Fo.c)(n)+o.length,limit:aa.b-o.length})}},{key:"render",value:function(){var e=this.props,t=e.isFetching,n=e.isDrained,o=e.isNextLoaded,a=e.isCurrentLoaded,i=e.page,c=e.items,s=e.total,l=e.question,u=e.isMuteSpecial;return n&&!c.length?Object(r.b)(Yn.d,{className:"Answers-none",children:Object(r.c)(Zo.k,{children:[Object(r.b)(Zo.b,{}),Object(r.b)("div",{children:u?"回答暂时无法查看":"还没有回答"})]})}):Object(r.b)(oa.a,{isFetching:t,isDrained:i>=s?n:a,isNextLoaded:o,page:i,total:s,placeholder:Object(r.b)(Tr.a,{className:"List-item"}),onPaginationClick:this.handlePaginationClick,onLoad:this.handleUpdatedAnswersLoad,children:Ho(c,l)})}}]),n}(d.PureComponent),sa=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n=t.page,r=Vo(e,{id:t.question.id,resource:"updatedAnswers"}),o=r.isFetching,a=r.isDrained,i=r.ids,c=Object(Fo.d)(n,i),s=c.total,l=c.isCurrentLoaded,u=c.isNextLoaded,d=c.items;return{isMuteSpecial:Object(R.C)(t.question),isFetching:o,isDrained:a,total:s,isNextLoaded:u,isCurrentLoaded:l,items:Qo(d,e.entities.answers).filter((function(e){return!e.isDelete}))}}),{loadItems:R.O}))(ca),la=n(598),ua=n.n(la);function da(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var fa=function(e){Object(s.a)(n,e);var t=da(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleLoad=function(){var t=e.props,n=t.question.id,r=t.loadItems,o=t.isFetching,a=t.isDrained,i=t.resource;a||o||r(n,void 0===i?"answers":i,{limit:5})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.question.id,n=e.isDrained,r=e.items,o=e.loadItems;!n&&r.length<5&&o(t,"answers",{offset:r.length,limit:5})}},{key:"render",value:function(){var e=this,t=this.props,n=t.adverts,o=t.isBot,a=t.isFetching,i=t.isDrained,c=t.items,s=t.question,l=s.relationship,u=l.canCollapseAnswers,d=l.canStickAnswers,f=s.hasPublishingDraft,p=[0].concat(Object(Ut.a)(Object.keys(n||{}).map(Number).sort((function(e,t){return e-t})))),h={canCollapse:u,canStick:d,hasPublishingDraft:f};return Object(r.b)("div",{children:Object(r.b)(Tr.b,{onRef:function(t){e.listEl=t},isLocal:!0,isLoading:a,isDrained:i,onLoad:this.handleLoad,placeholder:Object(r.b)(Tr.a,{className:"List-item"}),children:o?c.map((function(e,t){return qo(Object.assign({item:e,itemProp:0===t?"acceptedAnswer":"suggestedAnswer",dataZaIndex:t},h))})):Object(ie.b)(2,ua()(p.map((function(e,t){var o,a=p[t+1],i=(a?c.slice(e,a):c.slice(e)).map((function(n,r){var o=e+r+t;return qo(Object.assign({item:n,itemProp:0===o?"acceptedAnswer":"suggestedAnswer",dataZaIndex:o},h))}));return a?[].concat(Object(Ut.a)(i),[(o=n[a],o?Object(r.b)(Bo,{data:o}):null)]):i}))))})})}}]),n}(d.Component),pa=Object(E.compose)(Object(b.connect)((function(e,t){var n=Vo(e,{id:t.question.id,resource:"answers"}),r=n.isFetching,o=n.isDrained,a=n.ids,i=o||r?a:a.slice(0,Math.max(5,a.length-5));return{isBot:e.env.userAgent.isBot,isFetching:r,isDrained:o,items:Qo(i,e.entities.answers).filter((function(e){return e&&!e.isDelete})),adverts:Object(R.c)(e)}}),{loadItems:R.O}))(fa);function ha(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ba=function(e){Object(s.a)(n,e);var t=ha(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handlePaginationClick=function(t){e.props.router.push("".concat(location.pathname,"?page=").concat(t))},e.handleHiddenAnswersLoad=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aa.b,r=e.props,o=r.question.id,a=r.loadItems;a(o,"hiddenAnswers",{offset:t,limit:n})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.question.id,n=e.page,r=e.isDrained,o=e.items,a=e.loadItems;!r&&o.length<aa.b&&a(t,"hiddenAnswers",{offset:Object(Fo.c)(n)+o.length,limit:aa.b-o.length})}},{key:"render",value:function(){var e=this.props,t=e.isFetching,n=e.isDrained,o=e.isNextLoaded,a=e.isCurrentLoaded,i=e.page,c=e.items,s=e.total,l=e.question;return Object(r.b)(oa.a,{isFetching:t,isDrained:i>=s?n:a,isNextLoaded:o,page:i,total:s,placeholder:Object(r.b)(Tr.a,{className:"List-item"}),onPaginationClick:this.handlePaginationClick,onLoad:this.handleHiddenAnswersLoad,children:Ho(c,l)})}}]),n}(d.PureComponent),ma=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n=t.page,r=Vo(e,{id:t.question.id,resource:"hiddenAnswers"}),o=r.isFetching,a=r.isDrained,i=r.ids,c=Object(Fo.d)(n,i,aa.b);return Object.assign({isFetching:o,isDrained:a},c,{items:Qo(c.items,e.entities.answers).filter((function(e){return!e.isDelete}))})}),{loadItems:R.O}))(ba);function va(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ga=function(e){Object(s.a)(n,e);var t=va(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.question,n=t.id,r=t.relationship.isAuthor,o=e.resource,a=e.router;"collapsedAnswers"!==o||r||a.push("/question/".concat(n))}},{key:"render",value:function(){var e=this.props,t=e.resource,n=e.question,o=e.question,a=o.questionType,i=o.answerCount,c=o.reviewInfo.tips,s=o.isVisible,l=e.location;if(e.isMuteSpecial||!s)return Object(r.b)(Yn.d,{className:"Answers-none",children:Object(r.c)(Zo.k,{children:[Object(r.b)(Zo.b,{}),Object(r.b)("div",{children:"回答暂时无法查看"})]})});if("commercial"!==a&&!i){if(c)return null;var u=n.status||{},d=u.isClose,f=u.isLocked,p=u.isSuggest;return d||f||p?null:Object(r.b)(Yn.d,{className:"Answers-none",children:Object(r.c)(Zo.k,{children:[Object(r.b)(Zo.b,{}),Object(r.c)("div",{children:["暂时还没有回答,开始",Object(r.b)(st,{preset:"plain",className:"QuestionAnswers-answerLink",children:"写第一个回答"})]})]})})}return Object(r.b)("div",{id:"QuestionAnswers-answers",className:"QuestionAnswers-answers","data-zop-feedlistmap":"answers"===t?"0,0,1,0":"0,0,1",children:Object(r.c)(ra,{question:n,resource:t,children:["updatedAnswers"===t&&Object(r.b)(sa,{question:n,page:Number(l.query.page)||1}),"answers"===t&&Object(r.b)(pa,{question:n}),"hiddenAnswers"===t&&Object(r.b)(ma,{question:n,page:Number(l.query.page)||1})]})})}}]),n}(d.PureComponent),ya=Object(E.compose)(Object(j.b)({module:"ContentList"}),o.withRouter,Object(b.connect)((function(e,t){return{isMuteSpecial:Object(R.C)(t.question)}})))(ga),Oa=n(1754),ja=n(834),wa=n(1107),Ca=n(1337),ka=n(1340),xa=n(1336),Sa=n(1342);function Ea(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Ra=function(e){Object(s.a)(n,e);var t=Ea(n);function n(){var e,r;Object(i.a)(this,n);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return(r=t.call.apply(t,[this].concat(a))).state={topicBiosModalShown:!1,activeTabKey:"video_answer"===(null===(e=r.props.draft)||void 0===e?void 0:e.draftType)?Ca.a.videoAnswer:Ca.a.textAnswer,showAttention:!1},r.answerFormRef=Object(d.createRef)(),r.videoAnswerTabRef=Object(d.createRef)(),r.handleSubmit=function(e){var t=r.props,n=t.currentUser,o=t.question.id,a=t.addAnswer,i=t.scheduledPublish,c=t.validateScheduledPublish,s=t.loadDraft;if(e.publishAt){var l=i(o,e);return l.then((function(){r.context.endAddAnswer(),s(o)})),l}var u=function(){return a(o,e)};return n.autoSendingCreations?c(o).then(u,(function(e){if(e&&e.payload&&e.payload.message&&400===e.status)return tt.a.confirm(e.payload.message,{title:"提醒",text:{ok:"确定发布",cancel:"我再想想"}}).then(u,(function(){}))})):u()},r.focus=function(){r.answerFormRef.current.focus()},r.handleToggleAnonymous=function(){var e=r.context.toggleAnonymous,t=r.props,n=t.showNotification,o=t.question.relationship.isAnonymous,a=t.isOffice;if(o||!r.answerFormRef.current.hasVideo()){if(o||!r.answerFormRef.current.hasMCNLinkCard())return!o&&r.answerFormRef.current.hasADLinkCard()?r.answerFormRef.current.hasFeeConsultCard()?n("不能使用匿名身份插入付费咨询卡片","red"):void n("不能使用匿名身份插入推荐卡片","red"):void(!o&&r.answerFormRef.current.hasCommercialReport()&&a?n("已经进行商业声明的内容不能启用匿名","red"):e());n("不能使用匿名身份推荐商品","red")}else n("匿名不能使用视频功能,如需启用匿名请删除草稿中的视频","red")},r.handleTopicBiosModalShown=function(){return r.setState({topicBiosModalShown:!0})},r.handleTopicBiosModalHide=function(){return r.setState({topicBiosModalShown:!1})},r.handleTabChange=function(e){var t=r.state,n=t.activeTabKey,o=t.showAttention;if(e!==n){var a=r.props,i=a.question.relationship.isAnonymous,c=a.showNotification;if(e===Ca.a.videoAnswer){if(o&&r.setState({showAttention:!1}),i)return void c("视频回答不支持匿名","red");r.answerFormRef.current.hasEditorContent()&&(Oe.a.get("answerContentSync")||(c("图文回答内容已同步至视频描述"),Oe.a.set("answerContentSync",!0)))}r.setState({activeTabKey:e})}},r}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.question.id;(0,t.getBio)(n),this.props.answering&&setTimeout(this.focus),Oe.a.get("videoAnswerGuided")||this.state.activeTabKey===Ca.a.videoAnswer||(this.setState({showAttention:!0}),this.animateTimerId=setTimeout((function(){e.setState({showAttention:!1}),Oe.a.set("videoAnswerGuided",!0)}),5e3))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.animateTimerId)}},{key:"componentWillReceiveProps",value:function(e){this.props.answering!==e.answering&&this.focus()}},{key:"renderBio",value:function(){var e=this.props,t=e.currentUser,n=e.questionBio;return n.bio&&"headline"!==n.type?Object(r.b)("span",{className:"AnswerAdd-bio",children:n.bio}):t.headline?Object(r.b)(It.a,{className:"AnswerAdd-bio",inline:!0,html:(n||{}).bio||t.headline}):null}},{key:"renderAuthor",value:function(){var e=this.props,t=e.currentUser,n=e.question.relationship.isAnonymous,o=e.question;return n?Object(r.b)(je.a,{className:"AnswerAdd-info",noLink:!0,author:nn.h}):t&&t.isOrg?Object(r.b)(je.a,{className:"AnswerAdd-info",noLink:!0,author:t}):Object(r.c)(je.a,{className:"AnswerAdd-info",noLink:!0,author:t,children:[this.renderBio(),Object(r.b)(wa.a,{className:"AnswerAdd-topicBiosButton",text:"编辑话题经验",onClick:this.handleTopicBiosModalShown}),Object(r.b)(Sa.a,{shown:this.state.topicBiosModalShown,question:o,onClose:this.handleTopicBiosModalHide})]})}},{key:"render",value:function(){var e,t=this.state,n=t.activeTabKey,o=t.showAttention,a=this.props,i=a.currentUser,c=a.question,s=c.relationship.isAnonymous,l=c.questionType,u=a.question,d=a.allowCommercialAnonymousAnswer,f=a.useNewEditorSetting,p=i&&!i.isOrg&&("normal"===l||"commercial"===l&&d||s)&&n===Ca.a.textAnswer;return Object(r.c)("div",{className:"AnswerAdd",css:{position:"relative"},children:[f?Object(r.c)(ke.Flex,{justifyContent:"space-between",css:function(e){return{borderBottom:"1px solid ".concat(e.colors.GBK09A),".Tabs":{border:"none"}}},children:[Object(r.b)(Ca.b,{ref:this.videoAnswerTabRef,activeTabKey:n,onChange:this.handleTabChange}),Object(r.b)(xa.a,{handleClick:null===(e=this.answerFormRef.current)||void 0===e?void 0:e.toggleFullscreen})]}):Object(r.b)(Ca.b,{ref:this.videoAnswerTabRef,activeTabKey:n,onChange:this.handleTabChange}),Object(r.b)(ve.a,{placement:"bottom",isOpen:o,target:this.videoAnswerTabRef.current,children:"Web 也可以发布视频回答了"}),!f&&Object(r.c)("div",{className:"AnswerAdd-header",children:[this.renderAuthor(),p&&Object(r.b)(D.c,{className:"AnswerAdd-toggleAnonymous",preset:"plain",onClick:this.handleToggleAnonymous,children:s?"使用实名身份回答":"使用匿名身份回答"})]}),Object(r.b)(ka.a,{activeTabKey:n,handleTabChange:this.handleTabChange,handleToggleAnonymous:this.handleToggleAnonymous,imperativeRef:this.answerFormRef,question:u,onSubmit:this.handleSubmit})]})}}]),n}(d.Component);Ra.contextTypes={toggleAnonymous:h.a.func.isRequired,endAddAnswer:h.a.func};var Ta=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n=e.question.bio,r=e.topic.bios,o=e.answers.newAnswer,a=e.entities.drafts,i=void 0===a?{}:a,c=t.question.id,s=(n[c]||{result:{type:"headline"}}).result;return"topic"===s.type&&(s.bio=r[s.topic.id]||s.bio),{currentUser:Object(M.b)(e),questionBio:s,newAnswer:o,allowCommercialAnonymousAnswer:"show"===Object(U.a)(e,"gue_anonymous"),isOffice:Object(U.e)(e),draft:i["question_".concat(c)],useNewEditorSetting:"1"===Object(U.a)(e,"editor")}}),{showNotification:B.h,addAnswer:P.a,scheduledPublish:P.B,validateScheduledPublish:P.M,loadDraft:R.N,getBio:R.p}))(Ra);function Aa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Na=function(e){Object(s.a)(n,e);var t=Aa(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.question,r=n.id,o=n.relationship.myAnswer,a=void 0===o?{}:o,i=t.router,c=e.question,s=c.id,l=c.relationship.myAnswer,u=void 0===l?{}:l;r===s&&a.answerId!==u.answerId&&(re.a.trackEvent(this,{action:"StatusReport"},{status:{result:"Success",event:{action:"Answer"}}}),i.push("/question/".concat(r,"/answer/").concat(u.answerId)),Oe.a.set("answer::justPublished",!0))}},{key:"render",value:function(){if(!this.context.currentUser)return null;var e=this.props,t=e.question,n=e.question,o=n.relationship.myAnswer,a=n.isNormal,i=n.status,c=(i=void 0===i?{}:i).isClose,s=i.isLocked,l=i.isSuggest,u=n.hasPublishingDraft,d=e.answering;return o?null:l?Object(r.c)("div",{className:"QuestionAnswers-answerTip",children:["被建议修改的问题不允许添加新的回答。",Object(r.b)(at.a,{preset:"plain",to:"/question/21290061",children:"问题为什么会被建议修改?"})]}):s?Object(r.c)("div",{className:"QuestionAnswers-answerTip",children:["该问题目前已经被锁定,无法添加新答案。",Object(r.b)(at.a,{preset:"plain",to:"/question/19604313",children:"问题为什么会被锁定?"})]}):c?Object(r.c)("div",{className:"QuestionAnswers-answerTip",children:["被关闭的问题不允许添加新的回答。",Object(r.b)(at.a,{className:"QuestionAnswers-iconLink",preset:"plain",to:"/question/21290061","data-tooltip":"为什么部分问题会被「关闭」「建议修改」?",icon:ja.a})]}):u?Object(r.b)(Yn.d,{className:"QuestionAnswers-answerTipCard",children:"你创建的回答正在发布中…"}):a?Object(r.b)(Oa.CSSTransitionGroup,{className:"QuestionAnswers-statusWrapper",transitionEnterTimeout:300,transitionLeaveTimeout:300,transitionName:"expand",component:"div",children:d&&Object(r.c)(Yn.d,{className:"QuestionAnswers-answerAdd",id:"js-answerAddCard",children:[Object(r.b)("a",{name:"draft"}),Object(r.b)(Ta,{question:t,answering:d})]})}):null}}]),n}(d.PureComponent);Na.contextTypes={currentUser:h.a.object};var _a=Object(o.withRouter)(Na);function Ia(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Ma=function(e){Object(s.a)(n,e);var t=Ia(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,o=Object(Ce.a)(e,["className","children"]);return Object(r.b)("div",Object.assign({},o,{className:de()("QuestionMainDivider",t),children:Object(r.b)("span",{className:"QuestionMainDivider-inner",children:n})}))}}]),n}(d.Component);function La(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Pa=function(e){Object(s.a)(n,e);var t=La(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={opened:!1},e.handleLoad=function(){var t=e.props,n=t.question.id;return(0,t.loadItems)(n,"collapsedAnswers")},e.handleOpen=function(){e.handleLoad(),e.setState({opened:!0})},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.isDrained,n=e.isFetching,o=e.items,a=e.question,i=e.question,c=i.collapsedAnswerCount,s=i.questionType,l=this.state.opened,u="org"===s,d="".concat(Object(xe.formatNumber)(c)," 个回答被").concat(u?"隐藏":"折叠"),f=Object(r.b)(at.a,{preset:"plain",to:u?"/org-intro#org-question":"/question/20120168",target:"_blank",children:"为什么?"});return l?Object(r.c)(Yn.d,{children:[Object(r.c)(Ma,{children:[d,"",f,""]}),Object(r.c)(Oo.b,{children:[Ho(o,a),n&&Object(r.b)(Tr.a,{className:"List-item"})]}),!t&&!n&&Object(r.b)(jo.a,{onClick:this.handleLoad,children:"更多"})]}):Object(r.c)("div",{className:"CollapsedAnswers-bar",style:{},children:[Object(r.b)(D.c,{preset:"plain",onClick:this.handleOpen,children:d}),"",f,""]})}}]),n}(d.Component);Pa.contextTypes={currentUser:h.a.object};var Ba=Object(b.connect)((function(e,t){var n=Vo(e,{id:t.question.id,resource:"collapsedAnswers"}),r=n.isFetching,o=n.isDrained,a=n.ids;return{isFetching:r,isDrained:o,items:Qo(a,e.entities.answers)}}),{loadItems:R.O})(Pa),za=n(1370),Da=n(1371),Fa=n(1134);function Ua(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Va=function(e){Object(s.a)(n,e);var t=Ua(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.question,t=e.id,n=e.title,o=e.answerCount,a=e.followerCount,i="/question/".concat(t);return Object(r.c)("div",{className:"SimilarQuestions-item",itemProp:"zhihu:similarQuestion",itemType:"http://schema.org/Question",itemScope:!0,children:[Object(r.b)("meta",{itemProp:"name",content:n}),Object(r.b)("meta",{itemProp:"url",content:"https://www.zhihu.com".concat(i)}),Object(r.b)("meta",{itemProp:"answerCount",content:o}),Object(r.b)("meta",{itemProp:"zhihu:followerCount",content:a}),Object(r.b)(at.a,{preset:"plain",to:i,target:"_blank",children:n})," ",Object(xe.formatNumber)(o)," 个回答"]})}}]),n}(d.Component),qa=Object(j.b)((function(e){var t=e.question;return{module:"QuestionItem",content:{type:"Question",token:String(t.id),author_member_hash_id:(t.author||{}).id},trackCardShow:!0}}))(Va);function Ha(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Ka=function(e){Object(s.a)(n,e);var t=Ha(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.question.id;(0,e.loadSimilarQuestions)(t)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.question.id,r=t.loadSimilarQuestions,o=e.question.id;n!==o&&r(o)}},{key:"componentDidUpdate",value:function(e){!e.items&&this.props.items&&this.props.onLoad&&this.props.onLoad()}},{key:"render",value:function(){var e=this.props.items;return e&&e.length?Object(r.c)(Yn.d,{children:[Object(r.b)(Yn.b,{className:"SimilarQuestions-title",children:"相关问题"}),Object(r.b)(Yn.c,{className:"SimilarQuestions-list",children:e.map((function(e){return Object(r.b)(qa,{question:e},e.id)}))})]}):null}}]),n}(d.Component),Qa=Object(E.compose)(Object(b.connect)((function(e,t){return{items:e.question.similarQuestions[t.question.id]}}),{loadSimilarQuestions:R.Y}),Object(j.b)({module:"RelatedQuestions"}))(Ka),Wa=n(7),Ga=n(1742);function Ya(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Za=function(e){Object(s.a)(n,e);var t=Ya(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={hideDescription:!1},e.handleRef=function(t){e.title=t},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.title.offsetWidth<this.title.scrollWidth&&this.setState({hideDescription:!0})}},{key:"render",value:function(){var e=this.props,t=e.link,n=e.title,o=e.description,a=e.meta,i=e.imageUrl,c=this.state.hideDescription;return Object(r.c)(at.a,{preset:"plain",a:!0,to:t,className:"RelatedCommodities-item",target:"_blank",children:[Object(r.b)("img",{className:"RelatedCommodities-image",src:Object(Se.imgUrl)(i,{quality:90,size:"250x0"}),alt:"live"}),Object(r.c)("div",{className:"RelatedCommodities-content",children:[Object(r.b)("div",{className:de()("RelatedCommodities-subject",{"RelatedCommodities-subject-two":c}),style:{},ref:this.handleRef,"data-tooltip":n,children:n}),c||Object(r.b)("div",{className:"RelatedCommodities-description",children:o}),Object(r.b)("div",{className:"RelatedCommodities-meta",children:a})]})]})}}]),n}(d.Component),Xa=n(1658);function Ja(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var $a=function(e){Object(s.a)(n,e);var t=Ja(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).handleListen=function(e){var t="".concat(e.target.closest("a").href,"?extra_auto_play=1");e.preventDefault(),e.stopPropagation(),re.a.trackEvent(e.target,{action:"OpenUrl",element_name:"Play"},{link:{url:t}}),window.open(t,"_blank")},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.item;switch(e.type){case"live":var t=e.id,n=e.subject,o=e.reviewScore,a=e.seats,i=(e.startsAt,e.speaker.member),c=i.name,s=i.avatarUrl;return Object(r.b)(Za,{link:"/lives/".concat(t),imageUrl:s,title:n,description:c,meta:Object(r.c)("div",{className:"RelatedCommodities-scoreWrapper",children:[Object(r.b)(Xa.a,{score:o}),Boolean(a&&a.taken)&&"".concat(a.taken," 人参与"),!1]})});case"remix_album":case"podcast":case"remix":var l=e.id,u=e.artwork,d=e.title,f=e.author,p=(f=void 0===f?{}:f).user,h=e.trackCount,b="/remix/albums/".concat(l);return Object(r.b)(Za,{link:b,imageUrl:u,title:d,description:p&&p.name,meta:Object(r.c)("div",{className:"RelatedCommodities-remixMeta",children:[Object(r.c)("div",{children:["共 ",Object(xe.formatNumber)(h)," 节课"]}),Object(r.b)(D.c,{className:"RelatedCommodities-remixListen",onClick:this.handleListen,preset:"plain",children:"试听"})]})});case"special":var m=e.id,v=e.subject,g=e.liveCount,y=e.liveMemberCount,O=e.speakers,j=e.artworkMobile,w=O.slice(0,2).map((function(e){return e.member.name})).join("、");return Object(r.b)(Za,{link:"/lives/specials/".concat(m),imageUrl:j,title:v,description:"".concat(w).concat(O.length>=2?" 等":""),meta:"".concat(Object(xe.formatNumber)(g)," 场 Live, ").concat(Object(xe.formatNumber)(y)," 次参与")});case"book":var C=e.id,k=e.title,x=e.cover,S=e.authorName,E=e.readCount;return Object(r.b)(Za,{link:"/pub/book/".concat(C),imageUrl:x,title:k,description:S,meta:Object(r.c)("div",{className:"RelatedCommodities-bookMeta",children:["".concat(Object(xe.formatNumber)(E)," 人读过"),Object(r.c)("span",{className:"RelatedCommodities-bookRead",children:[Object(r.b)(Ga.a,{width:13,height:14,center:!0}),"阅读"]})]})});default:return null}}}]),n}(d.Component),ei=Object(j.b)((function(e){var t=e.item,n=e.index;if("book"===t.type)return{module:"EBookItem",index:n,content:{type:"EBook",token:String(t.id)},trackCardShow:!0};var r="special"===t.type?"LiveAlbum":Object(Wa.pascalize)(t.type);return{module:"".concat(r,"Item"),index:n,content:Object.assign({type:r,id:t.id},"live"===t.type&&{author_member_hash_id:t.speaker.member.id}),trackCardShow:!0}}))($a);function ti(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ni=function(e){Object(s.a)(n,e);var t=ti(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.question.id,n=e.answer;(0,e.loadRelatedCommodities)(t,n&&n.id)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.question.id,r=t.loadRelatedCommodities,o=e.question.id;n!==o&&r(o)}},{key:"componentDidUpdate",value:function(e){!e.items&&this.props.items&&this.props.onLoad&&this.props.onLoad()}},{key:"render",value:function(){var e=this.props.items;return e&&e.length?Object(r.c)(Yn.d,{children:[Object(r.b)(Yn.b,{className:"RelatedCommodities-title",children:"相关推荐"}),Object(r.b)(Yn.c,{className:"RelatedCommodities-list",children:e.slice(0,3).map((function(e){return Object(r.b)(ei,{item:e},e.id)}))})]}):null}}]),n}(d.Component),ri=Object(E.compose)(Object(b.connect)((function(e,t){var n=e.question.relatedCommodities[t.question.id];return{attachedInfo:(n||[]).attachedInfo,items:n}}),{loadRelatedCommodities:R.X}),Object(j.b)((function(e){return{attachedInfoBytes:e.attachedInfo,module:"ContentList",moduleName:"相关推荐"}})))(ni),oi=n(1855),ai=n(119),ii=n(1410);function ci(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var si=function(e){Object(s.a)(n,e);var t=ci(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).goToBrand=function(){var t=e.props.brand.target;t&&(location.href="/org/".concat(t.urlToken))},e}return Object(c.a)(n,[{key:"componentWillReceiveProps",value:function(e){var t=this.props.brand,n=e.brand,r=e.loadProfile;t&&n&&t.name!==n.name&&n.target&&n.target.urlToken&&r(n.target.urlToken,!1)}},{key:"render",value:function(){var e=this.props,t=e.brand,n=t.logo,o=t.name,a=t.target,i=t.isPuQuestion,c=e.brandMember,s=this.context.currentUser,l=i?"关于大咖":"关于品牌";return Object(r.c)(Yn.d,{className:de()({MobileBrandQuestionAuthor:!1}),children:[Object(r.b)(Yn.b,{className:"BrandQuestionAuthor-header",children:Object(r.b)("span",{className:"BrandQuestionAuthor-headerText",children:l})}),Object(r.c)(Yn.c,{className:de()("BrandQuestionAuthor",a&&"is-clickable"),onClick:this.goToBrand,children:[Object(r.b)("img",{src:n,className:"BrandQuestionAuthor-icon",alt:"brand"}),Object(r.c)("div",{className:"BrandQuestionAuthor-content",children:[Object(r.c)("div",{className:"BrandQuestionAuthor-name",children:[o,a&&a.urlToken&&Object(r.b)(pe.c,{css:{marginLeft:3},badge:a.badge})]}),a&&a.headline&&Object(r.b)("div",{className:"BrandQuestionAuthor-intro",children:a.headline})]})]}),c&&c.id&&s&&s.id!==c.id&&Object(r.b)(ii.a,{className:"BrandQuestionAuthor-buttons",user:c})]})}}]),n}(d.Component);si.contextTypes={currentUser:h.a.object};var li=Object(b.connect)((function(e){var t=e.entities,n=e.question.brand,r={};return n&&n.target&&n.target.urlToken&&(r=t.users[n.target.urlToken]||{}),{brand:n,brandMember:r}}),{loadBrand:R.F,loadProfile:ai.h})(si);function ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}function di(e){var t=e.text,n=e.from,o=e.score;return Object(r.c)("span",{children:[n||t,o&&Object(r.b)("strong",{children:o})]})}var fi=function(e){Object(s.a)(n,e);var t=ui(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"renderCardImage",value:function(){var e=this.props.meta,t=e.avatar,n=e.title;return t?Object(r.b)(Zn.a,{className:de()("QuestionSidebarTopicMeta-cardImage"),src:t,alt:n}):null}},{key:"renderGoodsCard",value:function(){var e=this.props.meta.title;return Object(r.c)("div",{className:"QuestionSidebarTopicMeta-cardMain QuestionSidebarTopicMeta-goods",children:[this.renderCardImage(),Object(r.b)("div",{className:"QuestionSidebarTopicMeta-cardContent",children:Object(r.b)("h3",{className:"QuestionSidebarTopicMeta-cardTitle",children:e})})]})}},{key:"renderGeneralCard",value:function(){var e=this.props.meta,t=e.title,n=e.description1,o=e.description2,a=function(e){var t=e.scores,n=void 0===t?[]:t,r=e.tags,o=void 0===r?[]:r;return n.length>0?n:o.length>0?o:[]}(e),i=a.length?a.map((function(e,t){return Object(r.b)(di,Object.assign({},e),t)})):o;return Object(r.c)("div",{className:"QuestionSidebarTopicMeta-cardMain",children:[this.renderCardImage(),Object(r.c)("div",{className:"QuestionSidebarTopicMeta-cardContent",children:[Object(r.b)("h3",{className:"QuestionSidebarTopicMeta-cardTitle",children:t}),n&&Object(r.b)("div",{className:"QuestionSidebarTopicMeta-cardDesc",children:n}),i&&Object(r.b)("div",{className:"QuestionSidebarTopicMeta-cardScore",children:i})]})]})}},{key:"renderCard",value:function(){return"n_goods"===this.props.meta.category?this.renderGoodsCard():this.renderGeneralCard()}},{key:"renderModule",value:function(){var e=this.props,t=e.meta,n=e.excerpt,o=e.metaCardDisplay,a=t.summary||n;return Object(r.c)(Yn.d,{children:[this.renderCard(),"normal"===o&&Object(r.c)("div",{className:"QuestionSidebarTopicMeta-cardMore",children:[a&&Object(r.b)("div",{className:"QuestionSidebarTopicMeta-cardMoreInner",dangerouslySetInnerHTML:{__html:a}}),Object(r.c)("div",{className:"QuestionSidebarTopicMeta-cardLink",children:["查看更多",Object(r.b)(br.a,{center:!0})]})]})]})}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.meta,o=e.metaCardDisplay;if(!n||"none"===o)return null;var a=n.category;return Object(r.b)(j.a,{module:"TopicItem",moduleName:a,card:{content:Object.assign({type:"Topic"},Object(Xn.a)("topic",t),{sub_type:"MetaCard"})},trackCardShow:!0,children:Object(r.b)("a",{href:"/topic/".concat(t),target:"_blank",rel:"noopener noreferrer",children:this.renderModule()})})}}]),n}(d.PureComponent);function pi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}fi.propTypes={id:h.a.string.isRequired,excerpt:h.a.string,meta:h.a.shape({category:h.a.string,avatar:h.a.string,title:h.a.string,description1:h.a.string,description2:h.a.string,summary:h.a.string,scores:h.a.arrayOf(h.a.shape({url:h.a.string,score:h.a.string,from:h.a.string})),tags:h.a.arrayOf(h.a.shape({text:h.a.string}))}).isRequired,metaCardDisplay:h.a.oneOf(["normal","none"])};var hi=function(e){Object(s.a)(n,e);var t=pi(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.params.id,n=e.items,r=e.loadQuestionMetaTopics;n||r(t)}},{key:"render",value:function(){var e=this.props,t=e.items,n=e.questionId;if(!t||!t.length)return null;var o=t.filter((function(e){return e&&e.meta}));if(!o||o.length<1)return null;var a=o[0],i=a.vote,c=a.isVote,s="normal";return i&&c&&(s="none"),Object(r.b)("div",{className:"QuestionSidebarTopicMeta",children:Object(r.b)(fi,Object.assign({metaCardDisplay:s},a,{questionId:n}))})}}]),n}(d.Component),bi=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n=t.params;return{questionId:n.id,items:Object(R.ab)(e,{id:n.id})}}),{loadQuestionMetaTopics:R.U}),Object(T.a)(null))(hi),mi=n(249),vi=Object(E.compose)(Object(T.a)(null),Object(mi.b)(),Object(b.connect)(null,{getReadingMembership:R.v}))((function(e){var t=e.getReadingMembership,n=e.isLogin,o=Object(d.useState)(!1),i=Object(a.a)(o,2),c=i[0],s=i[1],l=Object(d.useState)(!1),u=Object(a.a)(l,2),f=u[0],p=u[1];Object(d.useEffect)((function(){n&&t().then((function(e){var t=e.payload;p(t.isHaveRight)})).catch((function(){}))}),[t,n]);var h=function(){s(!c)};return f&&Object(r.c)(r.a,{children:[Object(r.c)(Yn.d,{className:"ReadingMembership",onClick:h,children:[Object(r.c)("div",{className:"ReadingMembership-banner",children:[Object(r.b)("div",{children:"领取读书会会员体验卡"}),Object(r.c)("div",{children:["海量电子书免费读 ",Object(r.b)(br.a,{size:22})]})]}),Object(r.b)("img",{src:"https://pic3.zhimg.com/80/v2-ba02e89d92407e3e2491a27af5ace660_hd.jpeg"})]}),Object(r.b)(Dt.b,{className:"ReadingMembership-modal",onClose:h,children:c&&Object(r.c)("div",{className:"ReadingMembership-content",children:[Object(r.b)("img",{src:"https://pic2.zhimg.com/80/v2-8f8b9ff43e407c160bfc2d6352c662b6_hd.jpeg"}),Object(r.c)("div",{className:"ReadingMembership-title",children:[Object(r.b)("div",{children:"登录知乎 App 领取"}),Object(r.b)("div",{children:"读书会会员 7 天体验卡"})]}),Object(r.c)("div",{className:"ReadingMembership-qrcode",children:[Object(r.b)("div",{children:"知乎读书会会员,海量电子书免费读"}),Object(r.b)("img",{src:"https://pic2.zhimg.com/80/v2-e3a03af184c11dc3526218de74977fd5_hd.png",alt:"知乎二维码"}),Object(r.b)("div",{children:"扫码下载知乎 App"})]})]})})]})})),gi=n(1093);function yi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Oi=function(e){Object(s.a)(n,e);var t=yi(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).onHeightChange=function(){e.dynamicSticky&&e.dynamicSticky.check()},e}return Object(c.a)(n,[{key:"componentWillMount",value:function(){var e=this.props,t=e.question,n=t.id,r=t.questionType,o=e.loadBrand;"commercial"===r&&o(n)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.brand,n=e.brand,r=e.loadProfile;t&&n&&t.name!==n.name&&n.target&&r(n.target.urlToken,!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,o=t.question,a=o.id,i=o.questionType,c=t.brand;return Object(r.c)(gi.a,{className:"Question-sideColumn Question-sideColumn--sticky",onRef:function(t){e.sidebar=t},offset:nn.i+10,ref:function(t){e.dynamicSticky=t},children:["commercial"===i&&Object(r.b)(oi.a,{questionId:a,pageType:"question",onLoad:this.onHeightChange}),"commercial"===i&&c&&Object(r.b)(li,{brand:c}),"commercial"!==i&&Object(r.b)(Da.a,{type:"question",getSidebar:function(){return e.sidebar}}),"normal"===i&&Object(r.b)("div",{className:"Card",children:Object(r.b)(za.a,{isMobile:!1,id:"question/".concat(a),location:"new_question_up",query:{question_token:a},onHeightChange:this.onHeightChange})}),Object(r.b)(bi,{}),Object(r.b)(vi,{}),"normal"===i&&Object(r.b)(Qa,{question:n,onLoad:this.onHeightChange}),"normal"===i&&Object(r.b)(ri,{question:n,onLoad:this.onHeightChange}),"normal"===i&&Object(r.b)("div",{className:"Card",children:Object(r.b)(za.a,{isMobile:!1,id:"question/".concat(a),location:"new_question_down_sticky",query:{question_token:a},delay:500,onHeightChange:this.onHeightChange})}),"commercial"===i&&Object(r.b)(Da.a,{type:"question",getSidebar:function(){return e.sidebar}}),Object(r.b)(Fa.a,{})]})}}]),n}(d.Component),ji=Object(E.compose)(Object(T.a)(null),Object(j.b)({module:"RightSideBar"}),Object(b.connect)((function(e){return{brand:e.question.brand}}),{loadBrand:R.F,loadProfile:ai.h}))(Oi);function wi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Ci=function(e){Object(s.a)(n,e);var t=wi(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"renderAnswers",value:function(){var e=this.props,t=e.resource,n=e.question,o=n.questionType,a=n.collapsedAnswerCount,i=n.answerCount,c=n.isNormal,s=n.status,l=(s=void 0===s?{}:s).isLocked,u=e.question,d=e.location,f=e.answering,p=e.invitationShowCount,h=e.isDrained,b=e.isMuteSpecial,m=e.isMuteFreeze,v="updatedAnswers"===t||h,g="commercial"!==o&&!i;return Object(r.c)("div",{children:[Object(r.b)(_a,{question:u,answering:f}),Object(r.b)(yo,{question:u}),Boolean(p)&&!b&&!m&&Object(r.b)(Lt.a,{expandCount:p,question:u}),Object(r.b)(ya,{resource:t,question:u,location:d}),c&&!l&&"updatedAnswers"!==t&&h&&!g&&Object(r.b)(j.a,{module:"BottomBar",children:Object(r.b)(Yn.d,{children:Object(r.b)(st,{className:"QuestionAnswers-answerButton",size:"spread"})})}),v&&a>0&&!b&&Object(r.b)(Ba,{question:u})]})}},{key:"render",value:function(){var e=this.props,t=e.question,n=e.isNormalNotification,o=e.notificationId,a=e.location;return Object(r.c)("div",{className:"Question-main",children:[Object(r.b)("div",{className:"Question-mainColumn",children:n?Object(r.b)(Yo,{location:a,question:t,id:o}):this.renderAnswers()}),Object(r.b)(ie.a,{children:Object(r.b)(ji,{question:t})})]})}}]),n}(d.PureComponent);Ci.fetchData=function(e){var t=e.params.id,n=e.route.resource,r=e.location.query,o=r.group_id,a=r.page,i=r.qc,c=e.dispatch,s=e.getState;if(!i&&o)return c(Object(R.P)(o));var l=s(),u=l.env.userAgent,d=Object(U.d)(l),f=5;return u.isBot?f=20:d&&(f=4),c(Object(R.O)(t,n,{offset:Object(Fo.c)(Number(a)||1),limit:f}))};var ki=Object(b.connect)((function(e,t){var n=t.params.id,r=t.route.resource,o=t.location.query,a=o.group_id,i=o.qc,c=e.currentUser,s=!i&&a,l=Vo(e,{id:n,resource:r}).isDrained,u=Object(R.bb)(e,{id:n}),d=u.answerCount,f=u.relationship.isAnonymous;return{isNormalNotification:s,notificationId:a,resource:r,question:u,isDrained:l,invitationShowCount:c&&!f&&d<4?d?5:3:0,isBot:e.env.userAgent.isBot,isHuman:Object(U.c)(e),currentUser:Object(M.b)(e),canOia:Object(U.d)(e),shouldOia:Object(U.h)(e),shouldSpecialOia:Object(U.i)(e),referer:Object(U.g)(e),isMuteSpecial:Object(R.C)(u),isMuteFreeze:Object(R.B)(u),ua:Object(U.l)(e),draft:Object(R.n)(e,{id:n})}}))(Ci),xi=n(1445),Si=n(205),Ei=n(136);function Ri(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Ti=function(e){Object(s.a)(n,e);var t=Ri(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={contentRef:null},e.contentRef=Object(d.createRef)(),e.handleCloseComment=function(){var t=e.props,n=t.location,r=n.pathname,o=n.search,a=t.byComment,i=t.router;a&&i.replace({pathname:r,search:o})},e.handleCloseEditing=function(){var t=e.props,n=t.location,r=n.pathname,o=n.query,a=n.hash,i=t.router;"#draft"===a&&i.replace({pathname:r,query:o})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.answer.id,n=e.loadContentRightsNotification;this.context.currentUser&&Object(oe.c)("answer",t,oe.a),this.setState({contentRef:this.contentRef.current}),Oe.a.get("answer::justPublished")&&(Oe.a.delete("answer::justPublished"),n("answer",t))}},{key:"render",value:function(){var e,t=this.props,n=t.question,o=n.id,a=n.relationship,i=a.canCollapseAnswers,c=a.canStickAnswers,s=n.hasPublishingDraft,l=t.answer,u=t.location.hash,d=t.isSearchSpecialSource,f=t.hasLoadedDraft;return(null==l||null===(e=l.question)||void 0===e?void 0:e.id)!==o||l.isDelete?Object(r.b)(xi.a,{to:"/question/".concat(o)}):Object(r.b)(Yn.d,{className:"AnswerCard",children:Object(r.b)("div",{className:"QuestionAnswer-content",ref:this.contentRef,tabIndex:0,children:Object(r.b)(Si.d.Provider,{value:this.state.contentRef,children:Object(r.b)(Do.a,{relatedTo:"answer",answer:l,byComment:Object(dn.a)(u),onCloseComment:this.handleCloseComment,onCloseEditing:this.handleCloseEditing,canCollapse:i,canStick:c,editing:f&&"#draft"===u,editable:!0,canAbstract:!0,expanded:d||!0,hasPublishingDraft:s,itemProp:"mainEntityOfPage",showReviewingLabel:!0,isSearchSpecialSource:d})})})})}}]),n}(d.Component);Ti.contextTypes={currentUser:h.a.object};var Ai=Object(E.compose)(o.withRouter,Object(b.connect)((function(e,t){var n,r,o=e.question,a=(o=void 0===o?{}:o).draftStatus,i=t.answer;return{hasLoadedDraft:!1===(null==a||null===(n=a[null==i||null===(r=i.question)||void 0===r?void 0:r.id])||void 0===n?void 0:n.loading)}}),{loadAnswer:P.o,loadContentRightsNotification:Ei.X}))(Ti);function Ni(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var _i=function(e){Object(s.a)(n,e);var t=Ni(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isDrained,n=e.items;t||n.length||this.loadItems()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.question.id,n=e.question.id,r=e.isDrained,o=e.items;n!==t&&!r&&o.length<2&&this.loadItems()}},{key:"loadItems",value:function(){var e=this.props,t=e.question.id,n=e.loadItems;return n(t,"answers",{limit:3})}},{key:"render",value:function(){var e=this.props,t=e.question.relationship.canCollapseAnswers,n=e.items,o=e.isWechat;return Boolean(n.length)&&Object(r.b)(Yn.d,{className:"MoreAnswers",children:Object(r.b)(Oo.b,{title:"更多回答","data-zop-feedlist":!0,children:n.map((function(e){return Object(r.b)(zo.a,{children:Object(r.b)(Do.a,{relatedTo:"question",answer:e,canCollapse:t,lastreadTouchable:!0,blockReading:!o})},e.id)}))})})}}]),n}(d.Component),Ii=Object(b.connect)((function(e,t){var n=t.question.id,r=t.answerId,o=e.entities.answers,a=e.question.answers[n]||{ids:[],isDrained:!1},i=a.ids;return{isDrained:a.isDrained,items:i.filter((function(e){return e!==Number(r)})).slice(0,2).map((function(e){return o[e]})),isWechat:e.env.userAgent.Wechat}}),{loadAnswer:P.o,loadItems:R.O})(_i),Mi=n(956),Li=n(1013),Pi=n(1674),Bi=n(97);function zi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Di=function(e){Object(s.a)(n,e);var t=zi(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.items,n=e.author;return t&&t.length?Object(r.c)("div",{className:"AnswerAuthor-item",children:[Object(r.b)("span",{className:"AnswerAuthor-item-icon",children:Object(r.b)(Pi.a,{text:!0,center:!0})}),Object(r.b)("div",{className:"AnswerAuthor-item-value",children:Object(r.c)(Li.CJKSpace,{children:[t.slice(0,3).map((function(e,t){return Object(r.c)("span",{children:[0!==t&&"、",Object(r.b)(Mt.a,{user:e,noBadge:!0,noHoverCard:!0,children:e.name})]},e.urlToken)})),"也关注了",nn.N[n.gender]]})})]}):null}}]),n}(d.Component);Di.propTypes={author:h.a.object.isRequired};var Fi=Object(E.compose)(Object(b.connect)((function(e,t){var n=t.author;return Object.assign({currentUser:Object(M.b)(e)},n&&function(e,t){var n=t.urlToken||t.id,r=e.people.mutualsByUser[n]||{isDrained:!1,isFetching:!1,ids:[]};return{isDrained:r.isDrained,isFetching:r.isFetching,items:r.ids.map((function(t){var n=Object(Bi.c)(e,{id:t});return n.code?null:n})).filter(Boolean)}}(e,{urlToken:n.urlToken}))}),{loadItems:ai.f}),Object(Qt.a)({shouldLoad:function(e){return e.currentUser&&e.author&&e.author.urlToken&&e.currentUser.urlToken!==e.author.urlToken&&!e.isDrained},load:function(e){return e.loadItems(e.author.urlToken,"mutuals")}}))(Di),Ui=n(926),Vi=n(908);function qi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Hi=function(e){return e&&void 0!==e.answerCount&&"undefined"!=typeof articlesCount&&"undefined"!=typeof followerCount&&void 0!==e.badge};var Ki=function(e){Object(s.a)(n,e);var t=qi(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidMount",value:function(){this.nextItem()}},{key:"componentWillReceiveProps",value:function(e){this.props.answer.author.urlToken!==e.answer.author.urlToken&&this.nextItem(e)}},{key:"componentDidUpdate",value:function(e){!e.user&&this.props.user&&this.props.onLoad&&this.props.onLoad()}},{key:"nextItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.answer.author.urlToken,n=e.loadProfile,r=e.isDrained;t&&(r||n(t))}},{key:"render",value:function(){var e,t=this.props,n=t.user,o=t.isSelf;if(!n)return null;var a=n.urlToken,i=n.isOrg,c=n.headline,s=n.badge,l=n.badgeV2,u=n.answerCount,d=n.articlesCount,f=n.followerCount,p=pe.e(l||s),h=p.identity,b=p.bestAnswerer,m=p.baike,v=i?"org":"people";return Object(r.c)(Yn.d,{className:"AnswerAuthor",children:[Object(r.b)(Yn.b,{className:"AnswerAuthor-title",children:"关于作者"}),Object(r.b)(Yn.c,{children:Object(r.c)("div",{className:"AnswerAuthor-user",children:[Object(r.b)("div",{className:"AnswerAuthor-user-avatar",children:Object(r.b)(Ui.a,{user:n,avatarProps:{size:60},noHoverCard:!0})}),Object(r.c)("div",{className:"AnswerAuthor-user-content",children:[Object(r.b)("div",{className:"AnswerAuthor-user-name",children:Object(r.b)(Vi.a,{user:n,noBadge:!0,noHoverCard:!0})}),c&&Object(r.b)("div",{className:"AnswerAuthor-user-headline",children:Object(r.b)(It.a,{html:c})})]})]})}),Object(r.c)(Yn.c,{children:[h&&Object(r.c)("div",{className:"AnswerAuthor-item",children:[Object(r.b)("a",{className:"AnswerAuthor-item-icon",href:"/account/verification/intro",target:"_blank",children:Object(r.b)(pe.a,{center:!0,size:19})}),Object(r.b)("div",{className:"AnswerAuthor-item-value",children:h.slice(0,2).map((function(e){return e.description})).join("")})]}),Boolean(null==b||null===(e=b.topics)||void 0===e?void 0:e.length)&&Object(r.c)("div",{className:"AnswerAuthor-item",children:[Object(r.b)("span",{className:"AnswerAuthor-item-icon",children:Object(r.b)(pe.b,{center:!0,size:19})}),Object(r.c)("div",{children:[Object(r.b)(Mi.a,{topics:b.topics,user:n,noHoverCard:!0}),"的优秀答主"]})]}),Boolean(m)&&Object(r.c)("div",{className:"AnswerAuthor-item",children:[Object(r.b)("span",{className:"AnswerAuthor-item-icon",children:Object(r.b)(pe.d,{center:!0,size:19})}),Object(r.b)("div",{children:m.description})]}),n&&!o&&Object(r.b)(Fi,{author:n})]}),a&&Object(r.c)(Yn.c,{children:[Object(r.b)("div",{className:"AnswerAuthor-counts",children:Object(r.c)(Ft.a,{children:[Object(r.b)(Ft.a.Item,{tag:at.a,preset:"plain",to:"/".concat(v,"/").concat(a,"/answers"),name:"回答",value:u,"data-za-detail-view-element_name":"Answer"}),Object(r.b)(Ft.a.Item,{tag:at.a,preset:"plain",to:"/".concat(v,"/").concat(a,"/posts"),name:"文章",value:d,"data-za-detail-view-element_name":"Post"}),Object(r.b)(Ft.a.Item,{tag:at.a,preset:"plain",to:"/".concat(v,"/").concat(a,"/followers"),name:"关注者",value:f,"data-za-detail-view-element_name":"Follower"})]})}),!o&&Object(r.b)(ii.a,{className:"AnswerAuthor-buttons",user:n})]})]})}}]),n}(d.Component),Qi=Object(b.connect)((function(e,t){var n=t.answer,r=n.author,o=n.author.urlToken,a=e.entities.users,i=o?a[o]:r;return{currentUser:Object(M.b)(e),isDrained:Hi(i),user:i,isSelf:Object(M.i)(e,i)}}),{loadProfile:ai.h})(Ki),Wi=n(854),Gi=n(1467);function Yi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Zi=function(e){Object(s.a)(n,e);var t=Yi(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).load=function(){var t=e.props,n=t.answer.id;(0,t.loadAnswerFavlists)(n)},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.items,n=e.count,o=e.isFetching,a=e.isDrained;return Object(r.c)("div",{className:"AnswerFavlists",children:[Object(r.b)("div",{className:"AnswerFavlists-header",children:Object(r.c)("div",{className:"AnswerFavlists-title",children:["被收藏 ",Object(xe.formatNumber)(n)," 次"]})}),!(a&&!t.length)&&Object(r.b)(Tr.b,{className:"AnswerFavlists-list",isLocal:!0,isLoading:o,isDrained:a,onLoad:this.load,getContainer:function(e){return e},placeholder:Object(r.b)(Tr.a,{className:"AnswerFavlists-item",small:!0}),children:t.map((function(e){var t=e.id,n=e.type,o=e.creator,a=e.isFollowing,i=e.answerCount,c=e.followerCount;return Object(r.b)(Oo.a,{children:Object(r.b)(Gi.a,{favlist:e,action:Object(r.b)(lt.a,{preset:"primary",id:t,type:n,isFollowing:a}),status:Object(r.c)(Wi.d,{children:[Object(r.c)("span",{children:["由"," ",Object(r.b)(Mt.a,{user:o,noBadge:!0,noHoverCard:!0,target:"_blank"})," ","创建"]}),Object(r.c)("span",{children:[Object(xe.formatNumber)(i)," 条内容"]}),Object(r.c)("span",{children:[Object(xe.formatNumber)(c)," 人关注"]})]})})},t)}))})]})}}]),n}(d.Component),Xi=Object(E.compose)(Object(b.connect)((function(e,t){var n=t.answer.id,r=e.entities.favlists,o=e.answers.favlists[n]||{isFetching:!1,isDrained:!1,totals:0,ids:[]};return{items:o.ids.map((function(e){return r[e]})),count:o.totals,isFetching:o.isFetching,isDrained:o.isDrained}}),{loadAnswerFavlists:P.s}),Object(j.b)({module:"CollectionList"}))(Zi),Ji=n(1024);function $i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ec=function(e){Object(s.a)(n,e);var t=$i(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).load=function(){var t=e.props,n=t.answer.id;(0,t.loadAnswerCopyrightApplicants)(n)},e}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.items,n=e.count,o=e.isFetching,a=e.isDrained;return Object(r.c)("div",{className:"AnswerCopyrightApplicants",children:[Object(r.b)("div",{className:"AnswerCopyrightApplicants-header",children:Object(r.c)("div",{className:"AnswerCopyrightApplicants-title",children:["授权转载 ",Object(xe.formatNumber)(n)," 次"]})}),!(a&&!t.length)&&Object(r.b)(Tr.b,{className:"AnswerCopyrightApplicants-list",isLocal:!0,isLoading:o,isDrained:a,onLoad:this.load,getContainer:function(e){return e},placeholder:Object(r.b)(Tr.a,{className:"AnswerCopyrightApplicants-item",small:!0}),children:t.map((function(e){var t=e.applier,n=e.accountType,o=e.accountUsername,a=e.createdAt;return Object(r.b)("div",{className:"AnswerCopyrightApplicants-item",children:Object(r.b)(Ji.a,{user:t,meta:"".concat(n," ").concat(o),status:null,action:Object(r.c)("div",{className:"AnswerCopyrightApplicants-time",children:["申请于 ",Object(w.toDateString)(a)]})})},"".concat(t.name,".").concat(a))}))})]})}}]),n}(d.Component),tc=Object(b.connect)((function(e,t){var n=t.answer.id,r=e.entities.copyrightApplicants,o=e.answers.copyrightApplicants[n]||{isFetching:!1,isDrained:!1,totals:0,ids:[]};return{items:o.ids.map((function(e){return r[e]})),count:o.totals,isFetching:o.isFetching,isDrained:o.isDrained}}),{loadAnswerCopyrightApplicants:P.r})(ec);function nc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var rc=function(e){Object(s.a)(n,e);var t=nc(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.copyrightApplicant,t=e.applier,n=e.accountType,o=e.accountUsername,a=e.createdAt;return Object(r.c)("div",{className:"AnswerInfo-copyright-applicant",children:[Object(r.b)(Mt.a,{user:t,noBadge:!0,noHoverCard:!0,target:"_blank"}),"",n," ",o]},"".concat(t.name,".").concat(a))}}]),n}(d.Component);function oc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var ac=function(e){Object(s.a)(n,e);var t=oc(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.copyrightApplicants;return Object(r.b)(Yn.c,{className:"AnswerInfo-copyright-applicants",children:e.map((function(e,t){return Object(r.b)(rc,{copyrightApplicant:e},t)}))},"content")}}]),n}(d.Component);function ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var cc=function(e){Object(s.a)(n,e);var t=ic(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.favlist,t=e.id,n=e.title,o=e.followerCount,a=e.creator;return Object(r.c)("div",{className:"AnswerInfo-favlist",children:[Object(r.b)("div",{className:"AnswerInfo-favlist-title",children:Object(r.b)(at.a,{preset:"plain",a:!0,to:"/collection/".concat(t),target:"_blank","data-za-detail-view-element_name":"Collection",title:n,children:n})}),Object(r.c)("div",{className:"AnswerInfo-favlist-author",children:[Object(r.b)(Mt.a,{user:a,noBadge:!0,noHoverCard:!0,target:"_blank","data-za-detail-view-element_name":"Author"})," ","创建"]}),Object(r.c)("div",{className:"AnswerInfo-favlist-followers",children:[Object(xe.formatNumber)(o)," 人关注"]})]},t)}}]),n}(d.Component),sc=Object(j.b)((function(e){var t=e.favlist;return{module:"CollectionItem",content:{type:"Collection",token:String(t.id),follower_num:t.followerCount,author_member_hash_id:t.creator.id},trackCardShow:!0}}))(cc);function lc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var uc=function(e){Object(s.a)(n,e);var t=lc(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props.favlists;return Object(r.b)(Yn.c,{className:"AnswerInfo-favlists",children:e.map((function(e){return Object(r.b)(sc,{favlist:e},e.id)}))},"content")}}]),n}(d.Component),dc=Object(j.b)({module:"CollectionList"})(uc);function fc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var pc=function(e){Object(s.a)(n,e);var t=fc(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={copyrightApplicantsModalShown:!1,favlistsModalShown:!1},e.handleCopyrightApplicantsModalShow=function(){re.a.trackEvent(Object(et.a)(e),{action:"Click",element:"Button",name:"转载授权"}),e.setState({copyrightApplicantsModalShown:!0})},e.handleCopyrightApplicantsModalHide=function(){e.setState({copyrightApplicantsModalShown:!1})},e.handleFavlistsModalShow=function(){re.a.trackEvent(Object(et.a)(e),{action:"Click",element:"Button",name:"被收藏"}),e.setState({favlistsModalShown:!0})},e.handleFavlistsModalClose=function(){e.setState({favlistsModalShown:!1})},e}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.answer.id,n=e.copyrightApplicants,r=e.favlists,o=e.loadAnswerCopyrightApplicants,a=e.loadAnswerFavlists;n.length||r.length||(o(t),a(t))}},{key:"componentDidUpdate",value:function(e){this.props.onLoad&&(!e.copyrightApplicants.length&&this.props.copyrightApplicants.length||!e.favlists.length&&this.props.favlists.length)&&this.props.onLoad()}},{key:"render",value:function(){var e=this.props,t=e.answer,n=e.copyrightApplicants,o=e.copyrightApplicantCount,a=e.favlists,i=e.favlistCount,c=this.state,s=c.favlistsModalShown,l=c.copyrightApplicantsModalShown;return n.length||a.length?Object(r.c)(Yn.d,{children:[Boolean(n.length)&&[Object(r.c)(Yn.b,{className:"AnswerInfo-title",children:["授权转载"," ",Object(r.b)(D.c,{preset:"plain",onClick:this.handleCopyrightApplicantsModalShow,children:Object(xe.formatNumber)(o)})," ","次"]},"header"),Object(r.b)(ac,{copyrightApplicants:n.slice(0,5)},"content")],Boolean(a.length)&&[Object(r.c)(Yn.b,{className:"AnswerInfo-title",children:["被收藏"," ",Object(r.b)(D.c,{preset:"plain",onClick:this.handleFavlistsModalShow,children:Object(xe.formatNumber)(i)})," ","次"]},"header"),Object(r.b)(dc,{favlists:a.slice(0,5)},"content")],Object(r.b)(Dt.b,{size:"fullPage",onClose:this.handleFavlistsModalClose,children:s&&Object(r.b)(Xi,{answer:t})}),Object(r.b)(Dt.b,{size:"fullPage",onClose:this.handleCopyrightApplicantsModalHide,children:l&&Object(r.b)(tc,{answer:t})})]}):null}}]),n}(d.Component),hc=Object(b.connect)((function(e,t){var n=t.answer.id,r=e.entities,o=r.copyrightApplicants,a=r.favlists,i=e.answers.copyrightApplicants[n]||{totals:0,ids:[]},c=e.answers.favlists[n]||{totals:0,ids:[]};return{copyrightApplicants:i.ids.map((function(e){return o[e]})),copyrightApplicantCount:i.totals,favlists:c.ids.map((function(e){return a[e]})),favlistCount:c.totals}}),{loadAnswerCopyrightApplicants:P.r,loadAnswerFavlists:P.s})(pc);function bc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var mc=function(e){Object(s.a)(n,e);var t=bc(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).onHeightChange=function(){e.dynamicSticky&&e.dynamicSticky.check()},e}return Object(c.a)(n,[{key:"shouldComponentUpdate",value:function(e){return e.answer.id!==this.props.answer.id}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,o=t.question,a=o.id,i=o.questionType,c=t.answer,s=Object(P.n)(c)||Object(P.l)(c);return Object(r.c)(gi.a,{className:"Question-sideColumn Question-sideColumn--sticky",onRef:function(t){e.sidebar=t},offset:nn.i+10,ref:function(t){e.dynamicSticky=t},children:[Object(r.b)(Da.a,{type:"question",getSidebar:function(){return e.sidebar}}),s||"normal"===i&&437329650!==a&&Object(r.b)("div",{className:"Question-sideColumnAdContainer",children:Object(r.b)(za.a,{isMobile:!1,id:"question/".concat(a,"/answer/").concat(c.id),location:"new_answer_up",query:{question_token:a,answer_token:c.id},onHeightChange:this.onHeightChange})}),"commercial"===i&&Object(r.b)(oi.a,{questionId:a}),c.author&&Object(r.b)(Qi,{answer:c,onLoad:this.onHeightChange}),Object(r.b)(bi,{}),Object(r.b)(hc,{answer:c,onLoad:this.onHeightChange}),Object(r.b)(vi,{}),s||"normal"===i&&Object(r.b)(Qa,{question:n,onLoad:this.onHeightChange}),s||"normal"===i&&Object(r.b)(ri,{answer:c,question:n,onLoad:this.onHeightChange}),s||"normal"===i&&437329650!==a&&Object(r.b)("div",{children:Object(r.b)(za.a,{isMobile:!1,id:"question/".concat(a,"/answer/").concat(c.id),location:"new_answer_down_sticky",query:{question_token:a,answer_token:c.id},delay:1e3,onHeightChange:this.onHeightChange})}),Object(r.b)(Fa.a,{})]})}}]),n}(d.Component),vc=Object(E.compose)(Object(T.a)(null),Object(j.b)((function(e){var t=e.answer;return{module:"RightSideBar",content:Object.assign({},t.author&&{member_hash_id:t.author.id})}})))(mc);function gc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var yc=function(e){Object(s.a)(n,e);var t=gc(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"render",value:function(){var e=this.props,t=e.to,n=e.itemNum,o=e.questionType;e.bottom;return Object(r.b)(Yn.d,{className:de()("ViewAll",{"ViewAll--bottom":!1}),children:Object(r.b)(jo.a,{className:"ViewAll-QuestionMainAction",to:t,"data-za-detail-view-element_name":"ViewAll",style:{},children:"commercial"===o?"查看 ".concat(Object(xe.formatNumber)(n)," 个品牌推荐的回答"):"查看全部 ".concat(Object(xe.formatNumber)(n)," 个回答")})})}}]),n}(d.Component),Oc=Object(j.b)((function(e){return{module:"MessageItem",content:{item_num:e.itemNum}}}))(yc),jc=n(1106),wc=Object.assign;var Cc=function(e){return f.a.createElement(Te.a,wc({width:"43",height:"50",fill:"none",viewBox:"0 0 43 50"},e),f.a.createElement("path",{fill:"#121212",d:"M23.376 45.237c-1.567 0-3.133.012-4.698 0a1.701 1.701 0 00-1.133.386 507.16 507.16 0 01-4.493 3.517 3.959 3.959 0 01-.694.449 1.305 1.305 0 01-1.792-1.537c.239-.737.477-1.47.744-2.192.158-.42.153-.597-.384-.68-1.963-.3-3.672-1.093-4.879-2.756a7.614 7.614 0 01-1.272-2.983c-.098-.477-.238-.455-.651-.317-.625.212-.783.568-.601 1.16.041.155.057.316.047.477a.988.988 0 01-.806 1.03.954.954 0 01-1.162-.589c-.115-.257-.189-.417-.527-.408a1.009 1.009 0 01-1.003-.701c-.188-.463.015-.828.337-1.112.238-.22.238-.356.067-.625a1.023 1.023 0 01.238-1.432.98.98 0 011.377.203c.293.348.542.344.966.227 1.315-.365 1.974-1.088 1.99-2.534.015-1.239.346-2.467.494-3.706.158-1.314-.1-2.61-.258-3.905-.205-1.67-.477-3.34-.742-4.992-.136-.89.44-1.462 1.325-1.312 1.119.186 1.104.183 1.255-.955.224-1.689.45-3.376.715-5.058a1.102 1.102 0 00-.522-1.243C5.336 12.284 4.34 10.273 3.93 7.954c-.462-2.57.65-4.554 2.53-6.175C8.34.156 10.609-.166 12.993.068a11.67 11.67 0 013.884 1.028 5.311 5.311 0 012.147 1.728c.303.436.645.541 1.138.539 4.362-.017 8.721 0 13.08 0 1.776 0 3.415.413 4.813 1.563 2.04 1.67 2.784 3.87 2.558 6.442-.009.08-.023.16-.04.239-.178.954-.21 1.655.715 2.479a4.5 4.5 0 01.386 6.15 13.421 13.421 0 01-2.2 2.246 1.322 1.322 0 00-.548.928c-.604 4.355-1.267 8.7-1.814 13.06-.539 4.327-3.407 7.65-7.566 8.59-.876.169-1.768.235-2.66.198H23.38l-.003-.021z"}),f.a.createElement("path",{fill:"#FEFEFE",d:"M12.394 47.606c.441-1.293.809-2.417 1.21-3.526.136-.377 0-.442-.335-.444-.715 0-1.431-.019-2.147-.07-1.346-.095-2.458-.698-3.412-1.624a1.357 1.357 0 01-.425-1.105c.046-.93.062-1.863.062-2.794a.614.614 0 01.492-.692c.513-.148 1.014-.338 1.517-.517.442-.156.642-.478.509-.929-.144-.477-.537-.532-.955-.41-.322.09-.64.21-.954.31-.403.13-.601 0-.592-.446.02-.89 0-1.782.024-2.675.05-2.944-.33-5.85-.775-8.751-.02-.117-.043-.239-.055-.351-.046-.535.086-.659.606-.53 1.095.267 2.2.504 3.278.833 1.67.51 3.329.365 4.975-.1 1.97-.559 3.798-1.473 5.64-2.343a1.038 1.038 0 00.604-.955c.072-1.047.16-2.095.238-3.14.048-.61.184-.715.747-.477 1.625.628 3.252 1.25 4.865 1.909a3.12 3.12 0 002.195.074c1.73-.558 3.348-1.413 5.018-2.114.745-.306.768-.306 1.074.458.532 1.322 1.038 2.653 1.603 3.963.191.444.079.695-.265.954a37.672 37.672 0 01-4.576 2.976c-.833.463-.883.568-.716 1.517.838 4.57 1.217 9.189 1.556 13.813a1.209 1.209 0 01-.44 1.085c-1.631 1.494-3.552 2.148-5.752 2.148-3.101-.029-6.184 0-9.276 0a1.432 1.432 0 00-1 .374c-1.436 1.179-2.93 2.317-4.538 3.58z"}),f.a.createElement("path",{fill:"#06F",d:"M32.376 15.823a3.172 3.172 0 00-.04-.366c-.284-1.171.035-2.087 1.026-2.834.584-.441.61-.926.293-1.403s-.78-.573-1.45-.239c-.24.122-.299.072-.356-.157a1.583 1.583 0 00-.212-.477.936.936 0 00-1.14-.408.995.995 0 00-.693 1.062c.023.211.06.42.112.627-.365-.05-.69-.239-1.05-.086a.99.99 0 00-.675.759.869.869 0 00.415.973c.392.239.802.427 1.215.62a.548.548 0 01.394.52c.023.655.076 1.308.133 1.957a.46.46 0 01-.327.542 2.832 2.832 0 01-2.343.05c-1.894-.8-3.817-1.517-5.743-2.26-.97-.376-1.536-.028-1.63 1.005-.114 1.262-.238 2.524-.312 3.791a.809.809 0 01-.51.78c-1.797.83-3.594 1.67-5.56 2.031a6.441 6.441 0 01-2.708-.06c-.752-.176-1.494-.398-2.248-.555-.36-.075-.439-.24-.39-.568.28-1.922.552-3.843.813-5.765.043-.322.183-.418.477-.336.424.112.871.104 1.29-.024.492-.132.82.045 1.163.365a8.126 8.126 0 003.209 1.849c.828.239 1.243-.11 1.08-.954-.142-.738-.262-1.482-.443-2.212a1 1 0 01.334-1.093 17.656 17.656 0 002.758-3.34c.821-1.272 1.265-2.642.954-4.171-.083-.418.063-.506.451-.506 4.18.012 8.363 0 12.544.012 1.708 0 3.242.477 4.435 1.782 1.29 1.42 1.484 3.102 1.336 4.94-.095 1.176-.522 1.791-1.732 2.147-1.489.434-2.878 1.21-4.309 1.837-.17.1-.363.157-.56.165z"}),f.a.createElement("path",{fill:"#FEFEFE",d:"M14.94 15.307c-.871-.3-1.477-.87-2.088-1.431-.318-.291-.685-.477-1.129-.392-1.88.404-3.219-.587-4.4-1.806-1.479-1.53-2.2-3.426-1.892-5.538.33-2.25 2.699-4.328 4.99-4.56 1.838-.206 3.7.034 5.425.702 2.83 1.107 3.775 3.844 2.207 6.442a15.454 15.454 0 01-3.102 3.656.992.992 0 00-.367 1.143c.153.56.231 1.147.356 1.784z"}),f.a.createElement("path",{fill:"#06F",d:"M35.01 38.244a128.668 128.668 0 00-.763-7.824 60.35 60.35 0 00-.527-3.464.584.584 0 01.324-.716c.842-.52 1.67-1.062 2.51-1.59.146-.09.296-.295.463-.197.167.098.088.36.064.544-.226 1.652-.455 3.299-.687 4.939-.362 2.507-.73 5.014-1.105 7.523a1.38 1.38 0 01-.279.785z"}),f.a.createElement("path",{fill:"#B7B7B6",d:"M37.792 17.19c-.238-.239-.353-.392-.303-.6 0-.03.13-.073.139-.061a.98.98 0 01.164.66z"}),f.a.createElement("path",{fill:"#121212",d:"M20.92 27.309c.025.954-.488 1.479-1.43 1.5-.943.022-1.633-.615-1.64-1.56-.007-.945.697-1.53 1.804-1.546.9-.012 1.231.42 1.267 1.606z"}),f.a.createElement("path",{fill:"#444",d:"M11.938 5.575c.172-.137.35-.265.537-.382a.804.804 0 011.178.294c.378.652.654 1.358.816 2.094.1.38-.176.432-.43.492-.252.06-.522.112-.6-.265-.094-.444-.172-.895-.308-1.329-.079-.255-.131-.656-.563-.518-.396.124-.477.416-.31.802.183.44.312.897.491 1.336.217.535-.2.623-.518.728-.317.105-.749.339-.93-.239a33.209 33.209 0 01-.897-3.567c-.098-.477.26-.553.584-.651.325-.098.575-.045.673.348.072.289.074.6.277.857zM9.266 9.09l.954-.356c.191-.067.356-.048.442.165a.32.32 0 01-.047.376.322.322 0 01-.11.077 9.983 9.983 0 01-2.172.775c-.446.093-.675-.238-.525-.715.22-.697.477-1.38.733-2.09-.332-.077-.616.095-.912.166-.186.046-.358.074-.453-.143a.354.354 0 01.179-.5c.67-.302 1.4-.445 2.133-.42.415.018.551.338.422.737-.196.591-.398 1.188-.644 1.927zm6.461-1.544c-.289.043-.458-.096-.55-.39-.15-.477-.238-.954-.355-1.43-.152-.597.208-.74.626-.862.46-.136.57.212.684.537.115.324.253.715.377 1.059.25.704-.002 1.064-.782 1.086z"}),f.a.createElement("path",{fill:"#4A4B4A",d:"M15.037 3.055a.77.77 0 01.75.77.728.728 0 01-.779.745.716.716 0 01-.741-.751c.028-.485.324-.707.77-.764z"}))},kc=Object.assign;var xc=function(e){return f.a.createElement(Te.a,kc({width:"14",height:"14",fill:"none",viewBox:"0 0 14 14"},e),f.a.createElement("mask",{id:"id-628033106-a",width:"14",height:"14",x:"0",y:"0",maskUnits:"userSpaceOnUse"},f.a.createElement("path",{fill:"#fff",d:"M.001.014h13.985V14H.001V.014z",fillRule:"evenodd",clipRule:"evenodd"})),f.a.createElement("g",{mask:"url(#id-628033106-a)"},f.a.createElement("path",{fill:"#121212",d:"M2.543 8.278a.636.636 0 010 1.272h-.636A1.907 1.907 0 010 7.643V1.92C0 .868.854.014 1.907.014H7.63c1.053 0 1.907.854 1.907 1.907v.636a.636.636 0 01-1.271 0V1.92a.636.636 0 00-.636-.636H1.907a.636.636 0 00-.636.636v5.722c0 .35.285.635.636.635h.636zm3.814-3.814h5.722c1.053 0 1.907.854 1.907 1.907v5.722A1.907 1.907 0 0112.08 14H6.357a1.907 1.907 0 01-1.907-1.907V6.37c0-1.053.854-1.907 1.907-1.907zm0 1.271a.636.636 0 00-.635.636v5.722c0 .35.284.636.635.636h5.722a.636.636 0 00.636-.636V6.37a.636.636 0 00-.636-.636H6.357z",fillRule:"evenodd",clipRule:"evenodd"})))},Sc=Object.assign;var Ec=function(e){return f.a.createElement(Te.a,Sc({width:"15",height:"14",fill:"none",viewBox:"0 0 15 14"},e),f.a.createElement("path",{fill:"#121212",d:"M3.55 14c-.106 0-.159 0-.265-.053a.583.583 0 01-.318-.53v-2.225H.954A.95.95 0 010 10.238V.965A.95.95 0 01.954.01h12.982a.95.95 0 01.954.954v9.273a.95.95 0 01-.954.954H7.418l-3.497 2.702c-.106.053-.212.106-.37.106zm-2.49-3.921h2.437c.318 0 .53.212.53.53v1.854l2.914-2.225c.106-.053.212-.106.318-.106h6.518V1.124H1.06v8.955z",fillRule:"evenodd",clipRule:"evenodd"}),f.a.createElement("path",{fill:"#121212",d:"M3.709 4.515h7.948v-1.06H3.71v1.06zm0 3.18h4.239v-1.06H3.709v1.06z",fillRule:"evenodd",clipRule:"evenodd"}))},Rc=Object.assign;var Tc=function(e){return f.a.createElement(Te.a,Rc({width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),f.a.createElement("mask",{id:"id-95574191-a",width:"16",height:"16",x:"0",y:"0",maskUnits:"userSpaceOnUse"},f.a.createElement("path",{fill:"#fff",d:"M.001.016h15.983V16H.001V.016z",fillRule:"evenodd",clipRule:"evenodd"})),f.a.createElement("g",{mask:"url(#id-95574191-a)"},f.a.createElement("path",{fill:"#121212",d:"M7.992.016C3.585.016 0 3.6 0 8.008a7.96 7.96 0 001.344 4.435.521.521 0 00.867-.58 6.915 6.915 0 01-1.169-3.855 6.958 6.958 0 016.95-6.95 6.958 6.958 0 016.95 6.95 6.958 6.958 0 01-6.95 6.95 6.917 6.917 0 01-3.865-1.175.522.522 0 00-.58.866A7.956 7.956 0 007.992 16c4.407 0 7.992-3.585 7.992-7.992S12.4.016 7.992.016zM5.046 8.368c-.221 0-.332-.096-.332-.29V7.29c0-.216.111-.323.332-.323h2.167a4.28 4.28 0 01-.394 1.401H5.046zm3.14-1.401h2.746a.47.47 0 01.28.071c.058.041.086.125.086.252v.845c0 .155-.12.233-.366.233H7.873a8.4 8.4 0 00.314-1.401zm-2.964 3.316c-.386.266-.945.508-1.677.727v.822c.301-.032.542-.069.722-.11a4.708 4.708 0 001.63-.774c.558-.409 1.07-.976 1.54-1.701h.712v1.615c0 .33.098.572.294.727.178.143.404.214.68.214h3.206V10.9H9.426c-.126 0-.218-.023-.275-.07-.054-.045-.079-.142-.076-.29l.005-1.293h2.166a.98.98 0 00.703-.261c.155-.149.233-.376.233-.68V7.03c0-.311-.085-.545-.256-.704-.105-.098-.268-.172-.49-.223l.252-.58c.073-.168.11-.308.11-.422a.823.823 0 00-.276-.608c-.187-.187-.444-.28-.77-.28h-5.14l.137-.47h-.893c-.161.449-.327.778-.498.987-.206.257-.447.412-.723.466v.907a2.96 2.96 0 00.908-.404 3 3 0 00.622-.608h5.221c.188 0 .304.013.352.038.073.038.109.092.109.162s-.03.175-.095.318l-.21.46H5.09c-.478 0-.805.083-.983.248-.187.177-.28.43-.28.76V8.26c0 .491.202.804.607.94.096.032.288.048.576.048h1.287c-.37.46-.728.805-1.074 1.036z",fillRule:"evenodd",clipRule:"evenodd"})))};function Ac(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var o=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}var Nc=function(e){Object(s.a)(n,e);var t=Ac(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.answer,n=e.params.answerId,r=e.loadAnswer,o=e.currentUser,a=e.checkIfCanConvertToVessay;t||r(n),Object(jc.a)(o,null==t?void 0:t.author)&&a(n)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.params.answerId,n=e.params.answerId,r=e.loadAnswer;n!==t&&r(n)}},{key:"render",value:function(){if(!this.props.answer)return null;var e=this.props,t=e.answer,n=e.answer.id,o=e.question,a=e.question,i=a.id,c=a.answerCount,s=a.questionType,l=e.location,u=e.isMuteSpecial,d=(e.currentUser||{}).userType;return!t.relationship.isAuthor&&t.visibleOnlyToAuthor?Object(r.b)(S,{}):Object(r.c)("div",{className:"Question-main",children:[Object(r.b)(g.a,{meta:Object(_.a)(t,o.topics)}),Object(r.b)(Si.b,{selector:[".ViewAll-QuestionMainAction",".QuestionAnswer-content",".List-item"].join(","),children:Object(r.c)("div",{className:"Question-mainColumn","data-zop-questionanswerlist":!0,children:[("guest"===d||!d)&&Object(r.c)("div",{className:"Question-mainColumnLogin",children:[Object(r.b)("div",{className:"Question-mainColumnLoginImg",children:Object(r.b)(Cc,{})}),Object(r.c)("div",{className:"Question-mainColumnLoginContent",children:[Object(r.b)("div",{className:"Question-mainColumnLoginTitle",children:"登录后你可以"}),Object(r.c)("div",{className:"Question-mainColumnLoginDes",children:[Object(r.c)("span",{className:"Question-mainColumnLoginDesIcon",children:[Object(r.b)(xc,{}),"不限量看优质回答"]}),Object(r.c)("span",{className:"Question-mainColumnLoginDesIcon",children:[Object(r.b)(Ec,{}),"私信答主深度交流"]}),Object(r.c)("span",{className:"Question-mainColumnLoginDesIcon",children:[Object(r.b)(Tc,{}),"精彩内容一键收藏"]})]})]}),Object(r.b)("div",{className:"Question-mainColumnLoginRightButton",children:Object(r.b)(z.b,{loginButton:Object(r.b)(D.c,{className:"Question-mainColumnLoginButton",children:"登录"})})})]}),Object(P.n)(t)||Object(P.l)(t)||c>0&&!u&&Object(r.b)(Oc,{itemNum:c,to:"/question/".concat(i),questionType:s}),Object(r.b)(Ai,{question:o,location:l,answer:t}),Object(P.n)(t)||Object(P.l)(t)||Object(r.b)(Ii,{question:o,answerId:n}),c>0&&!u&&Object(r.b)(Oc,{itemNum:c,to:"/question/".concat(i),questionType:s})]})}),Object(r.b)(ie.a,{children:Object(r.b)(vc,{question:o,answer:t})})]})}}]),n}(d.Component);Nc.fetchData=function(e){var t=e.dispatch,n=e.params.answerId;return t(Object(P.o)(n))};var _c=Object(b.connect)((function(e,t){var n=t.params,r=n.id,o=n.answerId,a=Object(R.bb)(e,{id:r}),i=Object(P.c)(e,{id:o}),c=Object(M.b)(e),s=(a||{}).relationship||{myAnswer:{isDelete:!1}};return{question:a,isOffice:Object(U.e)(e),answer:i&&Object.assign({},i,{isDelete:(i.relationship||{}).isAuthor&&(s.myAnswer||{}).isDeleted}),isMuteSpecial:Object(R.C)(a),currentUser:c}}),{loadAnswer:P.o,checkIfCanConvertToVessay:P.f})(Nc);t.default=Object(r.c)(o.Route,{children:[Object(r.b)(o.Route,{path:"waiting",component:Mr,name:"QuestionWaiting",authRequired:!0,zaPageShowId:5541}),Object(r.b)(o.Route,{path:"later",component:Kr,name:"QuestionLater",authRequired:!0,zaPageShowId:5371}),Object(r.b)(o.Route,{path:"invited",component:Jr,name:"QuestionInvited",authRequired:!0,zaPageShowId:5543}),Object(r.c)(o.Route,{path:":id",component:Rr,name:"Question",children:[Object(r.c)(o.Route,{children:[Object(r.b)(o.IndexRoute,{component:ki,entity:"answers",resource:"answers",name:"QuestionPage",zaPageShowId:3378}),Object(r.b)(o.Route,{path:"answers/hidden",component:ki,entity:"answers",resource:"hiddenAnswers",name:"QuestionHiddenAnswers"}),Object(r.b)(o.Route,{path:"answers/updated",component:ki,resource:"updatedAnswers",name:"QuestionUpdatedAnswers"}),Object(r.b)(o.Redirect,{from:"answers/created",to:"answers/updated"})]}),Object(r.b)(o.Route,{path:"answer/:answerId",component:_c,name:"AnswerPage",zaPageShowId:2012}),Object(r.b)(o.Redirect,{from:"noti-answers",to:"."})]})]})}])]);
//# sourceMappingURL=main.question-routes.12891aeec83ba7a7be56.js.map