beads-ui 0.4.4 → 0.5.0
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/CHANGES.md +29 -0
- package/app/index.html +11 -0
- package/app/main.bundle.js +242 -225
- package/app/main.bundle.js.map +4 -4
- package/app/styles.css +135 -0
- package/package.json +18 -18
- package/server/ws.js +61 -21
package/app/main.bundle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
\f\r]`,_t=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ln=/-->/g,cn=/>/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),dn=/'/g,un=/"/g,gn=/^(?:script|style|textarea|title)$/i,vr=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),R=vr(1),ro=vr(2),no=vr(3),Je=Symbol.for("lit-noChange"),le=Symbol.for("lit-nothing"),pn=new WeakMap,Xe=Qe.createTreeWalker(Qe,129);function mn(t,e){if(!xr(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return an!==void 0?an.createHTML(e):e}var Ms=(t,e)=>{let r=t.length-1,s=[],n,i=e===2?"<svg>":e===3?"<math>":"",o=_t;for(let a=0;a<r;a++){let l=t[a],u,g,d=-1,p=0;for(;p<l.length&&(o.lastIndex=p,g=o.exec(l),g!==null);)p=o.lastIndex,o===_t?g[1]==="!--"?o=ln:g[1]!==void 0?o=cn:g[2]!==void 0?(gn.test(g[2])&&(n=RegExp("</"+g[2],"g")),o=Ye):g[3]!==void 0&&(o=Ye):o===Ye?g[0]===">"?(o=n??_t,d=-1):g[1]===void 0?d=-2:(d=o.lastIndex-g[2].length,u=g[1],o=g[3]===void 0?Ye:g[3]==='"'?un:dn):o===un||o===dn?o=Ye:o===ln||o===cn?o=_t:(o=Ye,n=void 0);let h=o===Ye&&t[a+1].startsWith("/>")?" ":"";i+=o===_t?l+Ds:d>=0?(s.push(u),l.slice(0,d)+fn+l.slice(d)+qe+h):l+qe+(d===-2?a:h)}return[mn(t,i+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]},St=class t{constructor({strings:e,_$litType$:r},s){let n;this.parts=[];let i=0,o=0,a=e.length-1,l=this.parts,[u,g]=Ms(e,r);if(this.el=t.createElement(u,s),Xe.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=Xe.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(fn)){let p=g[o++],h=n.getAttribute(d).split(qe),k=/([.?@])?(.*)/.exec(p);l.push({type:1,index:i,name:k[2],strings:h,ctor:k[1]==="."?yr:k[1]==="?"?wr:k[1]==="@"?kr:dt}),n.removeAttribute(d)}else d.startsWith(qe)&&(l.push({type:6,index:i}),n.removeAttribute(d));if(gn.test(n.tagName)){let d=n.textContent.split(qe),p=d.length-1;if(p>0){n.textContent=Wt?Wt.emptyScript:"";for(let h=0;h<p;h++)n.append(d[h],vt()),Xe.nextNode(),l.push({type:2,index:++i});n.append(d[p],vt())}}}else if(n.nodeType===8)if(n.data===hn)l.push({type:2,index:i});else{let d=-1;for(;(d=n.data.indexOf(qe,d+1))!==-1;)l.push({type:7,index:i}),d+=qe.length-1}i++}}static createElement(e,r){let s=Qe.createElement("template");return s.innerHTML=e,s}};function ct(t,e,r=t,s){if(e===Je)return e;let n=s!==void 0?r._$Co?.[s]:r._$Cl,i=At(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(t),n._$AT(t,r,s)),s!==void 0?(r._$Co??(r._$Co=[]))[s]=n:r._$Cl=n),n!==void 0&&(e=ct(t,n._$AS(t,e.values),n,s)),e}var br=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:s}=this._$AD,n=(e?.creationScope??Qe).importNode(r,!0);Xe.currentNode=n;let i=Xe.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new Tt(i,i.nextSibling,this,e):l.type===1?u=new l.ctor(i,l.name,l.strings,this,e):l.type===6&&(u=new _r(i,this,e)),this._$AV.push(u),l=s[++a]}o!==l?.index&&(i=Xe.nextNode(),o++)}return Xe.currentNode=Qe,n}p(e){let r=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,r),r+=s.strings.length-2):s._$AI(e[r])),r++}},Tt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,s,n){this.type=2,this._$AH=le,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=ct(this,e,r),At(e)?e===le||e==null||e===""?(this._$AH!==le&&this._$AR(),this._$AH=le):e!==this._$AH&&e!==Je&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ns(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!==le&&At(this._$AH)?this._$AA.nextSibling.data=e:this.T(Qe.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=St.createElement(mn(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(r);else{let i=new br(n,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(e){let r=pn.get(e.strings);return r===void 0&&pn.set(e.strings,r=new St(e)),r}k(e){xr(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,s,n=0;for(let i of e)n===r.length?r.push(s=new t(this.O(vt()),this.O(vt()),this,this.options)):s=r[n],s._$AI(i),n++;n<r.length&&(this._$AR(s&&s._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},dt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,s,n,i){this.type=1,this._$AH=le,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=le}_$AI(e,r=this,s,n){let i=this.strings,o=!1;if(i===void 0)e=ct(this,e,r,0),o=!At(e)||e!==this._$AH&&e!==Je,o&&(this._$AH=e);else{let a=e,l,u;for(e=i[0],l=0;l<i.length-1;l++)u=ct(this,a[s+l],r,l),u===Je&&(u=this._$AH[l]),o||(o=!At(u)||u!==this._$AH[l]),u===le?e=le:e!==le&&(e+=(u??"")+i[l+1]),this._$AH[l]=u}o&&!n&&this.j(e)}j(e){e===le?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},yr=class extends dt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===le?void 0:e}},wr=class extends dt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==le)}},kr=class extends dt{constructor(e,r,s,n,i){super(e,r,s,n,i),this.type=5}_$AI(e,r=this){if((e=ct(this,e,r,0)??le)===Je)return;let s=this._$AH,n=e===le&&s!==le||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==le&&(s===le||n);n&&this.element.removeEventListener(this.name,this,s),i&&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)}},_r=class{constructor(e,r,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){ct(this,e)}};var Os=xt.litHtmlPolyfillSupport;Os?.(St,Tt),(xt.litHtmlVersions??(xt.litHtmlVersions=[])).push("3.3.1");var Ae=(t,e,r)=>{let s=r?.renderBefore??e,n=s._$litPart$;if(n===void 0){let i=r?.renderBefore??null;s._$litPart$=n=new Tt(e.insertBefore(vt(),i),i,void 0,r??{})}return n._$AI(t),n};function $e(t,e){let r=t.priority??2,s=e.priority??2;if(r!==s)return r-s;let n=t.created_at??0,i=e.created_at??0;if(n!==i)return n<i?-1:1;let o=t.id,a=e.id;return o<a?-1:o>a?1:0}function ut(t,e){let r=t.closed_at??0,s=e.closed_at??0;if(r!==s)return r<s?1:-1;let n=t?.id,i=e?.id;return n<i?-1:n>i?1:0}function je(t=void 0){function e(i){return!t||typeof t.snapshotFor!="function"?[]:t.snapshotFor(i).slice().sort($e)}function r(i,o){let a=t&&t.snapshotFor?t.snapshotFor(i).slice():[];return o==="in_progress"?a.sort($e):o==="closed"?a.sort(ut):a.sort($e),a}function s(i){if(!t||typeof t.snapshotFor!="function")return[];let a=(t.snapshotFor(`detail:${i}`)||[]).find(u=>String(u?.id||"")===String(i));return(Array.isArray(a?.dependents)?a.dependents:[]).slice().sort($e)}function n(i){return t&&typeof t.subscribe=="function"?t.subscribe(i):()=>{}}return{selectIssuesFor:e,selectBoardColumn:r,selectEpicChildren:s,subscribe:n}}var xn=Ls(_n(),1);function se(t){return(0,xn.default)(`beads-ui:${t}`)}function vn(t){let e=se("data");async function r(s){let{id:n}=s;e("updateIssue %s %o",n,Object.keys(s));let i=null;return typeof s.title=="string"&&(i=await t("edit-text",{id:n,field:"title",value:s.title})),typeof s.acceptance=="string"&&(i=await t("edit-text",{id:n,field:"acceptance",value:s.acceptance})),typeof s.notes=="string"&&(i=await t("edit-text",{id:n,field:"notes",value:s.notes})),typeof s.design=="string"&&(i=await t("edit-text",{id:n,field:"design",value:s.design})),typeof s.status=="string"&&(i=await t("update-status",{id:n,status:s.status})),typeof s.priority=="number"&&(i=await t("update-priority",{id:n,priority:s.priority})),typeof s.assignee=="string"&&(i=await t("update-assignee",{id:n,assignee:s.assignee})),e("updateIssue done %s",n),i}return{updateIssue:r}}function Ar(t,e={}){let r=se(`issue-store:${t}`),s=new Map,n=[],i=0,o=new Set,a=!1,l=e.sort||$e;function u(){for(let p of Array.from(o))try{p()}catch{}}function g(){n=Array.from(s.values()).sort(l)}function d(p){if(a||!p||p.id!==t)return;let h=Number(p.revision)||0;if(r("apply %s rev=%d",p.type,h),!(h<=i&&p.type!=="snapshot")){if(p.type==="snapshot"){if(h<=i)return;s.clear();let k=Array.isArray(p.issues)?p.issues:[];for(let x of k)x&&typeof x.id=="string"&&x.id.length>0&&s.set(x.id,x);g(),i=h,u();return}if(p.type==="upsert"){let k=p.issue;if(k&&typeof k.id=="string"&&k.id.length>0){let x=s.get(k.id);if(!x)s.set(k.id,k);else{let I=Number.isFinite(x.updated_at)?x.updated_at:0,A=Number.isFinite(k.updated_at)?k.updated_at:0;if(I<=A){for(let F of Object.keys(x))F in k||delete x[F];for(let[F,E]of Object.entries(k))x[F]=E}}g()}i=h,u()}else if(p.type==="delete"){let k=String(p.issue_id||"");k&&(s.delete(k),g()),i=h,u()}}}return{id:t,subscribe(p){return o.add(p),()=>{o.delete(p)}},applyPush:d,snapshot(){return n},size(){return s.size},getById(p){return s.get(p)},dispose(){a=!0,s.clear(),n=[],o.clear(),i=0}}}function Vt(t){let e=String(t.type||"").trim(),r={};if(t.params&&typeof t.params=="object"){let n=Object.keys(t.params).sort();for(let i of n){let o=t.params[i];r[i]=String(o)}}let s=new URLSearchParams(r).toString();return s.length>0?`${e}?${s}`:e}function An(t){let e=se("subs"),r=new Map,s=new Map;function n(a,l){e("applyDelta %s +%d ~%d -%d",a,(l.added||[]).length,(l.updated||[]).length,(l.removed||[]).length);let u=s.get(a);if(!u||u.size===0)return;let g=Array.isArray(l.added)?l.added:[],d=Array.isArray(l.updated)?l.updated:[],p=Array.isArray(l.removed)?l.removed:[];for(let h of Array.from(u)){let k=r.get(h);if(!k)continue;let x=k.itemsById;for(let I of g)typeof I=="string"&&I.length>0&&x.set(I,!0);for(let I of d)typeof I=="string"&&I.length>0&&x.set(I,!0);for(let I of p)typeof I=="string"&&I.length>0&&x.delete(I)}}async function i(a,l){let u=Vt(l);if(e("subscribe %s key=%s",a,u),!r.has(a))r.set(a,{key:u,itemsById:new Map});else{let d=r.get(a);if(d&&d.key!==u){let p=s.get(d.key);p&&(p.delete(a),p.size===0&&s.delete(d.key)),r.set(a,{key:u,itemsById:new Map})}}s.has(u)||s.set(u,new Set);let g=s.get(u);g&&g.add(a);try{await t("subscribe-list",{id:a,type:l.type,params:l.params})}catch{}return async()=>{e("unsubscribe %s key=%s",a,u);try{await t("unsubscribe-list",{id:a})}catch{}let d=r.get(a)||null;if(d){let p=s.get(d.key);p&&(p.delete(a),p.size===0&&s.delete(d.key))}r.delete(a)}}return{subscribeList:i,_applyDelta:n,_subKeyOf:Vt,selectors:{getIds(a){let l=r.get(a);return l?Array.from(l.itemsById.keys()):[]},has(a,l){let u=r.get(a);return u?u.itemsById.has(l):!1},count(a){let l=r.get(a);return l?l.itemsById.size:0},getItemsById(a){let l=r.get(a),u={};if(!l)return u;for(let g of l.itemsById.keys())u[g]=!0;return u}}}}function Sn(){let t=se("issue-stores"),e=new Map,r=new Map,s=new Set,n=new Map;function i(){for(let l of Array.from(s))try{l()}catch{}}function o(l,u,g){let d=u?Vt(u):"",p=r.get(l)||"",h=e.has(l);if(t("register %s key=%s (prev=%s)",l,d,p),h&&p&&d&&p!==d){let k=e.get(l);if(k)try{k.dispose()}catch{}let x=n.get(l);if(x){try{x()}catch{}n.delete(l)}let I=Ar(l,g);e.set(l,I);let A=I.subscribe(()=>i());n.set(l,A)}else if(!h){let k=Ar(l,g);e.set(l,k);let x=k.subscribe(()=>i());n.set(l,x)}return r.set(l,d),()=>a(l)}function a(l){t("unregister %s",l),r.delete(l);let u=e.get(l);u&&(u.dispose(),e.delete(l));let g=n.get(l);if(g){try{g()}catch{}n.delete(l)}}return{register:o,unregister:a,getStore(l){return e.get(l)||null},snapshotFor(l){let u=e.get(l);return u?u.snapshot().slice():[]},subscribe(l){return s.add(l),()=>s.delete(l)}}}function Ge(t,e){return`#/${t==="epics"||t==="board"?t:"issues"}?issue=${encodeURIComponent(e)}`}function Yt(t){let e=String(t||""),r=e.startsWith("#")?e.slice(1):e,s=r.indexOf("?"),n=s>=0?r.slice(s+1):"";if(n){let a=new URLSearchParams(n).get("issue");if(a)return decodeURIComponent(a)}let i=/^\/issue\/([^\s?#]+)/.exec(r);return i&&i[1]?decodeURIComponent(i[1]):null}function Sr(t){let e=String(t||"");return/^#\/epics(\b|\/|$)/.test(e)?"epics":/^#\/board(\b|\/|$)/.test(e)?"board":"issues"}function Tn(t){let e=se("router"),r=()=>{let s=window.location.hash||"",n=/^#\/issue\/([^\s?#]+)/.exec(s);if(n&&n[1]){let a=decodeURIComponent(n[1]);t.setState({selected_id:a,view:"issues"});let l=`#/issues?issue=${encodeURIComponent(a)}`;if(window.location.hash!==l){window.location.hash=l;return}}let i=Yt(s),o=Sr(s);e("hash change \u2192 view=%s id=%s",o,i),t.setState({selected_id:i,view:o})};return{start(){window.addEventListener("hashchange",r),r()},stop(){window.removeEventListener("hashchange",r)},gotoIssue(s){let i=(t.getState?t.getState():{view:"issues"}).view||"issues",o=Ge(i,s);e("goto issue %s (view=%s)",s,i),window.location.hash!==o?window.location.hash=o:t.setState({selected_id:s,view:i})},gotoView(s){let i=(t.getState?t.getState():{selected_id:null}).selected_id,o=i?Ge(s,i):`#/${s}`;e("goto view %s (id=%s)",s,i||""),window.location.hash!==o?window.location.hash=o:t.setState({view:s,selected_id:null})}}}function $n(t={}){let e=se("state"),r={selected_id:t.selected_id??null,view:t.view??"issues",filters:{status:t.filters?.status??"all",search:t.filters?.search??"",type:typeof t.filters?.type=="string"?t.filters?.type:""},board:{closed_filter:t.board?.closed_filter==="3"||t.board?.closed_filter==="7"||t.board?.closed_filter==="today"?t.board?.closed_filter:"today"}},s=new Set;function n(){for(let i of Array.from(s))try{i(r)}catch{}}return{getState(){return r},setState(i){let o={...r,...i,filters:{...r.filters,...i.filters||{}},board:{...r.board,...i.board||{}}};o.selected_id===r.selected_id&&o.view===r.view&&o.filters.status===r.filters.status&&o.filters.search===r.filters.search&&o.filters.type===r.filters.type&&o.board.closed_filter===r.board.closed_filter||(r=o,e("state change %o",{selected_id:r.selected_id,view:r.view,filters:r.filters,board:r.board}),n())},subscribe(i){return s.add(i),()=>s.delete(i)}}}function ge(t,e="info",r=2800){let s=document.createElement("div");s.className="toast",s.textContent=t,s.style.position="fixed",s.style.right="12px",s.style.bottom="12px",s.style.zIndex="1000",s.style.color="#fff",s.style.padding="8px 10px",s.style.borderRadius="4px",s.style.fontSize="12px",e==="success"?s.style.background="#156d36":e==="error"?s.style.background="#9f2011":s.style.background="rgba(0,0,0,0.85)",(document.body||document.documentElement).appendChild(s),setTimeout(()=>{try{s.remove()}catch{}},r)}function We(t,e){let r=typeof e?.duration_ms=="number"?e.duration_ms:1200,s=document.createElement("button");s.className=(e?.class_name?e.class_name+" ":"")+"mono id-copy",s.type="button",s.setAttribute("aria-live","polite"),s.setAttribute("title","Copy issue ID"),s.setAttribute("aria-label",`Copy issue ID ${t}`),s.textContent=t;async function n(){try{navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&await navigator.clipboard.writeText(String(t)),s.textContent="Copied";let i=s.getAttribute("aria-label")||"";s.setAttribute("aria-label","Copied"),setTimeout(()=>{s.textContent=t,s.setAttribute("aria-label",i)},Math.max(80,r))}catch{}}return s.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),n()}),s.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopPropagation(),n())}),s}var Ze=["Critical","High","Medium","Low","Backlog"];function En(t){let e=typeof t=="number"?t:2,r=document.createElement("span");r.className="priority-badge",r.classList.add(`is-p${Math.max(0,Math.min(4,e))}`),r.setAttribute("role","img");let s=Vs(e);return r.setAttribute("title",s),r.setAttribute("aria-label",`Priority: ${s}`),r.textContent=$t(e)+" "+s,r}function Vs(t){let e=Math.max(0,Math.min(4,t));return Ze[e]||"Medium"}function $t(t){switch(t){case 0:return"\u{1F525}";case 1:return"\u26A1\uFE0F";case 2:return"\u{1F527}";case 3:return"\u{1FAB6}";case 4:return"\u{1F4A4}";default:return"\u{1F527}"}}function tt(t){let e=document.createElement("span");e.className="type-badge";let r=(t||"").toString().toLowerCase(),s=new Set(["bug","feature","task","epic","chore"]),n=s.has(r)?r:"neutral";e.classList.add(`type-badge--${n}`),e.setAttribute("role","img");let i=s.has(r)?r==="bug"?"Bug":r==="feature"?"Feature":r==="task"?"Task":r==="epic"?"Epic":"Chore":"\u2014";return e.setAttribute("aria-label",s.has(r)?`Issue type: ${i}`:"Issue type: unknown"),e.setAttribute("title",s.has(r)?`Type: ${i}`:"Type: unknown"),e.textContent=i,e}function Cn(t,e,r,s,n=void 0,i=void 0){let o=se("views:board"),a=[],l=[],u=[],g=[],d=[],p=i?je(i):null,h="today";if(s)try{let w=s.getState(),b=w&&w.board?String(w.board.closed_filter||"today"):"today";(b==="today"||b==="3"||b==="7")&&(h=b)}catch{}function k(){return R`
|
|
1
|
+
var Es=Object.create;var hr=Object.defineProperty;var $s=Object.getOwnPropertyDescriptor;var Cs=Object.getOwnPropertyNames;var Rs=Object.getPrototypeOf,Is=Object.prototype.hasOwnProperty;var Ls=(r,e,t)=>e in r?hr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var gr=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ds=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Cs(e))!Is.call(r,n)&&n!==t&&hr(r,n,{get:()=>e[n],enumerable:!(s=$s(e,n))||s.enumerable});return r};var Ns=(r,e,t)=>(t=r!=null?Es(Rs(r)):{},Ds(e||!r||!r.__esModule?hr(t,"default",{value:r,enumerable:!0}):t,r));var J=(r,e,t)=>Ls(r,typeof e!="symbol"?e+"":e,t);var yn=gr((po,bn)=>{var gt=1e3,mt=gt*60,bt=mt*60,nt=bt*24,zs=nt*7,Bs=nt*365.25;bn.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return Hs(r);if(t==="number"&&isFinite(r))return e.long?qs(r):Us(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function Hs(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return t*Bs;case"weeks":case"week":case"w":return t*zs;case"days":case"day":case"d":return t*nt;case"hours":case"hour":case"hrs":case"hr":case"h":return t*bt;case"minutes":case"minute":case"mins":case"min":case"m":return t*mt;case"seconds":case"second":case"secs":case"sec":case"s":return t*gt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Us(r){var e=Math.abs(r);return e>=nt?Math.round(r/nt)+"d":e>=bt?Math.round(r/bt)+"h":e>=mt?Math.round(r/mt)+"m":e>=gt?Math.round(r/gt)+"s":r+"ms"}function qs(r){var e=Math.abs(r);return e>=nt?Zt(r,e,nt,"day"):e>=bt?Zt(r,e,bt,"hour"):e>=mt?Zt(r,e,mt,"minute"):e>=gt?Zt(r,e,gt,"second"):r+" ms"}function Zt(r,e,t,s){var n=e>=t*1.5;return Math.round(r/t)+" "+s+(n?"s":"")}});var kn=gr((fo,wn)=>{function js(r){t.debug=t,t.default=t,t.coerce=o,t.disable=a,t.enable=n,t.enabled=l,t.humanize=yn(),t.destroy=p,Object.keys(r).forEach(d=>{t[d]=r[d]}),t.names=[],t.skips=[],t.formatters={};function e(d){let u=0;for(let f=0;f<d.length;f++)u=(u<<5)-u+d.charCodeAt(f),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(d){let u,f=null,m,v;function k(...I){if(!k.enabled)return;let S=k,P=Number(new Date),$=P-(u||P);S.diff=$,S.prev=u,S.curr=P,u=P,I[0]=t.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let C=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(y,_)=>{if(y==="%%")return"%";C++;let b=t.formatters[_];if(typeof b=="function"){let T=I[C];y=b.call(S,T),I.splice(C,1),C--}return y}),t.formatArgs.call(S,I),(S.log||t.log).apply(S,I)}return k.namespace=d,k.useColors=t.useColors(),k.color=t.selectColor(d),k.extend=s,k.destroy=t.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==t.namespaces&&(m=t.namespaces,v=t.enabled(d)),v),set:I=>{f=I}}),typeof t.init=="function"&&t.init(k),k}function s(d,u){let f=t(this.namespace+(typeof u>"u"?":":u)+d);return f.log=this.log,f}function n(d){t.save(d),t.namespaces=d,t.names=[],t.skips=[];let u=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of u)f[0]==="-"?t.skips.push(f.slice(1)):t.names.push(f)}function i(d,u){let f=0,m=0,v=-1,k=0;for(;f<d.length;)if(m<u.length&&(u[m]===d[f]||u[m]==="*"))u[m]==="*"?(v=m,k=f,m++):(f++,m++);else if(v!==-1)m=v+1,k++,f=k;else return!1;for(;m<u.length&&u[m]==="*";)m++;return m===u.length}function a(){let d=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),d}function l(d){for(let u of t.skips)if(i(d,u))return!1;for(let u of t.names)if(i(d,u))return!0;return!1}function o(d){return d instanceof Error?d.stack||d.message:d}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}wn.exports=js});var _n=gr((Se,Kt)=>{Se.formatArgs=Ws;Se.save=Zs;Se.load=Ks;Se.useColors=Gs;Se.storage=Ys();Se.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Se.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Gs(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ws(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+Kt.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,s=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(s=t))}),r.splice(s,0,e)}Se.log=console.debug||console.log||(()=>{});function Zs(r){try{r?Se.storage.setItem("debug",r):Se.storage.removeItem("debug")}catch{}}function Ks(){let r;try{r=Se.storage.getItem("debug")||Se.storage.getItem("DEBUG")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}function Ys(){try{return localStorage}catch{}}Kt.exports=kn()(Se);var{formatters:Vs}=Kt.exports;Vs.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var xt=globalThis,Wt=xt.trustedTypes,an=Wt?Wt.createPolicy("lit-html",{createHTML:r=>r}):void 0,fn="$lit$",Ge=`lit$${Math.random().toFixed(9).slice(2)}$`,hn="?"+Ge,Ms=`<${hn}>`,tt=document,vt=()=>tt.createComment(""),At=r=>r===null||typeof r!="object"&&typeof r!="function",xr=Array.isArray,Os=r=>xr(r)||typeof r?.[Symbol.iterator]=="function",mr=`[
|
|
2
|
+
\f\r]`,_t=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ln=/-->/g,cn=/>/g,Je=RegExp(`>|${mr}(?:([^\\s"'>=/]+)(${mr}*=${mr}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),dn=/'/g,un=/"/g,gn=/^(?:script|style|textarea|title)$/i,vr=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),L=vr(1),io=vr(2),oo=vr(3),rt=Symbol.for("lit-noChange"),oe=Symbol.for("lit-nothing"),pn=new WeakMap,et=tt.createTreeWalker(tt,129);function mn(r,e){if(!xr(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return an!==void 0?an.createHTML(e):e}var Ps=(r,e)=>{let t=r.length-1,s=[],n,i=e===2?"<svg>":e===3?"<math>":"",a=_t;for(let l=0;l<t;l++){let o=r[l],p,d,u=-1,f=0;for(;f<o.length&&(a.lastIndex=f,d=a.exec(o),d!==null);)f=a.lastIndex,a===_t?d[1]==="!--"?a=ln:d[1]!==void 0?a=cn:d[2]!==void 0?(gn.test(d[2])&&(n=RegExp("</"+d[2],"g")),a=Je):d[3]!==void 0&&(a=Je):a===Je?d[0]===">"?(a=n??_t,u=-1):d[1]===void 0?u=-2:(u=a.lastIndex-d[2].length,p=d[1],a=d[3]===void 0?Je:d[3]==='"'?un:dn):a===un||a===dn?a=Je:a===ln||a===cn?a=_t:(a=Je,n=void 0);let m=a===Je&&r[l+1].startsWith("/>")?" ":"";i+=a===_t?o+Ms:u>=0?(s.push(p),o.slice(0,u)+fn+o.slice(u)+Ge+m):o+Ge+(u===-2?l:m)}return[mn(r,i+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]},St=class r{constructor({strings:e,_$litType$:t},s){let n;this.parts=[];let i=0,a=0,l=e.length-1,o=this.parts,[p,d]=Ps(e,t);if(this.el=r.createElement(p,s),et.currentNode=this.el.content,t===2||t===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=et.nextNode())!==null&&o.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let u of n.getAttributeNames())if(u.endsWith(fn)){let f=d[a++],m=n.getAttribute(u).split(Ge),v=/([.?@])?(.*)/.exec(f);o.push({type:1,index:i,name:v[2],strings:m,ctor:v[1]==="."?yr:v[1]==="?"?wr:v[1]==="@"?kr:ft}),n.removeAttribute(u)}else u.startsWith(Ge)&&(o.push({type:6,index:i}),n.removeAttribute(u));if(gn.test(n.tagName)){let u=n.textContent.split(Ge),f=u.length-1;if(f>0){n.textContent=Wt?Wt.emptyScript:"";for(let m=0;m<f;m++)n.append(u[m],vt()),et.nextNode(),o.push({type:2,index:++i});n.append(u[f],vt())}}}else if(n.nodeType===8)if(n.data===hn)o.push({type:2,index:i});else{let u=-1;for(;(u=n.data.indexOf(Ge,u+1))!==-1;)o.push({type:7,index:i}),u+=Ge.length-1}i++}}static createElement(e,t){let s=tt.createElement("template");return s.innerHTML=e,s}};function pt(r,e,t=r,s){if(e===rt)return e;let n=s!==void 0?t._$Co?.[s]:t._$Cl,i=At(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(r),n._$AT(r,t,s)),s!==void 0?(t._$Co??(t._$Co=[]))[s]=n:t._$Cl=n),n!==void 0&&(e=pt(r,n._$AS(r,e.values),n,s)),e}var br=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){let{el:{content:t},parts:s}=this._$AD,n=(e?.creationScope??tt).importNode(t,!0);et.currentNode=n;let i=et.nextNode(),a=0,l=0,o=s[0];for(;o!==void 0;){if(a===o.index){let p;o.type===2?p=new Tt(i,i.nextSibling,this,e):o.type===1?p=new o.ctor(i,o.name,o.strings,this,e):o.type===6&&(p=new _r(i,this,e)),this._$AV.push(p),o=s[++l]}a!==o?.index&&(i=et.nextNode(),a++)}return et.currentNode=tt,n}p(e){let t=0;for(let 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++}},Tt=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,n){this.type=2,this._$AH=oe,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,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=pt(this,e,t),At(e)?e===oe||e==null||e===""?(this._$AH!==oe&&this._$AR(),this._$AH=oe):e!==this._$AH&&e!==rt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Os(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!==oe&&At(this._$AH)?this._$AA.nextSibling.data=e:this.T(tt.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=St.createElement(mn(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(t);else{let i=new br(n,this),a=i.u(this.options);i.p(t),this.T(a),this._$AH=i}}_$AC(e){let t=pn.get(e.strings);return t===void 0&&pn.set(e.strings,t=new St(e)),t}k(e){xr(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,s,n=0;for(let i of e)n===t.length?t.push(s=new r(this.O(vt()),this.O(vt()),this,this.options)):s=t[n],s._$AI(i),n++;n<t.length&&(this._$AR(s&&s._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},ft=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,n,i){this.type=1,this._$AH=oe,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=oe}_$AI(e,t=this,s,n){let i=this.strings,a=!1;if(i===void 0)e=pt(this,e,t,0),a=!At(e)||e!==this._$AH&&e!==rt,a&&(this._$AH=e);else{let l=e,o,p;for(e=i[0],o=0;o<i.length-1;o++)p=pt(this,l[s+o],t,o),p===rt&&(p=this._$AH[o]),a||(a=!At(p)||p!==this._$AH[o]),p===oe?e=oe:e!==oe&&(e+=(p??"")+i[o+1]),this._$AH[o]=p}a&&!n&&this.j(e)}j(e){e===oe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},yr=class extends ft{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===oe?void 0:e}},wr=class extends ft{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==oe)}},kr=class extends ft{constructor(e,t,s,n,i){super(e,t,s,n,i),this.type=5}_$AI(e,t=this){if((e=pt(this,e,t,0)??oe)===rt)return;let s=this._$AH,n=e===oe&&s!==oe||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==oe&&(s===oe||n);n&&this.element.removeEventListener(this.name,this,s),i&&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)}},_r=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){pt(this,e)}};var Fs=xt.litHtmlPolyfillSupport;Fs?.(St,Tt),(xt.litHtmlVersions??(xt.litHtmlVersions=[])).push("3.3.1");var Ae=(r,e,t)=>{let s=t?.renderBefore??e,n=s._$litPart$;if(n===void 0){let i=t?.renderBefore??null;s._$litPart$=n=new Tt(e.insertBefore(vt(),i),i,void 0,t??{})}return n._$AI(r),n};function Ie(r,e){let t=r.priority??2,s=e.priority??2;if(t!==s)return t-s;let n=r.created_at??0,i=e.created_at??0;if(n!==i)return n<i?-1:1;let a=r.id,l=e.id;return a<l?-1:a>l?1:0}function ht(r,e){let t=r.closed_at??0,s=e.closed_at??0;if(t!==s)return t<s?1:-1;let n=r?.id,i=e?.id;return n<i?-1:n>i?1:0}function We(r=void 0){function e(i){return!r||typeof r.snapshotFor!="function"?[]:r.snapshotFor(i).slice().sort(Ie)}function t(i,a){let l=r&&r.snapshotFor?r.snapshotFor(i).slice():[];return a==="in_progress"?l.sort(Ie):a==="closed"?l.sort(ht):l.sort(Ie),l}function s(i){if(!r||typeof r.snapshotFor!="function")return[];let l=(r.snapshotFor(`detail:${i}`)||[]).find(p=>String(p?.id||"")===String(i));return(Array.isArray(l?.dependents)?l.dependents:[]).slice().sort(Ie)}function n(i){return r&&typeof r.subscribe=="function"?r.subscribe(i):()=>{}}return{selectIssuesFor:e,selectBoardColumn:t,selectEpicChildren:s,subscribe:n}}var xn=Ns(_n(),1);function se(r){return(0,xn.default)(`beads-ui:${r}`)}function vn(r){let e=se("data");async function t(s){let{id:n}=s;e("updateIssue %s %o",n,Object.keys(s));let i=null;return typeof s.title=="string"&&(i=await r("edit-text",{id:n,field:"title",value:s.title})),typeof s.acceptance=="string"&&(i=await r("edit-text",{id:n,field:"acceptance",value:s.acceptance})),typeof s.notes=="string"&&(i=await r("edit-text",{id:n,field:"notes",value:s.notes})),typeof s.design=="string"&&(i=await r("edit-text",{id:n,field:"design",value:s.design})),typeof s.status=="string"&&(i=await r("update-status",{id:n,status:s.status})),typeof s.priority=="number"&&(i=await r("update-priority",{id:n,priority:s.priority})),typeof s.assignee=="string"&&(i=await r("update-assignee",{id:n,assignee:s.assignee})),e("updateIssue done %s",n),i}return{updateIssue:t}}function Ar(r,e={}){let t=se(`issue-store:${r}`),s=new Map,n=[],i=0,a=new Set,l=!1,o=e.sort||Ie;function p(){for(let f of Array.from(a))try{f()}catch{}}function d(){n=Array.from(s.values()).sort(o)}function u(f){if(l||!f||f.id!==r)return;let m=Number(f.revision)||0;if(t("apply %s rev=%d",f.type,m),!(m<=i&&f.type!=="snapshot")){if(f.type==="snapshot"){if(m<=i)return;s.clear();let v=Array.isArray(f.issues)?f.issues:[];for(let k of v)k&&typeof k.id=="string"&&k.id.length>0&&s.set(k.id,k);d(),i=m,p();return}if(f.type==="upsert"){let v=f.issue;if(v&&typeof v.id=="string"&&v.id.length>0){let k=s.get(v.id);if(!k)s.set(v.id,v);else{let I=Number.isFinite(k.updated_at)?k.updated_at:0,S=Number.isFinite(v.updated_at)?v.updated_at:0;if(I<=S){for(let P of Object.keys(k))P in v||delete k[P];for(let[P,$]of Object.entries(v))k[P]=$}}d()}i=m,p()}else if(f.type==="delete"){let v=String(f.issue_id||"");v&&(s.delete(v),d()),i=m,p()}}}return{id:r,subscribe(f){return a.add(f),()=>{a.delete(f)}},applyPush:u,snapshot(){return n},size(){return s.size},getById(f){return s.get(f)},dispose(){l=!0,s.clear(),n=[],a.clear(),i=0}}}function Yt(r){let e=String(r.type||"").trim(),t={};if(r.params&&typeof r.params=="object"){let n=Object.keys(r.params).sort();for(let i of n){let a=r.params[i];t[i]=String(a)}}let s=new URLSearchParams(t).toString();return s.length>0?`${e}?${s}`:e}function An(r){let e=se("subs"),t=new Map,s=new Map;function n(l,o){e("applyDelta %s +%d ~%d -%d",l,(o.added||[]).length,(o.updated||[]).length,(o.removed||[]).length);let p=s.get(l);if(!p||p.size===0)return;let d=Array.isArray(o.added)?o.added:[],u=Array.isArray(o.updated)?o.updated:[],f=Array.isArray(o.removed)?o.removed:[];for(let m of Array.from(p)){let v=t.get(m);if(!v)continue;let k=v.itemsById;for(let I of d)typeof I=="string"&&I.length>0&&k.set(I,!0);for(let I of u)typeof I=="string"&&I.length>0&&k.set(I,!0);for(let I of f)typeof I=="string"&&I.length>0&&k.delete(I)}}async function i(l,o){let p=Yt(o);if(e("subscribe %s key=%s",l,p),!t.has(l))t.set(l,{key:p,itemsById:new Map});else{let u=t.get(l);if(u&&u.key!==p){let f=s.get(u.key);f&&(f.delete(l),f.size===0&&s.delete(u.key)),t.set(l,{key:p,itemsById:new Map})}}s.has(p)||s.set(p,new Set);let d=s.get(p);d&&d.add(l);try{await r("subscribe-list",{id:l,type:o.type,params:o.params})}catch(u){let f=t.get(l)||null;if(f){let m=s.get(f.key);m&&(m.delete(l),m.size===0&&s.delete(f.key))}throw t.delete(l),u}return async()=>{e("unsubscribe %s key=%s",l,p);try{await r("unsubscribe-list",{id:l})}catch{}let u=t.get(l)||null;if(u){let f=s.get(u.key);f&&(f.delete(l),f.size===0&&s.delete(u.key))}t.delete(l)}}return{subscribeList:i,_applyDelta:n,_subKeyOf:Yt,selectors:{getIds(l){let o=t.get(l);return o?Array.from(o.itemsById.keys()):[]},has(l,o){let p=t.get(l);return p?p.itemsById.has(o):!1},count(l){let o=t.get(l);return o?o.itemsById.size:0},getItemsById(l){let o=t.get(l),p={};if(!o)return p;for(let d of o.itemsById.keys())p[d]=!0;return p}}}}function Sn(){let r=se("issue-stores"),e=new Map,t=new Map,s=new Set,n=new Map;function i(){for(let o of Array.from(s))try{o()}catch{}}function a(o,p,d){let u=p?Yt(p):"",f=t.get(o)||"",m=e.has(o);if(r("register %s key=%s (prev=%s)",o,u,f),m&&f&&u&&f!==u){let v=e.get(o);if(v)try{v.dispose()}catch{}let k=n.get(o);if(k){try{k()}catch{}n.delete(o)}let I=Ar(o,d);e.set(o,I);let S=I.subscribe(()=>i());n.set(o,S)}else if(!m){let v=Ar(o,d);e.set(o,v);let k=v.subscribe(()=>i());n.set(o,k)}return t.set(o,u),()=>l(o)}function l(o){r("unregister %s",o),t.delete(o);let p=e.get(o);p&&(p.dispose(),e.delete(o));let d=n.get(o);if(d){try{d()}catch{}n.delete(o)}}return{register:a,unregister:l,getStore(o){return e.get(o)||null},snapshotFor(o){let p=e.get(o);return p?p.snapshot().slice():[]},subscribe(o){return s.add(o),()=>s.delete(o)}}}function Ze(r,e){return`#/${r==="epics"||r==="board"?r:"issues"}?issue=${encodeURIComponent(e)}`}function Vt(r){let e=String(r||""),t=e.startsWith("#")?e.slice(1):e,s=t.indexOf("?"),n=s>=0?t.slice(s+1):"";if(n){let l=new URLSearchParams(n).get("issue");if(l)return decodeURIComponent(l)}let i=/^\/issue\/([^\s?#]+)/.exec(t);return i&&i[1]?decodeURIComponent(i[1]):null}function Sr(r){let e=String(r||"");return/^#\/epics(\b|\/|$)/.test(e)?"epics":/^#\/board(\b|\/|$)/.test(e)?"board":"issues"}function Tn(r){let e=se("router"),t=()=>{let s=window.location.hash||"",n=/^#\/issue\/([^\s?#]+)/.exec(s);if(n&&n[1]){let l=decodeURIComponent(n[1]);r.setState({selected_id:l,view:"issues"});let o=`#/issues?issue=${encodeURIComponent(l)}`;if(window.location.hash!==o){window.location.hash=o;return}}let i=Vt(s),a=Sr(s);e("hash change \u2192 view=%s id=%s",a,i),r.setState({selected_id:i,view:a})};return{start(){window.addEventListener("hashchange",t),t()},stop(){window.removeEventListener("hashchange",t)},gotoIssue(s){let i=(r.getState?r.getState():{view:"issues"}).view||"issues",a=Ze(i,s);e("goto issue %s (view=%s)",s,i),window.location.hash!==a?window.location.hash=a:r.setState({selected_id:s,view:i})},gotoView(s){let i=(r.getState?r.getState():{selected_id:null}).selected_id,a=i?Ze(s,i):`#/${s}`;e("goto view %s (id=%s)",s,i||""),window.location.hash!==a?window.location.hash=a:r.setState({view:s,selected_id:null})}}}function En(r={}){let e=se("state"),t={selected_id:r.selected_id??null,view:r.view??"issues",filters:{status:r.filters?.status??"all",search:r.filters?.search??"",type:typeof r.filters?.type=="string"?r.filters?.type:""},board:{closed_filter:r.board?.closed_filter==="3"||r.board?.closed_filter==="7"||r.board?.closed_filter==="today"?r.board?.closed_filter:"today"}},s=new Set;function n(){for(let i of Array.from(s))try{i(t)}catch{}}return{getState(){return t},setState(i){let a={...t,...i,filters:{...t.filters,...i.filters||{}},board:{...t.board,...i.board||{}}};a.selected_id===t.selected_id&&a.view===t.view&&a.filters.status===t.filters.status&&a.filters.search===t.filters.search&&a.filters.type===t.filters.type&&a.board.closed_filter===t.board.closed_filter||(t=a,e("state change %o",{selected_id:t.selected_id,view:t.view,filters:t.filters,board:t.board}),n())},subscribe(i){return s.add(i),()=>s.delete(i)}}}function $n(r){let e=0;function t(){if(!r)return;let a=e>0;r.toggleAttribute("hidden",!a),r.setAttribute("aria-busy",a?"true":"false")}function s(){e+=1,t()}function n(){e=Math.max(0,e-1),t()}function i(a){return async(l,o)=>{s();try{return await a(l,o)}finally{n()}}}return t(),{wrapSend:i,start:s,done:n,getCount:()=>e}}function be(r,e="info",t=2800){let s=document.createElement("div");s.className="toast",s.textContent=r,s.style.position="fixed",s.style.right="12px",s.style.bottom="12px",s.style.zIndex="1000",s.style.color="#fff",s.style.padding="8px 10px",s.style.borderRadius="4px",s.style.fontSize="12px",e==="success"?s.style.background="#156d36":e==="error"?s.style.background="#9f2011":s.style.background="rgba(0,0,0,0.85)",(document.body||document.documentElement).appendChild(s),setTimeout(()=>{try{s.remove()}catch{}},t)}function Ke(r,e){let t=typeof e?.duration_ms=="number"?e.duration_ms:1200,s=document.createElement("button");s.className=(e?.class_name?e.class_name+" ":"")+"mono id-copy",s.type="button",s.setAttribute("aria-live","polite"),s.setAttribute("title","Copy issue ID"),s.setAttribute("aria-label",`Copy issue ID ${r}`),s.textContent=r;async function n(){try{navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&await navigator.clipboard.writeText(String(r)),s.textContent="Copied";let i=s.getAttribute("aria-label")||"";s.setAttribute("aria-label","Copied"),setTimeout(()=>{s.textContent=r,s.setAttribute("aria-label",i)},Math.max(80,t))}catch{}}return s.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),n()}),s.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopPropagation(),n())}),s}var Ye=["Critical","High","Medium","Low","Backlog"];function Cn(r){let e=typeof r=="number"?r:2,t=document.createElement("span");t.className="priority-badge",t.classList.add(`is-p${Math.max(0,Math.min(4,e))}`),t.setAttribute("role","img");let s=Xs(e);return t.setAttribute("title",s),t.setAttribute("aria-label",`Priority: ${s}`),t.textContent=Et(e)+" "+s,t}function Xs(r){let e=Math.max(0,Math.min(4,r));return Ye[e]||"Medium"}function Et(r){switch(r){case 0:return"\u{1F525}";case 1:return"\u26A1\uFE0F";case 2:return"\u{1F527}";case 3:return"\u{1FAB6}";case 4:return"\u{1F4A4}";default:return"\u{1F527}"}}function st(r){let e=document.createElement("span");e.className="type-badge";let t=(r||"").toString().toLowerCase(),s=new Set(["bug","feature","task","epic","chore"]),n=s.has(t)?t:"neutral";e.classList.add(`type-badge--${n}`),e.setAttribute("role","img");let i=s.has(t)?t==="bug"?"Bug":t==="feature"?"Feature":t==="task"?"Task":t==="epic"?"Epic":"Chore":"\u2014";return e.setAttribute("aria-label",s.has(t)?`Issue type: ${i}`:"Issue type: unknown"),e.setAttribute("title",s.has(t)?`Type: ${i}`:"Type: unknown"),e.textContent=i,e}function Rn(r,e,t,s,n=void 0,i=void 0){let a=se("views:board"),l=[],o=[],p=[],d=[],u=[],f=i?We(i):null,m="today";if(s)try{let _=s.getState(),b=_&&_.board?String(_.board.closed_filter||"today"):"today";(b==="today"||b==="3"||b==="7")&&(m=b)}catch{}function v(){return L`
|
|
4
4
|
<div class="panel__body board-root">
|
|
5
|
-
${
|
|
6
|
-
${
|
|
7
|
-
${
|
|
8
|
-
${
|
|
5
|
+
${k("Blocked","blocked-col",o)}
|
|
6
|
+
${k("Ready","ready-col",l)}
|
|
7
|
+
${k("In Progress","in-progress-col",p)}
|
|
8
|
+
${k("Closed","closed-col",d)}
|
|
9
9
|
</div>
|
|
10
|
-
`}function
|
|
10
|
+
`}function k(_,b,T){let E=Array.isArray(T)?T.length:0,D=E===1?"1 issue":`${E} issues`;return L`
|
|
11
11
|
<section class="board-column" id=${b}>
|
|
12
12
|
<header
|
|
13
13
|
class="board-column__header"
|
|
@@ -15,8 +15,13 @@ var Ss=Object.create;var hr=Object.defineProperty;var Ts=Object.getOwnPropertyDe
|
|
|
15
15
|
role="heading"
|
|
16
16
|
aria-level="2"
|
|
17
17
|
>
|
|
18
|
-
<
|
|
19
|
-
|
|
18
|
+
<div class="board-column__title">
|
|
19
|
+
<span class="board-column__title-text">${_}</span>
|
|
20
|
+
<span class="badge board-column__count" aria-label=${D}>
|
|
21
|
+
${E}
|
|
22
|
+
</span>
|
|
23
|
+
</div>
|
|
24
|
+
${b==="closed-col"?L`<label class="board-closed-filter">
|
|
20
25
|
<span class="visually-hidden">Filter closed issues</span>
|
|
21
26
|
<select
|
|
22
27
|
id="closed-filter"
|
|
@@ -25,14 +30,14 @@ var Ss=Object.create;var hr=Object.defineProperty;var Ts=Object.getOwnPropertyDe
|
|
|
25
30
|
>
|
|
26
31
|
<option
|
|
27
32
|
value="today"
|
|
28
|
-
?selected=${
|
|
33
|
+
?selected=${m==="today"}
|
|
29
34
|
>
|
|
30
35
|
Today
|
|
31
36
|
</option>
|
|
32
|
-
<option value="3" ?selected=${
|
|
37
|
+
<option value="3" ?selected=${m==="3"}>
|
|
33
38
|
Last 3 days
|
|
34
39
|
</option>
|
|
35
|
-
<option value="7" ?selected=${
|
|
40
|
+
<option value="7" ?selected=${m==="7"}>
|
|
36
41
|
Last 7 days
|
|
37
42
|
</option>
|
|
38
43
|
</select>
|
|
@@ -43,236 +48,235 @@ var Ss=Object.create;var hr=Object.defineProperty;var Ts=Object.getOwnPropertyDe
|
|
|
43
48
|
role="list"
|
|
44
49
|
aria-labelledby=${b+"-header"}
|
|
45
50
|
>
|
|
46
|
-
${
|
|
51
|
+
${T.map(U=>I(U))}
|
|
47
52
|
</div>
|
|
48
53
|
</section>
|
|
49
|
-
`}function I(
|
|
54
|
+
`}function I(_){return L`
|
|
50
55
|
<article
|
|
51
56
|
class="board-card"
|
|
52
|
-
data-issue-id=${
|
|
57
|
+
data-issue-id=${_.id}
|
|
53
58
|
role="listitem"
|
|
54
59
|
tabindex="-1"
|
|
55
|
-
@click=${()=>
|
|
60
|
+
@click=${()=>t(_.id)}
|
|
56
61
|
>
|
|
57
62
|
<div class="board-card__title text-truncate">
|
|
58
|
-
${
|
|
63
|
+
${_.title||"(no title)"}
|
|
59
64
|
</div>
|
|
60
65
|
<div class="board-card__meta">
|
|
61
|
-
${
|
|
62
|
-
${
|
|
66
|
+
${st(_.issue_type)} ${Cn(_.priority)}
|
|
67
|
+
${Ke(_.id,{class_name:"mono"})}
|
|
63
68
|
</div>
|
|
64
69
|
</article>
|
|
65
|
-
`}function A(){Ae(k(),t),F()}function F(){try{let w=Array.from(t.querySelectorAll(".board-column"));for(let b of w){let $=b.querySelector(".board-column__body");if(!$)continue;let T=Array.from($.querySelectorAll(".board-card")),L=b.querySelector(".board-column__header"),B=L&&L.textContent?.trim()||"";for(let q of T){let Z=q.querySelector(".board-card__title"),X=Z&&Z.textContent?.trim()||"";q.setAttribute("aria-label",`Issue ${X||"(no title)"} \u2014 Column ${B}`),q.tabIndex=-1}T.length>0&&(T[0].tabIndex=0)}}catch{}}t.addEventListener("keydown",w=>{let b=w.target;if(!b||!(b instanceof HTMLElement))return;let $=String(b.tagName||"").toLowerCase();if($==="input"||$==="textarea"||$==="select"||b.isContentEditable===!0)return;let T=b.closest(".board-card");if(!T)return;let L=String(w.key||"");if(L==="Enter"||L===" "){w.preventDefault();let W=T.getAttribute("data-issue-id");W&&r(W);return}if(L!=="ArrowUp"&&L!=="ArrowDown"&&L!=="ArrowLeft"&&L!=="ArrowRight")return;w.preventDefault();let B=T.closest(".board-column");if(!B)return;let q=B.querySelector(".board-column__body");if(!q)return;let Z=Array.from(q.querySelectorAll(".board-card")),X=Z.indexOf(T);if(X!==-1){if(L==="ArrowDown"&&X<Z.length-1){E(Z[X],Z[X+1]);return}if(L==="ArrowUp"&&X>0){E(Z[X],Z[X-1]);return}if(L==="ArrowRight"||L==="ArrowLeft"){let W=Array.from(t.querySelectorAll(".board-column")),ie=W.indexOf(B);if(ie===-1)return;let oe=L==="ArrowRight"?1:-1,ce=ie+oe,ae=null;for(;ce>=0&&ce<W.length;){let z=W[ce],_e=z.querySelector(".board-column__body");if((_e?Array.from(_e.querySelectorAll(".board-card")):[]).length>0){ae=z;break}ce+=oe}if(ae){let z=ae.querySelector(".board-column__body .board-card");z&&E(T,z)}return}}});function E(w,b){try{w.tabIndex=-1,b.tabIndex=0,b.focus()}catch{}}function S(){o("applyClosedFilter %s",h);let w=Array.isArray(d)?[...d]:[],b=new Date,$=0;h==="today"?$=new Date(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0,0).getTime():h==="3"?$=b.getTime()-4320*60*1e3:h==="7"&&($=b.getTime()-10080*60*1e3),w=w.filter(T=>{let L=Number.isFinite(T.closed_at)?T.closed_at:NaN;return Number.isFinite(L)?L>=$:!1}),w.sort(ut),g=w}function O(w){try{let b=w.target,$=String(b.value||"today");if(h=$==="3"||$==="7"?$:"today",o("closed filter %s",h),s)try{s.setState({board:{closed_filter:h}})}catch{}S(),A()}catch{}}function y(){try{if(p){let w=p.selectBoardColumn("tab:board:in-progress","in_progress"),b=p.selectBoardColumn("tab:board:blocked","blocked"),$=p.selectBoardColumn("tab:board:ready","ready"),T=p.selectBoardColumn("tab:board:closed","closed"),L=new Set(w.map(q=>q.id));a=$.filter(q=>!L.has(q.id)),l=b,u=w,d=T}S(),A()}catch{a=[],l=[],u=[],g=[],A()}}return p&&p.subscribe(()=>{try{y()}catch{}}),{async load(){o("load"),y();try{let w=!!(n&&n.selectors),b=B=>{if(!w||!n)return 0;let q=n.selectors;if(typeof q.count=="function")return Number(q.count(B)||0);try{let Z=q.getIds(B);return Array.isArray(Z)?Z.length:0}catch{return 0}},$=b("tab:board:ready")+b("tab:board:blocked")+b("tab:board:in-progress")+b("tab:board:closed"),T=e,L=T&&typeof T.getReady=="function"&&typeof T.getBlocked=="function"&&typeof T.getInProgress=="function"&&typeof T.getClosed=="function";if($===0&&L){o("fallback fetch");let[B,q,Z,X]=await Promise.all([T.getReady().catch(()=>[]),T.getBlocked().catch(()=>[]),T.getInProgress().catch(()=>[]),T.getClosed().catch(()=>[])]),W=Array.isArray(B)?B.map(z=>z):[],ie=Array.isArray(q)?q.map(z=>z):[],oe=Array.isArray(Z)?Z.map(z=>z):[],ce=Array.isArray(X)?X.map(z=>z):[],ae=new Set(oe.map(z=>z.id));W=W.filter(z=>!ae.has(z.id)),W.sort($e),ie.sort($e),oe.sort($e),a=W,l=ie,u=oe,d=ce,S(),A()}}catch{}},clear(){t.replaceChildren(),a=[],l=[],u=[],g=[]}}}var{entries:Fn,setPrototypeOf:Rn,isFrozen:Ys,getPrototypeOf:Xs,getOwnPropertyDescriptor:Qs}=Object,{freeze:ye,seal:Te,create:Lr}=Object,{apply:Dr,construct:Nr}=typeof Reflect<"u"&&Reflect;ye||(ye=function(e){return e});Te||(Te=function(e){return e});Dr||(Dr=function(e,r){for(var s=arguments.length,n=new Array(s>2?s-2:0),i=2;i<s;i++)n[i-2]=arguments[i];return e.apply(r,n)});Nr||(Nr=function(e){for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];return new e(...s)});var Xt=we(Array.prototype.forEach),Js=we(Array.prototype.lastIndexOf),In=we(Array.prototype.pop),Et=we(Array.prototype.push),ei=we(Array.prototype.splice),Jt=we(String.prototype.toLowerCase),Tr=we(String.prototype.toString),$r=we(String.prototype.match),Ct=we(String.prototype.replace),ti=we(String.prototype.indexOf),ri=we(String.prototype.trim),Ee=we(Object.prototype.hasOwnProperty),be=we(RegExp.prototype.test),Rt=ni(TypeError);function we(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];return Dr(t,e,s)}}function ni(t){return function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return Nr(t,r)}}function G(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jt;Rn&&Rn(t,null);let s=e.length;for(;s--;){let n=e[s];if(typeof n=="string"){let i=r(n);i!==n&&(Ys(e)||(e[s]=i),n=i)}t[n]=!0}return t}function si(t){for(let e=0;e<t.length;e++)Ee(t,e)||(t[e]=null);return t}function Pe(t){let e=Lr(null);for(let[r,s]of Fn(t))Ee(t,r)&&(Array.isArray(s)?e[r]=si(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=Pe(s):e[r]=s);return e}function It(t,e){for(;t!==null;){let s=Qs(t,e);if(s){if(s.get)return we(s.get);if(typeof s.value=="function")return we(s.value)}t=Xs(t)}function r(){return null}return r}var Ln=ye(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Er=ye(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Cr=ye(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ii=ye(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Rr=ye(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),oi=ye(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dn=ye(["#text"]),Nn=ye(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ir=ye(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Mn=ye(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Qt=ye(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ai=Te(/\{\{[\w\W]*|[\w\W]*\}\}/gm),li=Te(/<%[\w\W]*|[\w\W]*%>/gm),ci=Te(/\$\{[\w\W]*/gm),di=Te(/^data-[\-\w.\u00B7-\uFFFF]+$/),ui=Te(/^aria-[\-\w]+$/),zn=Te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pi=Te(/^(?:\w+script|data):/i),fi=Te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bn=Te(/^html$/i),hi=Te(/^[a-z][.\w]*(-[.\w]+)+$/i),On=Object.freeze({__proto__:null,ARIA_ATTR:ui,ATTR_WHITESPACE:fi,CUSTOM_ELEMENT:hi,DATA_ATTR:di,DOCTYPE_NAME:Bn,ERB_EXPR:li,IS_ALLOWED_URI:zn,IS_SCRIPT_OR_DATA:pi,MUSTACHE_EXPR:ai,TMPLIT_EXPR:ci}),Lt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},gi=function(){return typeof window>"u"?null:window},mi=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null,n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(s=r.getAttribute(n));let i="dompurify"+(s?"#"+s:"");try{return e.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Pn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Hn(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gi(),e=P=>Hn(P);if(e.version="3.3.0",e.removed=[],!t||!t.document||t.document.nodeType!==Lt.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t,s=r,n=s.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:u,NamedNodeMap:g=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:h}=t,k=l.prototype,x=It(k,"cloneNode"),I=It(k,"remove"),A=It(k,"nextSibling"),F=It(k,"childNodes"),E=It(k,"parentNode");if(typeof o=="function"){let P=r.createElement("template");P.content&&P.content.ownerDocument&&(r=P.content.ownerDocument)}let S,O="",{implementation:y,createNodeIterator:w,createDocumentFragment:b,getElementsByTagName:$}=r,{importNode:T}=s,L=Pn();e.isSupported=typeof Fn=="function"&&typeof E=="function"&&y&&y.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:B,ERB_EXPR:q,TMPLIT_EXPR:Z,DATA_ATTR:X,ARIA_ATTR:W,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:oe,CUSTOM_ELEMENT:ce}=On,{IS_ALLOWED_URI:ae}=On,z=null,_e=G({},[...Ln,...Er,...Cr,...Rr,...Dn]),re=null,Fe=G({},[...Nn,...Ir,...Mn,...Qt]),ee=Object.seal(Lr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),v=null,m=null,j=Object.seal(Lr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),K=!0,xe=!0,De=!1,gt=!0,ze=!1,M=!0,Ne=!1,mt=!1,bt=!1,Be=!1,st=!1,it=!1,Bt=!0,f=!1,D="user-content-",U=!0,C=!1,Q={},ue=null,yt=G({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),pe=null,Ht=G({},["audio","video","img","source","image","track"]),wt=null,Ut=G({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",H="http://www.w3.org/1999/xhtml",te=H,Ue=!1,qt=null,ys=G({},[He,ot,H],Tr),jt=G({},["mi","mo","mn","ms","mtext"]),Gt=G({},["annotation-xml"]),ws=G({},["title","style","font","a","script"]),kt=null,ks=["application/xhtml+xml","text/html"],_s="text/html",fe=null,at=null,xs=r.createElement("form"),Kr=function(c){return c instanceof RegExp||c instanceof Function},ur=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(at&&at===c)){if((!c||typeof c!="object")&&(c={}),c=Pe(c),kt=ks.indexOf(c.PARSER_MEDIA_TYPE)===-1?_s:c.PARSER_MEDIA_TYPE,fe=kt==="application/xhtml+xml"?Tr:Jt,z=Ee(c,"ALLOWED_TAGS")?G({},c.ALLOWED_TAGS,fe):_e,re=Ee(c,"ALLOWED_ATTR")?G({},c.ALLOWED_ATTR,fe):Fe,qt=Ee(c,"ALLOWED_NAMESPACES")?G({},c.ALLOWED_NAMESPACES,Tr):ys,wt=Ee(c,"ADD_URI_SAFE_ATTR")?G(Pe(Ut),c.ADD_URI_SAFE_ATTR,fe):Ut,pe=Ee(c,"ADD_DATA_URI_TAGS")?G(Pe(Ht),c.ADD_DATA_URI_TAGS,fe):Ht,ue=Ee(c,"FORBID_CONTENTS")?G({},c.FORBID_CONTENTS,fe):yt,v=Ee(c,"FORBID_TAGS")?G({},c.FORBID_TAGS,fe):Pe({}),m=Ee(c,"FORBID_ATTR")?G({},c.FORBID_ATTR,fe):Pe({}),Q=Ee(c,"USE_PROFILES")?c.USE_PROFILES:!1,K=c.ALLOW_ARIA_ATTR!==!1,xe=c.ALLOW_DATA_ATTR!==!1,De=c.ALLOW_UNKNOWN_PROTOCOLS||!1,gt=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ze=c.SAFE_FOR_TEMPLATES||!1,M=c.SAFE_FOR_XML!==!1,Ne=c.WHOLE_DOCUMENT||!1,Be=c.RETURN_DOM||!1,st=c.RETURN_DOM_FRAGMENT||!1,it=c.RETURN_TRUSTED_TYPE||!1,bt=c.FORCE_BODY||!1,Bt=c.SANITIZE_DOM!==!1,f=c.SANITIZE_NAMED_PROPS||!1,U=c.KEEP_CONTENT!==!1,C=c.IN_PLACE||!1,ae=c.ALLOWED_URI_REGEXP||zn,te=c.NAMESPACE||H,jt=c.MATHML_TEXT_INTEGRATION_POINTS||jt,Gt=c.HTML_INTEGRATION_POINTS||Gt,ee=c.CUSTOM_ELEMENT_HANDLING||{},c.CUSTOM_ELEMENT_HANDLING&&Kr(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ee.tagNameCheck=c.CUSTOM_ELEMENT_HANDLING.tagNameCheck),c.CUSTOM_ELEMENT_HANDLING&&Kr(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ee.attributeNameCheck=c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ze&&(xe=!1),st&&(Be=!0),Q&&(z=G({},Dn),re=[],Q.html===!0&&(G(z,Ln),G(re,Nn)),Q.svg===!0&&(G(z,Er),G(re,Ir),G(re,Qt)),Q.svgFilters===!0&&(G(z,Cr),G(re,Ir),G(re,Qt)),Q.mathMl===!0&&(G(z,Rr),G(re,Mn),G(re,Qt))),c.ADD_TAGS&&(typeof c.ADD_TAGS=="function"?j.tagCheck=c.ADD_TAGS:(z===_e&&(z=Pe(z)),G(z,c.ADD_TAGS,fe))),c.ADD_ATTR&&(typeof c.ADD_ATTR=="function"?j.attributeCheck=c.ADD_ATTR:(re===Fe&&(re=Pe(re)),G(re,c.ADD_ATTR,fe))),c.ADD_URI_SAFE_ATTR&&G(wt,c.ADD_URI_SAFE_ATTR,fe),c.FORBID_CONTENTS&&(ue===yt&&(ue=Pe(ue)),G(ue,c.FORBID_CONTENTS,fe)),U&&(z["#text"]=!0),Ne&&G(z,["html","head","body"]),z.table&&(G(z,["tbody"]),delete v.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw Rt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Rt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=c.TRUSTED_TYPES_POLICY,O=S.createHTML("")}else S===void 0&&(S=mi(h,n)),S!==null&&typeof O=="string"&&(O=S.createHTML(""));ye&&ye(c),at=c}},Vr=G({},[...Er,...Cr,...ii]),Yr=G({},[...Rr,...oi]),vs=function(c){let _=E(c);(!_||!_.tagName)&&(_={namespaceURI:te,tagName:"template"});let N=Jt(c.tagName),ne=Jt(_.tagName);return qt[c.namespaceURI]?c.namespaceURI===ot?_.namespaceURI===H?N==="svg":_.namespaceURI===He?N==="svg"&&(ne==="annotation-xml"||jt[ne]):!!Vr[N]:c.namespaceURI===He?_.namespaceURI===H?N==="math":_.namespaceURI===ot?N==="math"&&Gt[ne]:!!Yr[N]:c.namespaceURI===H?_.namespaceURI===ot&&!Gt[ne]||_.namespaceURI===He&&!jt[ne]?!1:!Yr[N]&&(ws[N]||!Vr[N]):!!(kt==="application/xhtml+xml"&&qt[c.namespaceURI]):!1},Ie=function(c){Et(e.removed,{element:c});try{E(c).removeChild(c)}catch{I(c)}},Ve=function(c,_){try{Et(e.removed,{attribute:_.getAttributeNode(c),from:_})}catch{Et(e.removed,{attribute:null,from:_})}if(_.removeAttribute(c),c==="is")if(Be||st)try{Ie(_)}catch{}else try{_.setAttribute(c,"")}catch{}},Xr=function(c){let _=null,N=null;if(bt)c="<remove></remove>"+c;else{let de=$r(c,/^[\r\n\t ]+/);N=de&&de[0]}kt==="application/xhtml+xml"&&te===H&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");let ne=S?S.createHTML(c):c;if(te===H)try{_=new p().parseFromString(ne,kt)}catch{}if(!_||!_.documentElement){_=y.createDocument(te,"template",null);try{_.documentElement.innerHTML=Ue?O:ne}catch{}}let me=_.body||_.documentElement;return c&&N&&me.insertBefore(r.createTextNode(N),me.childNodes[0]||null),te===H?$.call(_,Ne?"html":"body")[0]:Ne?_.documentElement:me},Qr=function(c){return w.call(c.ownerDocument||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},pr=function(c){return c instanceof d&&(typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||!(c.attributes instanceof g)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function")},Jr=function(c){return typeof a=="function"&&c instanceof a};function Me(P,c,_){Xt(P,N=>{N.call(e,c,_,at)})}let en=function(c){let _=null;if(Me(L.beforeSanitizeElements,c,null),pr(c))return Ie(c),!0;let N=fe(c.nodeName);if(Me(L.uponSanitizeElement,c,{tagName:N,allowedTags:z}),M&&c.hasChildNodes()&&!Jr(c.firstElementChild)&&be(/<[/\w!]/g,c.innerHTML)&&be(/<[/\w!]/g,c.textContent)||c.nodeType===Lt.progressingInstruction||M&&c.nodeType===Lt.comment&&be(/<[/\w]/g,c.data))return Ie(c),!0;if(!(j.tagCheck instanceof Function&&j.tagCheck(N))&&(!z[N]||v[N])){if(!v[N]&&rn(N)&&(ee.tagNameCheck instanceof RegExp&&be(ee.tagNameCheck,N)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(N)))return!1;if(U&&!ue[N]){let ne=E(c)||c.parentNode,me=F(c)||c.childNodes;if(me&&ne){let de=me.length;for(let ve=de-1;ve>=0;--ve){let Oe=x(me[ve],!0);Oe.__removalCount=(c.__removalCount||0)+1,ne.insertBefore(Oe,A(c))}}}return Ie(c),!0}return c instanceof l&&!vs(c)||(N==="noscript"||N==="noembed"||N==="noframes")&&be(/<\/no(script|embed|frames)/i,c.innerHTML)?(Ie(c),!0):(ze&&c.nodeType===Lt.text&&(_=c.textContent,Xt([B,q,Z],ne=>{_=Ct(_,ne," ")}),c.textContent!==_&&(Et(e.removed,{element:c.cloneNode()}),c.textContent=_)),Me(L.afterSanitizeElements,c,null),!1)},tn=function(c,_,N){if(Bt&&(_==="id"||_==="name")&&(N in r||N in xs))return!1;if(!(xe&&!m[_]&&be(X,_))){if(!(K&&be(W,_))){if(!(j.attributeCheck instanceof Function&&j.attributeCheck(_,c))){if(!re[_]||m[_]){if(!(rn(c)&&(ee.tagNameCheck instanceof RegExp&&be(ee.tagNameCheck,c)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(c))&&(ee.attributeNameCheck instanceof RegExp&&be(ee.attributeNameCheck,_)||ee.attributeNameCheck instanceof Function&&ee.attributeNameCheck(_,c))||_==="is"&&ee.allowCustomizedBuiltInElements&&(ee.tagNameCheck instanceof RegExp&&be(ee.tagNameCheck,N)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(N))))return!1}else if(!wt[_]){if(!be(ae,Ct(N,oe,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&c!=="script"&&ti(N,"data:")===0&&pe[c])){if(!(De&&!be(ie,Ct(N,oe,"")))){if(N)return!1}}}}}}}return!0},rn=function(c){return c!=="annotation-xml"&&$r(c,ce)},nn=function(c){Me(L.beforeSanitizeAttributes,c,null);let{attributes:_}=c;if(!_||pr(c))return;let N={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:re,forceKeepAttr:void 0},ne=_.length;for(;ne--;){let me=_[ne],{name:de,namespaceURI:ve,value:Oe}=me,lt=fe(de),fr=Oe,he=de==="value"?fr:ri(fr);if(N.attrName=lt,N.attrValue=he,N.keepAttr=!0,N.forceKeepAttr=void 0,Me(L.uponSanitizeAttribute,c,N),he=N.attrValue,f&&(lt==="id"||lt==="name")&&(Ve(de,c),he=D+he),M&&be(/((--!?|])>)|<\/(style|title|textarea)/i,he)){Ve(de,c);continue}if(lt==="attributename"&&$r(he,"href")){Ve(de,c);continue}if(N.forceKeepAttr)continue;if(!N.keepAttr){Ve(de,c);continue}if(!gt&&be(/\/>/i,he)){Ve(de,c);continue}ze&&Xt([B,q,Z],on=>{he=Ct(he,on," ")});let sn=fe(c.nodeName);if(!tn(sn,lt,he)){Ve(de,c);continue}if(S&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!ve)switch(h.getAttributeType(sn,lt)){case"TrustedHTML":{he=S.createHTML(he);break}case"TrustedScriptURL":{he=S.createScriptURL(he);break}}if(he!==fr)try{ve?c.setAttributeNS(ve,de,he):c.setAttribute(de,he),pr(c)?Ie(c):In(e.removed)}catch{Ve(de,c)}}Me(L.afterSanitizeAttributes,c,null)},As=function P(c){let _=null,N=Qr(c);for(Me(L.beforeSanitizeShadowDOM,c,null);_=N.nextNode();)Me(L.uponSanitizeShadowNode,_,null),en(_),nn(_),_.content instanceof i&&P(_.content);Me(L.afterSanitizeShadowDOM,c,null)};return e.sanitize=function(P){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,N=null,ne=null,me=null;if(Ue=!P,Ue&&(P="<!-->"),typeof P!="string"&&!Jr(P))if(typeof P.toString=="function"){if(P=P.toString(),typeof P!="string")throw Rt("dirty is not a string, aborting")}else throw Rt("toString is not a function");if(!e.isSupported)return P;if(mt||ur(c),e.removed=[],typeof P=="string"&&(C=!1),C){if(P.nodeName){let Oe=fe(P.nodeName);if(!z[Oe]||v[Oe])throw Rt("root node is forbidden and cannot be sanitized in-place")}}else if(P instanceof a)_=Xr("<!---->"),N=_.ownerDocument.importNode(P,!0),N.nodeType===Lt.element&&N.nodeName==="BODY"||N.nodeName==="HTML"?_=N:_.appendChild(N);else{if(!Be&&!ze&&!Ne&&P.indexOf("<")===-1)return S&&it?S.createHTML(P):P;if(_=Xr(P),!_)return Be?null:it?O:""}_&&bt&&Ie(_.firstChild);let de=Qr(C?P:_);for(;ne=de.nextNode();)en(ne),nn(ne),ne.content instanceof i&&As(ne.content);if(C)return P;if(Be){if(st)for(me=b.call(_.ownerDocument);_.firstChild;)me.appendChild(_.firstChild);else me=_;return(re.shadowroot||re.shadowrootmode)&&(me=T.call(s,me,!0)),me}let ve=Ne?_.outerHTML:_.innerHTML;return Ne&&z["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&be(Bn,_.ownerDocument.doctype.name)&&(ve="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
|
|
66
|
-
`+ve),
|
|
67
|
-
]`).replace("lheading",
|
|
68
|
-
`).map(i=>{let
|
|
69
|
-
`)}var sr=class{constructor(
|
|
70
|
-
`)}}}fences(
|
|
71
|
-
`)}}blockquote(
|
|
70
|
+
`}function S(){Ae(v(),r),P()}function P(){try{let _=Array.from(r.querySelectorAll(".board-column"));for(let b of _){let T=b.querySelector(".board-column__body");if(!T)continue;let E=Array.from(T.querySelectorAll(".board-card")),D=b.querySelector(".board-column__header"),U=D&&D.textContent?.trim()||"";for(let W of E){let Z=W.querySelector(".board-card__title"),K=Z&&Z.textContent?.trim()||"";W.setAttribute("aria-label",`Issue ${K||"(no title)"} \u2014 Column ${U}`),W.tabIndex=-1}E.length>0&&(E[0].tabIndex=0)}}catch{}}r.addEventListener("keydown",_=>{let b=_.target;if(!b||!(b instanceof HTMLElement))return;let T=String(b.tagName||"").toLowerCase();if(T==="input"||T==="textarea"||T==="select"||b.isContentEditable===!0)return;let E=b.closest(".board-card");if(!E)return;let D=String(_.key||"");if(D==="Enter"||D===" "){_.preventDefault();let j=E.getAttribute("data-issue-id");j&&t(j);return}if(D!=="ArrowUp"&&D!=="ArrowDown"&&D!=="ArrowLeft"&&D!=="ArrowRight")return;_.preventDefault();let U=E.closest(".board-column");if(!U)return;let W=U.querySelector(".board-column__body");if(!W)return;let Z=Array.from(W.querySelectorAll(".board-card")),K=Z.indexOf(E);if(K!==-1){if(D==="ArrowDown"&&K<Z.length-1){$(Z[K],Z[K+1]);return}if(D==="ArrowUp"&&K>0){$(Z[K],Z[K-1]);return}if(D==="ArrowRight"||D==="ArrowLeft"){let j=Array.from(r.querySelectorAll(".board-column")),re=j.indexOf(U);if(re===-1)return;let ie=D==="ArrowRight"?1:-1,he=re+ie,ue=null;for(;he>=0&&he<j.length;){let B=j[he],ge=B.querySelector(".board-column__body");if((ge?Array.from(ge.querySelectorAll(".board-card")):[]).length>0){ue=B;break}he+=ie}if(ue){let B=ue.querySelector(".board-column__body .board-card");B&&$(E,B)}return}}});function $(_,b){try{_.tabIndex=-1,b.tabIndex=0,b.focus()}catch{}}function C(){a("applyClosedFilter %s",m);let _=Array.isArray(u)?[...u]:[],b=new Date,T=0;m==="today"?T=new Date(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0,0).getTime():m==="3"?T=b.getTime()-4320*60*1e3:m==="7"&&(T=b.getTime()-10080*60*1e3),_=_.filter(E=>{let D=Number.isFinite(E.closed_at)?E.closed_at:NaN;return Number.isFinite(D)?D>=T:!1}),_.sort(ht),d=_}function O(_){try{let b=_.target,T=String(b.value||"today");if(m=T==="3"||T==="7"?T:"today",a("closed filter %s",m),s)try{s.setState({board:{closed_filter:m}})}catch{}C(),S()}catch{}}function y(){try{if(f){let _=f.selectBoardColumn("tab:board:in-progress","in_progress"),b=f.selectBoardColumn("tab:board:blocked","blocked"),T=f.selectBoardColumn("tab:board:ready","ready"),E=f.selectBoardColumn("tab:board:closed","closed"),D=new Set(_.map(W=>W.id));l=T.filter(W=>!D.has(W.id)),o=b,p=_,u=E}C(),S()}catch{l=[],o=[],p=[],d=[],S()}}return f&&f.subscribe(()=>{try{y()}catch{}}),{async load(){a("load"),y();try{let _=!!(n&&n.selectors),b=U=>{if(!_||!n)return 0;let W=n.selectors;if(typeof W.count=="function")return Number(W.count(U)||0);try{let Z=W.getIds(U);return Array.isArray(Z)?Z.length:0}catch{return 0}},T=b("tab:board:ready")+b("tab:board:blocked")+b("tab:board:in-progress")+b("tab:board:closed"),E=e,D=E&&typeof E.getReady=="function"&&typeof E.getBlocked=="function"&&typeof E.getInProgress=="function"&&typeof E.getClosed=="function";if(T===0&&D){a("fallback fetch");let[U,W,Z,K]=await Promise.all([E.getReady().catch(()=>[]),E.getBlocked().catch(()=>[]),E.getInProgress().catch(()=>[]),E.getClosed().catch(()=>[])]),j=Array.isArray(U)?U.map(B=>B):[],re=Array.isArray(W)?W.map(B=>B):[],ie=Array.isArray(Z)?Z.map(B=>B):[],he=Array.isArray(K)?K.map(B=>B):[],ue=new Set(ie.map(B=>B.id));j=j.filter(B=>!ue.has(B.id)),j.sort(Ie),re.sort(Ie),ie.sort(Ie),l=j,o=re,p=ie,u=he,C(),S()}}catch{}},clear(){r.replaceChildren(),l=[],o=[],p=[],d=[]}}}var{entries:zn,setPrototypeOf:In,isFrozen:Qs,getPrototypeOf:Js,getOwnPropertyDescriptor:ei}=Object,{freeze:ke,seal:$e,create:Lr}=Object,{apply:Dr,construct:Nr}=typeof Reflect<"u"&&Reflect;ke||(ke=function(e){return e});$e||($e=function(e){return e});Dr||(Dr=function(e,t){for(var s=arguments.length,n=new Array(s>2?s-2:0),i=2;i<s;i++)n[i-2]=arguments[i];return e.apply(t,n)});Nr||(Nr=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];return new e(...s)});var Xt=_e(Array.prototype.forEach),ti=_e(Array.prototype.lastIndexOf),Ln=_e(Array.prototype.pop),$t=_e(Array.prototype.push),ri=_e(Array.prototype.splice),Jt=_e(String.prototype.toLowerCase),Tr=_e(String.prototype.toString),Er=_e(String.prototype.match),Ct=_e(String.prototype.replace),ni=_e(String.prototype.indexOf),si=_e(String.prototype.trim),Le=_e(Object.prototype.hasOwnProperty),we=_e(RegExp.prototype.test),Rt=ii(TypeError);function _e(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];return Dr(r,e,s)}}function ii(r){return function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return Nr(r,t)}}function G(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jt;In&&In(r,null);let s=e.length;for(;s--;){let n=e[s];if(typeof n=="string"){let i=t(n);i!==n&&(Qs(e)||(e[s]=i),n=i)}r[n]=!0}return r}function oi(r){for(let e=0;e<r.length;e++)Le(r,e)||(r[e]=null);return r}function Fe(r){let e=Lr(null);for(let[t,s]of zn(r))Le(r,t)&&(Array.isArray(s)?e[t]=oi(s):s&&typeof s=="object"&&s.constructor===Object?e[t]=Fe(s):e[t]=s);return e}function It(r,e){for(;r!==null;){let s=ei(r,e);if(s){if(s.get)return _e(s.get);if(typeof s.value=="function")return _e(s.value)}r=Js(r)}function t(){return null}return t}var Dn=ke(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$r=ke(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Cr=ke(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ai=ke(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Rr=ke(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),li=ke(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nn=ke(["#text"]),Mn=ke(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ir=ke(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),On=ke(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Qt=ke(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ci=$e(/\{\{[\w\W]*|[\w\W]*\}\}/gm),di=$e(/<%[\w\W]*|[\w\W]*%>/gm),ui=$e(/\$\{[\w\W]*/gm),pi=$e(/^data-[\-\w.\u00B7-\uFFFF]+$/),fi=$e(/^aria-[\-\w]+$/),Bn=$e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hi=$e(/^(?:\w+script|data):/i),gi=$e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hn=$e(/^html$/i),mi=$e(/^[a-z][.\w]*(-[.\w]+)+$/i),Pn=Object.freeze({__proto__:null,ARIA_ATTR:fi,ATTR_WHITESPACE:gi,CUSTOM_ELEMENT:mi,DATA_ATTR:pi,DOCTYPE_NAME:Hn,ERB_EXPR:di,IS_ALLOWED_URI:Bn,IS_SCRIPT_OR_DATA:hi,MUSTACHE_EXPR:ci,TMPLIT_EXPR:ui}),Lt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bi=function(){return typeof window>"u"?null:window},yi=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(s=t.getAttribute(n));let i="dompurify"+(s?"#"+s:"");try{return e.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Fn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Un(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bi(),e=F=>Un(F);if(e.version="3.3.0",e.removed=[],!r||!r.document||r.document.nodeType!==Lt.document||!r.Element)return e.isSupported=!1,e;let{document:t}=r,s=t,n=s.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:l,Element:o,NodeFilter:p,NamedNodeMap:d=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:m}=r,v=o.prototype,k=It(v,"cloneNode"),I=It(v,"remove"),S=It(v,"nextSibling"),P=It(v,"childNodes"),$=It(v,"parentNode");if(typeof a=="function"){let F=t.createElement("template");F.content&&F.content.ownerDocument&&(t=F.content.ownerDocument)}let C,O="",{implementation:y,createNodeIterator:_,createDocumentFragment:b,getElementsByTagName:T}=t,{importNode:E}=s,D=Fn();e.isSupported=typeof zn=="function"&&typeof $=="function"&&y&&y.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:U,ERB_EXPR:W,TMPLIT_EXPR:Z,DATA_ATTR:K,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:re,ATTR_WHITESPACE:ie,CUSTOM_ELEMENT:he}=Pn,{IS_ALLOWED_URI:ue}=Pn,B=null,ge=G({},[...Dn,...$r,...Cr,...Rr,...Nn]),ee=null,Ce=G({},[...Mn,...Ir,...On,...Qt]),X=Object.seal(Lr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Re=null,Ee=Object.seal(Lr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Be=!0,He=!0,Xe=!1,x=!0,g=!1,w=!0,z=!1,le=!1,ce=!1,Ue=!1,at=!1,lt=!1,Bt=!0,h=!1,N="user-content-",q=!0,R=!1,Q={},de=null,yt=G({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),pe=null,Ht=G({},["audio","video","img","source","image","track"]),wt=null,Ut=G({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",ct="http://www.w3.org/2000/svg",H="http://www.w3.org/1999/xhtml",te=H,je=!1,qt=null,ks=G({},[qe,ct,H],Tr),jt=G({},["mi","mo","mn","ms","mtext"]),Gt=G({},["annotation-xml"]),_s=G({},["title","style","font","a","script"]),kt=null,xs=["application/xhtml+xml","text/html"],vs="text/html",fe=null,dt=null,As=t.createElement("form"),Kr=function(c){return c instanceof RegExp||c instanceof Function},ur=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(dt&&dt===c)){if((!c||typeof c!="object")&&(c={}),c=Fe(c),kt=xs.indexOf(c.PARSER_MEDIA_TYPE)===-1?vs:c.PARSER_MEDIA_TYPE,fe=kt==="application/xhtml+xml"?Tr:Jt,B=Le(c,"ALLOWED_TAGS")?G({},c.ALLOWED_TAGS,fe):ge,ee=Le(c,"ALLOWED_ATTR")?G({},c.ALLOWED_ATTR,fe):Ce,qt=Le(c,"ALLOWED_NAMESPACES")?G({},c.ALLOWED_NAMESPACES,Tr):ks,wt=Le(c,"ADD_URI_SAFE_ATTR")?G(Fe(Ut),c.ADD_URI_SAFE_ATTR,fe):Ut,pe=Le(c,"ADD_DATA_URI_TAGS")?G(Fe(Ht),c.ADD_DATA_URI_TAGS,fe):Ht,de=Le(c,"FORBID_CONTENTS")?G({},c.FORBID_CONTENTS,fe):yt,Te=Le(c,"FORBID_TAGS")?G({},c.FORBID_TAGS,fe):Fe({}),Re=Le(c,"FORBID_ATTR")?G({},c.FORBID_ATTR,fe):Fe({}),Q=Le(c,"USE_PROFILES")?c.USE_PROFILES:!1,Be=c.ALLOW_ARIA_ATTR!==!1,He=c.ALLOW_DATA_ATTR!==!1,Xe=c.ALLOW_UNKNOWN_PROTOCOLS||!1,x=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,g=c.SAFE_FOR_TEMPLATES||!1,w=c.SAFE_FOR_XML!==!1,z=c.WHOLE_DOCUMENT||!1,Ue=c.RETURN_DOM||!1,at=c.RETURN_DOM_FRAGMENT||!1,lt=c.RETURN_TRUSTED_TYPE||!1,ce=c.FORCE_BODY||!1,Bt=c.SANITIZE_DOM!==!1,h=c.SANITIZE_NAMED_PROPS||!1,q=c.KEEP_CONTENT!==!1,R=c.IN_PLACE||!1,ue=c.ALLOWED_URI_REGEXP||Bn,te=c.NAMESPACE||H,jt=c.MATHML_TEXT_INTEGRATION_POINTS||jt,Gt=c.HTML_INTEGRATION_POINTS||Gt,X=c.CUSTOM_ELEMENT_HANDLING||{},c.CUSTOM_ELEMENT_HANDLING&&Kr(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=c.CUSTOM_ELEMENT_HANDLING.tagNameCheck),c.CUSTOM_ELEMENT_HANDLING&&Kr(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),g&&(He=!1),at&&(Ue=!0),Q&&(B=G({},Nn),ee=[],Q.html===!0&&(G(B,Dn),G(ee,Mn)),Q.svg===!0&&(G(B,$r),G(ee,Ir),G(ee,Qt)),Q.svgFilters===!0&&(G(B,Cr),G(ee,Ir),G(ee,Qt)),Q.mathMl===!0&&(G(B,Rr),G(ee,On),G(ee,Qt))),c.ADD_TAGS&&(typeof c.ADD_TAGS=="function"?Ee.tagCheck=c.ADD_TAGS:(B===ge&&(B=Fe(B)),G(B,c.ADD_TAGS,fe))),c.ADD_ATTR&&(typeof c.ADD_ATTR=="function"?Ee.attributeCheck=c.ADD_ATTR:(ee===Ce&&(ee=Fe(ee)),G(ee,c.ADD_ATTR,fe))),c.ADD_URI_SAFE_ATTR&&G(wt,c.ADD_URI_SAFE_ATTR,fe),c.FORBID_CONTENTS&&(de===yt&&(de=Fe(de)),G(de,c.FORBID_CONTENTS,fe)),q&&(B["#text"]=!0),z&&G(B,["html","head","body"]),B.table&&(G(B,["tbody"]),delete Te.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw Rt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Rt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=c.TRUSTED_TYPES_POLICY,O=C.createHTML("")}else C===void 0&&(C=yi(m,n)),C!==null&&typeof O=="string"&&(O=C.createHTML(""));ke&&ke(c),dt=c}},Yr=G({},[...$r,...Cr,...ai]),Vr=G({},[...Rr,...li]),Ss=function(c){let A=$(c);(!A||!A.tagName)&&(A={namespaceURI:te,tagName:"template"});let M=Jt(c.tagName),ne=Jt(A.tagName);return qt[c.namespaceURI]?c.namespaceURI===ct?A.namespaceURI===H?M==="svg":A.namespaceURI===qe?M==="svg"&&(ne==="annotation-xml"||jt[ne]):!!Yr[M]:c.namespaceURI===qe?A.namespaceURI===H?M==="math":A.namespaceURI===ct?M==="math"&&Gt[ne]:!!Vr[M]:c.namespaceURI===H?A.namespaceURI===ct&&!Gt[ne]||A.namespaceURI===qe&&!jt[ne]?!1:!Vr[M]&&(_s[M]||!Yr[M]):!!(kt==="application/xhtml+xml"&&qt[c.namespaceURI]):!1},Me=function(c){$t(e.removed,{element:c});try{$(c).removeChild(c)}catch{I(c)}},Qe=function(c,A){try{$t(e.removed,{attribute:A.getAttributeNode(c),from:A})}catch{$t(e.removed,{attribute:null,from:A})}if(A.removeAttribute(c),c==="is")if(Ue||at)try{Me(A)}catch{}else try{A.setAttribute(c,"")}catch{}},Xr=function(c){let A=null,M=null;if(ce)c="<remove></remove>"+c;else{let ae=Er(c,/^[\r\n\t ]+/);M=ae&&ae[0]}kt==="application/xhtml+xml"&&te===H&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");let ne=C?C.createHTML(c):c;if(te===H)try{A=new f().parseFromString(ne,kt)}catch{}if(!A||!A.documentElement){A=y.createDocument(te,"template",null);try{A.documentElement.innerHTML=je?O:ne}catch{}}let ye=A.body||A.documentElement;return c&&M&&ye.insertBefore(t.createTextNode(M),ye.childNodes[0]||null),te===H?T.call(A,z?"html":"body")[0]:z?A.documentElement:ye},Qr=function(c){return _.call(c.ownerDocument||c,c,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},pr=function(c){return c instanceof u&&(typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||!(c.attributes instanceof d)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function")},Jr=function(c){return typeof l=="function"&&c instanceof l};function Oe(F,c,A){Xt(F,M=>{M.call(e,c,A,dt)})}let en=function(c){let A=null;if(Oe(D.beforeSanitizeElements,c,null),pr(c))return Me(c),!0;let M=fe(c.nodeName);if(Oe(D.uponSanitizeElement,c,{tagName:M,allowedTags:B}),w&&c.hasChildNodes()&&!Jr(c.firstElementChild)&&we(/<[/\w!]/g,c.innerHTML)&&we(/<[/\w!]/g,c.textContent)||c.nodeType===Lt.progressingInstruction||w&&c.nodeType===Lt.comment&&we(/<[/\w]/g,c.data))return Me(c),!0;if(!(Ee.tagCheck instanceof Function&&Ee.tagCheck(M))&&(!B[M]||Te[M])){if(!Te[M]&&rn(M)&&(X.tagNameCheck instanceof RegExp&&we(X.tagNameCheck,M)||X.tagNameCheck instanceof Function&&X.tagNameCheck(M)))return!1;if(q&&!de[M]){let ne=$(c)||c.parentNode,ye=P(c)||c.childNodes;if(ye&&ne){let ae=ye.length;for(let ve=ae-1;ve>=0;--ve){let Pe=k(ye[ve],!0);Pe.__removalCount=(c.__removalCount||0)+1,ne.insertBefore(Pe,S(c))}}}return Me(c),!0}return c instanceof o&&!Ss(c)||(M==="noscript"||M==="noembed"||M==="noframes")&&we(/<\/no(script|embed|frames)/i,c.innerHTML)?(Me(c),!0):(g&&c.nodeType===Lt.text&&(A=c.textContent,Xt([U,W,Z],ne=>{A=Ct(A,ne," ")}),c.textContent!==A&&($t(e.removed,{element:c.cloneNode()}),c.textContent=A)),Oe(D.afterSanitizeElements,c,null),!1)},tn=function(c,A,M){if(Bt&&(A==="id"||A==="name")&&(M in t||M in As))return!1;if(!(He&&!Re[A]&&we(K,A))){if(!(Be&&we(j,A))){if(!(Ee.attributeCheck instanceof Function&&Ee.attributeCheck(A,c))){if(!ee[A]||Re[A]){if(!(rn(c)&&(X.tagNameCheck instanceof RegExp&&we(X.tagNameCheck,c)||X.tagNameCheck instanceof Function&&X.tagNameCheck(c))&&(X.attributeNameCheck instanceof RegExp&&we(X.attributeNameCheck,A)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(A,c))||A==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&we(X.tagNameCheck,M)||X.tagNameCheck instanceof Function&&X.tagNameCheck(M))))return!1}else if(!wt[A]){if(!we(ue,Ct(M,ie,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&c!=="script"&&ni(M,"data:")===0&&pe[c])){if(!(Xe&&!we(re,Ct(M,ie,"")))){if(M)return!1}}}}}}}return!0},rn=function(c){return c!=="annotation-xml"&&Er(c,he)},nn=function(c){Oe(D.beforeSanitizeAttributes,c,null);let{attributes:A}=c;if(!A||pr(c))return;let M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0},ne=A.length;for(;ne--;){let ye=A[ne],{name:ae,namespaceURI:ve,value:Pe}=ye,ut=fe(ae),fr=Pe,me=ae==="value"?fr:si(fr);if(M.attrName=ut,M.attrValue=me,M.keepAttr=!0,M.forceKeepAttr=void 0,Oe(D.uponSanitizeAttribute,c,M),me=M.attrValue,h&&(ut==="id"||ut==="name")&&(Qe(ae,c),me=N+me),w&&we(/((--!?|])>)|<\/(style|title|textarea)/i,me)){Qe(ae,c);continue}if(ut==="attributename"&&Er(me,"href")){Qe(ae,c);continue}if(M.forceKeepAttr)continue;if(!M.keepAttr){Qe(ae,c);continue}if(!x&&we(/\/>/i,me)){Qe(ae,c);continue}g&&Xt([U,W,Z],on=>{me=Ct(me,on," ")});let sn=fe(c.nodeName);if(!tn(sn,ut,me)){Qe(ae,c);continue}if(C&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ve)switch(m.getAttributeType(sn,ut)){case"TrustedHTML":{me=C.createHTML(me);break}case"TrustedScriptURL":{me=C.createScriptURL(me);break}}if(me!==fr)try{ve?c.setAttributeNS(ve,ae,me):c.setAttribute(ae,me),pr(c)?Me(c):Ln(e.removed)}catch{Qe(ae,c)}}Oe(D.afterSanitizeAttributes,c,null)},Ts=function F(c){let A=null,M=Qr(c);for(Oe(D.beforeSanitizeShadowDOM,c,null);A=M.nextNode();)Oe(D.uponSanitizeShadowNode,A,null),en(A),nn(A),A.content instanceof i&&F(A.content);Oe(D.afterSanitizeShadowDOM,c,null)};return e.sanitize=function(F){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=null,M=null,ne=null,ye=null;if(je=!F,je&&(F="<!-->"),typeof F!="string"&&!Jr(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw Rt("dirty is not a string, aborting")}else throw Rt("toString is not a function");if(!e.isSupported)return F;if(le||ur(c),e.removed=[],typeof F=="string"&&(R=!1),R){if(F.nodeName){let Pe=fe(F.nodeName);if(!B[Pe]||Te[Pe])throw Rt("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof l)A=Xr("<!---->"),M=A.ownerDocument.importNode(F,!0),M.nodeType===Lt.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?A=M:A.appendChild(M);else{if(!Ue&&!g&&!z&&F.indexOf("<")===-1)return C&<?C.createHTML(F):F;if(A=Xr(F),!A)return Ue?null:lt?O:""}A&&ce&&Me(A.firstChild);let ae=Qr(R?F:A);for(;ne=ae.nextNode();)en(ne),nn(ne),ne.content instanceof i&&Ts(ne.content);if(R)return F;if(Ue){if(at)for(ye=b.call(A.ownerDocument);A.firstChild;)ye.appendChild(A.firstChild);else ye=A;return(ee.shadowroot||ee.shadowrootmode)&&(ye=E.call(s,ye,!0)),ye}let ve=z?A.outerHTML:A.innerHTML;return z&&B["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&&we(Hn,A.ownerDocument.doctype.name)&&(ve="<!DOCTYPE "+A.ownerDocument.doctype.name+`>
|
|
71
|
+
`+ve),g&&Xt([U,W,Z],Pe=>{ve=Ct(ve,Pe," ")}),C&<?C.createHTML(ve):ve},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ur(F),le=!0},e.clearConfig=function(){dt=null,le=!1},e.isValidAttribute=function(F,c,A){dt||ur({});let M=fe(F),ne=fe(c);return tn(M,ne,A)},e.addHook=function(F,c){typeof c=="function"&&$t(D[F],c)},e.removeHook=function(F,c){if(c!==void 0){let A=ti(D[F],c);return A===-1?void 0:ri(D[F],A,1)[0]}return Ln(D[F])},e.removeHooks=function(F){D[F]=[]},e.removeAllHooks=function(){D=Fn()},e}var qn=Un();var jn={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Gn=r=>(...e)=>({_$litDirective$:r,values:e}),er=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var Dt=class extends er{constructor(e){if(super(e),this.it=oe,e.type!==jn.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===oe||e==null)return this._t=void 0,this.it=e;if(e===rt)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;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Dt.directiveName="unsafeHTML",Dt.resultType=1;var Wn=Gn(Dt);function Fr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ot=Fr();function Jn(r){ot=r}var Pt={exec:()=>null};function Y(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(xe.caret,"$1"),t=t.replace(n,a),s},getRegex:()=>new RegExp(t,e)};return s}var wi=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),xe={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,listReplaceTabs:/^\t+/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},ki=/^(?:[ \t]*(?:\n|$))+/,_i=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ft=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vi=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zr=/(?:[*+-]|\d{1,9}[.)])/,es=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ts=Y(es).replace(/bull/g,zr).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ai=Y(es).replace(/bull/g,zr).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Br=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Si=/^[^\n]+/,Hr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ti=Y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ei=Y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zr).getRegex(),or="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",Ur=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$i=Y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\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",Ur).replace("tag",or).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rs=Y(Br).replace("hr",Ft).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",or).getRegex(),Ci=Y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rs).getRegex(),qr={blockquote:Ci,code:_i,def:Ti,fences:xi,heading:vi,hr:Ft,html:$i,lheading:ts,list:Ei,newline:ki,paragraph:rs,table:Pt,text:Si},Zn=Y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ft).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",or).getRegex(),Ri={...qr,lheading:Ai,table:Zn,paragraph:Y(Br).replace("hr",Ft).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",or).getRegex()},Ii={...qr,html:Y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ur).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:Pt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Y(Br).replace("hr",Ft).replace("heading",` *#{1,6} *[^
|
|
72
|
+
]`).replace("lheading",ts).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Li=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Di=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ns=/^( {2,}|\\)\n(?!\s*$)/,Ni=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ar=/[\p{P}\p{S}]/u,jr=/[\s\p{P}\p{S}]/u,ss=/[^\s\p{P}\p{S}]/u,Mi=Y(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,jr).getRegex(),is=/(?!~)[\p{P}\p{S}]/u,Oi=/(?!~)[\s\p{P}\p{S}]/u,Pi=/(?:[^\s\p{P}\p{S}]|~)/u,Fi=Y(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wi?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),os=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,zi=Y(os,"u").replace(/punct/g,ar).getRegex(),Bi=Y(os,"u").replace(/punct/g,is).getRegex(),as="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hi=Y(as,"gu").replace(/notPunctSpace/g,ss).replace(/punctSpace/g,jr).replace(/punct/g,ar).getRegex(),Ui=Y(as,"gu").replace(/notPunctSpace/g,Pi).replace(/punctSpace/g,Oi).replace(/punct/g,is).getRegex(),qi=Y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ss).replace(/punctSpace/g,jr).replace(/punct/g,ar).getRegex(),ji=Y(/\\(punct)/,"gu").replace(/punct/g,ar).getRegex(),Gi=Y(/^<(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(),Wi=Y(Ur).replace("(?:-->|$)","-->").getRegex(),Zi=Y("^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",Wi).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ki=Y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ls=Y(/^!?\[(label)\]\[(ref)\]/).replace("label",nr).replace("ref",Hr).getRegex(),cs=Y(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hr).getRegex(),Yi=Y("reflink|nolink(?!\\()","g").replace("reflink",ls).replace("nolink",cs).getRegex(),Kn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gr={_backpedal:Pt,anyPunctuation:ji,autolink:Gi,blockSkip:Fi,br:ns,code:Di,del:Pt,emStrongLDelim:zi,emStrongRDelimAst:Hi,emStrongRDelimUnd:qi,escape:Li,link:Ki,nolink:cs,punctuation:Mi,reflink:ls,reflinkSearch:Yi,tag:Zi,text:Ni,url:Pt},Vi={...Gr,link:Y(/^!?\[(label)\]\((.*?)\)/).replace("label",nr).getRegex(),reflink:Y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nr).getRegex()},Mr={...Gr,emStrongRDelimAst:Ui,emStrongLDelim:Bi,url:Y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Kn).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:Y(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Kn).getRegex()},Xi={...Mr,br:Y(ns).replace("{2,}","*").getRegex(),text:Y(Mr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},tr={normal:qr,gfm:Ri,pedantic:Ii},Nt={normal:Gr,gfm:Mr,breaks:Xi,pedantic:Vi},Qi={"&":"&","<":"<",">":">",'"':""","'":"'"},Yn=r=>Qi[r];function ze(r,e){if(e){if(xe.escapeTest.test(r))return r.replace(xe.escapeReplace,Yn)}else if(xe.escapeTestNoEncode.test(r))return r.replace(xe.escapeReplaceNoEncode,Yn);return r}function Vn(r){try{r=encodeURI(r).replace(xe.percentDecode,"%")}catch{return null}return r}function Xn(r,e){let t=r.replace(xe.findPipe,(i,a,l)=>{let o=!1,p=a;for(;--p>=0&&l[p]==="\\";)o=!o;return o?"|":" |"}),s=t.split(xe.splitPipe),n=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(;n<s.length;n++)s[n]=s[n].trim().replace(xe.slashPipe,"|");return s}function Mt(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s;){let i=r.charAt(s-n-1);if(i===e&&!t)n++;else if(i!==e&&t)n++;else break}return r.slice(0,s-n)}function Ji(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 Qn(r,e,t,s,n){let i=e.href,a=e.title||null,l=r[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:a,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,o}function eo(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
|
|
73
|
+
`).map(i=>{let a=i.match(t.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=n.length?i.slice(n.length):i}).join(`
|
|
74
|
+
`)}var sr=class{constructor(r){J(this,"options");J(this,"rules");J(this,"lexer");this.options=r||ot}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Mt(t,`
|
|
75
|
+
`)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=eo(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=Mt(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:Mt(e[0],`
|
|
76
|
+
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=Mt(e[0],`
|
|
72
77
|
`).split(`
|
|
73
|
-
`),s="",n="",i=[];for(;
|
|
74
|
-
`),
|
|
78
|
+
`),s="",n="",i=[];for(;t.length>0;){let a=!1,l=[],o;for(o=0;o<t.length;o++)if(this.rules.other.blockquoteStart.test(t[o]))l.push(t[o]),a=!0;else if(!a)l.push(t[o]);else break;t=t.slice(o);let p=l.join(`
|
|
79
|
+
`),d=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
75
80
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
76
|
-
${
|
|
77
|
-
${
|
|
78
|
-
`+
|
|
79
|
-
`),
|
|
80
|
-
`+
|
|
81
|
-
`),
|
|
82
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(
|
|
83
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,
|
|
84
|
-
`,1)[0],
|
|
85
|
-
`,
|
|
86
|
-
`,1)[0],
|
|
87
|
-
`+
|
|
88
|
-
`+
|
|
89
|
-
`,
|
|
90
|
-
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(
|
|
91
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:
|
|
92
|
-
`),this.blockTokens(e,this.tokens);for(let
|
|
93
|
-
`:
|
|
81
|
+
${p}`:p,n=n?`${n}
|
|
82
|
+
${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=u,t.length===0)break;let f=i.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,v=m.raw+`
|
|
83
|
+
`+t.join(`
|
|
84
|
+
`),k=this.blockquote(v);i[i.length-1]=k,s=s.substring(0,s.length-m.raw.length)+k.raw,n=n.substring(0,n.length-m.text.length)+k.text;break}else if(f?.type==="list"){let m=f,v=m.raw+`
|
|
85
|
+
`+t.join(`
|
|
86
|
+
`),k=this.list(v);i[i.length-1]=k,s=s.substring(0,s.length-f.raw.length)+k.raw,n=n.substring(0,n.length-m.raw.length)+k.raw,t=v.substring(i.at(-1).raw.length).split(`
|
|
87
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,n={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 i=this.rules.other.listItemRegex(t),a=!1;for(;r;){let o=!1,p="",d="";if(!(e=i.exec(r))||this.rules.block.hr.test(r))break;p=e[0],r=r.substring(p.length);let u=e[2].split(`
|
|
88
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),f=r.split(`
|
|
89
|
+
`,1)[0],m=!u.trim(),v=0;if(this.options.pedantic?(v=2,d=u.trimStart()):m?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,d=u.slice(v),v+=e[1].length),m&&this.rules.other.blankLine.test(f)&&(p+=f+`
|
|
90
|
+
`,r=r.substring(f.length+1),o=!0),!o){let k=this.rules.other.nextBulletRegex(v),I=this.rules.other.hrRegex(v),S=this.rules.other.fencesBeginRegex(v),P=this.rules.other.headingBeginRegex(v),$=this.rules.other.htmlBeginRegex(v);for(;r;){let C=r.split(`
|
|
91
|
+
`,1)[0],O;if(f=C,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),O=f):O=f.replace(this.rules.other.tabCharGlobal," "),S.test(f)||P.test(f)||$.test(f)||k.test(f)||I.test(f))break;if(O.search(this.rules.other.nonSpaceChar)>=v||!f.trim())d+=`
|
|
92
|
+
`+O.slice(v);else{if(m||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(u)||P.test(u)||I.test(u))break;d+=`
|
|
93
|
+
`+f}!m&&!f.trim()&&(m=!0),p+=C+`
|
|
94
|
+
`,r=r.substring(C.length+1),u=O.slice(v)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(a=!0)),n.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),n.raw+=p}let l=n.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let o of n.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].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(o.raw);if(p){let d={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};o.checked=d.checked,n.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=d.raw+o.tokens[0].raw,o.tokens[0].text=d.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(d)):o.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):o.tokens.unshift(d)}}if(!n.loose){let p=o.tokens.filter(u=>u.type==="space"),d=p.length>0&&p.some(u=>this.rules.other.anyLine.test(u.raw));n.loose=d}}if(n.loose)for(let o of n.items){o.loose=!0;for(let p of o.tokens)p.type==="text"&&(p.type="paragraph")}return n}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}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"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:n}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Xn(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
95
|
+
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<t.length;a++)i.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:i.align[a]});for(let a of n)i.rows.push(Xn(a,i.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[o]})));return i}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
96
|
+
`?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 i=Mt(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=Ji(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=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)),Qn(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.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," "),n=e[s.toLowerCase()];if(!n){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return Qn(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||s[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,a,l=n,o=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*r.length+n);(s=p.exec(e))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){l+=a;continue}else if((s[5]||s[6])&&n%3&&!((n+a)%3)){o+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+o);let d=[...s[0]][0].length,u=r.slice(0,n+s.index+d+a);if(Math.min(n,a)%2){let m=u.slice(1,-1);return{type:"em",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}let f=u.slice(2,-2);return{type:"strong",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}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),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(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){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}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 n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==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}}}},De=class Or{constructor(e){J(this,"tokens");J(this,"options");J(this,"state");J(this,"inlineQueue");J(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ot,this.options.tokenizer=this.options.tokenizer||new sr,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:xe,block:tr.normal,inline:Nt.normal};this.options.pedantic?(t.block=tr.pedantic,t.inline=Nt.pedantic):this.options.gfm&&(t.block=tr.gfm,this.options.breaks?t.inline=Nt.breaks:t.inline=Nt.gfm),this.tokenizer.rules=t}static get rules(){return{block:tr,inline:Nt}}static lex(e,t){return new Or(t).lex(e)}static lexInline(e,t){return new Or(t).inlineTokens(e)}lex(e){e=e.replace(xe.carriageReturn,`
|
|
97
|
+
`),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){for(this.options.pedantic&&(e=e.replace(xe.tabCharGlobal," ").replace(xe.spaceLine,""));e;){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+=`
|
|
98
|
+
`: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(`
|
|
94
99
|
`)?"":`
|
|
95
|
-
`)+n.raw,
|
|
96
|
-
`+n.text,this.inlineQueue.at(-1).src=
|
|
100
|
+
`)+n.raw,a.text+=`
|
|
101
|
+
`+n.text,this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
97
102
|
`)?"":`
|
|
98
|
-
`)+n.raw,
|
|
99
|
-
`+n.raw,this.inlineQueue.at(-1).src=
|
|
103
|
+
`)+n.raw,a.text+=`
|
|
104
|
+
`+n.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}let i=e;if(this.options.extensions?.startBlock){let a=1/0,l=e.slice(1),o;this.options.extensions.startBlock.forEach(p=>{o=p.call({lexer:this},l),typeof o=="number"&&o>=0&&(a=Math.min(a,o))}),a<1/0&&a>=0&&(i=e.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){let a=t.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
100
105
|
`)?"":`
|
|
101
|
-
`)+n.raw,
|
|
102
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=
|
|
106
|
+
`)+n.raw,a.text+=`
|
|
107
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n),s=i.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
103
108
|
`)?"":`
|
|
104
|
-
`)+n.raw,
|
|
105
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=
|
|
106
|
-
`;return s?'<pre><code class="language-'+
|
|
107
|
-
`:"<pre><code>"+(
|
|
108
|
-
`}blockquote({tokens:
|
|
109
|
-
${this.parser.parse(
|
|
110
|
-
`}html({text:
|
|
111
|
-
`}hr(
|
|
112
|
-
`}list(
|
|
109
|
+
`)+n.raw,a.text+=`
|
|
110
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let s=e,n=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)o.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)i=n[2]?n[2].length:0,s=s.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let a=!1,l="";for(;e;){a||(l=""),a=!1;let o;if(this.options.extensions?.inline?.some(d=>(o=d.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let d=t.at(-1);o.type==="text"&&d?.type==="text"?(d.raw+=o.raw,d.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,s,l)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let p=e;if(this.options.extensions?.startInline){let d=1/0,u=e.slice(1),f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},u),typeof f=="number"&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(p=e.substring(0,d+1))}if(o=this.tokenizer.inlineText(p)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(l=o.raw.slice(-1)),a=!0;let d=t.at(-1);d?.type==="text"?(d.raw+=o.raw,d.text+=o.text):t.push(o);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}},ir=class{constructor(r){J(this,"options");J(this,"parser");this.options=r||ot}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(xe.notSpaceStart)?.[0],n=r.replace(xe.endingNewline,"")+`
|
|
111
|
+
`;return s?'<pre><code class="language-'+ze(s)+'">'+(t?n:ze(n,!0))+`</code></pre>
|
|
112
|
+
`:"<pre><code>"+(t?n:ze(n,!0))+`</code></pre>
|
|
113
|
+
`}blockquote({tokens:r}){return`<blockquote>
|
|
114
|
+
${this.parser.parse(r)}</blockquote>
|
|
115
|
+
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
116
|
+
`}hr(r){return`<hr>
|
|
117
|
+
`}list(r){let e=r.ordered,t=r.start,s="";for(let a=0;a<r.items.length;a++){let l=r.items[a];s+=this.listitem(l)}let n=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+n+i+`>
|
|
113
118
|
`+s+"</"+n+`>
|
|
114
|
-
`}listitem(
|
|
115
|
-
`}checkbox({checked:
|
|
116
|
-
`}table(
|
|
119
|
+
`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
|
|
120
|
+
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
121
|
+
`}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let i=r.rows[n];t="";for(let a=0;a<i.length;a++)t+=this.tablecell(i[a]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
117
122
|
<thead>
|
|
118
123
|
`+e+`</thead>
|
|
119
124
|
`+s+`</table>
|
|
120
|
-
`}tablerow({text:
|
|
121
|
-
${
|
|
122
|
-
`}tablecell(
|
|
123
|
-
`}strong({tokens:
|
|
124
|
-
|
|
125
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Le(r.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(r);throw r}}},rt=new Qi;function Y(t,e){return rt.parse(t,e)}Y.options=Y.setOptions=function(t){return rt.setOptions(t),Y.defaults=rt.defaults,Qn(Y.defaults),Y};Y.getDefaults=Fr;Y.defaults=nt;Y.use=function(...t){return rt.use(...t),Y.defaults=rt.defaults,Qn(Y.defaults),Y};Y.walkTokens=function(t,e){return rt.walkTokens(t,e)};Y.parseInline=rt.parseInline;Y.Parser=Re;Y.parser=Re.parse;Y.Renderer=ir;Y.TextRenderer=Wr;Y.Lexer=Ce;Y.lexer=Ce.lex;Y.Tokenizer=sr;Y.Hooks=Ot;Y.parse=Y;var Ko=Y.options,Vo=Y.setOptions,Yo=Y.use,Xo=Y.walkTokens,Qo=Y.parseInline;var Jo=Re.parse,ea=Ce.lex;function zt(t){let e=Y.parse(t),r=Un.sanitize(e);return Gn(r)}function Ke(t){switch((t||"").toString()){case"open":return"Open";case"in_progress":return"In progress";case"closed":return"Closed";default:return(t||"").toString()||"Open"}}function Ji(t){window.location.hash=t}function cs(t,e,r=Ji,s=void 0){let n=se("views:detail"),i=null,o=null,a=!1,l=!1,u=!1,g=!1,d=!1,p=!1,h=!1,k="";function x(f){let D=Sr(window.location.hash||"");return Ge(D,f)}function I(f){Ae(R`
|
|
125
|
+
`}tablerow({text:r}){return`<tr>
|
|
126
|
+
${r}</tr>
|
|
127
|
+
`}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
|
|
128
|
+
`}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>${ze(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),n=Vn(r);if(n===null)return s;r=n;let i='<a href="'+r+'"';return e&&(i+=' title="'+ze(e)+'"'),i+=">"+s+"</a>",i}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=Vn(r);if(n===null)return ze(t);r=n;let i=`<img src="${r}" alt="${t}"`;return e&&(i+=` title="${ze(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:ze(r.text)}},Wr=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}},Ne=class Pr{constructor(e){J(this,"options");J(this,"renderer");J(this,"textRenderer");this.options=e||ot,this.options.renderer=this.options.renderer||new ir,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wr}static parse(e,t){return new Pr(t).parse(e)}static parseInline(e,t){return new Pr(t).parseInline(e)}parse(e){let t="";for(let s=0;s<e.length;s++){let n=e[s];if(this.options.extensions?.renderers?.[n.type]){let a=n,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){t+=l||"";continue}}let i=n;switch(i.type){case"space":{t+=this.renderer.space(i);break}case"hr":{t+=this.renderer.hr(i);break}case"heading":{t+=this.renderer.heading(i);break}case"code":{t+=this.renderer.code(i);break}case"table":{t+=this.renderer.table(i);break}case"blockquote":{t+=this.renderer.blockquote(i);break}case"list":{t+=this.renderer.list(i);break}case"checkbox":{t+=this.renderer.checkbox(i);break}case"html":{t+=this.renderer.html(i);break}case"def":{t+=this.renderer.def(i);break}case"paragraph":{t+=this.renderer.paragraph(i);break}case"text":{t+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){let s="";for(let n=0;n<e.length;n++){let i=e[n];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){s+=l||"";continue}}let a=i;switch(a.type){case"escape":{s+=t.text(a);break}case"html":{s+=t.html(a);break}case"link":{s+=t.link(a);break}case"image":{s+=t.image(a);break}case"checkbox":{s+=t.checkbox(a);break}case"strong":{s+=t.strong(a);break}case"em":{s+=t.em(a);break}case"codespan":{s+=t.codespan(a);break}case"br":{s+=t.br(a);break}case"del":{s+=t.del(a);break}case"text":{s+=t.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}},rr,Ot=(rr=class{constructor(r){J(this,"options");J(this,"block");this.options=r||ot}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?De.lex:De.lexInline}provideParser(){return this.block?Ne.parse:Ne.parseInline}},J(rr,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),J(rr,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),rr),to=class{constructor(...r){J(this,"defaults",Fr());J(this,"options",this.setOptions);J(this,"parse",this.parseMarkdown(!0));J(this,"parseInline",this.parseMarkdown(!1));J(this,"Parser",Ne);J(this,"Renderer",ir);J(this,"TextRenderer",Wr);J(this,"Lexer",De);J(this,"Tokenizer",sr);J(this,"Hooks",Ot);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 n=s;for(let i of n.header)t=t.concat(this.walkTokens(i.tokens,e));for(let i of n.rows)for(let a of i)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let n=s;t=t.concat(this.walkTokens(n.items,e));break}default:{let n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(i=>{let a=n[i].flat(1/0);t=t.concat(this.walkTokens(a,e))}):n.tokens&&(t=t.concat(this.walkTokens(n.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(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...a){let l=n.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new ir(this.defaults);for(let i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=t.renderer[a],o=n[a];n[a]=(...p)=>{let d=l.apply(n,p);return d===!1&&(d=o.apply(n,p)),d||""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new sr(this.defaults);for(let i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=t.tokenizer[a],o=n[a];n[a]=(...p)=>{let d=l.apply(n,p);return d===!1&&(d=o.apply(n,p)),d}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Ot;for(let i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=t.hooks[a],o=n[a];Ot.passThroughHooks.has(i)?n[a]=p=>{if(this.defaults.async&&Ot.passThroughHooksRespectAsync.has(i))return(async()=>{let u=await l.call(n,p);return o.call(n,u)})();let d=l.call(n,p);return o.call(n,d)}:n[a]=(...p)=>{if(this.defaults.async)return(async()=>{let u=await l.apply(n,p);return u===!1&&(u=await o.apply(n,p)),u})();let d=l.apply(n,p);return d===!1&&(d=o.apply(n,p)),d}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),n&&(l=l.concat(n.call(this,a))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return De.lex(r,e??this.defaults)}parser(r,e){return Ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(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 i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,l=await(n.hooks?await n.hooks.provideLexer():r?De.lex:De.lexInline)(a,n),o=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(o,n.walkTokens));let p=await(n.hooks?await n.hooks.provideParser():r?Ne.parse:Ne.parseInline)(o,n);return n.hooks?await n.hooks.postprocess(p):p})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer():r?De.lex:De.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let l=(n.hooks?n.hooks.provideParser():r?Ne.parse:Ne.parseInline)(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return i(a)}}}onError(r,e){return t=>{if(t.message+=`
|
|
129
|
+
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+ze(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},it=new to;function V(r,e){return it.parse(r,e)}V.options=V.setOptions=function(r){return it.setOptions(r),V.defaults=it.defaults,Jn(V.defaults),V};V.getDefaults=Fr;V.defaults=ot;V.use=function(...r){return it.use(...r),V.defaults=it.defaults,Jn(V.defaults),V};V.walkTokens=function(r,e){return it.walkTokens(r,e)};V.parseInline=it.parseInline;V.Parser=Ne;V.parser=Ne.parse;V.Renderer=ir;V.TextRenderer=Wr;V.Lexer=De;V.lexer=De.lex;V.Tokenizer=sr;V.Hooks=Ot;V.parse=V;var Qo=V.options,Jo=V.setOptions,ea=V.use,ta=V.walkTokens,ra=V.parseInline;var na=Ne.parse,sa=De.lex;function zt(r){let e=V.parse(r),t=qn.sanitize(e);return Wn(t)}function Ve(r){switch((r||"").toString()){case"open":return"Open";case"in_progress":return"In progress";case"closed":return"Closed";default:return(r||"").toString()||"Open"}}function ro(r){window.location.hash=r}function ds(r,e,t=ro,s=void 0){let n=se("views:detail"),i=null,a=null,l=!1,o=!1,p=!1,d=!1,u=!1,f=!1,m=!1,v="";function k(h){let N=Sr(window.location.hash||"");return Ze(N,h)}function I(h){Ae(L`
|
|
126
130
|
<div class="panel__body" id="detail-root">
|
|
127
|
-
<p class="muted">${
|
|
131
|
+
<p class="muted">${h}</p>
|
|
128
132
|
</div>
|
|
129
|
-
`,
|
|
133
|
+
`,r)}function S(){if(!a||!s||typeof s.snapshotFor!="function")return;let h=s.snapshotFor(`detail:${a}`);Array.isArray(h)&&h.length>0&&(i=h.find(q=>String(q.id)===String(a))||h[0])}s&&typeof s.subscribe=="function"&&s.subscribe(()=>{try{S(),w()}catch(h){n("issue stores listener error %o",h)}});let P=()=>{o=!0,w()},$=h=>{h.key==="Enter"?(o=!0,w()):h.key==="Escape"&&(o=!1,w())},C=async()=>{if(!i||l)return;let h=r.querySelector("h2 input"),N=i.title||"",q=h?h.value:"";if(q===N){o=!1,w();return}l=!0,h&&(h.disabled=!0);try{n("save title %s \u2192 %s",String(i.id),q);let R=await e("edit-text",{id:i.id,field:"title",value:q});R&&typeof R=="object"&&(i=R,o=!1,w())}catch(R){n("save title failed %s %o",String(i.id),R),i.title=N,o=!1,w(),be("Failed to save title","error")}finally{l=!1}},O=()=>{o=!1,w()},y=()=>{m=!0,w()},_=h=>{h.key==="Enter"?(h.preventDefault(),m=!0,w()):h.key==="Escape"&&(h.preventDefault(),m=!1,w())},b=async()=>{if(!i||l)return;let h=r.querySelector("#detail-root .prop.assignee input"),N=i?.assignee??"",q=h?.value??"";if(q===N){m=!1,w();return}l=!0,h&&(h.disabled=!0);try{n("save assignee %s \u2192 %s",String(i.id),q);let R=await e("update-assignee",{id:i.id,assignee:q});R&&typeof R=="object"&&(i=R,m=!1,w())}catch(R){n("save assignee failed %s %o",String(i.id),R),i.assignee=N,m=!1,w(),be("Failed to update assignee","error")}finally{l=!1}},T=()=>{m=!1,w()},E=h=>{v=h.currentTarget.value||""};function D(h){h.key==="Enter"&&(h.preventDefault(),U())}async function U(){if(!i||l)return;let h=v.trim();if(h){l=!0;try{n("add label %s \u2192 %s",String(i.id),h);let N=await e("label-add",{id:i.id,label:h});N&&typeof N=="object"&&(i=N,v="",w())}catch(N){n("add label failed %s %o",String(i.id),N),be("Failed to add label","error")}finally{l=!1}}}async function W(h){if(!(!i||l)){l=!0;try{n("remove label %s \u2192 %s",String(i?.id||""),h);let N=await e("label-remove",{id:i.id,label:h});N&&typeof N=="object"&&(i=N,w())}catch(N){n("remove label failed %s %o",String(i?.id||""),N),be("Failed to remove label","error")}finally{l=!1}}}let Z=async h=>{if(!i||l){w();return}let N=h.currentTarget,q=i.status||"open",R=N.value;if(R!==q){l=!0,i.status=R,w();try{n("update status %s \u2192 %s",String(i.id),R);let Q=await e("update-status",{id:i.id,status:R});Q&&typeof Q=="object"&&(i=Q,w())}catch(Q){n("update status failed %s %o",String(i.id),Q),i.status=q,w(),be("Failed to update status","error")}finally{l=!1}}},K=async h=>{if(!i||l){w();return}let N=h.currentTarget,q=typeof i.priority=="number"?i.priority:2,R=Number(N.value);if(R!==q){l=!0,i.priority=R,w();try{n("update priority %s \u2192 %d",String(i.id),R);let Q=await e("update-priority",{id:i.id,priority:R});Q&&typeof Q=="object"&&(i=Q,w())}catch(Q){n("update priority failed %s %o",String(i.id),Q),i.priority=q,w(),be("Failed to update priority","error")}finally{l=!1}}},j=()=>{p=!0,w()},re=h=>{if(h.key==="Escape")p=!1,w();else if(h.key==="Enter"&&h.ctrlKey){let N=r.querySelector("#detail-root .editable-actions button");N&&N.click()}},ie=async()=>{if(!i||l)return;let h=r.querySelector("#detail-root textarea"),N=i.description||"",q=h?h.value:"";if(q===N){p=!1,w();return}l=!0,h&&(h.disabled=!0);try{n("save description %s",String(i?.id||""));let R=await e("edit-text",{id:i.id,field:"description",value:q});R&&typeof R=="object"&&(i=R,p=!1,w())}catch(R){n("save description failed %s %o",String(i?.id||""),R),i.description=N,p=!1,w(),be("Failed to save description","error")}finally{l=!1}},he=()=>{p=!1,w()},ue=()=>{d=!0,w();try{let h=r.querySelector("#detail-root .design textarea");h&&h.focus()}catch(h){n("focus design textarea failed %o",h)}},B=h=>{if(h.key==="Escape")d=!1,w();else if(h.key==="Enter"&&(h.ctrlKey||h.metaKey)){let N=r.querySelector("#detail-root .design .editable-actions button");N&&N.click()}},ge=async()=>{if(!i||l)return;let h=r.querySelector("#detail-root .design textarea"),N=i.design||"",q=h?h.value:"";if(q===N){d=!1,w();return}l=!0,h&&(h.disabled=!0);try{n("save design %s",String(i?.id||""));let R=await e("edit-text",{id:i.id,field:"design",value:q});R&&typeof R=="object"&&(i=R,d=!1,w())}catch(R){n("save design failed %s %o",String(i?.id||""),R),i.design=N,d=!1,w(),be("Failed to save design","error")}finally{l=!1}},ee=()=>{d=!1,w()},Ce=()=>{u=!0,w()},X=h=>{if(h.key==="Escape")u=!1,w();else if(h.key==="Enter"&&(h.ctrlKey||h.metaKey)){let N=r.querySelector("#detail-root .notes .editable-actions button");N&&N.click()}},Te=async()=>{if(!i||l)return;let h=r.querySelector("#detail-root .notes textarea"),N=i.notes||"",q=h?h.value:"";if(q===N){u=!1,w();return}l=!0,h&&(h.disabled=!0);try{n("save notes %s",String(i?.id||""));let R=await e("edit-text",{id:i.id,field:"notes",value:q});R&&typeof R=="object"&&(i=R,u=!1,w())}catch(R){n("save notes failed %s %o",String(i?.id||""),R),i.notes=N,u=!1,w(),be("Failed to save notes","error")}finally{l=!1}},Re=()=>{u=!1,w()},Ee=()=>{f=!0,w()},Be=h=>{if(h.key==="Escape")f=!1,w();else if(h.key==="Enter"&&(h.ctrlKey||h.metaKey)){let N=r.querySelector("#detail-root .acceptance .editable-actions button");N&&N.click()}},He=async()=>{if(!i||l)return;let h=r.querySelector("#detail-root .acceptance textarea"),N=i.acceptance||"",q=h?h.value:"";if(q===N){f=!1,w();return}l=!0,h&&(h.disabled=!0);try{n("save acceptance %s",String(i?.id||""));let R=await e("edit-text",{id:i.id,field:"acceptance",value:q});R&&typeof R=="object"&&(i=R,f=!1,w())}catch(R){n("save acceptance failed %s %o",String(i?.id||""),R),i.acceptance=N,f=!1,w(),be("Failed to save acceptance","error")}finally{l=!1}},Xe=()=>{f=!1,w()};function x(h,N){let q=h==="Dependencies"?"add-dependency":"add-dependent";return L`
|
|
130
134
|
<div class="props-card">
|
|
131
135
|
<div>
|
|
132
|
-
<div class="props-card__title">${
|
|
136
|
+
<div class="props-card__title">${h}</div>
|
|
133
137
|
</div>
|
|
134
138
|
<ul>
|
|
135
|
-
${!
|
|
136
|
-
data-href=${
|
|
137
|
-
@click=${()=>
|
|
139
|
+
${!N||N.length===0?null:N.map(R=>{let Q=R.id,de=k(Q);return L`<li
|
|
140
|
+
data-href=${de}
|
|
141
|
+
@click=${()=>t(de)}
|
|
138
142
|
>
|
|
139
|
-
${
|
|
140
|
-
<span class="text-truncate">${
|
|
143
|
+
${st(R.issue_type||"")}
|
|
144
|
+
<span class="text-truncate">${R.title||""}</span>
|
|
141
145
|
<button
|
|
142
146
|
aria-label=${`Remove dependency ${Q}`}
|
|
143
|
-
@click=${
|
|
147
|
+
@click=${z(Q,h)}
|
|
144
148
|
>
|
|
145
149
|
×
|
|
146
150
|
</button>
|
|
147
151
|
</li>`})}
|
|
148
152
|
</ul>
|
|
149
153
|
<div class="props-card__footer">
|
|
150
|
-
<input type="text" placeholder="Issue ID" data-testid=${
|
|
151
|
-
<button @click=${
|
|
154
|
+
<input type="text" placeholder="Issue ID" data-testid=${q} />
|
|
155
|
+
<button @click=${le(N,h)}>Add</button>
|
|
152
156
|
</div>
|
|
153
157
|
</div>
|
|
154
|
-
`}function
|
|
158
|
+
`}function g(h){let N=o?L`<div class="detail-title">
|
|
155
159
|
<h2>
|
|
156
160
|
<input
|
|
157
161
|
type="text"
|
|
158
162
|
aria-label="Edit title"
|
|
159
|
-
.value=${
|
|
160
|
-
@keydown=${
|
|
163
|
+
.value=${h.title||""}
|
|
164
|
+
@keydown=${ce}
|
|
161
165
|
/>
|
|
162
|
-
<button @click=${
|
|
166
|
+
<button @click=${C}>Save</button>
|
|
163
167
|
<button @click=${O}>Cancel</button>
|
|
164
168
|
</h2>
|
|
165
|
-
</div>`:
|
|
169
|
+
</div>`:L`<div class="detail-title">
|
|
166
170
|
<h2>
|
|
167
171
|
<span
|
|
168
172
|
class="editable"
|
|
169
173
|
tabindex="0"
|
|
170
174
|
role="button"
|
|
171
175
|
aria-label="Edit title"
|
|
172
|
-
@click=${
|
|
173
|
-
@keydown=${
|
|
174
|
-
>${
|
|
176
|
+
@click=${P}
|
|
177
|
+
@keydown=${$}
|
|
178
|
+
>${h.title||""}</span
|
|
175
179
|
>
|
|
176
180
|
</h2>
|
|
177
|
-
</div>`,
|
|
178
|
-
class=${`badge-select badge--status is-${
|
|
181
|
+
</div>`,q=L`<select
|
|
182
|
+
class=${`badge-select badge--status is-${h.status||"open"}`}
|
|
179
183
|
@change=${Z}
|
|
180
|
-
.value=${
|
|
181
|
-
?disabled=${
|
|
184
|
+
.value=${h.status||"open"}
|
|
185
|
+
?disabled=${l}
|
|
182
186
|
>
|
|
183
|
-
${(()=>{let H=String(
|
|
184
|
-
${
|
|
187
|
+
${(()=>{let H=String(h.status||"open");return["open","in_progress","closed"].map(te=>L`<option value=${te} ?selected=${H===te}>
|
|
188
|
+
${Ve(te)}
|
|
185
189
|
</option>`)})()}
|
|
186
|
-
</select>`,
|
|
187
|
-
class=${`badge-select badge--priority is-p${String(typeof
|
|
188
|
-
@change=${
|
|
189
|
-
.value=${String(typeof
|
|
190
|
-
?disabled=${
|
|
190
|
+
</select>`,R=L`<select
|
|
191
|
+
class=${`badge-select badge--priority is-p${String(typeof h.priority=="number"?h.priority:2)}`}
|
|
192
|
+
@change=${K}
|
|
193
|
+
.value=${String(typeof h.priority=="number"?h.priority:2)}
|
|
194
|
+
?disabled=${l}
|
|
191
195
|
>
|
|
192
|
-
${(()=>{let H=String(typeof
|
|
193
|
-
${
|
|
196
|
+
${(()=>{let H=String(typeof h.priority=="number"?h.priority:2);return Ye.map((te,je)=>L`<option value=${String(je)} ?selected=${H===String(je)}>
|
|
197
|
+
${Et(je)} ${te}
|
|
194
198
|
</option>`)})()}
|
|
195
|
-
</select>`,Q=
|
|
199
|
+
</select>`,Q=p?L`<div class="description">
|
|
196
200
|
<textarea
|
|
197
|
-
@keydown=${
|
|
198
|
-
.value=${
|
|
201
|
+
@keydown=${re}
|
|
202
|
+
.value=${h.description||""}
|
|
199
203
|
rows="8"
|
|
200
204
|
style="width:100%"
|
|
201
205
|
></textarea>
|
|
202
206
|
<div class="editable-actions">
|
|
203
|
-
<button @click=${
|
|
204
|
-
<button @click=${
|
|
207
|
+
<button @click=${ie}>Save</button>
|
|
208
|
+
<button @click=${he}>Cancel</button>
|
|
205
209
|
</div>
|
|
206
|
-
</div>`:
|
|
210
|
+
</div>`:L`<div
|
|
207
211
|
class="md editable"
|
|
208
212
|
tabindex="0"
|
|
209
213
|
role="button"
|
|
210
214
|
aria-label="Edit description"
|
|
211
|
-
@click=${
|
|
212
|
-
@keydown=${
|
|
215
|
+
@click=${j}
|
|
216
|
+
@keydown=${Ue}
|
|
213
217
|
>
|
|
214
|
-
${(()=>{let H=
|
|
215
|
-
</div>`,
|
|
216
|
-
${
|
|
218
|
+
${(()=>{let H=h.description||"";return H.trim()===""?L`<div class="muted">Description</div>`:zt(H)})()}
|
|
219
|
+
</div>`,de=(()=>{let H=h;return String(h.acceptance||H.acceptance_criteria||"")})(),yt=f?L`<div class="acceptance">
|
|
220
|
+
${de.trim().length>0?L`<div class="props-card__title">Acceptance Criteria</div>`:""}
|
|
217
221
|
<textarea
|
|
218
|
-
@keydown=${
|
|
219
|
-
.value=${
|
|
222
|
+
@keydown=${Be}
|
|
223
|
+
.value=${de}
|
|
220
224
|
rows="6"
|
|
221
225
|
style="width:100%"
|
|
222
226
|
></textarea>
|
|
223
227
|
<div class="editable-actions">
|
|
224
|
-
<button @click=${
|
|
225
|
-
<button @click=${
|
|
228
|
+
<button @click=${He}>Save</button>
|
|
229
|
+
<button @click=${Xe}>Cancel</button>
|
|
226
230
|
</div>
|
|
227
|
-
</div>`:
|
|
228
|
-
${(()=>{let H=
|
|
231
|
+
</div>`:L`<div class="acceptance">
|
|
232
|
+
${(()=>{let H=de,te=H.trim().length>0;return L`${te?L`<div class="props-card__title">Acceptance Criteria</div>`:""}
|
|
229
233
|
<div
|
|
230
234
|
class="md editable"
|
|
231
235
|
tabindex="0"
|
|
232
236
|
role="button"
|
|
233
237
|
aria-label="Edit acceptance criteria"
|
|
234
|
-
@click=${
|
|
235
|
-
@keydown=${
|
|
238
|
+
@click=${Ee}
|
|
239
|
+
@keydown=${at}
|
|
236
240
|
>
|
|
237
|
-
${te?zt(H):
|
|
241
|
+
${te?zt(H):L`<div class="muted">Add acceptance criteria…</div>`}
|
|
238
242
|
</div>`})()}
|
|
239
|
-
</div>`,pe=String(
|
|
240
|
-
${pe.trim().length>0?
|
|
243
|
+
</div>`,pe=String(h.notes||""),Ht=u?L`<div class="notes">
|
|
244
|
+
${pe.trim().length>0?L`<div class="props-card__title">Notes</div>`:""}
|
|
241
245
|
<textarea
|
|
242
|
-
@keydown=${
|
|
246
|
+
@keydown=${X}
|
|
243
247
|
.value=${pe}
|
|
244
248
|
rows="6"
|
|
245
249
|
style="width:100%"
|
|
246
250
|
></textarea>
|
|
247
251
|
<div class="editable-actions">
|
|
248
|
-
<button @click=${
|
|
249
|
-
<button @click=${
|
|
252
|
+
<button @click=${Te}>Save</button>
|
|
253
|
+
<button @click=${Re}>Cancel</button>
|
|
250
254
|
</div>
|
|
251
|
-
</div>`:
|
|
252
|
-
${(()=>{let H=pe,te=H.trim().length>0;return
|
|
255
|
+
</div>`:L`<div class="notes">
|
|
256
|
+
${(()=>{let H=pe,te=H.trim().length>0;return L`${te?L`<div class="props-card__title">Notes</div>`:""}
|
|
253
257
|
<div
|
|
254
258
|
class="md editable"
|
|
255
259
|
tabindex="0"
|
|
256
260
|
role="button"
|
|
257
261
|
aria-label="Edit notes"
|
|
258
|
-
@click=${
|
|
259
|
-
@keydown=${
|
|
262
|
+
@click=${Ce}
|
|
263
|
+
@keydown=${lt}
|
|
260
264
|
>
|
|
261
|
-
${te?zt(H):
|
|
265
|
+
${te?zt(H):L`<div class="muted">Add notes…</div>`}
|
|
262
266
|
</div>`})()}
|
|
263
|
-
</div>`,wt=Array.isArray(
|
|
267
|
+
</div>`,wt=Array.isArray(h.labels)?h.labels:[],Ut=L`<div class="props-card labels">
|
|
264
268
|
<div>
|
|
265
269
|
<div class="props-card__title">Labels</div>
|
|
266
270
|
</div>
|
|
267
271
|
<ul>
|
|
268
|
-
${wt.map(H=>
|
|
272
|
+
${wt.map(H=>L`<li>
|
|
269
273
|
<span class="badge" title=${H}
|
|
270
274
|
>${H}
|
|
271
275
|
<button
|
|
272
276
|
class="icon-button"
|
|
273
277
|
title="Remove label"
|
|
274
278
|
aria-label=${"Remove label "+H}
|
|
275
|
-
@click=${()=>
|
|
279
|
+
@click=${()=>W(H)}
|
|
276
280
|
style="margin-left:6px"
|
|
277
281
|
>
|
|
278
282
|
×
|
|
@@ -285,42 +289,42 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
|
|
|
285
289
|
type="text"
|
|
286
290
|
placeholder="Label"
|
|
287
291
|
size="12"
|
|
288
|
-
.value=${
|
|
289
|
-
@input=${
|
|
290
|
-
@keydown=${
|
|
292
|
+
.value=${v}
|
|
293
|
+
@input=${E}
|
|
294
|
+
@keydown=${D}
|
|
291
295
|
/>
|
|
292
|
-
<button @click=${
|
|
296
|
+
<button @click=${U}>Add</button>
|
|
293
297
|
</div>
|
|
294
|
-
</div>`,
|
|
295
|
-
${
|
|
298
|
+
</div>`,qe=String(h.design||""),ct=d?L`<div class="design">
|
|
299
|
+
${qe.trim().length>0?L`<div class="props-card__title">Design</div>`:""}
|
|
296
300
|
<textarea
|
|
297
|
-
@keydown=${
|
|
298
|
-
.value=${
|
|
301
|
+
@keydown=${B}
|
|
302
|
+
.value=${qe}
|
|
299
303
|
rows="6"
|
|
300
304
|
style="width:100%"
|
|
301
305
|
></textarea>
|
|
302
306
|
<div class="editable-actions">
|
|
303
|
-
<button @click=${
|
|
304
|
-
<button @click=${
|
|
307
|
+
<button @click=${ge}>Save</button>
|
|
308
|
+
<button @click=${ee}>Cancel</button>
|
|
305
309
|
</div>
|
|
306
|
-
</div>`:
|
|
307
|
-
${(()=>{let H=
|
|
310
|
+
</div>`:L`<div class="design">
|
|
311
|
+
${(()=>{let H=qe,te=H.trim().length>0;return L`${te?L`<div class="props-card__title">Design</div>`:""}
|
|
308
312
|
<div
|
|
309
313
|
class="md editable"
|
|
310
314
|
tabindex="0"
|
|
311
315
|
role="button"
|
|
312
316
|
aria-label="Edit design"
|
|
313
|
-
@click=${
|
|
317
|
+
@click=${ue}
|
|
314
318
|
@keydown=${Bt}
|
|
315
319
|
>
|
|
316
|
-
${te?zt(H):
|
|
320
|
+
${te?zt(H):L`<div class="muted">Add design…</div>`}
|
|
317
321
|
</div>`})()}
|
|
318
|
-
</div>`;return
|
|
322
|
+
</div>`;return L`
|
|
319
323
|
<div class="panel__body" id="detail-root">
|
|
320
324
|
<div style="position:relative">
|
|
321
325
|
<div class="detail-layout">
|
|
322
326
|
<div class="detail-main">
|
|
323
|
-
${
|
|
327
|
+
${N} ${Q} ${ct} ${Ht}
|
|
324
328
|
${yt}
|
|
325
329
|
</div>
|
|
326
330
|
<div class="detail-side">
|
|
@@ -329,26 +333,26 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
|
|
|
329
333
|
<div class="prop">
|
|
330
334
|
<div class="label">Type</div>
|
|
331
335
|
<div class="value">
|
|
332
|
-
${
|
|
336
|
+
${st(h.issue_type)}
|
|
333
337
|
</div>
|
|
334
338
|
</div>
|
|
335
339
|
<div class="prop">
|
|
336
340
|
<div class="label">Status</div>
|
|
337
|
-
<div class="value">${
|
|
341
|
+
<div class="value">${q}</div>
|
|
338
342
|
</div>
|
|
339
343
|
<div class="prop">
|
|
340
344
|
<div class="label">Priority</div>
|
|
341
|
-
<div class="value">${
|
|
345
|
+
<div class="value">${R}</div>
|
|
342
346
|
</div>
|
|
343
347
|
<div class="prop assignee">
|
|
344
348
|
<div class="label">Assignee</div>
|
|
345
349
|
<div class="value">
|
|
346
|
-
${
|
|
350
|
+
${m?L`<input
|
|
347
351
|
type="text"
|
|
348
352
|
aria-label="Edit assignee"
|
|
349
|
-
.value=${
|
|
350
|
-
size=${Math.min(40,Math.max(12,(
|
|
351
|
-
@keydown=${H=>{H.key==="Escape"?(H.preventDefault()
|
|
353
|
+
.value=${h.assignee||""}
|
|
354
|
+
size=${Math.min(40,Math.max(12,(h.assignee||"").length+3))}
|
|
355
|
+
@keydown=${H=>{H.key==="Escape"?(H.preventDefault(),T()):H.key==="Enter"&&(H.preventDefault(),b())}}
|
|
352
356
|
/>
|
|
353
357
|
<button
|
|
354
358
|
class="btn"
|
|
@@ -360,109 +364,109 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
|
|
|
360
364
|
<button
|
|
361
365
|
class="btn"
|
|
362
366
|
style="margin-left:6px"
|
|
363
|
-
@click=${
|
|
367
|
+
@click=${T}
|
|
364
368
|
>
|
|
365
369
|
Cancel
|
|
366
|
-
</button>`:
|
|
370
|
+
</button>`:L`${(()=>{let H=h.assignee||"",te=H.trim().length>0;return L`<span
|
|
367
371
|
class=${te?"editable":"editable muted"}
|
|
368
372
|
tabindex="0"
|
|
369
373
|
role="button"
|
|
370
374
|
aria-label="Edit assignee"
|
|
371
375
|
@click=${y}
|
|
372
|
-
@keydown=${
|
|
376
|
+
@keydown=${_}
|
|
373
377
|
>${te?H:"Unassigned"}</span
|
|
374
378
|
>`})()}`}
|
|
375
379
|
</div>
|
|
376
380
|
</div>
|
|
377
381
|
</div>
|
|
378
382
|
${Ut}
|
|
379
|
-
${
|
|
380
|
-
${
|
|
383
|
+
${x("Dependencies",h.dependencies||[])}
|
|
384
|
+
${x("Dependents",h.dependents||[])}
|
|
381
385
|
</div>
|
|
382
386
|
</div>
|
|
383
387
|
</div>
|
|
384
388
|
</div>
|
|
385
|
-
`}function
|
|
389
|
+
`}function w(){if(!i){I(a?"Loading\u2026":"No issue selected");return}Ae(g(i),r)}function z(h,N){return async q=>{if(q.stopPropagation(),!(!i||l)){l=!0;try{if(N==="Dependencies"){let R=await e("dep-remove",{a:i.id,b:h,view_id:i.id});R&&typeof R=="object"&&(i=R,w())}else{let R=await e("dep-remove",{a:h,b:i.id,view_id:i.id});R&&typeof R=="object"&&(i=R,w())}}catch(R){n("dep-remove failed %o",R)}finally{l=!1}}}}function le(h,N){return async q=>{if(!i||l)return;let R=q.currentTarget,Q=R.previousElementSibling,de=Q?Q.value.trim():"";if(!de||de===i.id){be("Enter a different issue id");return}if(new Set((h||[]).map(pe=>pe.id)).has(de)){be("Link already exists");return}l=!0,R&&(R.disabled=!0),Q&&(Q.disabled=!0);try{if(N==="Dependencies"){let pe=await e("dep-add",{a:i.id,b:de,view_id:i.id});pe&&typeof pe=="object"&&(i=pe,w())}else{let pe=await e("dep-add",{a:de,b:i.id,view_id:i.id});pe&&typeof pe=="object"&&(i=pe,w())}}catch(pe){n("dep-add failed %o",pe),be("Failed to add dependency","error")}finally{l=!1}}}function ce(h){h.key==="Escape"?(o=!1,w()):h.key==="Enter"&&(h.preventDefault(),C())}function Ue(h){h.key==="Enter"&&j()}function at(h){h.key==="Enter"&&Ee()}function lt(h){h.key==="Enter"&&Ce()}function Bt(h){h.key==="Enter"&&ue()}return{async load(h){if(!h){I("No issue selected");return}a=String(h),i=null,S(),i||I("Loading\u2026"),l=!1,w()},clear(){I("Select an issue to view details")},destroy(){r.replaceChildren()}}}function lr(r){let e=r.navigate,t=r.onUpdate,s=r.requestRender,n=r.getSelectedId||(()=>null),i=r.row_class||"issue-row",a=new Set;function l(u,f,m,v=""){let k=`${u}:${f}`;return a.has(k)?L`<span>
|
|
386
390
|
<input
|
|
387
391
|
type="text"
|
|
388
|
-
.value=${
|
|
392
|
+
.value=${m}
|
|
389
393
|
class="inline-edit"
|
|
390
|
-
@keydown=${async
|
|
391
|
-
@blur=${async
|
|
394
|
+
@keydown=${async S=>{if(S.key==="Escape")a.delete(k),s();else if(S.key==="Enter"){let $=S.currentTarget.value||"";$!==m&&await t(u,{[f]:$}),a.delete(k),s()}}}
|
|
395
|
+
@blur=${async S=>{let $=S.currentTarget.value||"";$!==m&&await t(u,{[f]:$}),a.delete(k),s()}}
|
|
392
396
|
autofocus
|
|
393
397
|
/>
|
|
394
|
-
</span>`:
|
|
395
|
-
class="editable text-truncate ${
|
|
398
|
+
</span>`:L`<span
|
|
399
|
+
class="editable text-truncate ${m?"":"muted"}"
|
|
396
400
|
tabindex="0"
|
|
397
401
|
role="button"
|
|
398
|
-
@click=${
|
|
399
|
-
@keydown=${
|
|
400
|
-
>${
|
|
401
|
-
>`}function
|
|
402
|
+
@click=${S=>{S.stopPropagation(),S.preventDefault(),a.add(k),s()}}
|
|
403
|
+
@keydown=${S=>{S.key==="Enter"&&(S.preventDefault(),S.stopPropagation(),a.add(k),s())}}
|
|
404
|
+
>${m||v}</span
|
|
405
|
+
>`}function o(u,f){return async m=>{let k=m.currentTarget.value||"",I={};I[f]=f==="priority"?Number(k):k,await t(u,I)}}function p(u){return f=>{let m=f.target;m&&(m.tagName==="INPUT"||m.tagName==="SELECT")||e(u)}}function d(u){let f=String(u.status||"open"),m=String(u.priority??2),v=n()===u.id;return L`<tr
|
|
402
406
|
role="row"
|
|
403
|
-
class="${i} ${
|
|
404
|
-
data-issue-id=${
|
|
405
|
-
@click=${u
|
|
407
|
+
class="${i} ${v?"selected":""}"
|
|
408
|
+
data-issue-id=${u.id}
|
|
409
|
+
@click=${p(u.id)}
|
|
406
410
|
>
|
|
407
|
-
<td role="gridcell" class="mono">${
|
|
408
|
-
<td role="gridcell">${
|
|
409
|
-
<td role="gridcell">${
|
|
411
|
+
<td role="gridcell" class="mono">${Ke(u.id)}</td>
|
|
412
|
+
<td role="gridcell">${st(u.issue_type)}</td>
|
|
413
|
+
<td role="gridcell">${l(u.id,"title",u.title||"")}</td>
|
|
410
414
|
<td role="gridcell">
|
|
411
415
|
<select
|
|
412
|
-
class="badge-select badge--status is-${
|
|
413
|
-
.value=${
|
|
414
|
-
@change=${
|
|
416
|
+
class="badge-select badge--status is-${f}"
|
|
417
|
+
.value=${f}
|
|
418
|
+
@change=${o(u.id,"status")}
|
|
415
419
|
>
|
|
416
|
-
${["open","in_progress","closed"].map(
|
|
417
|
-
${
|
|
420
|
+
${["open","in_progress","closed"].map(k=>L`<option value=${k} ?selected=${f===k}>
|
|
421
|
+
${Ve(k)}
|
|
418
422
|
</option>`)}
|
|
419
423
|
</select>
|
|
420
424
|
</td>
|
|
421
425
|
<td role="gridcell">
|
|
422
|
-
${
|
|
426
|
+
${l(u.id,"assignee",u.assignee||"","Unassigned")}
|
|
423
427
|
</td>
|
|
424
428
|
<td role="gridcell">
|
|
425
429
|
<select
|
|
426
|
-
class="badge-select badge--priority ${"is-p"+
|
|
427
|
-
.value=${
|
|
428
|
-
@change=${
|
|
430
|
+
class="badge-select badge--priority ${"is-p"+m}"
|
|
431
|
+
.value=${m}
|
|
432
|
+
@change=${o(u.id,"priority")}
|
|
429
433
|
>
|
|
430
|
-
${
|
|
434
|
+
${Ye.map((k,I)=>L`<option
|
|
431
435
|
value=${String(I)}
|
|
432
|
-
?selected=${
|
|
436
|
+
?selected=${m===String(I)}
|
|
433
437
|
>
|
|
434
|
-
${
|
|
438
|
+
${Et(I)} ${k}
|
|
435
439
|
</option>`)}
|
|
436
440
|
</select>
|
|
437
441
|
</td>
|
|
438
|
-
</tr>`}return
|
|
439
|
-
<div class="epic-group" data-epic-id=${
|
|
442
|
+
</tr>`}return d}function us(r,e,t,s=void 0,n=void 0){let i=[],a=new Set,l=new Set,o=new Map,p=n?We(n):null;p&&p.subscribe(()=>{let S=i.length===0;if(i=I(),u(),S&&i.length>0){let P=String(i[0].epic?.id||"");P&&!a.has(P)&&k(P)}});let d=lr({navigate:S=>t(S),onUpdate:v,requestRender:u,getSelectedId:()=>null,row_class:"epic-row"});function u(){Ae(f(),r)}function f(){return i.length?L`${i.map(S=>m(S))}`:L`<div class="panel__header muted">No epics found.</div>`}function m(S){let P=S.epic||{},$=String(P.id||""),C=a.has($),O=p?p.selectEpicChildren($):[],y=l.has($);return L`
|
|
443
|
+
<div class="epic-group" data-epic-id=${$}>
|
|
440
444
|
<div
|
|
441
445
|
class="epic-header"
|
|
442
|
-
@click=${()=>
|
|
446
|
+
@click=${()=>k($)}
|
|
443
447
|
role="button"
|
|
444
448
|
tabindex="0"
|
|
445
|
-
aria-expanded=${
|
|
449
|
+
aria-expanded=${C}
|
|
446
450
|
>
|
|
447
|
-
${
|
|
451
|
+
${Ke($,{class_name:"mono"})}
|
|
448
452
|
<span class="text-truncate" style="margin-left:8px"
|
|
449
|
-
>${
|
|
453
|
+
>${P.title||"(no title)"}</span
|
|
450
454
|
>
|
|
451
455
|
<span
|
|
452
456
|
class="epic-progress"
|
|
453
457
|
style="margin-left:auto; display:flex; align-items:center; gap:8px;"
|
|
454
458
|
>
|
|
455
459
|
<progress
|
|
456
|
-
value=${Number(
|
|
457
|
-
max=${Math.max(1,Number(
|
|
460
|
+
value=${Number(S.closed_children||0)}
|
|
461
|
+
max=${Math.max(1,Number(S.total_children||0))}
|
|
458
462
|
></progress>
|
|
459
463
|
<span class="muted mono"
|
|
460
|
-
>${
|
|
464
|
+
>${S.closed_children}/${S.total_children}</span
|
|
461
465
|
>
|
|
462
466
|
</span>
|
|
463
467
|
</div>
|
|
464
|
-
${
|
|
465
|
-
${y?
|
|
468
|
+
${C?L`<div class="epic-children">
|
|
469
|
+
${y?L`<div class="muted">Loading…</div>`:O.length===0?L`<div class="muted">No issues found</div>`:L`<table class="table">
|
|
466
470
|
<colgroup>
|
|
467
471
|
<col style="width: 100px" />
|
|
468
472
|
<col style="width: 120px" />
|
|
@@ -482,12 +486,25 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
|
|
|
482
486
|
</tr>
|
|
483
487
|
</thead>
|
|
484
488
|
<tbody>
|
|
485
|
-
${O.map(
|
|
489
|
+
${O.map(_=>d(_))}
|
|
486
490
|
</tbody>
|
|
487
491
|
</table>`}
|
|
488
492
|
</div>`:null}
|
|
489
493
|
</div>
|
|
490
|
-
`}async function
|
|
494
|
+
`}async function v(S,P){try{await e.updateIssue({id:S,...P}),u()}catch{}}async function k(S){if(a.has(S)){if(a.delete(S),o.has(S)){try{let P=o.get(S);P&&await P()}catch{}o.delete(S);try{n&&n.unregister&&n.unregister(`detail:${S}`)}catch{}}}else{if(a.add(S),l.add(S),u(),s&&typeof s.subscribeList=="function")try{try{n&&n.register&&n.register(`detail:${S}`,{type:"issue-detail",params:{id:S}})}catch{}let P=await s.subscribeList(`detail:${S}`,{type:"issue-detail",params:{id:S}});o.set(S,P)}catch{}l.delete(S)}u()}function I(){let S=n&&n.snapshotFor?n.snapshotFor("tab:epics")||[]:[],P=[];for(let $ of S){let C=Array.isArray($.dependents)?$.dependents:[],O=Number.isFinite($.total_children),y=Number.isFinite($.closed_children),_=O?Number($.total_children)||0:C.length,b=y&&Number($.closed_children)||0;if(!y)for(let T of C)String(T.status||"")==="closed"&&b++;P.push({epic:$,total_children:_,closed_children:b})}return P}return{async load(){i=I(),u();try{if(i.length>0){let S=String(i[0].epic?.id||"");S&&!a.has(S)&&await k(S)}}catch{}}}}function ps(r){let e=document.createElement("dialog");e.id="fatal-error-dialog",e.setAttribute("role","alertdialog"),e.setAttribute("aria-modal","true"),e.innerHTML=`
|
|
495
|
+
<div class="fatal-error">
|
|
496
|
+
<div class="fatal-error__icon" aria-hidden="true">!</div>
|
|
497
|
+
<div class="fatal-error__body">
|
|
498
|
+
<p class="fatal-error__eyebrow">Critical</p>
|
|
499
|
+
<h2 class="fatal-error__title" id="fatal-error-title">Command failed</h2>
|
|
500
|
+
<p class="fatal-error__message" id="fatal-error-message"></p>
|
|
501
|
+
<pre class="fatal-error__detail" id="fatal-error-detail"></pre>
|
|
502
|
+
<div class="fatal-error__actions">
|
|
503
|
+
<button type="button" class="btn primary" id="fatal-error-reload">Reload</button>
|
|
504
|
+
<button type="button" class="btn" id="fatal-error-close">Dismiss</button>
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
</div>`,r.appendChild(e);let t=e.querySelector("#fatal-error-title"),s=e.querySelector("#fatal-error-message"),n=e.querySelector("#fatal-error-detail"),i=e.querySelector("#fatal-error-reload"),a=e.querySelector("#fatal-error-close"),l=()=>{if(typeof e.close=="function")try{e.close()}catch{}e.removeAttribute("open")},o=(p,d,u="")=>{t&&(t.textContent=p||"Unexpected Error"),s&&(s.textContent=d||"An unrecoverable error occurred.");let f=typeof u=="string"?u.trim():"";if(n&&(f.length>0?(n.textContent=f,n.removeAttribute("hidden")):(n.textContent="No additional diagnostics available.",n.setAttribute("hidden",""))),typeof e.showModal=="function")try{e.showModal(),e.setAttribute("open","")}catch{e.setAttribute("open","")}else e.setAttribute("open","")};return i&&i.addEventListener("click",()=>{window.location.reload()}),a&&a.addEventListener("click",()=>l()),e.addEventListener("cancel",p=>{p.preventDefault(),l()}),{open:o,close:l,getElement(){return e}}}function fs(r,e,t){let s=document.createElement("dialog");s.id="issue-dialog",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.innerHTML=`
|
|
491
508
|
<div class="issue-dialog__container" part="container">
|
|
492
509
|
<header class="issue-dialog__header">
|
|
493
510
|
<div class="issue-dialog__title">
|
|
@@ -497,36 +514,36 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
|
|
|
497
514
|
</header>
|
|
498
515
|
<div class="issue-dialog__body" id="issue-dialog-body"></div>
|
|
499
516
|
</div>
|
|
500
|
-
`,
|
|
517
|
+
`,r.appendChild(s);let n=s.querySelector("#issue-dialog-body"),i=s.querySelector("#issue-dialog-title"),a=s.querySelector(".issue-dialog__close");function l(m){i.replaceChildren(),i.appendChild(Ke(m))}s.addEventListener("mousedown",m=>{m.target===s&&(m.preventDefault(),p())}),s.addEventListener("cancel",m=>{m.preventDefault(),p()}),a.addEventListener("click",()=>p());let o=null;function p(){try{typeof s.close=="function"?s.close():s.removeAttribute("open")}catch{s.removeAttribute("open")}try{t()}catch{}f()}function d(m){try{let v=document.activeElement;v&&v instanceof HTMLElement?o=v:o=null}catch{o=null}l(m);try{"showModal"in s&&typeof s.showModal=="function"?s.showModal():s.setAttribute("open",""),setTimeout(()=>{try{a.focus()}catch{}},0)}catch{s.setAttribute("open","")}}function u(){try{typeof s.close=="function"?s.close():s.removeAttribute("open")}catch{s.removeAttribute("open")}f()}function f(){try{o&&document.contains(o)&&o.focus()}catch{}finally{o=null}}return{open:d,close:u,getMount(){return n}}}var cr=["bug","feature","task","epic","chore"];function dr(r){switch((r||"").toString().toLowerCase()){case"bug":return"Bug";case"feature":return"Feature";case"task":return"Task";case"epic":return"Epic";case"chore":return"Chore";default:return""}}function hs(r,e,t,s,n=void 0,i=void 0){let a=se("views:list"),l="all",o="",p=[],d="",u=s?s.getState().selected_id:null,f=null,m=lr({navigate:y=>{let _=t||(T=>window.location.hash=T),b=s?s.getState().view:"issues";_(Ze(b,y))},onUpdate:C,requestRender:$,getSelectedId:()=>u,row_class:"issue-row"}),v=async y=>{l=y.currentTarget.value,a("status change %s",l),s&&s.setState({filters:{status:l}}),await O()},k=y=>{o=y.currentTarget.value,a("search input %s",o),s&&s.setState({filters:{search:o}}),$()},I=y=>{d=y.currentTarget.value||"",a("type change %s",d||"(all)"),s&&s.setState({filters:{type:d}}),$()};if(s){let y=s.getState();y&&y.filters&&typeof y.filters=="object"&&(l=y.filters.status||"all",o=y.filters.search||"",d=typeof y.filters.type=="string"?y.filters.type:"")}let S=i?We(i):null;function P(){let y=p;if(l!=="all"&&l!=="ready"&&(y=y.filter(_=>String(_.status||"")===l)),o){let _=o.toLowerCase();y=y.filter(b=>{let T=String(b.id).toLowerCase(),E=String(b.title||"").toLowerCase();return T.includes(_)||E.includes(_)})}return d&&(y=y.filter(_=>String(_.issue_type||"")===String(d))),l==="closed"&&(y=y.slice().sort(ht)),L`
|
|
501
518
|
<div class="panel__header">
|
|
502
|
-
<select @change=${
|
|
519
|
+
<select @change=${v} .value=${l}>
|
|
503
520
|
<option value="all">All</option>
|
|
504
521
|
<option value="ready">Ready</option>
|
|
505
|
-
<option value="open">${
|
|
506
|
-
<option value="in_progress">${
|
|
507
|
-
<option value="closed">${
|
|
522
|
+
<option value="open">${Ve("open")}</option>
|
|
523
|
+
<option value="in_progress">${Ve("in_progress")}</option>
|
|
524
|
+
<option value="closed">${Ve("closed")}</option>
|
|
508
525
|
</select>
|
|
509
526
|
<select
|
|
510
527
|
@change=${I}
|
|
511
|
-
.value=${
|
|
528
|
+
.value=${d}
|
|
512
529
|
aria-label="Filter by type"
|
|
513
530
|
>
|
|
514
531
|
<option value="">All types</option>
|
|
515
|
-
${cr.map(
|
|
516
|
-
${dr(
|
|
532
|
+
${cr.map(_=>L`<option value=${_} ?selected=${d===_}>
|
|
533
|
+
${dr(_)}
|
|
517
534
|
</option>`)}
|
|
518
535
|
</select>
|
|
519
536
|
<input
|
|
520
537
|
type="search"
|
|
521
538
|
placeholder="Search…"
|
|
522
|
-
@input=${
|
|
523
|
-
.value=${
|
|
539
|
+
@input=${k}
|
|
540
|
+
.value=${o}
|
|
524
541
|
/>
|
|
525
542
|
</div>
|
|
526
543
|
<div class="panel__body" id="list-root">
|
|
527
|
-
${y.length===0?
|
|
544
|
+
${y.length===0?L`<div class="issues-block">
|
|
528
545
|
<div class="muted" style="padding:10px 12px;">No issues</div>
|
|
529
|
-
</div>`:
|
|
546
|
+
</div>`:L`<div class="issues-block">
|
|
530
547
|
<table
|
|
531
548
|
class="table"
|
|
532
549
|
role="grid"
|
|
@@ -552,33 +569,33 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
|
|
|
552
569
|
</tr>
|
|
553
570
|
</thead>
|
|
554
571
|
<tbody role="rowgroup">
|
|
555
|
-
${y.map(
|
|
572
|
+
${y.map(_=>m(_))}
|
|
556
573
|
</tbody>
|
|
557
574
|
</table>
|
|
558
575
|
</div>`}
|
|
559
576
|
</div>
|
|
560
|
-
`}function
|
|
577
|
+
`}function $(){Ae(P(),r)}$();async function C(y,_){try{a("updateInline %s %o",y,Object.keys(_)),typeof _.title=="string"&&await e("edit-text",{id:y,field:"title",value:_.title}),typeof _.assignee=="string"&&await e("update-assignee",{id:y,assignee:_.assignee}),typeof _.status=="string"&&await e("update-status",{id:y,status:_.status}),typeof _.priority=="number"&&await e("update-priority",{id:y,priority:_.priority})}catch{}}async function O(){a("load");let y=r.querySelector("#list-root"),_=y?y.scrollTop:0;try{S?p=S.selectIssuesFor("tab:issues"):p=[]}catch(b){a("load failed: %o",b),p=[]}$();try{let b=r.querySelector("#list-root");b&&_>0&&(b.scrollTop=_)}catch{}}return r.tabIndex=0,r.addEventListener("keydown",y=>{if(y.key==="ArrowDown"||y.key==="ArrowUp"){let E=y.target;if((E&&typeof E.closest=="function"?E.closest("#list-root table.table"):null)&&!!!(E&&typeof E.closest=="function"&&(E.closest("input")||E.closest("textarea")||E.closest("select")))){let W=E&&typeof E.closest=="function"?E.closest("td"):null;if(W&&W.parentElement){let Z=W.parentElement,K=Z.parentElement;if(K&&K.querySelectorAll){let j=Array.from(K.querySelectorAll("tr")),re=Math.max(0,j.indexOf(Z)),ie=W.cellIndex||0,he=y.key==="ArrowDown"?Math.min(re+1,j.length-1):Math.max(re-1,0),ue=j[he],B=ue&&ue.cells?ue.cells[ie]:null;if(B){let ge=B.querySelector('button:not([disabled]), [tabindex]:not([tabindex="-1"]), a[href], select:not([disabled]), input:not([disabled]):not([type="hidden"]), textarea:not([disabled])');if(ge&&typeof ge.focus=="function"){y.preventDefault(),ge.focus();return}}}}}}let _=r.querySelector("#list-root tbody"),b=_?_.querySelectorAll("tr"):[];if(b.length===0)return;let T=0;if(u&&(T=Array.from(b).findIndex(D=>(D.getAttribute("data-issue-id")||"")===u),T<0&&(T=0)),y.key==="ArrowDown"){y.preventDefault();let E=b[Math.min(T+1,b.length-1)],D=E?E.getAttribute("data-issue-id"):"",U=D||null;s&&U&&s.setState({selected_id:U}),u=U,$()}else if(y.key==="ArrowUp"){y.preventDefault();let E=b[Math.max(T-1,0)],D=E?E.getAttribute("data-issue-id"):"",U=D||null;s&&U&&s.setState({selected_id:U}),u=U,$()}else if(y.key==="Enter"){y.preventDefault();let E=b[T],D=E?E.getAttribute("data-issue-id"):"";if(D){let U=t||(Z=>window.location.hash=Z),W=s?s.getState().view:"issues";U(Ze(W,D))}}}),s&&(f=s.subscribe(y=>{if(y.selected_id!==u&&(u=y.selected_id,a("selected %s",u||"(none)"),$()),y.filters&&typeof y.filters=="object"){let _=y.filters.status,b=y.filters.search||"",T=typeof y.filters.type=="string"?y.filters.type:"",E=!1;if(_!==l){l=_,O();return}b!==o&&(o=b,E=!0),T!==d&&(d=T,E=!0),E&&$()}})),S&&S.subscribe(()=>{try{p=S.selectIssuesFor("tab:issues"),$()}catch{}}),{load:O,destroy(){r.replaceChildren(),f&&(f(),f=null)}}}function gs(r,e,t){let s=se("views:nav"),n=null;function i(o){return p=>{p.preventDefault(),s("click tab %s",o),t.gotoView(o)}}function a(){let p=e.getState().view||"issues";return L`
|
|
561
578
|
<nav class="header-nav" aria-label="Primary">
|
|
562
579
|
<a
|
|
563
580
|
href="#/issues"
|
|
564
|
-
class="tab ${
|
|
581
|
+
class="tab ${p==="issues"?"active":""}"
|
|
565
582
|
@click=${i("issues")}
|
|
566
583
|
>Issues</a
|
|
567
584
|
>
|
|
568
585
|
<a
|
|
569
586
|
href="#/epics"
|
|
570
|
-
class="tab ${
|
|
587
|
+
class="tab ${p==="epics"?"active":""}"
|
|
571
588
|
@click=${i("epics")}
|
|
572
589
|
>Epics</a
|
|
573
590
|
>
|
|
574
591
|
<a
|
|
575
592
|
href="#/board"
|
|
576
|
-
class="tab ${
|
|
593
|
+
class="tab ${p==="board"?"active":""}"
|
|
577
594
|
@click=${i("board")}
|
|
578
595
|
>Board</a
|
|
579
596
|
>
|
|
580
597
|
</nav>
|
|
581
|
-
`}function
|
|
598
|
+
`}function l(){Ae(a(),r)}return l(),n=e.subscribe(()=>l()),{destroy(){n&&(n(),n=null),Ae(L``,r)}}}function ms(r,e,t,s){let n=document.createElement("dialog");n.id="new-issue-dialog",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.innerHTML=`
|
|
582
599
|
<div class="new-issue__container" part="container">
|
|
583
600
|
<header class="new-issue__header">
|
|
584
601
|
<div class="new-issue__title">New Issue</div>
|
|
@@ -610,12 +627,12 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
|
|
|
610
627
|
</form>
|
|
611
628
|
</div>
|
|
612
629
|
</div>
|
|
613
|
-
`,
|
|
630
|
+
`,r.appendChild(n);let i=n.querySelector("#new-issue-form"),a=n.querySelector("#new-title"),l=n.querySelector("#new-type"),o=n.querySelector("#new-priority"),p=n.querySelector("#new-labels"),d=n.querySelector("#new-description"),u=n.querySelector("#new-issue-error"),f=n.querySelector("#btn-cancel"),m=n.querySelector("#btn-create"),v=n.querySelector(".new-issue__close");function k(){l.replaceChildren();let b=document.createElement("option");b.value="",b.textContent="\u2014 Select \u2014",l.appendChild(b);for(let T of cr){let E=document.createElement("option");E.value=T,E.textContent=dr(T),l.appendChild(E)}o.replaceChildren();for(let T=0;T<=4;T+=1){let E=document.createElement("option");E.value=String(T);let D=Ye[T]||"Medium";E.textContent=`${T} \u2013 ${D}`,o.appendChild(E)}}k();function I(){try{typeof n.close=="function"?n.close():n.removeAttribute("open")}catch{n.removeAttribute("open")}}function S(b){a.disabled=b,l.disabled=b,o.disabled=b,p.disabled=b,d.disabled=b,f.disabled=b,m.disabled=b,m.textContent=b?"Creating\u2026":"Create"}function P(){u.textContent=""}function $(b){u.textContent=b}function C(){try{let b=window.localStorage.getItem("beads-ui.new.type");b?l.value=b:l.value="";let T=window.localStorage.getItem("beads-ui.new.priority");T&&/^\d$/.test(T)?o.value=T:o.value="2"}catch{l.value="",o.value="2"}}function O(){let b=l.value||"",T=o.value||"";b.length>0&&window.localStorage.setItem("beads-ui.new.type",b),T.length>0&&window.localStorage.setItem("beads-ui.new.priority",T)}function y(b){let T=/-(\d+)$/.exec(String(b||""));return T&&T[1]?Number(T[1]):-1}async function _(){P();let b=String(a.value||"").trim();if(b.length===0){$("Title is required"),a.focus();return}let T=Number(o.value||"2");if(!(T>=0&&T<=4)){$("Priority must be 0..4"),o.focus();return}let E=String(l.value||""),D=String(d.value||""),U=String(p.value||"").split(",").map(j=>j.trim()).filter(j=>j.length>0),W={title:b};E.length>0&&(W.type=E),String(T).length>0&&(W.priority=T),D.length>0&&(W.description=D),S(!0);try{await e("create-issue",W)}catch{S(!1),$("Failed to create issue");return}O();let Z=null;try{Z=await e("list-issues",{filters:{status:"open",limit:50}})}catch{Z=null}let K="";if(Array.isArray(Z)){let j=Z.filter(re=>String(re.title||"")===b);if(j.length>0){let re=j[0];for(let ie of j){let he=y(re.id||"");y(ie.id||"")>he&&(re=ie)}K=String(re.id||"")}}if(K&&U.length>0)for(let j of U)try{await e("label-add",{id:K,label:j})}catch{}if(K){try{t.gotoIssue(K)}catch{}try{s&&s.setState({selected_id:K})}catch{}}S(!1),I()}return n.addEventListener("cancel",b=>{b.preventDefault(),I()}),v.addEventListener("click",()=>I()),f.addEventListener("click",()=>I()),n.addEventListener("keydown",b=>{b.key==="Enter"&&(b.ctrlKey||b.metaKey)&&(b.preventDefault(),_())}),i.addEventListener("submit",b=>{b.preventDefault(),_()}),{open(){i.reset(),P(),C();try{"showModal"in n&&typeof n.showModal=="function"?n.showModal():n.setAttribute("open","")}catch{n.setAttribute("open","")}setTimeout(()=>{try{a.focus()}catch{}},0)},close(){I()}}}var bs=["list-issues","update-status","edit-text","update-priority","create-issue","list-ready","dep-add","dep-remove","epic-status","update-assignee","label-add","label-remove","subscribe-list","unsubscribe-list","snapshot","upsert","delete"];function Zr(){let r=Date.now().toString(36),e=Math.random().toString(36).slice(2,8);return`${r}-${e}`}function ys(r,e,t=Zr()){return{id:t,type:r,payload:e}}function ws(r={}){let e=se("ws"),t={initialMs:r.backoff?.initialMs??1e3,maxMs:r.backoff?.maxMs??3e4,factor:r.backoff?.factor??2,jitterRatio:r.backoff?.jitterRatio??.2},s=()=>r.url&&r.url.length>0?r.url:typeof location<"u"?(location.protocol==="https:"?"wss://":"ws://")+location.host+"/ws":"ws://localhost/ws",n=null,i="closed",a=0,l=null,o=!0,p=new Map,d=[],u=new Map,f=new Set;function m(C){for(let O of Array.from(f))try{O(C)}catch{}}function v(){if(!o||l)return;i="reconnecting",e("ws reconnecting\u2026"),m(i);let C=Math.min(t.maxMs||0,(t.initialMs||0)*Math.pow(t.factor||1,a)),O=(t.jitterRatio||0)*C,y=Math.max(0,Math.round(C+(Math.random()*2-1)*O));e("ws retry in %d ms (attempt %d)",y,a+1),l=setTimeout(()=>{l=null,$()},y)}function k(C){try{n?.send(JSON.stringify(C))}catch(O){e("ws send failed",O)}}function I(){for(i="open",e("ws open"),m(i),a=0;d.length;){let C=d.shift();C&&k(C)}}function S(C){let O;try{O=JSON.parse(String(C.data))}catch{e("ws received non-JSON message");return}if(!O||typeof O.id!="string"||typeof O.type!="string"){e("ws received invalid envelope");return}if(p.has(O.id)){let _=p.get(O.id);p.delete(O.id),O.ok?_?.resolve(O.payload):_?.reject(O.error||new Error("ws error"));return}let y=u.get(O.type);if(y&&y.size>0)for(let _ of Array.from(y))try{_(O.payload)}catch(b){e("ws event handler error",b)}else e("ws received unhandled message type: %s",O.type)}function P(){i="closed",e("ws closed"),m(i);for(let[C,O]of p.entries())O.reject(new Error("ws disconnected")),p.delete(C);a+=1,v()}function $(){if(!o)return;let C=s();try{n=new WebSocket(C),e("ws connecting %s",C),i="connecting",m(i),n.addEventListener("open",I),n.addEventListener("message",S),n.addEventListener("error",()=>{}),n.addEventListener("close",P)}catch(O){e("ws connect failed %o",O),v()}}return $(),{send(C,O){if(!bs.includes(C))return Promise.reject(new Error(`unknown message type: ${C}`));let y=Zr(),_=ys(C,O,y);return e("send %s id=%s",C,y),new Promise((b,T)=>{p.set(y,{resolve:b,reject:T,type:C}),n&&n.readyState===n.OPEN?k(_):(e("queue %s id=%s (state=%s)",C,y,i),d.push(_))})},on(C,O){u.has(C)||u.set(C,new Set);let y=u.get(C);return y?.add(O),()=>{y?.delete(O)}},onConnection(C){return f.add(C),()=>{f.delete(C)}},close(){o=!1,l&&(clearTimeout(l),l=null);try{n?.close()}catch{}},getState(){return i}}}function no(r){let e=se("main");e("bootstrap start");let t=L`
|
|
614
631
|
<section id="issues-root" class="route issues">
|
|
615
632
|
<aside id="list-panel" class="panel"></aside>
|
|
616
633
|
</section>
|
|
617
634
|
<section id="epics-root" class="route epics" hidden></section>
|
|
618
635
|
<section id="board-root" class="route board" hidden></section>
|
|
619
636
|
<section id="detail-panel" class="route detail" hidden></section>
|
|
620
|
-
`;Ae(r
|
|
637
|
+
`;Ae(t,r);let s=document.getElementById("top-nav"),n=document.getElementById("issues-root"),i=document.getElementById("epics-root"),a=document.getElementById("board-root"),l=document.getElementById("list-panel"),o=document.getElementById("detail-panel");if(l&&n&&i&&a&&o){let k=function(x,g){let w="Request failed",z="";if(x&&typeof x=="object"){let ce=x;if(typeof ce.message=="string"&&ce.message.length>0&&(w=ce.message),typeof ce.details=="string")z=ce.details;else if(ce.details&&typeof ce.details=="object")try{z=JSON.stringify(ce.details,null,2)}catch{z=""}}else typeof x=="string"&&x.length>0&&(w=x);let le=g&&g.length>0?`Failed to load ${g}`:"Request failed";v.open(le,w,z)},Ee=function(x){let g=String(x?.status||"all");return g==="ready"?{type:"ready-issues"}:g==="in_progress"?{type:"in-progress-issues"}:g==="closed"?{type:"closed-issues"}:{type:"all-issues"}},He=function(x){if(x.view==="issues"){let g=Ee(x.filters||{}),w=JSON.stringify(g);try{$.register("tab:issues",g)}catch(z){e("register issues store failed: %o",z)}(!ge||w!==Be)&&P.subscribeList("tab:issues",g).then(z=>{ge=z,Be=w}).catch(z=>{e("subscribe issues failed: %o",z),k(z,"issues list")})}else if(ge){ge().catch(()=>{}),ge=null,Be=null;try{$.unregister("tab:issues")}catch(g){e("unregister issues store failed: %o",g)}}if(x.view==="epics"){try{$.register("tab:epics",{type:"epics"})}catch(g){e("register epics store failed: %o",g)}P.subscribeList("tab:epics",{type:"epics"}).then(g=>{ee=g}).catch(g=>{e("subscribe epics failed: %o",g),k(g,"epics")})}else if(ee){ee().catch(()=>{}),ee=null;try{$.unregister("tab:epics")}catch(g){e("unregister epics store failed: %o",g)}}if(x.view==="board"){if(!Ce){try{$.register("tab:board:ready",{type:"ready-issues"})}catch(g){e("register board:ready store failed: %o",g)}P.subscribeList("tab:board:ready",{type:"ready-issues"}).then(g=>Ce=g).catch(g=>{e("subscribe board ready failed: %o",g),k(g,"board (Ready)")})}if(!X){try{$.register("tab:board:in-progress",{type:"in-progress-issues"})}catch(g){e("register board:in-progress store failed: %o",g)}P.subscribeList("tab:board:in-progress",{type:"in-progress-issues"}).then(g=>X=g).catch(g=>{e("subscribe board in-progress failed: %o",g),k(g,"board (In Progress)")})}if(!Te){try{$.register("tab:board:closed",{type:"closed-issues"})}catch(g){e("register board:closed store failed: %o",g)}P.subscribeList("tab:board:closed",{type:"closed-issues"}).then(g=>Te=g).catch(g=>{e("subscribe board closed failed: %o",g),k(g,"board (Closed)")})}if(!Re){try{$.register("tab:board:blocked",{type:"blocked-issues"})}catch(g){e("register board:blocked store failed: %o",g)}P.subscribeList("tab:board:blocked",{type:"blocked-issues"}).then(g=>Re=g).catch(g=>{e("subscribe board blocked failed: %o",g),k(g,"board (Blocked)")})}}else{if(Ce){Ce().catch(()=>{}),Ce=null;try{$.unregister("tab:board:ready")}catch(g){e("unregister board:ready failed: %o",g)}}if(X){X().catch(()=>{}),X=null;try{$.unregister("tab:board:in-progress")}catch(g){e("unregister board:in-progress failed: %o",g)}}if(Te){Te().catch(()=>{}),Te=null;try{$.unregister("tab:board:closed")}catch(g){e("unregister board:closed failed: %o",g)}}if(Re){Re().catch(()=>{}),Re=null;try{$.unregister("tab:board:blocked")}catch(g){e("unregister board:blocked failed: %o",g)}}}};var p=k,d=Ee,u=He;let f=document.getElementById("header-loading"),m=$n(f),v=ps(r),I=ws(),S=m.wrapSend((x,g)=>I.send(x,g)),P=An(S),$=Sn();I.on("snapshot",x=>{let g=x,w=g&&typeof g.id=="string"?g.id:"",z=w?$.getStore(w):null;if(z&&g&&g.type==="snapshot")try{z.applyPush(g)}catch{}}),I.on("upsert",x=>{let g=x,w=g&&typeof g.id=="string"?g.id:"",z=w?$.getStore(w):null;if(z&&g&&g.type==="upsert")try{z.applyPush(g)}catch{}}),I.on("delete",x=>{let g=x,w=g&&typeof g.id=="string"?g.id:"",z=w?$.getStore(w):null;if(z&&g&&g.type==="delete")try{z.applyPush(g)}catch{}});let C=We($),O=!1;if(typeof I.onConnection=="function"){let x=g=>{e("ws state %s",g),g==="reconnecting"||g==="closed"?(O=!0,be("Connection lost. Reconnecting\u2026","error",4e3)):g==="open"&&O&&(O=!1,be("Reconnected","success",2200))};I.onConnection(x)}let y={status:"all",search:"",type:""};try{let x=window.localStorage.getItem("beads-ui.filters");if(x){let g=JSON.parse(x);if(g&&typeof g=="object"){let w=["bug","feature","task","epic","chore"],z="";if(typeof g.type=="string"&&w.includes(g.type))z=g.type;else if(Array.isArray(g.types)){let le="";for(let ce of g.types)if(w.includes(String(ce))){le=ce;break}z=le}y={status:["all","open","in_progress","closed","ready"].includes(g.status)?g.status:"all",search:typeof g.search=="string"?g.search:"",type:z}}}}catch(x){e("filters parse error: %o",x)}let _="issues";try{let x=window.localStorage.getItem("beads-ui.view");(x==="issues"||x==="epics"||x==="board")&&(_=x)}catch(x){e("view parse error: %o",x)}let b={closed_filter:"today"};try{let x=window.localStorage.getItem("beads-ui.board");if(x){let g=JSON.parse(x);if(g&&typeof g=="object"){let w=String(g.closed_filter||"today");(w==="today"||w==="3"||w==="7")&&(b.closed_filter=w)}}}catch(x){e("board prefs parse error: %o",x)}let T=En({filters:y,view:_,board:b}),E=Tn(T);E.start();let D=async(x,g)=>{try{return await S(x,g)}catch{return[]}};s&&gs(s,T,E);let U=ms(r,(x,g)=>S(x,g),E,T);try{let x=document.getElementById("new-issue-btn");x&&x.addEventListener("click",()=>U.open())}catch{}let Z=hs(l,async(x,g)=>{if(x==="list-issues")try{return C.selectIssuesFor("tab:issues")}catch(w){return e("list selectors failed: %o",w),[]}return D(x,g)},x=>{let g=Vt(x);g&&E.gotoIssue(g)},T,P,$);T.subscribe(x=>{let g={status:x.filters.status,search:x.filters.search,type:typeof x.filters.type=="string"?x.filters.type:""};window.localStorage.setItem("beads-ui.filters",JSON.stringify(g))}),T.subscribe(x=>{window.localStorage.setItem("beads-ui.board",JSON.stringify({closed_filter:x.board.closed_filter}))}),Z.load();let K=fs(o,T,()=>{let x=T.getState();T.setState({selected_id:null});try{let g=x.view||"issues";E.gotoView(g)}catch{}}),j=null;j=ds(K.getMount(),D,x=>{let g=Vt(x);g&&E.gotoIssue(g)},$);let re=T.getState().selected_id;if(re){o.hidden=!1,K.open(re),j&&j.load(re);let x=`detail:${re}`,g={type:"issue-detail",params:{id:re}};try{$.register(x,g)}catch(w){e("register detail store failed: %o",w)}P.subscribeList(x,g).catch(w=>{e("detail subscribe failed: %o",w),k(w,"issue details")})}let ie=null;T.subscribe(x=>{let g=x.selected_id;if(g){o.hidden=!1,K.open(g),j&&j.load(g);let w=`detail:${g}`,z={type:"issue-detail",params:{id:g}};try{$.register(w,z)}catch{}P.subscribeList(w,z).then(le=>{ie&&ie().catch(()=>{}),ie=le}).catch(le=>{e("detail subscribe failed: %o",le),k(le,"issue details")})}else{try{K.close()}catch{}j&&j.clear(),o.hidden=!0,ie&&(ie().catch(()=>{}),ie=null)}});let he=vn(D),ue=us(i,he,x=>E.gotoIssue(x),P,$),B=Rn(a,he,x=>E.gotoIssue(x),T,P,$),ge=null,ee=null,Ce=null,X=null,Te=null,Re=null,Be=null,Xe=x=>{n&&i&&a&&o&&(n.hidden=x.view!=="issues",i.hidden=x.view!=="epics",a.hidden=x.view!=="board"),He(x),!x.selected_id&&x.view==="epics"&&ue.load(),!x.selected_id&&x.view==="board"&&B.load(),window.localStorage.setItem("beads-ui.view",x.view)};T.subscribe(Xe),Xe(T.getState()),window.addEventListener("keydown",x=>{let g=x.ctrlKey||x.metaKey,w=String(x.key||"").toLowerCase(),z=x.target,le=z&&z.tagName?String(z.tagName).toLowerCase():"",ce=le==="input"||le==="textarea"||le==="select"||z&&typeof z.isContentEditable=="boolean"&&z.isContentEditable;g&&w==="n"&&(ce||(x.preventDefault(),U.open()))})}}typeof window<"u"&&typeof document<"u"&&window.addEventListener("DOMContentLoaded",()=>{try{let t=window.localStorage.getItem("beads-ui.theme"),s=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,n=t==="dark"||t==="light"?t:s?"dark":"light";document.documentElement.setAttribute("data-theme",n);let i=document.getElementById("theme-switch");i&&(i.checked=n==="dark")}catch{}let r=document.getElementById("theme-switch");r&&r.addEventListener("change",()=>{let t=r.checked?"dark":"light";document.documentElement.setAttribute("data-theme",t),window.localStorage.setItem("beads-ui.theme",t)});let e=document.getElementById("app");e&&no(e)});export{no as bootstrap};
|
|
621
638
|
//# sourceMappingURL=main.bundle.js.map
|