Files
my-vault/.obsidian/plugins/omnisearch/main.js
T

175 lines
701 KiB
JavaScript
Raw Normal View History

2026-01-05 13:03:55 +08:00
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var pT=Object.create;var Ul=Object.defineProperty;var mT=Object.getOwnPropertyDescriptor;var AT=Object.getOwnPropertyNames;var gT=Object.getPrototypeOf,bT=Object.prototype.hasOwnProperty;var C=(e,t)=>()=>(e&&(t=e(e=0)),t);var ka=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Ul(e,r,{get:t[r],enumerable:!0})},Yg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of AT(t))!bT.call(e,i)&&i!==r&&Ul(e,i,{get:()=>t[i],enumerable:!(n=mT(t,i))||n.enumerable});return e};var Qn=(e,t,r)=>(r=e!=null?pT(gT(e)):{},Yg(t||!e||!e.__esModule?Ul(r,"default",{value:e,enumerable:!0}):r,e)),Zd=e=>Yg(Ul({},"__esModule",{value:!0}),e);var Kg=C(()=>{});var Ai=C(()=>{Kg();typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5")});var Ui,It,An,$l,Bo,Xd,ft=C(()=>{Ui={},It=Symbol("uninitialized"),An=Symbol("filename"),$l="http://www.w3.org/1999/xhtml",Bo="http://www.w3.org/2000/svg",Xd="http://www.w3.org/1998/Math/MathML"});var Yl,Qg=C(()=>{Yl=!0});var Wg,G,Gg=C(()=>{Wg=globalThis.process?.env?.NODE_ENV,G=Wg&&!Wg.toLowerCase().startsWith("prod")});var Vg=C(()=>{});var Xe=C(()=>{Qg();Gg();Vg()});function Wu(e){return typeof e=="function"}function Jg(e){return e()}function Ts(e){for(var t=0;t<e.length;t++)e[t]()}function Ql(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}var gi,qg,Qu,ys,eh,_r,Br,Kl,th,zg,Ra,rh,Pt,ot=C(()=>{gi=Array.isArray,qg=Array.prototype.indexOf,Qu=Array.prototype.includes,ys=Array.from,eh=Object.keys,_r=Object.defineProperty,Br=Object.getOwnPropertyDescriptor,Kl=Object.getOwnPropertyDescriptors,th=Object.prototype,zg=Array.prototype,Ra=Object.getPrototypeOf,rh=Object.isExtensible;Pt=()=>{}});var Xt,ws,jg,Wl,Gl,Lo,Fo,Po,Gu,nh,lu,ih,Oa,Dn,We=C(()=>{Xt=Symbol("$state"),ws=Symbol("legacy props"),jg=Symbol(""),Wl=Symbol("proxy path"),Gl=Symbol("attributes"),Lo=Symbol("class"),Fo=Symbol("style"),Po=Symbol("text"),Gu=Symbol("form reset"),nh=Symbol("hmr anchor"),lu=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ih=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Oa=3,Dn=8});function Zg(e){if(G){let t=new Error(`invariant_violation
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${e}"
https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function Is(e){if(G){let t=new Error(`lifecycle_outside_component
2026-01-05 13:03:55 +08:00
\`${e}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Mo=C(()=>{Xe()});function e1(){if(G){let e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function uh(){if(G){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function t1(){if(G){let e=new Error(`derived_references_self
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function ah(e,t,r){if(G){let n=new Error(`each_key_duplicate
${r?`Keyed each block has duplicate key \`${r}\` at indexes ${e} and ${t}`:`Keyed each block has duplicate key at indexes ${e} and ${t}`}
https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function r1(e,t,r){if(G){let n=new Error(`each_key_volatile
Keyed each block has key that is not idempotent \u2014 the key for item at index ${e} was \`${t}\` but is now \`${r}\`. Keys must be the same each time for a given item
https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function n1(e){if(G){let t=new Error(`effect_in_teardown
\`${e}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function i1(){if(G){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function u1(e){if(G){let t=new Error(`effect_orphan
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function a1(){if(G){let e=new Error(`effect_update_depth_exceeded
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function s1(){if(G){let e=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function o1(e){if(G){let t=new Error(`props_invalid_value
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function c1(e){if(G){let t=new Error(`rune_outside_svelte
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function l1(){if(G){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function f1(){if(G){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function d1(){if(G){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function h1(){if(G){let e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Er=C(()=>{Xe();Mo()});function p1(e){G?console.warn(`%c[svelte] await_reactivity_loss
%cDetected reactivity loss when reading \`${e}\`. This happens when state is read in an async function after an earlier \`await\`
https://svelte.dev/e/await_reactivity_loss`,$i,Yi):console.warn("https://svelte.dev/e/await_reactivity_loss")}function m1(e,t){G?console.warn(`%c[svelte] await_waterfall
%cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
https://svelte.dev/e/await_waterfall`,$i,Yi):console.warn("https://svelte.dev/e/await_waterfall")}function A1(){G?console.warn(`%c[svelte] derived_inert
%cReading a derived belonging to a now-destroyed effect may result in stale values
https://svelte.dev/e/derived_inert`,$i,Yi):console.warn("https://svelte.dev/e/derived_inert")}function g1(e,t,r){G?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,$i,Yi):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function b1(e){G?console.warn(`%c[svelte] hydration_html_changed
%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
https://svelte.dev/e/hydration_html_changed`,$i,Yi):console.warn("https://svelte.dev/e/hydration_html_changed")}function Vu(e){G?console.warn(`%c[svelte] hydration_mismatch
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,$i,Yi):console.warn("https://svelte.dev/e/hydration_mismatch")}function _1(){G?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,$i,Yi):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Vl(e){G?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,$i,Yi):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function E1(){G?console.warn(`%c[svelte] state_proxy_unmount
%cTried to unmount a state proxy, rather than a component
https://svelte.dev/e/state_proxy_unmount`,$i,Yi):console.warn("https://svelte.dev/e/state_proxy_unmount")}function v1(){G?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",$i,Yi):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var $i,Yi,cr=C(()=>{Xe();$i="font-weight: bold",Yi="font-weight: normal"});function Wt(e){de=e}function lt(e){if(e===null)throw Vu(),Ui;return ke=e}function er(){return lt(xr(ke))}function _e(e){if(de){if(xr(ke)!==null)throw Vu(),Ui;ke=e}}function Fr(e=1){if(de){for(var t=e,r=ke;t--;)r=xr(r);ke=r}}function bi(e=!0){for(var t=0,r=ke;;){if(r.nodeType===Dn){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=xr(r);e&&r.remove(),r=i}}function Ds(e){if(!e||e.nodeType!==Dn)throw Vu(),Ui;return e.data}var de,ke,gt=C(()=>{We();ft();cr();tr();de=!1});function ql(e){return e===this.v}function Ho(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function zl(e){return!Ho(e,this.v)}var Uo=C(()=>{});function x1(){Ki=!0}var rr,Ki,_i,on=C(()=>{rr=!1,Ki=!1,_i=!1});var sh=C(()=>{Xe()});var ks=C(()=>{Xe();sh();ot()});function Vr(e,t){return e.label=t,jl(e.v,t),e}function jl(e,t){return e?.[Wl]?.(t),e}var $o,qu=C(()=>{ft();ks();We();Be();Ue();$o=null});function Ei(e){let t=new Error,r=ET();return r.length===0?null:(r.unshift(`
`),_r(t,"stack",{value:r.join(`
`)}),_r(t,"name",{value:e}),t)}function ET(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];let r=t.split(`
`),n=[];for(let i=0;i<r.length;i++){let u=r[i],o=u.replaceAll("\\","/");if(u.trim()!=="Error"){if(u.includes("validate_each_keys"))return[];o.includes("svelte/src/internal")||o.includes("node_modules/.vite")||n.push(u)}}return n}function T1(e,t){if(!G)throw new Error("invariant(...) was not guarded by if (DEV)");e||Zg(t)}var Ba=C(()=>{Xe();ot();Mo()});function du(e){Me=e}function Rs(e){Qi=e}function Zl(e){kn=e}function Pr(e,t=!1,r){Me={p:Me,i:!1,c:null,e:null,s:e,x:null,r:fe,l:Ki&&!t?{s:null,u:null,$:[]}:null},G&&(Me.function=r,kn=r)}function Mr(e){var t=Me,r=t.e;if(r!==null){t.e=null;for(var n of r)oh(n)}return e!==void 0&&(t.x=e),t.i=!0,Me=t.p,G&&(kn=Me?.function??null),e??{}}function Wi(){return!Ki||Me!==null&&Me.l===null}var Me,Qi,kn,Bt=C(()=>{Xe();Er();Ue();Be();on();ft();We();Me=null;Qi=null;kn=null});function w1(){var e=La;La=[],Ts(e)}function Mt(e){if(La.length===0&&!Fa){var t=La;queueMicrotask(()=>{t===La&&w1()})}La.push(e)}function I1(){for(;La.length>0;)w1()}var La,Gn=C(()=>{ot();Hr();La=[]});function Xl(e){var t=fe;if(t===null)return Ce.f|=8388608,e;if(G&&e instanceof Error&&!ch.has(e)&&ch.set(e,vT(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw G&&!t.parent&&e instanceof Error&&C1(e),e;xi(e,t)}function xi(e,t){if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw G&&e instanceof Error&&C1(e),e}}function vT(e,t){let r=Br(e,"message");if(!(r&&!r.configurable)){for(var n=Qo?" ":" ",i=`
${n}in ${t.fn?.name||"<unknown>"}`,u=t.ctx;u!==null;)i+=`
${n}in ${u.function?.[An].split("/").pop()}`,u=u.p;return{message:e.message+`
${i}
`,stack:e.stack?.split(`
`).filter(o=>!o.includes("svelte/src/internal")).join(`
`)}}}function C1(e){let t=ch.get(e);t&&(_r(e,"message",{value:t.message}),_r(e,"stack",{value:t.stack}))}var ch,Ko=C(()=>{Xe();ft();tr();We();ot();Ue();ch=new WeakMap});function pt(e,t){e.f=e.f&xT|t}function Os(e){(e.f&512)!==0||e.deps===null?pt(e,1024):pt(e,4096)}var xT,zu=C(()=>{We();xT=-7169});function S1(e){if(e!==null)for(let t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=65536,S1(t.deps))}function ef(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),S1(e.deps),pt(e,1024)}var lh=C(()=>{We();zu()});function tf(e,t,r){if(e==null)return t(void 0),r&&r(void 0),Pt;let n=Te(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}var fh=C(()=>{Ue();ot()});function Ls(e,t=Pt){let r=null,n=new Set;function i(c){if(Ho(e,c)&&(e=c,r)){let d=!Bs.length;for(let p of n)p[1](),Bs.push(p,e);if(d){for(let p=0;p<Bs.length;p+=2)Bs[p][0](Bs[p+1]);Bs.length=0}}}function u(c){i(c(e))}function o(c,d=Pt){let p=[c,d];return n.add(p),n.size===1&&(r=t(i,u)||Pt),c(e),()=>{n.delete(p),n.size===0&&r&&(r(),r=null)}}return{set:i,update:u,subscribe:o}}function rf(e){let t;return tf(e,r=>t=r)(),t}var Bs,nf=C(()=>{ot();Uo();fh();Bs=[]});function Wo(e,t,r){let n=r[t]??={store:null,source:et(void 0),unsubscribe:Pt};if(G&&(n.source.label=t),n.store!==e&&!(dh in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=Pt;else{var i=!0;n.unsubscribe=tf(e,u=>{i?n.source.v=u:re(n.source,u)}),i=!1}return e&&dh in r?rf(e):R(n.source)}function Go(){let e={};function t(){lr(()=>{for(var r in e)e[r].unsubscribe();_r(e,dh,{enumerable:!1,value:!0})})}return[e,t]}function hh(e){var t=uf;try{return uf=!1,[e(),uf]}finally{uf=t}}var N1,uf,dh,Vo=C(()=>{fh();nf();ot();Ue();Be();zr();Xe();N1=!1,uf=!1,dh=Symbol("unmounted")});var D1=C(()=>{We();ks();Ue()});function af(){k1||(k1=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Gu]?.()})},{capture:!0}))}var k1,sf=C(()=>{gt();tr();Gn();We();k1=!1});function bn(e){var t=Ce,r=fe;ir(null),Ut(null);try{return e()}finally{ir(t),Ut(r)}}function ph(e,t,r,n=r){e.addEventListener(t,()=>bn(r));let i=e[Gu];i?e[Gu]=()=>{i(),n(!0)}:e[Gu]=()=>n(!0),af()}var Rn=C(()=>{Be();Ue();We();sf()});function mh(e){let t=0,r=Jr(0),n;return G&&Vr(r,"createSubscriber version"),()=>{fu()&&(R(r),Vt(()=>(t===0&&(n=Te(()=>e(()=>Pa(r)))),t+=1,()=>{Mt(()=>{t-=1,t===0&&(n?.(),n=void 0,Pa(r))})})))}}var Ah=C(()=>{Ue();Be();zr();qu();Xe();Gn()});function bh(e,t,r,n){new gh(e,t,r,n)}var yT,gh,of=C(()=>{We();ft();Bt();Ko();Be();Ue();gt();Gn();Er();cr();Xe();Hr();zr();qu();Ah();tr();lh();yT=589824;gh=class{parent;is_pending=!1;transform_error;#e;#t=de?ke:null;#r;#o;#u;#a=null;#n=null;#s=null;#i=null;#m=0;#l=0;#f=!1;#d=new Set;#A=new Set;#c=null;#_=mh(()=>(this.#c=Jr(this.#m),G&&Vr(this.#c,"$effect.pending()"),()=>{this.#c=null}));constructor(t,r,n,i){this.#e=t,this.#r=r,this.#o=u=>{var o=fe;o.b=this,o.f|=128,n(u)},this.parent=fe.b,this.transform_error=i??this.parent?.transform_error??(u=>u),this.#u=_n(()=>{if(de){let u=this.#t;er();let o=u.data==="[!";if(u.data.startsWith("[?")){let d=JSON.parse(u.data.slice("[?".length));this.#E(d)}else o?this.#x():this.#g()}else this.#h()},yT),de&&(this.#e=ke)}#g(){try{this.#a=dr(()=>this.#o(this.#e))}catch(t){this.error(t)}}#E(t){let r=this.#r.failed,{reset:n,invoke_onerror:i}=this.#v(t);Mt(i),r&&(this.#s=dr(()=>{r(this.#e,()=>t,()=>n)}))}#v(t){var r=!1,n=!1;let i=()=>{if(r){v1();return}r=!0,n&&h1(),this.#s!==null&&Gi(this.#s,()=>{this.#s=null}),this.#p(()=>{this.#h()})};return{reset:i,invoke_onerror:()=>{try{n=!0,this.#r.onerror?.(t,i),n=!1}catch(o){xi(o,this.#u&&this.#u.parent)}}}}#x(){let t=this.#r.pending;t&&(this.is_pending=!0,this.#n=dr(()=>t(this.#e)),Mt(()=>{var r=this.#i=document.createDocumentFragment(),n=qt();r.append(n),this.#a=this.#p(()=>dr(()=>this.#o(n))),this.#l===0&&(this.#e.before(r),this.#i=null,Gi(this.#n,()=>{this.#n=null}),this.#b(we))}))}#h(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#m=0,this.#a=dr(()=>{this.#o(this.#e)}),this.#l>0){var t=this.#i=document.createDocumentFragm
`).some(c=>c.startsWith("https://svelte.dev/e/")))throw o;return o!==Ui&&console.warn("Failed to hydrate: ",o),t.recover===!1&&s1(),Af(),qo(r),Wt(!1),Va(e,t)}finally{Wt(n),lt(i)}}function hb(e,{target:t,anchor:r,props:n={},events:i,context:u,intro:o=!0,transformError:c}){Af();var d=void 0,p=Z1(()=>{var A=r??t.appendChild(qt());bh(A,{pending:()=>{}},v=>{Pr({});var I=Me;if(u&&(I.c=u),i&&(n.$$events=i),de&&Zr(v,null),Cf=o,d=e(v,n)||{},Cf=!0,de&&(fe.nodes.end=ke,ke===null||ke.nodeType!==Dn||ke.data!=="]"))throw Vu(),Ui;Mr()},c);var g=new Set,_=v=>{for(var I=0;I<v.length;I++){var D=v[I];if(!g.has(D)){g.add(D);var B=db(D);for(let se of[t,document]){var Q=If.get(se);Q===void 0&&(Q=new Map,If.set(se,Q));var H=Q.get(D);H===void 0?(se.addEventListener(D,yf,{passive:B}),Q.set(D,1)):Q.set(D,H+1)}}}};return _(ys(Hh)),vf.add(_),()=>{for(var v of g)for(let B of[t,document]){var I=If.get(B),D=I.get(v);--D==0?(B.removeEventListener(v,yf),I.delete(v),I.size===0&&If.delete(B)):I.set(v,D)}vf.delete(_),A!==r&&A.parentNode?.removeChild(A)}});return $h.set(d,p),d}function Qs(e,t){let r=$h.get(e);return r?($h.delete(e),r(t)):(G&&(Xt in e?E1():_1()),Promise.resolve())}var Cf,If,$h,qa=C(()=>{Xe();tr();ft();Ue();Bt();Be();gt();ot();uc();cr();Er();Xu();ea();We();of();Cf=!0;If=new Map;$h=new WeakMap});var Kh=C(()=>{ea();sh();Mo();Mo()});var zi,za=C(()=>{Hr();Be();We();gt();tr();Xe();zi=class{anchor;#e=new Map;#t=new Map;#r=new Map;#o=new Set;#u=!0;constructor(t,r=!0){this.anchor=t,this.#u=r}#a=t=>{if(this.#e.has(t)){var r=this.#e.get(t),n=this.#t.get(r);if(n)Ks(n),this.#o.delete(r);else{var i=this.#r.get(r);i&&(Ks(i.effect),this.#t.set(r,i.effect),this.#r.delete(r),G&&(i.fragment.lastChild[nh]=this.anchor),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(let[u,o]of this.#e){if(this.#e.delete(u),u===t)break;let c=this.#r.get(o);c&&($t(c.effect),this.#r.delete(o))}for(let[u,o]of this.#t){if(u===r||this.#o.has(u))continue;let c=()=>{if(Array.from(this.#e.values()).includes(u)){var p=document.createDocumentFragment();Ps(o,p),p.append(qt()),this.#r.set(u,{effect:o,fragment:p})}else $t(o);this.#o.delete(u),this.#t.delete(u)};this.#u||!n?(this.#o.add(u),Gi(o,c,!1)):c()}}};#n=t=>{this.#e.delete(t);let r=Array.from(this.#e.values());for(let[n,i]of this.#r)r.includes(n)||($t(i.effect),this.#r.delete(n))};ensure(t,r){var n=we,i=gf();if(r&&!this.#t.has(t)&&!this.#r.has(t))if(i){var u=document.createDocumentFragment(),o=qt();u.append(o),this.#r.set(t,{effect:dr(()=>r(o)),fragment:u})}else this.#t.set(t,dr(()=>r(this.anchor)));if(this.#e.set(n,t),i){for(let[c,d]of this.#t)c===t?n.unskip_effect(d):n.skip_effect(d);for(let[c,d]of this.#r)c===t?n.unskip_effect(d.effect):n.skip_effect(d.effect);n.oncommit(this.#a),n.ondiscard(this.#n)}else de&&(this.anchor=ke),this.#a(n)}}});var Qh=C(()=>{We();Be();Bt();gt();Tf();Xu();cr();Er();Xe();tr();Kh();za()});function Ja(e){Me===null&&Is("onMount"),Ki&&Me.l!==null?GT(Me).m.push(e):qi(()=>{let t=Te(e);if(typeof t=="function")return t})}function Sf(e){Me===null&&Is("onDestroy"),Ja(()=>()=>Te(e))}function WT(e,t,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:n})}function mb(){let e=Me;return e===null&&Is("createEventDispatcher"),(t,r,n)=>{let i=e.s.$$events?.[t];if(i){let u=gi(i)?i.slice():[i],o=WT(t,r,n);for(let c of u)c.call(e.x,o);return!o.defaultPrevented}return!0}}function GT(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var ja=C(()=>{Ue();ot();Pn();Er();on();Bt();Xe();Hr();Bt();sb();qa();Ue();Qh();if(G){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;c1(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}});var Ab=C(()=>{Pn();ft();ja();Be()});var gb=C(()=>{We();ea();Ue();cr()});var Wh=C(()=>{});var bb=C(()=>{We();ft();gt();Bt()});var _b=C(()=>{ft();We();gt();Be();zr();qa();Ue()});var Eb=C(()=>{ot();We();ft();Bt();cr();ea()});var vb=C(()=>{Er();Bt();ft()});var xb=C(()=>{ft();ks();Be();Ue();Ba()});var yb=C(()=>{ju();Ue();gt();X
\r\f\xA0\v\uFEFF`]});function xu(e,t,r,n,i,u){var o=e[Lo];if(de||o!==r||o===void 0){var c=zb(r,n,u);(!de||c!==e.getAttribute("class"))&&(c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c)),e[Lo]=r}else if(u&&i!==u)for(var d in u){var p=!!u[d];(i==null||p!==!!i[d])&&e.classList.toggle(d,p)}return u}var Xh=C(()=>{fc();We();gt()});function ep(e,t={},r,n){for(var i in r){var u=r[i];t[i]!==u&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,u,n))}}function dc(e,t,r,n){var i=e[Fo];if(de||i!==t){var u=Jb(t,n);(!de||u!==e.getAttribute("style"))&&(u==null?e.removeAttribute("style"):e.style.cssText=u),e[Fo]=t}else n&&(Array.isArray(n)?(ep(e,r?.[0],n[0]),ep(e,r?.[1],n[1],"important")):ep(e,r,n));return n}var tp=C(()=>{fc();We();gt()});var rp=C(()=>{Be();Rn();Qa();ot();cr();Hr();on()});function ip(e){if(de){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;yu(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;yu(e,"checked",null),e.checked=i}}};e[Gu]=r,Mt(r),af()}}function yu(e,t,r,n){var i=_w(e);if(de&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===bw)){n||vw(e,t,r??"");return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[jg]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ew(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function _w(e){return e[Gl]??={[Aw]:e.nodeName.includes("-"),[gw]:e.namespaceURI===$l}}function Ew(e){var t=e.getAttribute("is")||e.nodeName,r=jb.get(t);if(r)return r;jb.set(t,r=[]);for(var n,i=e,u=Element.prototype;u!==i;){n=Kl(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);i=Ra(i)}return r}function vw(e,t,r){G&&(t==="srcset"&&xw(e,r)||np(e.getAttribute(t)??"",r)||g1(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function np(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Zb(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function xw(e,t){var r=Zb(e.srcset),n=Zb(t);return n.length===r.length&&n.every(([i,u],o)=>u===r[o][1]&&(np(r[o][0],i)||np(i,r[o][0])))}var Aw,gw,bw,jb,e_=C(()=>{Xe();gt();ot();uc();sf();cr();We();Gn();ea();Ue();Df();fc();Xh();tp();ft();Be();rp();ju();Aw=Symbol("is custom element"),gw=Symbol("is html"),bw=ih?"link":"LINK";jb=new Map});var t_=C(()=>{gt();tr();Tf();Df()});var r_=C(()=>{Rn()});function sp(e,t,r=t){var n=new WeakSet;ph(e,"input",async i=>{G&&e.type==="checkbox"&&uh();var u=i?e.defaultValue:e.value;if(u=up(e)?ap(u):u,r(u),we!==null&&n.add(we),await Si(),u!==(u=t())){var o=e.selectionStart,c=e.selectionEnd,d=e.value.length;if(e.value=u??"",c!==null){var p=e.value.length;o===c&&c===d&&p>d?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=o,e.selectionEnd=Math.min(c,p))}}}),(de&&e.defaultValue!==e.value||Te(t)==null&&e.value)&&(r(up(e)?ap(e.value):e.value),we!==null&&n.add(we)),Vt(()=>{G&&e.type==="checkbox"&&uh();var i=t();if(e===document.activeElement){var u=rr?gu:we;if(n.has(u))return}up(e)&&i===ap(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function up(e){var t=e.type;return t==="number"||t==="range"}function ap(e){return e===""?null:+e}var n_=C(()=>{Xe();Be();Rn();Er();Qa();Gn();gt();Ue();Hr();on()});var i_=C(()=>{Be();Rn()});var u_=C(()=>{Rn()});function op(e,t,r){var n=Br(e,t);n&&n.set&&(e[t]=r,lr(()=>{e[t]=null}))}var a_=C(()=>{Be();ot()});var s_=C(()=>{Be();Ue()});function cp(e,t){return e===t||e?.[Xt]===t}function es(e={},t,r,n){var i=Me.r,u=fe;return hr(()=>{var o,c;return Vt(()=>{o=c,c=n?.()||[],Te(()=>{cp(r(...c),e)||(t(e,...c),o&&cp(r(...o),e)&&t(null,...o))})}),()=>{let d=u;for(;d!==i&&d.parent!==null&&d.parent.f&33554432;)d=d.parent;let p=()=>{c&&cp(r(...c),e)&&t(null,...c)},A=d.teardown;d.teardown=()=>{p(),A?.()}}}),e}var o_=C(()=>{We();Bt();Be();Ue()});var c_=C(()=>{Be();Rn()});var l_=C(()=>{Be();Rn()});var lp=C(()=>{ot();Be();uc()});function Mn(e=!1){let t=Me,r=t.l.u;if(!r)return;let n=()=>Pe(t.s);if(e){let i=0,u={},o=mu(()=>{let c=!1,d=t.s;for(let p in d)d[p]!==u[p]&&(u[p]=d[p],c=!0);return c&&i++,i});n=()=>R(
Enable this option to completely hide them.`).addToggle(i=>i.setValue(t.hideExcluded).onChange(async u=>{t.hideExcluded=u,await Fe(e)})),new wn.Setting(r).setName("Folders to downrank in search results").setDesc("Folders to downrank in search results. Files in these folders will be downranked in results. They will still be indexed for tags, unlike excluded files. Folders should be comma delimited.").addText(i=>{i.setValue(t.downrankedFoldersFilters.join(",")).setPlaceholder("Example: src,p2/dir").onChange(async u=>{let o=u.split(",");o=o.map(c=>c.trim()),t.downrankedFoldersFilters=o,await Fe(e)})}),new wn.Setting(r).setName("Split CamelCaseWords").setDesc(Yt(`Enable this if you want to be able to search for CamelCaseWords as separate words.<br/>
2026-01-05 13:03:55 +08:00
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${Ws}`)).addToggle(i=>i.setValue(t.splitCamelCase).onChange(async u=>{await n.clearCache(),t.splitCamelCase=u,await Fe(e)})),new wn.Setting(r).setName("Simpler search").setDesc(`Enable this if Obsidian often freezes while making searches.
Words shorter than 3 characters won't be used as prefixes; this can reduce search delay but will return fewer results.`).addToggle(i=>i.setValue(t.simpleSearch).onChange(async u=>{t.simpleSearch=u,await Fe(e)})),wn.Platform.isIosApp||new wn.Setting(r).setName("Tokenize URLs").setDesc(`Enable this if you want to be able to search for URLs as separate words.
This setting has a strong impact on indexing performance, and can crash Obsidian under certain conditions.`).addToggle(i=>i.setValue(t.tokenizeUrls).onChange(async u=>{t.tokenizeUrls=u,await Fe(e)})),new wn.Setting(r).setName("Open in new pane").setDesc("Open and create files in a new pane instead of the current pane.").addToggle(i=>i.setValue(t.openInNewPane).onChange(async u=>{t.openInNewPane=u,await Fe(e)})),new wn.Setting(r).setName("Set Vim like navigation keys").setDesc(`Navigate down the results with ${Tn()} + J/N, or navigate up with ${Tn()} + K/P.`).addToggle(i=>i.setValue(t.vimLikeNavigationShortcut).onChange(async u=>{t.vimLikeNavigationShortcut=u,await Fe(e)})),new wn.Setting(r).setName("Fuzziness").setDesc("Define the level of fuzziness for the search. The higher the fuzziness, the more results you'll get.").addDropdown(i=>i.addOptions({0:"Exact match",1:"Not too fuzzy",2:"Fuzzy enough"}).setValue(t.fuzziness).onChange(async u=>{["0","1","2"].includes(u)||(u="2"),t.fuzziness=u,await Fe(e)}))}var wn,M_=C(()=>{wn=require("obsidian");$r();Oi()});function H_(e,t,r){let n=e.database;new eu.Setting(r).setName("Danger Zone").setHeading(),new eu.Setting(r).setName("Ignore diacritics").setDesc(Yt(`Normalize diacritics in search terms. Words like "br\xFBl\xE9e" or "\u017Elu\u0165ou\u010Dk\xFD" will be indexed as "brulee" and "zlutoucky".<br/>
2026-01-05 13:03:55 +08:00
\u26A0\uFE0F <span style="color: var(--text-accent)">You probably should <strong>NOT</strong> disable this.</span><br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${Ws}`)).addToggle(u=>u.setValue(t.ignoreDiacritics).onChange(async o=>{await n.clearCache(),t.ignoreDiacritics=o,await Fe(e)})),new eu.Setting(r).setName("Ignore Arabic diacritics (beta)").addToggle(u=>u.setValue(t.ignoreArabicDiacritics).onChange(async o=>{await n.clearCache(),t.ignoreArabicDiacritics=o,await Fe(e)}));let i=Yt(`Disable Omnisearch on this device only.<br>
${Ws}`);new eu.Setting(r).setName("Disable on this device").setDesc(i).addToggle(u=>u.setValue(Hf(e.app)).onChange(async o=>{o?(e.app.saveLocalStorage(ts,"1"),new eu.Notice("Omnisearch - Disabled. Please restart Obsidian.")):(e.app.saveLocalStorage(ts),new eu.Notice("Omnisearch - Enabled. Please restart Obsidian."))})),new eu.Setting(r).setName("Force save the cache").setDesc(Yt(`Omnisearch has a security feature that automatically disables cache writing if it cannot fully perform the operation.<br>
2026-01-05 13:03:55 +08:00
Use this option to force the cache to be saved, even if it causes a crash.<br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Enabling this setting could lead to crash loops</span>`)).addToggle(u=>u.setValue(t.DANGER_forceSaveCache).onChange(async o=>{t.DANGER_forceSaveCache=o,await Fe(e)})),wu()&&new eu.Setting(r).setName("Clear cache data").setDesc(Yt(`Erase all Omnisearch cache data.
2026-01-05 13:03:55 +08:00
Use this if Omnisearch results are inconsistent, missing, or appear outdated.<br>
${Ws}`)).addButton(u=>{u.setButtonText("Clear cache"),u.onClick(async()=>{await n.clearCache()})})}var eu,U_=C(()=>{eu=require("obsidian");yn();Oi()});function $_(e,t,r){ns.Platform.isMobile||(new ns.Setting(r).setName("API Access Through HTTP").setHeading().setDesc(Yt('Omnisearch can be used through a simple HTTP server (<a href="https://publish.obsidian.md/omnisearch/Public+API+%26+URL+Scheme#HTTP+Server">more information</a>).')),new ns.Setting(r).setName("Enable the HTTP server").addToggle(n=>n.setValue(t.httpApiEnabled).onChange(async i=>{t.httpApiEnabled=i,i?e.apiHttpServer.listen(t.httpApiPort):e.apiHttpServer.close(),await Fe(e)})),new ns.Setting(r).setName("HTTP Port").addText(n=>{n.setValue(t.httpApiPort).setPlaceholder("51361").onChange(async i=>{parseInt(i)>65535&&(i=t.httpApiPort,n.setValue(t.httpApiPort)),t.httpApiPort=i,t.httpApiEnabled&&(e.apiHttpServer.close(),e.apiHttpServer.listen(t.httpApiPort)),await Fe(e)})}),new ns.Setting(r).setName("Show a notification when the server starts").setDesc("Will display a notification if the server is enabled, at Obsidian startup.").addToggle(n=>n.setValue(t.httpApiNotice).onChange(async i=>{t.httpApiNotice=i,await Fe(e)})))}var ns,Y_=C(()=>{ns=require("obsidian");Oi()});function K_(e,t,r){let n=e.getTextExtractor(),i=e.getAIImageAnalyzer(),u=e.database,o=(0,jn.debounce)(async()=>{await u.clearCache()},1e3);new jn.Setting(r).setName("Indexing").setHeading().setDesc(Yt(`<div style="margin-top: 1em; color: var(--text-accent)">\u26A0\uFE0F Changing indexing settings will clear the cache, and requires a restart of Obsidian.</div><br/>
${n?`\u{1F44D} You have installed <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a>, Omnisearch can use it to index PDFs and images contents.
<br />Text extraction only works on desktop, but the cache can be synchronized with your mobile device.`:'\u26A0\uFE0F Omnisearch requires <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a> to index PDFs and images.'}
${i?'<br/>\u{1F44D} You have installed <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a>, Omnisearch can use it to index images contents with AI.':'<br/>\u26A0\uFE0F Omnisearch requires <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a> to index images with AI.'}`)),new jn.Setting(r).setName(`PDFs content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(Yt("Omnisearch will use Text Extractor to index the content of your PDFs.")).addToggle(p=>p.setValue(t.PDFIndexing).onChange(async A=>{await u.clearCache(),t.PDFIndexing=A,await Fe(e)})).setDisabled(!n),new jn.Setting(r).setName(`Images OCR indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(Yt("Omnisearch will use Text Extractor to OCR your images and index their content.")).addToggle(p=>p.setValue(t.imagesIndexing).onChange(async A=>{await u.clearCache(),t.imagesIndexing=A,await Fe(e)})).setDisabled(!n);let c=Yt('Omnisearch will use Text Extractor to index the content of your office documents (currently <pre style="display:inline">.docx</pre> and <pre style="display:inline">.xlsx</pre>).');new jn.Setting(r).setName(`Documents content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(c).addToggle(p=>p.setValue(t.officeIndexing).onChange(async A=>{await u.clearCache(),t.officeIndexing=A,await Fe(e)})).setDisabled(!n);let d=Yt(`Omnisearch will use AI Image Analyzer to index the content of your images with AI.<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">If both AI Image Analyzer and Text Extractor are enabled, Text Extractor will only be used as a fallback.</span>`);new jn.Setting(r).setName(`Images AI indexing ${i?"":"\u26A0\uFE0F Disabled"}`).setDesc(d).addToggle(p=>p.setValue(t.aiImageIndexing).onChange(async A=>{await u.clearCache(),t.aiImageIndexing=A,await Fe(e)})).setDisabled(!i),new jn.Setting(r).setName("Index paths of unsupported files").setDesc(Yt(`
Omnisearch can index file<strong>names</strong> of "unsupported" files, such as e.g. <pre style="display:inline">.mp4</pre>
or non-extracted PDFs & images.<br/>
"Obsidian setting" will respect the value of "Files & Links > Detect all file extensions".`)).addDropdown(p=>{p.addOptions({yes:"Yes",no:"No",default:"Obsidian setting"}).setValue(t.unsupportedFilesIndexing).onChange(async A=>{await o(),t.unsupportedFilesIndexing=A,await Fe(e)})}),new jn.Setting(r).setName("Set frontmatter property key as title").setDesc(Yt(`If you have a custom property in your notes that you want to use as the title in search results. If you set this to '#heading', then use the first heading from a file as the title.<br>
Leave empty to disable.`)).addText(p=>{p.setValue(t.displayTitle).onChange(async A=>{await o(),t.displayTitle=A,await Fe(e)})}),new jn.Setting(r).setName("Additional TEXT files to index").setDesc(Yt(`In addition to standard <code>md</code> files, Omnisearch can also index other <strong style="color: var(--text-accent)">PLAINTEXT</strong> files.<br/>
Add extensions separated by a space, without the dot. Example: "<code>txt org csv</code>".<br />
\u26A0\uFE0F <span style="color: var(--text-accent)">Using extensions of non-plaintext files (like .pptx) WILL cause crashes,
because Omnisearch will try to index their content.</span>`)).addText(p=>{p.setValue(t.indexedFileTypes.join(" ")).setPlaceholder("Example: txt org csv").onChange(async A=>{await u.clearCache(),t.indexedFileTypes=A.split(" "),await Fe(e)})}),new jn.Setting(r).setName("Index files without extension").setDesc(Yt(`Enable this to also index files that have <strong style="color: var(--text-accent)">no file extension</strong>.<br/>
These files will be indexed as plaintext files.`)).addToggle(p=>{p.setValue(t.indexFilesWithoutExtension).onChange(async A=>{await u.clearCache(),t.indexFilesWithoutExtension=A,await Fe(e)})})}var jn,Q_=C(()=>{jn=require("obsidian");Oi()});function W_(e,t,r){new ua.Setting(r).setName("User Interface").setHeading(),new ua.Setting(r).setName("Show ribbon button").setDesc("Add a button on the sidebar to open the Vault search modal.").addToggle(n=>n.setValue(t.ribbonIcon).onChange(async i=>{t.ribbonIcon=i,await Fe(e),i?e.addRibbonButton():e.removeRibbonButton()})),new ua.Setting(r).setName("Show excerpts").setDesc("Shows the contextual part of the note that matches the search. Disable this to only show filenames in results.").addToggle(n=>n.setValue(t.showExcerpt).onChange(async i=>{aa.set(i)})),new ua.Setting(r).setName("Show embed references").setDesc(Yt(`Some results are <a href="https://help.obsidian.md/Linking+notes+and+files/Embed+files">embedded</a> in other notes.<br>
This setting controls the maximum number of embeds to show in the search results. Set to 0 to disable.<br>
Also works with Text Extractor for embedded images and documents.`)).addSlider(n=>{n.setLimits(0,10,1).setValue(t.maxEmbeds).setDynamicTooltip().onChange(async i=>{t.maxEmbeds=i,await Fe(e)})}),new ua.Setting(r).setName("Render line return in excerpts").setDesc("Activate this option to render line returns in result excerpts.").addToggle(n=>n.setValue(t.renderLineReturnInExcerpts).onChange(async i=>{t.renderLineReturnInExcerpts=i,await Fe(e)})),new ua.Setting(r).setName('Show "Create note" button').setDesc(Yt(`Shows a button next to the search input, to create a note.
Acts the same as the <code>shift \u21B5</code> shortcut, can be useful for mobile device users.`)).addToggle(n=>n.setValue(t.showCreateButton).onChange(async i=>{t.showCreateButton=i,await Fe(e)})),new ua.Setting(r).setName("Highlight matching words in results").setDesc("Will highlight matching results when enabled. See README for more customization options.").addToggle(n=>n.setValue(t.highlight).onChange(async i=>{t.highlight=i,await Fe(e)}))}var ua,G_=C(()=>{ua=require("obsidian");Gs();Oi()});function q_(e,t,r,n){function i(o,c){o.setLimits(1,10,.5).setValue(t[c]).setDynamicTooltip().onChange(async d=>{t[c]=d,await Fe(e)})}let u=yc(e.app);new Zn.Setting(r).setName("Results weighting").setHeading(),new Zn.Setting(r).setName(`File name & declared aliases (default: ${u.weightBasename})`).addSlider(o=>i(o,"weightBasename")),new Zn.Setting(r).setName(`File directory (default: ${u.weightDirectory})`).addSlider(o=>i(o,"weightDirectory")),new Zn.Setting(r).setName(`Headings level 1 (default: ${u.weightH1})`).addSlider(o=>i(o,"weightH1")),new Zn.Setting(r).setName(`Headings level 2 (default: ${u.weightH2})`).addSlider(o=>i(o,"weightH2")),new Zn.Setting(r).setName(`Headings level 3 (default: ${u.weightH3})`).addSlider(o=>i(o,"weightH3")),new Zn.Setting(r).setName(`Tags (default: ${u.weightUnmarkedTags})`).addSlider(o=>i(o,"weightUnmarkedTags")),new Zn.Setting(r).setName("Header properties fields").setDesc('You can set custom weights for values of header properties (e.g. "keywords"). Weights under 1.0 will downrank the results.');for(let o=0;o<t.weightCustomProperties.length;o++){let c=t.weightCustomProperties[o],d=new Zn.Setting(r).setName((o+1).toString()+".");d.settingEl.style.paddingLeft="2em",d.addText(p=>{p.setPlaceholder("Property name").setValue(c.name).onChange(async A=>{c.name=A,await Fe(e)})}).addSlider(p=>{p.setLimits(.1,5,.1).setValue(c.weight).setDynamicTooltip().onChange(async A=>{c.weight=A,await Fe(e)})}).addButton(p=>{p.setButtonText("Remove"),p.onClick(async()=>{t.weightCustomProperties.splice(o,1),await Fe(e),n()})})}new Zn.Setting(r).addButton(o=>{o.setButtonText("Add a new property"),o.onClick(c=>{t.weightCustomProperties.push({name:"",weight:1}),n()})}),new Zn.Setting(r).setName("Recency boost (experimental)").setDesc("Files that have been modified more recently than [selected cutoff] are given a higher rank.").addDropdown(o=>o.addOptions({"0":"Disabled","1":"24 hours","2":"7 days","3":"30 days"}).setValue(t.recencyBoost).onChange(async c=>{t.recencyBoost=c,await Fe(e)}))}var Zn,z_=C(()=>{Zn=require("obsidian");yn();Gs();Oi()});function yc(e){return{useCache:!0,hideExcluded:!1,recencyBoost:"0",downrankedFoldersFilters:[],ignoreDiacritics:!0,ignoreArabicDiacritics:!1,indexedFileTypes:[],indexFilesWithoutExtension:!1,displayTitle:"",PDFIndexing:!1,officeIndexing:!1,imagesIndexing:!1,aiImageIndexing:!1,unsupportedFilesIndexing:"default",splitCamelCase:!1,openInNewPane:!1,vimLikeNavigationShortcut:e.vault.getConfig("vimMode"),ribbonIcon:!0,showExcerpt:!0,maxEmbeds:5,renderLineReturnInExcerpts:!0,showCreateButton:!1,highlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,tokenizeUrls:!1,fuzziness:"1",weightBasename:10,weightDirectory:7,weightH1:6,weightH2:5,weightH3:4,weightUnmarkedTags:2,weightCustomProperties:[],httpApiEnabled:!1,httpApiPort:"51361",httpApiNotice:!0,welcomeMessage:"",verboseLogging:!1,DANGER_httpHost:null,DANGER_forceSaveCache:!1}}async function J_(e){return Xr=Object.assign({},yc(e.app),await e.loadData()),aa.set(Xr.showExcerpt),Ep(Xr.verboseLogging),Xr}var Tc,aa,Uf,Xr,Gs=C(()=>{Tc=require("obsidian");pp();yn();$r();M_();U_();Y_();Q_();G_();z_();Oi();aa=Ls(!1),Uf=class extends Tc.PluginSettingTab{constructor(t){super(t.app,t),this.plugin=t,aa.subscribe(async r=>{Xr.showExcerpt=r,await Fe(this.plugin)})}display(){let{containerEl:t}=this;if(t.empty(),this.app.loadLocalStorage(ts)=="1"){let o=t.createEl("span"),c=document.createElement("strong");c.style.color="var(--text-accent)",c.textContent="\u26A0\uFE0F OMNISEARCH IS DISABLED \u26A0\uFE0F",o.appendChild(c)}t.createEl("h1",{text:"
2026-01-05 13:03:55 +08:00
`);let d=t.lastIndexOf(`
`,i-u);d>0&&(t=t.slice(d))}return t=Yf(t),n.renderLineReturnInExcerpts&&(t=t.trim().replaceAll(`
`,"<br>")),t}catch(i){return new aE.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(i),""}}}});async function sE(e){let t=e.app;if(!t.plugins.getPlugin("obsidian-icon-folder"))return{};let n=`${t.vault.configDir}/plugins/obsidian-icon-folder/data.json`;try{let i=await t.vault.adapter.read(n),u=JSON.parse(i),o={};for(let c in u){let d=(0,Vs.normalizePath)(c);o[d]=u[c]}return o}catch(i){return Ri("Failed to read data.json:",i),{}}}async function oE(e){let t={Li:"lucide-icons"},r="icons",n=e.app,i=n.plugins.getPlugin("obsidian-icon-folder");if(i){r=i.settings?.iconPacksPath||"icons";let o=`${n.vault.configDir}/${r}`;try{let c=await n.vault.adapter.list(o);if(c.folders&&c.folders.length>0)for(let d of c.folders){let p=d.split("/"),A=p[p.length-1],g=Gw(A);t[g]=A}}catch(c){Ri("Failed to list icon packs:",c)}}return{prefixToIconPack:t,iconsPath:r}}function Gw(e){if(e.includes("-")){let t=e.split("-"),r=t[0].charAt(0).toUpperCase();for(let n=1;n<t.length;n++)r+=t[n].charAt(0).toLowerCase();return r}return e.charAt(0).toUpperCase()+e.charAt(1).toLowerCase()}function Cp(e,t){let r=(0,Vs.normalizePath)(e),n=t[r];if(n){if(typeof n=="string")return n;if(typeof n=="object"&&n.iconName)return n.iconName}return null}function Vw(e){let t=e.match(/^[A-Z][a-z]*/);if(t){let r=t[0],n=e.substring(r.length);return{prefix:r,name:n}}else return{prefix:"",name:e}}async function Sp(e,t,r,n){let i=Vw(e),{prefix:u,name:o}=i;if(!u)return`<span class="omnisearch-result__icon--emoji">${Yf(o)}</span>`;let c=n[u];if(!c)return Ri(`No icon pack found for prefix: ${u}`),null;if(c==="lucide-icons"){let d=o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p=(0,Vs.getIcon)(d);return p?p.outerHTML:(Ri(`Lucide icon not found: ${d}`),null)}else{if(!r)return Ri("Icons path is not set. Cannot load icon SVG."),null;let d=`${t.app.vault.configDir}/${r}/${c}/${o}.svg`;try{return await t.app.vault.adapter.read(d)}catch(p){return Ri(`Failed to load icon SVG for ${e} at ${d}:`,p),null}}}function Np(e){let t="file";e==="folder"?t="folder":Jn(e)?t="image":ki(e)?t="file-text":(Xi(e)||mc(e)||rs(e))&&(t="layout-dashboard");let r=(0,Vs.getIcon)(t);return r?r.outerHTML:""}var Vs,cE=C(()=>{Vs=require("obsidian");$r();Ip()});function Dp(e,t){Pr(t,!1);let r=()=>Wo(aa,"$showExcerpt",n),[n,i]=Go(),u=et(),o=et(),c=et(),d=et(),p=ze(t,"selected",8,!1),A=ze(t,"note",8),g=ze(t,"plugin",8),_=et(null),v=et(""),I=et(""),D={},B=et(null),Q=et(null),H={},se,ce=et(!1),me=et([]);Ja(async()=>{D=await sE(g());let st=await oE(g());H=st.prefixToIconPack,se=st.iconsPath,re(ce,!0)});async function ve(){let st=Cp(R(I),D);st?re(B,await Sp(st,g(),se,H)):re(B,Np("folder"));let At=Cp(A().path,D);At?re(Q,await Sp(At,g(),se,H)):re(Q,Np(A().path))}function le(st,At){let Et=new DOMParser,Ie=Et.parseFromString(At,"image/svg+xml").documentElement;return st.appendChild(Ie),{update(Ge){let F=Et.parseFromString(Ge,"image/svg+xml").documentElement;st.replaceChild(F,Ie),Ie=F},destroy(){st.firstElementChild&&st.removeChild(st.firstElementChild)}}}let Ye=null,tt=null,He=et(null);ar(()=>(Pe(A()),R(ce),pc),()=>{A()&&A().path&&R(ce)&&(async()=>(re(v,A().displayTitle||A().basename),re(I,pc(A().path)),await ve()))()}),ar(()=>(Jn,Pe(A()),Pe(g()),Bi.TFile),()=>{if(re(_,null),Jn(A().path)){let st=g().app.vault.getAbstractFileByPath(A().path);st instanceof Bi.TFile&&re(_,g().app.vault.getResourcePath(st))}}),ar(()=>(Pe(A()),pc,Bi.setIcon,Jn,ki,Xi,mc,rs,R(He)),()=>{re(v,A().displayTitle||A().basename),re(I,pc(A().path)),Ye&&(0,Bi.setIcon)(Ye,"folder-open"),tt&&(Jn(A().path)?(0,Bi.setIcon)(tt,"image"):ki(A().path)?(0,Bi.setIcon)(tt,"file-text"):Xi(A().path)||mc(A().path)||rs(A().path)?(0,Bi.setIcon)(tt,"layout-dashboard"):(0,Bi.setIcon)(tt,"file")),R(He)&&(0,Bi.setIcon)(R(He),"corner-down-right")}),ar(()=>(Pe(g()),R(v),Pe(A())),()=>{re(u,g().textProcessor.getMatches(R(v),A().foundWords))}),ar(()=>(Pe(g()),R(I),Pe(A())),()=>{re(o,g().textProcessor.getMatches(R(I),A().foundWords))}),ar(()=>(Pe(A()),Pe(g())),()=>{A().matches.length>0
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ve=!0,qe=!1,dt;return{s:function(){j=j.call(F)},n:function(){var Kt=j.next();return Ve=Kt.done,Kt},e:function(Kt){qe=!0,dt=Kt},f:function(){try{!Ve&&j.return!=null&&j.return()}finally{if(qe)throw dt}}}}function p(F,Y){if(F){if(typeof F=="string")return A(F,Y);var j=Object.prototype.toString.call(F).slice(8,-1);if(j==="Object"&&F.constructor&&(j=F.constructor.name),j==="Map"||j==="Set")return Array.from(F);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return A(F,Y)}}function A(F,Y){(Y==null||Y>F.length)&&(Y=F.length);for(var j=0,ie=new Array(Y);j<Y;j++)ie[j]=F[j];return ie}function g(F,Y){if(!(F instanceof Y))throw new TypeError("Cannot call a class as a function")}function _(F,Y){for(var j=0;j<Y.length;j++){var ie=Y[j];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(F,ie.key,ie)}}function v(F,Y,j){return Y&&_(F.prototype,Y),j&&_(F,j),Object.defineProperty(F,"prototype",{writable:!1}),F}function I(F,Y,j){return Y in F?Object.defineProperty(F,Y,{value:j,enumerable:!0,configurable:!0,writable:!0}):F[Y]=j,F}function D(F,Y,j){B(F,Y),Y.set(F,j)}function B(F,Y){if(Y.has(F))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Q(F,Y){var j=ce(F,Y,"get");return H(F,j)}function H(F,Y){return Y.get?Y.get.call(F):Y.value}function se(F,Y,j){var ie=ce(F,Y,"set");return me(F,ie,j),j}function ce(F,Y,j){if(!Y.has(F))throw new TypeError("attempted to "+j+" private field on non-instance");return Y.get(F)}function me(F,Y,j){if(Y.set)Y.set.call(F,j);else{if(!Y.writable)throw new TypeError("attempted to set read only private field");Y.value=j}}var ve=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",le=new WeakMap,Ye=new WeakMap,tt=(function(){function F(Y){var j=Y.executor,ie=j===void 0?function(){}:j,Ke=Y.internals,Ve=Ke===void 0?rt():Ke,qe=Y.promise,dt=qe===void 0?new Promise(function(kt,Kt){return ie(kt,Kt,function(mr){Ve.onCancelList.push(mr)})}):qe;g(this,F),D(this,le,{writable:!0,value:void 0}),D(this,Ye,{writable:!0,value:void 0}),I(this,ve,"CancelablePromise"),this.cancel=this.cancel.bind(this),se(this,le,Ve),se(this,Ye,dt||new Promise(function(kt,Kt){return ie(kt,Kt,function(mr){Ve.onCancelList.push(mr)})}))}return v(F,[{key:"then",value:function(j,ie){return Ie(Q(this,Ye).then(vt(j,Q(this,le)),vt(ie,Q(this,le))),Q(this,le))}},{key:"catch",value:function(j){return Ie(Q(this,Ye).catch(vt(j,Q(this,le))),Q(this,le))}},{key:"finally",value:function(j,ie){var Ke=this;return ie&&Q(this,le).onCancelList.push(j),Ie(Q(this,Ye).finally(vt(function(){if(j)return ie&&(Q(Ke,le).onCancelList=Q(Ke,le).onCancelList.filter(function(Ve){return Ve!==j})),j()},Q(this,le))),Q(this,le))}},{key:"cancel",value:function(){Q(this,le).isCanceled=!0;var j=Q(this,le).onCancelList;Q(this,le).onCancelList=[];var ie=d(j),Ke;try{for(ie.s();!(Ke=ie.n()).done;){var Ve=Ke.value;if(typeof Ve=="function")try{Ve()}catch(qe){console.error(qe)}}}catch(qe){ie.e(qe)}finally{ie.f()}}},{key:"isCanceled",value:function(){return Q(this,le).isCanceled===!0}}]),F})(),He=(function(F){t(j,F);var Y=n(j);function j(ie){return g(this,j),Y.call(this,{executor:ie})}return v(j)})(tt);e.CancelablePromise=He,I(He,"all",function(Y){return Ge(Y,Promise.all(Y))}),I(He,"allSettled",function(Y){return Ge(Y,Promise.allSettled(Y))}),I(He,"any",function(Y){return Ge(Y,Promise.any(Y))}),I(He,"race",function(Y){return Ge(Y,Promise.race(Y))}),I(He,"resolve",function(Y){return At(Promise.resolve(Y))}),I(He,"reject",function(Y){return At(Promise.reject(Y))}),I(He,"isCancelable",Et);var st=He;e.default=st;function At(F){return Ie(F,rt())}function Et(F){return F instanceof He||F instanceof tt}function vt(F,Y){if(F)return function(j){if(!Y.isCanceled){var ie=F(j);return Et(ie)&&Y.onCancelList.push(ie.cancel),ie}return j}}function Ie(F,Y){return new tt({internals:Y,promise:F})}function Ge(F,Y){var j=rt();return j.onCancelList.push(function(){var ie=d(F),Ke;try{for(ie.s();!(Ke=ie.n()).done;){var V
characters.</span>`,1),h6=$e("We found 0 results for your search here. <!>",1),p6=$e('<!> <div style="text-align: center;"><!></div>',1),m6=$e('<!> <!> <!> <div class="prompt-instructions"><div class="prompt-instruction"><span class="prompt-instruction-command">\u2191\u2193</span><span>to navigate</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to cycle history</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Tab</span> <span>to switch to In-File Search</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in a new split</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in the background</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to insert a link</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to toggle excerpts</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Esc</span><span>to close</span></div></div>',1);xf(["click"])});function Lp(e,t){Pr(t,!1);let r=et(),n=ze(t,"plugin",8),i=ze(t,"offset",8),u=ze(t,"note",8),o=ze(t,"index",8,0),c=ze(t,"selected",8,!1);ar(()=>(Pe(n()),Pe(u()),Pe(i())),()=>{re(r,n().textProcessor.makeExcerpt(u()?.content??"",i()))}),Ci(),Mn();{let d=Bn(()=>(Pe(o()),Te(()=>o().toString())));wc(e,{get id(){return R(d)},get selected(){return c()},$$events:{auxclick(p){xn.call(this,t,p)},click(p){xn.call(this,t,p)},mousemove(p){xn.call(this,t,p)}},children:(p,A)=>{var g=A6();Za(g,()=>(Pe(n()),R(r),Pe(u()),Te(()=>n().textProcessor.highlightText(R(r),u().matches))),!0),_e(g),Se(p,g)},$$slots:{default:!0}})}Mr()}var A6,TE=C(()=>{Ai();Zi();Pn();wp();A6=$e('<div class="omnisearch-result__body"></div>')});function Pp(e,t){Pr(t,!1);let r=ze(t,"plugin",8),n=ze(t,"modal",8),i=ze(t,"parent",8,null),u=ze(t,"singleFilePath",8,""),o=ze(t,"previousQuery",8),c=et(),d=et([]),p=et(0),A=et(),g=et();Ja(()=>{Qe.enable("infile"),Qe.on("infile","enter",H),Qe.on("infile","open-in-new-pane",B),Qe.on("infile","arrow-up",()=>I(-1)),Qe.on("infile","arrow-down",()=>I(1)),Qe.on("infile","tab",se)}),Sf(()=>{Qe.disable("infile")});function _(Ie){let Ge=[],rt=-1,F=0;for(;++F<100;){let Y=v(Ie,rt,hc);if(!Y.length)break;rt=Y.last().offset,Ge.push(Y)}return Ge}function v(Ie,Ge,rt){let F=Ie.find(Y=>Y.offset>Ge);return F?Ie.filter(Y=>Y.offset>Ge&&Y.offset<=F.offset+rt):[]}function I(Ie){re(p,Ff(R(p)+Ie,R(d).length)),D()}async function D(){await Si(),document.querySelector(`[data-result-id="${R(p)}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function B(){return H(!0)}async function Q(Ie){let Ge=r().settings.openInNewPane?!Ie.ctrlKey:!!Ie.ctrlKey;return H(Ge)}async function H(Ie=!1){if(R(A)){n().close(),i()&&i().close();let Ge=R(d)[R(p)]??0;await Mf(r(),R(A),Ge,Ie)}}function se(){new Cu(r(),R(c)??o()).open(),n().close()}ar(()=>Pe(o()),()=>{re(c,o()??"")}),ar(()=>(R(c),R(g),Iu,Pe(r()),Pe(u())),()=>{(async()=>(R(c)&&(re(g,new Iu(R(c),{ignoreDiacritics:r().settings.ignoreDiacritics,ignoreArabicDiacritics:r().settings.ignoreArabicDiacritics})),re(A,(await r().searchEngine.getSuggestions(R(g),{singleFilePath:u()}))[0]??null)),re(p,0),await D()))()}),ar(()=>(R(A),R(g)),()=>{if(R(A)){let Ie=_(R(A).matches),Ge=R(g).getExactTerms();Ge.length&&(Ie=Ie.filter(rt=>Ge.every(F=>rt.some(Y=>Y.match.includes(F))))),re(d,Ie.map(rt=>Math.round(rt.first().offset)))}}),Ci(),Mn();var ce=x6(),me=jr(ce);_c(me,{get plugin(){return r()},pl
`)}function kr(a,s,f,h){this.failures=s,this.failedKeys=h,this.successCount=f,this.message=Un(a,s)}I(kr).from(Ot);function Ar(a,s){this.name="BulkError",this.failures=Object.keys(s).map(function(f){return s[f]}),this.failuresByPos=s,this.message=Un(a,this.failures)}I(Ar).from(Ot);var gr=ct.reduce(function(a,s){return a[s]=s+"Error",a},{}),Rr=Ot,he=ct.reduce(function(a,s){var f=s+"Error";function h(m,b){this.name=f,m?typeof m=="string"?(this.message="".concat(m).concat(b?`
`+b:""),this.inner=b||null):typeof m=="object"&&(this.message="".concat(m.name," ").concat(m.message),this.inner=m):(this.message=wt[s]||f,this.inner=null)}return I(h).from(Rr),a[s]=h,a},{});he.Syntax=SyntaxError,he.Type=TypeError,he.Range=RangeError;var dl=mr.reduce(function(a,s){return a[s+"Error"]=he[s],a},{});function _o(a,s){if(!a||a instanceof Ot||a instanceof TypeError||a instanceof SyntaxError||!a.name||!dl[a.name])return a;var f=new dl[a.name](s||a.message,a);return"stack"in a&&v(f,"stack",{get:function(){return this.inner.stack}}),f}var Ea=ct.reduce(function(a,s){return["Syntax","Type","Range"].indexOf(s)===-1&&(a[s+"Error"]=he[s]),a},{});Ea.ModifyError=kr,Ea.DexieError=Ot,Ea.BulkError=Ar;function ht(){}function uu(a){return a}function hl(a,s){return a==null||a===uu?s:function(f){return s(a(f))}}function au(a,s){return function(){a.apply(this,arguments),s.apply(this,arguments)}}function Eo(a,s){return a===ht?s:function(){var f=a.apply(this,arguments);f!==void 0&&(arguments[0]=f);var h=this.onsuccess,m=this.onerror;this.onsuccess=null,this.onerror=null;var b=s.apply(this,arguments);return h&&(this.onsuccess=this.onsuccess?au(h,this.onsuccess):h),m&&(this.onerror=this.onerror?au(m,this.onerror):m),b!==void 0?b:f}}function pl(a,s){return a===ht?s:function(){a.apply(this,arguments);var f=this.onsuccess,h=this.onerror;this.onsuccess=this.onerror=null,s.apply(this,arguments),f&&(this.onsuccess=this.onsuccess?au(f,this.onsuccess):f),h&&(this.onerror=this.onerror?au(h,this.onerror):h)}}function bd(a,s){return a===ht?s:function(f){var h=a.apply(this,arguments);c(f,h);var m=this.onsuccess,b=this.onerror;this.onsuccess=null,this.onerror=null;var E=s.apply(this,arguments);return m&&(this.onsuccess=this.onsuccess?au(m,this.onsuccess):m),b&&(this.onerror=this.onerror?au(b,this.onerror):b),h===void 0?E===void 0?void 0:E:c(h,E)}}function vo(a,s){return a===ht?s:function(){return s.apply(this,arguments)===!1?!1:a.apply(this,arguments)}}function gs(a,s){return a===ht?s:function(){var f=a.apply(this,arguments);if(f&&typeof f.then=="function"){for(var h=this,m=arguments.length,b=new Array(m);m--;)b[m]=arguments[m];return f.then(function(){return s.apply(h,b)})}return s.apply(this,arguments)}}var $n=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function xo(a,s){$n=a}var Fu={},ml=100,Re=typeof Promise>"u"?[]:(function(){var a=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[a,d(a),a];var s=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[s,d(s),a]})(),Ft=Re[0],jt=Re[1],Qr=Re[2],li=jt&&jt.then,an=Ft&&Ft.constructor,va=!!Qr;function fi(){queueMicrotask(e3)}var Zt=function(a,s){yo.push([a,s]),su&&(fi(),su=!1)},Hi=!0,su=!0,di=[],xa=[],hi=uu,pn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ht,pgp:!1,env:{},finalize:ht},be=pn,yo=[],ya=0,Al=[];function ae(a){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var s=this._PSD=be;if(typeof a!="function"){if(a!==Fu)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Ed(this,this._value);return}this._state=null,this._value=null,++s.ref,og(this,a)}var _d={get:function(){var a=be,s=El;function f(h,m){var b=this,E=!a.global&&(a!==be||s!==El),y=E&&!Mu(),T=new ae(function(N,O){vd(b,new sg(fg(h,a,E,y),fg(m,a,E,y),N,O,a))});return this._consoleTask&&(T._consoleTask=this._consoleTask),T}return f.prototype=Fu,f},set:function(a){v(this,"then",a&&a.prototype===Fu?_d:{get:function(){return a},set:_d.set})}};g(ae.prototype,{then:_d,_then:function(a,s){vd(this,new sg(null,null,a,s,be))},catch:function(a){if(arguments.length===1)return this.then(null,a);var s=arguments[0],f=arguments[1];return typeof s=="function"?this.then(null,function(h){return h instanceof s?f(h):gl(h)}):this.then(null,function(h){return h&&h.name===s?f(h):gl(h)})},finally:function(a){return this.then(function(s){return ae.resolve(a()).then(function(){return s})},function(s){return ae.resolve(a()).then(function(){return gl(s)})})},timeout:function(
`),r=t.length-1;for(;r>=0&&en.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
`)}function yI(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function TI(e,t=0){let r=t,n="";for(let i of e)if(i===" "){let u=4-r%4;n+=" ".repeat(u),r+=u}else n+=i,r++;return n}function v2(e,t,r,n,i){let u=t.href,o=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:u,title:o,text:c,tokens:n.inlineTokens(c)};return n.state.inLink=!1,d}function wI(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
`).map(u=>{let o=u.match(r.other.beginningSpace);if(o===null)return u;let[c]=o;return c.length>=i.length?u.slice(i.length):u}).join(`
`)}function mt(e,t){return as.parse(e,t)}var oa,us,M6,en,H6,U6,$6,Oc,Y6,um,y2,T2,K6,am,Q6,sm,W6,G6,i0,om,V6,w2,q6,z6,J6,cm,m2,j6,Z6,X6,eI,I2,tI,Zs,u0,lm,rI,C2,nI,iI,uI,S2,aI,sI,N2,oI,cI,lI,fI,dI,hI,pI,mI,AI,gI,r0,bI,D2,k2,_I,A2,fm,EI,rm,vI,t0,Dc,xI,g2,kc,ei,Rc,a0,ti,js,R2,as,II,CI,SI,NI,DI,kI,RI,OI,B2=C(()=>{oa=n0();us={exec:()=>null};M6=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),en={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Js(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Js(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Js(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Js(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Js(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Js(e=>new RegExp(`^ {0,${e}}>`))},H6=/^(?:[ \t]*(?:\n|$))+/,U6=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$6=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Oc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Y6=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,um=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,y2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,T2=at(y2).replace(/bull/g,um).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),K6=at(y2).replace(/bull/g,um).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),am=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Q6=/^[^\n]+/,sm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,W6=at(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),G6=at(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,um).getRegex(),i0="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|
]`).replace("lheading",T2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},X6=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eI=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,I2=/^( {2,}|\\)\n(?!\s*$)/,tI=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Zs=/[\p{P}\p{S}]/u,u0=/[\s\p{P}\p{S}]/u,lm=/[^\s\p{P}\p{S}]/u,rI=at(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,u0).getRegex(),C2=/(?!~)[\p{P}\p{S}]/u,nI=/(?!~)[\s\p{P}\p{S}]/u,iI=/(?:[^\s\p{P}\p{S}]|~)/u,uI=at(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",M6?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),S2=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,aI=at(S2,"u").replace(/punct/g,Zs).getRegex(),sI=at(S2,"u").replace(/punct/g,C2).getRegex(),N2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",oI=at(N2,"gu").replace(/notPunctSpace/g,lm).replace(/punctSpace/g,u0).replace(/punct/g,Zs).getRegex(),cI=at(N2,"gu").replace(/notPunctSpace/g,iI).replace(/punctSpace/g,nI).replace(/punct/g,C2).getRegex(),lI=at("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,lm).replace(/punctSpace/g,u0).replace(/punct/g,Zs).getRegex(),fI=at(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Zs).getRegex(),dI="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",hI=at(dI,"gu").replace(/notPunctSpace/g,lm).replace(/punctSpace/g,u0).replace(/punct/g,Zs).getRegex(),pI=at(/\\(punct)/,"gu").replace(/punct/g,Zs).getRegex(),mI=at(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),AI=at(om).replace("(?:-->|$)","-->").getRegex(),gI=at("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",AI).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),r0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,bI=at(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",r0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),D2=at(/^!?\[(label)\]\[(ref)\]/).replace("label",r0).replace("ref",sm).getRegex(),k2=at(/^!?\[(ref)\](?:\[\])?/).replace("ref",sm).getRegex(),_I=at("reflink|nolink(?!\\()","g").replace("reflink",D2).replace("nolink",k2).getRegex(),A2=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,fm={_backpedal:us,anyPunctuation:pI,autolink:mI,blockSkip:uI,br:I2,code:eI,del:us,delLDelim:us,delRDelim:us,emStrongLDelim:aI,emStrongRDelimAst:oI,emStrongRDelimUnd:lI,escape:X6,link:bI,nolink:k2,punctuation:rI,reflink:D2,reflinkSearch:_I,tag:gI,text:tI,url:us},EI={...fm,link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",r0).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",r0).getRegex()},rm={...fm,emStrongRDelimAst:cI,emStrongLDelim:sI,delLDelim:fI,delRDelim:hI,url:at(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",A2).replace("email",/[A-Za-z0
`),depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:sa(t[0],`
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=sa(t[0],`
`).split(`
`),n="",i="",u=[];for(;r.length>0;){let o=!1,c=[],d;for(d=0;d<r.length;d++)if(this.rules.other.blockquoteStart.test(r[d]))c.push(r[d]),o=!0;else if(!o)c.push(r[d]);else break;r=r.slice(d);let p=c.join(`
`),A=p.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
${p}`:p,i=i?`${i}
${A}`:A;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(A,u,!0),this.lexer.state.top=g,r.length===0)break;let _=u.at(-1);if(_?.type==="code")break;if(_?.type==="blockquote"){let v=_,I=v.raw+`
`+r.join(`
`),D=this.blockquote(I);u[u.length-1]=D,n=n.substring(0,n.length-v.raw.length)+D.raw,i=i.substring(0,i.length-v.text.length)+D.text;break}else if(_?.type==="list"){let v=_,I=v.raw+`
`+r.join(`
`),D=this.list(I);u[u.length-1]=D,n=n.substring(0,n.length-_.raw.length)+D.raw,i=i.substring(0,i.length-v.raw.length)+D.raw,r=I.substring(u.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:n,tokens:u,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let u=this.rules.other.listItemRegex(r),o=!1;for(;e;){let d=!1,p="",A="";if(!(t=u.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let g=TI(t[2].split(`
`,1)[0],t[1].length),_=e.split(`
`,1)[0],v=!g.trim(),I=0;if(this.options.pedantic?(I=2,A=g.trimStart()):v?I=t[1].length+1:(I=g.search(this.rules.other.nonSpaceChar),I=I>4?1:I,A=g.slice(I),I+=t[1].length),v&&this.rules.other.blankLine.test(_)&&(p+=_+`
`,e=e.substring(_.length+1),d=!0),!d){let D=this.rules.other.nextBulletRegex(I),B=this.rules.other.hrRegex(I),Q=this.rules.other.fencesBeginRegex(I),H=this.rules.other.headingBeginRegex(I),se=this.rules.other.htmlBeginRegex(I),ce=this.rules.other.blockquoteBeginRegex(I);for(;e;){let me=e.split(`
`,1)[0],ve;if(_=me,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),ve=_):ve=_.replace(this.rules.other.tabCharGlobal," "),Q.test(_)||H.test(_)||se.test(_)||ce.test(_)||D.test(_)||B.test(_))break;if(ve.search(this.rules.other.nonSpaceChar)>=I||!_.trim())A+=`
`+ve.slice(I);else{if(v||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Q.test(g)||H.test(g)||B.test(g))break;A+=`
`+_}v=!_.trim(),p+=me+`
`,e=e.substring(me.length+1),g=ve.slice(I)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(o=!0)),i.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(A),loose:!1,text:A,tokens:[]}),i.raw+=p}let c=i.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let d of i.items){this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]);let p=d.tokens[0];if(d.task&&(p?.type==="text"||p?.type==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}let A=this.rules.other.listTaskCheckbox.exec(d.raw);if(A){let g={type:"checkbox",raw:A[0]+" ",checked:A[0]!=="[ ]"};d.checked=g.checked,i.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=g.raw+d.tokens[0].raw,d.tokens[0].text=g.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(g)):d.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):d.tokens.unshift(g)}}else d.task&&(d.task=!1);if(!i.loose){let A=d.tokens.filter(_=>_.type==="space"),g=A.length>0&&A.some(_=>this.rules.other.anyLine.test(_.raw));i.loose=g}}if(i.loose)for(let d of i.items){d.loose=!0;for(let p of d.tokens)p.type==="text"&&(p.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let r=E2(t[0]);return{type:"html",block:!0,raw:r,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:r}}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:sa(t[0],`
`),href:n,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=_2(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],u={type:"table",raw:sa(t[0],`
`),header:[],align:[],rows:[]};if(r.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?u.align.push("right"):this.rules.other.tableAlignCenter.test(o)?u.align.push("center"):this.rules.other.tableAlignLeft.test(o)?u.align.push("left"):u.align.push(null);for(let o=0;o<r.length;o++)u.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:u.align[o]});for(let o of i)u.rows.push(_2(o,u.header.length).map((c,d)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:u.align[d]})));return u}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:sa(t[0],`
`),depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let u=sa(r.slice(0,-1),"\\");if((r.length-u.length)%2===0)return}else{let u=yI(t[2],"()");if(u===-2)return;if(u>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){let u=this.rules.other.pedanticHrefTitle.exec(n);u&&(n=u[1],i=u[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),v2(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[n.toLowerCase()];if(!i){let u=r[0].charAt(0);return{type:"text",raw:u,text:u}}return v2(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,u,o,c=i,d=0,p=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+i);(n=p.exec(t))!==null;){if(u=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!u)continue;if(o=[...u].length,n[3]||n[4]){c+=o;continue}else if((n[5]||n[6])&&i%3&&!((i+o)%3)){d+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+d);let A=[...n[0]][0].length,g=e.slice(0,i+n.index+A+o);if(Math.min(i,o)%2){let v=g.slice(1,-1);return{type:"em",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}let _=g.slice(2,-2);return{type:"strong",raw:g,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,u,o,c=i,d=this.rules.inline.delRDelim;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(n=d.exec(t))!==null;){if(u=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!u||(o=[...u].length,o!==i))continue;if(n[3]||n[4]){c+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c);let p=[...n[0]][0].length,A=e.slice(0,i+n.index+p+o),g=A.slice(i,-i);return{type:"del",raw:A,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{le
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(en.tabCharGlobal," ").replace(en.spaceLine,""));let i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let u;if(this.options.extensions?.block?.some(c=>(u=c.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);let c=r.at(-1);u.raw.length===1&&c!==void 0?c.raw+=`
`:r.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);let c=r.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+u.raw,c.text+=`
`+u.text,this.inlineQueue.at(-1).src=c.text):r.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);let c=r.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+u.raw,c.text+=`
`+u.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title},r.push(u));continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),r.push(u);continue}let o=t;if(this.options.extensions?.startBlock){let c=1/0,d=t.slice(1),p;this.options.extensions.startBlock.forEach(A=>{p=A.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(this.state.top&&(u=this.tokenizer.paragraph(o))){let c=r.at(-1);n&&c?.type==="paragraph"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+u.raw,c.text+=`
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(u),n=o.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);let c=r.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+u.raw,c.text+=`
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(u);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let n=t;if(this.tokens.links){let c=Object.keys(this.tokens.links);c.length>0&&(n=n.replace(this.tokenizer.rules.inline.reflinkSearch,d=>c.includes(d.slice(d.lastIndexOf("[")+1,-1))?"["+"a".repeat(d.length-2)+"]":d))}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),n=n.replace(this.tokenizer.rules.inline.blockSkip,(c,d,p)=>{let A=p?p.length:0;return c.slice(0,A)+"["+"a".repeat(c.length-A-2)+"]"}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let i=!1,u="",o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}i||(u=""),i=!1;let c;if(this.options.extensions?.inline?.some(p=>(c=p.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);let p=r.at(-1);c.type==="text"&&p?.type==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,n,u)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t,n,u)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let d=t;if(this.options.extensions?.startInline){let p=1/0,A=t.slice(1),g;this.options.extensions.startInline.forEach(_=>{g=_.call({lexer:this},A),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(d=t.substring(0,p+1))}if(c=this.tokenizer.inlineText(d)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(u=c.raw.slice(-1)),i=!0;let p=r.at(-1);p?.type==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(this.options.silent)console.error(r);else throw new Error(r)}},Rc=class{options;parser;constructor(e){this.options=e||oa}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(en.notSpaceStart)?.[0],i=e.replace(en.endingNewline,"")+`
`;return n?'<pre><code class="language-'+tu(n)+'">'+(r?i:tu(i,!0))+`</code></pre>
`:"<pre><code>"+(r?i:tu(i,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
`}hr(e){return`<hr>
`}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o<e.items.length;o++){let c=e.items[o];n+=this.listitem(c)}let i=t?"ol":"ul",u=t&&r!==1?' start="'+r+'"':"";return"<"+i+u+`>
`+n+"</"+i+`>
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let u=e.rows[i];r="";for(let o=0;o<u.length;o++)r+=this.tablecell(u[o]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
2026-01-05 13:03:55 +08:00
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${tu(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=b2(e);if(i===null)return n;e=i;let u='<a href="'+e+'"';return t&&(u+=' title="'+tu(t)+'"'),u+=">"+n+"</a>",u}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=b2(e);if(i===null)return tu(r);e=i;let u=`<img src="${e}" alt="${tu(r)}"`;return t&&(u+=` title="${tu(t)}"`),u+=">",u}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:tu(e.text)}},a0=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ti=class im{options;renderer;textRenderer;constructor(t){this.options=t||oa,this.options.renderer=this.options.renderer||new Rc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new a0}static parse(t,r){return new im(r).parse(t)}static parseInline(t,r){return new im(r).parseInline(t)}parse(t){this.renderer.parser=this;let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let o=i,c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){r+=c||"";continue}}let u=i;switch(u.type){case"space":{r+=this.renderer.space(u);break}case"hr":{r+=this.renderer.hr(u);break}case"heading":{r+=this.renderer.heading(u);break}case"code":{r+=this.renderer.code(u);break}case"table":{r+=this.renderer.table(u);break}case"blockquote":{r+=this.renderer.blockquote(u);break}case"list":{r+=this.renderer.list(u);break}case"checkbox":{r+=this.renderer.checkbox(u);break}case"html":{r+=this.renderer.html(u);break}case"def":{r+=this.renderer.def(u);break}case"paragraph":{r+=this.renderer.paragraph(u);break}case"text":{r+=this.renderer.text(u);break}default:{let o='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,r=this.renderer){this.renderer.parser=this;let n="";for(let i=0;i<t.length;i++){let u=t[i];if(this.options.extensions?.renderers?.[u.type]){let c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){n+=c||"";continue}}let o=u;switch(o.type){case"escape":{n+=r.text(o);break}case"html":{n+=r.html(o);break}case"link":{n+=r.link(o);break}case"image":{n+=r.image(o);break}case"checkbox":{n+=r.checkbox(o);break}case"strong":{n+=r.strong(o);break}case"em":{n+=r.em(o);break}case"codespan":{n+=r.codespan(o);break}case"br":{n+=r.br(o);break}case"del":{n+=r.del(o);break}case"text":{n+=r.text(o);break}default:{let c='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},js=class{options;block;constructor(e){this.options=e||oa}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ei.lex:ei.lexInline}provideParser(e=this.block){return e?ti.parse:ti.parseInline}},R2=class{defaults=n0();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ti;Renderer=Rc;TextRenderer=a0;Lexer=ei;Tokenizer=kc;Hooks=js;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+tu(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},as=new R2;mt.options=mt.setOptions=function(e){return as.setOptions(e),mt.defaults=as.defaults,x2(mt.defaults),mt};mt.getDefaults=n0;mt.defaults=oa;mt.use=function(...e){return as.use(...e),mt.defaults=as.defaults,x2(mt.defaults),mt};mt.walkTokens=function(e,t){return as.walkTokens(e,t)};mt.parseInline=as.parseInline;mt.Parser=ti;mt.parser=ti.parse;mt.Renderer=Rc;mt.TextRenderer=a0;mt.Lexer=ei;mt.lexer=ei.lex;mt.Tokenizer=kc;mt.Hooks=js;mt.parse=mt;II=mt.options,CI=mt.setOptions,SI=mt.use,NI=mt.walkTokens,DI=mt.parseInline,kI=mt,RI=ti.parse,OI=ei.lex});var ri={};mn(ri,{CDATA:()=>Em,Comment:()=>Am,Directive:()=>mm,Doctype:()=>vm,ElementType:()=>it,Root:()=>hm,Script:()=>gm,Style:()=>bm,Tag:()=>_m,Text:()=>pm,isTag:()=>dm});function dm(e){return e.type===it.Tag||e.type===it.Script||e.type===it.Style}var it,hm,pm,mm,Am,gm,bm,_m,Em,vm,Xs=C(()=>{(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(it||(it={}));hm=it.Root,pm=it.Text,mm=it.Directive,Am=it.Comment,gm=it.Script,bm=it.Style,_m=it.Tag,Em=it.CDATA,vm=it.Doctype});function pe(e){return dm(e)}function eo(e){return e.type===it.CDATA}function In(e){return e.type===it.Text}function ls(e){return e.type===it.Comment}function o0(e){return e.type===it.Directive}function ni(e){return e.type===it.Root}function yt(e){return Object.prototype.hasOwnProperty.call(e,"children")}function to(e,t=!1){let r;if(In(e))r=new ru(e.data);else if(ls(e))r=new ss(e.data);else if(pe(e)){let n=t?xm(e.children):[],i=new cs(e.name,{...e.attribs},n);n.forEach(u=>u.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=i}else if(eo(e)){let n=t?xm(e.children):[],i=new Fc(n);n.forEach(u=>u.parent=i),r=i}else if(ni(e)){let n=t?xm(e.children):[],i=new Hn(n);n.forEach(u=>u.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),r=i}else if(o0(e)){let n=new os(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function xm(e){let t=e.map(r=>to(r,!0));for(let r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}var s0,Bc,ru,ss,os,Lc,Fc,Hn,cs,ym=C(()=>{Xs();s0=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return to(this,t)}},Bc=class extends s0{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},ru=class extends Bc{constructor(){super(...arguments),this.type=it.Text}get nodeType(){return 3}},ss=class extends Bc{constructor(){super(...arguments),this.type=it.Comment}get nodeType(){return 8}},os=class extends Bc{constructor(t,r){super(r),this.name=t,this.type=it.Directive}get nodeType(){return 1}},Lc=class extends s0{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},Fc=class extends Lc{constructor(){super(...arguments),this.type=it.CDATA}get nodeType(){return 4}},Hn=class extends Lc{constructor(){super(...arguments),this.type=it.Root}get nodeType(){return 9}},cs=class extends Lc{constructor(t,r,n=[],i=t==="script"?it.Script:t==="style"?it.St
`:m0(e.children):eo(e)?m0(e.children):In(e)?e.data:""}function Nu(e){return Array.isArray(e)?e.map(Nu).join(""):yt(e)&&!ls(e)?Nu(e.children):In(e)?e.data:""}function Mc(e){return Array.isArray(e)?e.map(Mc).join(""):yt(e)&&(e.type===it.Tag||eo(e))?Mc(e.children):In(e)?e.data:""}var Pm=C(()=>{Kr();Fm();Xs()});function no(e){return yt(e)?e.children:[]}function tv(e){return e.parent||null}function Mm(e){let t=tv(e);if(t!=null)return no(t);let r=[e],{prev:n,next:i}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;i!=null;)r.push(i),{next:i}=i;return r}function eC(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function tC(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function rC(e){return e.name}function A0(e){let{next:t}=e;for(;t!==null&&!pe(t);)({next:t}=t);return t}function g0(e){let{prev:t}=e;for(;t!==null&&!pe(t);)({prev:t}=t);return t}var rv=C(()=>{Kr()});function Du(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function nC(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let i=t.parent=e.parent;if(i){let u=i.children;u[u.lastIndexOf(e)]=t,e.parent=null}}function iC(e,t){if(Du(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function uC(e,t){Du(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let i=r.children;i.splice(i.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function aC(e,t){if(Du(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function sC(e,t){Du(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}var nv=C(()=>{});function io(e,t,r=!0,n=1/0){return b0(e,Array.isArray(t)?t:[t],r,n)}function b0(e,t,r,n){let i=[],u=[Array.isArray(t)?t:[t]],o=[0];for(;;){if(o[0]>=u[0].length){if(o.length===1)return i;u.shift(),o.shift();continue}let c=u[0][o[0]++];if(e(c)&&(i.push(c),--n<=0))return i;r&&yt(c)&&c.children.length>0&&(o.unshift(0),u.unshift(c.children))}}function oC(e,t){return t.find(e)}function _0(e,t,r=!0){let n=Array.isArray(t)?t:[t];for(let i=0;i<n.length;i++){let u=n[i];if(pe(u)&&e(u))return u;if(r&&yt(u)&&u.children.length>0){let o=_0(e,u.children,!0);if(o)return o}}return null}function iv(e,t){return(Array.isArray(t)?t:[t]).some(r=>pe(r)&&e(r)||yt(r)&&iv(e,r.children))}function cC(e,t){let r=[],n=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=n[0].length){if(n.length===1)return r;n.shift(),i.shift();continue}let u=n[0][i[0]++];pe(u)&&e(u)&&r.push(u),yt(u)&&u.children.length>0&&(i.unshift(0),n.unshift(u.children))}}var Hm=C(()=>{Kr()});function Um(e,t){return typeof t=="function"?r=>pe(r)&&t(r.attribs[e]):r=>pe(r)&&r.attribs[e]===t}function lC(e,t){return r=>e(r)||t(r)}function uv(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(E0,r)?E0[r](n):Um(r,n)});return t.length===0?null:t.reduce(lC)}function fC(e,t){let r=uv(e);return r?r(t):!0}function dC(e,t,r,n=1/0){let i=uv(e);return i?io(i,t,r,n):[]}function hC(e,t,r=!0){return Array.isArray(t)||(t=[t]),_0(Um("id",e),t,r)}function fs(e,t,r=!0,n=1/0){return io(E0.tag_name(e),t,r,n)}function pC(e,t,r=!0,n=1/0){return io(Um("class",e),t,r,n)}function mC(e,t,r=!0,n=1/0){return io(E0.tag_type(e),t,r,n)}var E0,$m=C(()=>{Kr();Hm();E0={tag_name(e){return typeof e=="function"?t=>pe(t)&&e(t.name):e==="*"?pe:t=>pe(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>In(t)&&e(t.data):t=>In(t)&&t.data===e}}});function AC(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}function av(e,t){let r=[],n=[];if(e===t)return 0;let i=yt(e)?e:e.parent;for(;i;)r.unshift(i),i=i.parent;f
2026-01-05 13:03:55 +08:00
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}});function gA(e,t){return e===si.default.falseFunc?si.default.falseFunc:r=>t.isTag(r)&&e(r)}function bA(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function mA(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var si,AA,pA,k0,R0=C(()=>{si=Qn(ha(),1);lA();AA={};pA=(e,t,r,n,i)=>{let u=i(t,mA(r),n);return u===si.default.trueFunc?e:u===si.default.falseFunc?si.default.falseFunc:o=>u(o)&&e(o)},k0={is:pA,matches:pA,where:pA,not(e,t,r,n,i){let u=i(t,mA(r),n);return u===si.default.falseFunc?e:u===si.default.trueFunc?si.default.falseFunc:o=>!u(o)&&e(o)},has(e,t,r,n,i){let{adapter:u}=r,o=mA(r);o.relativeSelector=!0;let c=t.some(A=>A.some(qc))?[AA]:void 0,d=i(t,o,c);if(d===si.default.falseFunc)return si.default.falseFunc;let p=gA(d,u);if(c&&d!==si.default.trueFunc){let{shouldTestNextSiblings:A=!1}=d;return g=>{if(!e(g))return!1;c[0]=g;let _=u.getChildren(g),v=A?[..._,...bA(g,u)]:_;return u.existsOne(p,v)}}return A=>e(A)&&u.existsOne(p,u.getChildren(A))}}});function zv(e,t,r,n,i){var u;let{name:o,data:c}=t;if(Array.isArray(c)){if(!(o in k0))throw new Error(`Unknown pseudo-class :${o}(${c})`);return k0[o](e,c,r,n,i)}let d=(u=r.pseudos)===null||u===void 0?void 0:u[o],p=typeof d=="string"?d:D0[o];if(typeof p=="string"){if(c!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let A=Ru(p);return k0.is(e,A,r,n,i)}if(typeof d=="function")return hA(d,o,c,1),A=>d(A,c)&&e(A);if(o in ho)return ho[o](e,c,r,n);if(o in Jc){let A=Jc[o];return hA(A,o,c,2),g=>A(g,r,c)&&e(g)}throw new Error(`Unknown pseudo-class :${o}`)}var _A=C(()=>{lo();Gv();Vv();qv();R0()});function EA(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function Jv(e,t,r,n,i){let{adapter:u,equals:o}=r;switch(t.type){case Ee.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Ee.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Ee.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Mv[t.action](e,t,r)}case Ee.Pseudo:return zv(e,t,r,n,i);case Ee.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:c}=t;return(!r.xmlMode||r.lowerCaseTags)&&(c=c.toLowerCase()),function(p){return u.getName(p)===c&&e(p)}}case Ee.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(p){let A=p;for(;A=EA(A,u);)if(e(A))return!0;return!1};let c=new WeakSet;return function(p){let A=p;for(;A=EA(A,u);)if(!c.has(A)){if(u.isTag(A)&&e(A))return!0;c.add(A)}return!1}}case"_flexibleDescendant":return function(d){let p=d;do if(e(p))return!0;while(p=EA(p,u));return!1};case Ee.Parent:return function(d){return u.getChildren(d).some(p=>u.isTag(p)&&e(p))};case Ee.Child:return function(d){let p=u.getParent(d);return p!=null&&u.isTag(p)&&e(p)};case Ee.Sibling:return function(d){let p=u.getSiblings(d);for(let A=0;A<p.length;A++){let g=p[A];if(o(d,g))break;if(u.isTag(g)&&e(g))return!0}return!1};case Ee.Adjacent:return u.prevElementSibling?function(d){let p=u.prevElementSibling(d);return p!=null&&e(p)}:funct
`)})):{name:i,value:u.replace(vx,`\r
`)}}).toArray()}var Ex,gS,vx,xx=C(()=>{Kr();Ex="input,select,textarea,keygen",gS=/%20/g,vx=/\r?\n/g});var HA={};mn(HA,{extract:()=>vS});function ES(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function vS(e){let t={};for(let r in e){let n=e[r],i=Array.isArray(n),{selector:u,value:o}=ES(i?n[0]:n),c=typeof o=="function"?o:typeof o=="string"?d=>this._make(d).prop(o):d=>this._make(d).extract(o);if(i)t[r]=this._findBySelector(u,Number.POSITIVE_INFINITY).map((d,p)=>c(p,r,t)).get();else{let d=this._findBySelector(u,1);t[r]=d.length>0?c(d[0],r,t):void 0}}return t}var yx=C(()=>{});var Aa,Tx=C(()=>{Nv();dx();Ax();_x();xx();yx();Aa=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}};Aa.prototype.cheerio="[cheerio object]";Aa.prototype.splice=Array.prototype.splice;Aa.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Aa.prototype,aA,BA,FA,PA,MA,HA)});function wx(e,t){return function r(n,i,u=!0){if(n==null)throw new Error("cheerio.load() expects a string");let o=Hc(i),c=e(n,o,u,null);class d extends Aa{_make(g,_){let v=p(g,_);return v.prevObject=this,v}_parse(g,_,v,I){return e(g,_,v,I)}_render(g){return t(g,this.options)}}function p(A,g,_=c,v){if(A&&ui(A))return A;let I=Hc(v,o),D=typeof _=="string"?[e(_,I,!1,null)]:"length"in _?_:[_],B=ui(D)?D:new d(D,null,I);if(B._root=B,!A)return new d(void 0,B,I);let Q=typeof A=="string"&&$c(A)?e(A,I,!1,null).children:xS(A)?[A]:Array.isArray(A)?A:void 0,H=new d(Q,B,I);if(Q)return H;if(typeof A!="string")throw new TypeError("Unexpected type of selector");let se=A,ce=g?typeof g=="string"?$c(g)?new d([e(g,I,!1,null)],B,I):(se=`${g} ${se}`,B):ui(g)?g:new d(Array.isArray(g)?g:[g],B,I):B;return ce?ce.find(se):H}return Object.assign(p,Wm,{load:r,_root:c,_options:o,fn:d.prototype,prototype:d.prototype}),p}}function xS(e){return!!e.name||e.type===ri.Root||e.type===ri.Text||e.type===ri.Comment}var Ix=C(()=>{Km();uo();Tx();ao();Qc()});function U0(e){return e>=55296&&e<=57343}function Cx(e){return e>=56320&&e<=57343}function Sx(e,t){return(e-55296)*1024+9216+t}function $0(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Y0(e){return e>=64976&&e<=65007||yS.has(e)}var yS,Dt,x,hn,K0=C(()=>{yS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Dt="\uFFFD";(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(x||(x={}));hn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"}});var $,Xc=C(()=>{(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.
`)}else if(Ac(t))try{let A=JSON.parse(await r.vault.cachedRead(n)),g=[],_=v=>{for(let I in v)typeof v[I]=="object"?_(v[I]):I==="content"&&g.push(v[I])};_(A),i=g.join(`\r
`)}catch(A){console.error("Omnisearch: Error while parsing Dataloom file",t),console.error(A)}else Jn(t)?this.plugin.settings.aiImageIndexing&&o?.canBeAnalyzed(n)?i=await o.analyzeImage(n):this.plugin.settings.imagesIndexing&&u?.canFileBeExtracted(t)&&(i=await u.extractText(n)):ki(t)&&this.plugin.settings.PDFIndexing&&u?.canFileBeExtracted(t)?i=await u.extractText(n):S_(t)&&this.plugin.settings.officeIndexing&&u?.canFileBeExtracted(t)?i=await u.extractText(n):this.plugin.notesIndexer.isFilenameIndexable(t)&&(i=n.path);i==null&&(Ri(`Omnisearch: ${i} content for file`,n.path),i="");let c=r.metadataCache.getFileCache(n);if(c){let A=B_(this.plugin.app,n,c);for(let g of A.filter(_=>!this.documents.has(_))){let _=this.plugin.notesIndexer.generateIndexableNonexistingDocument(g,n.path)}if(c.frontmatter?.["excalidraw-plugin"]){let g=c.sections?.filter(_=>_.type==="comment")??[];for(let{start:_,end:v}of g.map(I=>I.position))i=i.substring(0,_.offset-1)+i.substring(v.offset)}}let d;this.plugin.settings.displayTitle==="#heading"?d=c?.headings?.find(A=>A.level===1)?.heading??"":d=c?.frontmatter?.[this.plugin.settings.displayTitle]??"";let p=C_(c);return{basename:n.basename,displayTitle:d,content:i,cleanedContent:w_(Di(i)),path:n.path,mtime:n.stat.mtime,tags:p,unmarkedTags:p.map(A=>A.replace("#","")),aliases:I_(c).join(""),headings1:c?Lf(c,1).join(" "):"",headings2:c?Lf(c,2).join(" "):"",headings3:c?Lf(c,3).join(" "):""}}}});var hd,Wy=C(()=>{xc();$r();hd=class{constructor(t){this.plugin=t;this.notesToReindex=new Set}flagNoteForReindex(t){this.notesToReindex.add(t)}async refreshIndex(){for(let r of this.notesToReindex)Je("Updating file",r.path),await this.plugin.documentsRepository.addDocument(r.path);let t=[...this.notesToReindex].map(r=>r.path);t.length&&(this.plugin.searchEngine.removeFromPaths(t),await this.plugin.searchEngine.addFromPaths(t),this.notesToReindex.clear())}isFileIndexable(t){return this.plugin.settings.hideExcluded&&this.plugin.app.metadataCache.isUserIgnored&&this.plugin.app.metadataCache.isUserIgnored(t)?!1:this.isFilenameIndexable(t)||this.isContentIndexable(t)}isContentIndexable(t){let r=this.plugin.settings,n=!!this.plugin.getTextExtractor(),i=!!this.plugin.getAIImageAnalyzer(),u=n&&r.PDFIndexing,o=n&&r.imagesIndexing,c=i&&r.aiImageIndexing;return this.isFilePlaintext(t)||Xi(t)||Ac(t)||u&&ki(t)||o&&Jn(t)||c&&Jn(t)}isFilenameIndexable(t){return this.canIndexUnsupportedFiles()||this.isFilePlaintext(t)||Xi(t)||rs(t)||Ac(t)}canIndexUnsupportedFiles(){return this.plugin.settings.unsupportedFilesIndexing==="yes"||this.plugin.settings.unsupportedFilesIndexing==="default"&&!!this.plugin.app.vault.getConfig("showUnsupportedFiles")}generateIndexableNonexistingDocument(t,r){return t=yp(t),{path:t+(t.endsWith(".md")?"":".md"),basename:t,displayTitle:"",mtime:0,content:"",cleanedContent:"",tags:[],unmarkedTags:[],aliases:"",headings1:"",headings2:"",headings3:"",doesNotExist:!0,parent:r}}isFilePlaintext(t){return[...this.plugin.settings.indexedFileTypes,"md"].some(r=>t.endsWith(`.${r}`))||this.plugin.settings.indexFilesWithoutExtension&&!t.includes(".")}}});var md,pd,Gy=C(()=>{md=require("obsidian");$r();pd=class{constructor(t){this.plugin=t;this.embeds=new Map}addEmbed(t,r){this.embeds.has(t)||this.embeds.set(t,new Set),this.embeds.get(t).add(r)}removeFile(t){this.embeds.delete(t),this.refreshEmbedsForNote(t)}renameFile(t,r){this.embeds.has(t)&&(this.embeds.set(r,this.embeds.get(t)),this.embeds.delete(t)),this.embeds.forEach((n,i)=>{n.has(t)&&(n.delete(t),n.add(r))})}refreshEmbedsForNote(t){this.embeds.forEach((r,n)=>{r.has(t)&&r.delete(t)}),this.addEmbedsForNote(t)}getEmbeds(t){return this.embeds.has(t)?[...this.embeds.get(t)]:[]}async writeToCache(){Je("Writing embeds to cache");let t=this.plugin.database,r=[];for(let[n,i]of this.embeds)r.push({embedded:n,referencedBy:[...i]});await t.embeds.clear(),await t.embeds.bulkAdd(r)}async loadFromCache(){try{let t=this.plugin.database;if(!t.embeds){Je("No embeds in cache");return}Je("Loading embeds from cache");let r=await t.embeds.toArray();for(let{embedded:n,referencedBy:i}of r
2026-01-05 13:03:55 +08:00
/*! Bundled license information:
search-query-parser/lib/search-query-parser.js:
(*!
* search-query-parser.js
* Copyright(c) 2014-2019
* MIT Licensed
*)
*/
/* nosourcemap */