app/search-pro.worker.js

3 lines
50 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

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

const V=Object.entries,et=Object.fromEntries,st="ENTRIES",L="KEYS",T="VALUES",_="";class D{set;_type;_path;constructor(t,s){const n=t._tree,o=Array.from(n.keys());this.set=t,this._type=s,this._path=o.length>0?[{node:n,keys:o}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:s}=E(this._path);if(E(s)===_)return{done:!1,value:this.result()};const n=t.get(E(s));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=E(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>E(t)).filter(t=>t!==_).join("")}value(){return E(this._path).node.get(_)}result(){switch(this._type){case T:return this.value();case L:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const E=e=>e[e.length-1],nt=(e,t,s)=>{const n=new Map;if(t===void 0)return n;const o=t.length+1,u=o+s,i=new Uint8Array(u*o).fill(s+1);for(let r=0;r<o;++r)i[r]=r;for(let r=1;r<u;++r)i[r*o]=r;return R(e,t,s,n,i,1,o,""),n},R=(e,t,s,n,o,u,i,r)=>{const d=u*i;t:for(const c of e.keys())if(c===_){const a=o[d-1];a<=s&&n.set(r,[e.get(c),a])}else{let a=u;for(let h=0;h<c.length;++h,++a){const g=c[h],m=i*a,p=m-i;let l=o[m];const f=Math.max(0,a-s-1),y=Math.min(i-1,a+s);for(let F=f;F<y;++F){const v=g!==t[F],z=o[p+F]+ +v,A=o[p+F+1]+1,w=o[m+F]+1,j=o[m+F+1]=Math.min(z,A,w);j<l&&(l=j)}if(l>s)continue t}R(e.get(c),t,s,n,o,a,i,r+c)}};class C{_tree;_prefix;_size=void 0;constructor(t=new Map,s=""){this._tree=t,this._prefix=s}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[s,n]=x(this._tree,t.slice(this._prefix.length));if(s===void 0){const[o,u]=O(n);for(const i of o.keys())if(i!==_&&i.startsWith(u)){const r=new Map;return r.set(i.slice(u.length),o.get(i)),new C(r,t)}}return new C(s,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,ot(this._tree,t)}entries(){return new D(this,st)}forEach(t){for(const[s,n]of this)t(s,n,this)}fuzzyGet(t,s){return nt(this._tree,t,s)}get(t){const s=k(this._tree,t);return s!==void 0?s.get(_):void 0}has(t){const s=k(this._tree,t);return s!==void 0&&s.has(_)}keys(){return new D(this,L)}set(t,s){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,I(this._tree,t).set(_,s),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,s){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=I(this._tree,t);return n.set(_,s(n.get(_))),this}fetch(t,s){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=I(this._tree,t);let o=n.get(_);return o===void 0&&n.set(_,o=s()),o}values(){return new D(this,T)}[Symbol.iterator](){return this.entries()}static from(t){const s=new C;for(const[n,o]of t)s.set(n,o);return s}static fromObject(t){return C.from(Object.entries(t))}}const x=(e,t,s=[])=>{if(t.length===0||e==null)return[e,s];for(const n of e.keys())if(n!==_&&t.startsWith(n))return s.push([e,n]),x(e.get(n),t.slice(n.length),s);return s.push([e,t]),x(void 0,"",s)},k=(e,t)=>{if(t.length===0||e==null)return e;for(const s of e.keys())if(s!==_&&t.startsWith(s))return k(e.get(s),t.slice(s.length))},I=(e,t)=>{const s=t.length;t:for(let n=0;e&&n<s;){for(const u of e.keys())if(u!==_&&t[n]===u[0]){const i=Math.min(s-n,u.length);let r=1;for(;r<i&&t[n+r]===u[r];)++r;const d=e.get(u);if(r===u.length)e=d;else{const c=new Map;c.set(u.slice(r),d),e.set(t.slice(n,n+r),c),e.delete(u),e=c}n+=r;continue t}const o=new Map;return e.set(t.slice(n),o),o}return e},ot=(e,t)=>{const[s,n]=x(e,t);if(s!==void 0){if(s.delete(_),s.size===0)W(n);else if(s.size===1){const[o,u]=s.entries().next().value;q(n,o,u)}}},W=e=>{if(e.length===0)return;const[t,s]=O(e);if(t.delete(s),t.size===0)W(e.slice(0,-1));else if(t.size===1){const[n,o]=t.entries().next().value;n!==_&&q(e.slice(0,-1),n,o)}},q=(e,t,s)=>{if(e.length===0)return;const[n,o]=O(e);n.set(o+t,s),n.delete(o)},O=e=>e[e.length-1],ut=(e,t)=>{const s=e._idToShortId.get(t);if(s!=null)return e._storedFields.get(s)},it=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u,M="or",$="and",rt="and_not",ct=(e,t)=>{e.includes(t)||e.push(t)},N=(e,t)=>{for(const s of t)e.includes(s)||e.push(s)},P=({score:e},{score:t})=>t-e,lt=()=>new Map,b=e=>{const t=new Map;for(const s of Object.keys(e))t.set(parseInt(s,10),e[s]);return t},G=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,ht={[M]:(e,t)=>{for(const s of t.keys()){const n=e.get(s);if(n==null)e.set(s,t.get(s));else{const{score:o,terms:u,match:i}=t.get(s);n.score=n.score+o,n.match=Object.assign(n.match,i),N(n.terms,u)}}return e},[$]:(e,t)=>{const s=new Map;for(const n of t.keys()){const o=e.get(n);if(o==null)continue;const{score:u,terms:i,match:r}=t.get(n);N(o.terms,i),s.set(n,{score:o.score+u,terms:o.terms,match:Object.assign(o.match,r)})}return s},[rt]:(e,t)=>{for(const s of t.keys())e.delete(s);return e}},dt=(e,t,s,n,o,u)=>{const{k:i,b:r,d}=u;return Math.log(1+(s-t+.5)/(t+.5))*(d+e*(i+1)/(e+i*(1-r+r*n/o)))},at=e=>(t,s,n)=>{const o=typeof e.fuzzy=="function"?e.fuzzy(t,s,n):e.fuzzy||!1,u=typeof e.prefix=="function"?e.prefix(t,s,n):e.prefix===!0;return{term:t,fuzzy:o,prefix:u}},H=(e,t,s,n)=>{for(const o of Object.keys(e._fieldIds))if(e._fieldIds[o]===s){e._options.logger("warn",`SlimSearch: document with ID ${e._documentIds.get(t)} has changed before removal: term "${n}" was not present in field "${o}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}},ft=(e,t,s,n)=>{if(!e._index.has(n)){H(e,s,t,n);return}const o=e._index.fetch(n,lt),u=o.get(t);u==null||u.get(s)==null?H(e,s,t,n):u.get(s)<=1?u.size<=1?o.delete(t):u.delete(s):u.set(s,u.get(s)-1),e._index.get(n).size===0&&e._index.delete(n)},gt={k:1.2,b:.7,d:.5},mt={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(it),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof console?.[e]=="function"&&console[e](t)},autoVacuum:!0},J={combineWith:M,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:gt},pt={combineWith:$,prefix:(e,t,s)=>t===s.length-1},Ft={batchSize:1e3,batchWait:10},U={minDirtFactor:.1,minDirtCount:20},_t={...Ft,...U},K=Symbol("*"),yt=(e,t)=>{const s=new Map,n={...e._options.searchOptions,...t};for(const[o,u]of e._documentIds){const i=n.boostDocument?n.boostDocument(u,"",e._storedFields.get(o)):1;s.set(o,{score:i,terms:[],match:{}})}return s},X=(e,t=M)=>{if(e.length===0)return new Map;const s=t.toLowerCase(),n=ht[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map},S=(e,t,s,n,o,u,i,r,d=new Map)=>{if(o==null)return d;for(const c of Object.keys(u)){const a=u[c],h=e._fieldIds[c],g=o.get(h);if(g==null)continue;let m=g.size;const p=e._avgFieldLength[h];for(const l of g.keys()){if(!e._documentIds.has(l)){ft(e,h,l,s),m-=1;continue}const f=i?i(e._documentIds.get(l),s,e._storedFields.get(l)):1;if(!f)continue;const y=g.get(l),F=e._fieldLength.get(l)[h],v=dt(y,m,e._documentCount,F,p,r),z=n*a*f*v,A=d.get(l);if(A){A.score+=z,ct(A.terms,t);const w=G(A.match,s);w?w.push(c):A.match[s]=[c]}else d.set(l,{score:z,terms:[t],match:{[s]:[c]}})}}return d},At=(e,t,s)=>{const n={...e._options.searchOptions,...s},o=(n.fields||e._options.fields).reduce((l,f)=>({...l,[f]:G(n.boost,f)||1}),{}),{boostDocument:u,weights:i,maxFuzzy:r,bm25:d}=n,{fuzzy:c,prefix:a}={...J.weights,...i},h=e._index.get(t.term),g=S(e,t.term,t.term,1,h,o,u,d);let m,p;if(t.prefix&&(m=e._index.atPrefix(t.term)),t.fuzzy){const l=t.fuzzy===!0?.2:t.fuzzy,f=l<1?Math.min(r,Math.round(t.term.length*l)):l;f&&(p=e._index.fuzzyGet(t.term,f))}if(m)for(const[l,f]of m){const y=l.length-t.term.length;if(!y)continue;p?.delete(l);const F=a*l.length/(l.length+.3*y);S(e,t.term,l,F,f,o,u,d,g)}if(p)for(const l of p.keys()){const[f,y]=p.get(l);if(!y)continue;const F=c*l.length/(l.length+y);S(e,t.term,l,F,f,o,u,d,g)}return g},Y=(e,t,s={})=>{if(t===K)return yt(e,s);if(typeof t!="string"){const a={...s,...t,queries:void 0},h=t.queries.map(g=>Y(e,g,a));return X(h,a.combineWith)}const{tokenize:n,processTerm:o,searchOptions:u}=e._options,i={tokenize:n,processTerm:o,...u,...s},{tokenize:r,processTerm:d}=i,c=r(t).flatMap(a=>d(a)).filter(a=>!!a).map(at(i)).map(a=>At(e,a,i));return X(c,i.combineWith)},Q=(e,t,s={})=>{const n=Y(e,t,s),o=[];for(const[u,{score:i,terms:r,match:d}]of n){const c=r.length||1,a={id:e._documentIds.get(u),score:i*c,terms:Object.keys(d),queryTerms:r,match:d};Object.assign(a,e._storedFields.get(u)),(s.filter==null||s.filter(a))&&o.push(a)}return t===K&&s.boostDocument==null&&e._options.searchOptions.boostDocument==null||o.sort(P),o},Ct=(e,t,s={})=>{s={...e._options.autoSuggestOptions,...s};const n=new Map;for(const{score:u,terms:i}of Q(e,t,s)){const r=i.join(" "),d=n.get(r);d!=null?(d.score+=u,d.count+=1):n.set(r,{score:u,terms:i,count:1})}const o=[];for(const[u,{score:i,terms:r,count:d}]of n)o.push({suggestion:u,terms:r,score:i/d});return o.sort(P),o};class Et{_options;_index;_documentCount;_documentIds;_idToShortId;_fieldIds;_fieldLength;_avgFieldLength;_nextId;_storedFields;_dirtCount;_currentVacuum;_enqueuedVacuum;_enqueuedVacuumConditions;constructor(t){if(t?.fields==null)throw new Error('SlimSearch: option "fields" must be provided');const s=t.autoVacuum==null||t.autoVacuum===!0?_t:t.autoVacuum;this._options={...mt,...t,autoVacuum:s,searchOptions:{...J,...t.searchOptions||{}},autoSuggestOptions:{...pt,...t.autoSuggestOptions||{}}},this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=U,this.addFields(this._options.fields)}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}get documentCount(){return this._documentCount}get termCount(){return this._index.size}toJSON(){const t=[];for(const[s,n]of this._index){const o={};for(const[u,i]of n)o[u]=Object.fromEntries(i);t.push([s,o])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}addFields(t){for(let s=0;s<t.length;s++)this._fieldIds[t[s]]=s}}const zt=({index:e,documentCount:t,nextId:s,documentIds:n,fieldIds:o,fieldLength:u,averageFieldLength:i,storedFields:r,dirtCount:d,serializationVersion:c},a)=>{if(c!==1&&c!==2)throw new Error("SlimSearch: cannot deserialize an index created with an incompatible version");const h=new Et(a);h._documentCount=t,h._nextId=s,h._documentIds=b(n),h._idToShortId=new Map,h._fieldIds=o,h._fieldLength=b(u),h._avgFieldLength=i,h._storedFields=b(r),h._dirtCount=d||0,h._index=new C;for(const[g,m]of h._documentIds)h._idToShortId.set(m,g);for(const[g,m]of e){const p=new Map;for(const l of Object.keys(m)){let f=m[l];c===1&&(f=f.ds),p.set(parseInt(l,10),b(f))}h._index.set(g,p)}return h},B=(e,t)=>{const s=e.toLowerCase(),n=t.toLowerCase(),o=[];let u=0,i=0;const r=(c,a=!1)=>{let h="";i===0?h=c.length>20?`${c.slice(-20)}`:c:a?h=c.length+i>100?`${c.slice(0,100-i)}`:c:h=c.length>20?`${c.slice(0,20)}${c.slice(-20)}`:c,h&&o.push(h),i+=h.length,a||(o.push(["mark",t]),i+=t.length,i>=100&&o.push(" …"))};let d=s.indexOf(n,u);if(d===-1)return null;for(;d>=0;){const c=d+n.length;if(r(e.slice(u,d)),u=c,i>100)break;d=s.indexOf(n,u)}return i<100&&r(e.slice(u),!0),o},wt=(e,t)=>t.contents.reduce((s,[,n])=>s+n,0)-e.contents.reduce((s,[,n])=>s+n,0),xt=(e,t)=>Math.max(...t.contents.map(([,s])=>s))-Math.max(...e.contents.map(([,s])=>s)),Z=(e,t,s={})=>{const n={};return Q(t,e,{boost:{h:2,t:1,c:4},prefix:!0,...s}).forEach(o=>{const{id:u,terms:i,score:r}=o,d=u.includes("@"),c=u.includes("#"),[a,h]=u.split(/[#@]/),g=Number(a),m=i.sort((l,f)=>l.length-f.length).filter((l,f)=>i.slice(f+1).every(y=>!y.includes(l))),{contents:p}=n[g]??={title:"",contents:[]};if(d)p.push([{type:"customField",id:g,index:h,display:m.map(l=>o.c.map(f=>B(f,l))).flat().filter(l=>l!==null)},r]);else{const l=m.map(f=>B(o.h,f)).filter(f=>f!==null);if(l.length&&p.push([{type:c?"heading":"title",id:g,...c&&{anchor:h},display:l},r]),"t"in o)for(const f of o.t){const y=m.map(F=>B(f,F)).filter(F=>F!==null);y.length&&p.push([{type:"text",id:g,...c&&{anchor:h},display:y},r])}}}),V(n).sort(([,o],[,u])=>"max"==="total"?wt(o,u):xt(o,u)).map(([o,{title:u,contents:i}])=>{if(!u){const r=ut(t,o);r&&(u=r.h)}return{title:u,contents:i.map(([r])=>r)}})},tt=(e,t,s={})=>{const n=Ct(t,e,{fuzzy:.2,maxFuzzy:3,...s}).map(({suggestion:o})=>o);return e.includes(" ")?n:n.filter(o=>!o.includes(" "))},bt=et(V(JSON.parse("{\"/\":{\"documentCount\":42,\"nextId\":42,\"documentIds\":{\"0\":\"2\",\"1\":\"2@0\",\"2\":\"3\",\"3\":\"3#轻雪配置项-nonebot插件配置项也可以写在此-与dotenv格式不同-应为小写\",\"4\":\"3#onebot实现端配置\",\"5\":\"3#其他通信方式\",\"6\":\"3@0\",\"7\":\"3@1\",\"8\":\"4\",\"9\":\"4#常见问题\",\"10\":\"4#推荐方案-qq\",\"11\":\"4#推荐方案-minecraft\",\"12\":\"4#鸣谢\",\"13\":\"4@0\",\"14\":\"4@1\",\"15\":\"5\",\"16\":\"5#设备要求\",\"17\":\"5#开始安装\",\"18\":\"5#想在linux命令行中拥有更好的体验-试试trss-liteyuki轻雪机器人管理脚本-该功能仅供参考-不是liteyukibot官方提供的功能\",\"19\":\"5@0\",\"20\":\"5@1\",\"21\":\"6\",\"22\":\"7\",\"23\":\"7@0\",\"24\":\"8\",\"25\":\"8@0\",\"26\":\"9\",\"27\":\"9#基础插件命令\",\"28\":\"9#命令前有-s-的表示仅超级用户可用-o-和-a-分别为群主和群管可用-p-为私聊可用\",\"29\":\"9#轻雪liteyuki\",\"30\":\"9#轻雪包管理器-liteyuki-npm\",\"31\":\"9#轻雪用户管理liteyuki-user\",\"32\":\"9@0\",\"33\":\"10\",\"34\":\"10#功能插件命令\",\"35\":\"10#轻雪天气liteyuki-weather\",\"36\":\"10@0\",\"37\":\"11\",\"38\":\"11#简介\",\"39\":\"11#加载资源包\",\"40\":\"11@0\",\"41\":\"12\"},\"fieldIds\":{\"h\":0,\"t\":1,\"c\":2},\"fieldLength\":{\"0\":[1],\"1\":[null,null,1],\"2\":[1],\"3\":[5,97],\"4\":[1,23],\"5\":[1,9],\"6\":[null,null,1],\"7\":[null,null,2],\"8\":[1],\"9\":[1,41],\"10\":[3,29],\"11\":[3,5],\"12\":[1,5],\"13\":[null,null,1],\"14\":[null,null,2],\"15\":[1],\"16\":[1,25],\"17\":[1,28],\"18\":[3],\"19\":[null,null,1],\"20\":[null,null,1],\"21\":[1],\"22\":[1],\"23\":[null,null,1],\"24\":[1,28],\"25\":[null,null,1],\"26\":[1],\"27\":[1],\"28\":[9],\"29\":[1,47],\"30\":[1,66],\"31\":[1,24],\"32\":[null,null,1],\"33\":[1],\"34\":[1],\"35\":[1,20],\"36\":[null,null,1],\"37\":[1],\"38\":[1,22],\"39\":[1,51],\"40\":[null,null,1],\"41\":[1,3]},\"averageFieldLength\":[1.6031050985707023,24.12217780724291,0.8848876897657383],\"storedFields\":{\"0\":{\"h\":\"项目部署\"},\"1\":{\"c\":[\"部署\"]},\"2\":{\"h\":\"配置\"},\"3\":{\"h\":\"轻雪配置项(Nonebot插件配置项也可以写在此与dotenv格式不同应为小写)\",\"t\":[\"配置文件会在首次启动后生成你可以在config.yml中修改配置项后重启轻雪绝大多数情况下你只需要修改superusers和nickname。如果不确定字段的含义请不要修改部分在自动生成配置文件中未列出需手动添加\",\"# 生成文件的配置项 command_start: [ \\\"/\\\", \\\"\\\" ] # 指令前缀,若没有\\\"\\\"空命令头请开启alconna_use_command_start保证alconna解析正常 host: 127.0.0.1 # 监听地址默认为本机若要对外开放请填写0.0.0.0或者你的公网IP port: 20216 # 绑定端口 nickname: [ \\\"liteyuki\\\" ] # 机器人昵称 superusers: [ \\\"1919810\\\" ] # 超级用户 # 未列出的配置项(如要自定义请手动修改) onebot_access_token: \\\"\\\" # 访问令牌,对公网开放时建议设置 default_language: \\\"zh-CN\\\" # 默认语言支持i18n部分语言和自行扩展的语言代码 log_level: \\\"INFO\\\" # 日志等级 log_icon: true # 是否显示日志等级图标(某些控制台字体不可用) auto_report: true # 是否自动上报问题给轻雪服务器,仅包含硬件信息和运行软件版本 fake_device_info: # 统计卡片显示的虚假设备信息,用于保护隐私 cpu: brand: AMD cores: 16 # 物理核心数 logical_cores: 32 # 逻辑核心数 frequency: 3600 # CPU主频MHz mem: total: 32768000000 # 内存总数:字节 alconna_use_command_start: false # alconna是否使用默认指令前缀默认false alconna_auto_completion: false # alconna是否自动补全指令默认false建议开启 # 其他Nonebot插件的配置项 custom_config_1: \\\"custom_value1\\\" custom_config_2: \\\"custom_value2\\\" ... \"]},\"4\":{\"h\":\"Onebot实现端配置\",\"t\":[\"不同的实现端给出的字段可能不同,但是基本上都是一样的,这里给出一个参考值\",\"字段\",\"参考值\",\"说明\",\"协议\",\"反向WebSocket\",\"推荐使用反向ws协议进行通信即轻雪作为服务端\",\"地址\",\"ws://address/onebot/v11/ws\",\"地址取决于配置文件本机默认为127.0.0.1:20216\",\"AccessToken\",\"\\\"\\\"\",\"如果你给轻雪配置了AccessToken请在此填写相同的值\"]},\"5\":{\"h\":\"其他通信方式\",\"t\":[\"实现端与轻雪的通信方式不局限为反向WebSocket但是推荐使用反向WebSocket。\",\"反向WebSocket的优点是轻雪作为服务端可以更好的控制连接适用于生产环境。\",\"在某些情况下你也可以使用正向WebSocket比如你在开发轻雪插件时可以使用正向WebSocket主动连接实现端\"]},\"6\":{\"c\":[\"使用指南\"]},\"7\":{\"c\":[\"配置\",\"部署\"]},\"8\":{\"h\":\"答疑\"},\"9\":{\"h\":\"常见问题\",\"t\":[\"设备上Python环境太乱了pip和python不对应怎么办\",\"请使用/path/to/python -m pip install -r requirements.txt来安装依赖 然后用/path/to/python main.py来启动Bot 其中/path/to/python是你要用来运行Bot的可执行文件\",\"为什么我启动后机器人没有反应?\",\"请检查配置文件的command_start或superusers确认你有权限使用命令并按照正确的命令发送\",\"确认命令头没有和nickname{}冲突例如一个命令是help但是Bot昵称有一个help那么将会被解析为nickname而不是命令\",\"怎么登录聊天平台例如QQ\",\"你有这个问题说明你不是很了解这个项目,本项目不负责实现登录功能,只负责处理和回应消息,登录功能由实现端(协议端)提供, 实现端本身不负责处理响应逻辑将消息按照OneBot标准处理好上报给轻雪 你需要使用Onebot标准的实现端来连接到轻雪并将消息上报给轻雪下面已经列出一些推荐的实现端\",\"Playwright安装失败\",\"输入playwright install安装浏览器\"]},\"10\":{\"h\":\"推荐方案(QQ)\",\"t\":[\"Lagrange.OneBot基于NTQQ的OneBot实现目前Markdown消息支持Lagrange\",\"LLOneBotNTQQ的OneBot插件需要安装NTQQ\",\"OpenShamrock基于Lsposed的OneBot11实现\",\"TRSS-Yunzai基于node.js可使用ws-plugin进行通信\",\"go-cqhttpgo语言实现的OneBot11实现端目前可用性较低\",\"Gensokyo基于 OneBot QQ官方机器人Api Golang 原生实现,需要官方机器人权限\",\"人工实现的Onebot协议自己整一个WebSocket客户端看着QQ的消息然后给轻雪传输数据\"]},\"11\":{\"h\":\"推荐方案(Minecraft)\",\"t\":[\"MinecraftOneBot我们专门为Minecraft开发的服务器Bot支持OneBotV11标准\",\"使用其他项目连接请先自行查阅文档若有困难请联系对应开发者而不是Liteyuki的开发者\"]},\"12\":{\"h\":\"鸣谢\",\"t\":[\"Nonebot2提供的框架支持\",\"nonebot-plugin-htmlrender提供的渲染功能\",\"nonebot-plugin-alconna提供的命令解析功能\"]},\"13\":{\"c\":[\"使用指南\"]},\"14\":{\"c\":[\"配置\",\"部署\"]},\"15\":{\"h\":\"安装\"},\"16\":{\"h\":\"设备要求\",\"t\":[\"Windows系统版本最低Windows10+/Windows Server 2019+\",\"Linux系统要支持Python3.10+推荐Ubuntu 20.04+/CentOS 8+(别用你那b CentOS)\",\"CPU: 至少1vCPU\",\"内存: Bot无其他插件会占用100MB其他插件占用视具体插件而定建议1GB以上\",\"硬盘: 至少1GB空间\",\"GPU: 原生轻雪无需GPU某些插件需要GPU支持例如AI绘画之类的具体查看插件文档\"]},\"17\":{\"h\":\"开始安装\",\"t\":[\"安装 Git 和 Python3.10+ 环境\",\"克隆项目 git clone https://github.com/snowykami/LiteyukiBot (无法连接可以用https://gitee.com/snowykami/LiteyukiBot)\",\"切换目录cd LiteyukiBot\",\"安装依赖pip install -r requirements.txt(如果多个Python环境请指定后安装pythonx -m pip install -r requirements.txt)\",\"启动python main.py\"]},\"18\":{\"h\":\"该功能仅供参考不是LiteyukiBot官方提供的功能\"},\"19\":{\"c\":[\"使用指南\"]},\"20\":{\"c\":[\"安装\"]},\"21\":{\"h\":\"\"},\"22\":{\"h\":\"使用手册\"},\"23\":{\"c\":[\"使用手册\"]},\"24\":{\"h\":\"用户协议\",\"t\":[\"本项目遵循MIT协议你可以自由使用修改分发但是请保留原作者信息\",\"你可以选择开启auto_report(默认开启),轻雪会收集以下内容 \",\"运行环境的设备信息CPU内存系统信息Python信息\",\"插件信息(不含插件数据)\",\"部分异常信息,\",\"会话负载信息(不含隐私部分) 以上内容仅用于项目的优化不包含任何隐私信息且通过安全的方式传输到轻雪的服务器若你不希望提供这些信息可以在配置文件中把auto_report设定为false\",\"本项目不会收集用户的任何隐私信息,但请注意甄别第三方插件的安全性\",\"使用此项目代表你已经同意以上协议\"]},\"25\":{\"c\":[\"使用手册\"]},\"26\":{\"h\":\"基础命令\"},\"27\":{\"h\":\"基础插件命令\"},\"28\":{\"h\":\"命令前有[S]的表示仅超级用户可用,[O]和[A]分别为群主和群管可用,[P]为私聊可用\"},\"29\":{\"h\":\"轻雪\",\"t\":[\"[S]reload-liteyuki # 重载轻雪 [S]update-liteyuki # 更新轻雪 [S]liteecho # 查看当前bot [S]config set <key> value # 添加配置项,若存在则会覆盖,输入值会被执行,以便于转换为正确的值,\\\"10\\\"和10是不一样的 [S]config get [key] # 查询配置项不带key返回配置项列表推荐私聊使用 [S]reload-resources # 重载资源 [S]switch-image-mode # 切换图片模式该功能需要commit:505468b及以后的Lagrange.OneBot在普通图片和Markdown图片之间切换后者更大但有失败的可能 liteyuki-docs # 查看轻雪文档 # 上述两个命令修改的配置项在数据库中保存,但是优先级低于配置文件,如果配置文件中存在相同的配置项,将会使用配置文件中的配置 ------ 别名: reload-liteyuki 重启轻雪, update-liteyuki 更新轻雪, reload-resources 重载资源, config 配置, set 设置, get 查询, switch-image-mode 切换图片模式, liteyuki-docs 轻雪文档 \"]},\"30\":{\"h\":\"轻雪包管理器\",\"t\":[\"[S]nps update # 更新插件索引 [S]nps install <plugin_name> # 安装插件 [S]nps uninstall <plugin_name> # 卸载插件 [S]nps search <keywords...> # 通过关键词搜索插件 ------ [AOSP]npm enable <plugin_name> # 当前会话启用插件 [AOSP]npm disable <plugin_name> # 当前会话禁用插件 [S]npm enable-global <plugin_name> # 全局启用插件 [S]npm disable-global <plugin_name> # 全局禁用插件 list-plugin [page] [num] # 列出所有插件 page为页数num为每页显示数量 ------ [S]rpm list [page] [num] # 列出所有资源包 page为页数num为每页显示数量 [S]rpm load <resource_pack_name> # 加载资源包 [S]rpm unload <resource_pack_name> # 卸载资源包 [S]rpm change <resource_pack_name> # 修改优先级 [S]rpm reload # 重载所有资源包 ------ 别名: nps 插件商店, npm 插件管理, update 更新, install 安装, uninstall 卸载, search 搜索, enable 启用, disable 停用, enable-global 全局启用, disable-global 全局停用, list-plugin 列出插件/插件列表, rpm 资源包, load 加载, unload 卸载, change 更改, reload 重载, list 列表/列出 \",\" # 受限于Nonebot的钩子函数目前只能阻断消息事件的传入对于主动推送消息的插件无法将其阻止 ------ \"]},\"31\":{\"h\":\"轻雪用户管理\",\"t\":[\"profile # 查看用户信息菜单 profile set <key> [value] # 设置用户信息或打开属性设置菜单 profile get <key> # 获取用户信息 ------ 别名: profile 个人信息, set 设置, get 查询 \",\"参数:<param>为必填参数,[option]为可选参数。\",\"命令别名配置了命令别名的命令可以使用别名代替原命令例如npm install ~可以使用插件 安装 ~代替。\"]},\"32\":{\"c\":[\"使用手册\"]},\"33\":{\"h\":\"功能命令\"},\"34\":{\"h\":\"功能插件命令\"},\"35\":{\"h\":\"轻雪天气\",\"t\":[\"配置项\",\"weather-key # 和风天气的天气key \",\"命令\",\"weather <keywords...> # 查询目标地天气,例如:\\\"天气 北京 海淀\\\", \\\"weather Tokyo Shinjuku\\\" bind-city <keywords...> # 绑定查询城市,个人全局生效 别名weather 天气 \"]},\"36\":{\"c\":[\"使用手册\"]},\"37\":{\"h\":\"资源包\"},\"38\":{\"h\":\"简介\",\"t\":[\"资源包,亦可根据用途称为主题包、字体包、语言包等,它允许你一定程度上自定义轻雪的外观,并且不用修改源代码\",\"资源/主题商店提供了一些资源包供你选择,你也可以自己制作资源包\",\"资源包的制作很简单如果你接触过Minecraft的资源包那么你能够很快就上手仅需按照原有路径进行文件替换即刻讲起打包成一个新的资源包。\",\"部分内容制作需要一点点前端基础,例如htmlcss\",\"轻雪原版资源包请查看LiteyukiBot/liteyuki/resources可以在此基础上进行修改\",\"欢迎各位投稿资源包到轻雪资源商店\"]},\"39\":{\"h\":\"加载资源包\",\"t\":[\"资源包通常是以.zip格式压缩的只需要将其解压到根目录resources目录下即可注意不要嵌套文件夹,正常的路径应该是这样的\",\"main.py resources └─resource_pack_1 ├─metadata.yml ├─templates └───... └─resource_pack_2 ├─metadata.yml └─... \",\"你自己制作的资源包也应该遵循这个规则,并且应该在metadata.yml中填写一些信息\",\"若没有metadata.yml文件则该文件夹不会被识别为资源包\",\"name: \\\"资源包名称\\\" version: \\\"1.0.0\\\" description: \\\"资源包描述\\\" # 你可以自定义一些信息,但请保证以上三个字段 ... \",\"资源包加载遵循一个优先级即后加载的资源包会覆盖前面的资源包例如你在A包中定义了一个index.html文件B包也定义了一个index.html文件那么加载B包后A包中的index.html文件会被覆盖\",\"对于不同资源包的不同文件是可以相对引用的例如你在A中定义了templates/index.html在B中定义了templates/style.css可以在A的index.html中用./style.css相对路径引用B中的css\"]},\"40\":{\"c\":[\"使用手册\"]},\"41\":{\"h\":\"\",\"t\":[\"404 Not Found\"]}},\"dirtCount\":0,\"index\":[[\"404\",{\"1\":{\"41\":1}}],[\"是可以相对引用的\",{\"1\":{\"39\":1}}],[\"是否自动上报问题给轻雪服务器\",{\"1\":{\"3\":1}}],[\"是否显示日志等级图标\",{\"1\":{\"3\":1}}],[\"即后加载的资源包会覆盖前面的资源包\",{\"1\":{\"39\":1}}],[\"即轻雪作为服务端\",{\"1\":{\"4\":1}}],[\"则该文件夹不会被识别为资源包\",{\"1\":{\"39\":1}}],[\"并且应该在metadata\",{\"1\":{\"39\":1}}],[\"并且不用修改源代码\",{\"1\":{\"38\":1}}],[\"└─\",{\"1\":{\"39\":1}}],[\"└───\",{\"1\":{\"39\":1}}],[\"└─resource\",{\"1\":{\"39\":2}}],[\"├─templates\",{\"1\":{\"39\":1}}],[\"├─metadata\",{\"1\":{\"39\":2}}],[\"正常的路径应该是这样的\",{\"1\":{\"39\":1}}],[\"注意不要嵌套文件夹\",{\"1\":{\"39\":1}}],[\"只需要将其解压到根目录resources目录下即可\",{\"1\":{\"39\":1}}],[\"只负责处理和回应消息\",{\"1\":{\"9\":1}}],[\"zip格式压缩的\",{\"1\":{\"39\":1}}],[\"zh\",{\"1\":{\"3\":1}}],[\"欢迎各位投稿资源包到轻雪资源商店\",{\"1\":{\"38\":1}}],[\"讲起打包成一个新的资源包\",{\"1\":{\"38\":1}}],[\"仅需按照原有路径进行文件替换即刻\",{\"1\":{\"38\":1}}],[\"仅包含硬件信息和运行软件版本\",{\"1\":{\"3\":1}}],[\"那么加载b包后\",{\"1\":{\"39\":1}}],[\"那么你能够很快就上手\",{\"1\":{\"38\":1}}],[\"那么将会被解析为nickname而不是命令\",{\"1\":{\"9\":1}}],[\"主题商店提供了一些资源包供你选择\",{\"1\":{\"38\":1}}],[\"资源\",{\"1\":{\"38\":1}}],[\"资源包加载遵循一个优先级\",{\"1\":{\"39\":1}}],[\"资源包描述\",{\"1\":{\"39\":1}}],[\"资源包名称\",{\"1\":{\"39\":1}}],[\"资源包通常是以\",{\"1\":{\"39\":1}}],[\"资源包的制作很简单\",{\"1\":{\"38\":1}}],[\"资源包\",{\"0\":{\"37\":1},\"1\":{\"30\":1,\"38\":1}}],[\"它允许你一定程度上自定义轻雪的外观\",{\"1\":{\"38\":1}}],[\"语言包等\",{\"1\":{\"38\":1}}],[\"亦可根据用途称为主题包\",{\"1\":{\"38\":1}}],[\"简介\",{\"0\":{\"38\":1}}],[\"个人全局生效\",{\"1\":{\"35\":1}}],[\"个人信息\",{\"1\":{\"31\":1}}],[\"绑定查询城市\",{\"1\":{\"35\":1}}],[\"绑定端口\",{\"1\":{\"3\":1}}],[\"海淀\",{\"1\":{\"35\":1}}],[\"北京\",{\"1\":{\"35\":1}}],[\"天气\",{\"1\":{\"35\":2}}],[\"功能插件命令\",{\"0\":{\"34\":1}}],[\"功能命令\",{\"0\":{\"33\":1}}],[\"~代替\",{\"1\":{\"31\":1}}],[\"~可以使用插件\",{\"1\":{\"31\":1}}],[\"命令\",{\"1\":{\"35\":1}}],[\"命令别名\",{\"1\":{\"31\":1}}],[\"命令前有\",{\"0\":{\"28\":1}}],[\"参数\",{\"1\":{\"31\":1}}],[\"参考值\",{\"1\":{\"4\":1}}],[\"获取用户信息\",{\"1\":{\"31\":1}}],[\"无法将其阻止\",{\"1\":{\"30\":1}}],[\"无法连接可以用https\",{\"1\":{\"17\":1}}],[\"对于不同资源包的不同文件\",{\"1\":{\"39\":1}}],[\"对于主动推送消息的插件\",{\"1\":{\"30\":1}}],[\"对公网开放时建议设置\",{\"1\":{\"3\":1}}],[\"受限于nonebot的钩子函数\",{\"1\":{\"30\":1}}],[\"列表\",{\"1\":{\"30\":1}}],[\"列出\",{\"1\":{\"30\":1}}],[\"列出插件\",{\"1\":{\"30\":1}}],[\"列出所有资源包\",{\"1\":{\"30\":1}}],[\"列出所有插件\",{\"1\":{\"30\":1}}],[\"更改\",{\"1\":{\"30\":1}}],[\"更新\",{\"1\":{\"30\":1}}],[\"更新插件索引\",{\"1\":{\"30\":1}}],[\"更新轻雪\",{\"1\":{\"29\":2}}],[\"加载\",{\"1\":{\"30\":1}}],[\"加载资源包\",{\"0\":{\"39\":1},\"1\":{\"30\":1}}],[\"停用\",{\"1\":{\"30\":1}}],[\"启用\",{\"1\":{\"30\":1}}],[\"启动python\",{\"1\":{\"17\":1}}],[\"搜索\",{\"1\":{\"30\":1}}],[\"插件列表\",{\"1\":{\"30\":1}}],[\"插件管理\",{\"1\":{\"30\":1}}],[\"插件商店\",{\"1\":{\"30\":1}}],[\"插件信息\",{\"1\":{\"24\":1}}],[\"卸载\",{\"1\":{\"30\":2}}],[\"卸载资源包\",{\"1\":{\"30\":1}}],[\"卸载插件\",{\"1\":{\"30\":1}}],[\"全局停用\",{\"1\":{\"30\":1}}],[\"全局启用\",{\"1\":{\"30\":1}}],[\"全局启用插件\",{\"1\":{\"30\":1}}],[\"全局禁用插件\",{\"1\":{\"30\":1}}],[\"当前会话禁用插件\",{\"1\":{\"30\":1}}],[\"当前会话启用插件\",{\"1\":{\"30\":1}}],[\"enable\",{\"1\":{\"30\":4}}],[\"通过关键词搜索插件\",{\"1\":{\"30\":1}}],[\">\",{\"1\":{\"30\":1,\"35\":2}}],[\"<param>为必填参数\",{\"1\":{\"31\":1}}],[\"<plugin\",{\"1\":{\"30\":6}}],[\"<resource\",{\"1\":{\"30\":3}}],[\"<keywords\",{\"1\":{\"30\":1,\"35\":2}}],[\"<key>\",{\"1\":{\"29\":1,\"31\":2}}],[\"设置用户信息或打开属性设置菜单\",{\"1\":{\"31\":1}}],[\"设置\",{\"1\":{\"29\":1,\"31\":1}}],[\"设备要求\",{\"0\":{\"16\":1}}],[\"设备上python环境太乱了\",{\"1\":{\"9\":1}}],[\"重启轻雪\",{\"1\":{\"29\":1}}],[\"重载\",{\"1\":{\"30\":1}}],[\"重载所有资源包\",{\"1\":{\"30\":1}}],[\"重载资源\",{\"1\":{\"29\":2}}],[\"重载轻雪\",{\"1\":{\"29\":1}}],[\"别名\",{\"1\":{\"29\":1,\"30\":1,\"31\":1,\"35\":1}}],[\"别用你那b\",{\"1\":{\"16\":1}}],[\"将会使用配置文件中的配置\",{\"1\":{\"29\":1}}],[\"将消息按照onebot标准处理好上报给轻雪\",{\"1\":{\"9\":1}}],[\"上述两个命令修改的配置项在数据库中保存\",{\"1\":{\"29\":1}}],[\"disable\",{\"1\":{\"30\":4}}],[\"docs\",{\"1\":{\"29\":2}}],[\"description\",{\"1\":{\"39\":1}}],[\"device\",{\"1\":{\"3\":1}}],[\"default\",{\"1\":{\"3\":1}}],[\"后者更大但有失败的可能\",{\"1\":{\"29\":1}}],[\"在b中定义了templates\",{\"1\":{\"39\":1}}],[\"在普通图片和markdown图片之间切换\",{\"1\":{\"29\":1}}],[\"在某些情况下\",{\"1\":{\"5\":1}}],[\"505468b及以后的lagrange\",{\"1\":{\"29\":1}}],[\"该功能需要commit\",{\"1\":{\"29\":1}}],[\"该功能仅供参考\",{\"0\":{\"18\":1}}],[\"切换图片模式\",{\"1\":{\"29\":2}}],[\"切换目录cd\",{\"1\":{\"17\":1}}],[\"查询目标地天气\",{\"1\":{\"35\":1}}],[\"查询\",{\"1\":{\"29\":1,\"31\":1}}],[\"查询配置项\",{\"1\":{\"29\":1}}],[\"查看用户信息菜单\",{\"1\":{\"31\":1}}],[\"查看轻雪文档\",{\"1\":{\"29\":1}}],[\"查看当前bot\",{\"1\":{\"29\":1}}],[\"key\",{\"1\":{\"29\":1,\"35\":1}}],[\"以便于转换为正确的值\",{\"1\":{\"29\":1}}],[\"以上内容仅用于项目的优化\",{\"1\":{\"24\":1}}],[\"输入值会被执行\",{\"1\":{\"29\":1}}],[\"输入playwright\",{\"1\":{\"9\":1}}],[\"添加配置项\",{\"1\":{\"29\":1}}],[\"unload\",{\"1\":{\"30\":2}}],[\"uninstall\",{\"1\":{\"30\":2}}],[\"update\",{\"1\":{\"29\":2,\"30\":2}}],[\"use\",{\"1\":{\"3\":2}}],[\"为可选参数\",{\"1\":{\"31\":1}}],[\"为私聊可用\",{\"0\":{\"28\":1}}],[\"为什么我启动后机器人没有反应\",{\"1\":{\"9\":1}}],[\"分别为群主和群管可用\",{\"0\":{\"28\":1}}],[\"分发\",{\"1\":{\"24\":1}}],[\"的表示仅超级用户可用\",{\"0\":{\"28\":1}}],[\"基础插件命令\",{\"0\":{\"27\":1}}],[\"基础命令\",{\"0\":{\"26\":1}}],[\"基于\",{\"1\":{\"10\":1}}],[\"基于node\",{\"1\":{\"10\":1}}],[\"基于ntqq的onebot实现\",{\"1\":{\"10\":1}}],[\"基于lsposed的onebot11实现\",{\"1\":{\"10\":1}}],[\"但请保证以上三个字段\",{\"1\":{\"39\":1}}],[\"但请注意甄别第三方插件的安全性\",{\"1\":{\"24\":1}}],[\"但是优先级低于配置文件\",{\"1\":{\"29\":1}}],[\"但是请保留原作者信息\",{\"1\":{\"24\":1}}],[\"但是bot昵称有一个help\",{\"1\":{\"9\":1}}],[\"但是推荐使用反向websocket\",{\"1\":{\"5\":1}}],[\"但是基本上都是一样的\",{\"1\":{\"4\":1}}],[\"且通过安全的方式传输到轻雪的服务器\",{\"1\":{\"24\":1}}],[\"会话负载信息\",{\"1\":{\"24\":1}}],[\"系统信息\",{\"1\":{\"24\":1}}],[\"运行环境的设备信息\",{\"1\":{\"24\":1}}],[\"轻雪原版资源包请查看liteyukibot\",{\"1\":{\"38\":1}}],[\"轻雪天气\",{\"0\":{\"35\":1}}],[\"轻雪用户管理\",{\"0\":{\"31\":1}}],[\"轻雪包管理器\",{\"0\":{\"30\":1}}],[\"轻雪文档\",{\"1\":{\"29\":1}}],[\"轻雪\",{\"0\":{\"29\":1}}],[\"轻雪会收集以下内容\",{\"1\":{\"24\":1}}],[\"轻雪配置项\",{\"0\":{\"3\":1}}],[\"修改优先级\",{\"1\":{\"30\":1}}],[\"修改\",{\"1\":{\"24\":1}}],[\"用户协议\",{\"0\":{\"24\":1}}],[\"用于保护隐私\",{\"1\":{\"3\":1}}],[\"不带key返回配置项列表\",{\"1\":{\"29\":1}}],[\"不包含任何隐私信息\",{\"1\":{\"24\":1}}],[\"不含隐私部分\",{\"1\":{\"24\":1}}],[\"不含插件数据\",{\"1\":{\"24\":1}}],[\"不是liteyukibot官方提供的功能\",{\"0\":{\"18\":1}}],[\"不同的实现端给出的字段可能不同\",{\"1\":{\"4\":1}}],[\"克隆项目\",{\"1\":{\"17\":1}}],[\"环境\",{\"1\":{\"17\":1}}],[\"和风天气的天气key\",{\"1\":{\"35\":1}}],[\"和10是不一样的\",{\"1\":{\"29\":1}}],[\"和\",{\"0\":{\"28\":1},\"1\":{\"17\":1}}],[\"开始安装\",{\"0\":{\"17\":1}}],[\"具体查看插件文档\",{\"1\":{\"16\":1}}],[\"某些插件需要gpu支持\",{\"1\":{\"16\":1}}],[\"某些控制台字体不可用\",{\"1\":{\"3\":1}}],[\"原生轻雪无需gpu\",{\"1\":{\"16\":1}}],[\"原生实现\",{\"1\":{\"10\":1}}],[\"至少1gb空间\",{\"1\":{\"16\":1}}],[\"至少1vcpu\",{\"1\":{\"16\":1}}],[\"硬盘\",{\"1\":{\"16\":1}}],[\"建议1gb以上\",{\"1\":{\"16\":1}}],[\"建议开启\",{\"1\":{\"3\":1}}],[\"b包也定义了一个index\",{\"1\":{\"39\":1}}],[\"bind\",{\"1\":{\"35\":1}}],[\"bot无其他插件会占用100mb\",{\"1\":{\"16\":1}}],[\"brand\",{\"1\":{\"3\":1}}],[\"内存\",{\"1\":{\"16\":1,\"24\":1}}],[\"内存总数\",{\"1\":{\"3\":1}}],[\"8+\",{\"1\":{\"16\":1}}],[\"weather\",{\"1\":{\"35\":4}}],[\"windows\",{\"1\":{\"16\":1}}],[\"windows系统版本最低windows10+\",{\"1\":{\"16\":1}}],[\"ws\",{\"1\":{\"4\":2}}],[\"安装插件\",{\"1\":{\"30\":1}}],[\"安装依赖pip\",{\"1\":{\"17\":1}}],[\"安装\",{\"0\":{\"15\":1},\"1\":{\"17\":1,\"30\":1,\"31\":1},\"2\":{\"20\":1}}],[\"html中用\",{\"1\":{\"39\":1}}],[\"html\",{\"1\":{\"39\":1}}],[\"html文件会被覆盖\",{\"1\":{\"39\":1}}],[\"html文件\",{\"1\":{\"39\":2}}],[\"htmlrender提供的渲染功能\",{\"1\":{\"12\":1}}],[\"https\",{\"1\":{\"17\":1}}],[\"host\",{\"1\":{\"3\":1}}],[\"鸣谢\",{\"0\":{\"12\":1}}],[\"使用此项目代表你已经同意以上协议\",{\"1\":{\"24\":1}}],[\"使用手册\",{\"0\":{\"22\":1},\"2\":{\"23\":1,\"25\":1,\"32\":1,\"36\":1,\"40\":1}}],[\"使用其他项目连接请先自行查阅文档\",{\"1\":{\"11\":1}}],[\"使用指南\",{\"2\":{\"6\":1,\"13\":1,\"19\":1}}],[\"支持onebotv11标准\",{\"1\":{\"11\":1}}],[\"支持i18n部分语言和自行扩展的语言代码\",{\"1\":{\"3\":1}}],[\"我们专门为minecraft开发的服务器bot\",{\"1\":{\"11\":1}}],[\"然后给轻雪传输数据\",{\"1\":{\"10\":1}}],[\"然后用\",{\"1\":{\"9\":1}}],[\"看着qq的消息\",{\"1\":{\"10\":1}}],[\"自己整一个websocket客户端\",{\"1\":{\"10\":1}}],[\"人工实现的onebot协议\",{\"1\":{\"10\":1}}],[\"global\",{\"1\":{\"30\":4}}],[\"get\",{\"1\":{\"29\":2,\"31\":2}}],[\"gensokyo\",{\"1\":{\"10\":1}}],[\"gitee\",{\"1\":{\"17\":1}}],[\"github\",{\"1\":{\"17\":1}}],[\"git\",{\"1\":{\"17\":2}}],[\"gpu\",{\"1\":{\"16\":1}}],[\"golang\",{\"1\":{\"10\":1}}],[\"go语言实现的onebot11实现端\",{\"1\":{\"10\":1}}],[\"go\",{\"1\":{\"10\":1}}],[\"目前只能阻断消息事件的传入\",{\"1\":{\"30\":1}}],[\"目前可用性较低\",{\"1\":{\"10\":1}}],[\"目前markdown消息支持lagrange\",{\"1\":{\"10\":1}}],[\"可使用ws\",{\"1\":{\"10\":1}}],[\"可以在a的index\",{\"1\":{\"39\":1}}],[\"可以在此基础上进行修改\",{\"1\":{\"38\":1}}],[\"可以在配置文件中把auto\",{\"1\":{\"24\":1}}],[\"可以使用正向websocket主动连接实现端\",{\"1\":{\"5\":1}}],[\"可以更好的控制连接\",{\"1\":{\"5\":1}}],[\"js\",{\"1\":{\"10\":1}}],[\"yml文件\",{\"1\":{\"39\":1}}],[\"yml中填写一些信息\",{\"1\":{\"39\":1}}],[\"yml中修改配置项后重启轻雪\",{\"1\":{\"3\":1}}],[\"yml\",{\"1\":{\"39\":2}}],[\"yunzai\",{\"1\":{\"10\":1}}],[\"option\",{\"1\":{\"31\":1}}],[\"openshamrock\",{\"1\":{\"10\":1}}],[\"o\",{\"0\":{\"28\":1}}],[\"onebot实现端配置\",{\"0\":{\"4\":1}}],[\"onebot\",{\"1\":{\"3\":1,\"4\":1,\"10\":2,\"29\":1}}],[\"需要官方机器人权限\",{\"1\":{\"10\":1}}],[\"需要安装ntqq\",{\"1\":{\"10\":1}}],[\"需手动添加\",{\"1\":{\"3\":1}}],[\"qq官方机器人api\",{\"1\":{\"10\":1}}],[\"qq\",{\"0\":{\"10\":1}}],[\"推荐私聊使用\",{\"1\":{\"29\":1}}],[\"推荐ubuntu\",{\"1\":{\"16\":1}}],[\"推荐方案\",{\"0\":{\"10\":1,\"11\":1}}],[\"推荐使用反向ws协议进行通信\",{\"1\":{\"4\":1}}],[\"下面已经列出一些推荐的实现端\",{\"1\":{\"9\":1}}],[\"实现端本身不负责处理响应逻辑\",{\"1\":{\"9\":1}}],[\"实现端与轻雪的通信方式不局限为反向websocket\",{\"1\":{\"5\":1}}],[\"提供\",{\"1\":{\"9\":1}}],[\"登录功能由实现端\",{\"1\":{\"9\":1}}],[\"本项目不会收集用户的任何隐私信息\",{\"1\":{\"24\":1}}],[\"本项目不负责实现登录功能\",{\"1\":{\"9\":1}}],[\"本项目遵循mit协议\",{\"1\":{\"24\":1}}],[\"本机默认为127\",{\"1\":{\"4\":1}}],[\"例如你在a中定义了templates\",{\"1\":{\"39\":1}}],[\"例如html\",{\"1\":{\"38\":1}}],[\"例如\",{\"1\":{\"35\":1,\"39\":1}}],[\"例如npm\",{\"1\":{\"31\":1}}],[\"例如ai绘画之类的\",{\"1\":{\"16\":1}}],[\"例如qq\",{\"1\":{\"9\":1}}],[\"例如一个命令是help\",{\"1\":{\"9\":1}}],[\"怎么登录聊天平台\",{\"1\":{\"9\":1}}],[\"冲突\",{\"1\":{\"9\":1}}],[\"确认命令头没有和nickname\",{\"1\":{\"9\":1}}],[\"确认你有权限使用命令并按照正确的命令发送\",{\"1\":{\"9\":1}}],[\"其中\",{\"1\":{\"9\":1}}],[\"其他插件占用视具体插件而定\",{\"1\":{\"16\":1}}],[\"其他通信方式\",{\"0\":{\"5\":1}}],[\"其他nonebot插件的配置项\",{\"1\":{\"3\":1}}],[\"rpm\",{\"1\":{\"30\":6}}],[\"resources\",{\"1\":{\"29\":2,\"38\":1,\"39\":1}}],[\"reload\",{\"1\":{\"29\":4,\"30\":2}}],[\"requirements\",{\"1\":{\"9\":1,\"17\":2}}],[\"report设定为false\",{\"1\":{\"24\":1}}],[\"report\",{\"1\":{\"3\":1,\"24\":1}}],[\"r\",{\"1\":{\"9\":1,\"17\":2}}],[\"profile\",{\"1\":{\"31\":4}}],[\"pack\",{\"1\":{\"30\":3,\"39\":2}}],[\"page为页数\",{\"1\":{\"30\":2}}],[\"page\",{\"1\":{\"30\":2}}],[\"path\",{\"1\":{\"9\":3}}],[\"p\",{\"0\":{\"28\":1}}],[\"plugin\",{\"1\":{\"12\":2,\"30\":2}}],[\"plugin进行通信\",{\"1\":{\"10\":1}}],[\"playwright安装失败\",{\"1\":{\"9\":1}}],[\"py\",{\"1\":{\"17\":1,\"39\":1}}],[\"py来启动bot\",{\"1\":{\"9\":1}}],[\"python信息\",{\"1\":{\"24\":1}}],[\"python3\",{\"1\":{\"17\":1}}],[\"python是你要用来运行bot的可执行文件\",{\"1\":{\"9\":1}}],[\"python\",{\"1\":{\"9\":2}}],[\"pip\",{\"1\":{\"9\":1,\"17\":1}}],[\"pip和python不对应怎么办\",{\"1\":{\"9\":1}}],[\"port\",{\"1\":{\"3\":1}}],[\"常见问题\",{\"0\":{\"9\":1}}],[\"答疑\",{\"0\":{\"8\":1}}],[\"比如你在开发轻雪插件时\",{\"1\":{\"5\":1}}],[\"适用于生产环境\",{\"1\":{\"5\":1}}],[\"version\",{\"1\":{\"39\":1}}],[\"v11\",{\"1\":{\"4\":1}}],[\"value\",{\"1\":{\"29\":1,\"31\":1}}],[\"value2\",{\"1\":{\"3\":1}}],[\"value1\",{\"1\":{\"3\":1}}],[\"地址取决于配置文件\",{\"1\":{\"4\":1}}],[\"地址\",{\"1\":{\"4\":1}}],[\"反向websocket的优点是轻雪作为服务端\",{\"1\":{\"5\":1}}],[\"反向websocket\",{\"1\":{\"4\":1}}],[\"协议端\",{\"1\":{\"9\":1}}],[\"协议\",{\"1\":{\"4\":1}}],[\"说明\",{\"1\":{\"4\":1}}],[\"字体包\",{\"1\":{\"38\":1}}],[\"字段\",{\"1\":{\"4\":1}}],[\"字节\",{\"1\":{\"3\":1}}],[\"这里给出一个参考值\",{\"1\":{\"4\":1}}],[\"20\",{\"1\":{\"16\":1}}],[\"2019+\",{\"1\":{\"16\":1}}],[\"20216\",{\"1\":{\"3\":1,\"4\":1}}],[\"2\",{\"1\":{\"3\":1,\"39\":1}}],[\"mode\",{\"1\":{\"29\":2}}],[\"minecraftonebot\",{\"1\":{\"11\":1}}],[\"minecraft\",{\"0\":{\"11\":1}}],[\"main\",{\"1\":{\"9\":1,\"17\":1,\"39\":1}}],[\"m\",{\"1\":{\"9\":1,\"17\":1}}],[\"mem\",{\"1\":{\"3\":1}}],[\"mhz\",{\"1\":{\"3\":1}}],[\"3600\",{\"1\":{\"3\":1}}],[\"32768000000\",{\"1\":{\"3\":1}}],[\"32\",{\"1\":{\"3\":1}}],[\"found\",{\"1\":{\"41\":1}}],[\"false\",{\"1\":{\"3\":2}}],[\"fake\",{\"1\":{\"3\":1}}],[\"frequency\",{\"1\":{\"3\":1}}],[\"逻辑核心数\",{\"1\":{\"3\":1}}],[\"物理核心数\",{\"1\":{\"3\":1}}],[\"统计卡片显示的虚假设备信息\",{\"1\":{\"3\":1}}],[\"a包中的index\",{\"1\":{\"39\":1}}],[\"aosp\",{\"1\":{\"30\":2}}],[\"a\",{\"0\":{\"28\":1}}],[\"address\",{\"1\":{\"4\":1}}],[\"alconna提供的命令解析功能\",{\"1\":{\"12\":1}}],[\"alconna是否自动补全指令\",{\"1\":{\"3\":1}}],[\"alconna是否使用默认指令前缀\",{\"1\":{\"3\":1}}],[\"alconna\",{\"1\":{\"3\":2}}],[\"amd\",{\"1\":{\"3\":1}}],[\"auto\",{\"1\":{\"3\":2}}],[\"accesstoken\",{\"1\":{\"4\":1}}],[\"access\",{\"1\":{\"3\":1}}],[\"txt\",{\"1\":{\"17\":2}}],[\"txt来安装依赖\",{\"1\":{\"9\":1}}],[\"trss\",{\"1\":{\"10\":1}}],[\"true\",{\"1\":{\"3\":2}}],[\"tokyo\",{\"1\":{\"35\":1}}],[\"token\",{\"1\":{\"3\":1}}],[\"to\",{\"1\":{\"9\":3}}],[\"total\",{\"1\":{\"3\":1}}],[\"image\",{\"1\":{\"29\":2}}],[\"index\",{\"1\":{\"39\":1}}],[\"install安装浏览器\",{\"1\":{\"9\":1}}],[\"install\",{\"1\":{\"9\":1,\"17\":2,\"30\":2,\"31\":1}}],[\"info\",{\"1\":{\"3\":2}}],[\"icon\",{\"1\":{\"3\":1}}],[\"日志等级\",{\"1\":{\"3\":1}}],[\"默认开启\",{\"1\":{\"24\":1}}],[\"默认false\",{\"1\":{\"3\":2}}],[\"默认语言\",{\"1\":{\"3\":1}}],[\"默认为本机\",{\"1\":{\"3\":1}}],[\"css相对路径引用b中的css\",{\"1\":{\"39\":1}}],[\"css\",{\"1\":{\"38\":1,\"39\":1}}],[\"city\",{\"1\":{\"35\":1}}],[\"change\",{\"1\":{\"30\":2}}],[\"clone\",{\"1\":{\"17\":1}}],[\"centos\",{\"1\":{\"16\":2}}],[\"cqhttp\",{\"1\":{\"10\":1}}],[\"custom\",{\"1\":{\"3\":4}}],[\"config\",{\"1\":{\"3\":2,\"29\":3}}],[\"com\",{\"1\":{\"17\":2}}],[\"completion\",{\"1\":{\"3\":1}}],[\"command\",{\"1\":{\"3\":3}}],[\"cores\",{\"1\":{\"3\":2}}],[\"cpu主频\",{\"1\":{\"3\":1}}],[\"cpu\",{\"1\":{\"3\":1,\"16\":1,\"24\":1}}],[\"cn\",{\"1\":{\"3\":1}}],[\"load\",{\"1\":{\"30\":2}}],[\"logical\",{\"1\":{\"3\":1}}],[\"log\",{\"1\":{\"3\":2}}],[\"list\",{\"1\":{\"30\":4}}],[\"liteecho\",{\"1\":{\"29\":1}}],[\"liteyukibot\",{\"1\":{\"17\":3}}],[\"liteyuki\",{\"1\":{\"3\":1,\"29\":6,\"38\":1}}],[\"linux系统要支持python3\",{\"1\":{\"16\":1}}],[\"llonebot\",{\"1\":{\"10\":1}}],[\"lagrange\",{\"1\":{\"10\":1}}],[\"language\",{\"1\":{\"3\":1}}],[\"level\",{\"1\":{\"3\":1}}],[\"访问令牌\",{\"1\":{\"3\":1}}],[\"如果你接触过minecraft的资源包\",{\"1\":{\"38\":1}}],[\"如果你给轻雪配置了accesstoken\",{\"1\":{\"4\":1}}],[\"如果配置文件中存在相同的配置项\",{\"1\":{\"29\":1}}],[\"如果多个python环境请指定后安装pythonx\",{\"1\":{\"17\":1}}],[\"如果不确定字段的含义\",{\"1\":{\"3\":1}}],[\"如要自定义请手动修改\",{\"1\":{\"3\":1}}],[\"未列出的配置项\",{\"1\":{\"3\":1}}],[\"超级用户\",{\"1\":{\"3\":1}}],[\"style\",{\"1\":{\"39\":2}}],[\"start或superusers\",{\"1\":{\"9\":1}}],[\"start保证alconna解析正常\",{\"1\":{\"3\":1}}],[\"start\",{\"1\":{\"3\":2}}],[\"shinjuku\",{\"1\":{\"35\":1}}],[\"switch\",{\"1\":{\"29\":2}}],[\"search\",{\"1\":{\"30\":2}}],[\"set\",{\"1\":{\"29\":2,\"31\":2}}],[\"server\",{\"1\":{\"16\":1}}],[\"s\",{\"0\":{\"28\":1},\"1\":{\"29\":7,\"30\":11}}],[\"snowykami\",{\"1\":{\"17\":2}}],[\"superusers\",{\"1\":{\"3\":1}}],[\"机器人昵称\",{\"1\":{\"3\":1}}],[\"not\",{\"1\":{\"41\":1}}],[\"nonebot\",{\"1\":{\"12\":2}}],[\"nonebot2提供的框架支持\",{\"1\":{\"12\":1}}],[\"nonebot插件配置项也可以写在此\",{\"0\":{\"3\":1}}],[\"name\",{\"1\":{\"39\":1}}],[\"name>\",{\"1\":{\"30\":9}}],[\"num为每页显示数量\",{\"1\":{\"30\":2}}],[\"num\",{\"1\":{\"30\":2}}],[\"npm\",{\"1\":{\"30\":5}}],[\"nps\",{\"1\":{\"30\":5}}],[\"ntqq的onebot插件\",{\"1\":{\"10\":1}}],[\"nickname\",{\"1\":{\"3\":1}}],[\"若存在则会覆盖\",{\"1\":{\"29\":1}}],[\"若你不希望提供这些信息\",{\"1\":{\"24\":1}}],[\"若有困难请联系对应开发者而不是liteyuki的开发者\",{\"1\":{\"11\":1}}],[\"若要对外开放请填写0\",{\"1\":{\"3\":1}}],[\"若没有metadata\",{\"1\":{\"39\":1}}],[\"若没有\",{\"1\":{\"3\":1}}],[\"监听地址\",{\"1\":{\"3\":1}}],[\"10\",{\"1\":{\"29\":1}}],[\"10+\",{\"1\":{\"16\":1,\"17\":1}}],[\"16\",{\"1\":{\"3\":1}}],[\"1919810\",{\"1\":{\"3\":1}}],[\"1\",{\"1\":{\"3\":2,\"4\":1,\"39\":2}}],[\"127\",{\"1\":{\"3\":1}}],[\"04+\",{\"1\":{\"16\":1}}],[\"0或者你的公网ip\",{\"1\":{\"3\":1}}],[\"0\",{\"1\":{\"3\":4,\"4\":2,\"39\":2}}],[\"请检查配置文件的command\",{\"1\":{\"9\":1}}],[\"请使用\",{\"1\":{\"9\":1}}],[\"请在此填写相同的值\",{\"1\":{\"4\":1}}],[\"请开启alconna\",{\"1\":{\"3\":1}}],[\"请不要修改\",{\"1\":{\"3\":1}}],[\"空命令头\",{\"1\":{\"3\":1}}],[\"指令前缀\",{\"1\":{\"3\":1}}],[\"生成文件的配置项\",{\"1\":{\"3\":1}}],[\"部分内容制作需要一点点前端基础\",{\"1\":{\"38\":1}}],[\"部分异常信息\",{\"1\":{\"24\":1}}],[\"部分在自动生成配置文件中未列出\",{\"1\":{\"3\":1}}],[\"部署\",{\"2\":{\"1\":1,\"7\":1,\"14\":1}}],[\"你在a包中定义了一个index\",{\"1\":{\"39\":1}}],[\"你自己制作的资源包也应该遵循这个规则\",{\"1\":{\"39\":1}}],[\"你也可以自己制作资源包\",{\"1\":{\"38\":1}}],[\"你也可以使用正向websocket\",{\"1\":{\"5\":1}}],[\"你可以自定义一些信息\",{\"1\":{\"39\":1}}],[\"你可以自由使用\",{\"1\":{\"24\":1}}],[\"你可以选择开启auto\",{\"1\":{\"24\":1}}],[\"你可以在config\",{\"1\":{\"3\":1}}],[\"你需要使用onebot标准的实现端来连接到轻雪并将消息上报给轻雪\",{\"1\":{\"9\":1}}],[\"你有这个问题说明你不是很了解这个项目\",{\"1\":{\"9\":1}}],[\"你只需要修改superusers和nickname\",{\"1\":{\"3\":1}}],[\"绝大多数情况下\",{\"1\":{\"3\":1}}],[\"应为小写\",{\"0\":{\"3\":1}}],[\"与dotenv格式不同\",{\"0\":{\"3\":1}}],[\"配置项\",{\"1\":{\"35\":1}}],[\"配置了命令别名的命令可以使用别名代替原命令\",{\"1\":{\"31\":1}}],[\"配置文件会在首次启动后生成\",{\"1\":{\"3\":1}}],[\"配置\",{\"0\":{\"2\":1},\"1\":{\"29\":1},\"2\":{\"7\":1,\"14\":1}}],[\"项目部署\",{\"0\":{\"0\":1}}]],\"serializationVersion\":2}}")).map(([e,t])=>[e,zt(t,{fields:["h","t","c"],storeFields:["h","t","c"]})]));self.onmessage=({data:{type:e="all",query:t,locale:s,options:n,id:o}})=>{const u=bt[s];e==="suggest"?self.postMessage([e,o,tt(t,u,n)]):e==="search"?self.postMessage([e,o,Z(t,u,n)]):self.postMessage({suggestions:[e,o,tt(t,u,n)],results:[e,o,Z(t,u,n)]})};
//# sourceMappingURL=index.js.map