diff --git a/assets/js/joe.short.js b/assets/js/joe.short.js index a5bb3e7..bccf29e 100644 --- a/assets/js/joe.short.js +++ b/assets/js/joe.short.js @@ -1,192 +1,239 @@ document.addEventListener('DOMContentLoaded', () => { - class JoeMtitle extends HTMLElement { - constructor() { - super(); - this.innerHTML = ` + class JoeMtitle extends HTMLElement { + constructor() { + super(); + this.innerHTML = ` ${this.getAttribute('title') || '默认标题'} `; - } - } - window.customElements.define('joe-mtitle', JoeMtitle); - class JoeDplayer extends HTMLElement { - constructor() { - super(); - this.options = { - src: this.getAttribute('src'), - player: this.getAttribute('player') - }; - this.render(); - } - render() { - if (this.options.src) this.innerHTML = ``; - else this.innerHTML = '播放地址未填写!'; - } - } - window.customElements.define('joe-dplayer', JoeDplayer); - class JoeBilibili extends HTMLElement { - constructor() { - super(); - this.bvid = this.getAttribute('bvid'); - this.render(); - } - render() { - if (this.bvid) this.innerHTML = ``; - else this.innerHTML = 'Bvid未填写!'; - } - } - window.customElements.define('joe-bilibili', JoeBilibili); - class JoeMusic extends HTMLElement { - constructor() { - super(); - this.options = { - id: this.getAttribute('id'), - width: this.getAttribute('width') || '100%', - autoplay: this.getAttribute('autoplay') ? 1 : 0 - }; - this.render(); - } - render() { - if (this.options.id) this.innerHTML = ``; - else this.innerHTML = '网易云歌曲ID未填写!'; - } - } - window.customElements.define('joe-music', JoeMusic); - class JoeMlist extends HTMLElement { - constructor() { - super(); - this.options = { - id: this.getAttribute('id'), - width: this.getAttribute('width') || '100%', - autoplay: this.getAttribute('autoplay') ? 1 : 0 - }; - this.render(); - } - get template() { - return ``; - } - render() { - if (this.options.id) this.innerHTML = this.template; - else this.innerHTML = '网易云歌单ID未填写!'; - } - } - window.customElements.define('joe-mlist', JoeMlist); - class JoeAbtn extends HTMLElement { - constructor() { - super(); - this.options = { - icon: this.getAttribute('icon') || '', - color: this.getAttribute('color') || '#ff6800', - href: this.getAttribute('href') || '#', - radius: this.getAttribute('radius') || '17.5px', - content: this.getAttribute('content') || '多彩按钮' - }; - this.innerHTML = ` + } + } + window.customElements.define('joe-mtitle', JoeMtitle); + class JoeDplayer extends HTMLElement { + constructor() { + super(); + this.options = { + src: this.getAttribute('src'), + player: this.getAttribute('player') + }; + this.render(); + } + render() { + if (this.options.src) this.innerHTML = ``; + else this.innerHTML = '播放地址未填写!'; + } + } + window.customElements.define('joe-dplayer', JoeDplayer); + class JoeBilibili extends HTMLElement { + constructor() { + super(); + this.bvid = this.getAttribute('bvid'); + this.render(); + } + render() { + if (this.bvid) this.innerHTML = ``; + else this.innerHTML = 'Bvid未填写!'; + } + } + window.customElements.define('joe-bilibili', JoeBilibili); + class JoeMp3 extends HTMLElement { + constructor() { + super(); + this.options = { + name: this.getAttribute('name'), + url: this.getAttribute('url'), + theme: this.getAttribute('theme') || '#1989fa', + cover: this.getAttribute('cover'), + autoplay: this.getAttribute('autoplay') ? true : false + }; + this.render(); + } + render() { + if (!this.options.url) return (this.innerHTML = '音频地址未填写!'); + this.innerHTML = '
'; + new APlayer({ + container: this.querySelector('div'), + theme: this.options.theme, + autoplay: this.options.autoplay, + audio: [ + { + url: this.options.url, + name: this.options.name, + cover: this.options.cover + } + ] + }); + } + } + window.customElements.define('joe-mp3', JoeMp3); + class JoeMusic extends HTMLElement { + constructor() { + super(); + this.options = { + id: this.getAttribute('id'), + color: this.getAttribute('color') || '#1989fa', + autoplay: this.getAttribute('autoplay') ? true : false + }; + this.render(); + } + render() { + if (!this.options.id) return (this.innerHTML = '网易云歌曲ID未填写!'); + this.innerHTML = ''; + fetch('https://api.i-meto.com/meting/api?server=netease&type=song&id=' + this.options.id).then(async response => { + const audio = await response.json(); + new APlayer({ + container: this.querySelector('div'), + lrcType: 3, + theme: this.options.color, + autoplay: this.options.autoplay, + audio + }); + }); + } + } + window.customElements.define('joe-music', JoeMusic); + class JoeMlist extends HTMLElement { + constructor() { + super(); + this.options = { + id: this.getAttribute('id'), + color: this.getAttribute('color') || '#1989fa', + autoplay: this.getAttribute('autoplay') ? true : false + }; + this.render(); + } + render() { + if (!this.options.id) return (this.innerHTML = '网易云歌单ID未填写!'); + this.innerHTML = ''; + fetch('https://api.i-meto.com/meting/api?server=netease&type=playlist&id=' + this.options.id).then(async response => { + const audio = await response.json(); + new APlayer({ + container: this.querySelector('div'), + lrcType: 3, + theme: this.options.color, + autoplay: this.options.autoplay, + audio + }); + }); + } + } + window.customElements.define('joe-mlist', JoeMlist); + class JoeAbtn extends HTMLElement { + constructor() { + super(); + this.options = { + icon: this.getAttribute('icon') || '', + color: this.getAttribute('color') || '#ff6800', + href: this.getAttribute('href') || '#', + radius: this.getAttribute('radius') || '17.5px', + content: this.getAttribute('content') || '多彩按钮' + }; + this.innerHTML = ` ${this.options.content} `; - } - } - window.customElements.define('joe-abtn', JoeAbtn); - class JoeAnote extends HTMLElement { - constructor() { - super(); - this.options = { - icon: this.getAttribute('icon') || 'fa-download', - href: this.getAttribute('href') || '#', - type: /^secondary$|^success$|^warning$|^error$|^info$/.test(this.getAttribute('type')) ? this.getAttribute('type') : 'secondary', - content: this.getAttribute('content') || '标签按钮' - }; - this.innerHTML = ` + } + } + window.customElements.define('joe-abtn', JoeAbtn); + class JoeAnote extends HTMLElement { + constructor() { + super(); + this.options = { + icon: this.getAttribute('icon') || 'fa-download', + href: this.getAttribute('href') || '#', + type: /^secondary$|^success$|^warning$|^error$|^info$/.test(this.getAttribute('type')) ? this.getAttribute('type') : 'secondary', + content: this.getAttribute('content') || '标签按钮' + }; + this.innerHTML = ` ${this.options.content} `; - } - } - window.customElements.define('joe-anote', JoeAnote); - class JoeDotted extends HTMLElement { - constructor() { - super(); - this.startColor = this.getAttribute('startColor') || '#ff6c6c'; - this.endColor = this.getAttribute('endColor') || '#1989fa'; - this.innerHTML = ` + } + } + window.customElements.define('joe-anote', JoeAnote); + class JoeDotted extends HTMLElement { + constructor() { + super(); + this.startColor = this.getAttribute('startColor') || '#ff6c6c'; + this.endColor = this.getAttribute('endColor') || '#1989fa'; + this.innerHTML = ` `; - } - } - window.customElements.define('joe-dotted', JoeDotted); - class JoeHide extends HTMLElement { - constructor() { - super(); - this.render(); - } - render() { - this.innerHTML = '此处内容作者设置了 回复 可见'; - this.$button = this.querySelector('i'); - const $comment = document.querySelector('.joe_comment'); - const $header = document.querySelector('.joe_header'); - if (!$comment || !$header) return; - this.$button.addEventListener('click', () => { - const top = $comment.offsetTop - $header.offsetHeight - 15; - window.scrollTo({ top, behavior: 'smooth' }); - }); - } - } - window.customElements.define('joe-hide', JoeHide); - class JoeCardDefault extends HTMLElement { - constructor() { - super(); - const _temp = this.querySelector('._temp'); - this.options = { - width: this.getAttribute('width') || '100%', - label: this.getAttribute('label') || '卡片标题', - content: _temp.innerHTML.trim().replace(/^(<\/p>/g, '');
+ $('.joe_detail__article p:empty').remove();
- /*
+ /*
------------------------以下未测试------------------------------------------
*/
- /* 点击复制 */
- class JoeCopy extends HTMLElement {
- constructor() {
- super();
- this.options = {
- text: this.getAttribute('text') || '默认文本',
- content: this.innerHTML.trim().replace(/^(
)|(
)$/g, '') || '点击复制'
- };
- this.render();
- }
- get template() {
- return `${this.options.content}`;
- }
- render() {
- this.innerHTML = this.template;
- this.event();
- }
- event() {
- this.$copy = this.querySelector('.joe_detail__article-copy');
- new ClipboardJS(this.$copy, { text: () => this.options.text }).on('success', () => Qmsg.success('复制成功!'));
- }
- }
- window.customElements.define('joe-copy', JoeCopy);
+ /* 点击复制 */
+ class JoeCopy extends HTMLElement {
+ constructor() {
+ super();
+ this.options = {
+ text: this.getAttribute('text') || '默认文本',
+ content: this.innerHTML.trim().replace(/^(
)|(
)$/g, '') || '点击复制'
+ };
+ this.render();
+ }
+ get template() {
+ return `${this.options.content}`;
+ }
+ render() {
+ this.innerHTML = this.template;
+ this.event();
+ }
+ event() {
+ this.$copy = this.querySelector('.joe_detail__article-copy');
+ new ClipboardJS(this.$copy, { text: () => this.options.text }).on('success', () => Qmsg.success('复制成功!'));
+ }
+ }
+ window.customElements.define('joe-copy', JoeCopy);
});
diff --git a/assets/js/joe.short.min.js b/assets/js/joe.short.min.js
index 3fc1fc0..98b7d1f 100644
--- a/assets/js/joe.short.min.js
+++ b/assets/js/joe.short.min.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",()=>{class t extends HTMLElement{constructor(){super(),this.innerHTML=`\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${this.getAttribute("title")||"默认标题"}\n\t\t\t\t\t\n\t\t\t\t`}}window.customElements.define("joe-mtitle",t);class e extends HTMLElement{constructor(){super(),this.options={src:this.getAttribute("src"),player:this.getAttribute("player")},this.render()}render(){this.options.src?this.innerHTML=``:this.innerHTML="播放地址未填写!"}}window.customElements.define("joe-dplayer",e);class s extends HTMLElement{constructor(){super(),this.bvid=this.getAttribute("bvid"),this.render()}render(){this.bvid?this.innerHTML=``:this.innerHTML="Bvid未填写!"}}window.customElements.define("joe-bilibili",s);class n extends HTMLElement{constructor(){super(),this.options={id:this.getAttribute("id"),width:this.getAttribute("width")||"100%",autoplay:this.getAttribute("autoplay")?1:0},this.render()}render(){this.options.id?this.innerHTML=``:this.innerHTML="网易云歌曲ID未填写!"}}window.customElements.define("joe-music",n);class i extends HTMLElement{constructor(){super(),this.options={id:this.getAttribute("id"),width:this.getAttribute("width")||"100%",autoplay:this.getAttribute("autoplay")?1:0},this.render()}get template(){return``}render(){this.options.id?this.innerHTML=this.template:this.innerHTML="网易云歌单ID未填写!"}}window.customElements.define("joe-mlist",i);class o extends HTMLElement{constructor(){super(),this.options={icon:this.getAttribute("icon")||"",color:this.getAttribute("color")||"#ff6800",href:this.getAttribute("href")||"#",radius:this.getAttribute("radius")||"17.5px",content:this.getAttribute("content")||"多彩按钮"},this.innerHTML=`\n\t\t\t\t\n\t\t\t\t\t${this.options.content}\n\t\t\t\t\n\t\t\t`}}window.customElements.define("joe-abtn",o);class r extends HTMLElement{constructor(){super(),this.options={icon:this.getAttribute("icon")||"fa-download",href:this.getAttribute("href")||"#",type:/^secondary$|^success$|^warning$|^error$|^info$/.test(this.getAttribute("type"))?this.getAttribute("type"):"secondary",content:this.getAttribute("content")||"标签按钮"},this.innerHTML=`\n\t\t\t\t\n\t\t\t\t\t${this.options.content}\n\t\t\t\t\n\t\t\t`}}window.customElements.define("joe-anote",r);class a extends HTMLElement{constructor(){super(),this.startColor=this.getAttribute("startColor")||"#ff6c6c",this.endColor=this.getAttribute("endColor")||"#1989fa",this.innerHTML=`\n\t\t\t\t\n\t\t\t`}}window.customElements.define("joe-dotted",a);class c extends HTMLElement{constructor(){super(),this.render()}render(){this.innerHTML='此处内容作者设置了 回复 可见',this.$button=this.querySelector("i");const t=document.querySelector(".joe_comment"),e=document.querySelector(".joe_header");t&&e&&this.$button.addEventListener("click",()=>{const s=t.offsetTop-e.offsetHeight-15;window.scrollTo({top:s,behavior:"smooth"})})}}window.customElements.define("joe-hide",c);class l extends HTMLElement{constructor(){super();const t=this.querySelector("._temp");this.options={width:this.getAttribute("width")||"100%",label:this.getAttribute("label")||"卡片标题",content:t.innerHTML.trim().replace(/^(
)|(
)$/g,"")||"卡片内容"};const e=`\n\t\t\t\t\n\t\t\t\t\t${this.options.label}\n\t\t\t\t\t${this.options.content}\n\t\t\t\t\n\t\t\t`;if(this.querySelector("._content"))this.querySelector("._content").innerHTML=e;else{const t=document.createElement("div");t.className="_content",t.innerHTML=e,this.appendChild(t)}}}window.customElements.define("joe-card-default",l);class p extends HTMLElement{constructor(){super(),this.options={type:/^success$|^info$|^warning$|^error$/.test(this.getAttribute("type"))?this.getAttribute("type"):"info",content:this.getAttribute("content")||"消息内容"},this.innerHTML=`\n\t\t\t\t\n\t\t\t`}}window.customElements.define("joe-message",p);class h extends HTMLElement{constructor(){super(),this.options={percentage:/^\d{1,3}%$/.test(this.getAttribute("percentage"))?this.getAttribute("percentage"):"50%",color:this.getAttribute("color")||"#ff6c6c"},this.innerHTML=`\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${this.options.percentage}\n\t\t\t\t\n\t\t\t`}}window.customElements.define("joe-progress",h);class d extends HTMLElement{constructor(){super();const t=this.querySelector("._temp");this.options={color:this.getAttribute("color")||"#f0ad4e",content:t.innerHTML.trim().replace(/^(
)|(
)$/g,"")||"标注内容"};const e=`\n\t\t\t\t\n\t\t\t\t\t${this.options.content}\n\t\t\t\t\n\t\t\t`;if(this.querySelector("._content"))this.querySelector("._content").innerHTML=e;else{const t=document.createElement("div");t.className="_content",t.innerHTML=e,this.appendChild(t)}}}window.customElements.define("joe-callout",d);const u=document.querySelector(".joe_detail__article");u&&(u.innerHTML=u.innerHTML.replace(/
<\/p>/g,""));class m extends HTMLElement{constructor(){super(),this.options={text:this.getAttribute("text")||"默认文本",content:this.innerHTML.trim().replace(/^(
)|(
)$/g,"")||"点击复制"},this.render()}get template(){return`${this.options.content}`}render(){this.innerHTML=this.template,this.event()}event(){this.$copy=this.querySelector(".joe_detail__article-copy"),new ClipboardJS(this.$copy,{text:()=>this.options.text}).on("success",()=>Qmsg.success("复制成功!"))}}window.customElements.define("joe-copy",m)});
\ No newline at end of file
+document.addEventListener("DOMContentLoaded",()=>{class t extends HTMLElement{constructor(){super(),this.innerHTML=`\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${this.getAttribute("title")||"默认标题"}\n\t\t\t\t\t\n\t\t\t\t`}}window.customElements.define("joe-mtitle",t);class e extends HTMLElement{constructor(){super(),this.options={src:this.getAttribute("src"),player:this.getAttribute("player")},this.render()}render(){this.options.src?this.innerHTML=``:this.innerHTML="播放地址未填写!"}}window.customElements.define("joe-dplayer",e);class s extends HTMLElement{constructor(){super(),this.bvid=this.getAttribute("bvid"),this.render()}render(){this.bvid?this.innerHTML=``:this.innerHTML="Bvid未填写!"}}window.customElements.define("joe-bilibili",s);class n extends HTMLElement{constructor(){super(),this.options={name:this.getAttribute("name"),url:this.getAttribute("url"),theme:this.getAttribute("theme")||"#1989fa",cover:this.getAttribute("cover"),autoplay:!!this.getAttribute("autoplay")},this.render()}render(){if(!this.options.url)return this.innerHTML="音频地址未填写!";this.innerHTML="
`;
- });
- str = str.replace(/\:\@\(\s*(高兴|小怒|脸红|内伤|装大款|赞一个|害羞|汗|吐血倒地|深思|不高兴|无语|亲亲|口水|尴尬|中指|想一想|哭泣|便便|献花|皱眉|傻笑|狂汗|吐|喷水|看不见|鼓掌|阴暗|长草|献黄瓜|邪恶|期待|得意|吐舌|喷血|无所谓|观察|暗地观察|肿包|中枪|大囧|呲牙|抠鼻|不说话|咽气|欢呼|锁眉|蜡烛|坐等|击掌|惊喜|喜极而泣|抽烟|不出所料|愤怒|无奈|黑线|投降|看热闹|扇耳光|小眼睛|中刀)\s*\)/g, function ($0, $1) {
- $1 = encodeURI($1).replace(/%/g, '');
- return `
`;
- });
- str = str.replace(/{mtitle([^}]*)\/}/g, '
`;
+ });
+ str = str.replace(/\:\@\(\s*(高兴|小怒|脸红|内伤|装大款|赞一个|害羞|汗|吐血倒地|深思|不高兴|无语|亲亲|口水|尴尬|中指|想一想|哭泣|便便|献花|皱眉|傻笑|狂汗|吐|喷水|看不见|鼓掌|阴暗|长草|献黄瓜|邪恶|期待|得意|吐舌|喷血|无所谓|观察|暗地观察|肿包|中枪|大囧|呲牙|抠鼻|不说话|咽气|欢呼|锁眉|蜡烛|坐等|击掌|惊喜|喜极而泣|抽烟|不出所料|愤怒|无奈|黑线|投降|看热闹|扇耳光|小眼睛|中刀)\s*\)/g, function ($0, $1) {
+ $1 = encodeURI($1).replace(/%/g, '');
+ return `
`;
+ });
+ str = str.replace(/{mtitle([^}]*)\/}/g, '<\/p>/g, '');
- const _ = div.innerHTML;
- $('.cm-preview-content').html(_);
- $('.cm-preview-content pre code').each((i, el) => Prism.highlightElement(el));
+ $('.cm-preview-content').html(str);
+ $('.cm-preview-content p:empty').remove();
+ $('.cm-preview-content pre code').each((i, el) => Prism.highlightElement(el));
}
diff --git a/typecho/write/js/_tools.js b/typecho/write/js/_tools.js
index d1b513a..305d476 100644
--- a/typecho/write/js/_tools.js
+++ b/typecho/write/js/_tools.js
@@ -180,6 +180,11 @@ export default [
title: '标注',
innerHTML: ''
},
+ {
+ type: 'mp3',
+ title: '外部音乐',
+ innerHTML: ''
+ },
/* --------------------------- 短代码结束 --------------------------- */
{
type: 'clean',
diff --git a/typecho/write/js/joe.write.chunk.js b/typecho/write/js/joe.write.chunk.js
index b13f9fb..4410da9 100644
--- a/typecho/write/js/joe.write.chunk.js
+++ b/typecho/write/js/joe.write.chunk.js
@@ -1,4 +1,4 @@
-!function(){"use strict";let r="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;t <\/p>/g,"");t=e.innerHTML;$(".cm-preview-content").html(t),$(".cm-preview-content pre code").each((t,e)=>Prism.highlightElement(e))}class Ro extends class{constructor(){$("body").append(`
+!function(){"use strict";let s="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;th&&M(a,t-h,-1),M(a,e-t,n),C(l,a,r),h=e)}}(t),c(!i),i}static empty(t){return new k(t?[t,-1]:[],[])}static fromJSON(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let e=0;et.length?t[0]:4}),pt.lineSeparator=X,pt.phrases=E.define(),pt.languageData=K,pt.changeFilter=Y,pt.transactionFilter=Q,pt.transactionExtender=Z,W.reconfigure=nt.define();const mt="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),vt="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class yt{constructor(t,e){this.rules=[];let{finish:c}=e||{};function d(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}for(var i in t)!function t(i,e,n,r){let s=[],o=/^@(\w+)\b/.exec(i[0]),a=o&&"keyframes"==o[1];if(o&&null==e)return n.push(i[0]+";");for(var l in e){var h=e[l];if(/&/.test(l))t(l.split(/,\s*/).map(e=>i.map(t=>e.replace(/&/,t))).reduce((t,e)=>t.concat(e)),h,n);else if(h&&"object"==typeof h){if(!o)throw new RangeError("The value of a property ("+l+") should be a primitive value.");t(d(l),h,s,a)}else null!=h&&s.push(l.replace(/_.*/,"").replace(/[A-Z]/g,t=>"-"+t.toLowerCase())+": "+h+";")}(s.length||a)&&n.push((!c||o||r?i:i.map(c)).join(", ")+" {"+s.join(" ")+"}")}(d(i),t[i],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=wt[mt]||1;return wt[mt]=t+1,"ͼ"+t.toString(36)}static mount(t,e){(t[vt]||new xt(t)).mount(Array.isArray(e)?e:[e])}}let bt=null;class xt{constructor(e){if(!e.head&&e.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(bt)return e.adoptedStyleSheets=[bt.sheet].concat(e.adoptedStyleSheets),e[vt]=bt;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),bt=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[vt]=this}mount(n){let r=this.sheet,s=0,o=0;for(let i=0;ii||s.bottomi?-1:1,i=Math.min(s.bottom-o,Math.max(s.top+o,i)),t)return-1;t=!0}if(s.type==Pe.Text)break;i=0=m&&!k.next().done;){var{offset:y,leftOver:b}=function(e,i,n,r){for(let t=0;t2*r){var o=t[e-1];o.break?t.splice(--e,1,o.left,null,o.right):t.splice(--e,1,o.left,o.right),i+=1+o.break,n-=o.size}else{if(!(r>2*n))break;o=t[i];o.break?t.splice(i,1,o.left,null,o.right):t.splice(i,1,o.left,o.right),i+=2+o.break,r-=o.size}else n=a?s-i:0,s-=i,o=s+(o-a),a=s)}return{from:s,toA:o,toB:a}}(n.state.sliceDoc(h,c),t.text,e-h,i);d&&(s={from:h+d.from,to:h+d.toA,insert:n.state.toText(t.text.slice(d.from,d.toB))})}else!n.hasFocus&&n.state.facet(ni)||(c=ne(n.root),{impreciseHead:h,impreciseAnchor:d}=n.docView,h=h&&h.node==c.focusNode&&h.offset==c.focusOffset||!re(n.contentDOM,c.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(c.focusNode,c.focusOffset),c=d&&d.node==c.anchorNode&&d.offset==c.anchorOffset||!re(n.contentDOM,c.anchorNode)?n.state.selection.main.anchor:function(t){let e=t.isCollapsed;return e&&ie.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e}(c)?h:n.docView.posFromDOM(c.anchorNode,c.anchorOffset),h==a.head&&c==a.anchor||(o=H.single(c,h)));if(s||o)if(!s&&r&&!a.empty&&o&&o.main.empty&&(s={from:a.from,to:a.to,insert:n.state.doc.slice(a.from,a.to)}),s){let i=n.state;if(!(ie.android&&(s.from==a.from&&s.to==a.to&&1==s.insert.length&&2==s.insert.lines&&Yn(n,"Enter",13)||s.from==a.from-1&&s.to==a.to&&0==s.insert.length&&Yn(n,"Backspace",8)||s.from==a.from&&s.to==a.to+1&&0==s.insert.length&&Yn(n,"Delete",46))||ie.ios&&(n.inputState.lastIOSEnter>Date.now()-225&&1Qn.decorations.from(t)}),Qr];function ss(t,e,i){var n=t.prop(e<0?fr.openedBy:fr.closedBy);if(n)return n;if(1==t.name.length){t=i.indexOf(t.name);if(-1
`})).replace(/\:\@\(\s*(高兴|小怒|脸红|内伤|装大款|赞一个|害羞|汗|吐血倒地|深思|不高兴|无语|亲亲|口水|尴尬|中指|想一想|哭泣|便便|献花|皱眉|傻笑|狂汗|吐|喷水|看不见|鼓掌|阴暗|长草|献黄瓜|邪恶|期待|得意|吐舌|喷血|无所谓|观察|暗地观察|肿包|中枪|大囧|呲牙|抠鼻|不说话|咽气|欢呼|锁眉|蜡烛|坐等|击掌|惊喜|喜极而泣|抽烟|不出所料|愤怒|无奈|黑线|投降|看热闹|扇耳光|小眼睛|中刀)\s*\)/g,function(t,e){return e=encodeURI(e).replace(/%/g,""),`
`})).replace(/{mtitle([^}]*)\/}/g,"t.concat(e))}(t,e,a))(r instanceof R?i:s[r.facet.id]||(s[r.facet.id]=[])).push(r);let l=Object.create(null),h=[],c=[];for(let e of i)l[e.id]=c.length<<1,c.push(t=>e.slot(t));for(o in s){let i=s[o],e=i[0].facet;if(i.every(t=>0==t.type)){l[e.id]=h.length<<1|1;let t=e.combine(i.map(t=>t.value));var d=n?n.config.address[e.id]:null;null!=d&&(d=U(n,d),e.compare(t,d)&&(t=d)),h.push(t)}else{for(let e of i)0==e.type?(l[e.id]=h.length<<1|1,h.push(e.value)):(l[e.id]=c.length<<1,c.push(t=>e.dynamicSlot(t)));l[e.id]=c.length<<1,c.push(t=>function(e,h,t){let c=t.map(t=>e[t.id]),d=t.map(t=>t.type),u=c.filter(t=>!(1&t)),f=e[h.id]>>1;return(e,t)=>{var i,n=t?t.reconfigured?t.startState.config.address[h.id]:f<<1:null;let s=null==n;for(i of u)1&J(e,i)&&(s=!0);if(!s)return 0;let r=[];for(let t=0;t