xiaojiji
Version:
A simple comment system based on sqlite.
12 lines • 154 kB
JavaScript
/*!
* Valine v0.1.16
* (c) 2017-2022 xCss
* Released under the GPL-2.0 License.
* Last Update: 6/19/2022, 7:38:55 PM
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Valine=t():e.Valine=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=73)}([function(e,t,n){"use strict";function r(e){return e=e.toLowerCase(),function(t){return F(t)===e}}function i(e){return Array.isArray(e)}function o(e){return void 0===e}function u(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function a(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&B(e.buffer)}function s(e){return"string"==typeof e}function l(e){return"number"==typeof e}function c(e){return null!==e&&"object"==typeof e}function f(e){if("object"!==F(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){return"[object Function]"===C.call(e)}function d(e){return c(e)&&p(e.pipe)}function h(e){return e&&("function"==typeof FormData&&e instanceof FormData||"[object FormData]"===C.call(e)||p(e.toString)&&"[object FormData]"===e.toString())}function v(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function D(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function m(){function e(e,n){f(t[n])&&f(e)?t[n]=m(t[n],e):f(e)?t[n]=m({},e):i(e)?t[n]=e.slice():t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)D(arguments[n],e);return t}function b(e,t,n){return D(t,function(t,r){e[r]=n&&"function"==typeof t?k(t,n):t}),e}function y(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}function w(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)}function x(e,t,n){var r,i,o,u={};t=t||{};do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],u[o]||(t[o]=e[o],u[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function A(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n}function E(e){if(!e)return null;var t=e.length;if(o(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n}var k=n(12),C=Object.prototype.toString,F=function(e){return function(t){var n=C.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null)),B=r("ArrayBuffer"),_=r("Date"),O=r("File"),S=r("Blob"),R=r("FileList"),T=r("URLSearchParams"),P=function(e){return function(t){return e&&t instanceof e}}("undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array));e.exports={isArray:i,isArrayBuffer:B,isBuffer:u,isFormData:h,isArrayBufferView:a,isString:s,isNumber:l,isObject:c,isPlainObject:f,isUndefined:o,isDate:_,isFile:O,isBlob:S,isFunction:p,isStream:d,isURLSearchParams:T,isStandardBrowserEnv:g,forEach:D,merge:m,extend:b,trim:v,stripBOM:y,inherits:w,toFlatObject:x,kindOf:F,kindOfTest:r,endsWith:A,toArray:E,isTypedArray:P,isFileList:R}},function(e,t,n){"use strict";function r(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}var i=n(0);i.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=r.prototype,u={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){u[e]={value:e}}),Object.defineProperties(r,u),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=function(e,t,n,u,a,s){var l=Object.create(o);return i.toFlatObject(e,l,function(e){return e!==Error.prototype}),r.call(l,e.message,t,n,u,a),l.name=e.name,s&&Object.assign(l,s),l},e.exports=r},function(e,t,n){"use strict";function r(e){i.call(this,null==e?"canceled":e,i.ERR_CANCELED),this.name="CanceledError"}var i=n(1);n(0).inherits(r,i,{__CANCEL__:!0}),e.exports=r},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase();if(!n.i(i.a)(r))throw TypeError("Stringified UUID is invalid");return r}for(var i=n(4),o=[],u=0;u<256;++u)o.push((u+256).toString(16).substr(1));t.a=r},function(e,t,n){"use strict";function r(e){return"string"==typeof e&&i.a.test(e)}var i=n(59);t.a=r},function(e,t,n){"use strict";(function(t){function r(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function i(e,t,n){if(o.isString(e))try{return(t||JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}var o=n(0),u=n(44),a=n(1),s=n(10),l=n(14),c={"Content-Type":"application/x-www-form-urlencoded"},f={transitional:s,adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(6):void 0!==t&&"[object process]"===Object.prototype.toString.call(t)&&(e=n(6)),e}(),transformRequest:[function(e,t){if(u(t,"Accept"),u(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e))return e;if(o.isArrayBufferView(e))return e.buffer;if(o.isURLSearchParams(e))return r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,a=o.isObject(e),s=t&&t["Content-Type"];if((n=o.isFileList(e))||a&&"multipart/form-data"===s){var c=this.env&&this.env.FormData;return l(n?{"files[]":e}:e,c&&new c)}return a||"application/json"===s?(r(t,"application/json"),i(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a.from(e,a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(45)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],function(e){f.headers[e]={}}),o.forEach(["post","put","patch"],function(e){f.headers[e]=o.merge(c)}),e.exports=f}).call(t,n(54))},function(e,t,n){"use strict";var r=n(0),i=n(37),o=n(40),u=n(13),a=n(8),s=n(46),l=n(43),c=n(10),f=n(1),p=n(2),d=n(47);e.exports=function(e){return new Promise(function(t,n){function h(){e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g)}function v(){if(y){var r="getAllResponseHeaders"in y?s(y.getAllResponseHeaders()):null,o=b&&"text"!==b&&"json"!==b?y.response:y.responseText,u={data:o,status:y.status,statusText:y.statusText,headers:r,config:e,request:y};i(function(e){t(e),h()},function(e){n(e),h()},u),y=null}}var g,D=e.data,m=e.headers,b=e.responseType;r.isFormData(D)&&r.isStandardBrowserEnv()&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+x)}var A=a(e.baseURL,e.url);if(y.open(e.method.toUpperCase(),u(A,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(v)},y.onabort=function(){y&&(n(new f("Request aborted",f.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new f("Network Error",f.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new f(t,r.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,y)),y=null},r.isStandardBrowserEnv()){var E=(e.withCredentials||l(A))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;E&&(m[e.xsrfHeaderName]=E)}"setRequestHeader"in y&&r.forEach(m,function(e,t){void 0===D&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),b&&"json"!==b&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(g=function(e){y&&(n(!e||e&&e.type?new p:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g))),D||(D=null);var k=d(A);if(k&&-1===["http","https","file"].indexOf(k))return void n(new f("Unsupported protocol "+k+":",f.ERR_BAD_REQUEST,e));y.send(D)})}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(41),i=n(39);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){function n(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(i){return r.isUndefined(t[i])?r.isUndefined(e[i])?void 0:n(void 0,e[i]):n(e[i],t[i])}function o(e){if(!r.isUndefined(t[e]))return n(void 0,t[e])}function u(i){return r.isUndefined(t[i])?r.isUndefined(e[i])?void 0:n(void 0,e[i]):n(void 0,t[i])}function a(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}t=t||{};var s={},l={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:a};return r.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=l[e]||i,n=t(e);r.isUndefined(n)&&t!==a||(s[e]=n)}),s}},function(e,t,n){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(e,t){e.exports={version:"0.27.2"}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(0);e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var u=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),u.push(r(t)+"="+r(e))}))}),o=u.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";(function(t){function r(e,n){function r(e){return null===e?"":i.isDate(e)?e.toISOString():i.isArrayBuffer(e)||i.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):t.from(e):e}function o(e,t){if(i.isPlainObject(e)||i.isArray(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+t);u.push(e),i.forEach(e,function(e,u){if(!i.isUndefined(e)){var a,s=t?t+"."+u:u;if(e&&!t&&"object"==typeof e)if(i.endsWith(u,"{}"))e=JSON.stringify(e);else if(i.endsWith(u,"[]")&&(a=i.toArray(e)))return void a.forEach(function(e){!i.isUndefined(e)&&n.append(s,r(e))});o(e,s)}}),u.pop()}else n.append(t,r(e))}n=n||new FormData;var u=[];return o(e),n}var i=n(0);e.exports=r}).call(t,n(53).Buffer)},function(e,t,n){"use strict";function r(e){if(!n.i(i.a)(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}var i=n(4);t.a=r},function(e,t,n){"use strict";function r(){if(!i&&!(i="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 i(o)}t.a=r;var i,o=new Uint8Array(16)},function(e,t,n){"use strict";function r(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var i=n(3),o=n(15);t.a=function(e,t,u){function a(e,a,s,l){if("string"==typeof e&&(e=r(e)),"string"==typeof a&&(a=n.i(o.a)(a)),16!==a.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+e.length);if(c.set(a),c.set(e,a.length),c=u(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,s){l=l||0;for(var f=0;f<16;++f)s[l+f]=c[f];return s}return n.i(i.a)(c)}try{a.name=e}catch(e){}return a.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",a.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",a}},function(e,t,n){var r,i,o;/*!
autosize 4.0.4
license: MIT
http://www.jacklmoore.com/autosize
*/
!function(n,u){i=[e,t],r=u,void 0!==(o="function"==typeof r?r.apply(t,i):r)&&(e.exports=o)}(0,function(e,t){"use strict";function n(e){function t(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function n(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function r(){if(0!==e.scrollHeight){var t=n(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+a+"px",s=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop}),r&&(document.documentElement.scrollTop=r)}}function i(){r();var n=Math.round(parseFloat(e.style.height)),i=window.getComputedStyle(e,null),o="content-box"===i.boxSizing?Math.round(parseFloat(i.height)):e.offsetHeight;if(o<n?"hidden"===i.overflowY&&(t("scroll"),r(),o="content-box"===i.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==i.overflowY&&(t("hidden"),r(),o="content-box"===i.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==o){l=o;var a=u("autosize:resized");try{e.dispatchEvent(a)}catch(e){}}}if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var a=null,s=null,l=null,c=function(){e.clientWidth!==s&&i()},f=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",i,!1),e.removeEventListener("keyup",i,!1),e.removeEventListener("autosize:destroy",f,!1),e.removeEventListener("autosize:update",i,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",f,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",i,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",i,!1),e.addEventListener("autosize:update",i,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:f,update:i}),function(){var t=window.getComputedStyle(e,null);"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),a="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(a)&&(a=0),i()}()}}function r(e){var t=o.get(e);t&&t.destroy()}function i(e){var t=o.get(e);t&&t.update()}var o="function"==typeof Map?new Map:function(){var e=[],t=[];return{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,r){-1===e.indexOf(n)&&(e.push(n),t.push(r))},delete:function(n){var r=e.indexOf(n);r>-1&&(e.splice(r,1),t.splice(r,1))}}}(),u=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){u=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(a=function(e){return e},a.destroy=function(e){return e},a.update=function(e){return e}):(a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e)}),e},a.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e}),t.default=a,e.exports=t.default})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this;return t.init(e),t}function o(e){return new i(e)}var u=n(27),a=n(21),s=r(a),l=n(28),c=r(l),f=n(30).version,p=(n(25),n(18)),d=n(24),h=n(22),v=n(23),g=n(20),D=n(26),m=n(29),b={comment:"test comment",nick:"书虫",mail:"guohb@163.com",link:"http://127.0.0.1:8088/",ua:navigator.userAgent,url:"",objectId:"",insertedAt:""},y={QQAvatar:"",comment:"",createdAt:"",insertedAt:"",link:"",mail:"",nick:"",objectId:"",ua:"",updatedAt:"",url:"",pid:"",rid:""},w={"zh-cn":{head:{nick:"昵称",mail:"邮箱",link:"网址(http://)"},tips:{comments:"评论",sofa:"快来做第一个评论的人吧~",busy:"还在提交中,请稍候...",again:"这么简单也能错,也是没谁了."},ctrl:{reply:"回复",ok:"好的",sure:"确认",cancel:"取消",confirm:"确认",continue:"继续",more:"查看更多...",try:"再试试?",preview:"预览",emoji:"表情"},error:{99:"初始化失败,请检查init中的`el`元素.",100:"初始化失败,请检查你的AppId和AppKey.",401:"未经授权的操作,请检查你的AppId和AppKey.",403:"访问被api域名白名单拒绝,请检查你的安全域名设置."},timeago:{seconds:"秒前",minutes:"分钟前",hours:"小时前",days:"天前",now:"刚刚"}},en:{head:{nick:"NickName",mail:"E-Mail",link:"Website(http://)"},tips:{comments:"Comments",sofa:"No comments yet.",busy:"Submit is busy, please wait...",again:"Sorry, this is a wrong calculation."},ctrl:{reply:"Reply",ok:"Ok",sure:"Sure",cancel:"Cancel",confirm:"Confirm",continue:"Continue",more:"Load More...",try:"Once More?",preview:"Preview",emoji:"Emoji"},error:{99:"Initialization failed, Please check the `el` element in the init method.",100:"Initialization failed, Please check your appId and appKey.",401:"Unauthorized operation, Please check your appId and appKey.",403:"Access denied by api domain white list, Please check your security domain."},timeago:{seconds:"seconds ago",minutes:"minutes ago",hours:"hours ago",days:"days ago",now:"just now"}}},x={cdn:"https://gravatar.loli.net/avatar/",ds:["mp","identicon","monsterid","wavatar","robohash","retro",""],params:"",hide:!1},A=["nick","mail","link"],E=Storage&&localStorage&&localStorage instanceof Storage&&localStorage;i.prototype.init=function(e){var t=this;return t.config=e,"undefined"==typeof document?void console:(!!e&&t._init(),t)},i.prototype._init=function(){var e=this;try{var t=e.config,n=t.lang,r=t.langMode,i=t.avatar,o=t.avatarForce,a=t.avatar_cdn,s=t.notify,l=t.verify,c=(t.visitor,t.path),p=void 0===c?location.pathname:c,d=t.pageSize,h=t.recordIP,g=t.clazzName,m=void 0===g?"Comment":g;e.config.path=p.replace(/index\.html?$/,""),e.config.clazzName=m;var y=x.ds,E=o?"&q="+Math.random().toString(32).substring(2):"";n&&r&&e.installLocale(n,r),e.locale=e.locale||w[n||"zh-cn"],e.notify=s||!1,e.verify=l||!1,x.params="?d="+(y.indexOf(i)>-1?i:"mp")+"&v="+f+E,x.hide="hide"===i,x.cdn=/^https?\:\/\//.test(a)?a:x.cdn;var k=Number(d||10);if(e.config.pageSize=isNaN(k)?10:k<1?10:k,u.marked.setOptions({renderer:new u.marked.Renderer,highlight:!1===e.config.highlight?null:D,gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!0}),h){var C=v.create("script","src","//api.ip.sb/jsonip?callback=getIP"),F=document.getElementsByTagName("script")[0];F.parentNode.insertBefore(C,F),window.getIP=function(e){b.ip=e.ip}}var B=v.findAll(document,".valine-comment-count");v.each(B,function(t,n){if(n){var r=v.attr(n,"data-xid");r&&e.Q(r).then(function(e){n.innerText=e.data.data.length}).catch(function(e){n.innerText=0})}});var _=e.config.el||null,O=v.findAll(document,_);if(!(_=_ instanceof HTMLElement?_:O[O.length-1]||null))return;e.el=_;try{e.el.classList.add("v")}catch(t){e.el.setAttribute("class",e.el.getAttribute("class")+" v")}x.hide&&e.el.classList.add("hide-avatar"),e.config.meta=(e.config.guest_info||e.config.meta||A).filter(function(e){return A.indexOf(e)>-1});var S=(0==e.config.meta.length?A:e.config.meta).map(function(t){var n="mail"==t?"email":"text";return A.indexOf(t)>-1?'<input name="'+t+'" placeholder="'+e.locale.head[t]+'" class="v'+t+' vinput" type="'+n+'">':""});e.placeholder=e.config.placeholder||"Just Go Go",e.el.innerHTML='<div class="vwrap"><div class="vheader item'+S.length+'">'+S.join("")+'</div><div class="vedit"><textarea id="veditor" class="veditor vinput" placeholder="'+e.placeholder+'"></textarea><div class="vctrl"><span class="vemoji-btn">'+e.locale.ctrl.emoji+'</span> | <span class="vpreview-btn">'+e.locale.ctrl.preview+'</span></div><div class="vemojis" style="display:none;"></div><div class="vinput vpreview" style="display:none;"></div></div><div class="vcontrol"><div class="col col-20" title="Markdown is supported"><a href="https://segmentfault.com/markdown" target="_blank"><svg class="markdown" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z"></path></svg></a></div><div class="col col-80 text-right"><button type="button" title="Cmd|Ctrl+Enter" class="vsubmit vbtn">'+e.locale.ctrl.reply+'</button></div></div><div style="display:none;" class="vmark"></div></div><div class="vinfo" style="display:none;"><div class="vcount col"></div></div><div class="vlist"></div><div class="vempty" style="display:none;"></div><div class="vpage txt-center"></div><div class="info"><div class="power txt-right">Powered By <a href="https://valine.js.org" target="_blank">Valine</a><br>v'+f+"</div></div>";var R=v.find(e.el,".vempty");e.nodata={show:function(t){return R.innerHTML=t||e.locale.tips.sofa,v.attr(R,"style","display:block;"),e},hide:function(){return v.attr(R,"style","display:none;"),e}};var T=v.create("div","class","vloading"),P=v.find(e.el,".vlist");e.loading={show:function(t){var n=v.findAll(P,".vcard");return t?P.insertBefore(T,n[0]):P.appendChild(T),e.nodata.hide(),e},hide:function(){var t=v.find(P,".vloading");return t&&v.remove(t),0===v.findAll(P,".vcard").length&&e.nodata.show(),e}};var U=v.find(e.el,".vmark");e.alert={show:function(t){U.innerHTML='<div class="valert txt-center"><div class="vtext">'+(t&&t.text||1)+'</div><div class="vbtns"></div></div>';var n=v.find(U,".vbtns"),r='<button class="vcancel vbtn">'+(t&&t.ctxt||e.locale.ctrl.cancel)+"</button>",i='<button class="vsure vbtn">'+(t&&t.otxt||e.locale.ctrl.sure)+"</button>";if(n.innerHTML=""+r+(t&&t.type&&i),v.on("click",v.find(U,".vcancel"),function(t){e.alert.hide()}),v.attr(U,"style","display:block;"),t&&t.type){var o=v.find(U,".vsure");v.on("click",o,function(n){e.alert.hide(),t.cb&&t.cb()})}return e},hide:function(){return v.attr(U,"style","display:none;"),e}},e.bind()}catch(t){e.ErrorHandler(t,"init")}};i.prototype.Q=function(e){return 1==arguments.length?"/"===e?s.default.get("/"):s.default.get("queryComments/"+encodeURIComponent(e)):s.default.get(arguments[0]+arguments[1])},i.prototype.PP=function(e,t){return s.default.post(e,t)},i.prototype.ErrorHandler=function(e,t){var n=this;if(n.el&&n.loading.hide().nodata.hide(),"[object Error]"==={}.toString.call(e)){var r=e.code||"",i=n.locale.error[r],o=i||e.message||e.error||"";101==r?n.nodata.show():n.el&&n.nodata.show('<pre style="text-align:left;">Code '+r+": "+o+"</pre>")||console}else n.el&&n.nodata.show('<pre style="text-align:left;">'+JSON.stringify(e)+"</pre>")||console},i.prototype.installLocale=function(e,t){var n=this;return t=t||{},e&&(w[e]=t,n.locale=w[e]||w["zh-cn"]),n},i.prototype.setPath=function(e){return this.config.path=e,this},i.prototype.bind=function(e){function t(e){var t=e.value||"";t=g.parse(t),e.value=t;var n=D((0,u.marked)(t));b.comment=n,i.innerHTML=n,t?p(e):p.destroy(e)}var n=this,r=v.find(n.el,".vemojis"),i=v.find(n.el,".vpreview"),o=v.find(n.el,".vemoji-btn"),a=v.find(n.el,".vpreview-btn"),s=v.find(n.el,".veditor"),l=g.data;for(var f in l)l.hasOwnProperty(f)&&function(e,n){var i=v.create("i",{name:e,title:e});i.innerHTML=n,r.appendChild(i),v.on("click",i,function(e){_(s,n),t(s)})}(f,l[f]);n.emoji={show:function(){return n.preview.hide(),v.attr(o,"v",1),v.removeAttr(a,"v"),v.attr(r,"style","display:block"),n.emoji},hide:function(){return v.removeAttr(o,"v"),v.attr(r,"style","display:hide"),n.emoji}},n.preview={show:function(){return b.comment&&(n.emoji.hide(),v.attr(a,"v",1),v.removeAttr(o,"v"),i.innerHTML=b.comment,v.attr(i,"style","display:block"),T()),n.preview},hide:function(){return v.removeAttr(a,"v"),v.attr(i,"style","display:none"),n.preview},empty:function(){return i.innerHtml="",n.preview}};var D=function(e){var t=v.create("div");t.insertAdjacentHTML("afterbegin",e);var n=v.findAll(t,"*"),r=["INPUT","STYLE","SCRIPT","IFRAME","FRAME","AUDIO","VIDEO","EMBED","META","TITLE","LINK"],i=function(e,t){var n=v.attr(e,t);n&&v.attr(e,t,n.replace(/(javascript|eval)/gi,""))};return v.each(n,function(e,t){1===t.nodeType&&(r.indexOf(t.nodeName)>-1&&("INPUT"===t.nodeName&&"checkbox"===v.attr(t,"type")?v.attr(t,"disabled","disabled"):v.remove(t)),"A"===t.nodeName&&i(t,"href"),v.clearAttr(t))}),t.innerHTML};v.on("click",o,function(e){v.attr(o,"v")?n.emoji.hide():n.emoji.show()}),v.on("click",a,function(e){v.attr(a,"v")?n.preview.hide():n.preview.show()});for(var w=n.config.meta,A={},k={veditor:"comment"},C=0,F=w.length;C<F;C++)k["v"+w[C]]=w[C];for(var B in k)k.hasOwnProperty(B)&&function(){var e=k[B],r=v.find(n.el,"."+B);A[e]=r,r&&v.on("input change blur",r,function(n){"comment"===e?t(r):b[e]=v.escape(r.value.replace(/(^\s*)|(\s*$)/g,"")).substring(0,20)})}();var _=function(e,t){if(document.selection){e.focus();document.selection.createRange().text=t,e.focus()}else if(e.selectionStart||"0"==e.selectionStart){var n=e.selectionStart,r=e.selectionEnd,i=e.scrollTop;e.value=e.value.substring(0,n)+t+e.value.substring(r,e.value.length),e.focus(),e.selectionStart=n+t.length,e.selectionEnd=n+t.length,e.scrollTop=i}else e.focus(),e.value+=t},O=function(e){var t=v.find(n.el,".vh[rootid='"+e+"']"),r=v.find(t,".vquote");return r||(r=v.create("div","class","vquote"),t.appendChild(r)),r},S=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=n.config.pageSize,i=Number(v.find(n.el,".vnum").innerText);n.loading.show(),n.Q(n.config.path).then(function(o){for(var u=o.data.data.length,a=[],s=0;s<u;s++){var l=o.data.data[s];a.push(l.objectId),""!==l.rid&&null!==l.rid||R(l,v.find(n.el,".vlist"),!0)}a.forEach(function(e){n.Q("queryChildComments/",e).then(function(e){for(var t=e&&e.data.data||[],n=0;n<t.length;n++){var r=t[n];R(r,O(r.rid))}})});var c=v.find(n.el,".vpage");c.innerHTML=r*t<i?'<button type="button" class="vmore vbtn">'+n.locale.ctrl.more+"</button>":"";var f=v.find(c,".vmore");f&&v.on("click",f,function(n){c.innerHTML="",e(++t)}),n.loading.hide()}).catch(function(e){n.loading.hide().ErrorHandler(e,"query")})};n.Q(n.config.path).then(function(e){e.data.data.length>0?(v.attr(v.find(n.el,".vinfo"),"style","display:block;"),v.find(n.el,".vcount").innerHTML='<span class="vnum">'+e.data.data.length+"</span> "+n.locale.tips.comments,S()):n.loading.hide()}).catch(function(e){n.ErrorHandler(e,"count")});var R=function(e,t,r){var i=v.create("div",{class:"vcard",id:e.objectId}),o=x.hide?"":'<img class="vimg" src="../assets/images/avatar.jpg">',u=e.ua||"",a="";if(u){u=h(u);a='<span class="vsys">'+u.browser+" "+u.version+"</span>"+" "+('<span class="vsys">'+u.os+" "+u.osVersion+"</span>")}"*"===n.config.path&&(a='<a href="'+e.url+'" class="vsys">'+e.url+"</a>");var s="",l=e.link?/^https?\:\/\//.test(e.link)?e.link:"http://"+e.link:"";s=l?'<a class="vnick" rel="nofollow" href="'+l+'" target="_blank" >'+e.nick+"</a>":'<span class="vnick">'+e.nick+"</span>",i.innerHTML=o+'\n <div class="vh" rootid='+e.objectId+'>\n <div class="vhead">'+s+" "+a+'</div>\n <div class="vmeta">\n <span class="vtime">'+d(new Date(e.updatedAt)||new Date(e.createdAt),n.locale)+'</span>\n <span class="vat">'+n.locale.ctrl.reply+'</span>\n </div>\n <div class="vcontent">\n '+D(e.comment)+"\n </div>\n </div>";for(var c=v.find(i,".vat"),f=v.findAll(i,"a"),p=0,g=f.length;p<g;p++){var m=f[p];m&&-1==(v.attr(m,"class")||"").indexOf("at")&&v.attr(m,{target:"_blank",rel:"nofollow"})}var b=v.findAll(t,".vcard");r?t.appendChild(i):t.insertBefore(i,b[0]);var y=v.find(i,".vcontent");y&&P(y),c&&z(c,e),T()},T=function(){setTimeout(function(){try{"undefined"!=typeof MathJax&&MathJax.Hub.Queue(["Typeset",MathJax.Hub]),"undefined"!=typeof hljs&&(v.each(v.findAll("pre code"),function(e,t){hljs.highlightBlock(t)}),v.each(v.findAll("code.hljs"),function(e,t){hljs.lineNumbersBlock(t)}))}catch(e){}},200)},P=function(e){setTimeout(function(){e.offsetHeight>180&&(e.classList.add("expand"),v.on("click",e,function(t){v.attr(e,"class","vcontent")}))})},U={},z=function(e,t){v.on("click",e,function(e){var n="@"+v.escape(t.nick);U={at:v.escape(n)+" ",rid:t.objectId,pid:t.objectId,rmail:t.mail},v.attr(A.comment,"placeholder",n),A.comment.focus()})};!function(){var e=E&&E.ValineCache;if(e){e=JSON.parse(e);var t=w;for(var r in t){var i=t[r];v.find(n.el,".v"+i).value=v.unescape(e[i]),b[i]=e[i]}}}();var I=function(){b.comment="",A.comment.value="",t(A.comment),v.attr(A.comment,"placeholder",n.placeholder),U={},n.preview.empty().hide()},$=v.find(n.el,".vsubmit"),L=function(e){return v.attr($,"disabled")?void n.alert.show({type:0,text:n.locale.tips.busy+'ヾ(๑╹◡╹)ノ"',ctxt:n.locale.ctrl.ok}):b.nick.length<3?void A.nick.focus():b.mail.length<6||b.mail.indexOf("@")<1||b.mail.indexOf(".")<3?void A.mail.focus():""==b.comment?void A.comment.focus():(b.nick=b.nick||"Anonymous",void(n.notify||n.verify?j(M):M()))},M=function(){if(v.attr($,"disabled",!0),n.loading.show(!0),b.url=decodeURI(n.config.path),b.insertedAt=new Date,b.objectId=m.v1(),U.rid){var e=U.pid||U.rid;y.rid=U.rid,y.pid=e,b.comment=b.comment.replace("<p>",'<p><a class="at" href="#'+e+'">'+U.at+"</a> , ")}for(var t in b)if(b.hasOwnProperty(t)){var r=b[t];y[t]=r}n.PP("addComment",c.default.stringify(y)).then(function(e){"Anonymous"!=b.nick&&E&&E.setItem("ValineCache",JSON.stringify({nick:b.nick,link:b.link,mail:b.mail}));var t=v.find(n.el,".vnum"),r=1;try{if(U.rid){var i=v.find(n.el,'.vquote[rid="'+U.rid+'"]')||O(U.rid);R(y,i,!0)}else t?(r=Number(t.innerText)+1,t.innerText=r):v.find(n.el,".vcount").innerHTML='<span class="num">1</span> '+n.locale.tips.comments,R(y,v.find(n.el,".vlist")),n.config.pageSize++;v.removeAttr($,"disabled"),n.loading.hide(),I()}catch(e){n.ErrorHandler(e,"save")}}).catch(function(e){n.ErrorHandler(e,"commitEvt")})},j=function e(t){var r=Math.floor(10*Math.random()+1),i=Math.floor(10*Math.random()+1),o=Math.floor(10*Math.random()+1),u=["+","-","x"],a=u[Math.floor(3*Math.random())],s=u[Math.floor(3*Math.random())],l=""+r+a+i+s+o,c=l+" = <input class='vcode vinput' >";n.alert.show({type:1,text:c,ctxt:n.locale.ctrl.cancel,otxt:n.locale.ctrl.ok,cb:function(){var r=+v.find(n.el,".vcode").value;new Function("return "+l.replace(/x/g,"*"))()===r?t&&t():n.alert.show({type:1,text:"(T_T)"+n.locale.tips.again,ctxt:n.locale.ctrl.cancel,otxt:n.locale.ctrl.try,cb:function(){e(t)}})}})};v.on("click",$,L),v.on("keydown",document,function(e){e=event||e;var t=e.keyCode||e.which||e.charCode;((e.ctrlKey||e.metaKey)&&13===t&&L(),9===t)&&("veditor"==(document.activeElement.id||"")&&(e.preventDefault(),_(s," ")))}),v.on("paste",document,function(e){var t="clipboardData"in e?e.clipboardData:e.originalEvent&&e.originalEvent.clipboardData||window.clipboardData,n=t&&t.items,r=[];if(n&&n.length>0){for(var i=0;i<n.length;i++)if(-1!==n[i].type.indexOf("image")){r.push(n[i].getAsFile());break}if(r.length){for(var o in r)!function(e){var t=r[e],n="![Uploading "+t.name+"]()";_(s,n),t&&N(t,function(e,r){!e&&r&&(s.value=s.value.replace(n,"\r\n"))})}(o)}}});var N=function(e,t){var n=new FormData;n.append("file",e);var r=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");r.onreadystatechange=function(){if(4==r.readyState&&200==r.status)try{var e=JSON.parse(r.responseText);t&&t(null,e)}catch(e){t&&t(e)}else t&&t(r.status)},r.onerror=function(e){},r.open("POST","https://imgkr.com/api/files/upload",!0),r.send(n)}},e.exports=o,e.exports.default=o},function(e,t,n){"use strict";var r={data:n(67),parse:function(e){return String(e).replace(/:(.+?):/g,function(e,t){return r.data[t]||e})}};e.exports=r},function(e,t,n){"use strict";t.__esModule=!0;var r=n(31),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=i.default.create({baseURL:"http://localhost:3333/",headers:{"Content-Type":"application/x-www-form-urlencoded"}});t.default=o},function(e,t,n){"use strict";function r(e){var t=this,n={Trident:e.indexOf("Trident")>-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Edge:e.indexOf("Edge")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,360:e.indexOf("360EE")>-1||e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,"Mac OS":e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Pad")>-1||e.indexOf("Nexus 7")>-1};n.Mobile&&(n.Mobile=!(e.indexOf("iPad")>-1));var r={engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Kindle","360","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};t.device="PC";for(var i in r)for(var o=0;o<r[i].length;o++){var u=r[i][o];n[u]&&(t[i]=u)}var a={Windows:function(){var t=e.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"}[t]||t},Android:function(){return e.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return e.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return e.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return e.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return e.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return e.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};t.osVersion="",a[t.os]&&(t.osVersion=a[t.os](),t.osVersion==e&&(t.osVersion=""));var s={Safari:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return e.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return e.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return e.replace(/^.*Edge\/([\d.]+).*$/,"$1")},Firefox:function(){return e.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return e.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return e.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return e.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return e.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return e.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Kindle:function(){return e.replace(/^.*Version\/([\d.]+).*$/,"$1")},Maxthon:function(){return e.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return e.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return e.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return e.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return e.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return e.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},"2345Explorer":function(){return e.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return e.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return e.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return e.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return e.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return e.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},Taobao:function(){return e.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return e.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return e.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return e.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return e.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return e.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};t.version="",s[t.browser]&&(t.version=s[t.browser](),t.version==e&&(t.version="")),"Edge"==t.browser?t.engine="EdgeHTML":"Chrome"==t.browser&&parseInt(t.version)>27?t.engine="Blink":"Opera"==t.browser&&parseInt(t.version)>12?t.engine="Blink":"Yandex"==t.browser?t.engine="Blink":void 0==t.browser&&(t.browser="Unknow App")}function i(e){return new r(e)}e.exports=i},function(e,t,n){"use strict";var r=(window,document,{}),i={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\\":"\"};for(var o in i)r[i[o]]=o;var u=/[&<>"'`\\]/g,a=RegExp(u.source),s=/&(?:amp|lt|gt|quot|#39|#x60|#x5c);/g,l=RegExp(s.source),c={on:function(e,t,n,r){e=e.split(" ");for(var i=0,o=e.length;i<o;i++)c.off(e[i],t,n,r),t.addEventListener?t.addEventListener(e[i],n,r||!1):t.attachEvent?t.attachEvent("on"+e[i],n):t["on"+e[i]]=n},off:function(e,t,n,r){e=e.split(" ");for(var i=0,o=e.length;i<o;i++)t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null},escape:function(e){return e&&a.test(e)?e.replace(u,function(e){return i[e]}):e},unescape:function(e){return e&&l.test(e)?e.replace(s,function(e){return r[e]}):e},create:function(e,t,n){var r=document.createElement(e);return c.attr(r,t,n),r},find:function(e,t){return e.querySelector(t)},findAll:function(e,t){return e.querySelectorAll(t)},attr:function(e,t,n){if(void 0===e.getAttribute)return c.prop(e,t,n);if(void 0!==n)null===n?c.removeAttr(e,t):e.setAttribute(t,n);else{if("[object Object]"!=={}.toString.call(t))return e.getAttribute(t);c.each(t,function(t,n){e.setAttribute(t,n)})}},prop:function(e,t,n){return void 0!==n?e[t]=n:"[object Object]"!=={}.toString.call(t)?e[t]:void c.each(t,function(t,n){e[t]=n})},removeAttr:function(e,t){var n=void 0,r=0,i=t&&t.match(/[^\x20\t\r\n\f\*\/\\]+/g);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n);return e},clearAttr:function(e){var t=e.attributes,n=["align","alt","checked","class","disabled","href","id","target","title","type","src","style"];return c.each(t,function(t,r){var i=r.name;switch(i.toLowerCase()){case"style":var o=r.value;c.each(o.split(";"),function(t,n){n.indexOf("color")>-1?c.attr(e,"style",n):c.removeAttr(e,"style")});break;case"class":if("CODE"==e.nodeName)return!1;var u=r.value;u.indexOf("at")>-1?c.attr(e,"class","at"):u.indexOf("vemoji")>-1?c.attr(e,"class","vemoji"):c.removeAttr(e,"class");break;default:if(n.indexOf(i)>-1)return!0;c.removeAttr(e,i)}}),e},remove:function(e){try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){}},each:function(e,t){var n=0,r=e.length,i=["[object Array]","[object NodeList]"],o={}.toString.call(e);if(i.indexOf(o)>-1)for(;n<r&&(!t||!1!==t.call(e[n],n,e[n]));n++);else for(n in e)if(e.hasOwnProperty(n)&&t&&!1===t.call(e[n],n,e[n]))break;return e}};e.exports=c},function(e,t,n){"use strict";var r=function(e,t){if(e)try{var n=e.getTime(),r=(new Date).getTime(),o=r-n,u=Math.floor(o/864e5);if(0===u){var a=o%864e5,s=Math.floor(a/36e5);if(0===s){var l=a%36e5,c=Math.floor(l/6e4);if(0===c){var f=l%6e4;return Math.round(f/1e3)+" "+t.timeago.seconds}return c+" "+t.timeago.minutes}return s+" "+t.timeago.hours}return u<0?t.timeago.now:u<8?u+" "+t.timeago.days:i(e)}catch(e){}},i=function(e){var t=o(e.getDate(),2),n=o(e.getMonth()+1,2);return o(e.getFullYear(),2)+"-"+n+"-"+t},o=function(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n};e.exports=r},function(e,t,n){var r;!function(i){"use strict";function o(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function u(e,t){return e<<t|e>>>32-t}function a(e,t,n,r,i,a){return o(u(o(o(t,e),o(r,a)),i),n)}function s(e,t,n,r,i,o,u){return a(t&n|~t&r,e,t,i,o,u)}function l(e,t,n,r,i,o,u){return a(t&r|n&~r,e,t,i,o,u)}function c(e,t,n,r,i,o,u){return a(t^n^r,e,t,i,o,u)}function f(e,t,n,r,i,o,u){return a(n^(t|~r),e,t,i,o,u)}function p(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var n,r,i,u,a,p=1732584193,d=-271733879,h=-1732584194,v=271733878;for(n=0;n<e.length;n+=16)r=p,i=d,u=h,a=v,p=s(p,d,h,v,e[n],7,-680876936),v=s(v,p,d,h,e[n+1],12,-389564586),h=s(h,v,p,d,e[n+2],17,606105819),d=s(d,h,v,p,e[n+3],22,-1044525330),p=s(p,d,h,v,e[n+4],7,-176418897),v=s(v,p,d,h,e[n+5],12,1200080426),h=s(h,v,p,d,e[n+6],17,-1473231341),d=s(d,h,v,p,e[n+7],22,-45705983),p=s(p,d,h,v,e[n+8],7,1770035416),v=s(v,p,d,h,e[n+9],12,-1958414417),h=s(h,v,p,d,e[n+10],17,-42063),d=s(d,h,v,p,e[n+11],22,-1990404162),p=s(p,d,h,v,e[n+12],7,1804603682),v=s(v,p,d,h,e[n+13],12,-40341101),h=s(h,v,p,d,e[n+14],17,-1502002290),d=s(d,h,v,p,e[n+15],22,1236535329),p=l(p,d,h,v,e[n+1],5,-165796510),v=l(v,p,d,h,e[n+6],9,-1069501632),h=l(h,v,p,d,e[n+11],14,643717713),d=l(d,h,v,p,e[n],20,-373897302),p=l(p,d,h,v,e[n+5],5,-701558691),v=l(v,p,d,h,e[n+10],9,38016083),h=l(h,v,p,d,e[n+15],14,-660478335),d=l(d,h,v,p,e[n+4],20,-405537848),p=l(p,d,h,v,e[n+9],5,568446438),v=l(v,p,d,h,e[n+14],9,-1019803690),h=l(h,v,p,d,e[n+3],14,-187363961),d=l(d,h,v,p,e[n+8],20,1163531501),p=l(p,d,h,v,e[n+13],5,-1444681467),v=l(v,p,d,h,e[n+2],9,-51403784),h=l(h,v,p,d,e[n+7],14,1735328473),d=l(d,h,v,p,e[n+12],20,-1926607734),p=c(p,d,h,v,e[n+5],4,-378558),v=c(v,p,d,h,e[n+8],11,-2022574463),h=c(h,v,p,d,e[n+11],16,1839030562),d=c(d,h,v,p,e[n+14],23,-35309556),p=c(p,d,h,v,e[n+1],4,-1530992060),v=c(v,p,d,h,e[n+4],11,1272893353),h=c(h,v,p,d,e[n+7],16,-155497632),d=c(d,h,v,p,e[n+10],23,-1094730640),p=c(p,d,h,v,e[n+13],4,681279174),v=c(v,p,d,h,e[n],11,-358537222),h=c(h,v,p,d,e[n+3],16,-722521979),d=c(d,h,v,p,e[n+6],23,76029189),p=c(p,d,h,v,e[n+9],4,-640364487),v=c(v,p,d,h,e[n+12],11,-421815835),h=c(h,v,p,d,e[n+15],16,530742520),d=c(d,h,v,p,e[n+2],23,-995338651),p=f(p,d,h,v,e[n],6,-198630844),v=f(v,p,d,h,e[n+7],10,1126891415),h=f(h,v,p,d,e[n+14],15,-1416354905),d=f(d,h,v,p,e[n+5],21,-57434055),p=f(p,d,h,v,e[n+12],6,1700485571),v=f(v,p,d,h,e[n+3],10,-1894986606),h=f(h,v,p,d,e[n+10],15,-1051523),d=f(d,h,v,p,e[n+1],21,-2054922799),p=f(p,d,h,v,e[n+8],6,1873313359),v=f(v,p,d,h,e[n+15],10,-30611744),h=f(h,v,p,d,e[n+6],15,-1560198380),d=f(d,h,v,p,e[n+13],21,1309151649),p=f(p,d,h,v,e[n+4],6,-145523070),v=f(v,p,d,h,e[n+11],10,-1120210379),h=f(h,v,p,d,e[n+2],15,718787259),d=f(d,h,v,p,e[n+9],21,-343485551),p=o(p,r),d=o(d,i),h=o(h,u),v=o(v,a);return[p,d,h,v]}function d(e){var t,n="",r=32*e.length;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function h(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function v(e){return d(p(h(e),8*e.length))}function g(e,t){var n,r,i=h(e),o=[],u=[];for(o[15]=u[15]=void 0,i.length>16&&(i=p(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],u[n]=1549556828^i[n];return r=p(o.concat(h(t)),512+8*t.length),d(p(u.concat(r),640))}function D(e){var t,n,r="0123456789abcdef",i="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),i+=r.charAt(t>>>4&15)+r.charAt(15&t);return i}function m(e){return unescape(encodeURIComponent(e))}function b(e){return v(m(e))}function y(e){return D(b(e))}function w(e,t){return g(m(e),m(t))}function x(e,t){return D(w(e,t))}function A(e,t,n){return t?n?w(t,e):x(t,e):n?b(e):y(e)}void 0!==(r=function(){return A}.call(t,n,t,e))&&(e.exports=r)}()},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return'<span style="color: slategray">'+e+"</span>"}var t=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e){var t=e.exports=function(){return new RegExp("(?:"+t.line().source+")|(?:"+t.block().source+")","gm")};t.line=function(){return/(?:^|\s)\/\/(.+?)$/gm},t.block=function(){return/\/\*([\S\s]*?)\*\//gm}}),n=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"];return function(r,i){void 0===i&&(i={});var o=i.colors;void 0===o&&(o=n);var u=0,a={},s=/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/,l=/</,c=new RegExp("("+s.source+"|"+l.source+")|("+t().source+")","gmi");return r.replace(c,function(t,n,r){if(r)return e(r);if("<"===n)return"<";var i;a[n]?i=a[n]:(i=o[u],a[n]=i);var s='<span style="color: #'+i+'">'+n+"</span>";return u=++u%o.length,s})}})},function(e,t,n){!function(e,n){n(t)}(0,function(e){"use strict";function t(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)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}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}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function a(t){e.defaults=t}function s(e,t){if(t){if(E.test(e))return e.replace(k,_)}else if(C.tes