mcp-memory-bucket 0.8.4 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{index-_w_b_MQl.js → index-y6XKwUMi.js} +70 -70
- package/dist/client/index.html +1 -1
- package/dist/src/config.js +45 -0
- package/dist/src/memory/repository.js +41 -6
- package/dist/src/remote/folderfoo-client.js +25 -0
- package/dist/src/server.js +8 -0
- package/dist/src/shared/bucket-root-tool.js +66 -0
- package/dist/src/shared/relocate.js +17 -1
- package/dist/src/skills/repository.js +84 -21
- package/dist/src/skills/tools.js +29 -15
- package/dist/src/store/db.js +51 -13
- package/dist/src/store/search.js +9 -6
- package/dist/src/store/sync.js +43 -26
- package/dist/src/web/routes.js +138 -7
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=t(i);fetch(i.href,n)}})();const
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=t(i);fetch(i.href,n)}})();const Nt="modulepreload",qt=function(r){return"/"+r},Fe={},ut=function(e,t,s){let i=Promise.resolve();if(t&&t.length>0){let o=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");i=o(t.map(h=>{if(h=qt(h),h in Fe)return;Fe[h]=!0;const p=h.endsWith(".css"),d=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${d}`))return;const f=document.createElement("link");if(f.rel=p?"stylesheet":Nt,p||(f.as="script"),f.crossOrigin="",f.href=h,l&&f.setAttribute("nonce",l),document.head.appendChild(f),p)return new Promise((v,b)=>{f.addEventListener("load",v),f.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${h}`)))})}))}function n(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&n(a.reason);return e().catch(n)})};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const te=globalThis,$e=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,we=Symbol(),Ne=new WeakMap;let ft=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==we)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if($e&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ne.set(t,e))}return e}toString(){return this.cssText}};const Ut=r=>new ft(typeof r=="string"?r:r+"",void 0,we),R=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new ft(t,r,we)},jt=(r,e)=>{if($e)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=te.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},qe=$e?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return Ut(t)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Ht,defineProperty:Bt,getOwnPropertyDescriptor:Kt,getOwnPropertyNames:Zt,getOwnPropertySymbols:Wt,getPrototypeOf:Vt}=Object,ae=globalThis,Ue=ae.trustedTypes,Qt=Ue?Ue.emptyScript:"",
|
|
9
|
+
*/const{is:Ht,defineProperty:Bt,getOwnPropertyDescriptor:Kt,getOwnPropertyNames:Zt,getOwnPropertySymbols:Wt,getPrototypeOf:Vt}=Object,ae=globalThis,Ue=ae.trustedTypes,Qt=Ue?Ue.emptyScript:"",Jt=ae.reactiveElementPolyfillSupport,V=(r,e)=>r,be={toAttribute(r,e){switch(e){case Boolean:r=r?Qt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},gt=(r,e)=>!Ht(r,e),je={attribute:!0,type:String,converter:be,reflect:!1,useDefault:!1,hasChanged:gt};Symbol.metadata??=Symbol("metadata"),ae.litPropertyMetadata??=new WeakMap;let N=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=je){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Bt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:n}=Kt(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){const a=i?.call(this);n?.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??je}static _$Ei(){if(this.hasOwnProperty(V("elementProperties")))return;const e=Vt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(V("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V("properties"))){const t=this.properties,s=[...Zt(t),...Wt(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(qe(i))}else e!==void 0&&t.push(qe(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:be).toAttribute(t,s.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:be;this._$Em=i;const a=o.fromAttribute(t,n.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,t,s,i=!1,n){if(e!==void 0){const o=this.constructor;if(i===!1&&(n=this[e]),s??=o.getPropertyOptions(e),!((s.hasChanged??gt)(n,t)||s.useDefault&&s.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:o}=n,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,n,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[V("elementProperties")]=new Map,N[V("finalized")]=new Map,Jt?.({ReactiveElement:N}),(ae.reactiveElementVersions??=[]).push("2.1.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const _e=globalThis,He=r=>r,se=_e.trustedTypes,Be=se?se.createPolicy("lit-html",{createHTML:r=>r}):void 0,bt="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,mt="?"+E,
|
|
14
|
-
\f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ke=/-->/g,Ze=/>/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),We=/'/g,Ve=/"/g,xt=/^(?:script|style|textarea|title)$/i,Xt=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),c=Xt(1),
|
|
13
|
+
*/const _e=globalThis,He=r=>r,se=_e.trustedTypes,Be=se?se.createPolicy("lit-html",{createHTML:r=>r}):void 0,bt="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,mt="?"+E,Yt=`<${mt}>`,I=document,Q=()=>I.createComment(""),J=r=>r===null||typeof r!="object"&&typeof r!="function",Se=Array.isArray,Gt=r=>Se(r)||typeof r?.[Symbol.iterator]=="function",pe=`[
|
|
14
|
+
\f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ke=/-->/g,Ze=/>/g,P=RegExp(`>|${pe}(?:([^\\s"'>=/]+)(${pe}*=${pe}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),We=/'/g,Ve=/"/g,xt=/^(?:script|style|textarea|title)$/i,Xt=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),c=Xt(1),O=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Qe=new WeakMap,L=I.createTreeWalker(I,129);function vt(r,e){if(!Se(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Be!==void 0?Be.createHTML(e):e}const es=(r,e)=>{const t=r.length-1,s=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=B;for(let a=0;a<t;a++){const l=r[a];let h,p,d=-1,f=0;for(;f<l.length&&(o.lastIndex=f,p=o.exec(l),p!==null);)f=o.lastIndex,o===B?p[1]==="!--"?o=Ke:p[1]!==void 0?o=Ze:p[2]!==void 0?(xt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=P):p[3]!==void 0&&(o=P):o===P?p[0]===">"?(o=i??B,d=-1):p[1]===void 0?d=-2:(d=o.lastIndex-p[2].length,h=p[1],o=p[3]===void 0?P:p[3]==='"'?Ve:We):o===Ve||o===We?o=P:o===Ke||o===Ze?o=B:(o=P,i=void 0);const v=o===P&&r[a+1].startsWith("/>")?" ":"";n+=o===B?l+Yt:d>=0?(s.push(h),l.slice(0,d)+bt+l.slice(d)+E+v):l+E+(d===-2?a:v)}return[vt(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let me=class yt{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,o=0;const a=e.length-1,l=this.parts,[h,p]=es(e,t);if(this.el=yt.createElement(h,s),L.currentNode=this.el.content,t===2||t===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=L.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const d of i.getAttributeNames())if(d.endsWith(bt)){const f=p[o++],v=i.getAttribute(d).split(E),b=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:b[2],strings:v,ctor:b[1]==="."?ss:b[1]==="?"?is:b[1]==="@"?rs:le}),i.removeAttribute(d)}else d.startsWith(E)&&(l.push({type:6,index:n}),i.removeAttribute(d));if(xt.test(i.tagName)){const d=i.textContent.split(E),f=d.length-1;if(f>0){i.textContent=se?se.emptyScript:"";for(let v=0;v<f;v++)i.append(d[v],Q()),L.nextNode(),l.push({type:2,index:++n});i.append(d[f],Q())}}}else if(i.nodeType===8)if(i.data===mt)l.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(E,d+1))!==-1;)l.push({type:7,index:n}),d+=E.length-1}n++}}static createElement(e,t){const s=I.createElement("template");return s.innerHTML=e,s}};function q(r,e,t=r,s){if(e===O)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const n=J(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=q(r,i._$AS(r,e.values),i,s)),e}let ts=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??I).importNode(t,!0);L.currentNode=i;let n=L.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let h;l.type===2?h=new Y(n,n.nextSibling,this,e):l.type===1?h=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(h=new ns(n,this,e)),this._$AV.push(h),l=s[++a]}o!==l?.index&&(n=L.nextNode(),o++)}return L.currentNode=I,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class Y{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=q(this,e,t),J(e)?e===m||e==null||e===""?(this._$AH!==m&&this._$AR(),this._$AH=m):e!==this._$AH&&e!==O&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Gt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==m&&J(this._$AH)?this._$AA.nextSibling.data=e:this.T(I.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=me.createElement(vt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const n=new ts(i,this),o=n.u(this.options);n.p(t),this.T(o),this._$AH=n}}_$AC(e){let t=Qe.get(e.strings);return t===void 0&&Qe.set(e.strings,t=new me(e)),t}k(e){Se(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new Y(this.O(Q()),this.O(Q()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=He(e).nextSibling;He(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}let le=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}_$AI(e,t=this,s,i){const n=this.strings;let o=!1;if(n===void 0)e=q(this,e,t,0),o=!J(e)||e!==this._$AH&&e!==O,o&&(this._$AH=e);else{const a=e;let l,h;for(e=n[0],l=0;l<n.length-1;l++)h=q(this,a[s+l],t,l),h===O&&(h=this._$AH[l]),o||=!J(h)||h!==this._$AH[l],h===m?e=m:e!==m&&(e+=(h??"")+n[l+1]),this._$AH[l]=h}o&&!i&&this.j(e)}j(e){e===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ss=class extends le{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===m?void 0:e}},is=class extends le{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==m)}},rs=class extends le{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){if((e=q(this,e,t,0)??m)===O)return;const s=this._$AH,i=e===m&&s!==m||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==m&&(s===m||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ns=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){q(this,e)}};const os=_e.litHtmlPolyfillSupport;os?.(me,Y),(_e.litHtmlVersions??=[]).push("3.3.3");const as=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const n=t?.renderBefore??null;s._$litPart$=i=new Y(e.insertBefore(Q(),n),n,void 0,t??{})}return i._$AI(r),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const Ce=globalThis;let $=class extends
|
|
19
|
+
*/const Ce=globalThis;let $=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=as(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return O}};$._$litElement$=!0,$.finalized=!0,Ce.litElementHydrateSupport?.({LitElement:$});const ls=Ce.litElementPolyfillSupport;ls?.({LitElement:$});(Ce.litElementVersions??=[]).push("4.2.2");var kt;let ue=0;const Je=new Set;function cs(r){ue++;try{r()}finally{ue--,ue===0&&hs()}}function hs(){const r=new Set(Je);Je.clear();for(const e of r)e()}function ds(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function ps(r){return r&&typeof r.deref=="function"}class Ae{static#e=0;#t;#s;#n=new Set;#r=kt.#e++;name;constructor(e,t){this.#t=e,this.#s=e,this.name=t}_get(){return u.activeConsumer&&u.activeConsumer.track(this),this.#t}_set(e){return ds(e,this.#t)?(this.#s=this.#t,this.#t=e,this._notify(),!0):!1}subscribe(e,t=!1){let s=e;return t&&(s=new WeakRef(e)),this.#n.add(s),()=>this.#n.delete(s)}_notify(){const e=[...this.#n];for(const t of e){let s;if(ps(t)){if(s=t.deref(),!s){this.#n.delete(t);continue}}else s=t;s()}}get id(){return this.#r}get previousValue(){return this.#s}toString(){return this.name?`${this.constructor.name}(${this.name})`:`${this.constructor.name}#${this.id}`}}kt=Ae;class u extends Ae{static#e=[];constructor(e,t){super(e,t)}static get activeConsumer(){return this.#e[this.#e.length-1]}static push(e){this.#e.push(e)}static pop(){this.#e.pop()}get(){return this._get()}set(e){cs(()=>{this._set(e)})}get value(){return this.get()}set value(e){this.set(e)}update(e){this.set(e(this.get()))}}class us extends Ae{#e;#t=!0;#s=!1;#n=new Map;_debugParent;#r;#g=()=>{this.#t||(this.#t=!0,this._notify())};constructor(e,t,s){super(void 0,t),this.#e=e,this.#r=s?.weak??!0}track(e){if(this.#n.has(e))return;const t=e.subscribe(this.#g,this.#r);this.#n.set(e,t)}dispose(){this.#a()}#a(){for(const e of this.#n.values())e();this.#n.clear()}get(){if(u.activeConsumer&&u.activeConsumer.track(this),!this.#t)return this._get();if(this.#s)throw new Error(`Cycle detected in ${this}
|
|
20
20
|
↳ while computing ${this._debugParent??"root"}`);this.#s=!0,this.#a(),u.push(this);try{const e=this.#e();this._set(e)}finally{u.pop(),this.#t=!1,this.#s=!1}return this._get()}get value(){return this.get()}set value(e){throw new Error(`Cannot set value of Computed ${this}. Computed values are read-only.`)}subscribe(e,t=!1){const s=super.subscribe(e,t);return u.activeConsumer||this.get(),s}}class ce{#e;#t=new Map;_debugParent;constructor(e){this.#e=e,e.addController(this);const t=e,s=t.update,i=this;t.update=function(n){u.push(i);try{s.call(this,n)}finally{u.pop()}}}track(e){this.#t.has(e)||this.#t.set(e,e.subscribe(this.#s,!0))}#s=()=>{this.#e.requestUpdate()};hostUpdate(){for(const e of this.#t.values())e();this.#t.clear()}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}toString(){const e=this.#e;return`SignalWatcher(${e?.localName??e?.tagName??e?.constructor?.name??"unknown"})`}}const fs=new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"});function gs(r){if(!r)return"unknown age";const e=new Date(r);return Number.isNaN(e.getTime())?"unknown age":fs.format(e)}function bs(r){const e=[],t=new Map,s=[];for(const n of r){if(n._table!=="memory_docs"){s.push(n);continue}t.has(n.name)||(t.set(n.name,[]),e.push(n.name)),t.get(n.name).push(n)}const i=e.map(n=>({key:n,items:t.get(n)}));return s.length>0&&i.push({key:null,items:s}),i}class ms extends ${static{this.properties={results:{attribute:!1},showFolder:{attribute:!1},onSelect:{attribute:!1},selectedIds:{attribute:!1},onToggleSelect:{attribute:!1},onKeyClick:{attribute:!1}}}static{this.styles=R`
|
|
21
21
|
:host { display: block; }
|
|
22
22
|
.count-header {
|
|
@@ -113,8 +113,8 @@
|
|
|
113
113
|
</div>
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
116
|
-
`}}customElements.define("result-list",ms);function Te(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var M=Te();function $t(r){M=r}var
|
|
117
|
-
]`).replace("lheading",_t).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ls=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Is=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ct=/^( {2,}|\\)\n(?!\s*$)/,
|
|
116
|
+
`}}customElements.define("result-list",ms);function Te(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var M=Te();function $t(r){M=r}var z={exec:()=>null};function F(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),i=e[s];return i||(i=r(s),e[s]=i),i}}function g(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(i,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(y.caret,"$1"),t=t.replace(i,o),s},getRegex:()=>new RegExp(t,e)};return s}var xs=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),y={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:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:F(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:F(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:F(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:F(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:F(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:F(r=>new RegExp(`^ {0,${r}}>`))},vs=/^(?:[ \t]*(?:\n|$))+/,ys=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ks=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,G=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$s=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ee=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,wt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_t=g(wt).replace(/bull/g,Ee).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(),ws=g(wt).replace(/bull/g,Ee).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(),Re=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,_s=/^[^\n]+/,Pe=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ss=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Pe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Cs=g(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ee).getRegex(),he="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ze=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,As=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ze).replace("tag",he).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),St=r=>g(Re).replace("hr",G).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he).getRegex(),Ts=St(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Es=St(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Rs=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Es).getRegex(),Le={blockquote:Rs,code:ys,def:Ss,fences:ks,heading:$s,hr:G,html:As,lheading:_t,list:Cs,newline:vs,paragraph:Ts,table:z,text:_s},Ye=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",G).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he).getRegex(),Ps={...Le,lheading:ws,table:Ye,paragraph:g(Re).replace("hr",G).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ye).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",he).getRegex()},zs={...Le,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ze).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(Re).replace("hr",G).replace("heading",` *#{1,6} *[^
|
|
117
|
+
]`).replace("lheading",_t).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ls=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Is=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ct=/^( {2,}|\\)\n(?!\s*$)/,Os=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,A=/[\p{P}\p{S}]/u,U=/[\s\p{P}\p{S}]/u,X=/[^\s\p{P}\p{S}]/u,Ds=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U).getRegex(),Ms=/[\p{Pi}\p{Ps}"']/u,At=/(?!~)[\p{P}\p{S}]/u,Fs=/(?!~)[\s\p{P}\p{S}]/u,Ns=/(?:[^\s\p{P}\p{S}]|~)/u,qs=g(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",xs?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Tt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Us=g(Tt,"u").replace(/punct/g,A).getRegex(),js=g(Tt,"u").replace(/punct/g,At).getRegex(),Hs=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Bs=g(Hs,"u").replace(/openQuote/g,Ms).replace(/punct/g,A).getRegex(),Et="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ks=g(Et,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Zs=g(Et,"gu").replace(/notPunctSpace/g,Ns).replace(/punctSpace/g,Fs).replace(/punct/g,At).getRegex(),Ws="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Vs=g(Ws,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Qs=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Js="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Ys=g(Js,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Gs=g(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,A).getRegex(),Xs="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ei=g(Xs,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),ti=g(/\\(punct)/,"gu").replace(/punct/g,A).getRegex(),si=g(/^<(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(),ii=g(ze).replace("(?:-->|$)","-->").getRegex(),ri=g("^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",ii).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ie=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ni=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ie).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rt=g(/^!?\[(label)\]\[(ref)\]/).replace("label",ie).replace("ref",Pe).getRegex(),Pt=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",Pe).getRegex(),oi=g("reflink|nolink(?!\\()","g").replace("reflink",Rt).replace("nolink",Pt).getRegex(),Ge=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ie={_backpedal:z,anyPunctuation:ti,autolink:si,blockSkip:qs,br:Ct,code:Is,del:z,delLDelim:z,delRDelim:z,emStrongLDelim:Us,emStrongRDelimAst:Ks,emStrongRDelimUnd:Qs,escape:Ls,link:ni,nolink:Pt,punctuation:Ds,reflink:Rt,reflinkSearch:oi,tag:ri,text:Os,url:z},ai={...Ie,emStrongLDelim:Bs,emStrongRDelimAst:Vs,emStrongRDelimUnd:Ys,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",ie).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ie).getRegex()},xe={...Ie,emStrongRDelimAst:Zs,emStrongLDelim:js,delLDelim:Gs,delRDelim:ei,url:g(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ge).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:g(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ge).getRegex()},li={...xe,br:g(Ct).replace("{2,}","*").getRegex(),text:g(xe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ee={normal:Le,gfm:Ps,pedantic:zs},K={normal:Ie,gfm:xe,breaks:li,pedantic:ai},ci={"&":"&","<":"<",">":">",'"':""","'":"'"},Xe=r=>ci[r];function C(r,e){if(e){if(y.escapeTest.test(r))return r.replace(y.escapeReplace,Xe)}else if(y.escapeTestNoEncode.test(r))return r.replace(y.escapeReplaceNoEncode,Xe);return r}function et(r){try{r=encodeURI(r).replace(y.percentDecode,"%")}catch{return null}return r}function tt(r,e){let t=r.replace(y.findPipe,(n,o,a)=>{let l=!1,h=o;for(;--h>=0&&a[h]==="\\";)l=!l;return l?"|":" |"}),s=t.split(y.splitPipe),i=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;i<s.length;i++)s[i]=s[i].trim().replace(y.slashPipe,"|");return s}function T(r,e,t){let s=r.length;if(s===0)return"";let i=0;for(;i<s&&r.charAt(s-i-1)===e;)i++;return r.slice(0,s-i)}function st(r){let e=r.split(`
|
|
118
118
|
`),t=e.length-1;for(;t>=0&&y.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
|
|
119
119
|
`)}function hi(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function di(r,e=0){let t=e,s="";for(let i of r)if(i===" "){let n=4-t%4;s+=" ".repeat(n),t+=n}else s+=i,t++;return s}function it(r,e,t,s,i){let n=e.href,o=e.title||null,a=r[1].replace(i.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function pi(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let i=s[1];return e.split(`
|
|
120
120
|
`).map(n=>{let o=n.match(t.other.beginningSpace);if(o===null)return n;let[a]=o;return a.length>=i.length?n.slice(i.length):n}).join(`
|
|
@@ -135,16 +135,16 @@ ${b}`,i=i.substring(0,i.length-v.text.length)+j.text;break}else if(f?.type==="li
|
|
|
135
135
|
`);continue}}return{type:"blockquote",raw:s,tokens:n,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,i={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let n=this.rules.other.listItemRegex(t),o=!1;for(;r;){let l=!1,h="",p="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;h=e[0],r=r.substring(h.length);let d=di(e[2].split(`
|
|
136
136
|
`,1)[0],e[1].length),f=r.split(`
|
|
137
137
|
`,1)[0],v=!d.trim(),b=0;if(this.options.pedantic?(b=2,p=d.trimStart()):v?b=e[1].length+1:(b=d.search(this.rules.other.nonSpaceChar),b=b>4?1:b,p=d.slice(b),b+=e[1].length),v&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
138
|
-
`,r=r.substring(f.length+1),l=!0),!l){let S=this.rules.other.nextBulletRegex(b),j=this.rules.other.hrRegex(b),
|
|
139
|
-
`,1)[0],H;if(f=de,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),H=f):H=f.replace(this.rules.other.tabCharGlobal," "),
|
|
140
|
-
`+H.slice(b);else{if(v||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||
|
|
138
|
+
`,r=r.substring(f.length+1),l=!0),!l){let S=this.rules.other.nextBulletRegex(b),j=this.rules.other.hrRegex(b),De=this.rules.other.fencesBeginRegex(b),Me=this.rules.other.headingBeginRegex(b),Mt=this.rules.other.htmlBeginRegex(b),Ft=this.rules.other.blockquoteBeginRegex(b);for(;r;){let de=r.split(`
|
|
139
|
+
`,1)[0],H;if(f=de,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),H=f):H=f.replace(this.rules.other.tabCharGlobal," "),De.test(f)||Me.test(f)||Mt.test(f)||Ft.test(f)||S.test(f)||j.test(f))break;if(H.search(this.rules.other.nonSpaceChar)>=b||!f.trim())p+=`
|
|
140
|
+
`+H.slice(b);else{if(v||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||De.test(d)||Me.test(d)||j.test(d))break;p+=`
|
|
141
141
|
`+f}v=!f.trim(),h+=de+`
|
|
142
142
|
`,r=r.substring(de.length+1),d=H.slice(b)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0)),i.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),i.raw+=h}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!i.loose){let h=l.tokens.filter(d=>d.type==="space"),p=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=p}for(let l of i.items){let h=l.tokens[0];if(l.task&&(h?.type==="text"||h?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(l.raw);if(p){let d={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};l.checked=d.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=d.raw+l.tokens[0].raw,l.tokens[0].text=d.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(d)):l.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):l.tokens.unshift(d)}}else l.task&&(l.task=!1)}if(i.loose)for(let l of i.items){l.loose=!0;for(let h of l.tokens)h.type==="text"&&(h.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=st(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:T(e[0],`
|
|
143
143
|
`),href:s,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=tt(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
144
144
|
`):[],n={type:"table",raw:T(e[0],`
|
|
145
145
|
`),header:[],align:[],rows:[]};if(t.length===s.length){for(let o of s)this.rules.other.tableAlignRight.test(o)?n.align.push("right"):this.rules.other.tableAlignCenter.test(o)?n.align.push("center"):this.rules.other.tableAlignLeft.test(o)?n.align.push("left"):n.align.push(null);for(let o=0;o<t.length;o++)n.header.push({text:t[o],tokens:this.lexer.inline(t[o]),header:!0,align:n.align[o]});for(let o of i)n.rows.push(tt(o,n.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:n.align[l]})));return n}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:T(e[0],`
|
|
146
146
|
`),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
147
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=T(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=hi(e[2],"()");if(n===-2)return;if(n>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let s=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),it(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[s.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return it(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,o,a=i,l=0,h=s[0][0],p=t===h,d=h==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*r.length+i);(s=d.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){a+=o;continue}else if(s[5]||s[6]){if(i%3&&!((i+o)%3)){l+=o;continue}if(p)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let f=[...s[0]][0].length,v=r.slice(0,i+s.index+f+o);if(Math.min(i,o)%2){let S=v.slice(1,-1);return{type:"em",raw:v,text:S,tokens:this.lexer.inlineTokens(S)}}let b=v.slice(2,-2);return{type:"strong",raw:v,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,o,a=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*r.length+i);(s=l.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n||(o=[...n].length,o!==i))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let h=[...s[0]][0].length,p=r.slice(0,i+s.index+h+o),d=p.slice(i,-i);return{type:"del",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},w=class ve{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:y,block:
|
|
147
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=T(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=hi(e[2],"()");if(n===-2)return;if(n>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let s=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),it(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[s.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return it(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,o,a=i,l=0,h=s[0][0],p=t===h,d=h==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*r.length+i);(s=d.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){a+=o;continue}else if(s[5]||s[6]){if(i%3&&!((i+o)%3)){l+=o;continue}if(p)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let f=[...s[0]][0].length,v=r.slice(0,i+s.index+f+o);if(Math.min(i,o)%2){let S=v.slice(1,-1);return{type:"em",raw:v,text:S,tokens:this.lexer.inlineTokens(S)}}let b=v.slice(2,-2);return{type:"strong",raw:v,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,o,a=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*r.length+i);(s=l.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n||(o=[...n].length,o!==i))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let h=[...s[0]][0].length,p=r.slice(0,i+s.index+h+o),d=p.slice(i,-i);return{type:"del",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},w=class ve{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:y,block:ee.normal,inline:K.normal};this.options.pedantic?(t.block=ee.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=ee.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}static get rules(){return{block:ee,inline:K}}static lex(e,t){return new ve(t).lex(e)}static lexInline(e,t){return new ve(t).inlineTokens(e)}lex(e){e=e.replace(y.carriageReturn,`
|
|
148
148
|
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(y.tabCharGlobal," ").replace(y.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let a=t.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
|
|
149
149
|
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
150
150
|
`)?"":`
|
|
@@ -176,8 +176,8 @@ ${this.parser.parse(r)}</blockquote>
|
|
|
176
176
|
`}tablerow({text:r}){return`<tr>
|
|
177
177
|
${r}</tr>
|
|
178
178
|
`}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
|
|
179
|
-
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${C(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),i=et(r);if(i===null)return s;r=i;let n='<a href="'+r+'"';return e&&(n+=' title="'+C(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let i=et(r);if(i===null)return C(t);r=i;let n=`<img src="${r}" alt="${C(t)}"`;return e&&(n+=` title="${C(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:C(r.text)}},
|
|
180
|
-
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+C(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},
|
|
179
|
+
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${C(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),i=et(r);if(i===null)return s;r=i;let n='<a href="'+r+'"';return e&&(n+=' title="'+C(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let i=et(r);if(i===null)return C(t);r=i;let n=`<img src="${r}" alt="${C(t)}"`;return e&&(n+=` title="${C(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:C(r.text)}},Oe=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},_=class ye{options;renderer;textRenderer;constructor(e){this.options=e||M,this.options.renderer=this.options.renderer||new ne,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Oe}static parse(e,t){return new ye(t).parse(e)}static parseInline(e,t){return new ye(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let i=e[s];if(this.options.extensions?.renderers?.[i.type]){let o=i,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){t+=a||"";continue}}let n=i;switch(n.type){case"space":{t+=this.renderer.space(n);break}case"hr":{t+=this.renderer.hr(n);break}case"heading":{t+=this.renderer.heading(n);break}case"code":{t+=this.renderer.code(n);break}case"table":{t+=this.renderer.table(n);break}case"blockquote":{t+=this.renderer.blockquote(n);break}case"list":{t+=this.renderer.list(n);break}case"checkbox":{t+=this.renderer.checkbox(n);break}case"html":{t+=this.renderer.html(n);break}case"def":{t+=this.renderer.def(n);break}case"paragraph":{t+=this.renderer.paragraph(n);break}case"text":{t+=this.renderer.text(n);break}default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){s+=a||"";continue}}let o=n;switch(o.type){case"escape":{s+=t.text(o);break}case"html":{s+=t.html(o);break}case"link":{s+=t.link(o);break}case"image":{s+=t.image(o);break}case"checkbox":{s+=t.checkbox(o);break}case"strong":{s+=t.strong(o);break}case"em":{s+=t.em(o);break}case"codespan":{s+=t.codespan(o);break}case"br":{s+=t.br(o);break}case"del":{s+=t.del(o);break}case"text":{s+=t.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},Z=class{options;block;constructor(r){this.options=r||M}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?w.lex:w.lexInline}provideParser(r=this.block){return r?_.parse:_.parseInline}},ui=class{defaults=Te();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=_;Renderer=ne;TextRenderer=Oe;Lexer=w;Tokenizer=re;Hooks=Z;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let i=s;for(let n of i.header)t=t.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let o of n)t=t.concat(this.walkTokens(o.tokens,e));break}case"list":{let i=s;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let o=i[n].flat(1/0);t=t.concat(this.walkTokens(o,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=e.renderers[i.name];n?e.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=n.apply(this,o)),a}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=e[i.level];n?n.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),s.extensions=e),t.renderer){let i=this.defaults.renderer||new ne(this.defaults);for(let n in t.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,a=t.renderer[o],l=i[o];i[o]=(...h)=>{let p=a.apply(i,h);return p===!1&&(p=l.apply(i,h)),p||""}}s.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new re(this.defaults);for(let n in t.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,a=t.tokenizer[o],l=i[o];i[o]=(...h)=>{let p=a.apply(i,h);return p===!1&&(p=l.apply(i,h)),p}}s.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new Z;for(let n in t.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,a=t.hooks[o],l=i[o];Z.passThroughHooks.has(n)?i[o]=h=>{if(this.defaults.async&&Z.passThroughHooksRespectAsync.has(n))return(async()=>{let d=await a.call(i,h);return l.call(i,d)})();let p=a.call(i,h);return l.call(i,p)}:i[o]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await a.apply(i,h);return d===!1&&(d=await l.apply(i,h)),d})();let p=a.apply(i,h);return p===!1&&(p=l.apply(i,h)),p}}s.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,n=t.walkTokens;s.walkTokens=function(o){let a=[];return a.push(n.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return w.lex(r,e??this.defaults)}parser(r,e){return _.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},i={...this.defaults,...s},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(e):e,a=await(i.hooks?await i.hooks.provideLexer(r):r?w.lex:w.lexInline)(o,i),l=i.hooks?await i.hooks.processAllTokens(a):a;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let h=await(i.hooks?await i.hooks.provideParser(r):r?_.parse:_.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(h):h})().catch(n);try{i.hooks&&(e=i.hooks.preprocess(e));let o=(i.hooks?i.hooks.provideLexer(r):r?w.lex:w.lexInline)(e,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let a=(i.hooks?i.hooks.provideParser(r):r?_.parse:_.parseInline)(o,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(o){return n(o)}}}onError(r,e){return t=>{if(t.message+=`
|
|
180
|
+
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+C(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},D=new ui;function x(r,e){return D.parse(r,e)}x.options=x.setOptions=function(r){return D.setOptions(r),x.defaults=D.defaults,$t(x.defaults),x};x.getDefaults=Te;x.defaults=M;function fi(...r){return D.use(...r),x.defaults=D.defaults,$t(x.defaults),x}x.use=fi;x.walkTokens=function(r,e){return D.walkTokens(r,e)};x.parseInline=D.parseInline;x.Parser=_;x.parser=_.parse;x.Renderer=ne;x.TextRenderer=Oe;x.Lexer=w;x.lexer=w.lex;x.Tokenizer=re;x.Hooks=Z;x.parse=x;x.options;x.setOptions;x.walkTokens;x.parseInline;_.parse;w.lex;/**
|
|
181
181
|
* @license
|
|
182
182
|
* Copyright 2017 Google LLC
|
|
183
183
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -185,7 +185,7 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
|
|
|
185
185
|
* @license
|
|
186
186
|
* Copyright 2017 Google LLC
|
|
187
187
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
188
|
-
*/class ke extends mi{constructor(e){if(super(e),this.it=m,e.type!==gi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===
|
|
188
|
+
*/class ke extends mi{constructor(e){if(super(e),this.it=m,e.type!==gi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===O)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}ke.directiveName="unsafeHTML",ke.resultType=1;const xi=bi(ke);let rt=0;class vi extends ${static{this.properties={tags:{attribute:!1},active:{attribute:!1},onToggle:{attribute:!1},allowCreate:{attribute:!1},width:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#n;#r;static{this.styles=R`
|
|
189
189
|
:host {
|
|
190
190
|
display: inline-block;
|
|
191
191
|
position: relative;
|
|
@@ -1150,7 +1150,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1150
1150
|
</div>
|
|
1151
1151
|
${this._viewMode==="markdown"?c`<div class="markdown-body">${xi(x.parse(e.body??"",{async:!1,renderer:this.#$(this.selected.table,e.id)}))}</div>`:c`<pre>${e.raw_file??e.body}</pre>`}
|
|
1152
1152
|
<div class="source-path" title="click to copy" @click=${()=>this.#t()}>${e.source_path}</div>
|
|
1153
|
-
`}}customElements.define("detail-panel",Ei);const oe="membkt";let fe;function
|
|
1153
|
+
`}}customElements.define("detail-panel",Ei);const oe="membkt";let fe;function W(){return fe||(fe=fetch("/api/config").then(r=>r.json()).catch(()=>({folderfooMode:"off",folderfooHost:null}))),fe}class Ri extends ${static{this.properties={defaultKind:{attribute:!1},lockKind:{attribute:!1},onAdded:{attribute:!1},onCancel:{attribute:!1}}}#e=new u("skill");#t=new u("local");#s=new u("");#n=new u([]);#r=new u(null);#g=new u("");#a=new u("");#i=new u("");#l=new u(!1);#u=new u(!1);#h=new u(!1);#d=new u("");#o=new u("");#f=new u(!1);#b=new u("");#k=new u(!1);#x=new u("");#y=new u(!1);#v=new u(!1);#m=new u([]);#p=new u("");#$=new u(!1);#w;static{this.styles=R`
|
|
1154
1154
|
:host { display: block; }
|
|
1155
1155
|
.backdrop {
|
|
1156
1156
|
position: fixed; inset: 0; background: var(--overlay);
|
|
@@ -1253,12 +1253,12 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1253
1253
|
.ff-folder-entry.selected { background: var(--accent); color: var(--accent-fg); }
|
|
1254
1254
|
.ff-empty { padding: 12px; opacity: 0.6; font-size: 13px; }
|
|
1255
1255
|
.ff-widget-slot { display: flex; }
|
|
1256
|
-
`}constructor(){super(),new ce(this),this.defaultKind="skill",this.lockKind=!1}connectedCallback(){super.connectedCallback(),this.#e.set(this.defaultKind),this.#_()}disconnectedCallback(){super.disconnectedCallback(),clearInterval(this.#w)}async#_(e){const t=new URLSearchParams;e&&t.set("path",e),this.#u.value&&t.set("hidden","1");const s=await fetch(`/api/fs/list?${t.toString()}`);if(!s.ok){this.#i.set((await s.json()).error??"failed to list directory");return}const i=await s.json();this.#s.set(i.path),this.#r.set(i.parent),this.#n.set(i.entries),this.#i.set(""),this.renderRoot.querySelector(".browser")?.scrollTo(0,0)}#
|
|
1256
|
+
`}constructor(){super(),new ce(this),this.defaultKind="skill",this.lockKind=!1}connectedCallback(){super.connectedCallback(),this.#e.set(this.defaultKind),this.#_()}disconnectedCallback(){super.disconnectedCallback(),clearInterval(this.#w)}async#_(e){const t=new URLSearchParams;e&&t.set("path",e),this.#u.value&&t.set("hidden","1");const s=await fetch(`/api/fs/list?${t.toString()}`);if(!s.ok){this.#i.set((await s.json()).error??"failed to list directory");return}const i=await s.json();this.#s.set(i.path),this.#r.set(i.parent),this.#n.set(i.entries),this.#i.set(""),this.renderRoot.querySelector(".browser")?.scrollTo(0,0)}#P(){this.#u.set(!this.#u.value),this.#_(this.#s.value)}#A(){this.#d.set(""),this.#h.set(!0)}#R(){this.#h.set(!1),this.#d.set("")}async#T(){const e=this.#d.value.trim();if(e){this.#i.set("");try{const t=await fetch("/api/fs/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:this.#s.value,name:e})}),s=await t.json();if(!t.ok){this.#i.set(s.error??"failed to create folder");return}this.#h.set(!1),this.#d.set(""),await this.#_(this.#s.value)}catch(t){this.#i.set(t.message)}}}#z(){this.#g.set(this.#s.value),this.#a.value||this.#a.set(this.#s.value.split("/").filter(Boolean).pop()??"")}async#L(){const e=this.#g.value||this.#s.value;if(e){this.#l.set(!0),this.#i.set("");try{const t=await fetch("/api/folders",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:this.#e.value,name:this.#a.value||void 0,path:e})}),s=await t.json();if(!t.ok){this.#i.set(s.error??"failed to add folder");return}this.onAdded()}finally{this.#l.set(!1)}}}async#F(){if(this.#y.value)return;const{folderfooMode:e,folderfooHost:t}=await W();if(e==="off"||!t)return;let s=null;try{s=localStorage.getItem("folderfoo_token")}catch{}s&&(this.#o.set(t),this.#x.set(oe),this.#k.set(!0),this.#D(s))}async#I(){if(!this.#o.value){this.#i.set("enter a server URL first");return}this.#i.set("");try{await ut(()=>import(`${this.#o.value}/elements/folderfoo-profile-circle.js`),[]),this.#f.set(!0),this.#b.set(""),await this.updateComplete;const e=this.renderRoot.querySelector(".ff-widget-slot");if(e&&!e.querySelector("folderfoo-profile-circle")){const t=document.createElement("folderfoo-profile-circle");t.setAttribute("app-name","Memory Bucket"),e.appendChild(t)}this.#w=setInterval(()=>this.#O(),800),this.#O()}catch(e){this.#b.set(e.message)}}#O(){let e=null;try{e=localStorage.getItem("folderfoo_token")}catch{}!e||this.#y.value||(clearInterval(this.#w),this.#D(e))}async#D(e){this.#v.set(!0),this.#i.set("");try{const t=await fetch("/api/folderfoo/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({server:this.#o.value,token:e})}),s=await t.json();if(!t.ok){this.#i.set(s.error??"failed to persist folderfoo session");return}this.#y.set(!0),this.#x.set(oe),await this.#N()}finally{this.#v.set(!1)}}async#N(){this.#$.set(!0),this.#i.set("");try{const e=new URLSearchParams({server:this.#o.value,tenantId:this.#x.value}),t=await fetch(`/api/folderfoo/folders?${e.toString()}`),s=await t.json();if(!t.ok){this.#i.set(s.error??"failed to list folderfoo folders");return}this.#m.set(s)}finally{this.#$.set(!1)}}#q(e){this.#p.set(e),this.#a.value||this.#a.set(e.split("/").filter(Boolean).pop()??this.#x.value)}async#U(){if(this.#p.value){this.#l.set(!0),this.#i.set("");try{const e=await fetch("/api/remote-folders",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:this.#e.value,name:this.#a.value||void 0,server:this.#o.value,tenantId:this.#x.value,folderPath:this.#p.value})}),t=await e.json();if(!e.ok){this.#i.set(t.error??"failed to connect folder");return}this.onAdded()}finally{this.#l.set(!1)}}}#E(){const e=this.#n.value;return c`
|
|
1257
1257
|
<div class="breadcrumb-row">
|
|
1258
1258
|
<div class="breadcrumb">${this.#s.value}</div>
|
|
1259
|
-
<button class="new-folder-btn" @click=${()=>this.#
|
|
1259
|
+
<button class="new-folder-btn" @click=${()=>this.#A()}>+ New folder</button>
|
|
1260
1260
|
<label class="hidden-toggle">
|
|
1261
|
-
<input type="checkbox" .checked=${this.#u.value} @change=${()=>this.#
|
|
1261
|
+
<input type="checkbox" .checked=${this.#u.value} @change=${()=>this.#P()} />
|
|
1262
1262
|
Show hidden
|
|
1263
1263
|
</label>
|
|
1264
1264
|
</div>
|
|
@@ -1269,9 +1269,9 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1269
1269
|
placeholder="Folder name"
|
|
1270
1270
|
.value=${this.#d.value}
|
|
1271
1271
|
@input=${t=>this.#d.set(t.target.value)}
|
|
1272
|
-
@keydown=${t=>{t.key==="Enter"&&this.#
|
|
1272
|
+
@keydown=${t=>{t.key==="Enter"&&this.#T(),t.key==="Escape"&&this.#R()}}
|
|
1273
1273
|
/>
|
|
1274
|
-
<button @click=${()=>this.#
|
|
1274
|
+
<button @click=${()=>this.#T()}>Create</button>
|
|
1275
1275
|
<button @click=${()=>this.#R()}>Cancel</button>
|
|
1276
1276
|
</div>
|
|
1277
1277
|
`:""}
|
|
@@ -1284,7 +1284,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1284
1284
|
</div>`)}
|
|
1285
1285
|
</div>
|
|
1286
1286
|
<div class="footer">
|
|
1287
|
-
<button class="secondary" @click=${()=>this.#
|
|
1287
|
+
<button class="secondary" @click=${()=>this.#z()}>
|
|
1288
1288
|
Select this folder
|
|
1289
1289
|
</button>
|
|
1290
1290
|
${this.#g.value?c`<div class="selected-row">Selected: <span class="path">${this.#g.value}</span></div>`:""}
|
|
@@ -1411,15 +1411,15 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1411
1411
|
</button>
|
|
1412
1412
|
<button
|
|
1413
1413
|
class=${this.#t.value==="folderfoo"?"active":""}
|
|
1414
|
-
@click=${()=>{this.#t.set("folderfoo"),this.#
|
|
1414
|
+
@click=${()=>{this.#t.set("folderfoo"),this.#F()}}
|
|
1415
1415
|
>
|
|
1416
1416
|
Connect folderfoo
|
|
1417
1417
|
</button>
|
|
1418
1418
|
</div>
|
|
1419
|
-
${this.#t.value==="local"?this.#
|
|
1419
|
+
${this.#t.value==="local"?this.#E():this.#M()}
|
|
1420
1420
|
</div>
|
|
1421
1421
|
</div>
|
|
1422
|
-
`}}customElements.define("add-folder-modal",Ri);function ct(r){const e=Date.now()-r,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;const s=Math.floor(t/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`}class
|
|
1422
|
+
`}}customElements.define("add-folder-modal",Ri);function ct(r){const e=Date.now()-r,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;const s=Math.floor(t/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`}class Pi extends ${static{this.properties={channels:{attribute:!1},selected:{attribute:!1},detail:{attribute:!1},loading:{attribute:!1},onSelect:{attribute:!1},onRefresh:{attribute:!1}}}static{this.styles=R`
|
|
1423
1423
|
:host { display: flex; flex: 1 1 auto; min-height: 0; }
|
|
1424
1424
|
.nav {
|
|
1425
1425
|
flex: 0 0 260px;
|
|
@@ -1503,7 +1503,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1503
1503
|
${this.#e()}
|
|
1504
1504
|
</div>
|
|
1505
1505
|
${this.#t()}
|
|
1506
|
-
`}}customElements.define("channel-view",
|
|
1506
|
+
`}}customElements.define("channel-view",Pi);function zi(r){const e=r.split(":");if(e.length===1)return{folderPath:"",name:e[0]};if(e.length===2){const[n,o]=e;return n.includes("/")?{folderPath:n,name:o}:{owner:n,folderPath:"",name:o}}const[t,s,...i]=e;return{owner:t===""?void 0:t,folderPath:s,name:i.join(":")}}const zt=new u({mode:"off",username:null});let ht=!1;function Li(){if(ht)return;ht=!0;const r=new EventSource("/api/folderfoo/identity-stream");r.onmessage=e=>{try{zt.set(JSON.parse(e.data))}catch{}}}const Ii=[{value:"all",label:"All"},{value:"skill",label:"Skills"},{value:"memory",label:"Memories"}],dt=[{value:"all",label:"Show all"},{value:"hide",label:"Hide"},{value:"only",label:"Only"}],Oi={tags:[],statuses:[],owners:[],doc_types:[],key_types:[],folders:[]},Di={skill:[],memory:[]},Lt="mem-bucket-split-pct",It=20,Ot=80;function Mi(){const r=Number(localStorage.getItem(Lt));return Number.isFinite(r)&&r>=It&&r<=Ot?r:40}const Dt="mem-bucket-theme",ge=["system","light","dark"],Fi={system:"◐",light:"☀",dark:"☾"},Ni={system:"Auto",light:"Light",dark:"Dark"};function qi(){const r=localStorage.getItem(Dt);return r==="light"||r==="dark"?r:"system"}function pt(r){r==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",r)}function Ui(){const r=location.hash.slice(1);if(!r)return{};const e=new URLSearchParams(r),t={},s=e.get("q");s&&(t.query=s);const i=e.get("type");(i==="skill"||i==="memory"||i==="all")&&(t.typeFilter=i);const n=e.getAll("tag");n.length&&(t.activeTags=n);const o=e.getAll("folder");o.length&&(t.activeFolders=o);const a=e.get("sort");a&&(t.sort=a);const l=e.get("deprecated");l==="0"?t.deprecatedFilter="hide":l==="1"&&(t.deprecatedFilter="only");const h=e.get("paused");h==="0"?t.pausedFilter="hide":h==="1"&&(t.pausedFilter="only");const p=e.get("date_from");p&&(t.dateFrom=p);const d=e.get("date_to");return d&&(t.dateTo=d),t}class ji extends ${static{this.styles=R`
|
|
1507
1507
|
:host { display: flex; flex-direction: column; height: 100vh; }
|
|
1508
1508
|
.toolbar {
|
|
1509
1509
|
display: flex;
|
|
@@ -1745,49 +1745,49 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1745
1745
|
cursor: pointer;
|
|
1746
1746
|
}
|
|
1747
1747
|
.bulk-bar button.danger { border-color: var(--danger); color: var(--danger); }
|
|
1748
|
-
`}#e=Ui();#t=new u(this.#e.query??"");#s=new u(this.#e.typeFilter??"all");#n=new u(this.#e.activeTags??[]);#r=new u(this.#e.activeFolders??[]);#g=new u([]);#a=new u(
|
|
1748
|
+
`}#e=Ui();#t=new u(this.#e.query??"");#s=new u(this.#e.typeFilter??"all");#n=new u(this.#e.activeTags??[]);#r=new u(this.#e.activeFolders??[]);#g=new u([]);#a=new u(Oi);#i=new u(null);#l=new u(Di);#u=new u(!1);#h=new u("");#d=new u(!1);#o=new u(Mi());#f=new u("");#b=new u(!1);#k=new u(this.#e.sort??"mtime_desc");#x=new u(this.#e.deprecatedFilter??"all");#y=new u(this.#e.pausedFilter??"all");#v=new u(this.#e.dateFrom??"");#m=new u(this.#e.dateTo??"");#p=new u(new Set);#$=new u(qi());#w=new u(!1);#_=new u("entries");#P=new u([]);#A=new u(null);#R=new u(null);#T=new u(!1);#z=e=>this.#N(e);#L=()=>this.#q();constructor(){super(),new ce(this),pt(this.#$.value)}#F(e){this.#$.set(e),localStorage.setItem(Dt,e),pt(e)}#I(){const e=ge[(ge.indexOf(this.#$.value)+1)%ge.length];this.#F(e)}async#O(){if(!this.#w.value){this.#w.set(!0);try{await fetch("/api/rebuild-cache",{method:"POST"}),await Promise.all([this.#C(),this.#S(),this.#c()])}finally{this.#w.set(!1)}}}#D(e){e.preventDefault(),this.#b.set(!0),document.addEventListener("pointermove",this.#z),document.addEventListener("pointerup",this.#L)}#N(e){const t=this.renderRoot.querySelector(".body-region");if(!t)return;const s=t.getBoundingClientRect(),i=(e.clientX-s.left)/s.width*100;this.#o.set(Math.min(Ot,Math.max(It,i)))}#q(){this.#b.set(!1),document.removeEventListener("pointermove",this.#z),document.removeEventListener("pointerup",this.#L),localStorage.setItem(Lt,String(this.#o.value))}#U=new us(()=>{const e=new URLSearchParams;this.#s.value!=="all"&&e.set("type",this.#s.value),this.#t.value.trim()&&e.set("q",this.#t.value.trim());for(const t of this.#n.value)e.append("tag",t);for(const t of this.#r.value)e.append("folder",t);return this.#k.value!=="mtime_desc"&&e.set("sort",this.#k.value),this.#x.value==="hide"?e.set("deprecated","0"):this.#x.value==="only"&&e.set("deprecated","1"),this.#y.value==="hide"?e.set("paused","0"):this.#y.value==="only"&&e.set("paused","1"),this.#v.value&&e.set("date_from",this.#v.value),this.#m.value&&e.set("date_to",this.#m.value),e.toString()});#E=()=>this.#Q();#M=e=>this.#ie(e);#K=e=>this.#re(e);#Z=()=>this.#V();#W;connectedCallback(){super.connectedCallback(),this.#c(),this.#S(),this.#C().then(()=>this.#Q()),window.addEventListener("focus",this.#E),document.addEventListener("visibilitychange",this.#E),document.addEventListener("folderfoo-file-open",this.#M),document.addEventListener("folderfoo-folder-changed",this.#K),window.addEventListener("folderfoo-auth-change",this.#Z),this.#ne(),this.#V(),Li(),this.#W=zt.subscribe(()=>this.#C())}async#ie(e){const t=e.detail?.name;if(!t)return;const s=zi(t);if(s.owner){this.#f.set(`"${s.name}" is from a shared folder — opening shared files here isn't supported yet.`);return}const{folderfooMode:i,folderfooHost:n}=await W();if(!(i==="off"||!n))try{const o=await fetch("/api/folderfoo/resolve-open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({server:n,tenantId:oe,folderPath:s.folderPath,name:s.name})}),a=await o.json();if(!o.ok){this.#f.set(a.error??`couldn't open "${s.name}"`);return}this.#f.set(""),this.#i.set({table:a.table,id:a.id})}catch(o){this.#f.set(o.message)}}async#re(e){const{path:t,action:s,newPath:i}=e.detail??{};if(!(t===void 0||!s)){if((s==="rename"||s==="move")&&i){const{folderfooHost:n}=await W();if(!n)return;try{await fetch("/api/folders/renamed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({server:n,oldPath:t,newPath:i})})}catch{}}this.#C()}}async#ne(){if(this.shadowRoot?.querySelector("folderfoo-profile-circle"))return;const{folderfooMode:e,folderfooHost:t}=await W();e==="off"||!t||ut(()=>import(`${t}/elements/folderfoo-profile-circle.js`),[]).then(async()=>{await this.updateComplete;const s=document.createElement("folderfoo-profile-circle");s.setAttribute("app-name","Memory Bucket"),s.setAttribute("tenant-id",oe),s.style.zoom="0.875",this.shadowRoot?.querySelector(".folderfoo-slot")?.appendChild(s)}).catch(s=>{console.warn("folderfoo-profile-circle unavailable:",s.message)})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("focus",this.#E),document.removeEventListener("visibilitychange",this.#E),document.removeEventListener("folderfoo-file-open",this.#M),document.removeEventListener("folderfoo-folder-changed",this.#K),window.removeEventListener("folderfoo-auth-change",this.#Z),this.#W?.()}async#V(){let e=null;try{e=localStorage.getItem("folderfoo_token")}catch{return}if(!e){fetch("/api/folderfoo/logout",{method:"POST"}).catch(()=>{});return}const{folderfooMode:t,folderfooHost:s}=await W();t==="off"||!s||fetch("/api/folderfoo/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({server:s,token:e})}).catch(()=>{})}#j=!1;async#Q(){if(document.visibilityState==="visible"){if(this.#X().some(e=>e.remote)&&!this.#j){this.#j=!0;try{await fetch("/api/remote-folders/resync-all",{method:"POST"})}catch{}finally{this.#j=!1}}this.#c(),this.#S(),this.#C(),this.renderRoot.querySelector("detail-panel")?.refresh?.()}}async#c(){const e=this.#U.value;history.replaceState(null,"",e?`#${e}`:location.pathname+location.search);const t=await fetch(`/api/entries?${e}`);this.#g.set(await t.json()),this.renderRoot.querySelector("result-list")?.scrollTo(0,0)}async#S(){const e=this.#s.value==="all"?"":`?type=${this.#s.value}`,t=await fetch(`/api/facets${e}`);this.#a.set(await t.json())}async#C(){const t=await(await fetch("/api/folders")).json();this.#l.set(t),this.#d.set(!0);const s=new Set([...t.skill,...t.memory].map(n=>n.name)),i=this.#r.value.filter(n=>s.has(n));i.length!==this.#r.value.length&&(this.#r.set(i),this.#c())}#oe(e){this.#_.set(e),e==="channels"&&this.#J()}async#J(){const e=await fetch("/api/channels");this.#P.set(await e.json()),this.#A.value&&this.#Y(this.#A.value)}async#Y(e){this.#A.set(e),this.#T.set(!0);try{const t=await fetch(`/api/channels/${encodeURIComponent(e)}`);this.#R.set(t.ok?await t.json():null)}finally{this.#T.set(!1)}}#ae(e){const t=this.#r.value;this.#r.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#c()}async#le(e,t){if(t.stopPropagation(),window.prompt(`Type "${e.name}" to remove this ${e.kind} folder (files on disk are untouched):`)===e.name){this.#h.set(e.name);try{await fetch(`/api/folders/${e.kind}/${encodeURIComponent(e.name)}`,{method:"DELETE"}),this.#r.set(this.#r.value.filter(i=>i!==e.name)),await Promise.all([this.#C(),this.#S(),this.#c()])}finally{this.#h.set("")}}}#G(){this.#u.set(!1),this.#C(),this.#S(),this.#c()}#X(){return[...this.#l.value.skill,...this.#l.value.memory].sort((e,t)=>Number(e.remote)-Number(t.remote))}#ce(e){this.#s.set(e),this.#n.set([]),this.#S(),this.#c()}#he(e){const t=this.#n.value;this.#n.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#c()}#de(e){this.#n.value.includes(e)||this.#n.set([...this.#n.value,e]),this.#c()}#pe(e){this.#r.value.includes(e)||this.#r.set([...this.#r.value,e]),this.#c()}#ue(e){this.#v.set(e),this.#m.set(e),this.#c()}#fe(e){this.#t.set(e.target.value),this.#c()}#ee(e){this.#t.set(e),this.#c()}#ge(){this.#t.set(""),this.#c()}#be(e){this.#i.set({table:e._table,id:e.id})}#me(e){this.#k.set(e.target.value),this.#c()}#xe(e){this.#x.set(e.target.value),this.#c()}#ve(e){this.#y.set(e.target.value),this.#c()}#ye(e){this.#v.set(e.target.value),this.#c()}#ke(e){this.#m.set(e.target.value),this.#c()}#$e(){this.#v.set(""),this.#m.set(""),this.#c()}#we(e){const t=new Set(this.#p.value);t.has(e.id)?t.delete(e.id):t.add(e.id),this.#p.set(t)}#_e(){return new Map(this.#g.value.map(e=>[e.id,e]))}#H(){const e=new Map,t=this.#_e();for(const s of this.#p.value){const i=t.get(s);if(!i)continue;const n=e.get(i._table)??[];n.push(s),e.set(i._table,n)}return e}async#te(e){const t=this.#H();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/deprecated`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,deprecated:e})}))),this.#p.set(new Set),await this.#c()}async#se(e){const t=this.#H();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/paused`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,paused:e})}))),this.#p.set(new Set),await this.#c()}async#Se(){if(!window.confirm(`Delete ${this.#p.value.size} doc(s)? This can't be undone.`))return;const e=this.#H();await Promise.all([...e.entries()].map(([t,s])=>fetch(`/api/entries/${t}/bulk/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:s})}))),this.#p.set(new Set),await this.#c()}#Ce(){const e=this.#$.value;return c`
|
|
1749
1749
|
<button
|
|
1750
1750
|
class="theme-toggle"
|
|
1751
|
-
title=${`Theme: ${
|
|
1751
|
+
title=${`Theme: ${Ni[e]} (click to change)`}
|
|
1752
1752
|
aria-label="Toggle color theme"
|
|
1753
1753
|
@click=${()=>this.#I()}
|
|
1754
1754
|
>
|
|
1755
|
-
${
|
|
1755
|
+
${Fi[e]}
|
|
1756
1756
|
</button>
|
|
1757
|
-
`}#
|
|
1757
|
+
`}#Ae(){const e=this.#_.value==="channels";return c`
|
|
1758
1758
|
<button
|
|
1759
1759
|
class="channels-toggle ${e?"active":""}"
|
|
1760
1760
|
title="Live memory channels"
|
|
1761
|
-
@click=${()=>this.#
|
|
1761
|
+
@click=${()=>this.#oe(e?"entries":"channels")}
|
|
1762
1762
|
>
|
|
1763
1763
|
⛓ Channels
|
|
1764
1764
|
</button>
|
|
1765
|
-
`}#
|
|
1765
|
+
`}#Te(){const e=this.#w.value;return c`
|
|
1766
1766
|
<button
|
|
1767
1767
|
class=${`reindex-toggle${e?" spinning":""}`}
|
|
1768
1768
|
title=${e?"Reindexing…":"Rebuild cache from disk"}
|
|
1769
1769
|
aria-label="Rebuild cache from disk"
|
|
1770
1770
|
?disabled=${e}
|
|
1771
|
-
@click=${()=>this.#
|
|
1771
|
+
@click=${()=>this.#O()}
|
|
1772
1772
|
>
|
|
1773
1773
|
♻
|
|
1774
1774
|
</button>
|
|
1775
1775
|
`}#B(e){return c`
|
|
1776
1776
|
<div class="toolbar">
|
|
1777
|
-
${e?this.#
|
|
1778
|
-
${this.#
|
|
1779
|
-
${this.#
|
|
1777
|
+
${e?this.#Te():""}
|
|
1778
|
+
${this.#Ae()}
|
|
1779
|
+
${this.#Ce()}
|
|
1780
1780
|
<div class="folderfoo-slot"></div>
|
|
1781
1781
|
</div>
|
|
1782
|
-
`}render(){const e=this.#a.value,t=this.#
|
|
1782
|
+
`}render(){const e=this.#a.value,t=this.#X();return this.#_.value==="channels"?c`
|
|
1783
1783
|
<div class="toolbar-bar">${this.#B(!1)}</div>
|
|
1784
1784
|
<channel-view
|
|
1785
|
-
.channels=${this.#
|
|
1786
|
-
.selected=${this.#
|
|
1785
|
+
.channels=${this.#P.value}
|
|
1786
|
+
.selected=${this.#A.value}
|
|
1787
1787
|
.detail=${this.#R.value}
|
|
1788
|
-
.loading=${this.#
|
|
1789
|
-
.onSelect=${s=>this.#
|
|
1790
|
-
.onRefresh=${()=>this.#
|
|
1788
|
+
.loading=${this.#T.value}
|
|
1789
|
+
.onSelect=${s=>this.#Y(s)}
|
|
1790
|
+
.onRefresh=${()=>this.#J()}
|
|
1791
1791
|
></channel-view>
|
|
1792
1792
|
`:this.#d.value&&t.length===0&&!this.#u.value?c`
|
|
1793
1793
|
<div class="toolbar-bar">${this.#B(!1)}</div>
|
|
@@ -1802,7 +1802,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1802
1802
|
${this.#u.value?c`<add-folder-modal
|
|
1803
1803
|
.defaultKind=${"skill"}
|
|
1804
1804
|
.lockKind=${!1}
|
|
1805
|
-
.onAdded=${()=>this.#
|
|
1805
|
+
.onAdded=${()=>this.#G()}
|
|
1806
1806
|
.onCancel=${()=>this.#u.set(!1)}
|
|
1807
1807
|
></add-folder-modal>`:""}
|
|
1808
1808
|
`:c`
|
|
@@ -1813,14 +1813,14 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1813
1813
|
<button
|
|
1814
1814
|
class="folder-chip ${s.remote?"remote":""} ${this.#r.value.includes(s.name)?"active":""}"
|
|
1815
1815
|
title=${s.remote?`${s.path} (remote — folderfoo)`:s.path}
|
|
1816
|
-
@click=${()=>this.#
|
|
1816
|
+
@click=${()=>this.#ae(s.name)}
|
|
1817
1817
|
>
|
|
1818
1818
|
${s.remote?c`<span class="remote-dot"></span>`:"📁"} ${s.name}
|
|
1819
1819
|
<span class="kind">(${s.kind==="skill"?"s":"m"})</span>
|
|
1820
1820
|
<span
|
|
1821
1821
|
class="remove"
|
|
1822
1822
|
title="Remove folder"
|
|
1823
|
-
@click=${i=>this.#
|
|
1823
|
+
@click=${i=>this.#le(s,i)}
|
|
1824
1824
|
>${this.#h.value===s.name?"…":"✕"}</span
|
|
1825
1825
|
>
|
|
1826
1826
|
</button>
|
|
@@ -1842,14 +1842,14 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1842
1842
|
type="search"
|
|
1843
1843
|
placeholder="Search descriptions, bodies, tags..."
|
|
1844
1844
|
.value=${this.#t.value}
|
|
1845
|
-
@input=${s=>this.#
|
|
1845
|
+
@input=${s=>this.#fe(s)}
|
|
1846
1846
|
/>
|
|
1847
1847
|
${this.#t.value?c`
|
|
1848
1848
|
<button
|
|
1849
1849
|
class="search-clear-btn"
|
|
1850
1850
|
title="Clear search"
|
|
1851
1851
|
aria-label="Clear search"
|
|
1852
|
-
@click=${()=>this.#
|
|
1852
|
+
@click=${()=>this.#ge()}
|
|
1853
1853
|
>
|
|
1854
1854
|
✕
|
|
1855
1855
|
</button>
|
|
@@ -1859,7 +1859,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1859
1859
|
${Ii.map(s=>c`
|
|
1860
1860
|
<button
|
|
1861
1861
|
class=${this.#s.value===s.value?"active":""}
|
|
1862
|
-
@click=${()=>this.#
|
|
1862
|
+
@click=${()=>this.#ce(s.value)}
|
|
1863
1863
|
>
|
|
1864
1864
|
${s.label}
|
|
1865
1865
|
</button>
|
|
@@ -1869,7 +1869,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1869
1869
|
<tag-multiselect
|
|
1870
1870
|
.tags=${e.tags}
|
|
1871
1871
|
.active=${this.#n.value}
|
|
1872
|
-
.onToggle=${s=>this.#
|
|
1872
|
+
.onToggle=${s=>this.#he(s)}
|
|
1873
1873
|
.width=${"260px"}
|
|
1874
1874
|
></tag-multiselect>
|
|
1875
1875
|
`}
|
|
@@ -1879,39 +1879,39 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1879
1879
|
type="date"
|
|
1880
1880
|
aria-label="From date"
|
|
1881
1881
|
.value=${this.#v.value}
|
|
1882
|
-
@change=${s=>this.#
|
|
1882
|
+
@change=${s=>this.#ye(s)}
|
|
1883
1883
|
/>
|
|
1884
1884
|
<span class="date-range-sep">–</span>
|
|
1885
1885
|
<input
|
|
1886
1886
|
type="date"
|
|
1887
1887
|
aria-label="To date"
|
|
1888
1888
|
.value=${this.#m.value}
|
|
1889
|
-
@change=${s=>this.#
|
|
1889
|
+
@change=${s=>this.#ke(s)}
|
|
1890
1890
|
/>
|
|
1891
1891
|
${this.#v.value||this.#m.value?c`
|
|
1892
1892
|
<button
|
|
1893
1893
|
class="date-range-clear"
|
|
1894
1894
|
title="Clear date range"
|
|
1895
1895
|
aria-label="Clear date range"
|
|
1896
|
-
@click=${()=>this
|
|
1896
|
+
@click=${()=>this.#$e()}
|
|
1897
1897
|
>
|
|
1898
1898
|
✕
|
|
1899
1899
|
</button>
|
|
1900
1900
|
`:""}
|
|
1901
1901
|
</div>
|
|
1902
1902
|
<span class="filter-label">Sort:</span>
|
|
1903
|
-
<select .value=${this.#k.value} @change=${s=>this.#
|
|
1903
|
+
<select .value=${this.#k.value} @change=${s=>this.#me(s)}>
|
|
1904
1904
|
<option value="mtime_desc">Recently touched</option>
|
|
1905
1905
|
<option value="mtime_asc">Least recently touched</option>
|
|
1906
1906
|
<option value="created_at_asc">Oldest first</option>
|
|
1907
1907
|
<option value="name_asc">Name</option>
|
|
1908
1908
|
</select>
|
|
1909
1909
|
<span class="filter-label">Deprecated:</span>
|
|
1910
|
-
<select .value=${this.#x.value} @change=${s=>this.#
|
|
1910
|
+
<select .value=${this.#x.value} @change=${s=>this.#xe(s)}>
|
|
1911
1911
|
${dt.map(s=>c`<option value=${s.value}>${s.label}</option>`)}
|
|
1912
1912
|
</select>
|
|
1913
1913
|
<span class="filter-label">Paused:</span>
|
|
1914
|
-
<select .value=${this.#y.value} @change=${s=>this.#
|
|
1914
|
+
<select .value=${this.#y.value} @change=${s=>this.#ve(s)}>
|
|
1915
1915
|
${dt.map(s=>c`<option value=${s.value}>${s.label}</option>`)}
|
|
1916
1916
|
</select>
|
|
1917
1917
|
</div>
|
|
@@ -1919,11 +1919,11 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1919
1919
|
${this.#p.value.size>0?c`
|
|
1920
1920
|
<div class="bulk-bar">
|
|
1921
1921
|
<span>${this.#p.value.size} selected</span>
|
|
1922
|
-
<button @click=${()=>this.#
|
|
1923
|
-
<button @click=${()=>this.#
|
|
1924
|
-
<button @click=${()=>this.#
|
|
1925
|
-
<button @click=${()=>this.#
|
|
1926
|
-
<button class="danger" @click=${()=>this.#
|
|
1922
|
+
<button @click=${()=>this.#te(!0)}>Mark deprecated</button>
|
|
1923
|
+
<button @click=${()=>this.#te(!1)}>Un-deprecate</button>
|
|
1924
|
+
<button @click=${()=>this.#se(!0)}>Pause</button>
|
|
1925
|
+
<button @click=${()=>this.#se(!1)}>Resume</button>
|
|
1926
|
+
<button class="danger" @click=${()=>this.#Se()}>Delete</button>
|
|
1927
1927
|
<button @click=${()=>this.#p.set(new Set)}>Clear</button>
|
|
1928
1928
|
</div>
|
|
1929
1929
|
`:""}
|
|
@@ -1932,29 +1932,29 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
|
|
|
1932
1932
|
style=${`width: ${this.#o.value}%; border-right: 1px solid var(--border);`}
|
|
1933
1933
|
.results=${this.#g.value}
|
|
1934
1934
|
.showFolder=${t.length>1}
|
|
1935
|
-
.onSelect=${s=>this.#
|
|
1935
|
+
.onSelect=${s=>this.#be(s)}
|
|
1936
1936
|
.selectedIds=${this.#p.value}
|
|
1937
|
-
.onToggleSelect=${s=>this.#
|
|
1938
|
-
.onKeyClick=${s=>this.#
|
|
1937
|
+
.onToggleSelect=${s=>this.#we(s)}
|
|
1938
|
+
.onKeyClick=${s=>this.#ee(s)}
|
|
1939
1939
|
></result-list>
|
|
1940
1940
|
<div
|
|
1941
1941
|
class="splitter ${this.#b.value?"dragging":""}"
|
|
1942
|
-
@pointerdown=${s=>this.#
|
|
1942
|
+
@pointerdown=${s=>this.#D(s)}
|
|
1943
1943
|
></div>
|
|
1944
1944
|
<detail-panel
|
|
1945
1945
|
.selected=${this.#i.value}
|
|
1946
1946
|
.facets=${e}
|
|
1947
1947
|
.onChanged=${()=>{this.#c(),this.#S()}}
|
|
1948
|
-
.onTagClick=${s=>this.#
|
|
1949
|
-
.onFolderClick=${s=>this.#
|
|
1950
|
-
.onDateClick=${s=>this.#
|
|
1951
|
-
.onKeyClick=${s=>this.#
|
|
1948
|
+
.onTagClick=${s=>this.#de(s)}
|
|
1949
|
+
.onFolderClick=${s=>this.#pe(s)}
|
|
1950
|
+
.onDateClick=${s=>this.#ue(s)}
|
|
1951
|
+
.onKeyClick=${s=>this.#ee(s)}
|
|
1952
1952
|
></detail-panel>
|
|
1953
1953
|
</div>
|
|
1954
1954
|
${this.#u.value?c`<add-folder-modal
|
|
1955
1955
|
.defaultKind=${"skill"}
|
|
1956
1956
|
.lockKind=${!1}
|
|
1957
|
-
.onAdded=${()=>this.#
|
|
1957
|
+
.onAdded=${()=>this.#G()}
|
|
1958
1958
|
.onCancel=${()=>this.#u.set(!1)}
|
|
1959
1959
|
></add-folder-modal>`:""}
|
|
1960
1960
|
`}}customElements.define("mem-bucket-app",ji);
|