From 4e9a7f1c8ff65995d39fcebc90523508a1d328c3 Mon Sep 17 00:00:00 2001
From: nineya <361654768@qq.com>
Date: Fri, 10 Mar 2023 18:35:49 +0800
Subject: [PATCH] =?UTF-8?q?build(version):=20=E5=8F=91=E5=B8=831.1.1?=
=?UTF-8?q?=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
dist/halo-comment.js | 104 +++++++++++++++++++++++++++++----------
dist/halo-comment.min.js | 2 +-
package.json | 2 +-
3 files changed, 79 insertions(+), 29 deletions(-)
diff --git a/dist/halo-comment.js b/dist/halo-comment.js
index f59d717..588d215 100644
--- a/dist/halo-comment.js
+++ b/dist/halo-comment.js
@@ -12235,7 +12235,7 @@ var __webpack_exports__ = {};
if (typeof window !== 'undefined') {
var currentScript = window.document.currentScript
- if (({"NODE_ENV":"production","BASE_URL":"https://unpkg.com/halo-comment-dream@1.1.0/dist/"}).NEED_CURRENTSCRIPT_POLYFILL) {
+ if (({"NODE_ENV":"production","BASE_URL":"https://unpkg.com/halo-comment-dream@1.1.1/dist/"}).NEED_CURRENTSCRIPT_POLYFILL) {
var getCurrentScript = __webpack_require__(7679)
currentScript = getCurrentScript()
@@ -15965,24 +15965,74 @@ const apiClient = new lib.ContentApiClient(haloRestApiClient);
var admin_api_lib = __webpack_require__(5597);
;// CONCATENATED MODULE: ./src/plugins/admin-client.js
+
+
+// let accessToken = localStorage && localStorage.getItem('HALO__Access-Token')
+// accessToken = accessToken ? JSON.parse(accessToken) : undefined
+// if (accessToken && accessToken.expire > new Date().getTime()) {
+// accessToken = accessToken['value']['access_token']
+// } else {
+// accessToken = undefined
+// }
+//
+// //halo http 请求客户端.
+// const haloRestApiClient = new HaloRestAPIClient({
+// baseUrl: process.env.NODE_ENV === 'production' ? '' : 'http://localhost:8090',
+// auth: { adminToken: accessToken }
+// })
+//
+// // 通过 haloRestApiCLient 创建 adminApiClient。
+// const adminClient = new AdminApiClient(haloRestApiClient)
+
let accessToken = localStorage && localStorage.getItem('HALO__Access-Token');
accessToken = accessToken ? JSON.parse(accessToken) : undefined;
-if (accessToken && accessToken.expire > new Date().getTime()) {
- accessToken = accessToken['value']['access_token'];
-} else {
- accessToken = undefined;
+let adminClient;
+if (accessToken) {
+ //halo http 请求客户端.
+ const haloRestApiClient = new admin_api_lib.HaloRestAPIClient({
+ baseUrl: true ? '' : 0
+ });
+ // 通过 haloRestApiCLient 创建 adminApiClient。
+ adminClient = new admin_api_lib.AdminApiClient(haloRestApiClient);
+ haloRestApiClient.interceptors.request.use(config => {
+ config.headers['Admin-Authorization'] = accessToken['value']['access_token'];
+ return config;
+ }, error => {
+ return Promise.reject(error);
+ });
+ let isRefreshingToken = false;
+ let pendingRequests = [];
+ haloRestApiClient.interceptors.response.use(response => {
+ return response;
+ }, async error => {
+ const response = error.response;
+ const data = response ? response.data : null;
+ if (admin_api_lib.Axios.isCancel(error) || /Network Error/.test(error.message) || !data || data.status !== 401) {
+ return Promise.reject(error);
+ }
+ const originalRequest = error.config;
+ if (isRefreshingToken) {
+ return new Promise(resolve => {
+ pendingRequests.push(() => {
+ resolve((0,admin_api_lib.Axios)(originalRequest));
+ });
+ });
+ }
+ isRefreshingToken = true;
+ try {
+ accessToken['value'] = await adminClient.refreshToken(accessToken['value']['refresh_token']).then(response => response.data);
+ accessToken.expire = new Date().getTime() + accessToken['value']['expired_in'] * 1000;
+ localStorage.setItem('HALO__Access-Token', JSON.stringify(accessToken));
+ pendingRequests.forEach(callback => callback());
+ pendingRequests = [];
+ return (0,admin_api_lib.Axios)(originalRequest);
+ } catch (e) {
+ return Promise.reject(e);
+ } finally {
+ isRefreshingToken = false;
+ }
+ });
}
-
-//halo http 请求客户端.
-const admin_client_haloRestApiClient = new admin_api_lib.HaloRestAPIClient({
- baseUrl: true ? '' : 0,
- auth: {
- adminToken: accessToken
- }
-});
-
-// 通过 haloRestApiCLient 创建 adminApiClient。
-const adminClient = new admin_api_lib.AdminApiClient(admin_client_haloRestApiClient);
/* harmony default export */ var admin_client = (adminClient);
// EXTERNAL MODULE: ./node_modules/autosize/dist/autosize.js
var autosize = __webpack_require__(9367);
@@ -16060,7 +16110,7 @@ var DreamEmojivue_type_template_id_2a4d7e70_staticRenderFns = [];
url: {
type: String,
required: false,
- default: `${"https://unpkg.com/halo-comment-dream@1.1.0/dist/"}assets/emoji/`
+ default: `${"https://unpkg.com/halo-comment-dream@1.1.1/dist/"}assets/emoji/`
}
},
computed: {
@@ -16290,7 +16340,7 @@ function renderedEmojiHtml(html) {
const emojiData = (__webpack_require__(5601)/* ["default"] */ .Z);
for (let emoji of emojiData) {
let name = emoji.name;
- let img = ` `;
+ let img = ` `;
html = html.replace(new RegExp(`\\[/${name}\\]`, 'gm'), img);
}
return html;
@@ -16639,8 +16689,8 @@ var CommentEditor_component = normalizeComponent(
)
/* harmony default export */ var CommentEditor = (CommentEditor_component.exports);
-;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/CommentNode.vue?vue&type=template&id=0bfa0bf7&
-var CommentNodevue_type_template_id_0bfa0bf7_render = function render() {
+;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/CommentNode.vue?vue&type=template&id=0589b13a&
+var CommentNodevue_type_template_id_0589b13a_render = function render() {
var _vm = this,
_c = _vm._self._c;
return _vm.comment.no <= _vm.replyNum ? _c('li', {
@@ -16706,7 +16756,7 @@ var CommentNodevue_type_template_id_0bfa0bf7_render = function render() {
on: {
"click": _vm.handleCreateComment
}
- }, [_vm._v(_vm._s(_vm.globalData.replyId === _vm.comment.id ? '取消回复' : '回复'))]), _c('div', {
+ }, [_vm._v(_vm._s(_vm.globalData.replyId === _vm.comment.id ? '取消回复' : '回复'))]), _vm.configs.enableBloggerOperation ? _c('div', {
staticClass: "btn comment-operation"
}, [_c('svg', {
attrs: {
@@ -16745,7 +16795,7 @@ var CommentNodevue_type_template_id_0bfa0bf7_render = function render() {
on: {
"click": _vm.handleDeleteComment
}
- }, [_vm._v("永久删除")]) : _vm._e()])])])]), _c('div', {
+ }, [_vm._v("永久删除")]) : _vm._e()])]) : _vm._e()])]), _c('div', {
staticClass: "comment-info"
}, [_c('time', {
staticClass: "comment-time",
@@ -16812,7 +16862,7 @@ var CommentNodevue_type_template_id_0bfa0bf7_render = function render() {
}
}, [_vm._v("展开" + _vm._s(_vm.comment.replyCount - _vm.replyNum) + "条回复")])]) : _vm._e()], 1) : _vm._e();
};
-var CommentNodevue_type_template_id_0bfa0bf7_staticRenderFns = [];
+var CommentNodevue_type_template_id_0589b13a_staticRenderFns = [];
// EXTERNAL MODULE: ./node_modules/ua-parser-js/src/ua-parser.js
var ua_parser = __webpack_require__(2238);
@@ -16984,8 +17034,8 @@ var ua_parser_default = /*#__PURE__*/__webpack_require__.n(ua_parser);
;
var CommentNode_component = normalizeComponent(
components_CommentNodevue_type_script_lang_js_,
- CommentNodevue_type_template_id_0bfa0bf7_render,
- CommentNodevue_type_template_id_0bfa0bf7_staticRenderFns,
+ CommentNodevue_type_template_id_0589b13a_render,
+ CommentNodevue_type_template_id_0589b13a_staticRenderFns,
false,
null,
null,
@@ -17591,8 +17641,8 @@ const defaultConfig = {
imageUploadApi: undefined,
anonymousUserName: undefined,
enableBloggerOperation: false,
- avatarLoading: `${"https://unpkg.com/halo-comment-dream@1.1.0/dist/"}assets/img/loading.svg`,
- defaultAvatar: `${"https://unpkg.com/halo-comment-dream@1.1.0/dist/"}assets/img/avatar.svg`
+ avatarLoading: `${"https://unpkg.com/halo-comment-dream@1.1.1/dist/"}assets/img/loading.svg`,
+ defaultAvatar: `${"https://unpkg.com/halo-comment-dream@1.1.1/dist/"}assets/img/avatar.svg`
};
/* harmony default export */ var Commentvue_type_script_lang_js_shadow = ({
name: 'Comment',
diff --git a/dist/halo-comment.min.js b/dist/halo-comment.min.js
index 92d4d6b..38360c1 100644
--- a/dist/halo-comment.min.js
+++ b/dist/halo-comment.min.js
@@ -10,4 +10,4 @@
* @author Feross Aboukhadijeh
* @license MIT
*/
-t.exports=function(t){return null!=t&&(e(t)||n(t)||!!t._isBuffer)}},9575:function(t,e,n){(function(e,n){t.exports=n()})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g&&n.g,(function(){"use strict";var t="3.7.5",e=t,n="function"===typeof atob,r="function"===typeof btoa,i="function"===typeof Buffer,o="function"===typeof TextDecoder?new TextDecoder:void 0,a="function"===typeof TextEncoder?new TextEncoder:void 0,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(s),c=function(t){var e={};return t.forEach((function(t,n){return e[t]=n})),e}(l),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,p=String.fromCharCode.bind(String),d="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){return new Uint8Array(Array.prototype.slice.call(t,0))},h=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},m=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},f=function(t){for(var e,n,r,i,o="",a=t.length%3,s=0;s255||(r=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,o+=l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}return a?o.slice(0,a-3)+"===".substring(a):o},g=r?function(t){return btoa(t)}:i?function(t){return Buffer.from(t,"binary").toString("base64")}:f,b=i?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=4096,n=[],r=0,i=t.length;r>>6)+p(128|63&e):p(224|e>>>12&15)+p(128|e>>>6&63)+p(128|63&e)}e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return p(240|e>>>18&7)+p(128|e>>>12&63)+p(128|e>>>6&63)+p(128|63&e)},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(t){return t.replace(v,w)},k=i?function(t){return Buffer.from(t,"utf8").toString("base64")}:a?function(t){return b(a.encode(t))}:function(t){return g(x(t))},_=function(t,e){return void 0===e&&(e=!1),e?h(k(t)):k(t)},C=function(t){return _(t,!0)},P=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,j=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return p(55296+(n>>>10))+p(56320+(1023&n));case 3:return p((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return p((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},S=function(t){return t.replace(P,j)},O=function(t){if(t=t.replace(/\s+/g,""),!u.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,r,i="",o=0;o>16&255):64===r?p(e>>16&255,e>>8&255):p(e>>16&255,e>>8&255,255&e);return i},A=n?function(t){return atob(m(t))}:i?function(t){return Buffer.from(t,"base64").toString("binary")}:O,N=i?function(t){return d(Buffer.from(t,"base64"))}:function(t){return d(A(t).split("").map((function(t){return t.charCodeAt(0)})))},E=function(t){return N($(t))},T=i?function(t){return Buffer.from(t,"base64").toString("utf8")}:o?function(t){return o.decode(N(t))}:function(t){return S(A(t))},$=function(t){return m(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))},R=function(t){return T($(t))},M=function(t){if("string"!==typeof t)return!1;var e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},I=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}},B=function(){var t=function(t,e){return Object.defineProperty(String.prototype,t,I(e))};t("fromBase64",(function(){return R(this)})),t("toBase64",(function(t){return _(this,t)})),t("toBase64URI",(function(){return _(this,!0)})),t("toBase64URL",(function(){return _(this,!0)})),t("toUint8Array",(function(){return E(this)}))},z=function(){var t=function(t,e){return Object.defineProperty(Uint8Array.prototype,t,I(e))};t("toBase64",(function(t){return y(this,t)})),t("toBase64URI",(function(){return y(this,!0)})),t("toBase64URL",(function(){return y(this,!0)}))},D=function(){B(),z()},U={version:t,VERSION:e,atob:A,atobPolyfill:O,btoa:g,btoaPolyfill:f,fromBase64:R,toBase64:_,encode:_,encodeURI:C,encodeURL:C,utob:x,btou:S,decode:R,isValid:M,fromUint8Array:y,toUint8Array:E,extendString:B,extendUint8Array:z,extendBuiltins:D,Base64:{}};return Object.keys(U).forEach((function(t){return U.Base64[t]=U[t]})),U}))},2568:function(t,e,n){(function(){var e=n(1012),r=n(487).utf8,i=n(8738),o=n(487).bin,a=function(t,n){t.constructor==String?t=n&&"binary"===n.encoding?o.stringToBytes(t):r.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var s=e.bytesToWords(t),l=8*t.length,c=1732584193,u=-271733879,p=-1732584194,d=271733878,h=0;h>>24)|4278255360&(s[h]<<24|s[h]>>>8);s[l>>>5]|=128<>>9<<4)]=l;var m=a._ff,f=a._gg,g=a._hh,b=a._ii;for(h=0;h>>0,u=u+w>>>0,p=p+v>>>0,d=d+x>>>0}return e.endian([c,u,p,d])};a._ff=function(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+(i>>>0)+a;return(s<>>32-o)+e},a._gg=function(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+(i>>>0)+a;return(s<>>32-o)+e},a._hh=function(t,e,n,r,i,o,a){var s=t+(e^n^r)+(i>>>0)+a;return(s<>>32-o)+e},a._ii=function(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+(i>>>0)+a;return(s<>>32-o)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,n){if(void 0===t||null===t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(a(t,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):e.bytesToHex(r)}})()},631:function(t,e,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"===typeof l.get?l.get:null,u=s&&Set.prototype.forEach,p="function"===typeof WeakMap&&WeakMap.prototype,d=p?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype,m=h?WeakSet.prototype.has:null,f="function"===typeof WeakRef&&WeakRef.prototype,g=f?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,y=Object.prototype.toString,w=Function.prototype.toString,v=String.prototype.match,x=String.prototype.slice,k=String.prototype.replace,_=String.prototype.toUpperCase,C=String.prototype.toLowerCase,P=RegExp.prototype.test,j=Array.prototype.concat,S=Array.prototype.join,O=Array.prototype.slice,A=Math.floor,N="function"===typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,T="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,$="function"===typeof Symbol&&"object"===typeof Symbol.iterator,R="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$||"symbol")?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,I=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function B(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||P.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof t){var r=t<0?-A(-t):A(t);if(r!==t){var i=String(r),o=x.call(e,i.length+1);return k.call(i,n,"$&_")+"."+k.call(k.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return k.call(e,n,"$&_")}var z=n(4654),D=z.custom,U=G(D)?D:null;function q(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function L(t){return k.call(String(t),/"/g,""")}function F(t){return"[object Array]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function H(t){return"[object Date]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function V(t){return"[object RegExp]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function W(t){return"[object Error]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function Z(t){return"[object String]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function Q(t){return"[object Number]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function Y(t){return"[object Boolean]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function G(t){if($)return t&&"object"===typeof t&&t instanceof Symbol;if("symbol"===typeof t)return!0;if(!t||"object"!==typeof t||!T)return!1;try{return T.call(t),!0}catch(e){}return!1}function J(t){if(!t||"object"!==typeof t||!N)return!1;try{return N.call(t),!0}catch(e){}return!1}t.exports=function t(e,n,r,i){var s=n||{};if(K(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!K(s,"customInspect")||s.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=s.numericSeparator;if("undefined"===typeof e)return"undefined";if(null===e)return"null";if("boolean"===typeof e)return e?"true":"false";if("string"===typeof e)return ct(e,s);if("number"===typeof e){if(0===e)return 1/0/e>0?"0":"-0";var d=String(e);return p?B(e,d):d}if("bigint"===typeof e){var h=String(e)+"n";return p?B(e,h):h}var m="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof r&&(r=0),r>=m&&m>0&&"object"===typeof e)return F(e)?"[Array]":"[Object]";var f=ft(s,r);if("undefined"===typeof i)i=[];else if(nt(i,e)>=0)return"[Circular]";function g(e,n,o){if(n&&(i=O.call(i),i.push(n)),o){var a={depth:s.depth};return K(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,i)}return t(e,s,r+1,i)}if("function"===typeof e&&!V(e)){var y=et(e),w=bt(e,g);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(w.length>0?" { "+S.call(w,", ")+" }":"")}if(G(e)){var v=$?k.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(e);return"object"!==typeof e||$?v:pt(v)}if(lt(e)){for(var _="<"+C.call(String(e.nodeName)),P=e.attributes||[],A=0;A",e.childNodes&&e.childNodes.length&&(_+="..."),_+=""+C.call(String(e.nodeName))+">",_}if(F(e)){if(0===e.length)return"[]";var E=bt(e,g);return f&&!mt(E)?"["+gt(E,f)+"]":"[ "+S.call(E,", ")+" ]"}if(W(e)){var D=bt(e,g);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===D.length?"["+String(e)+"]":"{ ["+String(e)+"] "+S.call(D,", ")+" }":"{ ["+String(e)+"] "+S.call(j.call("[cause]: "+g(e.cause),D),", ")+" }"}if("object"===typeof e&&l){if(U&&"function"===typeof e[U]&&z)return z(e,{depth:m-r});if("symbol"!==l&&"function"===typeof e.inspect)return e.inspect()}if(rt(e)){var X=[];return a&&a.call(e,(function(t,n){X.push(g(n,e,!0)+" => "+g(t,e))})),ht("Map",o.call(e),X,f)}if(at(e)){var ut=[];return u&&u.call(e,(function(t){ut.push(g(t,e))})),ht("Set",c.call(e),ut,f)}if(it(e))return dt("WeakMap");if(st(e))return dt("WeakSet");if(ot(e))return dt("WeakRef");if(Q(e))return pt(g(Number(e)));if(J(e))return pt(g(N.call(e)));if(Y(e))return pt(b.call(e));if(Z(e))return pt(g(String(e)));if(!H(e)&&!V(e)){var yt=bt(e,g),wt=I?I(e)===Object.prototype:e instanceof Object||e.constructor===Object,vt=e instanceof Object?"":"null prototype",xt=!wt&&R&&Object(e)===e&&R in e?x.call(tt(e),8,-1):vt?"Object":"",kt=wt||"function"!==typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"",_t=kt+(xt||vt?"["+S.call(j.call([],xt||[],vt||[]),": ")+"] ":"");return 0===yt.length?_t+"{}":f?_t+"{"+gt(yt,f)+"}":_t+"{ "+S.call(yt,", ")+" }"}return String(e)};var X=Object.prototype.hasOwnProperty||function(t){return t in this};function K(t,e){return X.call(t,e)}function tt(t){return y.call(t)}function et(t){if(t.name)return t.name;var e=v.call(w.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function nt(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return ct(x.call(t,0,e.maxStringLength),e)+r}var i=k.call(k.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ut);return q(i,"single",e)}function ut(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+_.call(e.toString(16))}function pt(t){return"Object("+t+")"}function dt(t){return t+" { ? }"}function ht(t,e,n,r){var i=r?gt(n,r):S.call(n,", ");return t+" ("+e+") {"+i+"}"}function mt(t){for(var e=0;e=0)return!1;return!0}function ft(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"===typeof t.indent&&t.indent>0))return null;n=S.call(Array(t.indent+1)," ")}return{base:n,prev:S.call(Array(e+1),n)}}function gt(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+S.call(t,","+n)+"\n"+e.prev}function bt(t,e){var n=F(t),r=[];if(n){r.length=t.length;for(var i=0;i-1?t.split(","):t},c="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",p=function(t,e){var n,p={},d=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,m=d.split(e.delimiter,h),f=-1,g=e.charset;if(e.charsetSentinel)for(n=0;n-1&&(y=o(y)?[y]:y),i.call(p,b)?p[b]=r.combine(p[b],y):p[b]=y}return p},d=function(t,e,n,r){for(var i=r?e:l(e,n),o=t.length-1;o>=0;--o){var a,s=t[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[],a[u]=i):"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i},h=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=n.depth>0&&a.exec(o),c=l?o.slice(0,l.index):o,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}var p=0;while(n.depth>0&&null!==(l=s.exec(o))&&p0?P.join(",")||null:void 0}];else if(l(h))R=h;else{var I=Object.keys(P);R=b?I.sort(b):I}for(var B=a&&l(P)&&1===P.length?n+"[]":n,z=0;z0?v+w:""}},2769:function(t,e,n){"use strict";var r=n(5798),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t){while(t.length>1){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},h=function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function l(t,e){return function(n,r){e(n,r,t)}}function c(t,e,n,r,i,o){function a(t){if(void 0!==t&&"function"!==typeof t)throw new TypeError("Function expected");return t}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!e&&t?r["static"]?t:t.prototype:null,p=e||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(t||null))};var g=(0,n[h])("accessor"===l?{get:p.get,set:p.set}:p[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!==typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(p.get=s),(s=a(g.set))&&(p.set=s),(s=a(g.init))&&i.push(s)}else(s=a(g))&&("field"===l?i.push(s):p[c]=s)}u&&Object.defineProperty(u,r.name,p),d=!0}function u(t,e,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{while((void 0===e||e-- >0)&&!(r=o.next()).done)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{l(i[t](e))}catch(n){p(o[0][3],n)}}function l(t){t.value instanceof _?Promise.resolve(t.value.v).then(c,u):p(o[0][2],t)}function c(t){s("next",t)}function u(t){s("throw",t)}function p(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function P(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:_(t[r](e)),done:!1}:i?i(e):e}:i}}function j(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"===typeof y?y(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){e=t[n](e),i(r,o,e.done,e.value)}))}}function i(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var O=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t["default"]=e};function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&g(e,t,n);return O(e,t),e}function N(t){return t&&t.__esModule?t:{default:t}}function E(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function T(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function $(t,e){if(null===e||"object"!==typeof e&&"function"!==typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof t?e===t:t.has(e)}},2238:function(t,e,n){var r;(function(i,o){"use strict";var a="0.7.34",s="",l="?",c="function",u="undefined",p="object",d="string",h="major",m="model",f="name",g="type",b="vendor",y="version",w="architecture",v="console",x="mobile",k="tablet",_="smarttv",C="wearable",P="embedded",j=350,S="Amazon",O="Apple",A="ASUS",N="BlackBerry",E="Browser",T="Chrome",$="Edge",R="Firefox",M="Google",I="Huawei",B="LG",z="Microsoft",D="Motorola",U="Opera",q="Samsung",L="Sharp",F="Sony",H="Xiaomi",V="Zebra",W="Facebook",Z="Chromium OS",Q="Mac OS",Y=function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2===0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},G=function(t){for(var e={},n=0;n0?2===a.length?typeof a[1]==c?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==c||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o}u+=2}},nt=function(t,e){for(var n in e)if(typeof e[n]===p&&e[n].length>0){for(var r=0;r2&&(t[m]="iPad",t[g]=k),t},this.getEngine=function(){var t={};return t[f]=o,t[y]=o,et.call(t,r,l.engine),t},this.getOS=function(){var t={};return t[f]=o,t[y]=o,et.call(t,r,l.os),!t[f]&&a&&"Unknown"!=a.platform&&(t[f]=a.platform.replace(/chrome os/i,Z).replace(/macos/i,Q)),t},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(t){return r=typeof t===d&&t.length>j?tt(t,j):t,this},this.setUA(r),this};at.VERSION=a,at.BROWSER=G([f,y,h]),at.CPU=G([w]),at.DEVICE=G([m,b,g,v,x,_,k,C,P]),at.ENGINE=at.OS=G([f,y]),typeof e!==u?("object"!==u&&t.exports&&(e=t.exports=at),e.UAParser=at):"function"===c&&n.amdO?(r=function(){return at}.call(e,n,e,t),r===o||(t.exports=r)):typeof i!==u&&(i.UAParser=at);var st=typeof i!==u&&(i.jQuery||i.Zepto);if(st&&!st.ua){var lt=new at;st.ua=lt.getResult(),st.ua.get=function(){return lt.getUA()},st.ua.set=function(t){lt.setUA(t);var e=lt.getResult();for(var n in e)st.ua[n]=e[n]}}})("object"===typeof window?window:this)},8978:function(t,e,n){var r=n(2224);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("72b9c1de",r,t)}},2343:function(t,e,n){var r=n(3409);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("0e1b6146",r,t)}},3484:function(t,e,n){var r=n(3782);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("61b8b884",r,t)}},8197:function(t,e,n){var r=n(6729);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("34c62594",r,t)}},4754:function(t,e,n){var r=n(272);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("424b67c8",r,t)}},2339:function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},i=0;it.replace(a,((t,e)=>e?e.toUpperCase():"")),l=/\B([A-Z])/g,c=t=>t.replace(l,"-$1").toLowerCase();function u(t){const e={};return t.forEach((t=>{e[t]=void 0})),e}function p(t,e,n){t[e]=[].concat(t[e]||[]),t[e].unshift(n)}function d(t,e){if(t){const n=t.$options[e]||[];n.forEach((e=>{e.call(t)}))}}function h(t,e){return new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:e})}const m=t=>/function Boolean/.test(String(t)),f=t=>/function Number/.test(String(t));function g(t,e,{type:n}={}){if(m(n))return"true"===t||"false"===t?"true"===t:""===t||t===e||null!=t||t;if(f(n)){const e=parseFloat(t,10);return isNaN(e)?t:e}return t}function b(t,e){const n=[];for(let r=0,i=e.length;r(t[e]=l[n[r]],t)),{}),p(e,"beforeCreate",(function(){const t=this.$emit;this.$emit=(e,...n)=>(this.$root.$options.customElement.dispatchEvent(h(e,n)),t.call(this,e,...n))})),p(e,"created",(function(){i.forEach((t=>{this.$root.props[t]=this[t]}))})),i.forEach((t=>{Object.defineProperty(f.prototype,t,{get(){return this._wrapper.props[t]},set(e){this._wrapper.props[t]=e},enumerable:!1,configurable:!0})})),a=!0}function m(t,e){const n=s(e),r=t.hasAttribute(e)?t.getAttribute(e):void 0;t._wrapper.props[n]=g(r,e,o[n])}class f extends HTMLElement{constructor(){const n=super();n.attachShadow({mode:"open"});const r=n._wrapper=new t({name:"shadow-root",customElement:n,shadowRoot:n.shadowRoot,data(){return{props:{},slotChildren:[]}},render(t){return t(e,{ref:"inner",props:this.props},this.slotChildren)}}),i=new MutationObserver((t=>{let e=!1;for(let r=0;r{t.props=u(i),r.forEach((t=>{m(this,t)}))};a?n():e().then((t=>{(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t),n()})),t.slotChildren=Object.freeze(b(t.$createElement,this.childNodes)),t.$mount(),this.shadowRoot.appendChild(t.$el)}}disconnectedCallback(){d(this.vueComponent,"deactivated")}}return n||l(e),f}var x=v,k=(n(3645),function(){var t=this,e=t._self._c;return void 0!==t.options?e("div",{staticClass:"halo-comment",class:t.mergedConfigs.night?"night":"",attrs:{id:"halo-comment","stop-bullet-screen":t.stopBulletScreen}},[e("keep-alive",[e("comment-editor",{attrs:{configs:t.mergedConfigs,options:t.options,target:t.target,targetId:t.id}})],1),t.mergedConfigs.autoLoad||t.list.loaded?t._e():e("div",{staticClass:"load-comment"},[e("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.handleGetComments}},[t._v("加载评论")])]),t.list.loaded?e("div",{staticClass:"comment-action"},[e("h3",{staticClass:"comment-title"},[t._v(t._s(t.list.total)+" 条评论")]),e("div",{staticClass:"comment-operation"},[t.mergedConfigs.enableBulletScreen?e("span",{staticClass:"comment-bullet-screen",class:t.stopBulletScreen?"":"operation-open",on:{click:function(e){t.stopBulletScreen=!t.stopBulletScreen}}},[t._v("弹")]):t._e(),e("svg",{staticClass:"comment-refresh",attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(e){return t.handlePaginationChange(0)}}},[e("path",{attrs:{d:"M55.935033 264.48948c0 0 85.897017-132.548409 221.81443-203.673173 135.916406-71.121743 303.368504-50.646859 413.187968 18.319527 109.819465 68.970415 146.791894 127.160016 146.791894 127.160016l94.59499-53.879895c0 0 19.576483-9.697092 19.576483 12.932142l0 338.379961c0 0 0 30.17399-22.837719 19.395191-19.210878-9.062571-226.959086-127.198289-292.424528-164.466828-35.950145-16.035251-4.365101-29.062068-4.365101-29.062068l91.284402-52.173738c0 0-52.068992-65.209619-128.278989-99.744682-81.576231-42.501826-157.948384-47.541735-251.497925-12.224097-61.002644 23.025054-132.823368 81.988166-184.553949 169.082716L55.935033 264.48948 55.935033 264.48948 55.935033 264.48948zM904.056909 711.697844c0 0-85.897017 132.550423-221.816444 203.671159-135.917413 71.12275-303.366489 50.651895-413.186961-18.315498-109.825508-68.972429-146.790886-127.165052-146.790886-127.165052L27.662591 823.768348c0 0-19.572454 9.703135-19.572454-12.932142L8.090137 472.459267c0 0 0-30.170968 22.831676-19.397205 19.211885 9.067607 226.965129 127.198289 292.430571 164.470856 35.950145 16.035251 4.366109 29.058039 4.366109 29.058039l-91.285409 52.175753c0 0 52.071006 65.206598 128.279996 99.744682 81.57321 42.498804 157.942341 47.540728 251.496918 12.222082 60.998616-23.026061 132.820346-81.983131 184.546898-169.082716L904.056909 711.697844 904.056909 711.697844 904.056909 711.697844zM904.056909 711.697844"}})])])]):t._e(),e("comment-loading",{directives:[{name:"show",rawName:"v-show",value:t.list.loading,expression:"list.loading"}],attrs:{configs:t.mergedConfigs}}),t.list.data.length>=1?e("ul",{staticClass:"comment-nodes"},[t._l(t.list.data,(function(n){return[e("CommentNode",{key:n.id,attrs:{comment:n,replyNum:t.mergedConfigs.unfoldReplyNum,configs:t.mergedConfigs,options:t.options,target:t.target,targetId:t.id}})]}))],2):t.list.loaded&&!t.list.loading?e("div",{staticClass:"comment-empty"},[t._v("暂无评论")]):t._e(),t.list.pages>1?e("pagination",{attrs:{page:t.list.params.page,size:t.list.size,total:t.list.total},on:{change:t.handlePaginationChange}}):t._e(),t.mergedConfigs.enableBulletScreen?e("bullet-screen",{attrs:{target:t.target,id:t.id,configs:t.mergedConfigs,options:t.options,"stop-bullet-screen":t.stopBulletScreen},on:{"update:stopBulletScreen":function(e){t.stopBulletScreen=e},"update:stop-bullet-screen":function(e){t.stopBulletScreen=e}}}):t._e()],1):t._e()}),_=[];n(7658);function C(){return{async:!1,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,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let P=C();function j(t){P=t}const S=/[&<>"']/,O=new RegExp(S.source,"g"),A=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,N=new RegExp(A.source,"g"),E={"&":"&","<":"<",">":">",'"':""","'":"'"},T=t=>E[t];function $(t,e){if(e){if(S.test(t))return t.replace(O,T)}else if(A.test(t))return t.replace(N,T);return t}const R=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function M(t){return t.replace(R,((t,e)=>(e=e.toLowerCase(),"colon"===e?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")))}const I=/(^|[^\[])\^/g;function B(t,e){t="string"===typeof t?t:t.source,e=e||"";const n={replace:(e,r)=>(r=r.source||r,r=r.replace(I,"$1"),t=t.replace(e,r),n),getRegex:()=>new RegExp(t,e)};return n}const z=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function U(t,e,n){if(t){let t;try{t=decodeURIComponent(M(n)).replace(z,"").toLowerCase()}catch(r){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!D.test(n)&&(n=V(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const q={},L=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,H=/^([^:]+:\/*[^/]*)[\s\S]*$/;function V(t,e){q[" "+t]||(L.test(t)?q[" "+t]=t+"/":q[" "+t]=Y(t,"/",!0)),t=q[" "+t];const n=-1===t.indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(F,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(H,"$1")+e:t+e}const W={exec:function(){}};function Z(t){let e,n,r=1;for(;r{let r=!1,i=e;while(--i>=0&&"\\"===n[i])r=!r;return r?"|":" |"})),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else while(r.length1)1&e&&(n+=t),e>>=1,t+=t;return n+t}function K(t,e,n,r){const i=e.href,o=e.title?$(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){r.state.inLink=!0;const t={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,t}return{type:"image",raw:n,href:i,title:o,text:$(a)}}function tt(t,e){const n=t.match(/^(\s+)(?:```)/);if(null===n)return e;const r=n[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[n]=e;return n.length>=r.length?t.slice(r.length):t})).join("\n")}class et{constructor(t){this.options=t||P}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Y(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=tt(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline._escapes,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=Y(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const t=e[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(t);return this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:r,text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n,r,i,o,a,s,l,c,u,p,d,h,m=e[1].trim();const f=m.length>1,g={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=f?m:"[*+-]");const b=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);while(t){if(h=!1,!(e=b.exec(t)))break;if(this.rules.block.hr.test(t))break;if(n=e[0],t=t.substring(n.length),c=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),u=t.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=e[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=e[1].length),s=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",t=t.substring(u.length+1),h=!0),!h){const e=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);while(t){if(p=t.split("\n",1)[0],u=p,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(u))break;if(a.test(u))break;if(e.test(u))break;if(r.test(t))break;if(u.search(/[^ ]/)>=o||!u.trim())d+="\n"+u.slice(o);else{if(s)break;if(c.search(/[^ ]/)>=4)break;if(i.test(c))break;if(a.test(c))break;if(r.test(c))break;d+="\n"+u}s||u.trim()||(s=!0),n+=p+"\n",t=t.substring(p.length+1),c=u.slice(o)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d),r&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const y=g.items.length;for(a=0;a"space"===t.type)),e=t.length>0&&t.some((t=>/\n.*\n/.test(t.raw)));g.loose=e}if(g.loose)for(a=0;a$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(e){const t={type:"table",header:Q(e[1]).map((t=>({text:t}))),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];let n,r,i,o,a=t.align.length;for(n=0;n({text:t})));for(a=t.header.length,r=0;r /i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):$(e[0]):e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=Y(t.slice(0,-1),"\\");if((t.length-e.length)%2===0)return}else{const t=G(e[2],"()");if(t>-1){const n=0===e[0].indexOf("!")?5:4,r=n+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^$/.test(t)?n.slice(1):n.slice(1,-1)),K(e,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(/\s+/g," ");if(t=e[t.toLowerCase()],!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return K(n,t,n[0],this.lexer)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrong.lDelim.exec(t);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let i,o,a=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;l.lastIndex=0,e=e.slice(-1*t.length+n);while(null!=(r=l.exec(e))){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=i.length,r[3]||r[4]){a+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);const e=t.slice(0,n+r.index+(r[0].length-i.length)+o);if(Math.min(n,o)%2){const t=e.slice(1,-1);return{type:"em",raw:e,text:t,tokens:this.lexer.inlineTokens(t)}}const l=e.slice(2,-2);return{type:"strong",raw:e,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const n=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return n&&r&&(t=t.substring(1,t.length-1)),t=$(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t,e){const n=this.rules.inline.autolink.exec(t);if(n){let t,r;return"@"===n[2]?(t=$(this.options.mangle?e(n[1]):n[1]),r="mailto:"+t):(t=$(n[1]),r=t),{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t,e){let n;if(n=this.rules.inline.url.exec(t)){let t,r;if("@"===n[2])t=$(this.options.mangle?e(n[0]):n[0]),r="mailto:"+t;else{let e;do{e=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(e!==n[0]);t=$(n[0]),r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t,e){const n=this.rules.inline.text.exec(t);if(n){let t;return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):$(n[0]):n[0]:$(this.options.smartypants?e(n[0]):n[0]),{type:"text",raw:n[0],text:t}}}}const nt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:W,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};nt.def=B(nt.def).replace("label",nt._label).replace("title",nt._title).getRegex(),nt.bullet=/(?:[*+-]|\d{1,9}[.)])/,nt.listItemStart=B(/^( *)(bull) */).replace("bull",nt.bullet).getRegex(),nt.list=B(nt.list).replace(/bull/g,nt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+nt.def.source+")").getRegex(),nt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",nt._comment=/|$)/,nt.html=B(nt.html,"i").replace("comment",nt._comment).replace("tag",nt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nt.paragraph=B(nt._paragraph).replace("hr",nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nt._tag).getRegex(),nt.blockquote=B(nt.blockquote).replace("paragraph",nt.paragraph).getRegex(),nt.normal=Z({},nt),nt.gfm=Z({},nt.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),nt.gfm.table=B(nt.gfm.table).replace("hr",nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nt._tag).getRegex(),nt.gfm.paragraph=B(nt._paragraph).replace("hr",nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",nt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nt._tag).getRegex(),nt.pedantic=Z({},nt.normal,{html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",nt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:W,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:B(nt.normal._paragraph).replace("hr",nt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",nt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const rt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:W,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+=""+n+";";return r}rt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",rt.punctuation=B(rt.punctuation).replace(/punctuation/g,rt._punctuation).getRegex(),rt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,rt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,rt._comment=B(nt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),rt.emStrong.lDelim=B(rt.emStrong.lDelim).replace(/punct/g,rt._punctuation).getRegex(),rt.emStrong.rDelimAst=B(rt.emStrong.rDelimAst,"g").replace(/punct/g,rt._punctuation).getRegex(),rt.emStrong.rDelimUnd=B(rt.emStrong.rDelimUnd,"g").replace(/punct/g,rt._punctuation).getRegex(),rt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,rt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,rt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,rt.autolink=B(rt.autolink).replace("scheme",rt._scheme).replace("email",rt._email).getRegex(),rt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,rt.tag=B(rt.tag).replace("comment",rt._comment).replace("attribute",rt._attribute).getRegex(),rt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,rt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,rt.link=B(rt.link).replace("label",rt._label).replace("href",rt._href).replace("title",rt._title).getRegex(),rt.reflink=B(rt.reflink).replace("label",rt._label).replace("ref",nt._label).getRegex(),rt.nolink=B(rt.nolink).replace("ref",nt._label).getRegex(),rt.reflinkSearch=B(rt.reflinkSearch,"g").replace("reflink",rt.reflink).replace("nolink",rt.nolink).getRegex(),rt.normal=Z({},rt),rt.pedantic=Z({},rt.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:B(/^!?\[(label)\]\((.*?)\)/).replace("label",rt._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rt._label).getRegex()}),rt.gfm=Z({},rt.normal,{escape:B(rt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\e+" ".repeat(n.length)));while(t)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?e.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else{if(i=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((function(t){r=t.call({lexer:this},n),"number"===typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=e[e.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n),o=i.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,r,i,o,a,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)while(null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l)))t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+X("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l)))l=l.slice(0,o.index)+"["+X("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l)))l=l.slice(0,o.index+o[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;while(t)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.escape(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.tag(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.link(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.emStrong(t,l,s))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.codespan(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.br(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.del(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.autolink(t,ot))t=t.substring(n.raw.length),e.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(t,ot))){if(i=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((function(t){r=t.call({lexer:this},n),"number"===typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(n=this.tokenizer.inlineText(i,it))t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,r=e[e.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(n.raw.length),e.push(n);return e}}class st{constructor(t){this.options=t||P}code(t,e,n){const r=(e||"").match(/\S*/)[0];if(this.options.highlight){const e=this.options.highlight(t,r);null!=e&&e!==t&&(n=!0,t=e)}return t=t.replace(/\n$/,"")+"\n",r?''+(n?t:$(t,!0))+"
\n":""+(n?t:$(t,!0))+"
\n"}blockquote(t){return`\n${t} \n`}html(t){return t}heading(t,e,n,r){if(this.options.headerIds){const i=this.options.headerPrefix+r.slug(n);return`${t} \n`}return`${t} \n`}hr(){return this.options.xhtml?" \n":" \n"}list(t,e,n){const r=e?"ol":"ul",i=e&&1!==n?' start="'+n+'"':"";return"<"+r+i+">\n"+t+""+r+">\n"}listitem(t){return`${t} \n`}checkbox(t){return" "}paragraph(t){return`${t}
\n`}table(t,e){return e&&(e=`${e} `)," \n"}tablerow(t){return`\n${t} \n`}tablecell(t,e){const n=e.header?"th":"td",r=e.align?`<${n} align="${e.align}">`:`<${n}>`;return r+t+`${n}>\n`}strong(t){return`${t} `}em(t){return`${t} `}codespan(t){return`${t}
`}br(){return this.options.xhtml?" ":" "}del(t){return`${t}`}link(t,e,n){if(t=U(this.options.sanitize,this.options.baseUrl,t),null===t)return n;let r='"+n+" ",r}image(t,e,n){if(t=U(this.options.sanitize,this.options.baseUrl,t),null===t)return n;let r=` ":">",r}text(t){return t}}class lt{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class ct{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,e){let n=t,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[t];do{r++,n=t+"-"+r}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=r,this.seen[n]=0),n}slug(t,e={}){const n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)}}class ut{constructor(t){this.options=t||P,this.options.renderer=this.options.renderer||new st,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new lt,this.slugger=new ct}static parse(t,e){const n=new ut(e);return n.parse(t)}static parseInline(t,e){const n=new ut(e);return n.parseInline(t)}parse(t,e=!0){let n,r,i,o,a,s,l,c,u,p,d,h,m,f,g,b,y,w,v,x="";const k=t.length;for(n=0;n0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):f+=w),f+=this.parse(g.tokens,m),u+=this.renderer.listitem(f,y,b);x+=this.renderer.list(u,d,h);continue;case"html":x+=this.renderer.html(p.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":u=p.tokens?this.parseInline(p.tokens):p.text;while(n+1{r(t.text,t.lang,(function(e,n){if(e)return a(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),s--,0===s&&a()}))}),0))})),void(0===s&&a())}function r(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"An error occurred:
"+$(t.message+"",!0)+" ";throw t}try{const n=at.lex(t,e);if(e.walkTokens){if(e.async)return Promise.all(pt.walkTokens(n,e.walkTokens)).then((()=>ut.parse(n,e))).catch(r);pt.walkTokens(n,e.walkTokens)}return ut.parse(n,e)}catch(i){r(i)}}pt.options=pt.setOptions=function(t){return Z(pt.defaults,t),j(pt.defaults),pt},pt.getDefaults=C,pt.defaults=P,pt.use=function(...t){const e=pt.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((t=>{const n=Z({},t);if(n.async=pt.defaults.async||n.async,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if(t.renderer){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if(t.tokenizer){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");e[t.level]?e[t.level].unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=pt.defaults.renderer||new st;for(const n in t.renderer){const r=e[n];e[n]=(...i)=>{let o=t.renderer[n].apply(e,i);return!1===o&&(o=r.apply(e,i)),o}}n.renderer=e}if(t.tokenizer){const e=pt.defaults.tokenizer||new et;for(const n in t.tokenizer){const r=e[n];e[n]=(...i)=>{let o=t.tokenizer[n].apply(e,i);return!1===o&&(o=r.apply(e,i)),o}}n.tokenizer=e}if(t.walkTokens){const e=pt.defaults.walkTokens;n.walkTokens=function(n){let r=[];return r.push(t.walkTokens.call(this,n)),e&&(r=r.concat(e.call(this,n))),r}}pt.setOptions(n)}))},pt.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(pt,r)),r.type){case"table":for(const t of r.header)n=n.concat(pt.walkTokens(t.tokens,e));for(const t of r.rows)for(const r of t)n=n.concat(pt.walkTokens(r.tokens,e));break;case"list":n=n.concat(pt.walkTokens(r.items,e));break;default:pt.defaults.extensions&&pt.defaults.extensions.childTokens&&pt.defaults.extensions.childTokens[r.type]?pt.defaults.extensions.childTokens[r.type].forEach((function(t){n=n.concat(pt.walkTokens(r[t],e))})):r.tokens&&(n=n.concat(pt.walkTokens(r.tokens,e)))}return n},pt.parseInline=function(t,e){if("undefined"===typeof t||null===t)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof t)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");e=Z({},pt.defaults,e||{}),J(e);try{const n=at.lexInline(t,e);return e.walkTokens&&pt.walkTokens(n,e.walkTokens),ut.parseInline(n,e)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"An error occurred:
"+$(n.message+"",!0)+" ";throw n}},pt.Parser=ut,pt.parser=ut.parse,pt.Renderer=st,pt.TextRenderer=lt,pt.Lexer=at,pt.lexer=at.lex,pt.Tokenizer=et,pt.Slugger=ct,pt.parse=pt;pt.options,pt.setOptions,pt.use,pt.walkTokens,pt.parseInline,ut.parse,at.lex;var dt=function(){var t=this,e=t._self._c;return e("section",{staticClass:"comment-editor",attrs:{role:"form"}},[e("div",{staticClass:"avatar-body"},[t.configs.enableBloggerOperation&&t.bloggerComment?e("div",{staticClass:"blogger-avatar",attrs:{title:"博主登录"}},[e("avatar",{staticStyle:{cursor:"pointer"},attrs:{src:t.avatar,configs:t.configs,title:"点击头像试试"},on:{click:t.randomAuthor}}),e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 170 170"}},[e("path",{attrs:{fill:"var(--comment-theme)",d:"M114.7,34.7c-19.4-41-38.7-41-58.1,0C11.4,31,1.8,47.7,27.6,85c-25.8,37.3-16.2,54,29,50.3c19.4,41,38.7,41,58.1,0\n\tc45.2,3.7,54.9-13,29.1-50.3C169.6,47.7,159.9,31,114.7,34.7z M82.4,110.9"}}),e("path",{attrs:{fill:"rgba(255, 255, 255, 0.8)",d:"M117.4,75.9l-35,35c-2.6,2.6-6.9,2.6-9.6,0L50.5,88.6c-2.6-2.6-2.6-6.9,0-9.6s6.9-2.6,9.6,0l17.5,17.5\n\tl30.2-30.2c2.6-2.6,6.9-2.6,9.6,0C120,68.9,120,73.2,117.4,75.9L117.4,75.9z"}})])],1):e("avatar",{staticStyle:{cursor:"pointer"},attrs:{src:t.avatar,configs:t.configs,title:"点击头像试试"},on:{click:t.randomAuthor}})],1),e("form",{staticClass:"comment-form"},[t.configs.enableBloggerOperation&&t.bloggerComment?e("div",{staticClass:"blogger-info"},[e("div",[e("p",{staticClass:"blogger-name"},[t._v(t._s(this.globalData.blogger.nickname))]),e("p",{staticClass:"blogger-email"},[t._v(t._s(this.globalData.blogger.email))])]),e("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(e){t.bloggerComment=!1}}},[t._v("切换访客")])]):e("div",{staticClass:"author-info"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.author,expression:"comment.author"}],attrs:{id:"author","aria-required":"true",placeholder:(this.configs.anonymousUserName?"":"* ")+(this.configs.getQQInfo?"昵称(输入QQ自动获取)":"昵称"),required:"required",type:"text"},domProps:{value:t.comment.author},on:{blur:function(e){t.configs.getQQInfo&&t.handleQQInfo()},input:function(e){e.target.composing||t.$set(t.comment,"author",e.target.value)}}}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.email,expression:"comment.email"}],class:!this.comment.email||t.isEmail()?"":"error",attrs:{id:"email",placeholder:"邮箱",type:"text"},domProps:{value:t.comment.email},on:{input:function(e){e.target.composing||t.$set(t.comment,"email",e.target.value)}}}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.authorUrl,expression:"comment.authorUrl"}],attrs:{id:"authorUrl",placeholder:"网址",type:"text"},domProps:{value:t.comment.authorUrl},on:{input:function(e){e.target.composing||t.$set(t.comment,"authorUrl",e.target.value)}}})]),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.previewMode,expression:"!previewMode"}],staticClass:"comment-textarea"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.comment.content,expression:"comment.content"}],ref:"commentTextarea",class:!t.comment.content||t.comment.content.length<1023?"":"error",attrs:{placeholder:t.options.comment_content_placeholder||"撰写评论...","aria-required":"true",required:"required"},domProps:{value:t.comment.content},on:{input:function(e){e.target.composing||t.$set(t.comment,"content",e.target.value)}}}),e("span",{staticClass:"edit-picker"},[e("span",{staticClass:"edit-btn",class:t.emojiDialogVisible?"edit-open":"",on:{click:t.handleToggleDialogEmoji}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18"}},[t._v(" > "),e("path",{attrs:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-5-7h2a3 3 0 0 0 6 0h2a5 5 0 0 1-10 0zm1-2a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm8 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"}})])]),t.configs.enableImageUpload?e("span",{staticClass:"edit-btn",class:t.imageDialogVisible?"edit-open":"",on:{click:t.handleImageUpload}},[e("svg",{attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18"}},[e("path",{attrs:{d:"M896 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h768zM288 409.6L128 569.536V832h768v-83.2l-204.8-204.8-134.4 134.4-268.8-268.8zM896 192H128v288L288 320l268.8 268.8 134.4-134.4 204.8 204.8V192z"}}),e("path",{attrs:{d:"M774.08 356.736a44.8 44.8 0 1 0 0-89.6 44.8 44.8 0 0 0 0 89.6z"}})])]):t._e(),e("transition",{attrs:{name:"emoji-fade"}},[e("keep-alive",[t.emojiDialogVisible?e("EmojiPicker",{attrs:{pack:t.emojiPack},on:{select:t.handleSelectEmoji}}):t._e()],1)],1)],1)]),t.previewMode?e("div",{staticClass:"comment-preview markdown-content",domProps:{innerHTML:t._s(t.renderedContent)}}):t._e(),e("ul",[this.replyComment?e("li",[e("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(e){t.globalData.replyId=0}}},[t._v("取消")])]):t._e(),t.comment.content?e("li",[e("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(e){t.previewMode=!t.previewMode}}},[t._v(" "+t._s(t.previewMode?"编辑":"预览")+" ")])]):t._e(),e("li",[e("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.handleSubmitClick}},[t._v("提交")])])]),e("div",{staticClass:"comment-alert"},[t.infoAlertVisible?t._l(t.infoes,(function(n,r){return e("div",{key:r,staticClass:"alert info"},[e("span",{staticClass:"closebtn",on:{click:t.clearAlertClose}},[t._v("×")]),e("strong",[t._v(t._s(n))])])})):t._e(),t.successAlertVisible?t._l(t.successes,(function(n,r){return e("div",{key:r,staticClass:"alert success"},[e("span",{staticClass:"closebtn",on:{click:t.clearAlertClose}},[t._v("×")]),e("strong",[t._v(t._s(n))])])})):t._e(),t.warningAlertVisible?t._l(t.warnings,(function(n,r){return e("div",{key:r,staticClass:"alert warning"},[e("span",{staticClass:"closebtn",on:{click:t.clearAlertClose}},[t._v("×")]),e("strong",[t._v(t._s(n))])])})):t._e()],2)])])},ht=[],mt=n(2568),ft=n.n(mt);function gt(t){const e=(new Date).getTime(),n=e-t,r=Math.floor(n/864e5);if(0===r){const t=n%864e5,e=Math.floor(t/36e5);if(0===e){const e=t%36e5,n=Math.floor(e/6e4);if(0===n){const t=e%6e4,n=Math.round(t/1e3);return n+" 秒前"}return n+" 分钟前"}return e+" 小时前"}return r<0?"刚刚":r<=7?r+" 天前":bt(t,"yyyy/MM/dd hh:mm")}function bt(t,e){t=new Date(t),/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));let n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(let r in n)if(new RegExp(`(${r})`).test(e)){let t=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?t:yt(t))}return e}function yt(t){return("00"+t).substr(t.length)}function wt(t){return null===t||void 0===t||""===t}function vt(t){return t&&"object"===typeof t&&t.constructor===Object}function xt(t){const e=/^[A-Za-z0-9]+([-_.][A-Za-z0-9]+)*@([A-Za-z0-9]+[-.])+[A-Za-z]{2,8}$/;return e.test(t)}function kt(t){var e=/^[1-9][0-9]{4,9}$/gim;return e.test(t)}function _t(t,e,n,r){let i,o=t.getBoundingClientRect(),a=window.scrollY,s=a+o.top-n,l=(s-a)/e,c=a>s?-1:1;function u(){a+=l,a*c ");let n=document.createElement("div");n.innerHTML=t;const r=n.innerText||n.textContent;return n=null,r}function Pt(t,e){return e?t:t.replace(/[<&"]/g,(function(t){return{"<":"<","&":"&",'"':"""}[t]}))}function jt(t){return t.replace(/<\/*([^/\s>]+)[^>]*>/g,(function(t,e){return["img","ul","ol","span","div","h1","h2","h3","h4","h5","h6","input","code"].includes(e)?"":["hr","br","p","li","a","blockquote"].includes(e)?" ":t}))}function St(t=0,e=1){return Math.random()*(e-t)+t}function Ot(){let t=["追梦","放风筝","打酱油","耍帅","卖萌","发嗲","发呆","傻笑","打盹","可爱","善良","邪恶","笨笨","聪明","美丽","智慧","温柔","调皮","动人","活泼","任性","苗条","纯洁","娇小","体贴","贪嘴","朴实","机灵","机智","搞笑"],e=["法师","猛男","少女","勇士","帅哥","英雄","老者","小矮人","天才","旺财","小熊","少年","驴","猪","恶龙","天使","恶魔","仙女","哥布林","企鹅","小提莫","爵士","骑士","国王","公主","王子","太监","猪儿虫","猫猫","上仙"];return`${t[Math.floor(Math.random()*t.length)]}的${e[Math.floor(Math.random()*e.length)]}`}var At=n(3977);const Nt=new At.HaloRestAPIClient({baseUrl:""}),Et=new At.ContentApiClient(Nt);var Tt=Et,$t=n(5597);let Rt=localStorage&&localStorage.getItem("HALO__Access-Token");Rt=Rt?JSON.parse(Rt):void 0,Rt=Rt&&Rt.expire>(new Date).getTime()?Rt["value"]["access_token"]:void 0;const Mt=new $t.HaloRestAPIClient({baseUrl:"",auth:{adminToken:Rt}}),It=new $t.AdminApiClient(Mt);var Bt=It,zt=n(9367),Dt=n.n(zt);const Ut={replyId:0,blogger:void 0};var qt=Ut,Lt=function(){var t=this,e=t._self._c;return e("EmojiList",{attrs:{data:t.pack},on:{select:t.onSelectEmoji}})},Ft=[],Ht=function(){var t=this,e=t._self._c;return e("div",{staticClass:"emoji-container"},t._l(t.data,(function(n,r){return e("DreamEmoji",{key:r,attrs:{data:n},nativeOn:{click:function(e){return t.onSelect(n)}}})})),1)},Vt=[],Wt=function(){var t=this,e=t._self._c;return e("span",{staticClass:"emoji-item",attrs:{title:t.data.name}},[e("img",{attrs:{alt:t.data.name,src:t.dreamSrc,onerror:"this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='"}})])},Zt=[],Qt={name:"DreamEmoji",props:{data:{type:Object},url:{type:String,required:!1,default:"https://unpkg.com/halo-comment-dream@1.1.0/dist/assets/emoji/"}},computed:{dreamSrc(){return this.url+this.data.fileName+".png"}}},Yt=Qt;function Gt(t,e,n,r,i,o,a,s){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:c}}var Jt=Gt(Yt,Wt,Zt,!1,null,null,null,!0),Xt=Jt.exports,Kt={name:"EmojiList",components:{DreamEmoji:Xt},props:{data:{type:Object}},methods:{onSelect(t){this.$emit("select",t)}},watch:{data(){this.$refs["container-emoji"].scrollTop=0}}},te=Kt;function ee(t){var e=n(8028);e.__inject__&&e.__inject__(t)}var ne=Gt(te,Ht,Vt,!1,ee,null,null,!0),re=ne.exports,ie={name:"EmojiPicker",props:{pack:{type:Array,required:!0}},components:{EmojiList:re},data:()=>({mapEmojis:{}}),methods:{onSelectEmoji(t){this.$emit("select",t)}}},oe=ie,ae=Gt(oe,Lt,Ft,!1,null,null,null,!0),se=ae.exports,le=n(9189);function ce(t){const e=n(9189).Z;for(let n of e){let e=n.name,r=` `;t=t.replace(new RegExp(`\\[/${e}\\]`,"gm"),r)}return t}var ue=function(){var t=this,e=t._self._c;return e("img",{staticClass:"avatar",attrs:{alt:t.author?t.author+"'s avatar":"avatar",src:t.configs.avatarLoading},on:{click:t.click,load:t.handleAvatarLoading,error:t.handleAvatarError}})},pe=[],de={name:"Avatar",props:{src:{type:String,required:!0},author:{type:String,required:!1},configs:{type:Object,required:!0}},methods:{handleAvatarLoading(t){const e=t.target||t.srcElement;e.finish||(e.finish=!0,e.src=this.src)},handleAvatarError(t){const e=t.target||t.srcElement;e.onerror=null,e.finish=!0,e.src=this.configs.defaultAvatar},click(){this.$emit("click")}}},he=de,me=Gt(he,ue,pe,!1,null,null,null,!0),fe=me.exports,ge={name:"CommentEditor",components:{Avatar:fe,EmojiPicker:se},props:{targetId:{type:Number,required:!1,default:0},target:{type:String,required:!1,default:"posts",validator:function(t){return-1!==["posts","sheets","journals"].indexOf(t)}},replyComment:{type:Object,required:!1,default:()=>{}},options:{required:!1,default:[]},configs:{type:Object,required:!0}},data(){return{emojiPack:le.Z,emojiDialogVisible:!1,imageDialogVisible:!1,comment:{author:null,authorUrl:null,email:null,content:""},previewMode:!1,globalData:qt,bloggerComment:!0,infoes:[],warnings:[],successes:[]}},computed:{renderedContent(){return this.comment.content?pt.parse(ce(Pt(this.comment.content,this.configs.commentHtml))):""},avatar(){const t=this.options.comment_gravatar_default,e=this.options.gravatar_source||"//cn.gravatar.com/avatar/";let n=this.configs.enableBloggerOperation?this.globalData.blogger.email:this.comment.email;if(!n||!xt(n))return`${e}?d=${t}`;const r=ft()(n);return`${e}${r}?s=256&d=${t}`},infoAlertVisible(){return null!==this.infoes&&this.infoes.length>0},warningAlertVisible(){return null!==this.warnings&&this.warnings.length>0},successAlertVisible(){return null!==this.successes&&this.successes.length>0}},created(){const t=localStorage.getItem("comment-author"),e=localStorage.getItem("comment-authorUrl"),n=localStorage.getItem("comment-email");this.comment.author=t||"",this.comment.authorUrl=e||"",this.comment.email=n||""},activated(){Dt()(this.$el.querySelector("textarea"))},methods:{randomAuthor(){this.comment.author=Ot()},isEmail(){return xt(this.comment.email)},handleQQInfo(){kt(this.comment.author)&&fetch("https://api.coor.top/qqinfo/?qq="+this.comment.author).then((t=>t.json())).then((t=>{this.comment.author=t.nickname,this.comment.email=t.email})).catch((t=>{this.clearAlertClose(),this.warnings.push("使用QQ获取昵称失败: "+t)}))},handleSubmitClick(){if(wt(this.comment.content))return void this.warnings.push("评论内容不能为空");let t=Bt.comment;if((!this.configs.enableBloggerOperation||!this.bloggerComment)&&(t=Tt.comment,wt(this.comment.author))){if(!this.configs.anonymousUserName)return void this.warnings.push("评论者昵称不能为空");this.comment.author=this.configs.anonymousUserName}this.comment.postId=this.targetId,this.replyComment&&(this.comment.parentId=this.replyComment.id),t.create(this.target,this.comment).then((t=>{this.configs.enableBloggerOperation&&this.bloggerComment||(localStorage.setItem("comment-author",this.comment.author),localStorage.setItem("comment-email",this.comment.email),localStorage.setItem("comment-authorUrl",this.comment.authorUrl)),this.comment.content="",this.handleCommentCreated(t.data);try{window.onCommentSuccessEvent&&window.onCommentSuccessEvent(this.comment,this.target)}catch(e){console.error("onCommentSuccessEvent执行异常",e)}})).catch((t=>{this.handleFailedToCreateComment(t);try{window.onCommentErrorEvent&&window.onCommentErrorEvent(this.comment,t)}catch(e){console.error("onCommentErrorEvent执行异常",e)}}))},handleCommentCreated(t){this.clearAlertClose(),"PUBLISHED"===t.status?this.successes.push("评论成功,刷新即可显示最新评论!"):this.infoes.push("您的评论已经投递至博主,等待博主审核!")},handleFailedToCreateComment(t){if(this.clearAlertClose(),400===t.status){if(this.warnings.push(t.data.message),t.data){const e=t.data.data;vt(e)&&Object.keys(e).forEach((t=>{this.warnings.push(e[t])}))}}else 401===t.status&&this.warnings.push("评论失败,博主关闭了评论功能!")},handleToggleDialogEmoji(){this.emojiDialogVisible=!this.emojiDialogVisible},handleImageUpload(){if(this.imageDialogVisible||!this.configs.imageUploadApi)return;const t=document.createElement("input");t.setAttribute("type","file"),t.style.display="none",t.accept="image/*",t.addEventListener("change",(()=>{const e=t.files[0];if(!e)return;this.imageDialogVisible=!0,this.infoes.push("图片上传中,请稍后……");const n=new FormData;n.append("image",e),fetch(this.configs.imageUploadApi,{method:"POST",body:n}).then((t=>{if(this.clearAlertClose(),200!==t.status)throw new Error(`错误状态码:${t.status}, ${t.text()}`);return t.json()})).then((t=>{if(t.code&&"200"!==String(t.code)||t.status&&"200"!==String(t.status))return void this.warnings.push(`图片上传失败:${t.message?t.message:t}`);let e=t.data;this.comment.content+=`\n![${e.name}](${e.url})\n`,this.successes.push("图片上传成功!")})).catch((t=>{this.clearAlertClose(),this.warnings.push(`图片上传失败:${t}`)})).finally((()=>this.imageDialogVisible=!1))})),t.click()},handleSelectEmoji(t){this.comment.content+=`[/${t.name}]`},clearAlertClose(){this.infoes=[],this.warnings=[],this.successes=[]}}},be=ge,ye=Gt(be,dt,ht,!1,null,null,null,!0),we=ye.exports,ve=function(){var t=this,e=t._self._c;return t.comment.no<=t.replyNum?e("li",{staticClass:"comment",class:t.commentClass,attrs:{id:"li-comment-"+t.comment.id,itemprop:"comment",itemtype:"https://schema.org/Comment"}},[e("div",{ref:"comment-"+t.comment.id,staticClass:"comment-body",attrs:{id:"comment-"+t.comment.id}},[e("div",{staticClass:"avatar-body"},[t.comment.authorUrl&&""!==t.comment.authorUrl?e("a",{attrs:{href:t.comment.authorUrl,rel:"nofollow",target:"_blank"}},[e("avatar",{attrs:{src:t.avatar,author:t.comment.author,configs:t.configs}})],1):e("avatar",{attrs:{src:t.avatar,author:t.comment.author,configs:t.configs}})],1),e("div",{staticClass:"comment-main"},[e("div",{staticClass:"comment-meta"},[e("div",{staticClass:"comment-author",attrs:{itemprop:"author"}},[e("div",{staticClass:"author-meta"},[t.comment.authorUrl&&""!==t.comment.authorUrl?e("a",{staticClass:"author-name",attrs:{href:t.comment.authorUrl,rel:"noopener noreferrer nofollow",target:"_blank"}},[t._v(t._s(t.comment.author))]):e("a",{staticClass:"author-name"},[t._v(t._s(t.comment.author))]),t.comment.isAdmin?e("span",{staticClass:"is-admin"},[t._v("博主")]):t._e()]),e("div",{staticClass:"author-operation"},[e("span",{staticClass:"btn btn-primary comment-reply",on:{click:t.handleCreateComment}},[t._v(t._s(t.globalData.replyId===t.comment.id?"取消回复":"回复"))]),e("div",{staticClass:"btn comment-operation"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 200"}},[e("g",[e("circle",{attrs:{cx:"60",cy:"31.1",r:"18.4"}}),e("circle",{attrs:{cx:"60",cy:"100",r:"18.4"}}),e("circle",{attrs:{cx:"60",cy:"168.9",r:"18.4"}})])]),e("ol",{staticClass:"comment-operation-list"},["published"===t.commentStatus?e("li",{on:{click:()=>t.handleUpdateCommentStatus("RECYCLE")}},[t._v(" 回收站 ")]):t._e(),"recycle"===t.commentStatus?e("li",{on:{click:()=>t.handleUpdateCommentStatus("PUBLISHED")}},[t._v("恢复")]):t._e(),"recycle"===t.commentStatus?e("li",{on:{click:t.handleDeleteComment}},[t._v("永久删除")]):t._e()])])])]),e("div",{staticClass:"comment-info"},[e("time",{staticClass:"comment-time",attrs:{datetime:t.comment.createTime,itemprop:"datePublished"}},[t._v(t._s(t.createTimeAgo))]),t.configs.showUserAgent?e("div",{staticClass:"useragent-info"},[t._v(" "+t._s(t.compileUserAgent)+" ")]):t._e()])]),e("div",{staticClass:"markdown-body",attrs:{itemprop:"description"}},[t.parent?e("span",{staticClass:"comment-reference",on:{click:t.handleToCommentRef,mouseenter:t.handleHighlightParent,mouseleave:function(e){return t.handleHighlightParent(!1)}}},[e("a",{attrs:{href:"#comment-"+this.parent.id}},[t._v("@"+t._s(this.parent.author))])]):t._e(),e("span",{staticClass:"markdown-content",domProps:{innerHTML:t._s(t.compileContent)}})])])]),e("keep-alive",[t.globalData.replyId===t.comment.id?e("comment-editor",{attrs:{configs:t.configs,options:t.options,replyComment:t.comment,target:t.target,targetId:t.targetId}}):t._e()],1),t.comment.children?e("ul",{staticClass:"children-nodes"},[t._l(t.comment.children,(function(n){return[e("CommentNode",{key:n.id,attrs:{comment:n,configs:t.configs,replyNum:t.replyNum,isChild:!0,options:t.options,parent:n.parent,target:t.target,targetId:t.targetId}})]}))],2):t._e(),!t.isChild&&t.replyNum{}},replyNum:{type:Number,required:!0,default:10},options:{type:Object,required:!1,default:()=>{}},configs:{type:Object,required:!0}},data(){return{globalData:qt,commentStatus:"published"}},computed:{avatar(){if(!this.configs.priorityQQAvatar&&this.comment.avatar)return this.comment.avatar;const t=this.options.comment_gravatar_default,e=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${e}${this.comment.gravatarMd5}?s=256&d=${t}`},compileContent(){return pt.parse(ce(Ct(this.comment.content,this.configs.commentHtml)))},createTimeAgo(){return gt(this.comment.createTime)},compileUserAgent(){const t=new(_e());t.setUA(this.comment.userAgent);const e=t.getResult();return`(${e.browser.name} ${e.browser.version} in ${e.os.name} ${e.os.version})`},commentClass(){let t=this.isChild?" ":" index-1";return" li-comment-"+this.comment.id+t+" "+this.commentStatus}},methods:{handleToCommentRef(){const t=document.getElementById(this.targetId+"").shadowRoot;if(!t)return;const e=t.getElementById(`comment-${this.parent.id}`);e.classList.add("comment-active"),_t(e,20,(window.innerHeight||document.documentElement.clientHeight)/4,(()=>setTimeout((()=>e.classList.remove("comment-active")),500)))},handleCreateComment(){this.globalData.replyId===this.comment.id?this.globalData.replyId=0:(this.globalData.replyId=this.comment.id,this.$nextTick((()=>{const t=this.$el.querySelector(".comment-editor"),e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;(e.top<0||e.bottom>n)&&_t(t,20,n/2)})))},handleHighlightParent(t){const e=document.getElementById(this.targetId+"").shadowRoot;if(!e)return;const n=e.getElementById(`comment-${this.parent.id}`);if(n){const e=n.classList;t?e.add("comment-ref"):e.remove("comment-ref")}},handleUpdateCommentStatus(t){Bt.comment.updateStatusById(this.target,this.comment.id,t).then((()=>{this.commentStatus=t.toLowerCase(),window.alert("操作成功!")})).catch((t=>{this.handleFailedToOperationComment(t)}))},handleDeleteComment(){Bt.comment["delete"](this.target,this.comment.id).then((()=>{this.commentStatus="delete",window.alert("已删除该评论!")})).catch((t=>{this.handleFailedToOperationComment(t)}))},handleFailedToOperationComment(t){if(401===t.status)window.alert("操作失败,博主登录状态已失效!");else try{window.alert(t.data.message)}catch(e){window.alert(`操作失败:${t.status}!`)}}}},Pe=Ce,je=Gt(Pe,ve,xe,!1,null,null,null,!0),Se=je.exports,Oe=function(){var t=this,e=t._self._c;return e("div",{staticClass:"comment-loader-container"},["default"===t.configs.loadingStyle?e("div",{staticClass:"comment-loader-default"},[e("span"),e("span"),e("span"),e("span")]):"circle"===t.configs.loadingStyle?e("div",{staticClass:"comment-loader-circle"}):"balls"===t.configs.loadingStyle?e("div",{staticClass:"comment-loader-balls"},[e("div"),e("div"),e("div")]):t._e()])},Ae=[],Ne={name:"CommentLoading",props:{configs:{type:Object,required:!0}}},Ee=Ne;function Te(t){var e=n(4084);e.__inject__&&e.__inject__(t)}var $e=Gt(Ee,Oe,Ae,!1,Te,null,null,!0),Re=$e.exports,Me=function(){var t=this,e=t._self._c;return e("div",{staticClass:"comment-page"},[e("ul",{staticClass:"page"},[e("li",{staticClass:"page-item"},[e("button",{staticClass:"prev-button",class:{disabled:!t.hasPrev},on:{click:t.handlePrevClick}},[t._v("上一页")])]),null!=t.firstPage?e("li",{staticClass:"page-item",class:{active:t.page===t.firstPage}},[e("button",{class:{active:t.page===t.firstPage},on:{click:function(e){return t.handlePageItemClick(t.firstPage)}}},[t._v(" "+t._s(t.firstPage+1)+" ")])]):t._e(),e("li",{directives:[{name:"show",rawName:"v-show",value:t.hasMorePrev,expression:"hasMorePrev"}],staticClass:"page-item"},[e("span",[t._v("...")])]),t._l(t.middlePages,(function(n){return e("li",{key:n,staticClass:"page-item",class:{active:n===t.page}},[e("button",{class:{active:n===t.page},on:{click:function(e){return t.handlePageItemClick(n)}}},[t._v(" "+t._s(n+1)+" ")])])})),e("li",{directives:[{name:"show",rawName:"v-show",value:t.hasMoreNext,expression:"hasMoreNext"}],staticClass:"page-item"},[e("span",[t._v("...")])]),t.lastPage?e("li",{staticClass:"page-item",class:{active:t.page===t.lastPage}},[e("button",{class:{active:t.page===t.lastPage},on:{click:function(e){return t.handlePageItemClick(t.lastPage)}}},[t._v(" "+t._s(t.lastPage+1)+" ")])]):t._e(),e("li",{staticClass:"page-item"},[e("button",{staticClass:"next-button",class:{disabled:!t.hasNext},on:{click:t.handleNextClick}},[t._v("下一页")])])],2)])},Ie=[],Be={name:"Pagination",model:{prop:"page",event:"change"},props:{page:{type:Number,required:!1,default:0},size:{type:Number,required:!1,default:10},total:{type:Number,required:!1,default:0}},data(){return{middleSize:3}},computed:{pages(){return Math.ceil(this.total/this.size)},hasNext(){return this.page0},firstPage(){return 0===this.pages?null:0},hasMorePrev(){return!(null===this.firstPage||this.pages<=this.middleSize+2)&&this.page>=2+this.middleSize/2},hasMoreNext(){return!(null===this.lastPage||this.pages<=this.middleSize+2)&&this.page=this.lastPage-t-1&&(n=this.lastPage-1,e=n-this.middleSize+1),this.range(e,n+1)},lastPage(){return 0===this.pages||1===this.pages?0:this.pages-1}},methods:{handleNextClick(){this.hasNext&&this.$emit("change",this.page+1)},handlePrevClick(){this.hasPrev&&this.$emit("change",this.page-1)},handlePageItemClick(t){this.$emit("change",t)},range(t,e){if(t>=e)return[];const n=[];for(let r=t;rn.click=!0,mouseenter:()=>n.stop=!0,mouseleave:()=>t.handleMouseleave(n)}},[n.click?[e("div",{staticClass:"comment-meta"},[e("avatar",{key:n.id,attrs:{src:t.avatar(n),author:n.author,configs:t.configs}}),e("div",{staticClass:"comment-author"},[e("div",{staticClass:"author-meta"},[n.authorUrl&&""!==n.authorUrl?e("a",{staticClass:"author-name",attrs:{href:n.authorUrl,rel:"noopener noreferrer nofollow",target:"_blank"}},[t._v(t._s(n.author))]):e("a",{staticClass:"author-name"},[t._v(t._s(n.author))]),n.isAdmin?e("span",{staticClass:"is-admin"},[t._v("博主")]):t._e()]),e("time",{staticClass:"comment-time",attrs:{datetime:n.createTime,itemprop:"datePublished"}},[t._v(t._s(t.createTimeAgo(n.createTime)))])])],1),e("span",{staticClass:"markdown-content",domProps:{innerHTML:t._s(n.content)}})]:[e("avatar",{key:n.id,attrs:{src:t.avatar(n),author:n.author,configs:t.configs}}),e("p",{staticClass:"comment-content",domProps:{innerHTML:t._s(n.summary)}})]],2):t._e()]}))],2)},Fe=[],He={name:"BulletScreen",components:{Avatar:fe},data(){return{loaded:!1,comments:[]}},props:{target:{type:String,required:!1,default:"posts",validator:function(t){return-1!==["posts","sheets","journals"].indexOf(t)}},id:{type:Number,required:!1,default:0},options:{type:Object,required:!1,default:()=>{}},configs:{type:Object,required:!0},stopBulletScreen:{type:Boolean,required:!0}},created(){window.innerHeight>500&&window.innerWidth>768&&(this.handleGetComments(),this.bulletScreenAnimate())},methods:{handleMouseleave(t){t.click=!1,t.stop=!1},createTimeAgo(t){return gt(t)},avatar(t){if(!this.configs.priorityQQAvatar&&t.avatar)return t.avatar;const e=this.options.comment_gravatar_default,n=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${n}${t.gravatarMd5}?s=256&d=${e}`},async handleGetComments(){let t=0;while(1){const{data:e}=await Tt.comment.listTopComments(this.target,this.id,{page:t++});let n=100*e.content.length;for(let t of e.content){let e=pt.parse(Ct(t.content,this.configs.commentHtml));t.summary=ce(jt(e)),t.content=ce(e),t.top=St(50,window.innerHeight-350),t.startTime=St(0,n),t.speed=St(.5,3),this.$set(t,"style",{top:t.top+"px"}),this.$set(t,"stop",!1),this.$set(t,"click",!1)}if(this.comments.push(...e.content),!e.hasNext)break}this.loaded=!0},bulletScreenAnimate(){const t=document.getElementById(this.id+"").shadowRoot;let e,n=this;function r(){let t=window.innerWidth,r=window.innerHeight-350;if(r<50)return n.comments.splice(0,n.comments.length),void window.cancelAnimationFrame(e);for(let e=n.comments.length-1;e>=0;e--){let i=n.comments[e];i.stop||(i.startTime<=0?(i.left=i.left?i.left-i.speed:t,n.$set(i.style,"left",i.left+"px"),i.top>r&&(i.top=St(50,r),n.$set(i.style,"top",i.top+"px"))):i.startTime-=1,i.left<-420&&n.comments.splice(e,1))}}function i(){t&&t.getElementById("halo-comment")&&t.getElementById("halo-comment").getAttribute("stop-bullet-screen")?n.stopBulletScreen||(n.stopBulletScreen=!0,n.$emit("update:stopBulletScreen",!0)):(n.stopBulletScreen&&(n.stopBulletScreen=!1,n.$emit("update:stopBulletScreen",!1)),r()),n.loaded&&0===n.comments.length?window.cancelAnimationFrame(e):e=window.requestAnimationFrame(i)}e=window.requestAnimationFrame(i)}}},Ve=He;function We(t){var e=n(9862);e.__inject__&&e.__inject__(t)}var Ze=Gt(Ve,Le,Fe,!1,We,null,null,!0),Qe=Ze.exports;const Ye={CommentEditor:we,CommentNode:Se,CommentLoading:Re,Pagination:qe,BulletScreen:Qe},Ge={};Object.keys(Ye).forEach((t=>{Ge[t]=o().component(t,Ye[t])})),pt.use({renderer:{listitem(t,e){return`${t} `},image(t,e,n){return` `},link(t,e,n){return`${n} `}},breaks:!0});const Je={autoLoad:!0,showUserAgent:!0,priorityQQAvatar:!1,getQQInfo:!1,commentHtml:!1,loadingStyle:"default",unfoldReplyNum:10,night:!1,replyDescSoft:!1,enableImageUpload:!1,enableBulletScreen:!1,imageUploadApi:void 0,anonymousUserName:void 0,enableBloggerOperation:!1,avatarLoading:"https://unpkg.com/halo-comment-dream@1.1.0/dist/assets/img/loading.svg",defaultAvatar:"https://unpkg.com/halo-comment-dream@1.1.0/dist/assets/img/avatar.svg"};var Xe={name:"Comment",props:{id:{type:Number,required:!1,default:0},type:{type:String,required:!1,default:"post",validator:function(t){return-1!==["post","sheet","journal"].indexOf(t)}},configs:{type:[Object,String],required:!1,default:()=>Je}},data(){return{list:{data:[],loading:!1,loaded:!1,params:{page:0},pages:0,total:0,size:10},options:void 0,globalData:qt,stopBulletScreen:localStorage&&"true"===localStorage.getItem("stop-bullet-screen")||!1}},computed:{target(){return`${this.type}s`},mergedConfigs(){let t={};return"[object String]"===Object.prototype.toString.call(this.configs)&&(t=JSON.parse(this.configs)),Je["night"]=localStorage&&"true"===localStorage.getItem("night")||!1,Object.assign(Je,t)}},created(){this.handleGetOptions(),this.mergedConfigs.autoLoad&&this.handleGetComments()},methods:{async handleGetComments(){this.list.loading=!0;const{data:t}=await Tt.comment.listAsTreeView(this.target,this.id,this.list.params);t.content&&(t.content=this.flatReplyList(t.content))&&t.content.forEach((t=>t["replyCount"]=this.handleReplyList(t))),this.list.data=t.content,this.list.total=t.total,this.list.pages=t.pages,this.list.size=t.rpp,this.list.loading=!1,this.list.loaded=!0,this.globalData.replyId=0},async handleGetOptions(){if(this.mergedConfigs.enableBloggerOperation)try{const{data:t}=await Bt.user.getProfile();this.globalData.blogger=t}catch(e){this.mergedConfigs.enableBloggerOperation=!1}const{data:t}=await Tt.option.comment();this.options=t,this.mergedConfigs.priorityQQAvatar&&(this.options.gravatar_source="https://cravatar.cn/avatar/")},flatReplyList(t){let e=this.mergedConfigs.replyDescSoft,n=function(t,n){return e?n.createTime-t.createTime:t.createTime-n.createTime};for(let r of t)if(r.children){let t=r.children;t.forEach((t=>t.parent=r));for(let e=0;e{e.parent=n,t.push(e)})),n.children=null)}r.children.sort(n)}return t},handleReplyList(t,e=0){return t["no"]=e,t.children&&t.children.forEach((t=>e=this.handleReplyList(t,e+1))),e},handlePaginationChange(t){this.list.params.page=t,this.handleGetComments()}}},Ke=Xe;function tn(t){var e=n(618);e.__inject__&&e.__inject__(t)}var en=Gt(Ke,k,_,!1,tn,null,null,!0),nn=en.exports;window.customElements.define("halo-comment",x(o(),nn))}()})();
\ No newline at end of file
+t.exports=function(t){return null!=t&&(e(t)||n(t)||!!t._isBuffer)}},9575:function(t,e,n){(function(e,n){t.exports=n()})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g&&n.g,(function(){"use strict";var t="3.7.5",e=t,n="function"===typeof atob,r="function"===typeof btoa,i="function"===typeof Buffer,o="function"===typeof TextDecoder?new TextDecoder:void 0,a="function"===typeof TextEncoder?new TextEncoder:void 0,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(s),c=function(t){var e={};return t.forEach((function(t,n){return e[t]=n})),e}(l),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,p=String.fromCharCode.bind(String),d="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){return new Uint8Array(Array.prototype.slice.call(t,0))},h=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},m=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},f=function(t){for(var e,n,r,i,o="",a=t.length%3,s=0;s255||(r=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,o+=l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}return a?o.slice(0,a-3)+"===".substring(a):o},g=r?function(t){return btoa(t)}:i?function(t){return Buffer.from(t,"binary").toString("base64")}:f,b=i?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=4096,n=[],r=0,i=t.length;r>>6)+p(128|63&e):p(224|e>>>12&15)+p(128|e>>>6&63)+p(128|63&e)}e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return p(240|e>>>18&7)+p(128|e>>>12&63)+p(128|e>>>6&63)+p(128|63&e)},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(t){return t.replace(v,w)},k=i?function(t){return Buffer.from(t,"utf8").toString("base64")}:a?function(t){return b(a.encode(t))}:function(t){return g(x(t))},_=function(t,e){return void 0===e&&(e=!1),e?h(k(t)):k(t)},C=function(t){return _(t,!0)},P=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,j=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return p(55296+(n>>>10))+p(56320+(1023&n));case 3:return p((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return p((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},S=function(t){return t.replace(P,j)},O=function(t){if(t=t.replace(/\s+/g,""),!u.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,r,i="",o=0;o>16&255):64===r?p(e>>16&255,e>>8&255):p(e>>16&255,e>>8&255,255&e);return i},A=n?function(t){return atob(m(t))}:i?function(t){return Buffer.from(t,"base64").toString("binary")}:O,N=i?function(t){return d(Buffer.from(t,"base64"))}:function(t){return d(A(t).split("").map((function(t){return t.charCodeAt(0)})))},E=function(t){return N($(t))},T=i?function(t){return Buffer.from(t,"base64").toString("utf8")}:o?function(t){return o.decode(N(t))}:function(t){return S(A(t))},$=function(t){return m(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))},R=function(t){return T($(t))},I=function(t){if("string"!==typeof t)return!1;var e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},M=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}},B=function(){var t=function(t,e){return Object.defineProperty(String.prototype,t,M(e))};t("fromBase64",(function(){return R(this)})),t("toBase64",(function(t){return _(this,t)})),t("toBase64URI",(function(){return _(this,!0)})),t("toBase64URL",(function(){return _(this,!0)})),t("toUint8Array",(function(){return E(this)}))},z=function(){var t=function(t,e){return Object.defineProperty(Uint8Array.prototype,t,M(e))};t("toBase64",(function(t){return y(this,t)})),t("toBase64URI",(function(){return y(this,!0)})),t("toBase64URL",(function(){return y(this,!0)}))},D=function(){B(),z()},U={version:t,VERSION:e,atob:A,atobPolyfill:O,btoa:g,btoaPolyfill:f,fromBase64:R,toBase64:_,encode:_,encodeURI:C,encodeURL:C,utob:x,btou:S,decode:R,isValid:I,fromUint8Array:y,toUint8Array:E,extendString:B,extendUint8Array:z,extendBuiltins:D,Base64:{}};return Object.keys(U).forEach((function(t){return U.Base64[t]=U[t]})),U}))},2568:function(t,e,n){(function(){var e=n(1012),r=n(487).utf8,i=n(8738),o=n(487).bin,a=function(t,n){t.constructor==String?t=n&&"binary"===n.encoding?o.stringToBytes(t):r.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var s=e.bytesToWords(t),l=8*t.length,c=1732584193,u=-271733879,p=-1732584194,d=271733878,h=0;h>>24)|4278255360&(s[h]<<24|s[h]>>>8);s[l>>>5]|=128<>>9<<4)]=l;var m=a._ff,f=a._gg,g=a._hh,b=a._ii;for(h=0;h>>0,u=u+w>>>0,p=p+v>>>0,d=d+x>>>0}return e.endian([c,u,p,d])};a._ff=function(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+(i>>>0)+a;return(s<>>32-o)+e},a._gg=function(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+(i>>>0)+a;return(s<>>32-o)+e},a._hh=function(t,e,n,r,i,o,a){var s=t+(e^n^r)+(i>>>0)+a;return(s<>>32-o)+e},a._ii=function(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+(i>>>0)+a;return(s<>>32-o)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,n){if(void 0===t||null===t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(a(t,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):e.bytesToHex(r)}})()},631:function(t,e,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"===typeof l.get?l.get:null,u=s&&Set.prototype.forEach,p="function"===typeof WeakMap&&WeakMap.prototype,d=p?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype,m=h?WeakSet.prototype.has:null,f="function"===typeof WeakRef&&WeakRef.prototype,g=f?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,y=Object.prototype.toString,w=Function.prototype.toString,v=String.prototype.match,x=String.prototype.slice,k=String.prototype.replace,_=String.prototype.toUpperCase,C=String.prototype.toLowerCase,P=RegExp.prototype.test,j=Array.prototype.concat,S=Array.prototype.join,O=Array.prototype.slice,A=Math.floor,N="function"===typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,T="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,$="function"===typeof Symbol&&"object"===typeof Symbol.iterator,R="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$||"symbol")?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,M=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function B(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||P.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof t){var r=t<0?-A(-t):A(t);if(r!==t){var i=String(r),o=x.call(e,i.length+1);return k.call(i,n,"$&_")+"."+k.call(k.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return k.call(e,n,"$&_")}var z=n(4654),D=z.custom,U=J(D)?D:null;function q(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function L(t){return k.call(String(t),/"/g,""")}function F(t){return"[object Array]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function H(t){return"[object Date]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function V(t){return"[object RegExp]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function W(t){return"[object Error]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function Z(t){return"[object String]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function Q(t){return"[object Number]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function Y(t){return"[object Boolean]"===tt(t)&&(!R||!("object"===typeof t&&R in t))}function J(t){if($)return t&&"object"===typeof t&&t instanceof Symbol;if("symbol"===typeof t)return!0;if(!t||"object"!==typeof t||!T)return!1;try{return T.call(t),!0}catch(e){}return!1}function G(t){if(!t||"object"!==typeof t||!N)return!1;try{return N.call(t),!0}catch(e){}return!1}t.exports=function t(e,n,r,i){var s=n||{};if(K(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!K(s,"customInspect")||s.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=s.numericSeparator;if("undefined"===typeof e)return"undefined";if(null===e)return"null";if("boolean"===typeof e)return e?"true":"false";if("string"===typeof e)return ct(e,s);if("number"===typeof e){if(0===e)return 1/0/e>0?"0":"-0";var d=String(e);return p?B(e,d):d}if("bigint"===typeof e){var h=String(e)+"n";return p?B(e,h):h}var m="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof r&&(r=0),r>=m&&m>0&&"object"===typeof e)return F(e)?"[Array]":"[Object]";var f=ft(s,r);if("undefined"===typeof i)i=[];else if(nt(i,e)>=0)return"[Circular]";function g(e,n,o){if(n&&(i=O.call(i),i.push(n)),o){var a={depth:s.depth};return K(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,i)}return t(e,s,r+1,i)}if("function"===typeof e&&!V(e)){var y=et(e),w=bt(e,g);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(w.length>0?" { "+S.call(w,", ")+" }":"")}if(J(e)){var v=$?k.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(e);return"object"!==typeof e||$?v:pt(v)}if(lt(e)){for(var _="<"+C.call(String(e.nodeName)),P=e.attributes||[],A=0;A",e.childNodes&&e.childNodes.length&&(_+="..."),_+=""+C.call(String(e.nodeName))+">",_}if(F(e)){if(0===e.length)return"[]";var E=bt(e,g);return f&&!mt(E)?"["+gt(E,f)+"]":"[ "+S.call(E,", ")+" ]"}if(W(e)){var D=bt(e,g);return"cause"in Error.prototype||!("cause"in e)||I.call(e,"cause")?0===D.length?"["+String(e)+"]":"{ ["+String(e)+"] "+S.call(D,", ")+" }":"{ ["+String(e)+"] "+S.call(j.call("[cause]: "+g(e.cause),D),", ")+" }"}if("object"===typeof e&&l){if(U&&"function"===typeof e[U]&&z)return z(e,{depth:m-r});if("symbol"!==l&&"function"===typeof e.inspect)return e.inspect()}if(rt(e)){var X=[];return a&&a.call(e,(function(t,n){X.push(g(n,e,!0)+" => "+g(t,e))})),ht("Map",o.call(e),X,f)}if(at(e)){var ut=[];return u&&u.call(e,(function(t){ut.push(g(t,e))})),ht("Set",c.call(e),ut,f)}if(it(e))return dt("WeakMap");if(st(e))return dt("WeakSet");if(ot(e))return dt("WeakRef");if(Q(e))return pt(g(Number(e)));if(G(e))return pt(g(N.call(e)));if(Y(e))return pt(b.call(e));if(Z(e))return pt(g(String(e)));if(!H(e)&&!V(e)){var yt=bt(e,g),wt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,vt=e instanceof Object?"":"null prototype",xt=!wt&&R&&Object(e)===e&&R in e?x.call(tt(e),8,-1):vt?"Object":"",kt=wt||"function"!==typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"",_t=kt+(xt||vt?"["+S.call(j.call([],xt||[],vt||[]),": ")+"] ":"");return 0===yt.length?_t+"{}":f?_t+"{"+gt(yt,f)+"}":_t+"{ "+S.call(yt,", ")+" }"}return String(e)};var X=Object.prototype.hasOwnProperty||function(t){return t in this};function K(t,e){return X.call(t,e)}function tt(t){return y.call(t)}function et(t){if(t.name)return t.name;var e=v.call(w.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function nt(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return ct(x.call(t,0,e.maxStringLength),e)+r}var i=k.call(k.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ut);return q(i,"single",e)}function ut(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+_.call(e.toString(16))}function pt(t){return"Object("+t+")"}function dt(t){return t+" { ? }"}function ht(t,e,n,r){var i=r?gt(n,r):S.call(n,", ");return t+" ("+e+") {"+i+"}"}function mt(t){for(var e=0;e=0)return!1;return!0}function ft(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"===typeof t.indent&&t.indent>0))return null;n=S.call(Array(t.indent+1)," ")}return{base:n,prev:S.call(Array(e+1),n)}}function gt(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+S.call(t,","+n)+"\n"+e.prev}function bt(t,e){var n=F(t),r=[];if(n){r.length=t.length;for(var i=0;i-1?t.split(","):t},c="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",p=function(t,e){var n,p={},d=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,m=d.split(e.delimiter,h),f=-1,g=e.charset;if(e.charsetSentinel)for(n=0;n-1&&(y=o(y)?[y]:y),i.call(p,b)?p[b]=r.combine(p[b],y):p[b]=y}return p},d=function(t,e,n,r){for(var i=r?e:l(e,n),o=t.length-1;o>=0;--o){var a,s=t[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[],a[u]=i):"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i},h=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=n.depth>0&&a.exec(o),c=l?o.slice(0,l.index):o,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}var p=0;while(n.depth>0&&null!==(l=s.exec(o))&&p0?P.join(",")||null:void 0}];else if(l(h))R=h;else{var M=Object.keys(P);R=b?M.sort(b):M}for(var B=a&&l(P)&&1===P.length?n+"[]":n,z=0;z0?v+w:""}},2769:function(t,e,n){"use strict";var r=n(5798),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t){while(t.length>1){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},h=function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function l(t,e){return function(n,r){e(n,r,t)}}function c(t,e,n,r,i,o){function a(t){if(void 0!==t&&"function"!==typeof t)throw new TypeError("Function expected");return t}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!e&&t?r["static"]?t:t.prototype:null,p=e||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(t||null))};var g=(0,n[h])("accessor"===l?{get:p.get,set:p.set}:p[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!==typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(p.get=s),(s=a(g.set))&&(p.set=s),(s=a(g.init))&&i.push(s)}else(s=a(g))&&("field"===l?i.push(s):p[c]=s)}u&&Object.defineProperty(u,r.name,p),d=!0}function u(t,e,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{while((void 0===e||e-- >0)&&!(r=o.next()).done)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{l(i[t](e))}catch(n){p(o[0][3],n)}}function l(t){t.value instanceof _?Promise.resolve(t.value.v).then(c,u):p(o[0][2],t)}function c(t){s("next",t)}function u(t){s("throw",t)}function p(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function P(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:_(t[r](e)),done:!1}:i?i(e):e}:i}}function j(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"===typeof y?y(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){e=t[n](e),i(r,o,e.done,e.value)}))}}function i(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var O=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t["default"]=e};function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&g(e,t,n);return O(e,t),e}function N(t){return t&&t.__esModule?t:{default:t}}function E(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function T(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function $(t,e){if(null===e||"object"!==typeof e&&"function"!==typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof t?e===t:t.has(e)}},2238:function(t,e,n){var r;(function(i,o){"use strict";var a="0.7.34",s="",l="?",c="function",u="undefined",p="object",d="string",h="major",m="model",f="name",g="type",b="vendor",y="version",w="architecture",v="console",x="mobile",k="tablet",_="smarttv",C="wearable",P="embedded",j=350,S="Amazon",O="Apple",A="ASUS",N="BlackBerry",E="Browser",T="Chrome",$="Edge",R="Firefox",I="Google",M="Huawei",B="LG",z="Microsoft",D="Motorola",U="Opera",q="Samsung",L="Sharp",F="Sony",H="Xiaomi",V="Zebra",W="Facebook",Z="Chromium OS",Q="Mac OS",Y=function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2===0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},J=function(t){for(var e={},n=0;n0?2===a.length?typeof a[1]==c?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==c||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o}u+=2}},nt=function(t,e){for(var n in e)if(typeof e[n]===p&&e[n].length>0){for(var r=0;r2&&(t[m]="iPad",t[g]=k),t},this.getEngine=function(){var t={};return t[f]=o,t[y]=o,et.call(t,r,l.engine),t},this.getOS=function(){var t={};return t[f]=o,t[y]=o,et.call(t,r,l.os),!t[f]&&a&&"Unknown"!=a.platform&&(t[f]=a.platform.replace(/chrome os/i,Z).replace(/macos/i,Q)),t},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(t){return r=typeof t===d&&t.length>j?tt(t,j):t,this},this.setUA(r),this};at.VERSION=a,at.BROWSER=J([f,y,h]),at.CPU=J([w]),at.DEVICE=J([m,b,g,v,x,_,k,C,P]),at.ENGINE=at.OS=J([f,y]),typeof e!==u?("object"!==u&&t.exports&&(e=t.exports=at),e.UAParser=at):"function"===c&&n.amdO?(r=function(){return at}.call(e,n,e,t),r===o||(t.exports=r)):typeof i!==u&&(i.UAParser=at);var st=typeof i!==u&&(i.jQuery||i.Zepto);if(st&&!st.ua){var lt=new at;st.ua=lt.getResult(),st.ua.get=function(){return lt.getUA()},st.ua.set=function(t){lt.setUA(t);var e=lt.getResult();for(var n in e)st.ua[n]=e[n]}}})("object"===typeof window?window:this)},8978:function(t,e,n){var r=n(2224);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("72b9c1de",r,t)}},2343:function(t,e,n){var r=n(3409);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("0e1b6146",r,t)}},3484:function(t,e,n){var r=n(3782);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("61b8b884",r,t)}},8197:function(t,e,n){var r=n(6729);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("34c62594",r,t)}},4754:function(t,e,n){var r=n(272);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals);var i=n(2339).Z;t.exports.__inject__=function(t){i("424b67c8",r,t)}},2339:function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},i=0;it.replace(a,((t,e)=>e?e.toUpperCase():"")),l=/\B([A-Z])/g,c=t=>t.replace(l,"-$1").toLowerCase();function u(t){const e={};return t.forEach((t=>{e[t]=void 0})),e}function p(t,e,n){t[e]=[].concat(t[e]||[]),t[e].unshift(n)}function d(t,e){if(t){const n=t.$options[e]||[];n.forEach((e=>{e.call(t)}))}}function h(t,e){return new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:e})}const m=t=>/function Boolean/.test(String(t)),f=t=>/function Number/.test(String(t));function g(t,e,{type:n}={}){if(m(n))return"true"===t||"false"===t?"true"===t:""===t||t===e||null!=t||t;if(f(n)){const e=parseFloat(t,10);return isNaN(e)?t:e}return t}function b(t,e){const n=[];for(let r=0,i=e.length;r(t[e]=l[n[r]],t)),{}),p(e,"beforeCreate",(function(){const t=this.$emit;this.$emit=(e,...n)=>(this.$root.$options.customElement.dispatchEvent(h(e,n)),t.call(this,e,...n))})),p(e,"created",(function(){i.forEach((t=>{this.$root.props[t]=this[t]}))})),i.forEach((t=>{Object.defineProperty(f.prototype,t,{get(){return this._wrapper.props[t]},set(e){this._wrapper.props[t]=e},enumerable:!1,configurable:!0})})),a=!0}function m(t,e){const n=s(e),r=t.hasAttribute(e)?t.getAttribute(e):void 0;t._wrapper.props[n]=g(r,e,o[n])}class f extends HTMLElement{constructor(){const n=super();n.attachShadow({mode:"open"});const r=n._wrapper=new t({name:"shadow-root",customElement:n,shadowRoot:n.shadowRoot,data(){return{props:{},slotChildren:[]}},render(t){return t(e,{ref:"inner",props:this.props},this.slotChildren)}}),i=new MutationObserver((t=>{let e=!1;for(let r=0;r{t.props=u(i),r.forEach((t=>{m(this,t)}))};a?n():e().then((t=>{(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t),n()})),t.slotChildren=Object.freeze(b(t.$createElement,this.childNodes)),t.$mount(),this.shadowRoot.appendChild(t.$el)}}disconnectedCallback(){d(this.vueComponent,"deactivated")}}return n||l(e),f}var x=v,k=(n(3645),function(){var t=this,e=t._self._c;return void 0!==t.options?e("div",{staticClass:"halo-comment",class:t.mergedConfigs.night?"night":"",attrs:{id:"halo-comment","stop-bullet-screen":t.stopBulletScreen}},[e("keep-alive",[e("comment-editor",{attrs:{configs:t.mergedConfigs,options:t.options,target:t.target,targetId:t.id}})],1),t.mergedConfigs.autoLoad||t.list.loaded?t._e():e("div",{staticClass:"load-comment"},[e("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.handleGetComments}},[t._v("加载评论")])]),t.list.loaded?e("div",{staticClass:"comment-action"},[e("h3",{staticClass:"comment-title"},[t._v(t._s(t.list.total)+" 条评论")]),e("div",{staticClass:"comment-operation"},[t.mergedConfigs.enableBulletScreen?e("span",{staticClass:"comment-bullet-screen",class:t.stopBulletScreen?"":"operation-open",on:{click:function(e){t.stopBulletScreen=!t.stopBulletScreen}}},[t._v("弹")]):t._e(),e("svg",{staticClass:"comment-refresh",attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(e){return t.handlePaginationChange(0)}}},[e("path",{attrs:{d:"M55.935033 264.48948c0 0 85.897017-132.548409 221.81443-203.673173 135.916406-71.121743 303.368504-50.646859 413.187968 18.319527 109.819465 68.970415 146.791894 127.160016 146.791894 127.160016l94.59499-53.879895c0 0 19.576483-9.697092 19.576483 12.932142l0 338.379961c0 0 0 30.17399-22.837719 19.395191-19.210878-9.062571-226.959086-127.198289-292.424528-164.466828-35.950145-16.035251-4.365101-29.062068-4.365101-29.062068l91.284402-52.173738c0 0-52.068992-65.209619-128.278989-99.744682-81.576231-42.501826-157.948384-47.541735-251.497925-12.224097-61.002644 23.025054-132.823368 81.988166-184.553949 169.082716L55.935033 264.48948 55.935033 264.48948 55.935033 264.48948zM904.056909 711.697844c0 0-85.897017 132.550423-221.816444 203.671159-135.917413 71.12275-303.366489 50.651895-413.186961-18.315498-109.825508-68.972429-146.790886-127.165052-146.790886-127.165052L27.662591 823.768348c0 0-19.572454 9.703135-19.572454-12.932142L8.090137 472.459267c0 0 0-30.170968 22.831676-19.397205 19.211885 9.067607 226.965129 127.198289 292.430571 164.470856 35.950145 16.035251 4.366109 29.058039 4.366109 29.058039l-91.285409 52.175753c0 0 52.071006 65.206598 128.279996 99.744682 81.57321 42.498804 157.942341 47.540728 251.496918 12.222082 60.998616-23.026061 132.820346-81.983131 184.546898-169.082716L904.056909 711.697844 904.056909 711.697844 904.056909 711.697844zM904.056909 711.697844"}})])])]):t._e(),e("comment-loading",{directives:[{name:"show",rawName:"v-show",value:t.list.loading,expression:"list.loading"}],attrs:{configs:t.mergedConfigs}}),t.list.data.length>=1?e("ul",{staticClass:"comment-nodes"},[t._l(t.list.data,(function(n){return[e("CommentNode",{key:n.id,attrs:{comment:n,replyNum:t.mergedConfigs.unfoldReplyNum,configs:t.mergedConfigs,options:t.options,target:t.target,targetId:t.id}})]}))],2):t.list.loaded&&!t.list.loading?e("div",{staticClass:"comment-empty"},[t._v("暂无评论")]):t._e(),t.list.pages>1?e("pagination",{attrs:{page:t.list.params.page,size:t.list.size,total:t.list.total},on:{change:t.handlePaginationChange}}):t._e(),t.mergedConfigs.enableBulletScreen?e("bullet-screen",{attrs:{target:t.target,id:t.id,configs:t.mergedConfigs,options:t.options,"stop-bullet-screen":t.stopBulletScreen},on:{"update:stopBulletScreen":function(e){t.stopBulletScreen=e},"update:stop-bullet-screen":function(e){t.stopBulletScreen=e}}}):t._e()],1):t._e()}),_=[];n(7658);function C(){return{async:!1,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,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let P=C();function j(t){P=t}const S=/[&<>"']/,O=new RegExp(S.source,"g"),A=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,N=new RegExp(A.source,"g"),E={"&":"&","<":"<",">":">",'"':""","'":"'"},T=t=>E[t];function $(t,e){if(e){if(S.test(t))return t.replace(O,T)}else if(A.test(t))return t.replace(N,T);return t}const R=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function I(t){return t.replace(R,((t,e)=>(e=e.toLowerCase(),"colon"===e?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")))}const M=/(^|[^\[])\^/g;function B(t,e){t="string"===typeof t?t:t.source,e=e||"";const n={replace:(e,r)=>(r=r.source||r,r=r.replace(M,"$1"),t=t.replace(e,r),n),getRegex:()=>new RegExp(t,e)};return n}const z=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function U(t,e,n){if(t){let t;try{t=decodeURIComponent(I(n)).replace(z,"").toLowerCase()}catch(r){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!D.test(n)&&(n=V(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const q={},L=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,H=/^([^:]+:\/*[^/]*)[\s\S]*$/;function V(t,e){q[" "+t]||(L.test(t)?q[" "+t]=t+"/":q[" "+t]=Y(t,"/",!0)),t=q[" "+t];const n=-1===t.indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(F,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(H,"$1")+e:t+e}const W={exec:function(){}};function Z(t){let e,n,r=1;for(;r{let r=!1,i=e;while(--i>=0&&"\\"===n[i])r=!r;return r?"|":" |"})),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else while(r.length1)1&e&&(n+=t),e>>=1,t+=t;return n+t}function K(t,e,n,r){const i=e.href,o=e.title?$(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){r.state.inLink=!0;const t={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,t}return{type:"image",raw:n,href:i,title:o,text:$(a)}}function tt(t,e){const n=t.match(/^(\s+)(?:```)/);if(null===n)return e;const r=n[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[n]=e;return n.length>=r.length?t.slice(r.length):t})).join("\n")}class et{constructor(t){this.options=t||P}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Y(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=tt(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline._escapes,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=Y(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const t=e[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(t);return this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:r,text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n,r,i,o,a,s,l,c,u,p,d,h,m=e[1].trim();const f=m.length>1,g={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=f?m:"[*+-]");const b=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);while(t){if(h=!1,!(e=b.exec(t)))break;if(this.rules.block.hr.test(t))break;if(n=e[0],t=t.substring(n.length),c=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),u=t.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=e[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=e[1].length),s=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",t=t.substring(u.length+1),h=!0),!h){const e=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);while(t){if(p=t.split("\n",1)[0],u=p,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(u))break;if(a.test(u))break;if(e.test(u))break;if(r.test(t))break;if(u.search(/[^ ]/)>=o||!u.trim())d+="\n"+u.slice(o);else{if(s)break;if(c.search(/[^ ]/)>=4)break;if(i.test(c))break;if(a.test(c))break;if(r.test(c))break;d+="\n"+u}s||u.trim()||(s=!0),n+=p+"\n",t=t.substring(p.length+1),c=u.slice(o)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d),r&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const y=g.items.length;for(a=0;a"space"===t.type)),e=t.length>0&&t.some((t=>/\n.*\n/.test(t.raw)));g.loose=e}if(g.loose)for(a=0;a$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(e){const t={type:"table",header:Q(e[1]).map((t=>({text:t}))),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];let n,r,i,o,a=t.align.length;for(n=0;n({text:t})));for(a=t.header.length,r=0;r /i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):$(e[0]):e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=Y(t.slice(0,-1),"\\");if((t.length-e.length)%2===0)return}else{const t=J(e[2],"()");if(t>-1){const n=0===e[0].indexOf("!")?5:4,r=n+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^$/.test(t)?n.slice(1):n.slice(1,-1)),K(e,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(/\s+/g," ");if(t=e[t.toLowerCase()],!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return K(n,t,n[0],this.lexer)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrong.lDelim.exec(t);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let i,o,a=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;l.lastIndex=0,e=e.slice(-1*t.length+n);while(null!=(r=l.exec(e))){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=i.length,r[3]||r[4]){a+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);const e=t.slice(0,n+r.index+(r[0].length-i.length)+o);if(Math.min(n,o)%2){const t=e.slice(1,-1);return{type:"em",raw:e,text:t,tokens:this.lexer.inlineTokens(t)}}const l=e.slice(2,-2);return{type:"strong",raw:e,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const n=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return n&&r&&(t=t.substring(1,t.length-1)),t=$(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t,e){const n=this.rules.inline.autolink.exec(t);if(n){let t,r;return"@"===n[2]?(t=$(this.options.mangle?e(n[1]):n[1]),r="mailto:"+t):(t=$(n[1]),r=t),{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t,e){let n;if(n=this.rules.inline.url.exec(t)){let t,r;if("@"===n[2])t=$(this.options.mangle?e(n[0]):n[0]),r="mailto:"+t;else{let e;do{e=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(e!==n[0]);t=$(n[0]),r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t,e){const n=this.rules.inline.text.exec(t);if(n){let t;return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):$(n[0]):n[0]:$(this.options.smartypants?e(n[0]):n[0]),{type:"text",raw:n[0],text:t}}}}const nt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:W,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};nt.def=B(nt.def).replace("label",nt._label).replace("title",nt._title).getRegex(),nt.bullet=/(?:[*+-]|\d{1,9}[.)])/,nt.listItemStart=B(/^( *)(bull) */).replace("bull",nt.bullet).getRegex(),nt.list=B(nt.list).replace(/bull/g,nt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+nt.def.source+")").getRegex(),nt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",nt._comment=/|$)/,nt.html=B(nt.html,"i").replace("comment",nt._comment).replace("tag",nt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nt.paragraph=B(nt._paragraph).replace("hr",nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nt._tag).getRegex(),nt.blockquote=B(nt.blockquote).replace("paragraph",nt.paragraph).getRegex(),nt.normal=Z({},nt),nt.gfm=Z({},nt.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),nt.gfm.table=B(nt.gfm.table).replace("hr",nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nt._tag).getRegex(),nt.gfm.paragraph=B(nt._paragraph).replace("hr",nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",nt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",nt._tag).getRegex(),nt.pedantic=Z({},nt.normal,{html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",nt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:W,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:B(nt.normal._paragraph).replace("hr",nt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",nt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const rt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:W,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+=""+n+";";return r}rt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",rt.punctuation=B(rt.punctuation).replace(/punctuation/g,rt._punctuation).getRegex(),rt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,rt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,rt._comment=B(nt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),rt.emStrong.lDelim=B(rt.emStrong.lDelim).replace(/punct/g,rt._punctuation).getRegex(),rt.emStrong.rDelimAst=B(rt.emStrong.rDelimAst,"g").replace(/punct/g,rt._punctuation).getRegex(),rt.emStrong.rDelimUnd=B(rt.emStrong.rDelimUnd,"g").replace(/punct/g,rt._punctuation).getRegex(),rt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,rt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,rt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,rt.autolink=B(rt.autolink).replace("scheme",rt._scheme).replace("email",rt._email).getRegex(),rt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,rt.tag=B(rt.tag).replace("comment",rt._comment).replace("attribute",rt._attribute).getRegex(),rt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,rt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,rt.link=B(rt.link).replace("label",rt._label).replace("href",rt._href).replace("title",rt._title).getRegex(),rt.reflink=B(rt.reflink).replace("label",rt._label).replace("ref",nt._label).getRegex(),rt.nolink=B(rt.nolink).replace("ref",nt._label).getRegex(),rt.reflinkSearch=B(rt.reflinkSearch,"g").replace("reflink",rt.reflink).replace("nolink",rt.nolink).getRegex(),rt.normal=Z({},rt),rt.pedantic=Z({},rt.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:B(/^!?\[(label)\]\((.*?)\)/).replace("label",rt._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rt._label).getRegex()}),rt.gfm=Z({},rt.normal,{escape:B(rt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\e+" ".repeat(n.length)));while(t)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?e.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else{if(i=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((function(t){r=t.call({lexer:this},n),"number"===typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=e[e.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n),o=i.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,r,i,o,a,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)while(null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l)))t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+X("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l)))l=l.slice(0,o.index)+"["+X("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l)))l=l.slice(0,o.index+o[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;while(t)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.escape(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.tag(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.link(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.emStrong(t,l,s))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.codespan(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.br(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.del(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.autolink(t,ot))t=t.substring(n.raw.length),e.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(t,ot))){if(i=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((function(t){r=t.call({lexer:this},n),"number"===typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(n=this.tokenizer.inlineText(i,it))t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,r=e[e.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(n.raw.length),e.push(n);return e}}class st{constructor(t){this.options=t||P}code(t,e,n){const r=(e||"").match(/\S*/)[0];if(this.options.highlight){const e=this.options.highlight(t,r);null!=e&&e!==t&&(n=!0,t=e)}return t=t.replace(/\n$/,"")+"\n",r?''+(n?t:$(t,!0))+"
\n":""+(n?t:$(t,!0))+"
\n"}blockquote(t){return`\n${t} \n`}html(t){return t}heading(t,e,n,r){if(this.options.headerIds){const i=this.options.headerPrefix+r.slug(n);return`${t} \n`}return`${t} \n`}hr(){return this.options.xhtml?" \n":" \n"}list(t,e,n){const r=e?"ol":"ul",i=e&&1!==n?' start="'+n+'"':"";return"<"+r+i+">\n"+t+""+r+">\n"}listitem(t){return`${t} \n`}checkbox(t){return" "}paragraph(t){return`${t}
\n`}table(t,e){return e&&(e=`${e} `)," \n"}tablerow(t){return`\n${t} \n`}tablecell(t,e){const n=e.header?"th":"td",r=e.align?`<${n} align="${e.align}">`:`<${n}>`;return r+t+`${n}>\n`}strong(t){return`${t} `}em(t){return`${t} `}codespan(t){return`${t}
`}br(){return this.options.xhtml?" ":" "}del(t){return`${t}`}link(t,e,n){if(t=U(this.options.sanitize,this.options.baseUrl,t),null===t)return n;let r='"+n+" ",r}image(t,e,n){if(t=U(this.options.sanitize,this.options.baseUrl,t),null===t)return n;let r=` ":">",r}text(t){return t}}class lt{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class ct{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,e){let n=t,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[t];do{r++,n=t+"-"+r}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=r,this.seen[n]=0),n}slug(t,e={}){const n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)}}class ut{constructor(t){this.options=t||P,this.options.renderer=this.options.renderer||new st,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new lt,this.slugger=new ct}static parse(t,e){const n=new ut(e);return n.parse(t)}static parseInline(t,e){const n=new ut(e);return n.parseInline(t)}parse(t,e=!0){let n,r,i,o,a,s,l,c,u,p,d,h,m,f,g,b,y,w,v,x="";const k=t.length;for(n=0;n0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):f+=w),f+=this.parse(g.tokens,m),u+=this.renderer.listitem(f,y,b);x+=this.renderer.list(u,d,h);continue;case"html":x+=this.renderer.html(p.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":u=p.tokens?this.parseInline(p.tokens):p.text;while(n+1{r(t.text,t.lang,(function(e,n){if(e)return a(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),s--,0===s&&a()}))}),0))})),void(0===s&&a())}function r(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"An error occurred:
"+$(t.message+"",!0)+" ";throw t}try{const n=at.lex(t,e);if(e.walkTokens){if(e.async)return Promise.all(pt.walkTokens(n,e.walkTokens)).then((()=>ut.parse(n,e))).catch(r);pt.walkTokens(n,e.walkTokens)}return ut.parse(n,e)}catch(i){r(i)}}pt.options=pt.setOptions=function(t){return Z(pt.defaults,t),j(pt.defaults),pt},pt.getDefaults=C,pt.defaults=P,pt.use=function(...t){const e=pt.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((t=>{const n=Z({},t);if(n.async=pt.defaults.async||n.async,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if(t.renderer){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if(t.tokenizer){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");e[t.level]?e[t.level].unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=pt.defaults.renderer||new st;for(const n in t.renderer){const r=e[n];e[n]=(...i)=>{let o=t.renderer[n].apply(e,i);return!1===o&&(o=r.apply(e,i)),o}}n.renderer=e}if(t.tokenizer){const e=pt.defaults.tokenizer||new et;for(const n in t.tokenizer){const r=e[n];e[n]=(...i)=>{let o=t.tokenizer[n].apply(e,i);return!1===o&&(o=r.apply(e,i)),o}}n.tokenizer=e}if(t.walkTokens){const e=pt.defaults.walkTokens;n.walkTokens=function(n){let r=[];return r.push(t.walkTokens.call(this,n)),e&&(r=r.concat(e.call(this,n))),r}}pt.setOptions(n)}))},pt.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(pt,r)),r.type){case"table":for(const t of r.header)n=n.concat(pt.walkTokens(t.tokens,e));for(const t of r.rows)for(const r of t)n=n.concat(pt.walkTokens(r.tokens,e));break;case"list":n=n.concat(pt.walkTokens(r.items,e));break;default:pt.defaults.extensions&&pt.defaults.extensions.childTokens&&pt.defaults.extensions.childTokens[r.type]?pt.defaults.extensions.childTokens[r.type].forEach((function(t){n=n.concat(pt.walkTokens(r[t],e))})):r.tokens&&(n=n.concat(pt.walkTokens(r.tokens,e)))}return n},pt.parseInline=function(t,e){if("undefined"===typeof t||null===t)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof t)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");e=Z({},pt.defaults,e||{}),G(e);try{const n=at.lexInline(t,e);return e.walkTokens&&pt.walkTokens(n,e.walkTokens),ut.parseInline(n,e)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"An error occurred:
"+$(n.message+"",!0)+" ";throw n}},pt.Parser=ut,pt.parser=ut.parse,pt.Renderer=st,pt.TextRenderer=lt,pt.Lexer=at,pt.lexer=at.lex,pt.Tokenizer=et,pt.Slugger=ct,pt.parse=pt;pt.options,pt.setOptions,pt.use,pt.walkTokens,pt.parseInline,ut.parse,at.lex;var dt=function(){var t=this,e=t._self._c;return e("section",{staticClass:"comment-editor",attrs:{role:"form"}},[e("div",{staticClass:"avatar-body"},[t.configs.enableBloggerOperation&&t.bloggerComment?e("div",{staticClass:"blogger-avatar",attrs:{title:"博主登录"}},[e("avatar",{staticStyle:{cursor:"pointer"},attrs:{src:t.avatar,configs:t.configs,title:"点击头像试试"},on:{click:t.randomAuthor}}),e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 170 170"}},[e("path",{attrs:{fill:"var(--comment-theme)",d:"M114.7,34.7c-19.4-41-38.7-41-58.1,0C11.4,31,1.8,47.7,27.6,85c-25.8,37.3-16.2,54,29,50.3c19.4,41,38.7,41,58.1,0\n\tc45.2,3.7,54.9-13,29.1-50.3C169.6,47.7,159.9,31,114.7,34.7z M82.4,110.9"}}),e("path",{attrs:{fill:"rgba(255, 255, 255, 0.8)",d:"M117.4,75.9l-35,35c-2.6,2.6-6.9,2.6-9.6,0L50.5,88.6c-2.6-2.6-2.6-6.9,0-9.6s6.9-2.6,9.6,0l17.5,17.5\n\tl30.2-30.2c2.6-2.6,6.9-2.6,9.6,0C120,68.9,120,73.2,117.4,75.9L117.4,75.9z"}})])],1):e("avatar",{staticStyle:{cursor:"pointer"},attrs:{src:t.avatar,configs:t.configs,title:"点击头像试试"},on:{click:t.randomAuthor}})],1),e("form",{staticClass:"comment-form"},[t.configs.enableBloggerOperation&&t.bloggerComment?e("div",{staticClass:"blogger-info"},[e("div",[e("p",{staticClass:"blogger-name"},[t._v(t._s(this.globalData.blogger.nickname))]),e("p",{staticClass:"blogger-email"},[t._v(t._s(this.globalData.blogger.email))])]),e("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(e){t.bloggerComment=!1}}},[t._v("切换访客")])]):e("div",{staticClass:"author-info"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.author,expression:"comment.author"}],attrs:{id:"author","aria-required":"true",placeholder:(this.configs.anonymousUserName?"":"* ")+(this.configs.getQQInfo?"昵称(输入QQ自动获取)":"昵称"),required:"required",type:"text"},domProps:{value:t.comment.author},on:{blur:function(e){t.configs.getQQInfo&&t.handleQQInfo()},input:function(e){e.target.composing||t.$set(t.comment,"author",e.target.value)}}}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.email,expression:"comment.email"}],class:!this.comment.email||t.isEmail()?"":"error",attrs:{id:"email",placeholder:"邮箱",type:"text"},domProps:{value:t.comment.email},on:{input:function(e){e.target.composing||t.$set(t.comment,"email",e.target.value)}}}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.authorUrl,expression:"comment.authorUrl"}],attrs:{id:"authorUrl",placeholder:"网址",type:"text"},domProps:{value:t.comment.authorUrl},on:{input:function(e){e.target.composing||t.$set(t.comment,"authorUrl",e.target.value)}}})]),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.previewMode,expression:"!previewMode"}],staticClass:"comment-textarea"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.comment.content,expression:"comment.content"}],ref:"commentTextarea",class:!t.comment.content||t.comment.content.length<1023?"":"error",attrs:{placeholder:t.options.comment_content_placeholder||"撰写评论...","aria-required":"true",required:"required"},domProps:{value:t.comment.content},on:{input:function(e){e.target.composing||t.$set(t.comment,"content",e.target.value)}}}),e("span",{staticClass:"edit-picker"},[e("span",{staticClass:"edit-btn",class:t.emojiDialogVisible?"edit-open":"",on:{click:t.handleToggleDialogEmoji}},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18"}},[t._v(" > "),e("path",{attrs:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-5-7h2a3 3 0 0 0 6 0h2a5 5 0 0 1-10 0zm1-2a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm8 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"}})])]),t.configs.enableImageUpload?e("span",{staticClass:"edit-btn",class:t.imageDialogVisible?"edit-open":"",on:{click:t.handleImageUpload}},[e("svg",{attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18"}},[e("path",{attrs:{d:"M896 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h768zM288 409.6L128 569.536V832h768v-83.2l-204.8-204.8-134.4 134.4-268.8-268.8zM896 192H128v288L288 320l268.8 268.8 134.4-134.4 204.8 204.8V192z"}}),e("path",{attrs:{d:"M774.08 356.736a44.8 44.8 0 1 0 0-89.6 44.8 44.8 0 0 0 0 89.6z"}})])]):t._e(),e("transition",{attrs:{name:"emoji-fade"}},[e("keep-alive",[t.emojiDialogVisible?e("EmojiPicker",{attrs:{pack:t.emojiPack},on:{select:t.handleSelectEmoji}}):t._e()],1)],1)],1)]),t.previewMode?e("div",{staticClass:"comment-preview markdown-content",domProps:{innerHTML:t._s(t.renderedContent)}}):t._e(),e("ul",[this.replyComment?e("li",[e("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(e){t.globalData.replyId=0}}},[t._v("取消")])]):t._e(),t.comment.content?e("li",[e("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(e){t.previewMode=!t.previewMode}}},[t._v(" "+t._s(t.previewMode?"编辑":"预览")+" ")])]):t._e(),e("li",[e("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.handleSubmitClick}},[t._v("提交")])])]),e("div",{staticClass:"comment-alert"},[t.infoAlertVisible?t._l(t.infoes,(function(n,r){return e("div",{key:r,staticClass:"alert info"},[e("span",{staticClass:"closebtn",on:{click:t.clearAlertClose}},[t._v("×")]),e("strong",[t._v(t._s(n))])])})):t._e(),t.successAlertVisible?t._l(t.successes,(function(n,r){return e("div",{key:r,staticClass:"alert success"},[e("span",{staticClass:"closebtn",on:{click:t.clearAlertClose}},[t._v("×")]),e("strong",[t._v(t._s(n))])])})):t._e(),t.warningAlertVisible?t._l(t.warnings,(function(n,r){return e("div",{key:r,staticClass:"alert warning"},[e("span",{staticClass:"closebtn",on:{click:t.clearAlertClose}},[t._v("×")]),e("strong",[t._v(t._s(n))])])})):t._e()],2)])])},ht=[],mt=n(2568),ft=n.n(mt);function gt(t){const e=(new Date).getTime(),n=e-t,r=Math.floor(n/864e5);if(0===r){const t=n%864e5,e=Math.floor(t/36e5);if(0===e){const e=t%36e5,n=Math.floor(e/6e4);if(0===n){const t=e%6e4,n=Math.round(t/1e3);return n+" 秒前"}return n+" 分钟前"}return e+" 小时前"}return r<0?"刚刚":r<=7?r+" 天前":bt(t,"yyyy/MM/dd hh:mm")}function bt(t,e){t=new Date(t),/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));let n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(let r in n)if(new RegExp(`(${r})`).test(e)){let t=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?t:yt(t))}return e}function yt(t){return("00"+t).substr(t.length)}function wt(t){return null===t||void 0===t||""===t}function vt(t){return t&&"object"===typeof t&&t.constructor===Object}function xt(t){const e=/^[A-Za-z0-9]+([-_.][A-Za-z0-9]+)*@([A-Za-z0-9]+[-.])+[A-Za-z]{2,8}$/;return e.test(t)}function kt(t){var e=/^[1-9][0-9]{4,9}$/gim;return e.test(t)}function _t(t,e,n,r){let i,o=t.getBoundingClientRect(),a=window.scrollY,s=a+o.top-n,l=(s-a)/e,c=a>s?-1:1;function u(){a+=l,a*c ");let n=document.createElement("div");n.innerHTML=t;const r=n.innerText||n.textContent;return n=null,r}function Pt(t,e){return e?t:t.replace(/[<&"]/g,(function(t){return{"<":"<","&":"&",'"':"""}[t]}))}function jt(t){return t.replace(/<\/*([^/\s>]+)[^>]*>/g,(function(t,e){return["img","ul","ol","span","div","h1","h2","h3","h4","h5","h6","input","code"].includes(e)?"":["hr","br","p","li","a","blockquote"].includes(e)?" ":t}))}function St(t=0,e=1){return Math.random()*(e-t)+t}function Ot(){let t=["追梦","放风筝","打酱油","耍帅","卖萌","发嗲","发呆","傻笑","打盹","可爱","善良","邪恶","笨笨","聪明","美丽","智慧","温柔","调皮","动人","活泼","任性","苗条","纯洁","娇小","体贴","贪嘴","朴实","机灵","机智","搞笑"],e=["法师","猛男","少女","勇士","帅哥","英雄","老者","小矮人","天才","旺财","小熊","少年","驴","猪","恶龙","天使","恶魔","仙女","哥布林","企鹅","小提莫","爵士","骑士","国王","公主","王子","太监","猪儿虫","猫猫","上仙"];return`${t[Math.floor(Math.random()*t.length)]}的${e[Math.floor(Math.random()*e.length)]}`}var At=n(3977);const Nt=new At.HaloRestAPIClient({baseUrl:""}),Et=new At.ContentApiClient(Nt);var Tt=Et,$t=n(5597);let Rt,It=localStorage&&localStorage.getItem("HALO__Access-Token");if(It=It?JSON.parse(It):void 0,It){const t=new $t.HaloRestAPIClient({baseUrl:""});Rt=new $t.AdminApiClient(t),t.interceptors.request.use((t=>(t.headers["Admin-Authorization"]=It["value"]["access_token"],t)),(t=>Promise.reject(t)));let e=!1,n=[];t.interceptors.response.use((t=>t),(async t=>{const r=t.response,i=r?r.data:null;if($t.Axios.isCancel(t)||/Network Error/.test(t.message)||!i||401!==i.status)return Promise.reject(t);const o=t.config;if(e)return new Promise((t=>{n.push((()=>{t((0,$t.Axios)(o))}))}));e=!0;try{return It["value"]=await Rt.refreshToken(It["value"]["refresh_token"]).then((t=>t.data)),It.expire=(new Date).getTime()+1e3*It["value"]["expired_in"],localStorage.setItem("HALO__Access-Token",JSON.stringify(It)),n.forEach((t=>t())),n=[],(0,$t.Axios)(o)}catch(a){return Promise.reject(a)}finally{e=!1}}))}var Mt=Rt,Bt=n(9367),zt=n.n(Bt);const Dt={replyId:0,blogger:void 0};var Ut=Dt,qt=function(){var t=this,e=t._self._c;return e("EmojiList",{attrs:{data:t.pack},on:{select:t.onSelectEmoji}})},Lt=[],Ft=function(){var t=this,e=t._self._c;return e("div",{staticClass:"emoji-container"},t._l(t.data,(function(n,r){return e("DreamEmoji",{key:r,attrs:{data:n},nativeOn:{click:function(e){return t.onSelect(n)}}})})),1)},Ht=[],Vt=function(){var t=this,e=t._self._c;return e("span",{staticClass:"emoji-item",attrs:{title:t.data.name}},[e("img",{attrs:{alt:t.data.name,src:t.dreamSrc,onerror:"this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='"}})])},Wt=[],Zt={name:"DreamEmoji",props:{data:{type:Object},url:{type:String,required:!1,default:"https://unpkg.com/halo-comment-dream@1.1.1/dist/assets/emoji/"}},computed:{dreamSrc(){return this.url+this.data.fileName+".png"}}},Qt=Zt;function Yt(t,e,n,r,i,o,a,s){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:c}}var Jt=Yt(Qt,Vt,Wt,!1,null,null,null,!0),Gt=Jt.exports,Xt={name:"EmojiList",components:{DreamEmoji:Gt},props:{data:{type:Object}},methods:{onSelect(t){this.$emit("select",t)}},watch:{data(){this.$refs["container-emoji"].scrollTop=0}}},Kt=Xt;function te(t){var e=n(8028);e.__inject__&&e.__inject__(t)}var ee=Yt(Kt,Ft,Ht,!1,te,null,null,!0),ne=ee.exports,re={name:"EmojiPicker",props:{pack:{type:Array,required:!0}},components:{EmojiList:ne},data:()=>({mapEmojis:{}}),methods:{onSelectEmoji(t){this.$emit("select",t)}}},ie=re,oe=Yt(ie,qt,Lt,!1,null,null,null,!0),ae=oe.exports,se=n(9189);function le(t){const e=n(9189).Z;for(let n of e){let e=n.name,r=` `;t=t.replace(new RegExp(`\\[/${e}\\]`,"gm"),r)}return t}var ce=function(){var t=this,e=t._self._c;return e("img",{staticClass:"avatar",attrs:{alt:t.author?t.author+"'s avatar":"avatar",src:t.configs.avatarLoading},on:{click:t.click,load:t.handleAvatarLoading,error:t.handleAvatarError}})},ue=[],pe={name:"Avatar",props:{src:{type:String,required:!0},author:{type:String,required:!1},configs:{type:Object,required:!0}},methods:{handleAvatarLoading(t){const e=t.target||t.srcElement;e.finish||(e.finish=!0,e.src=this.src)},handleAvatarError(t){const e=t.target||t.srcElement;e.onerror=null,e.finish=!0,e.src=this.configs.defaultAvatar},click(){this.$emit("click")}}},de=pe,he=Yt(de,ce,ue,!1,null,null,null,!0),me=he.exports,fe={name:"CommentEditor",components:{Avatar:me,EmojiPicker:ae},props:{targetId:{type:Number,required:!1,default:0},target:{type:String,required:!1,default:"posts",validator:function(t){return-1!==["posts","sheets","journals"].indexOf(t)}},replyComment:{type:Object,required:!1,default:()=>{}},options:{required:!1,default:[]},configs:{type:Object,required:!0}},data(){return{emojiPack:se.Z,emojiDialogVisible:!1,imageDialogVisible:!1,comment:{author:null,authorUrl:null,email:null,content:""},previewMode:!1,globalData:Ut,bloggerComment:!0,infoes:[],warnings:[],successes:[]}},computed:{renderedContent(){return this.comment.content?pt.parse(le(Pt(this.comment.content,this.configs.commentHtml))):""},avatar(){const t=this.options.comment_gravatar_default,e=this.options.gravatar_source||"//cn.gravatar.com/avatar/";let n=this.configs.enableBloggerOperation?this.globalData.blogger.email:this.comment.email;if(!n||!xt(n))return`${e}?d=${t}`;const r=ft()(n);return`${e}${r}?s=256&d=${t}`},infoAlertVisible(){return null!==this.infoes&&this.infoes.length>0},warningAlertVisible(){return null!==this.warnings&&this.warnings.length>0},successAlertVisible(){return null!==this.successes&&this.successes.length>0}},created(){const t=localStorage.getItem("comment-author"),e=localStorage.getItem("comment-authorUrl"),n=localStorage.getItem("comment-email");this.comment.author=t||"",this.comment.authorUrl=e||"",this.comment.email=n||""},activated(){zt()(this.$el.querySelector("textarea"))},methods:{randomAuthor(){this.comment.author=Ot()},isEmail(){return xt(this.comment.email)},handleQQInfo(){kt(this.comment.author)&&fetch("https://api.coor.top/qqinfo/?qq="+this.comment.author).then((t=>t.json())).then((t=>{this.comment.author=t.nickname,this.comment.email=t.email})).catch((t=>{this.clearAlertClose(),this.warnings.push("使用QQ获取昵称失败: "+t)}))},handleSubmitClick(){if(wt(this.comment.content))return void this.warnings.push("评论内容不能为空");let t=Mt.comment;if((!this.configs.enableBloggerOperation||!this.bloggerComment)&&(t=Tt.comment,wt(this.comment.author))){if(!this.configs.anonymousUserName)return void this.warnings.push("评论者昵称不能为空");this.comment.author=this.configs.anonymousUserName}this.comment.postId=this.targetId,this.replyComment&&(this.comment.parentId=this.replyComment.id),t.create(this.target,this.comment).then((t=>{this.configs.enableBloggerOperation&&this.bloggerComment||(localStorage.setItem("comment-author",this.comment.author),localStorage.setItem("comment-email",this.comment.email),localStorage.setItem("comment-authorUrl",this.comment.authorUrl)),this.comment.content="",this.handleCommentCreated(t.data);try{window.onCommentSuccessEvent&&window.onCommentSuccessEvent(this.comment,this.target)}catch(e){console.error("onCommentSuccessEvent执行异常",e)}})).catch((t=>{this.handleFailedToCreateComment(t);try{window.onCommentErrorEvent&&window.onCommentErrorEvent(this.comment,t)}catch(e){console.error("onCommentErrorEvent执行异常",e)}}))},handleCommentCreated(t){this.clearAlertClose(),"PUBLISHED"===t.status?this.successes.push("评论成功,刷新即可显示最新评论!"):this.infoes.push("您的评论已经投递至博主,等待博主审核!")},handleFailedToCreateComment(t){if(this.clearAlertClose(),400===t.status){if(this.warnings.push(t.data.message),t.data){const e=t.data.data;vt(e)&&Object.keys(e).forEach((t=>{this.warnings.push(e[t])}))}}else 401===t.status&&this.warnings.push("评论失败,博主关闭了评论功能!")},handleToggleDialogEmoji(){this.emojiDialogVisible=!this.emojiDialogVisible},handleImageUpload(){if(this.imageDialogVisible||!this.configs.imageUploadApi)return;const t=document.createElement("input");t.setAttribute("type","file"),t.style.display="none",t.accept="image/*",t.addEventListener("change",(()=>{const e=t.files[0];if(!e)return;this.imageDialogVisible=!0,this.infoes.push("图片上传中,请稍后……");const n=new FormData;n.append("image",e),fetch(this.configs.imageUploadApi,{method:"POST",body:n}).then((t=>{if(this.clearAlertClose(),200!==t.status)throw new Error(`错误状态码:${t.status}, ${t.text()}`);return t.json()})).then((t=>{if(t.code&&"200"!==String(t.code)||t.status&&"200"!==String(t.status))return void this.warnings.push(`图片上传失败:${t.message?t.message:t}`);let e=t.data;this.comment.content+=`\n![${e.name}](${e.url})\n`,this.successes.push("图片上传成功!")})).catch((t=>{this.clearAlertClose(),this.warnings.push(`图片上传失败:${t}`)})).finally((()=>this.imageDialogVisible=!1))})),t.click()},handleSelectEmoji(t){this.comment.content+=`[/${t.name}]`},clearAlertClose(){this.infoes=[],this.warnings=[],this.successes=[]}}},ge=fe,be=Yt(ge,dt,ht,!1,null,null,null,!0),ye=be.exports,we=function(){var t=this,e=t._self._c;return t.comment.no<=t.replyNum?e("li",{staticClass:"comment",class:t.commentClass,attrs:{id:"li-comment-"+t.comment.id,itemprop:"comment",itemtype:"https://schema.org/Comment"}},[e("div",{ref:"comment-"+t.comment.id,staticClass:"comment-body",attrs:{id:"comment-"+t.comment.id}},[e("div",{staticClass:"avatar-body"},[t.comment.authorUrl&&""!==t.comment.authorUrl?e("a",{attrs:{href:t.comment.authorUrl,rel:"nofollow",target:"_blank"}},[e("avatar",{attrs:{src:t.avatar,author:t.comment.author,configs:t.configs}})],1):e("avatar",{attrs:{src:t.avatar,author:t.comment.author,configs:t.configs}})],1),e("div",{staticClass:"comment-main"},[e("div",{staticClass:"comment-meta"},[e("div",{staticClass:"comment-author",attrs:{itemprop:"author"}},[e("div",{staticClass:"author-meta"},[t.comment.authorUrl&&""!==t.comment.authorUrl?e("a",{staticClass:"author-name",attrs:{href:t.comment.authorUrl,rel:"noopener noreferrer nofollow",target:"_blank"}},[t._v(t._s(t.comment.author))]):e("a",{staticClass:"author-name"},[t._v(t._s(t.comment.author))]),t.comment.isAdmin?e("span",{staticClass:"is-admin"},[t._v("博主")]):t._e()]),e("div",{staticClass:"author-operation"},[e("span",{staticClass:"btn btn-primary comment-reply",on:{click:t.handleCreateComment}},[t._v(t._s(t.globalData.replyId===t.comment.id?"取消回复":"回复"))]),t.configs.enableBloggerOperation?e("div",{staticClass:"btn comment-operation"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 120 200"}},[e("g",[e("circle",{attrs:{cx:"60",cy:"31.1",r:"18.4"}}),e("circle",{attrs:{cx:"60",cy:"100",r:"18.4"}}),e("circle",{attrs:{cx:"60",cy:"168.9",r:"18.4"}})])]),e("ol",{staticClass:"comment-operation-list"},["published"===t.commentStatus?e("li",{on:{click:()=>t.handleUpdateCommentStatus("RECYCLE")}},[t._v(" 回收站 ")]):t._e(),"recycle"===t.commentStatus?e("li",{on:{click:()=>t.handleUpdateCommentStatus("PUBLISHED")}},[t._v("恢复")]):t._e(),"recycle"===t.commentStatus?e("li",{on:{click:t.handleDeleteComment}},[t._v("永久删除")]):t._e()])]):t._e()])]),e("div",{staticClass:"comment-info"},[e("time",{staticClass:"comment-time",attrs:{datetime:t.comment.createTime,itemprop:"datePublished"}},[t._v(t._s(t.createTimeAgo))]),t.configs.showUserAgent?e("div",{staticClass:"useragent-info"},[t._v(" "+t._s(t.compileUserAgent)+" ")]):t._e()])]),e("div",{staticClass:"markdown-body",attrs:{itemprop:"description"}},[t.parent?e("span",{staticClass:"comment-reference",on:{click:t.handleToCommentRef,mouseenter:t.handleHighlightParent,mouseleave:function(e){return t.handleHighlightParent(!1)}}},[e("a",{attrs:{href:"#comment-"+this.parent.id}},[t._v("@"+t._s(this.parent.author))])]):t._e(),e("span",{staticClass:"markdown-content",domProps:{innerHTML:t._s(t.compileContent)}})])])]),e("keep-alive",[t.globalData.replyId===t.comment.id?e("comment-editor",{attrs:{configs:t.configs,options:t.options,replyComment:t.comment,target:t.target,targetId:t.targetId}}):t._e()],1),t.comment.children?e("ul",{staticClass:"children-nodes"},[t._l(t.comment.children,(function(n){return[e("CommentNode",{key:n.id,attrs:{comment:n,configs:t.configs,replyNum:t.replyNum,isChild:!0,options:t.options,parent:n.parent,target:t.target,targetId:t.targetId}})]}))],2):t._e(),!t.isChild&&t.replyNum{}},replyNum:{type:Number,required:!0,default:10},options:{type:Object,required:!1,default:()=>{}},configs:{type:Object,required:!0}},data(){return{globalData:Ut,commentStatus:"published"}},computed:{avatar(){if(!this.configs.priorityQQAvatar&&this.comment.avatar)return this.comment.avatar;const t=this.options.comment_gravatar_default,e=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${e}${this.comment.gravatarMd5}?s=256&d=${t}`},compileContent(){return pt.parse(le(Ct(this.comment.content,this.configs.commentHtml)))},createTimeAgo(){return gt(this.comment.createTime)},compileUserAgent(){const t=new(ke());t.setUA(this.comment.userAgent);const e=t.getResult();return`(${e.browser.name} ${e.browser.version} in ${e.os.name} ${e.os.version})`},commentClass(){let t=this.isChild?" ":" index-1";return" li-comment-"+this.comment.id+t+" "+this.commentStatus}},methods:{handleToCommentRef(){const t=document.getElementById(this.targetId+"").shadowRoot;if(!t)return;const e=t.getElementById(`comment-${this.parent.id}`);e.classList.add("comment-active"),_t(e,20,(window.innerHeight||document.documentElement.clientHeight)/4,(()=>setTimeout((()=>e.classList.remove("comment-active")),500)))},handleCreateComment(){this.globalData.replyId===this.comment.id?this.globalData.replyId=0:(this.globalData.replyId=this.comment.id,this.$nextTick((()=>{const t=this.$el.querySelector(".comment-editor"),e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;(e.top<0||e.bottom>n)&&_t(t,20,n/2)})))},handleHighlightParent(t){const e=document.getElementById(this.targetId+"").shadowRoot;if(!e)return;const n=e.getElementById(`comment-${this.parent.id}`);if(n){const e=n.classList;t?e.add("comment-ref"):e.remove("comment-ref")}},handleUpdateCommentStatus(t){Mt.comment.updateStatusById(this.target,this.comment.id,t).then((()=>{this.commentStatus=t.toLowerCase(),window.alert("操作成功!")})).catch((t=>{this.handleFailedToOperationComment(t)}))},handleDeleteComment(){Mt.comment["delete"](this.target,this.comment.id).then((()=>{this.commentStatus="delete",window.alert("已删除该评论!")})).catch((t=>{this.handleFailedToOperationComment(t)}))},handleFailedToOperationComment(t){if(401===t.status)window.alert("操作失败,博主登录状态已失效!");else try{window.alert(t.data.message)}catch(e){window.alert(`操作失败:${t.status}!`)}}}},Ce=_e,Pe=Yt(Ce,we,ve,!1,null,null,null,!0),je=Pe.exports,Se=function(){var t=this,e=t._self._c;return e("div",{staticClass:"comment-loader-container"},["default"===t.configs.loadingStyle?e("div",{staticClass:"comment-loader-default"},[e("span"),e("span"),e("span"),e("span")]):"circle"===t.configs.loadingStyle?e("div",{staticClass:"comment-loader-circle"}):"balls"===t.configs.loadingStyle?e("div",{staticClass:"comment-loader-balls"},[e("div"),e("div"),e("div")]):t._e()])},Oe=[],Ae={name:"CommentLoading",props:{configs:{type:Object,required:!0}}},Ne=Ae;function Ee(t){var e=n(4084);e.__inject__&&e.__inject__(t)}var Te=Yt(Ne,Se,Oe,!1,Ee,null,null,!0),$e=Te.exports,Re=function(){var t=this,e=t._self._c;return e("div",{staticClass:"comment-page"},[e("ul",{staticClass:"page"},[e("li",{staticClass:"page-item"},[e("button",{staticClass:"prev-button",class:{disabled:!t.hasPrev},on:{click:t.handlePrevClick}},[t._v("上一页")])]),null!=t.firstPage?e("li",{staticClass:"page-item",class:{active:t.page===t.firstPage}},[e("button",{class:{active:t.page===t.firstPage},on:{click:function(e){return t.handlePageItemClick(t.firstPage)}}},[t._v(" "+t._s(t.firstPage+1)+" ")])]):t._e(),e("li",{directives:[{name:"show",rawName:"v-show",value:t.hasMorePrev,expression:"hasMorePrev"}],staticClass:"page-item"},[e("span",[t._v("...")])]),t._l(t.middlePages,(function(n){return e("li",{key:n,staticClass:"page-item",class:{active:n===t.page}},[e("button",{class:{active:n===t.page},on:{click:function(e){return t.handlePageItemClick(n)}}},[t._v(" "+t._s(n+1)+" ")])])})),e("li",{directives:[{name:"show",rawName:"v-show",value:t.hasMoreNext,expression:"hasMoreNext"}],staticClass:"page-item"},[e("span",[t._v("...")])]),t.lastPage?e("li",{staticClass:"page-item",class:{active:t.page===t.lastPage}},[e("button",{class:{active:t.page===t.lastPage},on:{click:function(e){return t.handlePageItemClick(t.lastPage)}}},[t._v(" "+t._s(t.lastPage+1)+" ")])]):t._e(),e("li",{staticClass:"page-item"},[e("button",{staticClass:"next-button",class:{disabled:!t.hasNext},on:{click:t.handleNextClick}},[t._v("下一页")])])],2)])},Ie=[],Me={name:"Pagination",model:{prop:"page",event:"change"},props:{page:{type:Number,required:!1,default:0},size:{type:Number,required:!1,default:10},total:{type:Number,required:!1,default:0}},data(){return{middleSize:3}},computed:{pages(){return Math.ceil(this.total/this.size)},hasNext(){return this.page0},firstPage(){return 0===this.pages?null:0},hasMorePrev(){return!(null===this.firstPage||this.pages<=this.middleSize+2)&&this.page>=2+this.middleSize/2},hasMoreNext(){return!(null===this.lastPage||this.pages<=this.middleSize+2)&&this.page=this.lastPage-t-1&&(n=this.lastPage-1,e=n-this.middleSize+1),this.range(e,n+1)},lastPage(){return 0===this.pages||1===this.pages?0:this.pages-1}},methods:{handleNextClick(){this.hasNext&&this.$emit("change",this.page+1)},handlePrevClick(){this.hasPrev&&this.$emit("change",this.page-1)},handlePageItemClick(t){this.$emit("change",t)},range(t,e){if(t>=e)return[];const n=[];for(let r=t;rn.click=!0,mouseenter:()=>n.stop=!0,mouseleave:()=>t.handleMouseleave(n)}},[n.click?[e("div",{staticClass:"comment-meta"},[e("avatar",{key:n.id,attrs:{src:t.avatar(n),author:n.author,configs:t.configs}}),e("div",{staticClass:"comment-author"},[e("div",{staticClass:"author-meta"},[n.authorUrl&&""!==n.authorUrl?e("a",{staticClass:"author-name",attrs:{href:n.authorUrl,rel:"noopener noreferrer nofollow",target:"_blank"}},[t._v(t._s(n.author))]):e("a",{staticClass:"author-name"},[t._v(t._s(n.author))]),n.isAdmin?e("span",{staticClass:"is-admin"},[t._v("博主")]):t._e()]),e("time",{staticClass:"comment-time",attrs:{datetime:n.createTime,itemprop:"datePublished"}},[t._v(t._s(t.createTimeAgo(n.createTime)))])])],1),e("span",{staticClass:"markdown-content",domProps:{innerHTML:t._s(n.content)}})]:[e("avatar",{key:n.id,attrs:{src:t.avatar(n),author:n.author,configs:t.configs}}),e("p",{staticClass:"comment-content",domProps:{innerHTML:t._s(n.summary)}})]],2):t._e()]}))],2)},Le=[],Fe={name:"BulletScreen",components:{Avatar:me},data(){return{loaded:!1,comments:[]}},props:{target:{type:String,required:!1,default:"posts",validator:function(t){return-1!==["posts","sheets","journals"].indexOf(t)}},id:{type:Number,required:!1,default:0},options:{type:Object,required:!1,default:()=>{}},configs:{type:Object,required:!0},stopBulletScreen:{type:Boolean,required:!0}},created(){window.innerHeight>500&&window.innerWidth>768&&(this.handleGetComments(),this.bulletScreenAnimate())},methods:{handleMouseleave(t){t.click=!1,t.stop=!1},createTimeAgo(t){return gt(t)},avatar(t){if(!this.configs.priorityQQAvatar&&t.avatar)return t.avatar;const e=this.options.comment_gravatar_default,n=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${n}${t.gravatarMd5}?s=256&d=${e}`},async handleGetComments(){let t=0;while(1){const{data:e}=await Tt.comment.listTopComments(this.target,this.id,{page:t++});let n=100*e.content.length;for(let t of e.content){let e=pt.parse(Ct(t.content,this.configs.commentHtml));t.summary=le(jt(e)),t.content=le(e),t.top=St(50,window.innerHeight-350),t.startTime=St(0,n),t.speed=St(.5,3),this.$set(t,"style",{top:t.top+"px"}),this.$set(t,"stop",!1),this.$set(t,"click",!1)}if(this.comments.push(...e.content),!e.hasNext)break}this.loaded=!0},bulletScreenAnimate(){const t=document.getElementById(this.id+"").shadowRoot;let e,n=this;function r(){let t=window.innerWidth,r=window.innerHeight-350;if(r<50)return n.comments.splice(0,n.comments.length),void window.cancelAnimationFrame(e);for(let e=n.comments.length-1;e>=0;e--){let i=n.comments[e];i.stop||(i.startTime<=0?(i.left=i.left?i.left-i.speed:t,n.$set(i.style,"left",i.left+"px"),i.top>r&&(i.top=St(50,r),n.$set(i.style,"top",i.top+"px"))):i.startTime-=1,i.left<-420&&n.comments.splice(e,1))}}function i(){t&&t.getElementById("halo-comment")&&t.getElementById("halo-comment").getAttribute("stop-bullet-screen")?n.stopBulletScreen||(n.stopBulletScreen=!0,n.$emit("update:stopBulletScreen",!0)):(n.stopBulletScreen&&(n.stopBulletScreen=!1,n.$emit("update:stopBulletScreen",!1)),r()),n.loaded&&0===n.comments.length?window.cancelAnimationFrame(e):e=window.requestAnimationFrame(i)}e=window.requestAnimationFrame(i)}}},He=Fe;function Ve(t){var e=n(9862);e.__inject__&&e.__inject__(t)}var We=Yt(He,qe,Le,!1,Ve,null,null,!0),Ze=We.exports;const Qe={CommentEditor:ye,CommentNode:je,CommentLoading:$e,Pagination:Ue,BulletScreen:Ze},Ye={};Object.keys(Qe).forEach((t=>{Ye[t]=o().component(t,Qe[t])})),pt.use({renderer:{listitem(t,e){return`${t} `},image(t,e,n){return` `},link(t,e,n){return`${n} `}},breaks:!0});const Je={autoLoad:!0,showUserAgent:!0,priorityQQAvatar:!1,getQQInfo:!1,commentHtml:!1,loadingStyle:"default",unfoldReplyNum:10,night:!1,replyDescSoft:!1,enableImageUpload:!1,enableBulletScreen:!1,imageUploadApi:void 0,anonymousUserName:void 0,enableBloggerOperation:!1,avatarLoading:"https://unpkg.com/halo-comment-dream@1.1.1/dist/assets/img/loading.svg",defaultAvatar:"https://unpkg.com/halo-comment-dream@1.1.1/dist/assets/img/avatar.svg"};var Ge={name:"Comment",props:{id:{type:Number,required:!1,default:0},type:{type:String,required:!1,default:"post",validator:function(t){return-1!==["post","sheet","journal"].indexOf(t)}},configs:{type:[Object,String],required:!1,default:()=>Je}},data(){return{list:{data:[],loading:!1,loaded:!1,params:{page:0},pages:0,total:0,size:10},options:void 0,globalData:Ut,stopBulletScreen:localStorage&&"true"===localStorage.getItem("stop-bullet-screen")||!1}},computed:{target(){return`${this.type}s`},mergedConfigs(){let t={};return"[object String]"===Object.prototype.toString.call(this.configs)&&(t=JSON.parse(this.configs)),Je["night"]=localStorage&&"true"===localStorage.getItem("night")||!1,Object.assign(Je,t)}},created(){this.handleGetOptions(),this.mergedConfigs.autoLoad&&this.handleGetComments()},methods:{async handleGetComments(){this.list.loading=!0;const{data:t}=await Tt.comment.listAsTreeView(this.target,this.id,this.list.params);t.content&&(t.content=this.flatReplyList(t.content))&&t.content.forEach((t=>t["replyCount"]=this.handleReplyList(t))),this.list.data=t.content,this.list.total=t.total,this.list.pages=t.pages,this.list.size=t.rpp,this.list.loading=!1,this.list.loaded=!0,this.globalData.replyId=0},async handleGetOptions(){if(this.mergedConfigs.enableBloggerOperation)try{const{data:t}=await Mt.user.getProfile();this.globalData.blogger=t}catch(e){this.mergedConfigs.enableBloggerOperation=!1}const{data:t}=await Tt.option.comment();this.options=t,this.mergedConfigs.priorityQQAvatar&&(this.options.gravatar_source="https://cravatar.cn/avatar/")},flatReplyList(t){let e=this.mergedConfigs.replyDescSoft,n=function(t,n){return e?n.createTime-t.createTime:t.createTime-n.createTime};for(let r of t)if(r.children){let t=r.children;t.forEach((t=>t.parent=r));for(let e=0;e{e.parent=n,t.push(e)})),n.children=null)}r.children.sort(n)}return t},handleReplyList(t,e=0){return t["no"]=e,t.children&&t.children.forEach((t=>e=this.handleReplyList(t,e+1))),e},handlePaginationChange(t){this.list.params.page=t,this.handleGetComments()}}},Xe=Ge;function Ke(t){var e=n(618);e.__inject__&&e.__inject__(t)}var tn=Yt(Xe,k,_,!1,Ke,null,null,!0),en=tn.exports;window.customElements.define("halo-comment",x(o(),en))}()})();
\ No newline at end of file
diff --git a/package.json b/package.json
index 10ec286..e3b9f09 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "halo-comment-dream",
- "version": "1.1.0",
+ "version": "1.1.1",
"private": false,
"scripts": {
"serve": "vue-cli-service serve",