dev-process-kit 0.4.2 → 0.4.4

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.
Files changed (38) hide show
  1. package/README.md +1 -0
  2. package/dist/boards.js +1 -1
  3. package/dist/chunks/shared-B3ddPOb7.js +1 -0
  4. package/dist/chunks/shared-BEcs-9nd.js +6077 -0
  5. package/dist/chunks/{shared-CHQBlCl0.js → shared-BIODquqM.js} +4 -4
  6. package/dist/chunks/{shared-D2fmf6zb.js → shared-BZ0Y7lDS.js} +41 -41
  7. package/dist/chunks/{shared-CMWEqwI3.js → shared-BncKaYRX.js} +1 -1
  8. package/dist/chunks/{shared-D1ZujbZA.js → shared-BqjrIOYm.js} +54 -54
  9. package/dist/chunks/shared-CaQMHNzp.js +3 -0
  10. package/dist/chunks/shared-Cd0znWBB.js +3545 -0
  11. package/dist/chunks/shared-Cuc_13rI.js +7378 -0
  12. package/dist/chunks/shared-D2yn0bY8.js +1883 -0
  13. package/dist/chunks/{shared-4JaCIu01.js → shared-D5_ZJTgh.js} +152 -46
  14. package/dist/chunks/shared-DDIKBRRU.js +1 -0
  15. package/dist/chunks/{shared-D0_BoWj3.js → shared-DbfVyq_3.js} +18 -18
  16. package/dist/chunks/{shared-D80rPPNF.js → shared-Dha4GwGq.js} +3 -3
  17. package/dist/chunks/shared-GVsZCCAa.js +4954 -0
  18. package/dist/chunks/{shared-C-ujfGnT.js → shared-IlpAgOtF.js} +1 -1
  19. package/dist/chunks/{shared-SjAP9bK0.js → shared-M5nBQyzE.js} +4 -4
  20. package/dist/chunks/{shared-DErYmK9C.js → shared-lNnnWUPH.js} +14 -14
  21. package/dist/components.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/sync.js +1 -1
  24. package/dist/views/delegation-poker.js +1 -1
  25. package/dist/views/plain.js +1 -1
  26. package/dist/views/prototype.js +1 -1
  27. package/dist/views/slides.js +1 -1
  28. package/dist/views/task-board.js +1 -1
  29. package/dist/views/usm.js +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunks/shared-CJZKj_HI.js +0 -3
  32. package/dist/chunks/shared-CsLKVrK7.js +0 -6912
  33. package/dist/chunks/shared-DPD_cXES.js +0 -1883
  34. package/dist/chunks/shared-HkbNG84_.js +0 -1
  35. package/dist/chunks/shared-JOvfFoxb.js +0 -3645
  36. package/dist/chunks/shared-KHA87RsJ.js +0 -3360
  37. package/dist/chunks/shared-_0Ev6y6i.js +0 -5357
  38. package/dist/chunks/shared-lVXxL9i3.js +0 -1
@@ -1,3645 +0,0 @@
1
- import{v as f,M as _a,j as h,q as K,E as we,H as Je,n as Se,x as _e,L as St,P as Ia,F as Et,N as Aa,m as Ma,B as _,w,k as F,h as Y,C as R,d as b,s as $t,o as g,e as ee,D as V,g as La,p as Da,b as Ra,f as k}from"./shared-CJZKj_HI.js";import{b2 as Tt,ap as Ie,_ as Oa,L as I,ay as O,a4 as q,ag as l,a5 as u,a6 as Z,a7 as Ae,a8 as Qe,k as J,al as B,aq as Q,B as et,O as Na,a3 as xt,ai as _t,i as Ca,av as Me,aN as Ba,aO as Ya,aQ as Ua,u as It,at as Le,A as Pa,b3 as At,b4 as za,aH as De,b5 as Fa,t as tt,aI as Va,V as Mt,aj as Lt,ak as st,au as Ga,ao as Ha,b6 as Ka}from"./shared-_0Ev6y6i.js";import{h as qa,d as Re,l as Dt,a as Rt}from"./shared-D80rPPNF.js";import{a as Ot,c as Wa}from"./shared-D0_BoWj3.js";import{w as Nt,C as Ct,h as Bt,q as Yt,r as Ut,g as Pt,a as ja,x as Xa}from"./shared-DErYmK9C.js";import{L as Za}from"./shared-CjW1DhGL.js";import{o as Oe}from"./shared-lVXxL9i3.js";const Ja=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],Qa=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7"}]],en=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9"}]],tn=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"}],["circle",{cx:"12",cy:"12",r:"10"}]],sn=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],an=[["circle",{cx:"12",cy:"12",r:"10"}]],nn=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],on=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],rn=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]],dn=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}]],ln=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}],["path",{d:"M9 18h6"}],["path",{d:"M10 22h4"}]],pn=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]],cn=[["circle",{cx:"6",cy:"19",r:"3"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15"}],["circle",{cx:"18",cy:"5",r:"3"}]],un=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}]],mn=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]],zt=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),at=(e,t,s)=>{const a=zt(e),n=new Set,i=[...a.get(t)??[]];for(;i.length>0;){const o=i.pop();if(!(o===void 0||n.has(o))){if(o===s)return!0;n.add(o),i.push(...a.get(o)??[])}}return!1},hn=e=>{const t=zt(e),s=new Set,a=(n,i)=>{const o=i.indexOf(n);if(o>=0)return[...i.slice(o),n];if(s.has(n))return null;for(const r of t.get(n)??[]){const d=a(r,[...i,n]);if(d)return d}return s.add(n),null};for(const n of e){const i=a(n.id,[]);if(i)return i}return null},Ne=["gray","blue","violet","green","amber","accent"],Ft=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],Ce=["estimates","assignees"],Vt=["stories","points","weighted"],Gt=f(h(),Ia(),St(e=>{const[t=0,s=0,a=0]=e.split("-").map(Number),n=new Date(Date.UTC(t,s-1,a));return n.getUTCMonth()===s-1&&n.getUTCDate()===a},"a due date must be a calendar day")),Ht=f(Se(),Je(),we(0)),nt=f(Se(),Je(),we(0)),Kt=K({milestoneId:_(f(h(),w(1))),statusId:_(f(h(),w(1))),stories:f(Se(),Et(),we(0)),points:f(Se(),Je(),we(0))}),Be=f(h(),_a()),bn=K({id:f(h(),w(1)),name:f(h(),w(1)),questions:Ie}),gn=K({id:R,name:f(h(),w(1)),actor:_(h()),steps:F(Y(bn),[]),questions:Ie}),fn=K({id:f(h(),w(1)),name:f(h(),w(1)),timeframe:_(h()),description:_(h()),dueDate:_(Gt),questions:Ie}),ae=_e(Ne),it=_e(Ft),ot=qa,yn=K({url:ot,label:_(f(h(),w(1)))}),vn=K({id:R,name:f(h(),w(1)),tone:F(ae),icon:F(it),weight:_(Ht)}),kn=K({id:R,name:f(h(),w(1)),tone:F(ae)}),qt=f(h(),St(e=>e.trim()!=="","a comment needs some text")),wn=K({id:R,body:qt,createdAt:_(Be)}),Wt=f(Se(),Et(),we(1)),Sn=K({id:R,number:_(Wt),name:f(h(),w(1)),description:_(h()),activityId:f(h(),w(1)),stepId:f(h(),w(1)),milestoneId:_(h()),statusId:_(h()),links:_(Y(yn)),labelIds:_(Y(f(h(),w(1)))),blockedBy:_(Y(f(h(),w(1)))),estimateId:_(f(h(),w(1))),assigneeId:_(f(h(),w(1))),comments:_(Y(wn)),questions:Ie}),En=K({id:R,name:f(h(),w(1)),tone:F(ae)}),jt=_e(Ce),Xt=_e(Vt),$n=K({id:R,name:f(h(),w(1)),points:nt}),Tn=K({id:R,at:Be,tally:Y(Kt)}),xn=K({title:_(h()),features:F(Y(jt),[]),measure:_(Xt),doneStatusId:_(f(h(),w(1))),activities:F(Y(gn),[]),milestones:F(Y(fn),[]),statuses:F(Y(vn),[]),labels:F(Y(kn),[]),members:F(Y(En),[]),estimates:F(Y($n),[]),stories:F(Y(Sn),[]),snapshots:F(Y(Tn),[])}),rt=e=>Ne[e%Ne.length]??"gray",Ye=e=>rt(e+1),Zt=e=>{const t=Ma(xn,e);if(new Set(t.features).size!==t.features.length)throw new Error("the base turns a feature on twice");const s=t.statuses[0]?.id,a=t.stories.flatMap(c=>c.number===void 0?[]:[c.number]),n=a.find((c,x)=>a.indexOf(c)!==x);if(n!==void 0)throw new Error(`two stories share the number ${n}`);let i=Math.max(0,...a);const o={...t,stories:t.stories.map(c=>({...c,number:c.number??++i,...s===void 0||c.statusId!==void 0?{}:{statusId:s}})),statuses:t.statuses.map((c,x)=>({...c,tone:c.tone??rt(x),icon:c.icon??"progress"})),labels:t.labels.map((c,x)=>({...c,tone:c.tone??Ye(x)})),members:t.members.map((c,x)=>({...c,tone:c.tone??Ye(x)})),features:Ce.filter(c=>t.features.includes(c))},r=new Map;for(const c of o.activities)for(const x of c.steps)r.set(x.id,c.id);const d=new Set(o.milestones.map(c=>c.id)),p=new Set(o.statuses.map(c=>c.id)),m=new Set(o.labels.map(c=>c.id));if(o.doneStatusId!==void 0&&!p.has(o.doneStatusId))throw new Error(`the base references unknown doneStatusId "${o.doneStatusId}"`);const y=new Set,E=(c,x)=>{if(y.has(x))throw new Error(`duplicate id "${x}" in ${c}`);y.add(x)};for(const c of o.activities){E("activities",c.id);for(const x of c.steps)E("steps",x.id)}for(const c of o.milestones)E("milestones",c.id);for(const c of o.statuses)E("statuses",c.id);for(const c of o.labels)E("labels",c.id);for(const c of o.members)E("members",c.id);for(const c of o.estimates)E("estimates",c.id);for(const c of o.snapshots)E("snapshots",c.id);const S=new Set(o.estimates.map(c=>c.id)),A=new Set(o.members.map(c=>c.id));for(const c of o.stories){E("stories",c.id);for(const ke of c.comments??[])E("story comments",ke.id);const x=r.get(c.stepId);if(x===void 0||x!==c.activityId)throw new Error(`story "${c.id}" references unknown activityId/stepId`);if(c.milestoneId!==void 0&&!d.has(c.milestoneId))throw new Error(`story "${c.id}" references unknown milestoneId "${c.milestoneId}"`);const ye=(c.links??[]).map(ke=>ke.url);if(new Set(ye).size!==ye.length)throw new Error(`story "${c.id}" links the same URL twice`);if(c.statusId!==void 0&&!p.has(c.statusId))throw new Error(`story "${c.id}" references unknown statusId "${c.statusId}"`);const ve=c.labelIds??[];if(new Set(ve).size!==ve.length)throw new Error(`story "${c.id}" has a label twice`);const wt=ve.find(ke=>!m.has(ke));if(wt!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${wt}"`);if(c.estimateId!==void 0&&!S.has(c.estimateId))throw new Error(`story "${c.id}" references unknown estimateId "${c.estimateId}"`);if(c.assigneeId!==void 0&&!A.has(c.assigneeId))throw new Error(`story "${c.id}" references unknown assigneeId "${c.assigneeId}"`)}for(const c of o.snapshots){const x=Jt(o,c.tally);if(x!==null)throw new Error(`snapshot "${c.id}" ${x}`)}const $=new Set(o.stories.map(c=>c.id));for(const c of o.stories){const x=c.blockedBy??[];if(x.includes(c.id))throw new Error(`story "${c.id}" is blocked by itself`);if(new Set(x).size!==x.length)throw new Error(`story "${c.id}" has a blocker twice`);const ye=x.find(ve=>!$.has(ve));if(ye!==void 0)throw new Error(`story "${c.id}" references unknown blocker "${ye}"`)}const L=hn(o.stories);if(L!==null)throw new Error(`stories block one another in a cycle: ${L.join(" \u2192 ")}`);return o},Jt=(e,t)=>{const s=new Set;for(const a of t){if(a.milestoneId!==void 0&&!U(e,a.milestoneId))return`references unknown milestoneId "${a.milestoneId}"`;if(a.statusId!==void 0&&!D(e,a.statusId))return`references unknown statusId "${a.statusId}"`;const n=Ue(a);if(s.has(n))return`tallies "${n}" twice`;s.add(n)}return null},Ue=e=>`${e.milestoneId??""}/${e.statusId??""}`,dt=()=>({features:[],activities:[],milestones:[],statuses:[],labels:[],members:[],estimates:[],stories:[],snapshots:[]}),te=(e,t)=>{if(t!==void 0)return e.activities.find(s=>s.id===t)},ce=(e,t)=>`${e}.${t}`,N=(e,t)=>{if(t===void 0)return;const s=Aa(t,2);if(s){const[a,n]=s;if(a===void 0||n===void 0)return;const i=e.activities.find(r=>r.id===a),o=i?.steps.find(r=>r.id===n);return i&&o?{activity:i,step:o}:void 0}if(!t.includes("."))for(const a of e.activities){const n=a.steps.find(i=>i.id===t);if(n)return{activity:a,step:n}}},U=(e,t)=>{if(t!==void 0)return e.milestones.find(s=>s.id===t)},D=(e,t)=>{if(t!==void 0)return e.statuses.find(s=>s.id===t)},X=(e,t)=>{if(t!==void 0)return e.labels.find(s=>s.id===t)},P=(e,t)=>e.features.includes(t),G=(e,t)=>{if(t!==void 0)return e.members.find(s=>s.id===t)},lt=(e,t)=>G(e,t.assigneeId),z=(e,t)=>{if(t!==void 0)return e.estimates.find(s=>s.id===t)},Ee=(e,t)=>{if(t!==void 0)return e.snapshots.find(s=>s.id===t)},pt=(e,t)=>{const s=new Set(t.labelIds??[]);return e.labels.filter(a=>s.has(a.id))},T=(e,t)=>{if(t!==void 0)return e.stories.find(s=>s.id===t)},Pe=e=>e.activities.flatMap(t=>t.steps.map(s=>({activity:t,step:s}))),_n=e=>({...e,stories:Tt(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),ze=(e,t,s)=>e.stories.filter(a=>a.stepId===t&&(a.milestoneId??void 0)===s),Qt=(e,t,s)=>e.stories.filter(a=>a.activityId===t&&(a.milestoneId??void 0)===s),W=e=>[...e.activities.map(t=>t.id),...e.activities.flatMap(t=>t.steps.map(s=>s.id)),...e.milestones.map(t=>t.id),...e.statuses.map(t=>t.id),...e.labels.map(t=>t.id),...e.members.map(t=>t.id),...e.estimates.map(t=>t.id),...e.stories.map(t=>t.id),...e.stories.flatMap(t=>(t.comments??[]).map(s=>s.id)),...e.snapshots.map(t=>t.id)],es=(e,t)=>e.stories.filter(s=>s.stepId===t).length,ts=g({feature:jt,enabled:La()}),v={SET_ACTIVITY_NAME:b("SET_ACTIVITY_NAME","activity",g({name:f(h(),w(1))})),SET_ACTIVITY_ACTOR:b("SET_ACTIVITY_ACTOR","activity",g({actor:h()})),SET_STEP_NAME:b("SET_STEP_NAME","step",g({name:f(h(),w(1))})),REORDER_STEP:b("REORDER_STEP","step",g({after:V(h())}),{mode:"sequence"}),REORDER_ACTIVITY:b("REORDER_ACTIVITY","activity",g({after:V(h())}),{mode:"sequence"}),ADD_ACTIVITY:b("ADD_ACTIVITY","page",g({id:R,name:f(h(),w(1))}),{dedupeKey:ee}),ADD_STEP:b("ADD_STEP","activity",g({id:R,name:f(h(),w(1))}),{dedupeKey:ee}),DELETE_ACTIVITY:b("DELETE_ACTIVITY","activity",g({})),DELETE_STEP:b("DELETE_STEP","step",g({})),SET_STORY_NAME:b("SET_STORY_NAME","story",g({name:f(h(),w(1))})),SET_STORY_DESCRIPTION:b("SET_STORY_DESCRIPTION","story",g({description:h()})),SET_STORY_MILESTONE:b("SET_STORY_MILESTONE","story",g({milestoneId:V(h())})),MOVE_STORY:b("MOVE_STORY","story",g({activityId:f(h(),w(1)),stepId:f(h(),w(1)),milestoneId:V(h()),after:V(h())}),{mode:"sequence"}),REORDER_STORY:b("REORDER_STORY","story",g({after:V(h())}),{mode:"sequence"}),ADD_STORY:b("ADD_STORY","step",g({id:R,name:f(h(),w(1)),activityId:f(h(),w(1)),milestoneId:_(h()),number:_(Wt)}),{dedupeKey:ee}),DELETE_STORY:b("DELETE_STORY","story",g({})),ADD_STORY_LINK:b("ADD_STORY_LINK","story",g({url:ot,label:_(f(h(),w(1)))})),REMOVE_STORY_LINK:b("REMOVE_STORY_LINK","story",g({url:h()})),ADD_STORY_COMMENT:b("ADD_STORY_COMMENT","story",g({id:R,body:qt,createdAt:_(Be)}),{dedupeKey:ee}),DELETE_STORY_COMMENT:b("DELETE_STORY_COMMENT","story",g({commentId:f(h(),w(1))})),SET_STORY_STATUS:b("SET_STORY_STATUS","story",g({statusId:f(h(),w(1))})),SET_MILESTONE_NAME:b("SET_MILESTONE_NAME","milestone",g({name:f(h(),w(1))})),ADD_MILESTONE:b("ADD_MILESTONE","page",g({id:R,name:f(h(),w(1))}),{dedupeKey:ee}),DELETE_MILESTONE:b("DELETE_MILESTONE","milestone",g({})),REORDER_MILESTONE:b("REORDER_MILESTONE","milestone",g({after:V(h())}),{mode:"sequence"}),SET_MILESTONE_DUE_DATE:b("SET_MILESTONE_DUE_DATE","milestone",g({dueDate:V(Gt)})),ADD_STATUS:b("ADD_STATUS","page",g({id:R,name:f(h(),w(1)),tone:ae,icon:_(it)}),{dedupeKey:ee}),SET_STATUS_NAME:b("SET_STATUS_NAME","status",g({name:f(h(),w(1))})),SET_STATUS_TONE:b("SET_STATUS_TONE","status",g({tone:ae})),SET_STATUS_ICON:b("SET_STATUS_ICON","status",g({icon:it})),SET_STATUS_WEIGHT:b("SET_STATUS_WEIGHT","status",g({weight:Ht})),SET_MEASURE:b("SET_MEASURE","page",g({measure:Xt})),SET_DONE_STATUS:b("SET_DONE_STATUS","status",g({})),DELETE_STATUS:b("DELETE_STATUS","status",g({})),REORDER_STATUS:b("REORDER_STATUS","status",g({after:V(h())}),{mode:"sequence"}),ADD_LABEL:b("ADD_LABEL","page",g({id:R,name:f(h(),w(1)),tone:ae}),{dedupeKey:ee}),SET_LABEL_NAME:b("SET_LABEL_NAME","label",g({name:f(h(),w(1))})),SET_LABEL_TONE:b("SET_LABEL_TONE","label",g({tone:ae})),DELETE_LABEL:b("DELETE_LABEL","label",g({})),REORDER_LABEL:b("REORDER_LABEL","label",g({after:V(h())}),{mode:"sequence"}),ADD_STORY_LABEL:b("ADD_STORY_LABEL","story",g({labelId:f(h(),w(1))})),REMOVE_STORY_LABEL:b("REMOVE_STORY_LABEL","story",g({labelId:f(h(),w(1))})),ADD_STORY_BLOCKER:b("ADD_STORY_BLOCKER","story",g({blockerId:f(h(),w(1))})),REMOVE_STORY_BLOCKER:b("REMOVE_STORY_BLOCKER","story",g({blockerId:f(h(),w(1))})),ADD_MEMBER:b("ADD_MEMBER","page",g({id:R,name:f(h(),w(1)),tone:ae}),{dedupeKey:ee}),SET_MEMBER_NAME:b("SET_MEMBER_NAME","member",g({name:f(h(),w(1))})),SET_MEMBER_TONE:b("SET_MEMBER_TONE","member",g({tone:ae})),DELETE_MEMBER:b("DELETE_MEMBER","member",g({})),REORDER_MEMBER:b("REORDER_MEMBER","member",g({after:V(h())}),{mode:"sequence"}),SET_STORY_ASSIGNEE:b("SET_STORY_ASSIGNEE","story",g({memberId:V(f(h(),w(1)))})),ADD_ESTIMATE:b("ADD_ESTIMATE","page",g({id:R,name:f(h(),w(1)),points:nt}),{dedupeKey:ee}),SET_ESTIMATE_NAME:b("SET_ESTIMATE_NAME","estimate",g({name:f(h(),w(1))})),SET_ESTIMATE_POINTS:b("SET_ESTIMATE_POINTS","estimate",g({points:nt})),DELETE_ESTIMATE:b("DELETE_ESTIMATE","estimate",g({})),REORDER_ESTIMATE:b("REORDER_ESTIMATE","estimate",g({after:V(h())}),{mode:"sequence"}),SET_STORY_ESTIMATE:b("SET_STORY_ESTIMATE","story",g({estimateId:V(f(h(),w(1)))})),RECORD_SNAPSHOT:b("RECORD_SNAPSHOT","page",g({id:R,at:Be,tally:Y(Kt)}),{dedupeKey:ee}),DELETE_SNAPSHOT:b("DELETE_SNAPSHOT","snapshot",g({})),SET_FEATURE:b("SET_FEATURE","page",ts,{dedupeKey:e=>{const t=$t(ts,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},In={setActivityName:(e,t)=>({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:e},payload:{name:t}}),setStepName:(e,t)=>({type:"SET_STEP_NAME",target:{type:"step",id:e},payload:{name:t}})},be=e=>{const t=e.statuses.findIndex(s=>s.id===e.doneStatusId);return t>=0?t:e.statuses.length-1},ss=e=>e.statuses[be(e)],as=(e,t)=>{if(t===void 0)return!1;const s=e.statuses.findIndex(a=>a.id===t);return s>=0&&s>=be(e)},ns=e=>e.statuses.slice(0,be(e)+1),An=(e,t)=>e.milestones.find(s=>s.id===t.milestone)??e.milestones.find(s=>s.dueDate!==void 0)??e.milestones[0],ge=e=>P(e,"estimates")?e.measure??(e.estimates.length>0?"points":"stories"):"stories",is=e=>e.weight??1,se=10,os=e=>{const{statuses:t}=e,s=be(e);if(ge(e)!=="weighted")return t.map((o,r)=>r<s?1:0);const a=t.slice(0,s).map(is),n=Fe(a),i=a.map(o=>n>0?o/n:1/a.length);return t.map((o,r)=>Fe(i.slice(r)))},Mn=1,rs=(e,t)=>z(e,t.estimateId)?.points??Mn,ds=e=>{const t=new Map;for(const n of e.stories){const i={...n.milestoneId===void 0?{}:{milestoneId:n.milestoneId},...n.statusId===void 0?{}:{statusId:n.statusId}},o=Ue(i),r=t.get(o)??{...i,stories:0,points:0};t.set(o,{...r,stories:r.stories+1,points:r.points+rs(e,n)})}const s=[...e.milestones.map(n=>n.id),void 0],a=e.statuses.length===0?[void 0]:e.statuses.map(n=>n.id);return s.flatMap(n=>a.flatMap(i=>{const o=t.get(Ue({milestoneId:n,statusId:i}));return o?[o]:[]}))},Ln=(e,t,s)=>{const a=ge(e),i=[...Tt(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:s,tally:ds(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:Dn(e.statuses,d.tally,t,a)})),o=os(e),r=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:Rn(e.milestones.find(d=>d.id===t)?.dueDate),combined:i.map(d=>r(d,d.values.reduce((p,m,y)=>p+m*(o[y]??0),0))),byStatus:e.statuses.slice(1).map((d,p)=>({status:d,points:i.map(m=>r(m,Fe(m.values.slice(0,p+1))))}))}},Dn=(e,t,s,a)=>e.map(n=>Fe(t.filter(i=>i.milestoneId===s&&i.statusId===n.id).map(i=>a==="stories"?i.stories:i.points))),Rn=e=>{if(e===void 0)return null;const[t=0,s=1,a=1]=e.split("-").map(Number);return new Date(t,s-1,a,23,59,59).getTime()},ue=e=>{const t=new Date(e),s=a=>String(a).padStart(2,"0");return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}`},Fe=e=>e.reduce((t,s)=>t+s,0),ls="STORY-",de=e=>`${ls}${e.number}`,ps=(...e)=>Math.max(0,...e.flatMap(t=>t.stories.map(s=>s.number)))+1,On=(e,t)=>{if(t===void 0)return;const s=T(e,t);if(s)return s;const a=new RegExp(`^${ls}([1-9]\\d*)$`,"i").exec(t.trim());if(!a)return;const n=Number(a[1]);return e.stories.find(i=>i.number===n)},cs=(e,t)=>{const s=Da(v,t);if(s===null)return null;const a=s.target.id;switch(s.type){case"SET_ACTIVITY_NAME":{const{name:n}=s.payload;return e.activities.some(i=>i.id===a)?{...e,activities:e.activities.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_ACTIVITY_ACTOR":{const n=s.payload.actor.trim();return e.activities.some(i=>i.id===a)?{...e,activities:e.activities.map(i=>{if(i.id!==a)return i;const{actor:o,...r}=i;return n===""?r:{...r,actor:n}})}:null}case"SET_STEP_NAME":{const{name:n}=s.payload,i=N(e,a);return i?{...e,activities:e.activities.map(o=>o.id===i.activity.id?{...o,steps:o.steps.map(r=>r.id===i.step.id?{...r,name:n}:r)}:o)}:null}case"REORDER_STEP":{const{after:n}=s.payload,i=N(e,a);if(!i)return null;const o=n===null?null:N(e,n);if(n!==null&&(!o||o.activity.id!==i.activity.id))return null;const r=me(i.activity.steps,i.step.id,o?.step.id??null);return r===null?null:{...e,activities:e.activities.map(d=>d.id===i.activity.id?{...d,steps:r}:d)}}case"REORDER_ACTIVITY":{const{after:n}=s.payload,i=me(e.activities,a,n);return i===null?null:{...e,activities:i}}case"ADD_ACTIVITY":{const n=s.payload;return e.activities.some(i=>i.id===n.id)?e:{...e,activities:[...e.activities,{id:n.id,name:n.name,steps:[]}]}}case"ADD_STEP":{const n=s.payload,i=e.activities.find(o=>o.id===a);return i?i.steps.some(o=>o.id===n.id)?e:{...e,activities:e.activities.map(o=>o.id===a?{...o,steps:[...o.steps,{id:n.id,name:n.name}]}:o)}:null}case"DELETE_ACTIVITY":{const n=e.activities.find(o=>o.id===a);if(!n)return null;const i=new Set(n.steps.map(o=>o.id));return ut({...e,activities:e.activities.filter(o=>o.id!==a)},o=>o.activityId===a||i.has(o.stepId))}case"DELETE_STEP":{const n=N(e,a);return n?ut({...e,activities:e.activities.map(i=>i.id===n.activity.id?{...i,steps:i.steps.filter(o=>o.id!==n.step.id)}:i)},i=>i.activityId===n.activity.id&&i.stepId===n.step.id):null}case"SET_STORY_NAME":{const{name:n}=s.payload;return H(e,a,i=>({...i,name:n}))}case"SET_STORY_DESCRIPTION":{const{description:n}=s.payload;return H(e,a,i=>({...i,description:n}))}case"SET_STORY_MILESTONE":{const{milestoneId:n}=s.payload;return n!==null&&!U(e,n)?null:H(e,a,i=>n===null?ct(i):{...i,milestoneId:n})}case"MOVE_STORY":{const n=s.payload,i=T(e,a);if(!i)return null;const o=N(e,n.stepId);if(!o||o.activity.id!==n.activityId||n.milestoneId!==null&&!U(e,n.milestoneId))return null;const r=n.milestoneId??void 0,d=r===void 0?{...ct(i),activityId:o.activity.id,stepId:o.step.id}:{...i,activityId:o.activity.id,stepId:o.step.id,milestoneId:r};return hs(e,d,n.after)}case"REORDER_STORY":{const{after:n}=s.payload,i=T(e,a);return i?hs(e,i,n,!0):null}case"ADD_STORY":{const n=s.payload,i=N(e,t.target.id);if(!i||i.activity.id!==n.activityId||n.milestoneId!==void 0&&!U(e,n.milestoneId))return null;if(e.stories.some(d=>d.id===n.id))return e;const o=n.number!==void 0&&e.stories.some(d=>d.number===n.number),r={id:n.id,number:n.number===void 0||o?ps(e):n.number,name:n.name,activityId:n.activityId,stepId:i.step.id,...n.milestoneId===void 0?{}:{milestoneId:n.milestoneId},...e.statuses[0]===void 0?{}:{statusId:e.statuses[0].id}};return{...e,stories:[...e.stories,r]}}case"DELETE_STORY":return e.stories.some(n=>n.id===a)?ut(e,n=>n.id===a):null;case"ADD_STORY_LINK":{const{url:n,label:i}=s.payload,o=T(e,a);if(!o)return null;if(o.links?.some(d=>d.url===n))return e;const r=i===void 0?{url:n}:{url:n,label:i};return H(e,a,d=>({...d,links:[...d.links??[],r]}))}case"REMOVE_STORY_LINK":{const{url:n}=s.payload;return T(e,a)?.links?.some(o=>o.url===n)?H(e,a,o=>{const r=(o.links??[]).filter(m=>m.url!==n),{links:d,...p}=o;return r.length===0?p:{...p,links:r}}):null}case"ADD_STORY_COMMENT":{const{id:n,body:i,createdAt:o}=s.payload,r=T(e,a);if(!r)return null;if(r.comments?.some(p=>p.id===n))return e;if(W(e).includes(n))return null;const d=o===void 0?{id:n,body:i}:{id:n,body:i,createdAt:o};return H(e,a,p=>({...p,comments:[...p.comments??[],d]}))}case"DELETE_STORY_COMMENT":{const{commentId:n}=s.payload;return T(e,a)?.comments?.some(o=>o.id===n)?H(e,a,o=>{const r=(o.comments??[]).filter(m=>m.id!==n),{comments:d,...p}=o;return r.length===0?p:{...p,comments:r}}):null}case"SET_STORY_STATUS":{const{statusId:n}=s.payload;return D(e,n)?H(e,a,i=>({...i,statusId:n})):null}case"SET_MILESTONE_NAME":{const{name:n}=s.payload;return e.milestones.some(i=>i.id===a)?{...e,milestones:e.milestones.map(i=>i.id===a?{...i,name:n}:i)}:null}case"ADD_MILESTONE":{const n=s.payload;return e.milestones.some(i=>i.id===n.id)?e:{...e,milestones:[...e.milestones,{id:n.id,name:n.name}]}}case"DELETE_MILESTONE":return e.milestones.some(n=>n.id===a)?{...e,milestones:e.milestones.filter(n=>n.id!==a),stories:e.stories.map(n=>n.milestoneId===a?ct(n):n),snapshots:mt(e,n=>n.milestoneId===a?le(n,"milestoneId"):n)}:null;case"REORDER_MILESTONE":{const{after:n}=s.payload,i=me(e.milestones,a,n);return i===null?null:{...e,milestones:i}}case"SET_MILESTONE_DUE_DATE":{const{dueDate:n}=s.payload;return U(e,a)?{...e,milestones:e.milestones.map(i=>i.id!==a?i:n===null?le(i,"dueDate"):{...i,dueDate:n})}:null}case"ADD_STATUS":{const{id:n,name:i,tone:o,icon:r}=s.payload;if(e.statuses.some(p=>p.id===n))return e;const d=[...e.statuses,{id:n,name:i,tone:o,icon:r??"progress"}];return e.statuses.length===0?{...e,statuses:d,stories:e.stories.map(p=>({...p,statusId:n})),snapshots:mt(e,p=>({...p,statusId:n}))}:{...e,statuses:d}}case"SET_STATUS_NAME":{const{name:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_STATUS_TONE":{const{tone:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,tone:n}:i)}:null}case"SET_STATUS_ICON":{const{icon:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,icon:n}:i)}:null}case"SET_STATUS_WEIGHT":{const{weight:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,weight:n}:i)}:null}case"SET_MEASURE":{const{measure:n}=s.payload;return ge(e)===n?e:{...e,measure:n}}case"SET_DONE_STATUS":return D(e,a)?e.doneStatusId===a?e:{...e,doneStatusId:a}:null;case"DELETE_STATUS":{if(!D(e,a))return null;const n=e.statuses.filter(o=>o.id!==a),i=n[0]?.id;return{...e.doneStatusId===a?le(e,"doneStatusId"):e,statuses:n,stories:e.stories.map(o=>o.statusId!==a?o:i===void 0?Nn(o):{...o,statusId:i}),snapshots:mt(e,o=>o.statusId!==a?o:i===void 0?le(o,"statusId"):{...o,statusId:i})}}case"REORDER_STATUS":{const{after:n}=s.payload,i=me(e.statuses,a,n);return i===null?null:{...e,statuses:i}}case"ADD_LABEL":{const{id:n,name:i,tone:o}=s.payload;return X(e,n)?e:{...e,labels:[...e.labels,{id:n,name:i,tone:o}]}}case"SET_LABEL_NAME":{const{name:n}=s.payload;return X(e,a)?{...e,labels:e.labels.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_LABEL_TONE":{const{tone:n}=s.payload;return X(e,a)?{...e,labels:e.labels.map(i=>i.id===a?{...i,tone:n}:i)}:null}case"DELETE_LABEL":return X(e,a)?{...e,labels:e.labels.filter(n=>n.id!==a),stories:e.stories.map(n=>n.labelIds?.includes(a)?us(n,a):n)}:null;case"REORDER_LABEL":{const{after:n}=s.payload,i=me(e.labels,a,n);return i===null?null:{...e,labels:i}}case"ADD_STORY_LABEL":{const{labelId:n}=s.payload,i=T(e,a);return!i||!X(e,n)?null:i.labelIds?.includes(n)?e:H(e,a,o=>({...o,labelIds:[...o.labelIds??[],n]}))}case"REMOVE_STORY_LABEL":{const{labelId:n}=s.payload;return T(e,a)?.labelIds?.includes(n)?H(e,a,i=>us(i,n)):null}case"ADD_STORY_BLOCKER":{const{blockerId:n}=s.payload,i=T(e,a);return!i||!T(e,n)?null:i.blockedBy?.includes(n)?e:n===a||at(e.stories,n,a)?null:H(e,a,o=>({...o,blockedBy:[...o.blockedBy??[],n]}))}case"REMOVE_STORY_BLOCKER":{const{blockerId:n}=s.payload;return T(e,a)?.blockedBy?.includes(n)?H(e,a,i=>ms(i,new Set([n]))):null}case"ADD_MEMBER":{const{id:n,name:i,tone:o}=s.payload;return G(e,n)?e:{...e,members:[...e.members,{id:n,name:i,tone:o}]}}case"SET_MEMBER_NAME":{const{name:n}=s.payload;return G(e,a)?{...e,members:e.members.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_MEMBER_TONE":{const{tone:n}=s.payload;return G(e,a)?{...e,members:e.members.map(i=>i.id===a?{...i,tone:n}:i)}:null}case"DELETE_MEMBER":return G(e,a)?{...e,members:e.members.filter(n=>n.id!==a),stories:e.stories.map(n=>n.assigneeId===a?le(n,"assigneeId"):n)}:null;case"REORDER_MEMBER":{const{after:n}=s.payload,i=me(e.members,a,n);return i===null?null:{...e,members:i}}case"SET_STORY_ASSIGNEE":{const{memberId:n}=s.payload;return n!==null&&!G(e,n)?null:H(e,a,i=>n===null?le(i,"assigneeId"):{...i,assigneeId:n})}case"ADD_ESTIMATE":{const{id:n,name:i,points:o}=s.payload;return z(e,n)?e:{...e,estimates:[...e.estimates,{id:n,name:i,points:o}]}}case"SET_ESTIMATE_NAME":{const{name:n}=s.payload;return z(e,a)?{...e,estimates:e.estimates.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_ESTIMATE_POINTS":{const{points:n}=s.payload;return z(e,a)?{...e,estimates:e.estimates.map(i=>i.id===a?{...i,points:n}:i)}:null}case"DELETE_ESTIMATE":return z(e,a)?{...e,estimates:e.estimates.filter(n=>n.id!==a),stories:e.stories.map(n=>n.estimateId===a?le(n,"estimateId"):n)}:null;case"REORDER_ESTIMATE":{const{after:n}=s.payload,i=me(e.estimates,a,n);return i===null?null:{...e,estimates:i}}case"SET_STORY_ESTIMATE":{const{estimateId:n}=s.payload;return n!==null&&!z(e,n)?null:H(e,a,i=>n===null?le(i,"estimateId"):{...i,estimateId:n})}case"RECORD_SNAPSHOT":{const{id:n,at:i,tally:o}=s.payload;return Ee(e,n)?e:Jt(e,o)!==null?null:{...e,snapshots:[...e.snapshots,{id:n,at:i,tally:o}]}}case"DELETE_SNAPSHOT":return Ee(e,a)?{...e,snapshots:e.snapshots.filter(n=>n.id!==a)}:null;case"SET_FEATURE":{const{feature:n,enabled:i}=s.payload;if(e.features.includes(n)===i)return e;const o=Ce.filter(r=>r===n?i:e.features.includes(r));return{...e,features:o}}default:return Ra(s)}},H=(e,t,s)=>e.stories.some(a=>a.id===t)?{...e,stories:e.stories.map(a=>a.id===t?s(a):a)}:null,ct=e=>{const{milestoneId:t,...s}=e;return s},us=(e,t)=>{const{labelIds:s=[],...a}=e,n=s.filter(i=>i!==t);return n.length===0?a:{...a,labelIds:n}},ms=(e,t)=>{const{blockedBy:s=[],...a}=e,n=s.filter(i=>!t.has(i));return n.length===0?a:{...a,blockedBy:n}},ut=(e,t)=>{const s=new Set(e.stories.filter(t).map(a=>a.id));return{...e,stories:e.stories.filter(a=>!s.has(a.id)).map(a=>a.blockedBy?.some(n=>s.has(n))?ms(a,s):a)}},le=(e,t)=>{const{[t]:s,...a}=e;return a},mt=(e,t)=>e.snapshots.map(s=>{const a=new Map;for(const n of s.tally.map(t)){const i=Ue(n),o=a.get(i);a.set(i,o?{...o,stories:o.stories+n.stories,points:o.points+n.points}:n)}return{...s,tally:[...a.values()]}}),Nn=e=>{const{statusId:t,...s}=e;return s},hs=(e,t,s,a=!1)=>{const n=t.milestoneId??void 0,i=e.stories.filter(S=>S.id!==t.id),o=i.filter(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n);if(s!==null){const S=i.find(A=>A.id===s);if(!S||S.stepId!==t.stepId||(S.milestoneId??void 0)!==n)return null;if(a){const A=T(e,t.id);if(!A||S.stepId!==A.stepId||(S.milestoneId??void 0)!==(A.milestoneId??void 0))return null}}const r=s===null?[t,...o]:bs(o,t,s),d=i.findIndex(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n),p=new Set(o.map(S=>S.id)),m=i.filter(S=>!p.has(S.id)),y=d<0?m.length:Math.min(d,m.length),E=[...m.slice(0,y),...r,...m.slice(y)];return{...e,stories:E}},me=(e,t,s)=>{if(!e.some(i=>i.id===t)||s!==null&&!e.some(i=>i.id===s))return null;if(s===t)return[...e];const a=e.find(i=>i.id===t);if(a===void 0)return null;const n=e.filter(i=>i.id!==t);return bs(n,a,s)},bs=(e,t,s)=>{const a=[...e],n=s===null?-1:a.findIndex(i=>i.id===s);return a.splice(n+1,0,t),a},ne=Oa({en:{renameActivity:"Rename activity",changeActivityActor:"Change whose experience",renameStep:"Rename step",reorderStep:"Reorder step",reorderActivity:"Reorder activity group",addActivity:"Add activity",addStep:"Add step",deleteActivity:"Delete activity",deleteStep:"Delete step",renameStory:"Rename story",updateStoryDescription:"Update story description",changeMilestone:"Change milestone",moveStory:"Move story",reorderStory:"Reorder story",addStory:"Add story",deleteStory:"Delete story",renameMilestone:"Rename milestone",addMilestone:"Add milestone",deleteMilestone:"Delete milestone",reorderMilestone:"Reorder milestone",changeStoryStatus:"Change story status",addStatus:"Add status",renameStatus:"Rename status",changeStatusTone:"Change status color",changeStatusIcon:"Change status icon",addStoryLink:"Link to story",removeStoryLink:"Unlink from story",addStoryComment:"Comment on story",deleteStoryComment:"Delete story comment",deleteStatus:"Delete status",reorderStatus:"Reorder status",addLabel:"Add label",renameLabel:"Rename label",changeLabelTone:"Change label color",deleteLabel:"Delete label",reorderLabel:"Reorder label",addStoryLabel:"Label story",removeStoryLabel:"Unlabel story",addStoryBlocker:"Make story wait on",removeStoryBlocker:"Stop story waiting on",changeMilestoneDueDate:"Change milestone due date",changeStatusWeight:"Change status weight",setDoneStatus:"Change done status",addEstimate:"Add estimate",renameEstimate:"Rename estimate",changeEstimatePoints:"Change estimate points",deleteEstimate:"Delete estimate",reorderEstimate:"Reorder estimate",setStoryEstimate:"Estimate story",recordSnapshot:"Record burndown snapshot",deleteSnapshot:"Delete burndown snapshot",toValue:e=>`\u2192 \u201C${e}\u201D`,fromTo:(e,t)=>`\u201C${e}\u201D \u2192 \u201C${t}\u201D`,added:e=>`+ \u201C${e}\u201D`,removed:e=>`\u2212 \u201C${e}\u201D`,toFront:"\u2192 To the front",afterName:e=>`\u2192 Right after \u201C${e}\u201D`,toUnassigned:"\u2192 Unassigned",toName:e=>`\u2192 ${e}`,snapshotSummary:(e,t)=>`${e} \xB7 ${t===1?"1 story":`${t} stories`}`,activityGroup:"Activity",stepGroup:"Step",storyGroup:"Story",milestoneGroup:"Milestone",statusGroup:"Status",labelGroup:"Label",estimateGroup:"Estimate",snapshotGroup:"Snapshot",mapGroup:"Map",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"Whole map",unassigned:"Unassigned",emptyTitle:"No backbone yet",emptyBody:"Add activities and steps, and the story map appears here.",firstActivityButton:"+ First activity",groupingLabel:"Group by",groupViewTab:"Activity group",groupAxisHeader:"Activity group \u2192",activityAxis:"Activity \u2192",milestoneAxis:"Milestone \u2193",stepNameLabel:"Step name",activityNameLabel:"Activity name",milestoneNameLabel:"Milestone name",addStepAria:"Add a step to this activity",newActivityButton:"+ Activity",newMilestoneButton:"+ Milestone",addCellButton:"+ Add",addStoryCellAria:"Add a story to this cell",storyCount:e=>e===1?"1 story":`${e} stories`,pageTabsLabel:"Page",mapTab:"User Story Mapping",tableTab:"Table",milestonesTab:"Milestones",burndownTab:"Burndown",statusesSection:"Statuses",labelsSection:"Labels",membersSection:"Members",shareOfStories:e=>`${e}% of all stories`,coverageLabel:"Backbone coverage",coverage:(e,t)=>`${e} / ${t} steps`,storiesLabel:"Stories",timeframeUnset:"Timing not set",milestoneNoDescription:"No description yet.",noMilestonesTitle:"No milestones yet",noMilestonesBody:"Add a milestone to slice the map into releases.",commentCountAria:e=>e===1?"1 comment":`${e} comments`,reviewCountAria:e=>e===1?"1 review comment":`${e} review comments`,statusNameLabel:"Status name",statusToneLabel:"Color",toneName:e=>({gray:"Gray",blue:"Blue",violet:"Violet",green:"Green",amber:"Amber",accent:"Indigo"})[e],statusIconLabel:"Icon",iconName:e=>({progress:"Progress ring",circle:"Circle",lightbulb:"Light bulb",flag:"Flag",play:"Play",clock:"Clock",eye:"Eye",pause:"Pause",check:"Check",x:"Cross"})[e],statusShare:(e,t)=>`${e===1?"1 story":`${e} stories`} \xB7 ${t}%`,filterLabel:"Filter",filterKeyLabel:e=>({status:"Status",label:"Label",estimate:"Estimate",assignee:"Assignee"})[e],filterAll:"All",noLabel:"No label",unestimatedFilter:"Not estimated",clearFilter:"Clear",showFinished:e=>`Show ${e}`,criticalPathButton:"Critical path",criticalPathHint:"Highlight the chain of waiting stories with the most work left, from their estimates and dependencies. If it slips, the whole map slips.",criticalPathCount:e=>e===1?"1 story":`${e} stories`,progressAria:e=>`Progress: ${e}`,activityActorLabel:"Who",noStatusesTitle:"No statuses yet",noStatusesBody:"Add statuses such as Idea / Ready / Done, and the map colors each story by where it stands.",newStatusButton:"+ Status",moveUpAria:"Move up",moveDownAria:"Move down",deleteStatusAria:"Delete this status",doneStatusMark:"Done",doneStatusAria:e=>`Count ${e} as done`,statusWeightLabel:"Status weights",statusWeightHint:"Counts a story partly done by the statuses it has passed.",weightsNeedStatuses:"With two statuses or more before the done one, a story\u2019s work can be shared out between them.",setMeasure:"Change how the work left is measured",weightLineLabel:(e,t)=>`Between ${e} and ${t}`,weightLineValue:(e,t,s,a)=>`${e} ${t}, ${s} ${a}`,labelNameLabel:"Label name",noLabelsTitle:"No labels yet",noLabelsBody:"You can add labels here.",newLabelButton:"+ Label",deleteLabelAria:"Delete this label",burndownMilestoneLabel:"Milestone",dueDateLabel:"Due",noDueDate:"No due date",measureLabel:"Measure by",measureName:e=>({stories:"Stories",points:"Story points",weighted:"Points \xD7 status"})[e],measureSettingsLabel:"Measure settings",recordSnapshotButton:"Record snapshot",recordSnapshotHint:"Keeps today\u2019s totals per milestone and status, so the lines have a point to start from.",combinedChartTitle:e=>e?"Weighted burndown":"Burndown",combinedChartHint:e=>({stories:"The number of stories not done yet.",points:"The points of the stories not done yet.",weighted:"The points of each story \xD7 the share of it the status weights leave ahead."})[e]+" It reaches 0 when every story is done.",statusChartTitle:e=>`Left to reach \u201C${e}\u201D`,statusChartsLabel:"By status",chartNow:"Now",chartToday:"Today",chartDue:"Due",chartIdeal:"Ideal",chartActual:"Actual",chartAbout:"How this chart is counted",axisDate:(e,t)=>gs("en-US",e,t),chartAria:(e,t)=>`${e}: ${t} now`,chartLatest:e=>`Now ${e}`,chartNeedsSnapshot:"Record a snapshot to draw the line from.",snapshotsLabel:"Snapshots",noSnapshots:"No snapshot yet.",deleteSnapshotAria:e=>`Delete the snapshot of ${e}`,noMilestonesForBurndown:"Add a milestone on the Milestones tab to see its burndown.",unestimatedNote:e=>`${e===1?"1 story has":`${e} stories have`} no estimate and count as 1 point each.`,estimatesLabel:"Estimate scale",estimatesHint:"Name and points of each size a story can be estimated at (1, 2, 3 \u2026 or S, M, L).",estimateNameLabel:"Estimate name",estimatePointsLabel:"Points",newEstimateButton:"+ Estimate",deleteEstimateAria:"Delete this estimate",noEstimates:"No estimate scale yet: the burndown counts stories.",moveDialogLabel:"Step to move to",moveDialogSelectLabel:"Destination",moveConfirm:"Move",moveCancel:"Cancel",storyStatusLabel:"Status",panelLabel:e=>`Story: ${e}`,closePanelAria:"Close",copyStoryKey:e=>`Copy ${e}`,storyKeyCopied:"Copied",storyKeyColumn:"Key",copyId:"Copy ID",copyIdTitle:"Copy ID + title",copyStoryInfo:"Copy card as Markdown",copyInfoStep:"Step",copyInfoBlocks:"Blocks",copyInfoWaitsOn:"Waits on",storyTitleLabel:"Title",storyDescriptionLabel:"Description",storyLinksLabel:"Links",storyLabelsLabel:"Labels",storyNoLabels:"No labels yet.",manageLabels:"Manage labels",storyDependenciesLabel:"Dependencies",storyBlockersLabel:"Waits on",storyDependentsLabel:"Holds up",storyNoBlockers:"Nothing to wait on.",storyNoDependents:"No story waits on this one.",addBlockerPlaceholder:"Search for a story to wait on\u2026",addDependentPlaceholder:"Search for a story to wait on this\u2026",noDependencyMatch:"No story matches.",blockerFinished:"Done",removeBlockerAria:e=>`Stop waiting on ${e}`,removeDependentAria:e=>`Stop ${e} waiting on this`,blocksChip:e=>`Blocks ${e}`,waitsChip:e=>`Waits on ${e}`,blocksChipTitle:e=>`${e} ${e===1?"story waits":"stories wait"} on this one`,waitsChipTitle:e=>`Waits on ${e} unfinished ${e===1?"story":"stories"}`,storyEstimateLabel:"Estimate",unestimated:"None",estimateText:(e,t)=>e===String(t)?e:`${e} (${t} pt)`,estimateChipTitle:e=>`Estimate: ${e}`,manageEstimates:"Manage the scale",linkUrlLabel:"URL",addLinkButton:"Add",removeLinkAria:e=>`Remove ${e}`,deleteStoryButton:"Delete story",storyCommentsLabel:"Comments",reviewStoryButton:"Review comment",reviewStoryTitle:"Write a review comment on this story, asking the agent for a change",storyStatusAria:e=>`Status: ${e}`,addMember:"Add member",renameMember:"Rename member",changeMemberTone:"Change member color",deleteMember:"Delete member",reorderMember:"Reorder member",setStoryAssignee:"Assign story",memberGroup:"Member",memberNameLabel:"Member name",noMembersTitle:"No members yet",noMembersBody:"Add the people on the team, then assign each story to the one who takes it on.",newMemberButton:"+ Member",deleteMemberAria:"Delete this member",storyAssigneeLabel:"Assignee",noAssignee:"No one",storyNoMembers:"No members yet.",manageMembers:"Manage members",assigneeChipTitle:e=>`Assigned to ${e}`,noAssigneeFilter:"Unassigned",moreTabsLabel:"More tabs",enableFeature:"Turn on feature",disableFeature:"Turn off feature",featureName:e=>({estimates:"Estimates & burndown",assignees:"Members & assignees"})[e],featureHint:e=>({estimates:"An estimate scale for the stories and a burndown per milestone.",assignees:"The members of the team and who each story is assigned to."})[e],featuresNote:"Turning a feature off only hides it: what it holds is kept.",newActivityName:"New activity",newStepName:"New step",newMilestoneName:"New milestone",newStoryName:"New story",newStatusName:"New status",newLabelName:"New label",newMemberName:"New member",newEstimateName:"New"},ja:{renameActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D\u3092\u5909\u66F4",changeActivityActor:"\u4F53\u9A13\u3059\u308B\u4EBA\u3092\u5909\u66F4",renameStep:"\u30B9\u30C6\u30C3\u30D7\u540D\u3092\u5909\u66F4",reorderStep:"\u30B9\u30C6\u30C3\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",reorderActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",addActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u8FFD\u52A0",addStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",deleteActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u524A\u9664",deleteStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u524A\u9664",renameStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u540D\u3092\u5909\u66F4",updateStoryDescription:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u8AAC\u660E\u3092\u66F4\u65B0",changeMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u5909\u66F4",moveStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u79FB\u52D5",reorderStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",deleteStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",renameMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D\u3092\u5909\u66F4",addMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0",deleteMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u524A\u9664",reorderMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u9806\u5E8F\u3092\u5909\u66F4",changeStoryStatus:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0",renameStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D\u3092\u5909\u66F4",changeStatusTone:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u8272\u3092\u5909\u66F4",changeStatusIcon:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30A2\u30A4\u30B3\u30F3\u3092\u5909\u66F4",addStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30EA\u30F3\u30AF\u3092\u8FFD\u52A0",removeStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30EA\u30F3\u30AF\u3092\u524A\u9664",addStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",deleteStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",reorderStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u9806\u5E8F\u3092\u5909\u66F4",addLabel:"\u30E9\u30D9\u30EB\u3092\u8FFD\u52A0",renameLabel:"\u30E9\u30D9\u30EB\u540D\u3092\u5909\u66F4",changeLabelTone:"\u30E9\u30D9\u30EB\u306E\u8272\u3092\u5909\u66F4",deleteLabel:"\u30E9\u30D9\u30EB\u3092\u524A\u9664",reorderLabel:"\u30E9\u30D9\u30EB\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30E9\u30D9\u30EB\u3092\u4ED8\u4E0E",removeStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30E9\u30D9\u30EB\u3092\u5916\u3059",addStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u8FFD\u52A0",removeStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u5916\u3059",changeMilestoneDueDate:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u671F\u65E5\u3092\u5909\u66F4",changeStatusWeight:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F\u3092\u5909\u66F4",setDoneStatus:"\u5B8C\u4E86\u3068\u3059\u308B\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u8FFD\u52A0",renameEstimate:"\u898B\u7A4D\u3082\u308A\u540D\u3092\u5909\u66F4",changeEstimatePoints:"\u898B\u7A4D\u3082\u308A\u306E\u30DD\u30A4\u30F3\u30C8\u3092\u5909\u66F4",deleteEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u524A\u9664",reorderEstimate:"\u898B\u7A4D\u3082\u308A\u306E\u9806\u5E8F\u3092\u5909\u66F4",setStoryEstimate:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u898B\u7A4D\u3082\u308B",recordSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332",deleteSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u524A\u9664",toValue:e=>`\u2192 \u300C${e}\u300D`,fromTo:(e,t)=>`\u300C${e}\u300D\u2192\u300C${t}\u300D`,added:e=>`+ \u300C${e}\u300D`,removed:e=>`\u2212 \u300C${e}\u300D`,toFront:"\u2192 \u5148\u982D\u3078",afterName:e=>`\u2192 \u300C${e}\u300D\u306E\u76F4\u5F8C\u3078`,toUnassigned:"\u2192 \u672A\u5272\u5F53\u3078",toName:e=>`\u2192 ${e}`,snapshotSummary:(e,t)=>`${e} \xB7 ${t} \u30B9\u30C8\u30FC\u30EA\u30FC`,activityGroup:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",stepGroup:"\u30B9\u30C6\u30C3\u30D7",storyGroup:"\u30B9\u30C8\u30FC\u30EA\u30FC",milestoneGroup:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusGroup:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelGroup:"\u30E9\u30D9\u30EB",estimateGroup:"\u898B\u7A4D\u3082\u308A",snapshotGroup:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8",mapGroup:"\u30DE\u30C3\u30D7",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"\u30DE\u30C3\u30D7\u5168\u4F53",unassigned:"\u672A\u5272\u5F53",emptyTitle:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",emptyBody:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3068\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u3053\u3053\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u30DE\u30C3\u30D7\u304C\u73FE\u308C\u307E\u3059\u3002",firstActivityButton:"+ \u6700\u521D\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",groupingLabel:"\u307E\u3068\u3081\u308B\u5358\u4F4D",groupViewTab:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7",groupAxisHeader:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7 \u2192",activityAxis:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 \u2192",milestoneAxis:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3 \u2193",stepNameLabel:"\u30B9\u30C6\u30C3\u30D7\u540D",activityNameLabel:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D",milestoneNameLabel:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D",addStepAria:"\u3053\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306B\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",newActivityButton:"+ \u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newMilestoneButton:"+ \u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",addCellButton:"+ \u8FFD\u52A0",addStoryCellAria:"\u3053\u306E\u30DE\u30B9\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",storyCount:e=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC`,pageTabsLabel:"\u30DA\u30FC\u30B8",mapTab:"User Story Mapping",tableTab:"\u30C6\u30FC\u30D6\u30EB",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",burndownTab:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",statusesSection:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelsSection:"\u30E9\u30D9\u30EB",membersSection:"\u30E1\u30F3\u30D0\u30FC",shareOfStories:e=>`\u5168\u30B9\u30C8\u30FC\u30EA\u30FC\u306E ${e}%`,coverageLabel:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u306E\u7DB2\u7F85",coverage:(e,t)=>`${e} / ${t} \u30B9\u30C6\u30C3\u30D7`,storiesLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC",timeframeUnset:"\u6642\u671F\u672A\u5B9A",milestoneNoDescription:"\u8AAC\u660E\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",noMilestonesTitle:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noMilestonesBody:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u3092\u30EA\u30EA\u30FC\u30B9\u3054\u3068\u306B\u533A\u5207\u308C\u307E\u3059\u3002",commentCountAria:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,reviewCountAria:e=>`\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,statusNameLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D",statusToneLabel:"\u8272",toneName:e=>({gray:"\u30B0\u30EC\u30FC",blue:"\u9752",violet:"\u7D2B",green:"\u7DD1",amber:"\u9EC4",accent:"\u30A4\u30F3\u30C7\u30A3\u30B4"})[e],statusIconLabel:"\u30A2\u30A4\u30B3\u30F3",iconName:e=>({progress:"\u9032\u6357\u30EA\u30F3\u30B0",circle:"\u5186",lightbulb:"\u96FB\u7403",flag:"\u65D7",play:"\u518D\u751F",clock:"\u6642\u8A08",eye:"\u76EE",pause:"\u4E00\u6642\u505C\u6B62",check:"\u30C1\u30A7\u30C3\u30AF",x:"\u30D0\u30C4"})[e],statusShare:(e,t)=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC \xB7 ${t}%`,filterLabel:"\u30D5\u30A3\u30EB\u30BF\u30FC",filterKeyLabel:e=>({status:"\u30B9\u30C6\u30FC\u30BF\u30B9",label:"\u30E9\u30D9\u30EB",estimate:"\u898B\u7A4D\u3082\u308A",assignee:"\u62C5\u5F53\u8005"})[e],filterAll:"\u3059\u3079\u3066",noLabel:"\u30E9\u30D9\u30EB\u306A\u3057",unestimatedFilter:"\u898B\u7A4D\u3082\u308A\u306A\u3057",clearFilter:"\u30AF\u30EA\u30A2",showFinished:e=>`${e}\u3082\u8868\u793A`,criticalPathButton:"\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u30D1\u30B9",criticalPathHint:"\u898B\u7A4D\u3082\u308A\u3068\u4F9D\u5B58\u95A2\u4FC2\u304B\u3089\u3001\u6B8B\u308A\u306E\u4F5C\u696D\u304C\u6700\u3082\u591A\u3044\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u9023\u306A\u308A\u3092\u5F37\u8ABF\u3057\u307E\u3059\u3002\u3053\u3053\u304C\u9045\u308C\u308B\u3068\u30DE\u30C3\u30D7\u5168\u4F53\u304C\u9045\u308C\u307E\u3059\u3002",criticalPathCount:e=>`${e} \u4EF6`,progressAria:e=>`\u9032\u307F\u5177\u5408: ${e}`,activityActorLabel:"\u8AB0\u306E\u4F53\u9A13",noStatusesTitle:"\u30B9\u30C6\u30FC\u30BF\u30B9\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noStatusesBody:"Idea / Ready / Done \u306E\u3088\u3046\u306A\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u306E\u30AB\u30FC\u30C9\u304C\u9032\u307F\u5177\u5408\u3067\u8272\u5206\u3051\u3055\u308C\u307E\u3059\u3002",newStatusButton:"+ \u30B9\u30C6\u30FC\u30BF\u30B9",moveUpAria:"\u4E0A\u3078\u79FB\u52D5",moveDownAria:"\u4E0B\u3078\u79FB\u52D5",deleteStatusAria:"\u3053\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",doneStatusMark:"\u5B8C\u4E86",doneStatusAria:e=>`${e}\u3092\u5B8C\u4E86\u3068\u3059\u308B`,statusWeightLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F",statusWeightHint:"\u901A\u308A\u904E\u304E\u305F\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u5206\u3060\u3051\u3001\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u9014\u4E2D\u307E\u3067\u9032\u3093\u3060\u3082\u306E\u3068\u3057\u3066\u6570\u3048\u307E\u3059\u3002",weightsNeedStatuses:"\u5B8C\u4E86\u3068\u3059\u308B\u30B9\u30C6\u30FC\u30BF\u30B9\u3088\u308A\u524D\u306B\u30B9\u30C6\u30FC\u30BF\u30B9\u304C 2 \u3064\u4EE5\u4E0A\u3042\u308B\u3068\u3001\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F5C\u696D\u3092\u305D\u306E\u9593\u3067\u5206\u3051\u3089\u308C\u307E\u3059\u3002",setMeasure:"\u6B8B\u308A\u306E\u4F5C\u696D\u91CF\u306E\u8A08\u6E2C\u65B9\u6CD5\u3092\u5909\u66F4",weightLineLabel:(e,t)=>`${e}\u3068${t}\u306E\u5883\u76EE`,weightLineValue:(e,t,s,a)=>`${e} ${t}\u3001${s} ${a}`,labelNameLabel:"\u30E9\u30D9\u30EB\u540D",noLabelsTitle:"\u30E9\u30D9\u30EB\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noLabelsBody:"\u30E9\u30D9\u30EB\u3092\u8FFD\u52A0\u3067\u304D\u307E\u3059\u3002",newLabelButton:"+ \u30E9\u30D9\u30EB",deleteLabelAria:"\u3053\u306E\u30E9\u30D9\u30EB\u3092\u524A\u9664",burndownMilestoneLabel:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",dueDateLabel:"\u671F\u65E5",noDueDate:"\u671F\u65E5\u306A\u3057",measureLabel:"\u8A08\u6E2C\u65B9\u6CD5",measureName:e=>({stories:"\u30B9\u30C8\u30FC\u30EA\u30FC\u6570",points:"\u30B9\u30C8\u30FC\u30EA\u30FC\u30DD\u30A4\u30F3\u30C8",weighted:"\u30DD\u30A4\u30F3\u30C8 \xD7 \u30B9\u30C6\u30FC\u30BF\u30B9"})[e],measureSettingsLabel:"\u8A08\u6E2C\u306E\u8A2D\u5B9A",recordSnapshotButton:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332",recordSnapshotHint:"\u4ECA\u306E\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3 \xD7 \u30B9\u30C6\u30FC\u30BF\u30B9\u3054\u3068\u306E\u96C6\u8A08\u3092\u6B8B\u3057\u3001\u7DDA\u306E\u8D77\u70B9\u306B\u3057\u307E\u3059\u3002",combinedChartTitle:e=>e?"\u91CD\u307F\u4ED8\u304D\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u30C1\u30E3\u30FC\u30C8":"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u30C1\u30E3\u30FC\u30C8",combinedChartHint:e=>({stories:"\u307E\u3060 Done \u3067\u306A\u3044\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u6570\u3002",points:"\u307E\u3060 Done \u3067\u306A\u3044\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30DD\u30A4\u30F3\u30C8\u3002",weighted:"\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30DD\u30A4\u30F3\u30C8 \xD7 \u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F\u3067\u6C7A\u307E\u308B\u6B8B\u308A\u306E\u5272\u5408\u3002"})[e]+"\u3059\u3079\u3066 Done \u306B\u306A\u308B\u3068 0 \u3067\u3059\u3002",statusChartTitle:e=>`\u300C${e}\u300D\u306B\u5C4A\u304F\u307E\u3067\u306E\u6B8B\u308A`,statusChartsLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u5225",chartNow:"\u73FE\u5728",chartToday:"\u4ECA\u65E5",chartDue:"\u671F\u65E5",chartIdeal:"\u7406\u60F3",chartActual:"\u5B9F\u7E3E",chartAbout:"\u3053\u306E\u30C1\u30E3\u30FC\u30C8\u306E\u6570\u3048\u65B9",axisDate:(e,t)=>gs("ja-JP",e,t),chartAria:(e,t)=>`${e}: \u73FE\u5728 ${t}`,chartLatest:e=>`\u73FE\u5728 ${e}`,chartNeedsSnapshot:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332\u3059\u308B\u3068\u7DDA\u304C\u5F15\u304B\u308C\u307E\u3059\u3002",snapshotsLabel:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8",noSnapshots:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",deleteSnapshotAria:e=>`${e} \u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u524A\u9664`,noMilestonesForBurndown:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u30BF\u30D6\u3067\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u305D\u306E\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u304C\u898B\u3089\u308C\u307E\u3059\u3002",unestimatedNote:e=>`${e} \u4EF6\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u306F\u898B\u7A4D\u3082\u308A\u304C\u306A\u304F\u30011 \u4EF6 1 \u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066\u6570\u3048\u3066\u3044\u307E\u3059\u3002`,estimatesLabel:"\u898B\u7A4D\u3082\u308A\u306E\u76EE\u76DB\u308A",estimatesHint:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u4ED8\u3051\u3089\u308C\u308B\u898B\u7A4D\u3082\u308A\u306E\u540D\u524D\u3068\u30DD\u30A4\u30F3\u30C8\uFF081, 2, 3 \u2026 \u3084 S, M, L\uFF09\u3002",estimateNameLabel:"\u898B\u7A4D\u3082\u308A\u540D",estimatePointsLabel:"\u30DD\u30A4\u30F3\u30C8",newEstimateButton:"+ \u898B\u7A4D\u3082\u308A",deleteEstimateAria:"\u3053\u306E\u898B\u7A4D\u3082\u308A\u3092\u524A\u9664",noEstimates:"\u898B\u7A4D\u3082\u308A\u306E\u76EE\u76DB\u308A\u304C\u307E\u3060\u306A\u3044\u305F\u3081\u3001\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306F\u30B9\u30C8\u30FC\u30EA\u30FC\u6570\u3067\u6570\u3048\u307E\u3059\u3002",moveDialogLabel:"\u79FB\u52D5\u5148\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",moveDialogSelectLabel:"\u79FB\u52D5\u5148",moveConfirm:"\u79FB\u52D5\u3059\u308B",moveCancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",storyStatusLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9",panelLabel:e=>`\u30B9\u30C8\u30FC\u30EA\u30FC: ${e}`,closePanelAria:"\u9589\u3058\u308B",copyStoryKey:e=>`${e} \u3092\u30B3\u30D4\u30FC`,storyKeyCopied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",storyKeyColumn:"\u30AD\u30FC",copyId:"ID\u3092\u30B3\u30D4\u30FC",copyIdTitle:"ID + Title \u3092\u30B3\u30D4\u30FC",copyStoryInfo:"\u30AB\u30FC\u30C9\u60C5\u5831\u3092\u30B3\u30D4\u30FC",copyInfoStep:"\u30B9\u30C6\u30C3\u30D7",copyInfoBlocks:"\u30D6\u30ED\u30C3\u30AF",copyInfoWaitsOn:"\u4F9D\u5B58\u5148",storyTitleLabel:"\u30BF\u30A4\u30C8\u30EB",storyDescriptionLabel:"\u8AAC\u660E",storyLinksLabel:"\u30EA\u30F3\u30AF",storyLabelsLabel:"\u30E9\u30D9\u30EB",storyNoLabels:"\u30E9\u30D9\u30EB\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",manageLabels:"\u30E9\u30D9\u30EB\u3092\u7BA1\u7406",storyDependenciesLabel:"\u4F9D\u5B58\u95A2\u4FC2",storyBlockersLabel:"\u4F9D\u5B58\u5148\uFF08\u5148\u306B\u7D42\u3048\u308B\uFF09",storyDependentsLabel:"\u4F9D\u5B58\u5143\uFF08\u3053\u308C\u3092\u5F85\u3064\uFF09",storyNoBlockers:"\u5F85\u3063\u3066\u3044\u308B\u30B9\u30C8\u30FC\u30EA\u30FC\u306F\u3042\u308A\u307E\u305B\u3093\u3002",storyNoDependents:"\u3053\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F85\u3064\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002",addBlockerPlaceholder:"\u4F9D\u5B58\u5148\u3092\u691C\u7D22\u3057\u3066\u8FFD\u52A0\u2026",addDependentPlaceholder:"\u3053\u308C\u3092\u5F85\u3064\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u691C\u7D22\u3057\u3066\u8FFD\u52A0\u2026",noDependencyMatch:"\u4E00\u81F4\u3059\u308B\u30B9\u30C8\u30FC\u30EA\u30FC\u306F\u3042\u308A\u307E\u305B\u3093\u3002",blockerFinished:"\u5B8C\u4E86",removeBlockerAria:e=>`${e} \u3078\u306E\u4F9D\u5B58\u3092\u5916\u3059`,removeDependentAria:e=>`${e} \u304B\u3089\u306E\u4F9D\u5B58\u3092\u5916\u3059`,blocksChip:e=>`${e} \u4EF6\u3092\u30D6\u30ED\u30C3\u30AF`,waitsChip:e=>`${e} \u4EF6\u5F85\u3061`,blocksChipTitle:e=>`${e} \u4EF6\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u304C\u3053\u308C\u3092\u5F85\u3063\u3066\u3044\u307E\u3059`,waitsChipTitle:e=>`\u672A\u5B8C\u4E86\u306E ${e} \u4EF6\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F85\u3063\u3066\u3044\u307E\u3059`,storyEstimateLabel:"\u898B\u7A4D\u3082\u308A",unestimated:"\u306A\u3057",estimateText:(e,t)=>e===String(t)?e:`${e}\uFF08${t} pt\uFF09`,estimateChipTitle:e=>`\u898B\u7A4D\u3082\u308A: ${e}`,manageEstimates:"\u76EE\u76DB\u308A\u3092\u7BA1\u7406",linkUrlLabel:"URL",addLinkButton:"\u8FFD\u52A0",removeLinkAria:e=>`${e} \u3092\u5916\u3059`,deleteStoryButton:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",storyCommentsLabel:"\u30B3\u30E1\u30F3\u30C8",reviewStoryButton:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",reviewStoryTitle:"\u3053\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u3064\u3044\u3066 Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068\u3092\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u306B\u66F8\u304F",storyStatusAria:e=>`\u30B9\u30C6\u30FC\u30BF\u30B9: ${e}`,addMember:"\u30E1\u30F3\u30D0\u30FC\u3092\u8FFD\u52A0",renameMember:"\u30E1\u30F3\u30D0\u30FC\u540D\u3092\u5909\u66F4",changeMemberTone:"\u30E1\u30F3\u30D0\u30FC\u306E\u8272\u3092\u5909\u66F4",deleteMember:"\u30E1\u30F3\u30D0\u30FC\u3092\u524A\u9664",reorderMember:"\u30E1\u30F3\u30D0\u30FC\u306E\u9806\u5E8F\u3092\u5909\u66F4",setStoryAssignee:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u62C5\u5F53\u8005\u3092\u5909\u66F4",memberGroup:"\u30E1\u30F3\u30D0\u30FC",memberNameLabel:"\u30E1\u30F3\u30D0\u30FC\u540D",noMembersTitle:"\u30E1\u30F3\u30D0\u30FC\u304C\u307E\u3060\u3044\u307E\u305B\u3093",noMembersBody:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u8FFD\u52A0\u3057\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F15\u304D\u53D7\u3051\u308B\u4EBA\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002",newMemberButton:"+ \u30E1\u30F3\u30D0\u30FC",deleteMemberAria:"\u3053\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u524A\u9664",storyAssigneeLabel:"\u62C5\u5F53\u8005",noAssignee:"\u306A\u3057",storyNoMembers:"\u30E1\u30F3\u30D0\u30FC\u306F\u307E\u3060\u3044\u307E\u305B\u3093\u3002",manageMembers:"\u30E1\u30F3\u30D0\u30FC\u3092\u7BA1\u7406",assigneeChipTitle:e=>`\u62C5\u5F53: ${e}`,noAssigneeFilter:"\u62C5\u5F53\u8005\u306A\u3057",moreTabsLabel:"\u307B\u304B\u306E\u30BF\u30D6",enableFeature:"\u6A5F\u80FD\u3092\u6709\u52B9\u5316",disableFeature:"\u6A5F\u80FD\u3092\u7121\u52B9\u5316",featureName:e=>({estimates:"\u898B\u7A4D\u3082\u308A\u3068\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",assignees:"\u30E1\u30F3\u30D0\u30FC\u3068\u62C5\u5F53\u8005"})[e],featureHint:e=>({estimates:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u898B\u7A4D\u3082\u308A\u3068\u3001\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3054\u3068\u306E\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u3002",assignees:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3068\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u62C5\u5F53\u8005\u3002"})[e],featuresNote:"\u7121\u52B9\u306B\u3057\u3066\u3082\u96A0\u3059\u3060\u3051\u3067\u3001\u5165\u529B\u3057\u305F\u5185\u5BB9\u306F\u6B8B\u308A\u307E\u3059\u3002",newActivityName:"\u65B0\u3057\u3044\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newStepName:"\u65B0\u3057\u3044\u30B9\u30C6\u30C3\u30D7",newMilestoneName:"\u65B0\u3057\u3044\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",newStoryName:"\u65B0\u3057\u3044\u30B9\u30C8\u30FC\u30EA\u30FC",newStatusName:"\u65B0\u3057\u3044\u30B9\u30C6\u30FC\u30BF\u30B9",newLabelName:"\u65B0\u3057\u3044\u30E9\u30D9\u30EB",newMemberName:"\u65B0\u3057\u3044\u30E1\u30F3\u30D0\u30FC",newEstimateName:"\u65B0\u898F"}}),gs=(e,t,s)=>{const a=new Date(t);switch(s){case"day":case"week":case"biweek":return`${a.getMonth()+1}/${a.getDate()}`;case"month":case"quarter":return new Intl.DateTimeFormat(e,{month:"short",...a.getMonth()===0?{year:"numeric"}:{}}).format(a);case"year":return new Intl.DateTimeFormat(e,{year:"numeric"}).format(a)}},Cn=["map","table","milestones","burndown"],Bn={burndown:"estimates"},fs=e=>Cn.filter(t=>{const s=Bn[t];return s===void 0||P(e,s)}),ys=(e,t)=>fs(e).find(s=>s===t.tab)??"map",$e=(e,t)=>as(e,t.statusId),vs=(e,t)=>{const s=T(e,t)?.blockedBy??[];return{blockers:s,openBlockers:s.filter(a=>{const n=T(e,a);return n!==void 0&&!$e(e,n)}).length,dependents:e.stories.filter(a=>a.blockedBy?.includes(t)).map(a=>a.id)}},Yn=(e,t)=>{const s=new Set(T(e,t)?.blockedBy??[]);return e.stories.filter(a=>a.id!==t&&!s.has(a.id)&&!at(e.stories,a.id,t))},Un=(e,t)=>e.stories.filter(s=>s.id!==t&&!s.blockedBy?.includes(t)&&!at(e.stories,t,s.id)),Pn=["critical-path"],Ve=e=>Pn.find(t=>t===e.highlight)??null,zn=(e,t)=>{if($e(e,t))return 0;const s=ge(e)==="stories"?1:rs(e,t),a=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return s*(os(e)[a]??1)},Fn=(e,t)=>Ve(t)==="critical-path"?ks(e).ids:null,Vn=1e-9,ks=e=>{const t=new Map(e.stories.map(d=>[d.id,zn(e,d)]).filter(([,d])=>d>0)),s=new Map,a=new Map;for(const d of e.stories)if(t.has(d.id))for(const p of d.blockedBy??[])t.has(p)&&(s.set(d.id,[...s.get(d.id)??[],p]),a.set(p,[...a.get(p)??[],d.id]));const n=ws(t,s),i=ws(t,a),o=[...t].map(([d,p])=>[d,n(d)+i(d)-p]),r=Math.max(0,...o.map(([,d])=>d));return{ids:new Set(o.filter(([,d])=>r-d<Vn).map(([d])=>d)),work:r}},ws=(e,t)=>{const s=new Map,a=n=>{const i=s.get(n);if(i!==void 0)return i;const o=(e.get(n)??0)+Math.max(0,...(t.get(n)??[]).map(a));return s.set(n,o),o};return a},Te=["status","label","estimate","assignee"],ie="~none",oe={key:"done",value:"show"},Ss=(e,t)=>t[oe.key]===oe.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(s=>as(e,s.id)).map(s=>s.id)),fe=(e,t)=>{switch(t){case"status":return e.statuses.map(s=>s.id);case"label":return e.labels.length===0?[]:[...e.labels.map(s=>s.id),ie];case"estimate":return!P(e,"estimates")||e.estimates.length===0?[]:[...e.estimates.map(s=>s.id),ie];case"assignee":return!P(e,"assignees")||e.members.length===0?[]:[...e.members.map(s=>s.id),ie]}},Ge=(e,t)=>{const s=Ss(e,t),a=n=>{const i=t[n];if(i===void 0||i==="")return new Set;const o=new Set(i.split(","));return new Set(fe(e,n).filter(r=>o.has(r)&&!s.has(r)))};return{status:a("status"),label:a("label"),estimate:a("estimate"),assignee:a("assignee"),hiddenStatusIds:s}},Es=(e,t,s)=>{const a=fe(e,t).filter(n=>s.has(n));return a.length===0?null:a.join(",")},Gn=(e,t)=>{const s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s},Hn=e=>Te.some(t=>e[t].size>0),$s=(e,t)=>{const s=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&He(e.status,t.statusId===void 0?[]:[t.statusId])&&He(e.label,s.length===0?[ie]:s)&&He(e.estimate,[t.estimateId??ie])&&He(e.assignee,[t.assigneeId??ie])},He=(e,t)=>e.size===0||t.some(s=>e.has(s)),C=(e,t,s)=>{const a=typeof s=="string"?s:"",n=typeof t=="string"?t:void 0;return n===void 0?e.toValue(a):e.fromTo(n,a)},pe=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,Kn={SET_ACTIVITY_NAME:(e,t,s)=>({title:e.renameActivity,tone:"update",body:C(e,te(s,t.target.id)?.name,k(v.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,s)=>{const a=k(v.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:a===""?e.removed(te(s,t.target.id)?.actor??""):C(e,te(s,t.target.id)?.actor,a)}},SET_STEP_NAME:(e,t,s)=>({title:e.renameStep,tone:"update",body:C(e,N(s,t.target.id)?.step.name,k(v.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:pe(e,k(v.REORDER_STEP,t).after)}),REORDER_ACTIVITY:(e,t,s)=>{const a=k(v.REORDER_ACTIVITY,t).after;return{title:e.reorderActivity,tone:"move",body:pe(e,a===null?null:te(s,a)?.name??a)}},ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(k(v.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(k(v.ADD_STEP,t).name??""))}),DELETE_ACTIVITY:(e,t,s)=>({title:e.deleteActivity,tone:"delete",body:e.removed(te(s,t.target.id)?.name??t.target.id)}),DELETE_STEP:(e,t,s)=>({title:e.deleteStep,tone:"delete",body:e.removed(N(s,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,s)=>({title:e.renameStory,tone:"update",body:C(e,T(s,t.target.id)?.name,k(v.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(k(v.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,s)=>{const a=k(v.SET_STORY_MILESTONE,t).milestoneId;return{title:e.changeMilestone,tone:"move",body:a==null?e.toUnassigned:e.toName(U(s,String(a))?.name??String(a))}},MOVE_STORY:(e,t,s)=>({title:e.moveStory,tone:"move",body:e.toName(N(s,String(k(v.MOVE_STORY,t).stepId))?.step.name??String(k(v.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:pe(e,k(v.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(k(v.ADD_STORY,t).name??""))}),DELETE_STORY:(e,t,s)=>({title:e.deleteStory,tone:"delete",body:e.removed(T(s,t.target.id)?.name??t.target.id)}),SET_MILESTONE_NAME:(e,t,s)=>({title:e.renameMilestone,tone:"update",body:C(e,U(s,t.target.id)?.name,k(v.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(k(v.ADD_MILESTONE,t).name??""))}),DELETE_MILESTONE:(e,t,s)=>({title:e.deleteMilestone,tone:"delete",body:e.removed(U(s,t.target.id)?.name??t.target.id)}),REORDER_MILESTONE:(e,t)=>({title:e.reorderMilestone,tone:"move",body:pe(e,k(v.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:s,label:a}=k(v.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(a??Re(s).title)}},REMOVE_STORY_LINK:(e,t,s)=>{const{url:a}=k(v.REMOVE_STORY_LINK,t),n=T(s,t.target.id)?.links?.find(i=>i.url===a);return{title:e.removeStoryLink,tone:"delete",body:e.removed(n?.label??Re(a).title)}},ADD_STORY_COMMENT:(e,t)=>({title:e.addStoryComment,tone:"create",body:e.added(k(v.ADD_STORY_COMMENT,t).body)}),DELETE_STORY_COMMENT:(e,t,s)=>{const{commentId:a}=k(v.DELETE_STORY_COMMENT,t),n=T(s,t.target.id)?.comments?.find(i=>i.id===a);return{title:e.deleteStoryComment,tone:"delete",body:e.removed(n?.body??a)}},SET_STORY_STATUS:(e,t,s)=>{const a=k(v.SET_STORY_STATUS,t).statusId;return{title:e.changeStoryStatus,tone:"update",body:e.toName(D(s,a)?.name??a)}},ADD_STATUS:(e,t)=>({title:e.addStatus,tone:"create",body:e.added(k(v.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,s)=>({title:e.renameStatus,tone:"update",body:C(e,D(s,t.target.id)?.name,k(v.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,s)=>{const a=D(s,t.target.id)?.tone,n=k(v.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:C(e,a===void 0?void 0:e.toneName(a),e.toneName(n))}},SET_STATUS_ICON:(e,t,s)=>{const a=D(s,t.target.id)?.icon,n=k(v.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:C(e,a===void 0?void 0:e.iconName(a),e.iconName(n))}},DELETE_STATUS:(e,t,s)=>({title:e.deleteStatus,tone:"delete",body:e.removed(D(s,t.target.id)?.name??t.target.id)}),REORDER_STATUS:(e,t)=>({title:e.reorderStatus,tone:"move",body:pe(e,k(v.REORDER_STATUS,t).after)}),ADD_LABEL:(e,t)=>({title:e.addLabel,tone:"create",body:e.added(k(v.ADD_LABEL,t).name)}),SET_LABEL_NAME:(e,t,s)=>({title:e.renameLabel,tone:"update",body:C(e,X(s,t.target.id)?.name,k(v.SET_LABEL_NAME,t).name)}),SET_LABEL_TONE:(e,t,s)=>{const a=X(s,t.target.id)?.tone,n=k(v.SET_LABEL_TONE,t).tone;return{title:e.changeLabelTone,tone:"update",body:C(e,a===void 0?void 0:e.toneName(a),e.toneName(n))}},DELETE_LABEL:(e,t,s)=>({title:e.deleteLabel,tone:"delete",body:e.removed(X(s,t.target.id)?.name??t.target.id)}),REORDER_LABEL:(e,t)=>({title:e.reorderLabel,tone:"move",body:pe(e,k(v.REORDER_LABEL,t).after)}),ADD_STORY_LABEL:(e,t,s)=>{const a=k(v.ADD_STORY_LABEL,t).labelId;return{title:e.addStoryLabel,tone:"create",body:e.added(X(s,a)?.name??a)}},REMOVE_STORY_LABEL:(e,t,s)=>{const a=k(v.REMOVE_STORY_LABEL,t).labelId;return{title:e.removeStoryLabel,tone:"delete",body:e.removed(X(s,a)?.name??a)}},ADD_STORY_BLOCKER:(e,t,s)=>{const a=k(v.ADD_STORY_BLOCKER,t).blockerId;return{title:e.addStoryBlocker,tone:"create",body:e.added(T(s,a)?.name??a)}},REMOVE_STORY_BLOCKER:(e,t,s)=>{const a=k(v.REMOVE_STORY_BLOCKER,t).blockerId;return{title:e.removeStoryBlocker,tone:"delete",body:e.removed(T(s,a)?.name??a)}},SET_MILESTONE_DUE_DATE:(e,t,s)=>{const a=k(v.SET_MILESTONE_DUE_DATE,t).dueDate;return{title:e.changeMilestoneDueDate,tone:a===null?"delete":"update",body:a===null?e.noDueDate:C(e,U(s,t.target.id)?.dueDate,a)}},SET_STATUS_WEIGHT:(e,t,s)=>{const a=D(s,t.target.id)?.weight,n=k(v.SET_STATUS_WEIGHT,t).weight;return{title:e.changeStatusWeight,tone:"update",body:C(e,a===void 0?void 0:String(a),String(n))}},SET_DONE_STATUS:(e,t,s)=>({title:e.setDoneStatus,tone:"update",body:C(e,ss(s)?.name,D(s,t.target.id)?.name??t.target.id)}),SET_MEASURE:(e,t,s)=>({title:e.setMeasure,tone:"update",body:C(e,e.measureName(ge(s)),e.measureName(k(v.SET_MEASURE,t).measure))}),ADD_MEMBER:(e,t)=>({title:e.addMember,tone:"create",body:e.added(k(v.ADD_MEMBER,t).name)}),SET_MEMBER_NAME:(e,t,s)=>({title:e.renameMember,tone:"update",body:C(e,G(s,t.target.id)?.name,k(v.SET_MEMBER_NAME,t).name)}),SET_MEMBER_TONE:(e,t,s)=>{const a=G(s,t.target.id)?.tone,n=k(v.SET_MEMBER_TONE,t).tone;return{title:e.changeMemberTone,tone:"update",body:C(e,a===void 0?void 0:e.toneName(a),e.toneName(n))}},DELETE_MEMBER:(e,t,s)=>({title:e.deleteMember,tone:"delete",body:e.removed(G(s,t.target.id)?.name??t.target.id)}),REORDER_MEMBER:(e,t)=>({title:e.reorderMember,tone:"move",body:pe(e,k(v.REORDER_MEMBER,t).after)}),SET_STORY_ASSIGNEE:(e,t,s)=>{const a=k(v.SET_STORY_ASSIGNEE,t).memberId;if(a===null){const n=G(s,T(s,t.target.id)?.assigneeId);return{title:e.setStoryAssignee,tone:"delete",body:e.removed(n?.name??e.noAssignee)}}return{title:e.setStoryAssignee,tone:"update",body:e.toValue(G(s,a)?.name??a)}},ADD_ESTIMATE:(e,t)=>{const{name:s,points:a}=k(v.ADD_ESTIMATE,t);return{title:e.addEstimate,tone:"create",body:e.added(e.estimateText(s,a))}},SET_ESTIMATE_NAME:(e,t,s)=>({title:e.renameEstimate,tone:"update",body:C(e,z(s,t.target.id)?.name,k(v.SET_ESTIMATE_NAME,t).name)}),SET_ESTIMATE_POINTS:(e,t,s)=>{const a=z(s,t.target.id)?.points,n=k(v.SET_ESTIMATE_POINTS,t).points;return{title:e.changeEstimatePoints,tone:"update",body:C(e,a===void 0?void 0:String(a),String(n))}},DELETE_ESTIMATE:(e,t,s)=>({title:e.deleteEstimate,tone:"delete",body:e.removed(z(s,t.target.id)?.name??t.target.id)}),REORDER_ESTIMATE:(e,t)=>({title:e.reorderEstimate,tone:"move",body:pe(e,k(v.REORDER_ESTIMATE,t).after)}),SET_STORY_ESTIMATE:(e,t,s)=>{const a=k(v.SET_STORY_ESTIMATE,t).estimateId;return a===null?{title:e.setStoryEstimate,tone:"delete",body:e.toValue(e.unestimated)}:{title:e.setStoryEstimate,tone:"update",body:e.toValue(z(s,a)?.name??a)}},RECORD_SNAPSHOT:(e,t)=>{const{at:s,tally:a}=k(v.RECORD_SNAPSHOT,t),n=a.reduce((i,o)=>i+o.stories,0);return{title:e.recordSnapshot,tone:"create",body:e.snapshotSummary(ue(s),n)}},DELETE_SNAPSHOT:(e,t,s)=>{const a=Ee(s,t.target.id);return{title:e.deleteSnapshot,tone:"delete",body:e.removed(a?ue(a.at):t.target.id)}},SET_FEATURE:(e,t)=>{const{feature:s,enabled:a}=k(v.SET_FEATURE,t);return{title:a?e.enableFeature:e.disableFeature,tone:a?"create":"delete",body:e.featureName(s)}}},Ts=(e,t,s,a)=>{let n;try{const i=Kn[t.type];n=i?i(e,t,a??s):{title:t.type,tone:"meta"}}catch{n={title:t.type,tone:"meta"}}return{title:n.title,targetLabel:_s(e,s,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},xs=e=>`${e.type} ${I(e.target)} ${JSON.stringify(e.payload)}`,_s=(e,t,s)=>{try{switch(s.type){case"activity":{const a=te(t,s.id);return a?e.targetLabel(e.activityGroup,a.name):e.targetMissing(e.activityGroup,s.id)}case"step":{const a=N(t,s.id)?.step;return a?e.targetLabel(e.stepGroup,a.name):e.targetMissing(e.stepGroup,s.id)}case"story":{const a=T(t,s.id);return a?e.targetLabel(e.storyGroup,a.name):e.targetMissing(e.storyGroup,s.id)}case"milestone":{const a=U(t,s.id);return a?e.targetLabel(e.milestoneGroup,a.name):e.targetMissing(e.milestoneGroup,s.id)}case"status":{const a=D(t,s.id);return a?e.targetLabel(e.statusGroup,a.name):e.targetMissing(e.statusGroup,s.id)}case"label":{const a=X(t,s.id);return a?e.targetLabel(e.labelGroup,a.name):e.targetMissing(e.labelGroup,s.id)}case"member":{const a=G(t,s.id);return a?e.targetLabel(e.memberGroup,a.name):e.targetMissing(e.memberGroup,s.id)}case"estimate":{const a=z(t,s.id);return a?e.targetLabel(e.estimateGroup,a.name):e.targetMissing(e.estimateGroup,s.id)}case"snapshot":{const a=Ee(t,s.id);return a?e.targetLabel(e.snapshotGroup,ue(a.at)):e.targetMissing(e.snapshotGroup,s.id)}case"page":return e.targetLabel(e.mapGroup,ht(t));default:return`${s.type} \xB7 ${s.id}`}}catch{return`${s.type} \xB7 ${s.id}`}},Is=(e,t,s)=>{const a=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const n of t.activities){a.push({value:I({type:"activity",id:n.id}),label:n.name,group:e.activityGroup});for(const i of n.steps)a.push({value:I({type:"step",id:ce(n.id,i.id)}),label:`${n.name} \u203A ${i.name}`,group:e.stepGroup})}for(const n of t.milestones)a.push({value:I({type:"milestone",id:n.id}),label:n.name,group:e.milestoneGroup});for(const n of t.statuses)a.push({value:I({type:"status",id:n.id}),label:n.name,group:e.statusGroup});for(const n of t.labels)a.push({value:I({type:"label",id:n.id}),label:n.name,group:e.labelGroup});for(const n of t.members)a.push({value:I({type:"member",id:n.id}),label:n.name,group:e.memberGroup});for(const n of t.estimates)a.push({value:I({type:"estimate",id:n.id}),label:e.estimateText(n.name,n.points),group:e.estimateGroup});for(const n of t.snapshots)a.push({value:I({type:"snapshot",id:n.id}),label:ue(n.at),group:e.snapshotGroup});for(const n of t.stories)a.push({value:I({type:"story",id:n.id}),label:n.name,group:e.storyGroup});return a},As=(e,t,s)=>{const a=t.stories.find(n=>n.id===s.story);if(a)return{value:I({type:"story",id:a.id}),label:a.name,group:e.storyGroup};for(const n of t.activities){const i=n.steps.find(o=>o.id===s.step);if(i)return{value:I({type:"step",id:ce(n.id,i.id)}),label:i.name,group:e.stepGroup}}return null},ht=e=>e.title??"User Story Mapping",qn=(e,t)=>{switch(t.type){case"story":{const s=T(e,t.id);return{tab:null,highlight:null,...Object.fromEntries(Te.map(a=>[a,null])),...s&&$e(e,s)?{[oe.key]:oe.value}:{}}}case"step":case"activity":return{tab:null,view:null};case"milestone":return{tab:"milestones"};case"status":case"label":case"member":return null;case"estimate":case"snapshot":return P(e,"estimates")?{tab:"burndown"}:null;default:return null}},Ms=(e,t)=>{const s=N(e,t.step),a=s?.activity??te(e,t.activity)??e.activities[0],n=s?.step??a?.steps.find(m=>m.id===t.step)??a?.steps[0],i=On(e,t.story),o={...t};a?o.activity=a.id:delete o.activity,n?o.step=n.id:delete o.step,i?o.story=i.id:delete o.story,o.view=t.view==="group"?"group":"activity";const r=Ge(e,t);for(const m of Te){const y=Es(e,m,r[m]);y===null?delete o[m]:o[m]=y}t[oe.key]!==oe.value&&delete o[oe.key];const d=ys(e,t);d==="map"?delete o.tab:o.tab=d,U(e,t.milestone)||delete o.milestone;const p=Ve(t);return p===null?delete o.highlight:o.highlight=p,o},Ls=(e,t)=>{switch(t.type){case"activity":return te(e,t.id)!==void 0;case"step":return N(e,t.id)!==void 0;case"story":return T(e,t.id)!==void 0;case"milestone":return U(e,t.id)!==void 0;case"status":return D(e,t.id)!==void 0;case"label":return X(e,t.id)!==void 0;case"member":return G(e,t.id)!==void 0;case"estimate":return z(e,t.id)!==void 0;case"snapshot":return Ee(e,t.id)!==void 0;case"page":return!0;default:return!1}},Ds=e=>{const t=ne(e);return{kind:"view",name:"usm",label:"User Story Mapping",parseBase:Zt,emptyBase:dt,actions:v,apply:cs,canonicalState:_n,hasTarget:Ls,canonicalTarget:(s,a)=>{if(a.type!=="step")return a;const n=N(s,a.id);return n?{...a,id:ce(n.activity.id,n.step.id)}:a},describe:(s,a,n)=>Ts(t,s,a,n),serialize:xs,resolveNavigation:Ms,navigationFor:qn,commentTargets:(s,a)=>Is(t,s),currentTarget:(s,a)=>As(t,s,a),settings:s=>({items:Ce.map(a=>{const n=P(s,a);return{key:a,label:t.featureName(a),hint:t.featureHint(a),on:n,toggle:{type:"SET_FEATURE",target:{type:"page",id:"usm"},payload:{feature:a,enabled:!n}}}}),note:t.featuresNote}),title:ht}},Rs=.5,Wn=({widths:e,available:t,gap:s,moreWidth:a,keep:n})=>{if(e.reduce((m,y)=>m+y,0)+s*Math.max(0,e.length-1)<=t+Rs)return[];const o=t-a+Rs,r=new Set;let d=0;const p=m=>{d+=(r.size===0?0:s)+(e[m]??0),r.add(m)};n>=0&&n<e.length&&p(n);for(const[m,y]of e.entries())if(!r.has(m)){if(d+(r.size===0?0:s)+y>o)break;p(m)}return e.flatMap((m,y)=>r.has(y)?[]:[y])},Os=new Set;class jn{#t;#e;#n=Os;#i=0;#a=null;#s=null;constructor(t,s){this.#t=t,this.#e=s,t.addController(this)}get hidden(){return this.#n}get minimum(){return this.#i}hostConnected(){typeof ResizeObserver>"u"||(this.#a=new ResizeObserver(()=>this.#o()))}hostUpdated(){const t=this.#e.row();t!==this.#s&&(this.#s&&this.#a?.unobserve(this.#s),t&&this.#a?.observe(t),this.#s=t),this.#o()}hostDisconnected(){this.#a?.disconnect(),this.#a=null,this.#s=null}#o(){const t=this.#e.row();if(!t)return;const s=this.#e.items(t),a=s.map(E=>E.getBoundingClientRect().width),n=s.findIndex(E=>this.#e.kept(E)),i=s[0]?.parentElement,o=i?Ns(i):0,r=this.#e.more(t),d=r?r.getBoundingClientRect().width+Ns(t):0,p=Wn({widths:a,available:t.getBoundingClientRect().width,gap:o,moreWidth:d,keep:n}),m=new Set(p.flatMap(E=>{const S=s[E];return S?[this.#e.keyOf(S)]:[]})),y=Math.ceil((a[n]??0)+d);Xn(m,this.#n)&&y===this.#i||(this.#n=m.size===0?Os:m,this.#i=y,this.#t.requestUpdate())}}const Ns=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,Xn=(e,t)=>e.size===t.size&&[...e].every(s=>t.has(s)),bt=1440*60*1e3,Zn=48,Jn=8,Qn=(e,t,s,a)=>{const n={left:a.inset.left,top:a.inset.top,right:a.width-a.inset.right,bottom:a.height-a.inset.bottom},i=[...e.map($=>$.at),s,...t===null?[]:[t]];let o=Math.min(...i),r=Math.max(...i);r-o<bt&&(o-=bt/2,r+=bt/2);const d=ei(Math.max(0,...e.map($=>$.value))),p=d.at(-1)??1,m=$=>n.left+($-o)/(r-o)*(n.right-n.left),y=$=>n.bottom-$/p*(n.bottom-n.top),E=e.map($=>({x:m($.at),y:y($.value),at:$.at,value:$.value,...$.snapshotId===void 0?{}:{snapshotId:$.snapshotId}})),S=E[0],A=si(o,r,Math.floor((n.right-n.left)/Zn));return{size:a,plot:n,line:E.map($=>`${xe($.x)},${xe($.y)}`).join(" "),dots:E,ideal:t===null||!S?null:{x1:S.x,y1:S.y,x2:m(t),y2:y(0)},nowX:m(s),dueX:t===null?null:m(t),yTicks:d.map($=>({y:y($),value:$})),valueTop:p,xUnit:A.unit,xTicks:A.ats.map($=>({x:m($),at:$})),domain:{start:o,end:r},idealSpan:t===null||!S?null:{at:S.at,value:S.value,due:t}}},ei=e=>{const t=ti(e/4),s=Math.max(1,Math.ceil(e/t));return Array.from({length:s+1},(a,n)=>n*t)},ti=e=>{if(e<=1)return 1;const t=10**Math.floor(Math.log10(e));return([1,2,2.5,5,10].find(a=>Number.isInteger(a*t)&&a*t>=e)??10)*t},xe=e=>Math.round(e*100)/100,si=(e,t,s)=>{const a=Math.max(1,s),n=["day","week","biweek","month","quarter"];for(const i of n){const o=Cs(i,e,t,a);if(o!==null)return{unit:i,ats:o}}return{unit:"year",ats:Cs("year",e,t,1/0)??[]}},Cs=(e,t,s,a)=>{const n=[];for(let i=ai(e,t);i<=s;i=ni(e,i)){if(n.length===a)return null;n.push(i)}return n},ai=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],o=(r,d)=>r.getTime()>=t?r.getTime():d().getTime();switch(e){case"day":return o(new Date(a,n,i),()=>new Date(a,n,i+1));case"week":case"biweek":{const r=o(new Date(a,n,i),()=>new Date(a,n,i+1)),d=new Date(r),p=(8-d.getDay())%7;return new Date(d.getFullYear(),d.getMonth(),d.getDate()+p).getTime()}case"month":return o(new Date(a,n,1),()=>new Date(a,n+1,1));case"quarter":{const r=n-n%3;return o(new Date(a,r,1),()=>new Date(a,r+3,1))}case"year":return o(new Date(a,0,1),()=>new Date(a+1,0,1))}},ni=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],o={day:1,week:7,biweek:14},r={month:1,quarter:3,year:12};return e==="day"||e==="week"||e==="biweek"?new Date(a,n,i+o[e]).getTime():new Date(a,n+r[e],1).getTime()},Bs=(e,t)=>{const{plot:s,domain:a,dots:n}=e,i=Math.min(s.right,Math.max(s.left,t)),o=n.reduce((E,S)=>E===null||Math.abs(S.x-i)<Math.abs(E.x-i)?S:E,null),r=o!==null&&Math.abs(o.x-i)<=Jn?o:null,d=r?.at??a.start+(i-s.left)/(s.right-s.left)*(a.end-a.start),p=r?.value??ii(n,d),m=oi(e,d),y=E=>E===null?null:xe(s.bottom-E/e.valueTop*(s.bottom-s.top));return{x:r?.x??i,at:d,actual:p,ideal:m,actualY:y(p),idealY:y(m),dot:r}},ii=(e,t)=>{const s=e.findIndex(i=>i.at>=t),a=e[s];if(!a)return null;if(a.at===t)return a.value;const n=e[s-1];return n?xe(n.value+(a.value-n.value)*(t-n.at)/(a.at-n.at)):null},oi=(e,t)=>{const s=e.idealSpan;return s===null||t<s.at||t>s.due?null:xe(s.value*(s.due-t)/(s.due-s.at))},M=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,Ys={circle:O(an),lightbulb:O(ln),flag:O(dn),play:O(tn),clock:O(nn),eye:O(rn),pause:O(en),check:O(Ja),x:O(sn)},ri=O(Qa),di=e=>{if(e>=1)return Ys.check();const t=2*Math.PI*4.5;return l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
2
- <circle cx="12" cy="12" r="10"></circle>
3
- ${e>0?Z`<circle
4
- class="si-pie"
5
- cx="12"
6
- cy="12"
7
- r="4.5"
8
- stroke-dasharray=${`${e*t} ${t}`}
9
- transform="rotate(-90 12 12)"
10
- ></circle>`:u}
11
- </svg>`},re=e=>{const t=e===void 0?ri():e.icon==="progress"?di(e.progress??1):Ys[e.icon]();return l`<span class="status-icon">${t}</span>`},Us=(e,t)=>e.length===0?u:l`<span class="status-bar" role="img" aria-label=${t}>
12
- ${e.map(s=>l`<span
13
- class="status-bar-part"
14
- data-status=${s.id}
15
- title=${`${s.name}: ${s.count}`}
16
- style=${`${M(s.tone)};flex-grow:${s.count}`}
17
- ></span>`)}
18
- </span>`,Ke=q`
19
- .status-icon {
20
- display: block;
21
- flex: none;
22
- width: 16px;
23
- height: 16px;
24
- color: var(--usm-tone);
25
- }
26
- .status-icon svg {
27
- display: block;
28
- width: 100%;
29
- height: 100%;
30
- }
31
- .status-icon .si-pie {
32
- stroke-width: 9;
33
- }
34
- .status-bar {
35
- display: flex;
36
- gap: 2px;
37
- height: 6px;
38
- min-width: 0;
39
- }
40
- .status-bar-part {
41
- min-width: 4px;
42
- border-radius: 3px;
43
- background: var(--usm-tone);
44
- }
45
- .status-bar-part[data-status=''] {
46
- background: color-mix(in srgb, var(--dpk-ink-faint) 30%, transparent);
47
- }
48
- `,li=q`
49
- :host {
50
- position: relative;
51
- display: block;
52
- }
53
- .bd-plot {
54
- position: relative;
55
- border-radius: var(--dpk-radius-sm);
56
- outline: none;
57
- }
58
- .bd-plot:focus-visible {
59
- box-shadow: var(--dpk-focus);
60
- }
61
- .bd-svg {
62
- display: block;
63
- width: 100%;
64
- height: auto;
65
- overflow: visible;
66
- touch-action: pan-y;
67
- }
68
- .bd-grid-line {
69
- stroke: var(--dpk-rule);
70
- stroke-width: 1;
71
- }
72
- .bd-grid-line[data-axis='x'] {
73
- stroke-dasharray: 1 3;
74
- }
75
- .bd-tick,
76
- .bd-marker {
77
- fill: var(--dpk-ink-faint);
78
- font-family: var(--dpk-mono);
79
- font-size: 10px;
80
- }
81
- .bd-marker {
82
- font-weight: 650;
83
- }
84
- .bd-marker[data-marker='due'] {
85
- fill: var(--dpk-amber);
86
- }
87
- .bd-marker[data-marker='today'] {
88
- fill: var(--dpk-blue);
89
- }
90
- .bd-due {
91
- stroke: var(--dpk-amber);
92
- stroke-width: 1.5;
93
- }
94
- .bd-now {
95
- stroke: var(--dpk-blue);
96
- stroke-width: 1;
97
- stroke-dasharray: 2 3;
98
- }
99
- .bd-ideal {
100
- stroke: var(--dpk-ink-faint);
101
- stroke-width: 1.25;
102
- stroke-dasharray: 5 4;
103
- }
104
- .bd-line {
105
- fill: none;
106
- stroke: var(--usm-tone);
107
- stroke-width: 2.25;
108
- stroke-linejoin: round;
109
- stroke-linecap: round;
110
- }
111
- .bd-dot {
112
- fill: var(--dpk-paper-raised);
113
- stroke: var(--usm-tone);
114
- stroke-width: 2;
115
- }
116
- .bd-dot[data-now] {
117
- fill: var(--usm-tone);
118
- }
119
- .bd-cross {
120
- stroke: var(--dpk-ink-soft);
121
- stroke-width: 1;
122
- pointer-events: none;
123
- }
124
- .bd-mark {
125
- stroke: var(--dpk-paper-raised);
126
- stroke-width: 2;
127
- pointer-events: none;
128
- }
129
- .bd-mark[data-line='actual'] {
130
- fill: var(--usm-tone);
131
- }
132
- .bd-mark[data-line='ideal'] {
133
- fill: var(--dpk-ink-faint);
134
- }
135
- .bd-tip {
136
- position: absolute;
137
- z-index: 1;
138
- display: grid;
139
- gap: 3px;
140
- min-width: 116px;
141
- padding: 7px 10px;
142
- border: 1px solid var(--dpk-rule-strong);
143
- border-radius: var(--dpk-radius-sm);
144
- background: var(--dpk-paper-raised);
145
- box-shadow: var(--dpk-shadow-sm);
146
- font-size: 11.5px;
147
- pointer-events: none;
148
- white-space: nowrap;
149
- transform: translateX(10px);
150
- }
151
- .bd-tip[data-side='left'] {
152
- transform: translateX(calc(-100% - 10px));
153
- }
154
- .bd-tip-at {
155
- color: var(--dpk-ink-soft);
156
- font-family: var(--dpk-mono);
157
- font-size: 10.5px;
158
- }
159
- .bd-tip-row {
160
- display: flex;
161
- align-items: center;
162
- gap: 6px;
163
- color: var(--dpk-ink-soft);
164
- }
165
- .bd-tip-row b {
166
- margin-left: auto;
167
- padding-left: 12px;
168
- color: var(--dpk-ink);
169
- font-family: var(--dpk-mono);
170
- font-variant-numeric: tabular-nums;
171
- }
172
- .bd-swatch {
173
- flex: none;
174
- width: 12px;
175
- height: 0;
176
- border-top: 2.25px solid var(--usm-tone);
177
- }
178
- .bd-swatch[data-line='ideal'] {
179
- border-top: 1.5px dashed var(--dpk-ink-faint);
180
- }
181
- `;class pi extends Ae{static{this.styles=[li]}static{this.properties={points:{attribute:!1},due:{attribute:!1},now:{attribute:!1},size:{attribute:!1},tone:{attribute:!1},label:{attribute:!1},readout:{state:!0}}}#t=new Qe(this);constructor(){super(),this.points=[],this.due=null,this.now=0,this.size={width:320,height:160,inset:{top:12,right:12,bottom:24,left:32}},this.tone="accent",this.label="",this.readout=null}render(){const t=ne(this.#t.locale),s=Qn(this.points,this.due,this.now,this.size),{size:a}=s,n=this.points.at(-1)?.value??0;return l`<div
182
- class="bd-plot"
183
- tabindex="0"
184
- role="img"
185
- aria-label=${t.chartAria(this.label,n)}
186
- style=${M(this.tone)}
187
- @pointermove=${i=>this.#e(s,i)}
188
- @pointerleave=${()=>this.readout=null}
189
- @focus=${()=>this.#n(s,s.dots.length-1)}
190
- @blur=${()=>this.readout=null}
191
- @keydown=${i=>this.#i(s,i)}
192
- >
193
- <svg class="bd-svg" viewBox=${`0 0 ${a.width} ${a.height}`} aria-hidden="true">
194
- ${ci(t,s)} ${ui(s)} ${this.readout?mi(s,this.readout):u}
195
- </svg>
196
- ${this.readout?hi(t,s,this.readout):u}
197
- </div>`}#e(t,s){const a=this.renderRoot.querySelector("svg")?.getBoundingClientRect();!a||a.width===0||(this.readout=Bs(t,(s.clientX-a.left)/a.width*t.size.width))}#n(t,s){const a=t.dots[s];this.readout=a?Bs(t,a.x):null}#i(t,s){const a=t.dots.length-1,n=t.dots.findIndex(o=>o===this.readout?.dot),i=(()=>{switch(s.key){case"ArrowLeft":return Math.max(0,(n===-1?a:n)-1);case"ArrowRight":return Math.min(a,(n===-1?a:n)+1);case"Home":return 0;case"End":return a;default:return null}})();i!==null&&(s.preventDefault(),this.#n(t,i))}}const ci=(e,t)=>{const{plot:s,size:a}=t,n=a.height-8;return Z`
198
- ${t.yTicks.map(i=>Z`<line class="bd-grid-line" x1=${s.left} x2=${s.right} y1=${i.y} y2=${i.y}></line>
199
- <text class="bd-tick" x=${s.left-6} y=${i.y} text-anchor="end" dominant-baseline="middle">${i.value}</text>`)}
200
- ${t.xTicks.map(i=>Z`<line class="bd-grid-line" data-axis="x" x1=${i.x} x2=${i.x} y1=${s.top} y2=${s.bottom}></line>
201
- <text class="bd-tick" data-axis="x" x=${i.x} y=${n} text-anchor="middle">${e.axisDate(i.at,t.xUnit)}</text>`)}
202
- ${t.dueX===null||t.idealSpan===null?u:Z`<line class="bd-due" x1=${t.dueX} x2=${t.dueX} y1=${s.top} y2=${s.bottom}></line>
203
- <text class="bd-marker" data-marker="due" x=${t.dueX-4} y=${s.top+10} text-anchor="end">${`${e.chartDue} ${e.axisDate(t.idealSpan.due,"day")}`}</text>`}
204
- <line class="bd-now" x1=${t.nowX} x2=${t.nowX} y1=${s.top} y2=${s.bottom}></line>
205
- <text class="bd-marker" data-marker="today" x=${t.nowX+4} y=${s.top+10} text-anchor="start">${e.chartToday}</text>
206
- `},ui=e=>Z`
207
- ${e.ideal?Z`<line class="bd-ideal" x1=${e.ideal.x1} y1=${e.ideal.y1} x2=${e.ideal.x2} y2=${e.ideal.y2}></line>`:u}
208
- <polyline class="bd-line" points=${e.line}></polyline>
209
- ${e.dots.map(t=>Z`<circle class="bd-dot" data-now=${t.snapshotId===void 0?"true":u} cx=${t.x} cy=${t.y} r="3.5"></circle>`)}
210
- `,mi=(e,t)=>Z`
211
- <line class="bd-cross" x1=${t.x} x2=${t.x} y1=${e.plot.top} y2=${e.plot.bottom}></line>
212
- ${t.idealY===null?u:Z`<circle class="bd-mark" data-line="ideal" cx=${t.x} cy=${t.idealY} r="3.5"></circle>`}
213
- ${t.actualY===null?u:Z`<circle class="bd-mark" data-line="actual" cx=${t.x} cy=${t.actualY} r="4.5"></circle>`}
214
- `,hi=(e,t,s)=>{const{size:a,plot:n}=t,i=s.x>a.width*.6?"left":"right",o=s.dot?s.dot.snapshotId===void 0?`${e.chartNow} \xB7 ${ue(s.dot.at)}`:ue(s.dot.at):e.axisDate(s.at,"day");return l`<div
215
- class="bd-tip"
216
- data-testid="usm-chart-readout"
217
- data-side=${i}
218
- style=${`left: ${s.x/a.width*100}%; top: calc(${n.top/a.height*100}% + 20px)`}
219
- >
220
- <span class="bd-tip-at">${o}</span>
221
- ${s.actual===null?u:l`<span class="bd-tip-row" data-line="actual"
222
- ><span class="bd-swatch" data-line="actual"></span>${e.chartActual}<b>${s.actual}</b></span
223
- >`}
224
- ${s.ideal===null?u:l`<span class="bd-tip-row" data-line="ideal"
225
- ><span class="bd-swatch" data-line="ideal"></span>${e.chartIdeal}<b>${s.ideal}</b></span
226
- >`}
227
- </div>`},bi=()=>{customElements.get("dpk-internal-usm-burndown-chart")||customElements.define("dpk-internal-usm-burndown-chart",pi)},gi=e=>{const t=e.stories.length;return{rows:e.labels.map((a,n)=>{const i=e.stories.filter(o=>o.labelIds?.includes(a.id)).length;return{id:a.id,name:a.name,tone:a.tone,previousId:e.labels[n-1]?.id??null,nextId:e.labels[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},fi=e=>{const t=e.stories.length;return{rows:e.members.map((a,n)=>{const i=e.stories.filter(o=>o.assigneeId===a.id).length;return{id:a.id,name:a.name,tone:a.tone,previousId:e.members[n-1]?.id??null,nextId:e.members[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},Ps=(e,t)=>{const s=J("new-activity",W(t.state));if(!t.dispatch({type:"ADD_ACTIVITY",target:{type:"page",id:"usm"},payload:{id:s,name:e.newActivityName}}).ok)return;const n=J("new-step",[...W(t.state),s]);t.dispatch({type:"ADD_STEP",target:{type:"activity",id:s},payload:{id:n,name:e.newStepName}}),t.navigate({activity:s,step:null,story:null})},yi=(e,t,s)=>{const a=J("new-step",W(t.state));t.dispatch({type:"ADD_STEP",target:{type:"activity",id:s},payload:{id:a,name:e.newStepName}})},zs=(e,t)=>{const s=J("new-milestone",W(t.state));t.dispatch({type:"ADD_MILESTONE",target:{type:"page",id:"usm"},payload:{id:s,name:e.newMilestoneName}})},Fs=(e,t,s,a,n)=>{const i=J("new-story",W(t.state));t.dispatch({type:"ADD_STORY",target:{type:"step",id:a},payload:{id:i,name:e.newStoryName,activityId:s,...n===void 0?{}:{milestoneId:n},number:ps(t.base,t.state)}}).ok&&t.navigate({activity:s,step:a,story:i})},vi=(e,t)=>{const s=J("new-status",W(t.state));t.dispatch({type:"ADD_STATUS",target:{type:"page",id:"usm"},payload:{id:s,name:e.newStatusName,tone:rt(t.state.statuses.length)}})},ki=(e,t)=>{const s=J("new-label",W(t.state));t.dispatch({type:"ADD_LABEL",target:{type:"page",id:"usm"},payload:{id:s,name:e.newLabelName,tone:Ye(t.state.labels.length)}})},wi=(e,t)=>{const s=J("new-member",W(t.state));t.dispatch({type:"ADD_MEMBER",target:{type:"page",id:"usm"},payload:{id:s,name:e.newMemberName,tone:Ye(t.state.members.length)}})},Si=(e,t)=>{const s=J("new-estimate",W(t.state)),a=Math.max(0,...t.state.estimates.map(n=>n.points))+1;t.dispatch({type:"ADD_ESTIMATE",target:{type:"page",id:"usm"},payload:{id:s,name:e.newEstimateName,points:a}})},Ei=(e,t)=>{const s=J(`snapshot-${t.toISOString().slice(0,10)}`,W(e.state));e.dispatch({type:"RECORD_SNAPSHOT",target:{type:"page",id:"usm"},payload:{id:s,at:t.toISOString(),tally:ds(e.state)}})},$i=(e,t,s,a)=>l`
228
- <section class="st-overview" data-testid="usm-statuses">
229
- ${s.rows.length===0?l`<div class="empty">
230
- <h2>${e.noStatusesTitle}</h2>
231
- <p>${e.noStatusesBody}</p>
232
- </div>`:u}
233
- <ol class="st-list">
234
- ${B(s.rows,n=>n.id,n=>Ti(e,t,n,a))}
235
- </ol>
236
- <div>
237
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>vi(e,t)}>
238
- ${e.newStatusButton}
239
- </button>
240
- </div>
241
- </section>
242
- `,Ti=(e,t,s,a)=>{const n=a.openFor===s.id,i={type:"status",id:s.id},o=r=>{t.dispatch({type:"REORDER_STATUS",target:i,payload:{after:r}})};return l`
243
- <li
244
- class="st-row st-row--status"
245
- data-status=${s.id}
246
- data-dpk-target=${I(i)}
247
- style=${M(s.tone)}
248
- >
249
- <button
250
- class="st-icon-trigger"
251
- type="button"
252
- data-icon-trigger=${s.id}
253
- aria-haspopup="menu"
254
- aria-expanded=${String(n)}
255
- aria-label=${`${e.statusIconLabel}: ${e.iconName(s.icon)}`}
256
- title=${e.iconName(s.icon)}
257
- @click=${()=>a.toggle(s.id)}
258
- >
259
- ${re(s)}
260
- </button>
261
- ${n?xi(e,t,s,a):u}
262
- <span class="st-name">
263
- <dpk-inline-edit
264
- .value=${s.name}
265
- .label=${e.statusNameLabel}
266
- @dpk-commit=${Q(r=>t.dispatch({type:"SET_STATUS_NAME",target:i,payload:{name:r}}))}
267
- ></dpk-inline-edit>
268
- </span>
269
- ${ft(e,s.storyCount,s.share)}
270
- ${gt(e,s.tone,r=>t.dispatch({type:"SET_STATUS_TONE",target:i,payload:{tone:r}}))}
271
- <label class="st-done" title=${e.doneStatusAria(s.name)}>
272
- <input
273
- type="radio"
274
- name="usm-done-status"
275
- data-role="done"
276
- aria-label=${e.doneStatusAria(s.name)}
277
- .checked=${s.done}
278
- @change=${()=>t.dispatch({type:"SET_DONE_STATUS",target:i,payload:{}})}
279
- />
280
- <span aria-hidden="true">${e.doneStatusMark}</span>
281
- </label>
282
- ${qe(e,{ids:t.state.statuses.map(r=>r.id),row:s,deleteLabel:e.deleteStatusAria,reorder:o,remove:()=>t.dispatch({type:"DELETE_STATUS",target:i,payload:{}})})}
283
- </li>
284
- `},xi=(e,t,s,a)=>l`<div
285
- id="icon-menu"
286
- class="comment-pop icon-menu"
287
- popover="manual"
288
- role="menu"
289
- aria-label=${e.statusIconLabel}
290
- style=${M(s.tone)}
291
- @keydown=${n=>{n.key==="Escape"&&(n.preventDefault(),a.close())}}
292
- >
293
- ${Ft.map(n=>l`<button
294
- class="icon-option"
295
- type="button"
296
- role="menuitemradio"
297
- data-icon=${n}
298
- title=${e.iconName(n)}
299
- aria-label=${e.iconName(n)}
300
- aria-checked=${String(n===s.icon)}
301
- @click=${()=>{n!==s.icon&&t.dispatch({type:"SET_STATUS_ICON",target:{type:"status",id:s.id},payload:{icon:n}}),a.close()}}
302
- >
303
- ${re({icon:n,progress:s.progress})}
304
- </button>`)}
305
- </div>`,gt=(e,t,s)=>l`<span class="st-tones" role="radiogroup" aria-label=${e.statusToneLabel}>
306
- ${Ne.map(a=>l`<button
307
- class="st-tone"
308
- type="button"
309
- role="radio"
310
- data-tone=${a}
311
- style=${M(a)}
312
- title=${e.toneName(a)}
313
- aria-label=${e.toneName(a)}
314
- aria-checked=${a===t?"true":"false"}
315
- @click=${()=>{a!==t&&s(a)}}
316
- ></button>`)}
317
- </span>`,qe=(e,t)=>l`<span class="st-tools">
318
- <button
319
- class="dpk-icon-btn"
320
- type="button"
321
- aria-label=${e.moveUpAria}
322
- ?disabled=${t.row.previousId===null}
323
- @click=${()=>t.reorder(_i(t.ids,t.row.previousId))}
324
- >
325
- ↑
326
- </button>
327
- <button
328
- class="dpk-icon-btn"
329
- type="button"
330
- aria-label=${e.moveDownAria}
331
- ?disabled=${t.row.nextId===null}
332
- @click=${()=>t.reorder(t.row.nextId)}
333
- >
334
- ↓
335
- </button>
336
- <button class="dpk-icon-btn" type="button" data-role="delete" aria-label=${t.deleteLabel} @click=${t.remove}>
337
- ${et()}
338
- </button>
339
- </span>`,_i=(e,t)=>{const s=t===null?-1:e.indexOf(t);return s<=0?null:e[s-1]??null},ft=(e,t,s)=>l`
340
- <span class="st-share">
341
- <span class="st-share-text">${e.statusShare(t,Math.round(s*100))}</span>
342
- <span class="st-meter" aria-hidden="true"><span style=${`width:${s*100}%`}></span></span>
343
- </span>
344
- `,Ii=(e,t,s)=>l`
345
- <section class="st-overview" data-testid="usm-labels">
346
- ${s.rows.length===0?l`<div class="empty">
347
- <h2>${e.noLabelsTitle}</h2>
348
- <p>${e.noLabelsBody}</p>
349
- </div>`:u}
350
- <ol class="st-list">
351
- ${B(s.rows,a=>a.id,a=>Ai(e,t,a))}
352
- </ol>
353
- <div>
354
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>ki(e,t)}>
355
- ${e.newLabelButton}
356
- </button>
357
- </div>
358
- </section>
359
- `,Ai=(e,t,s)=>{const a={type:"label",id:s.id};return l`
360
- <li class="st-row" data-label=${s.id} data-dpk-target=${I(a)} style=${M(s.tone)}>
361
- <span class="label-swatch" aria-hidden="true"></span>
362
- <span class="st-name">
363
- <dpk-inline-edit
364
- .value=${s.name}
365
- .label=${e.labelNameLabel}
366
- @dpk-commit=${Q(n=>t.dispatch({type:"SET_LABEL_NAME",target:a,payload:{name:n}}))}
367
- ></dpk-inline-edit>
368
- </span>
369
- ${ft(e,s.storyCount,s.share)}
370
- ${gt(e,s.tone,n=>t.dispatch({type:"SET_LABEL_TONE",target:a,payload:{tone:n}}))}
371
- ${qe(e,{ids:t.state.labels.map(n=>n.id),row:s,deleteLabel:e.deleteLabelAria,reorder:n=>t.dispatch({type:"REORDER_LABEL",target:a,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_LABEL",target:a,payload:{}})})}
372
- </li>
373
- `},Mi=new Intl.Segmenter(void 0,{granularity:"grapheme"}),yt=e=>{const[t]=Mi.segment(e.trim());return t?t.segment.toUpperCase():"?"},Li=(e,t,s)=>l`
374
- <section class="st-overview" data-testid="usm-members">
375
- ${s.rows.length===0?l`<div class="empty">
376
- <h2>${e.noMembersTitle}</h2>
377
- <p>${e.noMembersBody}</p>
378
- </div>`:u}
379
- <ol class="st-list">
380
- ${B(s.rows,a=>a.id,a=>Di(e,t,a))}
381
- </ol>
382
- <div>
383
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>wi(e,t)}>
384
- ${e.newMemberButton}
385
- </button>
386
- </div>
387
- </section>
388
- `,Di=(e,t,s)=>{const a={type:"member",id:s.id};return l`
389
- <li class="st-row" data-member=${s.id} data-dpk-target=${I(a)} style=${M(s.tone)}>
390
- <span class="member-avatar" aria-hidden="true">${yt(s.name)}</span>
391
- <span class="st-name">
392
- <dpk-inline-edit
393
- .value=${s.name}
394
- .label=${e.memberNameLabel}
395
- @dpk-commit=${Q(n=>t.dispatch({type:"SET_MEMBER_NAME",target:a,payload:{name:n}}))}
396
- ></dpk-inline-edit>
397
- </span>
398
- ${ft(e,s.storyCount,s.share)}
399
- ${gt(e,s.tone,n=>t.dispatch({type:"SET_MEMBER_TONE",target:a,payload:{tone:n}}))}
400
- ${qe(e,{ids:t.state.members.map(n=>n.id),row:s,deleteLabel:e.deleteMemberAria,reorder:n=>t.dispatch({type:"REORDER_MEMBER",target:a,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_MEMBER",target:a,payload:{}})})}
401
- </li>
402
- `},he=e=>{const t=be(e);return e.statuses.map((s,a)=>({id:s.id,name:s.name,tone:s.tone,icon:s.icon,progress:Vs(a,t)}))},Vs=(e,t)=>t<=0?1:Math.min(1,e/t),Gs=(e,t)=>e.find(s=>s.id===t.statusId),Hs=(e,t)=>he(e).map(s=>({...s,count:t.filter(a=>a.statusId===s.id).length})).filter(s=>s.count>0),Ri=e=>{const t=e.stories.length,s=o=>t===0?0:o/t,a=o=>e.stories.filter(r=>r.statusId===o).length,n=be(e);return{rows:e.statuses.map((o,r)=>{const d=a(o.id);return{id:o.id,name:o.name,tone:o.tone,icon:o.icon,progress:Vs(r,n),done:r===n,previousId:e.statuses[r-1]?.id??null,nextId:e.statuses[r+1]?.id??null,storyCount:d,share:s(d)}})}},Oi={width:228,height:116},Ni=q`
403
- :host {
404
- display: block;
405
- }
406
-
407
- .st-overview {
408
- display: grid;
409
- gap: 20px;
410
- max-width: none;
411
- padding: 0;
412
- }
413
-
414
- /* The panel already is a frame: the list itself draws none. */
415
- .st-list {
416
- display: grid;
417
- margin: 0;
418
- padding: 0;
419
- list-style: none;
420
- border: 0;
421
- background: none;
422
- box-shadow: none;
423
- }
424
-
425
- .st-row {
426
- display: flex;
427
- flex-wrap: wrap;
428
- align-items: center;
429
- gap: 8px 12px;
430
- padding: 10px 0;
431
- }
432
-
433
- .st-row + .st-row {
434
- border-top: 1px solid var(--dpk-rule);
435
- }
436
-
437
- .st-name {
438
- flex: 1 1 120px;
439
- min-width: 0;
440
- font-size: 14px;
441
- font-weight: 650;
442
- }
443
-
444
- .st-share {
445
- flex: 1 1 140px;
446
- display: grid;
447
- gap: 5px;
448
- }
449
-
450
- .st-share-text {
451
- color: var(--dpk-ink-faint);
452
- font-family: var(--dpk-mono);
453
- font-size: 11px;
454
- font-variant-numeric: tabular-nums;
455
- }
456
-
457
- .st-meter {
458
- height: 5px;
459
- border-radius: 3px;
460
- background: var(--dpk-paper-sunken);
461
- overflow: hidden;
462
- }
463
-
464
- .st-meter > span {
465
- display: block;
466
- height: 100%;
467
- border-radius: 3px;
468
- background: var(--usm-tone);
469
- }
470
-
471
- .st-done {
472
- display: inline-flex;
473
- align-items: center;
474
- gap: 6px;
475
- color: var(--dpk-ink-faint);
476
- font-size: 12px;
477
- font-weight: 600;
478
- white-space: nowrap;
479
- cursor: pointer;
480
- user-select: none;
481
- transition: color 140ms var(--dpk-ease);
482
- }
483
-
484
- .st-done:hover,
485
- .st-done:has(:checked) {
486
- color: var(--dpk-ink);
487
- }
488
-
489
- .st-done input {
490
- margin: 0;
491
- accent-color: var(--usm-tone);
492
- cursor: inherit;
493
- }
494
-
495
- .st-tones {
496
- display: inline-flex;
497
- flex-wrap: wrap;
498
- gap: 5px;
499
- }
500
-
501
- .st-tone {
502
- width: 18px;
503
- height: 18px;
504
- padding: 0;
505
- border: 2px solid var(--dpk-paper-raised);
506
- border-radius: 50%;
507
- background: var(--usm-tone);
508
- box-shadow: 0 0 0 1px var(--dpk-rule-strong);
509
- cursor: pointer;
510
- transition: box-shadow 150ms ease;
511
- }
512
-
513
- .st-tone:hover {
514
- box-shadow: 0 0 0 1px var(--usm-tone);
515
- }
516
-
517
- .st-tone[aria-checked='true'] {
518
- box-shadow: 0 0 0 2px var(--usm-tone);
519
- }
520
-
521
- .st-tone:focus-visible {
522
- outline: none;
523
- box-shadow: var(--dpk-focus);
524
- }
525
-
526
- /* A status's own icon opens the menu of icons. */
527
- .st-icon-trigger {
528
- display: inline-grid;
529
- place-items: center;
530
- width: 30px;
531
- height: 30px;
532
- margin: -7px;
533
- padding: 0;
534
- border: 1px solid transparent;
535
- border-radius: var(--dpk-radius-sm);
536
- background: transparent;
537
- cursor: pointer;
538
- transition:
539
- background 140ms var(--dpk-ease),
540
- border-color 140ms var(--dpk-ease);
541
- }
542
-
543
- .st-icon-trigger:hover,
544
- .st-icon-trigger[aria-expanded='true'] {
545
- border-color: var(--dpk-rule-strong);
546
- background: var(--dpk-paper-raised);
547
- box-shadow: var(--dpk-shadow-xs);
548
- }
549
-
550
- .st-icon-trigger:focus-visible {
551
- outline: none;
552
- box-shadow: var(--dpk-focus);
553
- }
554
-
555
- .comment-pop.icon-menu {
556
- grid-template-columns: repeat(5, 36px);
557
- gap: 4px;
558
- padding: 8px;
559
- }
560
-
561
- .icon-option {
562
- display: inline-grid;
563
- place-items: center;
564
- width: 36px;
565
- height: 36px;
566
- padding: 0;
567
- border: 1px solid transparent;
568
- border-radius: var(--dpk-radius-sm);
569
- background: transparent;
570
- cursor: pointer;
571
- }
572
-
573
- .icon-option .status-icon {
574
- width: 18px;
575
- height: 18px;
576
- }
577
-
578
- .icon-option:hover,
579
- .icon-option:focus-visible {
580
- outline: none;
581
- background: var(--dpk-paper-inset);
582
- }
583
-
584
- .icon-option[aria-checked='true'] {
585
- border-color: color-mix(in oklab, var(--usm-tone) 55%, transparent);
586
- background: color-mix(in oklab, var(--usm-tone) 12%, transparent);
587
- }
588
-
589
- /* A label's color, where a status shows its icon. */
590
- .label-swatch {
591
- width: 12px;
592
- height: 12px;
593
- border-radius: 4px;
594
- background: var(--usm-tone);
595
- }
596
-
597
- /* A member's initial in their color, where a label shows its swatch. */
598
- .member-avatar {
599
- display: inline-grid;
600
- place-items: center;
601
- width: 22px;
602
- height: 22px;
603
- border-radius: 50%;
604
- background: var(--usm-tone);
605
- color: var(--dpk-paper-raised);
606
- font-size: 11px;
607
- font-weight: 700;
608
- line-height: 1;
609
- }
610
-
611
- /* The tools stay at the end of whatever line the row's content ends on. */
612
- .st-tools {
613
- display: inline-flex;
614
- gap: 2px;
615
- margin-left: auto;
616
- }
617
-
618
- .st-tools .dpk-icon-btn {
619
- width: 26px;
620
- height: 26px;
621
- font-size: 13px;
622
- }
623
-
624
- /* The same empty state the map's pages use, repeated here because a section
625
- does not inherit the page's CSS (see the file header). */
626
- .empty {
627
- border: 1px dashed var(--dpk-rule-strong);
628
- border-radius: var(--dpk-radius-lg);
629
- padding: 28px 24px;
630
- background: var(--dpk-dots), var(--dpk-paper-sunken);
631
- max-width: 620px;
632
- display: grid;
633
- gap: 10px;
634
- }
635
- `;class Ci extends Ae{static{this.styles=[Na,Ot,Ke,xt,Ni]}static{this.properties={kind:{type:String},locale:{type:String},context:{attribute:!1}}}#t=null;#e=new _t(this);render(){const t=this.context;if(t===null)return u;const s=ne(this.locale??"ja"),a=t.state;if(this.kind==="labels")return Ii(s,t,gi(a));if(this.kind==="members")return Li(s,t,fi(a));const n={openFor:this.#t,toggle:i=>{this.#t=this.#t===i?null:i,this.requestUpdate()},close:()=>{this.#t=null,this.requestUpdate()}};return $i(s,t,Ri(a),n)}updated(){const t=this.renderRoot.querySelector("#icon-menu"),s=this.#t===null?null:this.renderRoot.querySelector(`[data-icon-trigger="${CSS.escape(this.#t)}"]`);t===null||s===null||this.#e.open(t,s,Oi)}}const Bi=()=>{customElements.get("dpk-internal-usm-settings-section")||customElements.define("dpk-internal-usm-settings-section",Ci)},vt=e=>`${de(e)} ${e.name}`,Yi=(e,t)=>{const s=N(e,`${t.activityId}.${t.stepId}`);if(!s)return;const a=U(e,t.milestoneId),n=`${s.activity.name} \u203A ${s.step.name}`;return a?`${n} (${a.name})`:n},Ui=(e,t)=>e.stories.filter(s=>(s.blockedBy??[]).includes(t.id)).map(s=>de(s)),Pi=(e,t)=>(t.blockedBy??[]).flatMap(s=>{const a=T(e,s);return a?[de(a)]:[]}),zi=e=>`[${e.label??e.url}](${e.url})`,Ks=(e,t,s)=>{const a=[],n=($,L)=>{a.push(`- ${$}: ${L}`)},i=D(t,s.statusId);i&&n(e.storyStatusLabel,i.name);const o=Yi(t,s);o&&n(e.copyInfoStep,o);const r=z(t,s.estimateId);r&&n(e.storyEstimateLabel,`${r.name} (${r.points})`);const d=lt(t,s);d&&n(e.storyAssigneeLabel,d.name);const p=pt(t,s).map($=>$.name);p.length>0&&n(e.storyLabelsLabel,p.join(", "));const m=Ui(t,s);m.length>0&&n(e.copyInfoBlocks,m.join(", "));const y=Pi(t,s);y.length>0&&n(e.copyInfoWaitsOn,y.join(", "));const E=(s.links??[]).map(zi);E.length>0&&n(e.storyLinksLabel,E.join(", "));const S=[`### ${vt(s)}`];a.length>0&&S.push("",...a);const A=(s.description??"").replace(/\s+$/,"");return A!==""&&S.push("",A),`${S.join(`
636
- `).replace(/[ \t]+$/gm,"").trimEnd()}
637
- `},Fi=O(pn),Vi=O(Za),Gi=3,Hi=q`
638
- /*
639
- * The card is the kit's card atom (it was back-ported from this one); what
640
- * stays here is the map's own: the status icon, the dependency chips and the
641
- * host's states mapped onto the card.
642
- */
643
- :host {
644
- --dpk-card-tone: var(--usm-tone, var(--dpk-ink-faint));
645
- display: block;
646
- }
647
-
648
- :host(:focus-visible) {
649
- outline: none;
650
- }
651
-
652
- /* The card is the button that opens its story; the keyboard ring is the focused look. */
653
- :host(:focus-visible) .dpk-card {
654
- border-color: var(--dpk-blue);
655
- box-shadow: var(--dpk-focus);
656
- }
657
-
658
- :host(:focus-visible) .dpk-card[data-state~='dimmed'] {
659
- opacity: 0.85;
660
- filter: none;
661
- }
662
-
663
- /* With a story open, the cards it waits on and the cards waiting on it stand out. */
664
- :host([data-relation='blocker']) {
665
- --dpk-card-mark: var(--dpk-amber);
666
- }
667
-
668
- :host([data-relation='dependent']) {
669
- --dpk-card-mark: var(--dpk-violet);
670
- }
671
-
672
- .card-status {
673
- flex: none;
674
- display: inline-flex;
675
- margin-top: 1.5px;
676
- }
677
-
678
- /*
679
- * Where the story sits among the others. A story that holds others up is
680
- * work to pull forward (a spike), so its chip is the loud one; one still
681
- * waiting reads quieter and goes away once its blockers are done.
682
- */
683
- .dep-chip {
684
- display: inline-flex;
685
- align-items: center;
686
- gap: 4px;
687
- padding: 0 7px;
688
- border-radius: 6px;
689
- font-size: 10.5px;
690
- font-weight: 650;
691
- line-height: 18px;
692
- white-space: nowrap;
693
- }
694
-
695
- .dep-chip svg {
696
- flex: none;
697
- width: 12px;
698
- height: 12px;
699
- }
700
-
701
- .dep-chip[data-kind='blocks'] {
702
- background: var(--dpk-amber);
703
- color: var(--dpk-paper-raised);
704
- }
705
-
706
- .dep-chip[data-kind='waits'] {
707
- border: 1px dashed color-mix(in oklab, var(--dpk-ink-faint) 60%, transparent);
708
- color: var(--dpk-ink-soft);
709
- }
710
-
711
- .dpk-pill,
712
- .dpk-avatar {
713
- --tone: var(--usm-tone);
714
- }
715
-
716
- .card-links .link-chip {
717
- border-color: color-mix(in oklab, var(--dpk-card-tone) 16%, var(--dpk-rule));
718
- background: var(--dpk-paper-raised);
719
- }
720
- `;class Ki extends Ae{static{this.styles=[Ca,Wa,Ke,Dt,Hi]}static{this.properties={story:{attribute:!1},map:{attribute:!1},stepName:{attribute:!1},statuses:{attribute:!1},labels:{attribute:!1},reviewCount:{type:Number},estimate:{attribute:!1},assignee:{attribute:!1},blocks:{type:Number},waits:{type:Number},focused:{type:Boolean,reflect:!0},dragging:{type:Boolean,reflect:!0},highlight:{attribute:"data-highlight"},relation:{attribute:"data-relation"}}}#t=new Qe(this);constructor(){super(),this.story=null,this.map=dt(),this.stepName="",this.statuses=[],this.labels=[],this.reviewCount=0,this.estimate=null,this.assignee=null,this.blocks=0,this.waits=0,this.focused=!1,this.dragging=!1,this.highlight=null,this.relation=null}getContextMenuItems(t){const s=this.story;if(!s)return null;const a=ne(this.#t.locale),n=de(s);return[{id:"usm-story-card",entries:[{kind:"item",id:"copy-story-id",label:a.copyId,run:()=>{Me(n)}},{kind:"item",id:"copy-story-id-title",label:a.copyIdTitle,run:()=>{Me(vt(s))}},{kind:"item",id:"copy-story-info",label:a.copyStoryInfo,run:()=>{Me(Ks(a,this.map,s))}}]}]}render(){const t=this.story;if(!t)return u;const s=ne(this.#t.locale),a=t.comments?.length??0;return l`<div class="dpk-card" data-interactive data-state=${this.#e()}>
721
- <div class="dpk-card-head">
722
- ${this.statuses.length===0?u:this.#n(s,t)}
723
- <div class="dpk-card-title"><span>${t.name}</span></div>
724
- ${this.estimate||this.assignee?this.#i(s):u}
725
- </div>
726
- ${t.description?l`<div class="dpk-card-text" @click=${Wi}>
727
- ${Ba(Ya(t.description))}
728
- </div>`:u}
729
- ${this.blocks>0||this.waits>0?this.#a(s):u}
730
- ${this.labels.length>0?qi(this.labels):u}
731
- ${t.links&&t.links.length>0?this.#s(t.links):u}
732
- <div class="dpk-card-foot">
733
- <span class="dpk-card-key">${de(t)}</span>
734
- ${this.stepName===""?u:l`<span class="dpk-card-chip" data-kind="step"><span>${this.stepName}</span></span>`}
735
- ${a>0?l`<span
736
- class="dpk-card-chip"
737
- data-variant="count"
738
- data-kind="comments"
739
- aria-label=${s.commentCountAria(a)}
740
- >
741
- ${Ua()}<span>${a}</span>
742
- </span>`:u}
743
- ${this.reviewCount>0?l`<span
744
- class="dpk-card-chip"
745
- data-variant="count"
746
- data-tone="accent"
747
- data-kind="review"
748
- aria-label=${s.reviewCountAria(this.reviewCount)}
749
- >
750
- ${It()}<span>${this.reviewCount}</span>
751
- </span>`:u}
752
- </div>
753
- </div>`}#e(){const t=[this.focused?"selected":"",this.highlight==="on"?"highlight":this.highlight==="dimmed"?"dimmed":"",this.dragging?"dragging":"",this.relation?"marked":""].filter(s=>s!=="");return t.length===0?u:t.join(" ")}#n(t,s){const a=Gs(this.statuses,s);if(!a)return u;const n=a.name;return l`<span class="card-status" role="img" aria-label=${t.storyStatusAria(n)} title=${n}>
754
- ${re(a)}
755
- </span>`}#i(t){const{estimate:s,assignee:a}=this;return l`<span class="dpk-card-meta">
756
- ${s?l`<span
757
- class="dpk-card-chip"
758
- data-variant="outline"
759
- data-kind="estimate"
760
- title=${t.estimateChipTitle(t.estimateText(s.name,s.points))}
761
- >${s.name}</span
762
- >`:u}
763
- ${a?l`<span
764
- class="dpk-avatar"
765
- data-kind="assignee"
766
- style=${M(a.tone)}
767
- title=${t.assigneeChipTitle(a.name)}
768
- >${yt(a.name)}</span
769
- >`:u}
770
- </span>`}#a(t){return l`<div class="dpk-card-row card-deps">
771
- ${this.blocks>0?l`<span class="dep-chip" data-kind="blocks" title=${t.blocksChipTitle(this.blocks)}
772
- >${Fi()}${t.blocksChip(this.blocks)}</span
773
- >`:u}
774
- ${this.waits>0?l`<span class="dep-chip" data-kind="waits" title=${t.waitsChipTitle(this.waits)}
775
- >${Vi()}${t.waitsChip(this.waits)}</span
776
- >`:u}
777
- </div>`}#s(t){const s=t.slice(0,Gi);return l`<div class="dpk-card-row card-links">
778
- ${s.map(a=>{const n=Re(a.url);return l`<a
779
- class="link-chip"
780
- data-kind=${n.kind}
781
- href=${a.url}
782
- target="_blank"
783
- rel="noopener noreferrer"
784
- title=${a.label??n.title}
785
- draggable="false"
786
- tabindex="-1"
787
- @click=${i=>i.stopPropagation()}
788
- >${Rt(n.kind)}<span>${a.label??n.text}</span></a
789
- >`})}
790
- ${t.length>s.length?l`<span class="link-chip">+${t.length-s.length}</span>`:u}
791
- </div>`}}const qi=e=>l`<div class="dpk-card-row card-labels">
792
- ${e.map(t=>l`<span class="dpk-pill" data-label=${t.id} style=${M(t.tone)}>${t.name}</span>`)}
793
- </div>`,Wi=e=>{e.target instanceof Element&&e.target.closest("a")&&e.stopPropagation()},ji=()=>{customElements.get("dpk-internal-usm-story-card")||customElements.define("dpk-internal-usm-story-card",Ki)},qs=e=>{const t=e.slice(0,-1).map(is),s=t.reduce((n,i)=>n+i,0),a=t.map(n=>s>0?n/s*se:se/t.length);return a.slice(0,-1).map((n,i)=>a.slice(0,i+1).reduce((o,r)=>o+r,0))},Ws=(e,t,s)=>{if(t<0||t>=e.length)return e;const a=e[t-1]??0,n=e[t+1]??se;return e.map((i,o)=>o===t?Math.min(n,Math.max(a,Math.round(s))):i)},We=e=>[...e,se].map((t,s)=>t-(e[s-1]??0)),Xi=(e,t)=>{const s=We(t.map(a=>Math.round(a)));return e.slice(0,-1).flatMap((a,n)=>{const i=s[n]??0;return a.weight===i?[]:[{statusId:a.id,weight:i}]})},Zi=q`
794
- :host {
795
- display: block;
796
- }
797
- .wb {
798
- display: grid;
799
- grid-template-columns: minmax(0, 1fr) auto;
800
- column-gap: 10px;
801
- row-gap: 4px;
802
- align-items: center;
803
- }
804
- .wb-track {
805
- position: relative;
806
- height: 36px;
807
- border-radius: var(--dpk-radius-sm);
808
- background: var(--dpk-paper-sunken);
809
- touch-action: none;
810
- }
811
- .wb-part {
812
- position: absolute;
813
- top: 0;
814
- bottom: 0;
815
- display: flex;
816
- align-items: center;
817
- gap: 6px;
818
- min-width: 0;
819
- padding: 0 10px;
820
- overflow: hidden;
821
- background: color-mix(in oklab, var(--usm-tone) 16%, var(--dpk-paper-raised));
822
- color: var(--dpk-ink);
823
- font-size: 12px;
824
- font-weight: 600;
825
- white-space: nowrap;
826
- transition:
827
- left 120ms ease-out,
828
- width 120ms ease-out;
829
- }
830
- .wb-track[data-dragging] .wb-part {
831
- transition: none;
832
- }
833
- .wb-parts {
834
- position: absolute;
835
- inset: 0;
836
- overflow: hidden;
837
- border-radius: inherit;
838
- }
839
- .wb-name {
840
- min-width: 0;
841
- overflow: hidden;
842
- text-overflow: ellipsis;
843
- }
844
- .wb-value {
845
- flex: none;
846
- color: var(--usm-tone);
847
- font-family: var(--dpk-mono);
848
- font-variant-numeric: tabular-nums;
849
- }
850
- .wb-line {
851
- position: absolute;
852
- top: -4px;
853
- bottom: -4px;
854
- z-index: 1;
855
- width: 14px;
856
- margin-left: -7px;
857
- border-radius: var(--dpk-radius-sm);
858
- outline: none;
859
- cursor: col-resize;
860
- }
861
- .wb-line::before {
862
- content: '';
863
- position: absolute;
864
- top: 0;
865
- bottom: 0;
866
- left: 6px;
867
- width: 2px;
868
- border-radius: 1px;
869
- background: var(--dpk-ink-soft);
870
- transition: background 120ms ease-out;
871
- }
872
- /* The grip says the line can be taken hold of. */
873
- .wb-line::after {
874
- content: '';
875
- position: absolute;
876
- top: 50%;
877
- left: 2px;
878
- width: 10px;
879
- height: 20px;
880
- margin-top: -10px;
881
- border: 1px solid var(--dpk-rule-strong);
882
- border-radius: 5px;
883
- background: var(--dpk-paper-raised);
884
- box-shadow: var(--dpk-shadow-xs);
885
- transition: border-color 120ms ease-out;
886
- }
887
- .wb-line:hover::before,
888
- .wb-line[data-active]::before {
889
- background: var(--dpk-ink);
890
- }
891
- .wb-line:hover::after,
892
- .wb-line[data-active]::after {
893
- border-color: var(--dpk-ink-soft);
894
- }
895
- .wb-line:focus-visible {
896
- box-shadow: var(--dpk-focus);
897
- }
898
- .wb-end {
899
- display: flex;
900
- align-items: center;
901
- gap: 6px;
902
- color: var(--dpk-ink-faint);
903
- font-size: 12px;
904
- font-weight: 600;
905
- white-space: nowrap;
906
- }
907
- .wb-scale {
908
- position: relative;
909
- height: 12px;
910
- color: var(--dpk-ink-faint);
911
- font-family: var(--dpk-mono);
912
- font-size: 10px;
913
- }
914
- .wb-tick {
915
- position: absolute;
916
- top: 0;
917
- width: 1px;
918
- height: 3px;
919
- background: var(--dpk-rule-strong);
920
- }
921
- .wb-scale-end {
922
- position: absolute;
923
- top: 0;
924
- line-height: 12px;
925
- }
926
- .wb-scale-end[data-at='0'] {
927
- left: 0;
928
- }
929
- .wb-scale-end[data-at='max'] {
930
- right: 0;
931
- }
932
- @media (prefers-reduced-motion: reduce) {
933
- .wb-part,
934
- .wb-line::before,
935
- .wb-line::after {
936
- transition: none;
937
- }
938
- }
939
- `;class Ji extends Ae{static{this.styles=[Ke,Zi]}static{this.properties={statuses:{attribute:!1},dividers:{attribute:!1},commit:{attribute:!1},drag:{state:!0}}}#t=new Qe(this);constructor(){super(),this.statuses=[],this.dividers=[],this.commit=()=>{},this.drag=null}disconnectedCallback(){super.disconnectedCallback(),this.#r()}render(){const t=ne(this.#t.locale),s=this.statuses.slice(0,-1),a=this.statuses.at(-1);if(!a||s.length===0)return u;const n=this.drag?.dividers??this.dividers,i=We(n),o=r=>`${r/se*100}%`;return l`<div class="wb">
940
- <div class="wb-track" role="group" aria-label=${t.statusWeightLabel} ?data-dragging=${this.drag!==null}>
941
- <div class="wb-parts">
942
- ${s.map((r,d)=>{const p=n[d-1]??0,m=i[d]??0;return l`<span
943
- class="wb-part"
944
- data-part=${r.id}
945
- title=${`${r.name} ${je(m)}`}
946
- style=${`${M(r.tone)}; left: ${o(p)}; width: ${o(m)}`}
947
- >
948
- <span class="wb-name">${r.name}</span><span class="wb-value">${je(m)}</span>
949
- </span>`})}
950
- </div>
951
- ${n.map((r,d)=>this.#e(t,s,n,d,o(r)))}
952
- </div>
953
- <span class="wb-end" data-end style=${M(a.tone)}>${re(a)}${a.name}</span>
954
- <div class="wb-scale" aria-hidden="true">
955
- ${Array.from({length:se-1},(r,d)=>l`<span class="wb-tick" style=${`left: ${o(d+1)}`}></span>`)}
956
- <span class="wb-scale-end" data-at="0">0</span>
957
- <span class="wb-scale-end" data-at="max">${se}</span>
958
- </div>
959
- </div>`}#e(t,s,a,n,i){const o=s[n]?.name??"",r=s[n+1]?.name??"",d=We(a),p=a[n]??0;return l`<span
960
- class="wb-line"
961
- role="slider"
962
- tabindex="0"
963
- style=${`left: ${i}`}
964
- aria-label=${t.weightLineLabel(o,r)}
965
- aria-valuemin=${String(a[n-1]??0)}
966
- aria-valuemax=${String(a[n+1]??se)}
967
- aria-valuenow=${String(p)}
968
- aria-valuetext=${t.weightLineValue(o,je(d[n]??0),r,je(d[n+1]??0))}
969
- ?data-active=${this.drag?.index===n}
970
- @keydown=${m=>this.#n(m,n)}
971
- @pointerdown=${m=>this.#i(m,n)}
972
- ></span>`}#n(t,s){const a=this.dividers[s]??0,n=(()=>{switch(t.key){case"ArrowLeft":case"ArrowDown":return a-1;case"ArrowRight":case"ArrowUp":return a+1;case"Home":return 0;case"End":return se;default:return null}})();n!==null&&(t.preventDefault(),this.#l(Ws(this.dividers,s,n)))}#i(t,s){t.button===0&&(t.preventDefault(),t.currentTarget instanceof HTMLElement&&t.currentTarget.focus({preventScroll:!0}),this.drag={index:s,dividers:this.dividers},document.addEventListener("pointermove",this.#a),document.addEventListener("pointerup",this.#s),document.addEventListener("pointercancel",this.#o))}#a=t=>{const s=this.renderRoot.querySelector(".wb-track")?.getBoundingClientRect();if(!this.drag||!s||s.width===0)return;const a=(t.clientX-s.left)/s.width*se;this.drag={...this.drag,dividers:Ws(this.drag.dividers,this.drag.index,a)}};#s=()=>{const t=this.drag?.dividers;this.#r(),t&&this.#l(t)};#o=()=>this.#r();#r(){this.drag=null,document.removeEventListener("pointermove",this.#a),document.removeEventListener("pointerup",this.#s),document.removeEventListener("pointercancel",this.#o)}#l(t){t.some((s,a)=>s!==this.dividers[a])&&this.commit(t)}}const je=e=>String(Math.round(e*10)/10),Qi=()=>{customElements.get("dpk-internal-usm-weight-bar")||customElements.define("dpk-internal-usm-weight-bar",Ji)},eo=(e,t,s)=>{const a=e.at(-1)??null;if(t===null||s==="end")return a;const n=e.indexOf(t);return n<0?a:s==="after"?t:n===0?null:e.at(n-1)??null},js=(e,t,s,a,n)=>{const i=ze(e,t.stepId,t.milestoneId).map(o=>o.id);return{type:"MOVE_STORY",target:{type:"story",id:s},payload:{activityId:t.activityId,stepId:t.stepId,milestoneId:t.milestoneId??null,after:Nt(i,s,a,n)}}},Xs=(e,t,s,a,n,i)=>{const o=T(e,a);if(!o||o.activityId!==t)return null;const r=Qt(e,t,s).map(d=>d.id);return{type:"MOVE_STORY",target:{type:"story",id:a},payload:{activityId:t,stepId:o.stepId,milestoneId:s??null,after:Nt(r,a,n,i)}}},Zs=(e,t,s,a,n)=>{const i=ze(e,a,n).filter(o=>o.id!==t);return{type:"MOVE_STORY",target:{type:"story",id:t},payload:{activityId:s,stepId:a,milestoneId:n??null,after:i.at(-1)?.id??null}}},to=e=>{const t=e.stories.length,s=Pe(e);return e.milestones.map((a,n)=>{const i=e.stories.filter(r=>r.milestoneId===a.id),o=new Set(i.map(r=>r.stepId));return{id:a.id,ordinal:n+1,name:a.name,timeframe:a.timeframe?.trim()??"",description:a.description?.trim()??"",storyCount:i.length,share:t===0?0:i.length/t,coverage:{covered:s.filter(({step:r})=>o.has(r.id)).length,total:s.length},progress:Hs(e,i)}})},so="__unassigned__",Js="__add-milestone__",Xe="__add-activity__",Qs="__add-activity-step__",ea=(e,t)=>{const s=a=>t.stories.filter(n=>n.milestoneId===a).length;return[...t.milestones.map(({id:a,name:n,timeframe:i,questions:o})=>({id:a,name:n,timeframe:i?.trim()??"",storyCount:s(a),...o===void 0?{}:{questions:o}})),{id:void 0,name:e.unassigned,timeframe:"",storyCount:s(void 0)}]},Ze=e=>e.id??so,ta=e=>[...e.map(t=>({id:Ze(t),draggable:t.id!==void 0})),{id:Js,draggable:!1}],ao=e=>[...e.activities.map(t=>({id:t.id,subColumns:t.steps.map(s=>({id:s.id}))})),{id:Xe,draggable:!1,subColumns:[{id:Qs,draggable:!1}]}],no=e=>[...e.activities.map(t=>({id:t.id})),{id:Xe,draggable:!1}],io=(e,t)=>l`
973
- <div class="empty">
974
- <h2>${e.emptyTitle}</h2>
975
- <p>${e.emptyBody}</p>
976
- <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>Ps(e,t)}>
977
- ${e.firstActivityButton}
978
- </button>
979
- </div>
980
- `,oo=e=>{const{m:t,context:s}=e,a=Pe(s.state);return a.length===0?io(t,s):sa(s)==="activity"?lo(e,a):po(e)},sa=e=>e.navigation.view==="group"?"group":"activity",ro=(e,t)=>{const s=sa(t);return l`<div class="dpk-segmented view-tabs" role="tablist" aria-label=${e.groupingLabel}>
981
- ${aa(t,"activity",s,e.activityGroup)}
982
- ${aa(t,"group",s,e.groupViewTab)}
983
- </div>`},aa=(e,t,s,a)=>l`<a role="tab" aria-selected=${t===s?"true":"false"} href=${e.hashFor({view:t})}
984
- >${a}</a
985
- >`,lo=(e,t)=>{const{m:s,context:a,handlers:n}=e,{state:i}=a,o=ea(s,i);return l`
986
- <dpk-matrix
987
- data-testid="usm-map"
988
- .rows=${ta(o)}
989
- .columns=${ao(i)}
990
- @dpk-matrix-reorder-row=${r=>n.reorderMilestone(r.detail)}
991
- @dpk-matrix-reorder-column=${r=>n.reorderActivity(r.detail)}
992
- @dpk-matrix-reorder-sub-column=${r=>n.reorderStep(r.detail)}
993
- >
994
- <div class="corner" slot=${Ct}><span class="dpk-label">${s.groupAxisHeader}</span></div>
995
- ${B(i.activities,r=>r.id,r=>ia(e,r.id))}
996
- ${oa(s,a)} ${na(s,ja)}
997
- ${B(t,({activity:r,step:d})=>`${r.id}.${d.id}`,({activity:r,step:d})=>co(e,r.id,d))}
998
- ${uo()}
999
- ${B(o,r=>r.id,r=>da(e,r))}
1000
- ${B(o,r=>r.id,r=>l`${B(t,({activity:d,step:p})=>`${d.id}.${p.id}`,({activity:d,step:p})=>ho(e,Ze(r),{activityId:d.id,stepId:p.id,milestoneId:r.id}))}`)}
1001
- ${ra(s,a)}
1002
- </dpk-matrix>
1003
- `},po=e=>{const{m:t,context:s,handlers:a}=e,{state:n}=s,i=ea(t,n);return l`
1004
- <dpk-matrix
1005
- data-testid="usm-map-group"
1006
- .rows=${ta(i)}
1007
- .columns=${no(n)}
1008
- @dpk-matrix-reorder-row=${o=>a.reorderMilestone(o.detail)}
1009
- @dpk-matrix-reorder-column=${o=>a.reorderActivity(o.detail)}
1010
- >
1011
- ${na(t,Ct)}
1012
- ${B(n.activities,o=>o.id,o=>ia(e,o.id,!0))}
1013
- ${oa(t,s)}
1014
- ${B(i,o=>o.id,o=>da(e,o))}
1015
- ${B(i,o=>o.id,o=>l`${B(n.activities,r=>r.id,r=>bo(e,Ze(o),r.id,o.id))}`)}
1016
- ${ra(t,s)}
1017
- </dpk-matrix>
1018
- `},na=(e,t)=>l`<div class="corner" slot=${t}>
1019
- <span class="dpk-label">${e.activityAxis}</span>
1020
- <span class="dpk-label">${e.milestoneAxis}</span>
1021
- </div>`,ia=(e,t,s=!1)=>{const{m:a,context:n}=e,{state:i}=n,o=i.activities.find(p=>p.id===t);if(!o)return l`<div class="act-head"></div>`;const r=i.stories.filter(p=>p.activityId===o.id),d=Hs(i,r);return l`
1022
- <div
1023
- class="act-head"
1024
- data-activity=${o.id}
1025
- data-column=${o.id}
1026
- data-dpk-target=${I({type:"activity",id:o.id})}
1027
- data-dpk-check="off"
1028
- data-grill-questions=${Oe(Le(o.questions))}
1029
- slot=${Bt(o.id)}
1030
- >
1031
- <div class="act-title">
1032
- <span class="act-name">
1033
- <dpk-inline-edit
1034
- draggable="false"
1035
- wrap
1036
- .value=${o.name}
1037
- .label=${a.activityNameLabel}
1038
- @dpk-commit=${Q(p=>n.dispatch({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:o.id},payload:{name:p}}))}
1039
- ></dpk-inline-edit>
1040
- <span class="act-actor" data-empty=${String(o.actor===void 0)}>
1041
- <dpk-inline-edit
1042
- draggable="false"
1043
- truncate
1044
- .value=${o.actor??""}
1045
- .label=${a.activityActorLabel}
1046
- .placeholder=${a.activityActorLabel}
1047
- @dpk-commit=${Q(p=>n.dispatch({type:"SET_ACTIVITY_ACTOR",target:{type:"activity",id:o.id},payload:{actor:p}}))}
1048
- ></dpk-inline-edit>
1049
- </span>
1050
- </span>
1051
- <span class="dpk-count" data-size="sm">${r.length}</span>
1052
- <button
1053
- class="dpk-icon-btn"
1054
- type="button"
1055
- aria-label=${a.addStepAria}
1056
- @click=${()=>yi(a,n,o.id)}
1057
- >
1058
- ${Pa()}
1059
- </button>
1060
- </div>
1061
- ${Us(d,a.progressAria(d.map(p=>`${p.name} ${p.count}`).join(", ")))}
1062
- ${s&&o.steps.length>0?l`<ol class="act-steps">
1063
- ${o.steps.map(p=>l`<li>${p.name}</li>`)}
1064
- </ol>`:u}
1065
- </div>
1066
- `},co=(e,t,s)=>{const{m:a,context:n}=e,i=ce(t,s.id);return l`
1067
- <div
1068
- class="col-head"
1069
- data-step=${i}
1070
- data-column=${t}
1071
- data-column-step=${s.id}
1072
- data-current=${String(n.navigation.step===s.id)}
1073
- data-dpk-target=${I({type:"step",id:i})}
1074
- data-dpk-check="off"
1075
- data-grill-questions=${Oe(Le(s.questions))}
1076
- slot=${Yt(t,s.id)}
1077
- >
1078
- <h4>
1079
- <dpk-inline-edit
1080
- draggable="false"
1081
- .value=${s.name}
1082
- .label=${a.stepNameLabel}
1083
- @dpk-commit=${Q(o=>n.dispatch({type:"SET_STEP_NAME",target:{type:"step",id:s.id},payload:{name:o}}))}
1084
- @click=${o=>o.stopPropagation()}
1085
- ></dpk-inline-edit>
1086
- </h4>
1087
- <span class="dpk-count" data-size="sm">${es(n.state,s.id)}</span>
1088
- </div>
1089
- `},oa=(e,t)=>l`<div class="act-head" slot=${Bt(Xe)}>
1090
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ps(e,t)}>
1091
- ${e.newActivityButton}
1092
- </button>
1093
- </div>`,uo=()=>l`<div class="corner" slot=${Yt(Xe,Qs)}>
1094
- <span class="dpk-label">—</span>
1095
- </div>`,ra=(e,t)=>l`<div class="row-lead" slot=${Ut(Js)}>
1096
- <div class="row-head">
1097
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>zs(e,t)}>
1098
- ${e.newMilestoneButton}
1099
- </button>
1100
- </div>
1101
- </div>`,da=(e,t)=>{const{m:s,context:a}=e,n=t.id,i=Ut(Ze(t));if(n===void 0)return l`<div class="row-lead" slot=${i}>
1102
- <div class="row-head" data-unassigned="true" data-milestone=""><span>${t.name}</span></div>
1103
- ${la(s,t)}
1104
- </div>`;const o=mo(s,a,n,t.name);return l`
1105
- <div class="row-lead" slot=${i}>
1106
- <div
1107
- class="row-head"
1108
- data-milestone=${n}
1109
- data-dpk-target=${I({type:"milestone",id:n})}
1110
- data-dpk-check="off"
1111
- data-grill-questions=${Oe(Le(t.questions))}
1112
- >
1113
- ${o}
1114
- </div>
1115
- ${la(s,t)}
1116
- </div>
1117
- `},la=(e,t)=>l`<div class="row-meta">
1118
- ${t.timeframe===""?u:l`<span class="row-timeframe">${t.timeframe}</span>`}
1119
- <span class="row-count">${e.storyCount(t.storyCount)}</span>
1120
- </div>`,mo=(e,t,s,a)=>l`<dpk-inline-edit
1121
- draggable="false"
1122
- .value=${a}
1123
- .label=${e.milestoneNameLabel}
1124
- @dpk-commit=${Q(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:s},payload:{name:n}}))}
1125
- ></dpk-inline-edit>`,ho=(e,t,s)=>{const{m:a,context:n,drag:i,handlers:o}=e,r=Ge(n.state,n.navigation),d=ze(n.state,s.stepId,s.milestoneId).filter(y=>$s(r,y)),p=`cell:${s.stepId}:${s.milestoneId??""}`,m=i.target({key:p,accepts:"story",hovered:ca,onDrop:y=>o.dropOnCell(s,y)});return l`
1126
- <div
1127
- class="cell"
1128
- data-step=${s.stepId}
1129
- data-milestone=${s.milestoneId??""}
1130
- data-column=${s.activityId}
1131
- data-column-step=${s.stepId}
1132
- data-drop=${String(i.isOver(p))}
1133
- slot=${Pt(t,{columnId:s.activityId,subColumnId:s.stepId})}
1134
- @dragenter=${m.dragenter}
1135
- @dragover=${m.dragover}
1136
- @dragleave=${m.dragleave}
1137
- @drop=${m.drop}
1138
- >
1139
- <div class="card-list" data-testid=${`cell-${s.stepId}-${s.milestoneId??"unassigned"}`}>
1140
- ${B(d,y=>y.id,y=>pa(e,y,""))}
1141
- </div>
1142
- <button
1143
- class="dpk-add add-cell"
1144
- type="button"
1145
- title=${a.addStoryCellAria}
1146
- @click=${()=>Fs(a,n,s.activityId,s.stepId,s.milestoneId)}
1147
- >
1148
- ${a.addCellButton}
1149
- </button>
1150
- </div>
1151
- `},bo=(e,t,s,a)=>{const{m:n,context:i,drag:o,handlers:r}=e,{state:d}=i,p=Ge(d,i.navigation),m=Qt(d,s,a).filter(L=>$s(p,L)),y=d.activities.find(L=>L.id===s)?.steps??[],E=y[0],S=L=>y.find(c=>c.id===L)?.name??"",A=`group:${s}:${a??""}`,$=o.target({key:A,accepts:"story",hovered:ca,onDrop:L=>r.dropOnGroupCell(s,a,L)});return l`
1152
- <div
1153
- class="cell"
1154
- data-activity=${s}
1155
- data-milestone=${a??""}
1156
- data-column=${s}
1157
- data-drop=${String(o.isOver(A))}
1158
- slot=${Pt(t,{columnId:s})}
1159
- @dragenter=${$.dragenter}
1160
- @dragover=${$.dragover}
1161
- @dragleave=${$.dragleave}
1162
- @drop=${$.drop}
1163
- >
1164
- <div class="card-list" data-testid=${`group-cell-${s}-${a??"unassigned"}`}>
1165
- ${B(m,L=>L.id,L=>pa(e,L,S(L.stepId)))}
1166
- </div>
1167
- ${E?l`<button
1168
- class="dpk-add add-cell"
1169
- type="button"
1170
- aria-label=${n.addStoryCellAria}
1171
- @click=${()=>Fs(n,i,s,E.id,a)}
1172
- >
1173
- ${n.addCellButton}
1174
- </button>`:u}
1175
- </div>
1176
- `},pa=(e,t,s)=>{const{context:a,drag:n,handlers:i}=e,o=he(a.state),r=n.source({type:"story",id:t.id}),d=vs(a.state,t.id);return l`<dpk-internal-usm-story-card
1177
- data-story=${t.id}
1178
- data-status=${t.statusId??""}
1179
- data-relation=${fo(a.state,a.navigation.story,t)??u}
1180
- data-highlight=${go(e.highlighted,t.id)??u}
1181
- data-dpk-target=${I({type:"story",id:t.id})}
1182
- data-grill-questions=${Oe(Le(t.questions))}
1183
- draggable="true"
1184
- tabindex="0"
1185
- role="button"
1186
- aria-haspopup="dialog"
1187
- aria-label=${t.name}
1188
- style=${M(Gs(o,t)?.tone)}
1189
- .story=${t}
1190
- .map=${a.state}
1191
- .stepName=${s}
1192
- .statuses=${o}
1193
- .labels=${pt(a.state,t)}
1194
- .reviewCount=${a.commentCount({type:"story",id:t.id})}
1195
- .estimate=${P(a.state,"estimates")?z(a.state,t.estimateId)??null:null}
1196
- .assignee=${P(a.state,"assignees")?lt(a.state,t)??null:null}
1197
- .blocks=${d.dependents.length}
1198
- .waits=${d.openBlockers}
1199
- @click=${()=>i.selectStory(t.id)}
1200
- @keydown=${p=>{p.composedPath()[0]!==p.currentTarget||p.key!=="Enter"&&p.key!==" "||(p.preventDefault(),i.selectStory(t.id))}}
1201
- ?focused=${a.navigation.story===t.id}
1202
- ?dragging=${n.isDragging("story",t.id)}
1203
- @dragstart=${r.dragstart}
1204
- @dragend=${r.dragend}
1205
- ></dpk-internal-usm-story-card>`},go=(e,t)=>{if(e!==null)return e.has(t)?"on":"dimmed"},fo=(e,t,s)=>{if(!(t===void 0||t===s.id))return s.blockedBy?.includes(t)?"dependent":e.stories.find(a=>a.id===t)?.blockedBy?.includes(s.id)?"blocker":void 0},ca=e=>{const t=e.target instanceof Element?e.target.closest("dpk-internal-usm-story-card"):null;return t?{id:t.getAttribute("data-story"),element:t}:null},yo=(e,t)=>At((s,a)=>{const n=s.trim()===""?Number.NaN:Number(s);if(!Number.isFinite(n)||n<0){a.value=String(e);return}n!==e&&t(n)}),vo=O(za),ko=O(mn),wo={width:720,height:240,inset:{top:16,right:20,bottom:26,left:40}},So={width:340,height:150,inset:{top:12,right:14,bottom:24,left:32}},Eo=(e,t,s,a)=>{const{state:n,navigation:i}=t,o=An(n,i),r=ge(n);return l`
1206
- <section class="bd-overview" data-testid="usm-burndown">
1207
- <header class="bd-bar">
1208
- ${o?$o(e,t,o,a):u}
1209
- ${To(e,t,r)}
1210
- ${o?l`<span class="bd-record">
1211
- <button
1212
- class="dpk-btn dpk-btn--primary"
1213
- type="button"
1214
- data-role="record-snapshot"
1215
- title=${e.recordSnapshotHint}
1216
- @click=${()=>Ei(t,new Date)}
1217
- >
1218
- ${e.recordSnapshotButton}
1219
- </button>
1220
- </span>`:u}
1221
- </header>
1222
- ${r==="stories"?u:xo(e,t,r)}
1223
- ${o?_o(e,t,o,r,s):l`<div class="empty">
1224
- <h2>${e.burndownTab}</h2>
1225
- <p>${e.noMilestonesForBurndown}</p>
1226
- </div>`}
1227
- <div class="bd-side">${Io(e,t)}</div>
1228
- </section>
1229
- `},$o=(e,t,s,a)=>{const{state:n}=t;return l`<label class="bd-control">
1230
- <span>${e.burndownMilestoneLabel}</span>
1231
- ${a.render({options:n.milestones.map(i=>({value:i.id,label:i.name})),value:s.id,onChange:i=>t.navigate({milestone:i}),ariaLabel:e.burndownMilestoneLabel,className:"bd-milestone-select"})}
1232
- </label>
1233
- <label class="bd-control" data-dpk-target=${I({type:"milestone",id:s.id})}>
1234
- <span>${e.dueDateLabel}</span>
1235
- <input
1236
- class="dpk-input"
1237
- type="date"
1238
- data-role="due-date"
1239
- .value=${s.dueDate??""}
1240
- @change=${At(i=>{const o=i===""?null:i;o!==(s.dueDate??null)&&t.dispatch({type:"SET_MILESTONE_DUE_DATE",target:{type:"milestone",id:s.id},payload:{dueDate:o}})})}
1241
- />
1242
- </label>`},To=(e,t,s)=>l`<span class="bd-control">
1243
- <span id="bd-measure-label">${e.measureLabel}</span>
1244
- <span class="bd-measures" role="radiogroup" aria-labelledby="bd-measure-label">
1245
- ${Vt.map(a=>l`<label class="bd-measure"
1246
- ><input
1247
- type="radio"
1248
- name="bd-measure"
1249
- value=${a}
1250
- .checked=${a===s}
1251
- @change=${()=>t.dispatch({type:"SET_MEASURE",target:{type:"page",id:"usm"},payload:{measure:a}})}
1252
- />${e.measureName(a)}</label
1253
- >`)}
1254
- </span>
1255
- </span>`,xo=(e,t,s)=>{const{state:a}=t,n=ns(a),i=qs(n),o=a.estimates.map(d=>`${d.name} ${d.points}`).join(" \xB7 "),r=We(i).map((d,p)=>`${n[p]?.name??""} ${Math.round(d*10)/10}`).join(" \xB7 ");return l`<details class="bd-settings" data-testid="usm-measure-settings" open>
1256
- <summary class="bd-settings-summary">
1257
- <span class="bd-settings-chevron" aria-hidden="true"></span>
1258
- <span class="bd-settings-title">${e.measureSettingsLabel}</span>
1259
- <span class="bd-settings-gist">
1260
- <span>${e.estimatesLabel}: ${o===""?"\u2014":`${o} pt`}</span>
1261
- ${s==="weighted"?l`<span>${e.statusWeightLabel}: ${i.length===0?"\u2014":r}</span>`:u}
1262
- </span>
1263
- </summary>
1264
- <div class="bd-settings-body">
1265
- ${Ao(e,t)} ${s==="weighted"?Lo(e,t):u}
1266
- </div>
1267
- </details>`},_o=(e,t,s,a,n)=>{const{state:i}=t,o=Ln(i,s.id,n.getTime()),r=a==="weighted",d=i.stories.filter(p=>p.milestoneId===s.id&&p.estimateId===void 0).length;return l`
1268
- ${a!=="stories"&&d>0?l`<p class="bd-warning" role="note" data-testid="usm-unestimated-warning">
1269
- ${ko()}<span>${e.unestimatedNote(d)}</span>
1270
- </p>`:u}
1271
- <figure class="bd-chart bd-chart--combined">
1272
- <figcaption>
1273
- <span class="bd-chart-title">${e.combinedChartTitle(r)}</span>
1274
- <span class="bd-about">
1275
- <button class="bd-about-btn" type="button" aria-label=${e.chartAbout} aria-describedby="bd-about-tip">
1276
- ${vo()}
1277
- </button>
1278
- <span class="bd-about-tip" id="bd-about-tip" role="tooltip">${e.combinedChartHint(a)}</span>
1279
- </span>
1280
- <span class="bd-chart-latest">${e.chartLatest(ma(o.combined))}</span>
1281
- </figcaption>
1282
- ${ua({chart:"combined",title:e.combinedChartTitle(r),points:o.combined,due:o.due,now:n.getTime(),size:wo,tone:"accent"})}
1283
- </figure>
1284
- ${o.byStatus.length===0?u:l`<section class="bd-multiples" aria-label=${e.statusChartsLabel}>
1285
- <h3>${e.statusChartsLabel}</h3>
1286
- <div class="bd-grid">
1287
- ${o.byStatus.map(({status:p,points:m})=>l`<figure class="bd-chart" data-status=${p.id}>
1288
- <figcaption>
1289
- <span class="bd-chart-title">${e.statusChartTitle(p.name)}</span>
1290
- <span class="bd-chart-latest">${e.chartLatest(ma(m))}</span>
1291
- </figcaption>
1292
- ${ua({chart:"status",statusId:p.id,title:e.statusChartTitle(p.name),points:m,due:o.due,now:n.getTime(),size:So,tone:p.tone})}
1293
- </figure>`)}
1294
- </div>
1295
- </section>`}
1296
- `},ua=e=>l`<dpk-internal-usm-burndown-chart
1297
- data-chart=${e.chart}
1298
- data-status=${e.statusId??u}
1299
- .points=${e.points}
1300
- .due=${e.due}
1301
- .now=${e.now}
1302
- .size=${e.size}
1303
- .tone=${e.tone}
1304
- .label=${e.title}
1305
- ></dpk-internal-usm-burndown-chart>`,Io=(e,t)=>{const s=[...t.state.snapshots].reverse();return l`<section class="bd-panel">
1306
- <h3>${e.snapshotsLabel}<span class="bd-count">${s.length}</span></h3>
1307
- ${s.length===0?l`<p class="bd-empty">${e.noSnapshots} ${e.chartNeedsSnapshot}</p>`:l`<ol class="bd-snapshots">
1308
- ${B(s,a=>a.id,a=>{const n={type:"snapshot",id:a.id},i=ue(a.at),o=a.tally.reduce((r,d)=>r+d.stories,0);return l`<li data-snapshot=${a.id} data-dpk-target=${I(n)}>
1309
- <span class="bd-snapshot-at">${i}</span>
1310
- <span class="bd-snapshot-sum">${e.storyCount(o)}</span>
1311
- <button
1312
- class="dpk-icon-btn"
1313
- type="button"
1314
- data-role="delete-snapshot"
1315
- aria-label=${e.deleteSnapshotAria(i)}
1316
- @click=${()=>t.dispatch({type:"DELETE_SNAPSHOT",target:n,payload:{}})}
1317
- >
1318
- ${et()}
1319
- </button>
1320
- </li>`})}
1321
- </ol>`}
1322
- </section>`},Ao=(e,t)=>{const{estimates:s}=t.state;return l`<section class="bd-panel" data-testid="usm-estimates">
1323
- <h3>${e.estimatesLabel}<span class="bd-count">${s.length}</span></h3>
1324
- <p class="bd-empty">${e.estimatesHint}</p>
1325
- ${s.length===0?u:l`<ol class="bd-estimates">
1326
- ${B(s,a=>a.id,(a,n)=>Mo(e,t,a,n))}
1327
- </ol>`}
1328
- <div>
1329
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Si(e,t)}>
1330
- ${e.newEstimateButton}
1331
- </button>
1332
- </div>
1333
- </section>`},Mo=(e,t,s,a)=>{const{estimates:n}=t.state,i={type:"estimate",id:s.id};return l`<li data-estimate=${s.id} data-dpk-target=${I(i)}>
1334
- <span class="bd-estimate-name">
1335
- <dpk-inline-edit
1336
- .value=${s.name}
1337
- .label=${e.estimateNameLabel}
1338
- @dpk-commit=${Q(o=>t.dispatch({type:"SET_ESTIMATE_NAME",target:i,payload:{name:o}}))}
1339
- ></dpk-inline-edit>
1340
- </span>
1341
- <label class="bd-estimate-points">
1342
- <input
1343
- class="dpk-input"
1344
- type="number"
1345
- min="0"
1346
- step="any"
1347
- inputmode="decimal"
1348
- data-role="points"
1349
- aria-label=${e.estimatePointsLabel}
1350
- .value=${String(s.points)}
1351
- @change=${yo(s.points,o=>t.dispatch({type:"SET_ESTIMATE_POINTS",target:i,payload:{points:o}}))}
1352
- />
1353
- <span>pt</span>
1354
- </label>
1355
- ${qe(e,{ids:n.map(o=>o.id),row:{previousId:n[a-1]?.id??null,nextId:n[a+1]?.id??null},deleteLabel:e.deleteEstimateAria,reorder:o=>t.dispatch({type:"REORDER_ESTIMATE",target:i,payload:{after:o}}),remove:()=>t.dispatch({type:"DELETE_ESTIMATE",target:i,payload:{}})})}
1356
- </li>`},Lo=(e,t)=>{const{state:s}=t,a=ns(s),n=qs(a);return l`<section class="bd-panel" data-testid="usm-weights">
1357
- <h3>${e.statusWeightLabel}</h3>
1358
- <p class="bd-empty">${e.statusWeightHint}</p>
1359
- ${n.length>0?l`<dpk-internal-usm-weight-bar
1360
- .statuses=${he(s).slice(0,a.length)}
1361
- .dividers=${n}
1362
- .commit=${i=>{for(const{statusId:o,weight:r}of Xi(a,i))t.dispatch({type:"SET_STATUS_WEIGHT",target:{type:"status",id:o},payload:{weight:r}})}}
1363
- ></dpk-internal-usm-weight-bar>`:l`<p class="bd-empty">${e.weightsNeedStatuses}</p>`}
1364
- </section>`},ma=e=>e.at(-1)?.value??0,Do=q`
1365
- .bd-overview {
1366
- display: grid;
1367
- gap: 18px;
1368
- max-width: 1040px;
1369
- padding: 28px 0 40px;
1370
- }
1371
- .bd-bar {
1372
- display: flex;
1373
- flex-wrap: wrap;
1374
- align-items: flex-end;
1375
- gap: 12px 16px;
1376
- }
1377
- .bd-control {
1378
- display: grid;
1379
- gap: 4px;
1380
- min-width: 0;
1381
- }
1382
- .bd-control > span:first-child {
1383
- color: var(--dpk-ink-faint);
1384
- font-size: 11px;
1385
- font-weight: 600;
1386
- }
1387
- .bd-control .dpk-rich-select {
1388
- min-width: 160px;
1389
- }
1390
- .bd-control .dpk-input {
1391
- width: 160px;
1392
- font-family: var(--dpk-mono);
1393
- font-variant-numeric: tabular-nums;
1394
- }
1395
- /* One row at any width: on a narrow screen each option wraps its own name instead of the row wrapping. */
1396
- .bd-measures {
1397
- display: inline-flex;
1398
- max-width: 100%;
1399
- padding: 2px;
1400
- border: 1px solid var(--dpk-rule-strong);
1401
- border-radius: var(--dpk-radius-sm);
1402
- background: var(--dpk-paper-sunken);
1403
- }
1404
- .bd-measure {
1405
- position: relative;
1406
- display: grid;
1407
- flex: 1 1 auto;
1408
- place-items: center;
1409
- min-width: 0;
1410
- padding: 4px 12px;
1411
- text-align: center;
1412
- border-radius: calc(var(--dpk-radius-sm) - 2px);
1413
- color: var(--dpk-ink-soft);
1414
- font-size: 12.5px;
1415
- font-weight: 600;
1416
- cursor: pointer;
1417
- }
1418
- /* The radio stays in the page for the keyboard and the reader; the label is what shows. */
1419
- .bd-measure input {
1420
- position: absolute;
1421
- inset: 0;
1422
- margin: 0;
1423
- opacity: 0;
1424
- cursor: pointer;
1425
- }
1426
- .bd-measure:has(input:checked) {
1427
- background: var(--dpk-paper-raised);
1428
- color: var(--dpk-ink);
1429
- box-shadow: var(--dpk-shadow-xs);
1430
- }
1431
- .bd-measure:has(input:focus-visible) {
1432
- box-shadow: var(--dpk-focus);
1433
- }
1434
- .bd-settings {
1435
- display: grid;
1436
- gap: 10px;
1437
- }
1438
- .bd-settings-summary {
1439
- display: flex;
1440
- flex-wrap: wrap;
1441
- align-items: center;
1442
- gap: 4px 10px;
1443
- justify-self: start;
1444
- padding: 4px 10px 4px 6px;
1445
- border-radius: var(--dpk-radius-sm);
1446
- color: var(--dpk-ink-soft);
1447
- font-size: 12px;
1448
- list-style: none;
1449
- cursor: pointer;
1450
- user-select: none;
1451
- }
1452
- .bd-settings-summary::-webkit-details-marker {
1453
- display: none;
1454
- }
1455
- .bd-settings-summary:hover {
1456
- background: var(--dpk-paper-sunken);
1457
- color: var(--dpk-ink);
1458
- }
1459
- .bd-settings-summary:focus-visible {
1460
- outline: none;
1461
- box-shadow: var(--dpk-focus);
1462
- }
1463
- .bd-settings-chevron {
1464
- width: 6px;
1465
- height: 6px;
1466
- margin: 0 3px;
1467
- border-right: 1.5px solid currentColor;
1468
- border-bottom: 1.5px solid currentColor;
1469
- transform: rotate(-45deg);
1470
- transition: transform 160ms var(--dpk-ease);
1471
- }
1472
- .bd-settings[open] .bd-settings-chevron {
1473
- transform: rotate(45deg);
1474
- }
1475
- .bd-settings-title {
1476
- font-weight: 650;
1477
- }
1478
- .bd-settings-gist {
1479
- display: inline-flex;
1480
- flex-wrap: wrap;
1481
- gap: 2px 14px;
1482
- color: var(--dpk-ink-faint);
1483
- font-family: var(--dpk-mono);
1484
- font-size: 11.5px;
1485
- font-variant-numeric: tabular-nums;
1486
- }
1487
- /* Side by side while both fit; the scale alone takes the row. */
1488
- .bd-settings-body {
1489
- display: grid;
1490
- grid-template-columns: repeat(auto-fit, minmax(max(300px, calc((100% - 12px) / 2)), 1fr));
1491
- gap: 12px;
1492
- align-items: start;
1493
- }
1494
- .bd-record {
1495
- margin-left: auto;
1496
- }
1497
- .bd-warning {
1498
- display: flex;
1499
- align-items: flex-start;
1500
- gap: 8px;
1501
- margin: 0;
1502
- padding: 8px 12px;
1503
- border: 1px solid color-mix(in oklab, var(--dpk-amber) 40%, var(--dpk-rule));
1504
- border-radius: var(--dpk-radius-sm);
1505
- background: color-mix(in oklab, var(--dpk-amber) 10%, var(--dpk-paper-raised));
1506
- color: var(--dpk-ink);
1507
- font-size: 12.5px;
1508
- line-height: 1.5;
1509
- }
1510
- .bd-warning svg {
1511
- flex: none;
1512
- width: 15px;
1513
- height: 15px;
1514
- margin-top: 2px;
1515
- color: var(--dpk-amber);
1516
- }
1517
- .bd-empty {
1518
- margin: 0;
1519
- color: var(--dpk-ink-faint);
1520
- font-size: 12px;
1521
- line-height: 1.5;
1522
- }
1523
- .bd-chart {
1524
- display: grid;
1525
- gap: 8px;
1526
- margin: 0;
1527
- padding: 14px 16px 10px;
1528
- border: 1px solid var(--dpk-rule);
1529
- border-radius: var(--dpk-radius-lg);
1530
- background: var(--dpk-paper-raised);
1531
- box-shadow: var(--dpk-shadow-xs);
1532
- }
1533
- .bd-chart figcaption {
1534
- display: flex;
1535
- flex-wrap: wrap;
1536
- align-items: baseline;
1537
- gap: 4px 12px;
1538
- }
1539
- .bd-chart-title {
1540
- font-size: 13.5px;
1541
- font-weight: 650;
1542
- }
1543
- .bd-chart-latest {
1544
- margin-left: auto;
1545
- color: var(--dpk-ink-soft);
1546
- font-family: var(--dpk-mono);
1547
- font-size: 12px;
1548
- font-variant-numeric: tabular-nums;
1549
- }
1550
- .bd-about {
1551
- position: relative;
1552
- display: inline-flex;
1553
- align-self: center;
1554
- }
1555
- .bd-about-btn {
1556
- display: inline-grid;
1557
- place-items: center;
1558
- width: 20px;
1559
- height: 20px;
1560
- padding: 0;
1561
- border: 0;
1562
- border-radius: 50%;
1563
- background: none;
1564
- color: var(--dpk-ink-faint);
1565
- cursor: help;
1566
- }
1567
- .bd-about-btn:hover,
1568
- .bd-about-btn:focus-visible {
1569
- outline: none;
1570
- color: var(--dpk-ink);
1571
- }
1572
- .bd-about-btn:focus-visible {
1573
- box-shadow: var(--dpk-focus);
1574
- }
1575
- .bd-about-btn svg {
1576
- width: 15px;
1577
- height: 15px;
1578
- }
1579
- .bd-about-tip {
1580
- position: absolute;
1581
- top: calc(100% + 6px);
1582
- left: -8px;
1583
- z-index: 2;
1584
- width: max-content;
1585
- max-width: 360px;
1586
- padding: 8px 10px;
1587
- border: 1px solid var(--dpk-rule-strong);
1588
- border-radius: var(--dpk-radius-sm);
1589
- background: var(--dpk-paper-raised);
1590
- box-shadow: var(--dpk-shadow-sm);
1591
- color: var(--dpk-ink-soft);
1592
- font-size: 12px;
1593
- font-weight: 400;
1594
- line-height: 1.5;
1595
- visibility: hidden;
1596
- opacity: 0;
1597
- transition: opacity 120ms var(--dpk-ease);
1598
- }
1599
- .bd-about:hover .bd-about-tip,
1600
- .bd-about-btn:focus-visible + .bd-about-tip {
1601
- visibility: visible;
1602
- opacity: 1;
1603
- }
1604
- .bd-multiples {
1605
- display: grid;
1606
- gap: 10px;
1607
- }
1608
- .bd-multiples h3,
1609
- .bd-panel h3 {
1610
- display: flex;
1611
- align-items: center;
1612
- gap: 8px;
1613
- margin: 0;
1614
- color: var(--dpk-ink-soft);
1615
- font-size: 12px;
1616
- font-weight: 650;
1617
- letter-spacing: 0.02em;
1618
- }
1619
- .bd-grid {
1620
- display: grid;
1621
- grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
1622
- gap: 12px;
1623
- }
1624
- .bd-side {
1625
- display: grid;
1626
- gap: 12px;
1627
- align-items: start;
1628
- }
1629
- .bd-panel {
1630
- display: grid;
1631
- gap: 10px;
1632
- padding: 14px 16px;
1633
- border: 1px solid var(--dpk-rule);
1634
- border-radius: var(--dpk-radius-lg);
1635
- background: var(--dpk-paper-raised);
1636
- box-shadow: var(--dpk-shadow-xs);
1637
- }
1638
- .bd-count {
1639
- color: var(--dpk-ink-faint);
1640
- font-family: var(--dpk-mono);
1641
- font-weight: 500;
1642
- }
1643
- .bd-snapshots,
1644
- .bd-estimates {
1645
- display: grid;
1646
- margin: 0;
1647
- padding: 0;
1648
- list-style: none;
1649
- }
1650
- .bd-snapshots li,
1651
- .bd-estimates li {
1652
- display: grid;
1653
- align-items: center;
1654
- gap: 10px;
1655
- min-height: 34px;
1656
- }
1657
- .bd-snapshots li {
1658
- grid-template-columns: minmax(0, 1fr) auto 26px;
1659
- }
1660
- .bd-estimates li {
1661
- grid-template-columns: minmax(0, 1fr) 96px auto;
1662
- }
1663
- .bd-snapshots li + li,
1664
- .bd-estimates li + li {
1665
- border-top: 1px solid var(--dpk-rule);
1666
- }
1667
- .bd-snapshot-at,
1668
- .bd-snapshot-sum {
1669
- font-family: var(--dpk-mono);
1670
- font-size: 12px;
1671
- font-variant-numeric: tabular-nums;
1672
- }
1673
- .bd-snapshot-sum {
1674
- color: var(--dpk-ink-faint);
1675
- }
1676
- .bd-snapshots .dpk-icon-btn {
1677
- width: 26px;
1678
- height: 26px;
1679
- }
1680
- .bd-estimate-name {
1681
- min-width: 0;
1682
- font-family: var(--dpk-mono);
1683
- font-size: 13px;
1684
- font-weight: 650;
1685
- }
1686
- .bd-estimate-points {
1687
- display: inline-flex;
1688
- align-items: center;
1689
- gap: 5px;
1690
- color: var(--dpk-ink-faint);
1691
- font-size: 11px;
1692
- }
1693
- .bd-estimate-points .dpk-input {
1694
- min-height: 28px;
1695
- padding: 3px 8px;
1696
- font-family: var(--dpk-mono);
1697
- font-size: 12px;
1698
- font-variant-numeric: tabular-nums;
1699
- }
1700
- @media (prefers-reduced-motion: reduce) {
1701
- .bd-settings-chevron {
1702
- transition: none;
1703
- }
1704
- }
1705
- @media (max-width: 640px) {
1706
- .bd-record {
1707
- margin-left: 0;
1708
- }
1709
- .bd-control .dpk-rich-select,
1710
- .bd-control .dpk-input {
1711
- width: 100%;
1712
- min-width: 0;
1713
- }
1714
- }
1715
- `,Ro=/[ァ-ヶ]/g,ha=e=>e.normalize("NFKC").toLowerCase().replace(Ro,t=>String.fromCharCode(t.charCodeAt(0)-96)),Oo=(e,t)=>{const s=ha(t).split(/\s+/).filter(Boolean),a=ha(e);return s.every(n=>a.includes(n))},ba=(e,t,s,a)=>(s==="blocker"?Yn(e,t):Un(e,t)).flatMap(i=>{const o=N(e,`${i.activityId}.${i.stepId}`),r=o?[o.activity.name,o.step.name]:[];return Oo([de(i),i.name,...r].join(" "),a)?[{story:i,place:r}]:[]}),ga=(e,t,s,a,n,i)=>{const{state:o}=t;if(ba(o,s,a,"").length===0)return u;const r=n.search?.side===a?n.search:null,d=r?ba(o,s,a,r.query):[],p=Math.max(0,Math.min(r?.active??0,d.length-1)),m=r?d[p]:void 0,y=a==="blocker"?e.addBlockerPlaceholder:e.addDependentPlaceholder,E=`dep-${a}-choices`,S=c=>`dep-${a}-${c.story.id}`,A=c=>{r||!(c.currentTarget instanceof HTMLInputElement)||n.set({side:a,query:c.currentTarget.value,active:0})},$=c=>{i(c.story.id),n.set(null)},L=c=>{if(!c.isComposing)switch(fa(c)){case"ArrowDown":case"ArrowUp":{if(c.preventDefault(),!r){A(c);return}if(d.length===0)return;const x=fa(c)==="ArrowDown"?1:-1;n.set({...r,active:(p+x+d.length)%d.length});return}case"Enter":if(!m)return;c.preventDefault(),$(m);return;case"Escape":if(!r)return;c.preventDefault(),n.set(null);return}};return l`<div class="sp-dep-picker">
1716
- <input
1717
- class="dpk-input sp-dep-search"
1718
- type="text"
1719
- role="combobox"
1720
- data-role=${`add-${a}`}
1721
- aria-label=${y}
1722
- placeholder=${y}
1723
- autocomplete="off"
1724
- spellcheck="false"
1725
- aria-autocomplete="list"
1726
- aria-expanded=${String(d.length>0)}
1727
- aria-controls=${E}
1728
- aria-activedescendant=${m?S(m):u}
1729
- .value=${r?.query??""}
1730
- @focus=${A}
1731
- @click=${A}
1732
- @input=${c=>{c.currentTarget instanceof HTMLInputElement&&n.set({side:a,query:c.currentTarget.value,active:0})}}
1733
- @keydown=${L}
1734
- @blur=${()=>{r&&n.set(null)}}
1735
- />
1736
- ${r?d.length===0?l`<p class="sp-dep-none" role="status">${e.noDependencyMatch}</p>`:l`<ul id=${E} class="sp-dep-choices" role="listbox" aria-label=${y}>
1737
- ${d.map(c=>No(o,c,S(c),c===m,$))}
1738
- </ul>`:u}
1739
- </div>`},fa=e=>!e.ctrlKey||e.altKey||e.metaKey||e.shiftKey?e.key:e.key==="n"?"ArrowDown":e.key==="p"?"ArrowUp":e.key,No=(e,t,s,a,n)=>{const i=he(e).find(o=>o.id===t.story.statusId);return l`<li
1740
- id=${s}
1741
- role="option"
1742
- data-story=${t.story.id}
1743
- aria-selected=${String(a)}
1744
- @pointerdown=${o=>o.preventDefault()}
1745
- @click=${()=>n(t)}
1746
- >
1747
- <span class="sp-dep-choice-name" style=${M(i?.tone)}>
1748
- ${i?re(i):u}<span>${t.story.name}</span>
1749
- </span>
1750
- ${t.place.length===0?u:l`<span class="sp-dep-choice-place">${t.place.map(o=>l`<span>${o}</span>`)}</span>`}
1751
- </li>`},Co=q`
1752
- .sp-dep-picker {
1753
- display: grid;
1754
- gap: 4px;
1755
- }
1756
- /* The choices push the panel's content down rather than float: the panel
1757
- scrolls, and a list hanging out of it would be cut. */
1758
- .sp-dep-choices {
1759
- display: grid;
1760
- gap: 1px;
1761
- max-height: 240px;
1762
- margin: 0;
1763
- padding: 4px;
1764
- overflow-y: auto;
1765
- overscroll-behavior: contain;
1766
- border: 1px solid var(--dpk-rule-strong);
1767
- border-radius: var(--dpk-radius-sm);
1768
- background: var(--dpk-paper-raised);
1769
- box-shadow: var(--dpk-shadow-xs);
1770
- list-style: none;
1771
- }
1772
- .sp-dep-choices [role='option'] {
1773
- display: grid;
1774
- gap: 1px;
1775
- padding: 5px 8px;
1776
- border-radius: var(--dpk-radius-sm);
1777
- cursor: pointer;
1778
- }
1779
- .sp-dep-choices [role='option']:hover,
1780
- .sp-dep-choices [role='option'][aria-selected='true'] {
1781
- background: var(--dpk-paper-sunken);
1782
- }
1783
- .sp-dep-choice-name {
1784
- display: flex;
1785
- align-items: center;
1786
- gap: 8px;
1787
- min-width: 0;
1788
- color: var(--dpk-ink);
1789
- font-size: 12.5px;
1790
- font-weight: 600;
1791
- }
1792
- .sp-dep-choice-name > span,
1793
- .sp-dep-choice-place {
1794
- overflow: hidden;
1795
- text-overflow: ellipsis;
1796
- white-space: nowrap;
1797
- }
1798
- .sp-dep-choice-place {
1799
- padding-left: 22px;
1800
- color: var(--dpk-ink-faint);
1801
- font-size: 11px;
1802
- }
1803
- .sp-dep-choice-place span + span::before {
1804
- content: ' / ';
1805
- }
1806
- .sp-dep-none {
1807
- margin: 0;
1808
- padding: 6px 2px;
1809
- color: var(--dpk-ink-faint);
1810
- font-size: 12px;
1811
- }
1812
- `,Bo=O(cn),Yo=(e,t)=>{const s=Ve(t.navigation)==="critical-path",a=s?ks(t.state).ids.size:null;return l`<button
1813
- class="dpk-btn dpk-btn--ghost highlight-toggle"
1814
- type="button"
1815
- data-highlight-toggle="critical-path"
1816
- aria-pressed=${String(s)}
1817
- title=${e.criticalPathHint}
1818
- @click=${()=>t.navigate({highlight:s?null:"critical-path"})}
1819
- >
1820
- ${Bo()}<span>${e.criticalPathButton}</span>
1821
- ${a===null?u:l`<span class="highlight-count">${e.criticalPathCount(a)}</span>`}
1822
- </button>`},Uo=q`
1823
- .highlight-toggle {
1824
- gap: 6px;
1825
- margin-left: auto;
1826
- }
1827
- .highlight-toggle svg {
1828
- width: 14px;
1829
- height: 14px;
1830
- }
1831
- .highlight-toggle[aria-pressed='true'] {
1832
- border-color: color-mix(in oklab, var(--dpk-accent) 55%, var(--dpk-rule-strong));
1833
- background: color-mix(in oklab, var(--dpk-accent) 12%, var(--dpk-paper-raised));
1834
- color: var(--dpk-ink);
1835
- }
1836
- .highlight-toggle[aria-pressed='true'] svg {
1837
- color: var(--dpk-accent);
1838
- }
1839
- .highlight-count {
1840
- color: var(--dpk-ink-soft);
1841
- font-family: var(--dpk-mono);
1842
- font-size: 10.5px;
1843
- font-variant-numeric: tabular-nums;
1844
- }
1845
- `,Po=(e,t,s)=>{const{state:a}=t,n=Te.filter(r=>fe(a,r).length>0);if(n.length===0)return u;const i=Ge(a,t.navigation),o=Object.fromEntries(Te.map(r=>[r,null]));return l`<div class="map-filter" role="group" aria-label=${e.filterLabel} data-testid="usm-map-filter">
1846
- ${n.map(r=>Fo(e,t,i,r,s))} ${zo(e,t)}
1847
- ${Hn(i)?l`<a class="filter-clear" href=${t.hashFor(o)}>${e.clearFilter}</a>`:u}
1848
- </div>`},zo=(e,t)=>{const{state:s}=t,a=ss(s);if(!a||s.statuses.length<2)return u;const n=Ss(s,t.navigation).size===0,i=s.stories.filter(o=>$e(s,o)).length;return l`<label class="show-finished">
1849
- <input
1850
- type="checkbox"
1851
- data-show-finished
1852
- .checked=${n}
1853
- @change=${o=>{const r=o.currentTarget instanceof HTMLInputElement&&o.currentTarget.checked;t.navigate({[oe.key]:r?oe.value:null})}}
1854
- />
1855
- <span>${e.showFinished(a.name)}</span>
1856
- <span class="show-finished-count">${i}</span>
1857
- </label>`},Fo=(e,t,s,a,n)=>{const i=s[a],o=Ho(e,t.state,s.hiddenStatusIds,a),r=o.filter(p=>i.has(p.id)),d=n.openFor===a;return l`<span class="filter-field">
1858
- <button
1859
- class="dpk-filter"
1860
- type="button"
1861
- data-filter-trigger=${a}
1862
- data-active=${String(r.length>0)}
1863
- aria-haspopup="menu"
1864
- aria-expanded=${String(d)}
1865
- @click=${()=>n.toggle(a)}
1866
- >
1867
- <span class="filter-key">${e.filterKeyLabel(a)}</span>
1868
- <span class="filter-value">${Vo(e,r)}</span>
1869
- </button>
1870
- ${d?Go(e,t,a,i,o,n):u}
1871
- </span>`},Vo=(e,t)=>{const[s]=t;return s?t.length===1?s.name:`${s.name} +${t.length-1}`:e.filterAll},Go=(e,t,s,a,n,i)=>l`<div
1872
- id="filter-menu"
1873
- class="comment-pop filter-menu"
1874
- popover="manual"
1875
- role="menu"
1876
- aria-label=${e.filterKeyLabel(s)}
1877
- data-filter=${s}
1878
- @keydown=${o=>{o.key==="Escape"&&(o.preventDefault(),i.close())}}
1879
- >
1880
- <a
1881
- class="filter-option"
1882
- role="menuitemcheckbox"
1883
- data-option=""
1884
- aria-checked=${String(a.size===0)}
1885
- href=${t.hashFor({[s]:null})}
1886
- >
1887
- <span class="filter-check">${a.size===0?De():u}</span>
1888
- <span class="filter-name">${e.filterAll}</span>
1889
- </a>
1890
- ${n.map(o=>{const r=a.has(o.id);return l`<a
1891
- class="filter-option"
1892
- role="menuitemcheckbox"
1893
- data-option=${o.id}
1894
- data-none=${o.id===ie?"true":u}
1895
- aria-checked=${String(r)}
1896
- style=${o.style}
1897
- href=${t.hashFor({[s]:Es(t.state,s,Gn(a,o.id))})}
1898
- >
1899
- <span class="filter-check">${r?De():u}</span>
1900
- ${o.mark}
1901
- <span class="filter-name" title=${o.name}>${o.name}</span>
1902
- <span class="filter-count">${o.count}</span>
1903
- </a>`})}
1904
- </div>`,Ho=(e,t,s,a)=>{const n=i=>t.stories.filter(o=>o.statusId===void 0||!s.has(o.statusId)).filter(i).length;switch(a){case"status":return he(t).filter(i=>!s.has(i.id)).map(i=>({id:i.id,name:i.name,count:n(o=>o.statusId===i.id),mark:re(i),style:M(i.tone)}));case"label":return fe(t,a).map(i=>{const o=t.labels.find(r=>r.id===i);return{id:i,name:o?.name??e.noLabel,count:n(r=>o?(r.labelIds??[]).includes(i):(r.labelIds??[]).length===0),mark:l`<span class="filter-dot"></span>`,style:M(o?.tone)}});case"estimate":return fe(t,a).map(i=>{const o=z(t,i);return{id:i,name:o?.name??e.unestimatedFilter,count:n(r=>(r.estimateId??ie)===i),mark:o?l`<span class="filter-points">${o.points}pt</span>`:u,style:""}});case"assignee":return fe(t,a).map(i=>{const o=G(t,i);return{id:i,name:o?.name??e.noAssigneeFilter,count:n(r=>(r.assigneeId??ie)===i),mark:l`<span class="filter-dot"></span>`,style:M(o?.tone)}})}},Ko=q`
1905
- .show-finished {
1906
- display: inline-flex;
1907
- align-items: center;
1908
- gap: 6px;
1909
- padding: 0 4px;
1910
- color: var(--dpk-ink-soft);
1911
- font-size: 12px;
1912
- font-weight: 600;
1913
- cursor: pointer;
1914
- user-select: none;
1915
- }
1916
- .show-finished input {
1917
- margin: 0;
1918
- accent-color: var(--dpk-blue);
1919
- }
1920
- .show-finished-count {
1921
- color: var(--dpk-ink-faint);
1922
- font-family: var(--dpk-mono);
1923
- font-size: 10.5px;
1924
- font-variant-numeric: tabular-nums;
1925
- }
1926
- .map-filter {
1927
- display: flex;
1928
- flex-wrap: wrap;
1929
- align-items: center;
1930
- gap: 8px;
1931
- min-width: 0;
1932
- }
1933
- .filter-field {
1934
- min-width: 0;
1935
- }
1936
- .filter-clear {
1937
- margin-left: 2px;
1938
- color: var(--dpk-blue);
1939
- font-size: 12px;
1940
- font-weight: 600;
1941
- text-decoration: none;
1942
- }
1943
- .filter-clear:hover {
1944
- text-decoration: underline;
1945
- }
1946
- .comment-pop.filter-menu {
1947
- gap: 1px;
1948
- padding: 6px;
1949
- }
1950
- .filter-option {
1951
- display: flex;
1952
- align-items: center;
1953
- gap: 8px;
1954
- min-height: 30px;
1955
- padding: 4px 8px;
1956
- border-radius: var(--dpk-radius-sm);
1957
- color: var(--dpk-ink);
1958
- font-size: 12.5px;
1959
- font-weight: 550;
1960
- text-decoration: none;
1961
- }
1962
- .filter-option[data-none] .filter-name {
1963
- color: var(--dpk-ink-soft);
1964
- font-style: italic;
1965
- }
1966
- .filter-option:hover,
1967
- .filter-option:focus-visible {
1968
- outline: none;
1969
- background: var(--dpk-paper-sunken);
1970
- }
1971
- .filter-option:focus-visible {
1972
- box-shadow: var(--dpk-focus);
1973
- }
1974
- .filter-check {
1975
- flex: none;
1976
- display: inline-grid;
1977
- place-items: center;
1978
- width: 16px;
1979
- height: 16px;
1980
- color: var(--dpk-blue);
1981
- }
1982
- .filter-check svg {
1983
- width: 14px;
1984
- height: 14px;
1985
- }
1986
- .filter-name {
1987
- flex: 1;
1988
- min-width: 0;
1989
- overflow: hidden;
1990
- text-overflow: ellipsis;
1991
- white-space: nowrap;
1992
- }
1993
- .filter-dot {
1994
- flex: none;
1995
- width: 8px;
1996
- height: 8px;
1997
- border-radius: 50%;
1998
- background: var(--usm-tone, var(--dpk-ink-faint));
1999
- }
2000
- .filter-points,
2001
- .filter-count {
2002
- color: var(--dpk-ink-faint);
2003
- font-family: var(--dpk-mono);
2004
- font-size: 10.5px;
2005
- font-variant-numeric: tabular-nums;
2006
- }
2007
- `,qo=(e,t,s)=>l`<div class="map-toolbar" data-testid="usm-map-toolbar">
2008
- ${Po(e,t,s)} ${Yo(e,t)}
2009
- </div>`,Wo=q`
2010
- .map-toolbar {
2011
- display: flex;
2012
- flex-wrap: wrap;
2013
- align-items: center;
2014
- gap: 8px 12px;
2015
- padding: 5px 24px;
2016
- border-bottom: 1px solid var(--dpk-rule);
2017
- }
2018
- `,jo=(e,t,s)=>l`
2019
- <section class="ms-overview" data-testid="usm-milestones">
2020
- ${s.length===0?l`<div class="empty">
2021
- <h2>${e.noMilestonesTitle}</h2>
2022
- <p>${e.noMilestonesBody}</p>
2023
- </div>`:u}
2024
- <ol class="ms-timeline">
2025
- ${B(s,a=>a.id,a=>Xo(e,t,a))}
2026
- <li class="ms-add">
2027
- <span class="ms-when" aria-hidden="true"></span>
2028
- <span class="ms-rail" aria-hidden="true"><span class="ms-node ms-node--add"></span></span>
2029
- <div class="ms-body">
2030
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>zs(e,t)}>
2031
- ${e.newMilestoneButton}
2032
- </button>
2033
- </div>
2034
- </li>
2035
- </ol>
2036
- </section>
2037
- `,Xo=(e,t,s)=>{const a=s.id;return l`
2038
- <li class="ms-entry" data-milestone-card=${a} data-dpk-target=${I({type:"milestone",id:a})}>
2039
- <div class="ms-when">
2040
- ${s.timeframe===""?l`<span class="ms-timeframe" data-empty="true">${e.timeframeUnset}</span>`:l`<span class="ms-timeframe">${s.timeframe}</span>`}
2041
- </div>
2042
- <span class="ms-rail" aria-hidden="true"><span class="ms-node">${s.ordinal}</span></span>
2043
- <article class="ms-body">
2044
- <h3 class="ms-name">
2045
- <dpk-inline-edit
2046
- .value=${s.name}
2047
- .label=${e.milestoneNameLabel}
2048
- @dpk-commit=${Q(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:a},payload:{name:n}}))}
2049
- ></dpk-inline-edit>
2050
- </h3>
2051
- ${s.description===""?l`<p class="ms-description" data-empty="true">${e.milestoneNoDescription}</p>`:l`<p class="ms-description">${s.description}</p>`}
2052
- <dl class="ms-facts">
2053
- <div>
2054
- <dt>${e.storiesLabel}</dt>
2055
- <dd>
2056
- <strong>${s.storyCount}</strong>
2057
- <span>${e.shareOfStories(Math.round(s.share*100))}</span>
2058
- </dd>
2059
- </div>
2060
- <div>
2061
- <dt>${e.coverageLabel}</dt>
2062
- <dd>
2063
- <strong>${e.coverage(s.coverage.covered,s.coverage.total)}</strong>
2064
- <span class="ms-meter" aria-hidden="true">
2065
- <span
2066
- style=${`width:${s.coverage.total===0?0:s.coverage.covered/s.coverage.total*100}%`}
2067
- ></span>
2068
- </span>
2069
- </dd>
2070
- </div>
2071
- </dl>
2072
- ${s.progress.length===0?u:Zo(e,s)}
2073
- </article>
2074
- </li>
2075
- `},Zo=(e,t)=>l`
2076
- <div class="ms-breakdown">
2077
- ${Us(t.progress,e.progressAria(t.progress.map(s=>`${s.name} ${s.count}`).join(", ")))}
2078
- <ul class="ms-legend" aria-hidden="true">
2079
- ${t.progress.map(s=>l`<li data-status=${s.id} style=${M(s.tone)}>
2080
- ${re(s)}
2081
- <span class="ms-breakdown-name">${s.name}</span>
2082
- <span class="ms-breakdown-count">${s.count}</span>
2083
- </li>`)}
2084
- </ul>
2085
- </div>
2086
- `,Jo=(e,t,s,a,n,i)=>{if(s.kind!=="picking-step")return u;const o=T(t.state,s.storyId),r=te(t.state,s.activityId);if(!o||!r)return u;const d=r.steps[0]?.id??null,p=n??d;return l`<div class="comment-pop move-dialog" id="move-dialog" popover="manual">
2087
- <span class="dpk-label">${e.moveDialogLabel}</span>
2088
- ${a.render({options:r.steps.map(m=>({value:m.id,label:m.name})),value:p??"",onChange:i.pick,ariaLabel:e.moveDialogSelectLabel})}
2089
- <div class="pop-actions">
2090
- <button
2091
- class="dpk-btn dpk-btn--accent"
2092
- type="button"
2093
- @click=${()=>{p?i.confirm(p):i.cancel()}}
2094
- >
2095
- ${e.moveConfirm}
2096
- </button>
2097
- <button class="dpk-btn" type="button" @click=${i.cancel}>${e.moveCancel}</button>
2098
- </div>
2099
- </div>`},Qo=(e,t)=>l`<div class="board-head" data-testid="usm-board-head">${e}${t}</div>`,er=O(on),tr=(e,t,s,a)=>{const{state:n}=t,i=fs(n),o=i.filter(r=>a.folded.has(r));return l`
2100
- <div class="board-bar">
2101
- <div class="page-nav" style=${`min-width: ${a.minimum}px`}>
2102
- <div class="page-tabs dpk-tabstrip" role="tablist" aria-label=${e.pageTabsLabel}>
2103
- ${i.map(r=>sr(t,r,s,ya(e,r),va(n,r),a.folded.has(r)))}
2104
- </div>
2105
- <button
2106
- class="dpk-btn dpk-btn--ghost tabs-more"
2107
- type="button"
2108
- data-tabs-more-trigger
2109
- data-unused=${String(o.length===0)}
2110
- aria-label=${e.moreTabsLabel}
2111
- aria-haspopup="menu"
2112
- aria-expanded=${String(a.open)}
2113
- @click=${a.toggle}
2114
- >
2115
- ${er()}
2116
- </button>
2117
- ${a.open&&o.length>0?l`<div
2118
- id="tabs-menu"
2119
- class="comment-pop tabs-menu"
2120
- popover="manual"
2121
- role="menu"
2122
- aria-label=${e.moreTabsLabel}
2123
- @keydown=${r=>{r.key==="Escape"&&(r.preventDefault(),a.close())}}
2124
- >
2125
- ${o.map(r=>l`<a
2126
- class="tabs-menu-item"
2127
- role="menuitem"
2128
- data-tab=${r}
2129
- href=${t.hashFor({tab:r==="map"?null:r})}
2130
- @click=${a.close}
2131
- >${ya(e,r)}<span class="dpk-count">${va(n,r)}</span></a
2132
- >`)}
2133
- </div>`:u}
2134
- </div>
2135
- ${s==="map"&&n.activities.some(r=>r.steps.length>0)?ro(e,t):u}
2136
- </div>
2137
- `},ya=(e,t)=>{switch(t){case"map":return e.mapTab;case"table":return e.tableTab;case"milestones":return e.milestonesTab;case"burndown":return e.burndownTab}},va=(e,t)=>{switch(t){case"map":return e.stories.length;case"table":return e.stories.length;case"milestones":return e.milestones.length;case"burndown":return e.snapshots.length}},sr=(e,t,s,a,n,i)=>l`<a
2138
- role="tab"
2139
- data-tab=${t}
2140
- data-overflow=${i?"":u}
2141
- aria-hidden=${i?"true":u}
2142
- tabindex=${i?"-1":u}
2143
- aria-selected=${t===s?"true":"false"}
2144
- href=${e.hashFor({tab:t==="map"?null:t})}
2145
- >${a}<span class="dpk-count">${n}</span></a
2146
- >`,ar=36,nr=12,ir=220,or=q`
2147
- /* The tabs and their more button share what the bar's line leaves; the line
2148
- wraps only when even the current tab and the button do not fit. */
2149
- .page-nav {
2150
- display: flex;
2151
- flex: 1 1 0;
2152
- align-items: center;
2153
- gap: 4px;
2154
- max-width: 100%;
2155
- }
2156
- /* A folded tab stays laid out, out of sight, so it can still be measured. */
2157
- .page-tabs [role='tab'][data-overflow] {
2158
- position: absolute;
2159
- top: 0;
2160
- left: 0;
2161
- visibility: hidden;
2162
- pointer-events: none;
2163
- }
2164
- .tabs-more {
2165
- flex: none;
2166
- padding: 6px 8px;
2167
- }
2168
- .tabs-more svg {
2169
- width: 16px;
2170
- height: 16px;
2171
- }
2172
- .tabs-more[aria-expanded='true'] {
2173
- background: var(--dpk-paper-inset);
2174
- color: var(--dpk-ink);
2175
- }
2176
- .tabs-more[data-unused='true'] {
2177
- position: absolute;
2178
- visibility: hidden;
2179
- pointer-events: none;
2180
- }
2181
- .comment-pop.tabs-menu {
2182
- gap: 2px;
2183
- padding: 6px;
2184
- }
2185
- .tabs-menu-item {
2186
- display: flex;
2187
- align-items: center;
2188
- justify-content: space-between;
2189
- gap: 10px;
2190
- padding: 8px 10px;
2191
- border-radius: var(--dpk-radius-sm);
2192
- color: var(--dpk-ink);
2193
- font-size: 13px;
2194
- font-weight: 600;
2195
- text-decoration: none;
2196
- }
2197
- .tabs-menu-item:hover,
2198
- .tabs-menu-item:focus-visible {
2199
- outline: none;
2200
- background: var(--dpk-paper-sunken);
2201
- }
2202
- `,kt=(e,t,s,a)=>({id:e,label:t,render:n=>l`<div class="dpk-dialog-section" data-dialog-section=${e}>
2203
- <dpk-internal-usm-settings-section
2204
- .kind=${s}
2205
- .locale=${a}
2206
- .context=${n}
2207
- ></dpk-internal-usm-settings-section>
2208
- </div>`}),rr=O(un),dr=O(Fa),lr=e=>T(e.state,e.navigation.story),pr=(e,t,s,a,n,i)=>{const{state:o}=t,r={type:"story",id:s.id},d=()=>t.navigate({story:null}),p=N(o,`${s.activityId}.${s.stepId}`),m=U(o,s.milestoneId);return l`<aside
2209
- class="story-panel"
2210
- role="dialog"
2211
- aria-label=${e.panelLabel(s.name)}
2212
- data-testid="usm-story-panel"
2213
- data-story=${s.id}
2214
- tabindex="-1"
2215
- >
2216
- <header class="sp-head">
2217
- <span class="sp-where">
2218
- ${p?l`<span>${p.activity.name}</span><span>${p.step.name}</span>`:u}
2219
- <span>${m?.name??e.unassigned}</span>
2220
- </span>
2221
- ${yr(e,t,s)}
2222
- <button class="dpk-icon-btn" type="button" data-role="close" aria-label=${e.closePanelAria} @click=${d}>
2223
- ${tt()}
2224
- </button>
2225
- </header>
2226
- <div class="sp-body">
2227
- <div class="sp-heading">
2228
- <div class="sp-copy-row">
2229
- ${cr(e,s,n)}
2230
- ${ka(e,n,{role:"copy-id-title",label:e.copyIdTitle,text:vt(s),icon:rr})}
2231
- ${ka(e,n,{role:"copy-info",label:e.copyStoryInfo,text:Ks(e,o,s),icon:dr})}
2232
- </div>
2233
- <h2 class="sp-title">
2234
- <dpk-inline-edit
2235
- wrap
2236
- .value=${s.name}
2237
- .label=${e.storyTitleLabel}
2238
- @dpk-commit=${Q(y=>t.dispatch({type:"SET_STORY_NAME",target:r,payload:{name:y}}))}
2239
- ></dpk-inline-edit>
2240
- </h2>
2241
- </div>
2242
- ${o.statuses.length===0?u:ur(e,t,s)}
2243
- ${P(o,"estimates")?mr(e,t,s):u}
2244
- ${P(o,"assignees")?hr(e,t,s,i):u}
2245
- ${br(e,t,s,i)} ${gr(e,t,s,a)}
2246
- <section class="sp-field">
2247
- <h3>${e.storyDescriptionLabel}</h3>
2248
- <dpk-inline-edit
2249
- multiline
2250
- markdown
2251
- class="sp-description"
2252
- .value=${s.description??""}
2253
- .label=${e.storyDescriptionLabel}
2254
- @dpk-commit=${Q(y=>t.dispatch({type:"SET_STORY_DESCRIPTION",target:r,payload:{description:y}}))}
2255
- ></dpk-inline-edit>
2256
- </section>
2257
- ${fr(e,t,s)} ${vr(e,t,s)}
2258
- </div>
2259
- <footer class="sp-foot">
2260
- <button
2261
- class="dpk-btn dpk-btn--ghost sp-delete"
2262
- type="button"
2263
- @click=${()=>{t.dispatch({type:"DELETE_STORY",target:r,payload:{}}).ok&&d()}}
2264
- >
2265
- ${et()}<span>${e.deleteStoryButton}</span>
2266
- </button>
2267
- </footer>
2268
- </aside>`},cr=(e,t,s)=>{const a=de(t),n=s.copied===a,i=n?e.storyKeyCopied:e.copyStoryKey(a);return l`<button
2269
- class="sp-key"
2270
- type="button"
2271
- data-role="copy-key"
2272
- data-copied=${n?"true":"false"}
2273
- title=${i}
2274
- aria-label=${i}
2275
- @click=${()=>s.copy(a)}
2276
- >
2277
- <span>${a}</span>${n?De():Va()}
2278
- </button>`},ka=(e,t,s)=>{const a=t.copied===s.text,n=a?e.storyKeyCopied:s.label;return l`<button
2279
- class="dpk-icon-btn sp-copy"
2280
- type="button"
2281
- data-role=${s.role}
2282
- data-copied=${a?"true":"false"}
2283
- title=${n}
2284
- aria-label=${n}
2285
- @click=${()=>t.copy(s.text)}
2286
- >
2287
- ${a?De():s.icon()}
2288
- </button>`},ur=(e,t,s)=>{const a=he(t.state),n=s.statusId;return l`<section class="sp-field">
2289
- <h3 id="sp-status-label">${e.storyStatusLabel}</h3>
2290
- <div class="sp-statuses" role="radiogroup" aria-labelledby="sp-status-label">
2291
- ${a.map(i=>l`<button
2292
- class="sp-status"
2293
- type="button"
2294
- role="radio"
2295
- data-status=${i.id}
2296
- aria-checked=${String(i.id===n)}
2297
- style=${M(i.tone)}
2298
- @click=${()=>{i.id!==n&&t.dispatch({type:"SET_STORY_STATUS",target:{type:"story",id:s.id},payload:{statusId:i.id}})}}
2299
- >
2300
- ${re(i)}<span>${i.name}</span>
2301
- </button>`)}
2302
- </div>
2303
- </section>`},mr=(e,t,s)=>{const a=s.estimateId??null,n=o=>()=>{o!==a&&t.dispatch({type:"SET_STORY_ESTIMATE",target:{type:"story",id:s.id},payload:{estimateId:o}})},i=[{id:null,name:e.unestimated,title:e.unestimated},...t.state.estimates.map(o=>({id:o.id,name:o.name,title:e.estimateText(o.name,o.points)}))];return l`<section class="sp-field">
2304
- <h3 id="sp-estimate-label" class="sp-field-head">
2305
- <span>${e.storyEstimateLabel}</span>
2306
- <a class="sp-manage" href=${t.hashFor({tab:"burndown",story:null})}>${e.manageEstimates}</a>
2307
- </h3>
2308
- ${t.state.estimates.length===0?l`<p class="sp-empty">${e.noEstimates}</p>`:l`<div class="sp-estimates" role="radiogroup" aria-labelledby="sp-estimate-label">
2309
- ${i.map(o=>l`<button
2310
- class="sp-estimate"
2311
- type="button"
2312
- role="radio"
2313
- data-estimate=${o.id??""}
2314
- title=${o.title}
2315
- aria-checked=${String(o.id===a)}
2316
- @click=${n(o.id)}
2317
- >
2318
- ${o.name}
2319
- </button>`)}
2320
- </div>`}
2321
- </section>`},hr=(e,t,s,a)=>{const n=s.assigneeId??null,i=o=>()=>{o!==n&&t.dispatch({type:"SET_STORY_ASSIGNEE",target:{type:"story",id:s.id},payload:{memberId:o}})};return l`<section class="sp-field">
2322
- <h3 id="sp-assignee-label" class="sp-field-head">
2323
- <span>${e.storyAssigneeLabel}</span>
2324
- <button class="sp-manage" type="button" @click=${()=>a.open("members")}>${e.manageMembers}</button>
2325
- </h3>
2326
- ${t.state.members.length===0?l`<p class="sp-empty">${e.storyNoMembers}</p>`:l`<div class="sp-assignees" role="radiogroup" aria-labelledby="sp-assignee-label">
2327
- <button
2328
- class="sp-assignee"
2329
- type="button"
2330
- role="radio"
2331
- data-assignee=""
2332
- aria-checked=${String(n===null)}
2333
- @click=${i(null)}
2334
- >
2335
- ${e.noAssignee}
2336
- </button>
2337
- ${t.state.members.map(o=>l`<button
2338
- class="sp-assignee"
2339
- type="button"
2340
- role="radio"
2341
- data-assignee=${o.id}
2342
- aria-checked=${String(o.id===n)}
2343
- style=${M(o.tone)}
2344
- @click=${i(o.id)}
2345
- >
2346
- <span class="sp-avatar" aria-hidden="true">${yt(o.name)}</span>${o.name}
2347
- </button>`)}
2348
- </div>`}
2349
- </section>`},br=(e,t,s,a)=>{const n={type:"story",id:s.id},i=new Set(s.labelIds??[]);return l`<section class="sp-field">
2350
- <h3 id="sp-labels-label" class="sp-field-head">
2351
- <span>${e.storyLabelsLabel}</span>
2352
- <button class="sp-manage" type="button" @click=${()=>a.open("labels")}>${e.manageLabels}</button>
2353
- </h3>
2354
- ${t.state.labels.length===0?l`<p class="sp-empty">${e.storyNoLabels}</p>`:l`<div class="sp-labels" role="group" aria-labelledby="sp-labels-label">
2355
- ${t.state.labels.map(o=>{const r=i.has(o.id);return l`<button
2356
- class="sp-label"
2357
- type="button"
2358
- data-label=${o.id}
2359
- aria-pressed=${String(r)}
2360
- style=${M(o.tone)}
2361
- @click=${()=>t.dispatch({type:r?"REMOVE_STORY_LABEL":"ADD_STORY_LABEL",target:n,payload:{labelId:o.id}})}
2362
- >
2363
- <span class="sp-label-dot" aria-hidden="true"></span><span>${o.name}</span>
2364
- </button>`})}
2365
- </div>`}
2366
- </section>`},gr=(e,t,s,a)=>{const{state:n}=t,i=vs(n,s.id),o=(d,p,m)=>t.dispatch({type:d,target:{type:"story",id:p},payload:{blockerId:m}}),r=(d,p,m,y)=>{const E=T(n,p);if(!E)return u;const S=he(n).find(A=>A.id===E.statusId);return l`<li
2367
- data-blocker=${d==="data-blocker"?p:u}
2368
- data-dependent=${d==="data-dependent"?p:u}
2369
- data-finished=${String($e(n,E))}
2370
- >
2371
- <a class="sp-dep-name" href=${t.hashFor({story:p})} style=${M(S?.tone)}>
2372
- ${S?re(S):u}<span>${E.name}</span>
2373
- </a>
2374
- <button
2375
- class="dpk-icon-btn"
2376
- type="button"
2377
- data-role="remove"
2378
- aria-label=${m(E.name)}
2379
- @click=${y}
2380
- >
2381
- ${tt()}
2382
- </button>
2383
- </li>`};return l`<section class="sp-field sp-deps">
2384
- <h3>${e.storyDependenciesLabel}</h3>
2385
- <div class="sp-dep-side">
2386
- <h4>${e.storyBlockersLabel}</h4>
2387
- ${i.blockers.length===0?l`<p class="sp-empty">${e.storyNoBlockers}</p>`:l`<ul class="sp-dep-list">
2388
- ${i.blockers.map(d=>r("data-blocker",d,e.removeBlockerAria,()=>o("REMOVE_STORY_BLOCKER",s.id,d)))}
2389
- </ul>`}
2390
- ${ga(e,t,s.id,"blocker",a,d=>o("ADD_STORY_BLOCKER",s.id,d))}
2391
- </div>
2392
- <div class="sp-dep-side">
2393
- <h4>${e.storyDependentsLabel}</h4>
2394
- ${i.dependents.length===0?l`<p class="sp-empty">${e.storyNoDependents}</p>`:l`<ul class="sp-dep-list">
2395
- ${i.dependents.map(d=>r("data-dependent",d,e.removeDependentAria,()=>o("REMOVE_STORY_BLOCKER",d,s.id)))}
2396
- </ul>`}
2397
- ${ga(e,t,s.id,"dependent",a,d=>o("ADD_STORY_BLOCKER",d,s.id))}
2398
- </div>
2399
- </section>`},fr=(e,t,s)=>{const a={type:"story",id:s.id},n=s.links??[],i=o=>{o.preventDefault();const r=o.currentTarget instanceof HTMLFormElement?o.currentTarget:null,d=r?.querySelector("input");if(!r||!d)return;const p=d.value.trim();if(!$t(ot,p).success){d.setAttribute("aria-invalid","true");return}t.dispatch({type:"ADD_STORY_LINK",target:a,payload:{url:p}}).ok&&(d.removeAttribute("aria-invalid"),r.reset())};return l`<section class="sp-field">
2400
- <h3>${e.storyLinksLabel}</h3>
2401
- ${n.length===0?u:l`<ul class="sp-links">
2402
- ${n.map(o=>{const r=Re(o.url),d=o.label??r.text;return l`<li data-kind=${r.kind}>
2403
- <a class="sp-link" href=${o.url} target="_blank" rel="noopener noreferrer" title=${o.url}>
2404
- ${Rt(r.kind)}
2405
- <span class="sp-link-text">${d}</span>
2406
- <span class="sp-link-url">${r.title===d?o.url:r.title}</span>
2407
- </a>
2408
- <button
2409
- class="dpk-icon-btn"
2410
- type="button"
2411
- aria-label=${e.removeLinkAria(d)}
2412
- @click=${()=>t.dispatch({type:"REMOVE_STORY_LINK",target:a,payload:{url:o.url}})}
2413
- >
2414
- ${tt()}
2415
- </button>
2416
- </li>`})}
2417
- </ul>`}
2418
- <form class="sp-add-link" @submit=${i}>
2419
- <input
2420
- class="dpk-input"
2421
- type="url"
2422
- inputmode="url"
2423
- placeholder="https://"
2424
- aria-label=${e.linkUrlLabel}
2425
- @input=${o=>{o.currentTarget instanceof HTMLInputElement&&o.currentTarget.removeAttribute("aria-invalid")}}
2426
- />
2427
- <button class="dpk-btn" type="submit">${e.addLinkButton}</button>
2428
- </form>
2429
- </section>`},yr=(e,t,s)=>{const a=t.commentCount({type:"story",id:s.id});return l`<button
2430
- class="sp-review"
2431
- type="button"
2432
- data-role="review-story"
2433
- title=${e.reviewStoryTitle}
2434
- aria-label=${a>0?`${e.reviewStoryButton} (${a})`:e.reviewStoryButton}
2435
- @click=${()=>t.requestComment({type:"story",id:s.id})}
2436
- >
2437
- ${It()}<span>${e.reviewStoryButton}</span>${a>0?l`<span class="sp-review-count">${a}</span>`:u}
2438
- </button>`},vr=(e,t,s)=>{const a={type:"story",id:s.id};return l`<section class="sp-field sp-comments">
2439
- <h3>${e.storyCommentsLabel}</h3>
2440
- <dpk-comment-thread
2441
- inline
2442
- .comments=${s.comments??[]}
2443
- draft-key=${`story-comment:${s.id}`}
2444
- @dpk-thread-comment-add=${n=>{const i=J("comment",W(t.state));t.dispatch({type:"ADD_STORY_COMMENT",target:a,payload:{id:i,body:n.detail.body,createdAt:new Date().toISOString()}}).ok&&n.preventDefault()}}
2445
- @dpk-thread-comment-delete=${n=>{t.dispatch({type:"DELETE_STORY_COMMENT",target:a,payload:{commentId:n.detail.id}})}}
2446
- ></dpk-comment-thread>
2447
- </section>`},kr=q`
2448
- /* Over the main column's edge, below the header: the page's own controls stay in reach. */
2449
- .story-panel {
2450
- position: absolute;
2451
- top: 0;
2452
- right: 0;
2453
- bottom: 0;
2454
- z-index: 20;
2455
- display: grid;
2456
- grid-template-rows: auto minmax(0, 1fr) auto;
2457
- width: min(420px, 100%);
2458
- border-left: 1px solid var(--dpk-rule-strong);
2459
- background: var(--dpk-paper-raised);
2460
- box-shadow: var(--dpk-shadow-lg);
2461
- animation: sp-slide-in 220ms var(--dpk-ease);
2462
- }
2463
- /* The panel takes the focus when it opens; the ring belongs to its controls. */
2464
- .story-panel:focus {
2465
- outline: none;
2466
- }
2467
- @keyframes sp-slide-in {
2468
- from {
2469
- opacity: 0;
2470
- transform: translateX(24px);
2471
- }
2472
- }
2473
- .sp-head {
2474
- display: flex;
2475
- align-items: center;
2476
- gap: 10px;
2477
- /* The close button keeps clear of a floating menu docked at the right edge. */
2478
- padding: 14px calc(22px + var(--dpk-floating-menu-clearance, 0px)) 12px 22px;
2479
- min-height: 60px;
2480
- box-sizing: border-box;
2481
- border-bottom: 1px solid var(--dpk-rule);
2482
- }
2483
- .sp-heading {
2484
- display: grid;
2485
- justify-items: start;
2486
- gap: 6px;
2487
- }
2488
- .sp-heading .sp-title {
2489
- justify-self: stretch;
2490
- }
2491
- /* The three copy buttons sit on one line, the key's chip first. */
2492
- .sp-copy-row {
2493
- display: flex;
2494
- align-items: center;
2495
- gap: 4px;
2496
- }
2497
- .sp-copy {
2498
- width: 22px;
2499
- height: 22px;
2500
- }
2501
- .sp-copy svg {
2502
- width: 13px;
2503
- height: 13px;
2504
- }
2505
- .sp-copy[data-copied='true'] {
2506
- color: var(--dpk-green);
2507
- }
2508
- .sp-key {
2509
- display: inline-flex;
2510
- align-items: center;
2511
- gap: 5px;
2512
- padding: 2px 7px;
2513
- border: 1px solid var(--dpk-rule);
2514
- border-radius: 6px;
2515
- background: var(--dpk-paper-sunken);
2516
- color: var(--dpk-ink-soft);
2517
- font: inherit;
2518
- font-family: var(--dpk-mono);
2519
- font-size: 11px;
2520
- font-weight: 650;
2521
- line-height: 18px;
2522
- font-variant-numeric: tabular-nums;
2523
- cursor: pointer;
2524
- }
2525
- .sp-key:hover {
2526
- border-color: var(--dpk-rule-strong);
2527
- color: var(--dpk-ink);
2528
- }
2529
- .sp-key:focus-visible {
2530
- outline: none;
2531
- box-shadow: var(--dpk-focus);
2532
- }
2533
- .sp-key[data-copied='true'] {
2534
- color: var(--dpk-green);
2535
- }
2536
- .sp-key svg {
2537
- flex: none;
2538
- width: 12px;
2539
- height: 12px;
2540
- }
2541
- .sp-where {
2542
- display: flex;
2543
- flex-wrap: wrap;
2544
- gap: 2px 0;
2545
- flex: 1 1 auto;
2546
- min-width: 0;
2547
- color: var(--dpk-ink-faint);
2548
- font-size: 11.5px;
2549
- font-weight: 600;
2550
- }
2551
- .sp-where > span + span::before {
2552
- content: '›';
2553
- margin: 0 6px;
2554
- color: var(--dpk-rule-strong);
2555
- }
2556
- .sp-body {
2557
- display: grid;
2558
- align-content: start;
2559
- gap: 22px;
2560
- overflow: auto;
2561
- padding: 18px 22px 24px;
2562
- }
2563
- /* A dependency's name is one nowrap line with an ellipsis, and every grid
2564
- box between it and the panel keeps the default min-width (auto): the line
2565
- would then become the grid's minimum width and make the whole body scroll
2566
- sideways instead of cropping the name. Each level opts out. */
2567
- .sp-body > *,
2568
- .sp-deps > *,
2569
- .sp-dep-side > *,
2570
- .sp-dep-list > li {
2571
- min-width: 0;
2572
- }
2573
- .sp-title {
2574
- margin: 0;
2575
- font-size: 19px;
2576
- font-weight: 700;
2577
- letter-spacing: -0.015em;
2578
- line-height: 1.35;
2579
- }
2580
- .sp-title dpk-inline-edit {
2581
- display: block;
2582
- margin: 0 -4px;
2583
- }
2584
- .sp-field {
2585
- display: grid;
2586
- gap: 8px;
2587
- }
2588
- .sp-field h3 {
2589
- margin: 0;
2590
- color: var(--dpk-ink-faint);
2591
- font-size: 11px;
2592
- font-weight: 650;
2593
- letter-spacing: 0.04em;
2594
- text-transform: uppercase;
2595
- }
2596
- .sp-statuses {
2597
- display: flex;
2598
- flex-wrap: wrap;
2599
- gap: 6px;
2600
- }
2601
- .sp-status {
2602
- display: inline-flex;
2603
- align-items: center;
2604
- gap: 7px;
2605
- padding: 5px 12px 5px 9px;
2606
- border: 1px solid var(--dpk-rule-strong);
2607
- border-radius: 999px;
2608
- background: var(--dpk-paper-raised);
2609
- color: var(--dpk-ink);
2610
- font: inherit;
2611
- font-size: 12.5px;
2612
- font-weight: 600;
2613
- cursor: pointer;
2614
- transition:
2615
- background 140ms var(--dpk-ease),
2616
- border-color 140ms var(--dpk-ease);
2617
- }
2618
- .sp-status:hover {
2619
- border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
2620
- }
2621
- .sp-status:focus-visible {
2622
- outline: none;
2623
- box-shadow: var(--dpk-focus);
2624
- }
2625
- .sp-status[aria-checked='true'] {
2626
- border-color: var(--usm-tone);
2627
- background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
2628
- box-shadow: inset 0 0 0 1px var(--usm-tone);
2629
- }
2630
- .sp-estimates {
2631
- display: flex;
2632
- flex-wrap: wrap;
2633
- gap: 4px;
2634
- }
2635
- .sp-estimate {
2636
- min-width: 34px;
2637
- padding: 4px 10px;
2638
- border: 1px solid var(--dpk-rule-strong);
2639
- border-radius: var(--dpk-radius-sm);
2640
- background: var(--dpk-paper-raised);
2641
- color: var(--dpk-ink-soft);
2642
- font: inherit;
2643
- font-family: var(--dpk-mono);
2644
- font-size: 12px;
2645
- font-weight: 650;
2646
- font-variant-numeric: tabular-nums;
2647
- cursor: pointer;
2648
- transition:
2649
- background 140ms var(--dpk-ease),
2650
- border-color 140ms var(--dpk-ease);
2651
- }
2652
- .sp-estimate[data-estimate=''] {
2653
- font-family: inherit;
2654
- font-weight: 550;
2655
- }
2656
- .sp-estimate:hover {
2657
- border-color: var(--dpk-rule-hover);
2658
- }
2659
- .sp-estimate:focus-visible {
2660
- outline: none;
2661
- box-shadow: var(--dpk-focus);
2662
- }
2663
- .sp-estimate[aria-checked='true'] {
2664
- border-color: var(--dpk-ink);
2665
- background: var(--dpk-ink);
2666
- color: var(--dpk-paper-raised);
2667
- }
2668
- .sp-assignees {
2669
- display: flex;
2670
- flex-wrap: wrap;
2671
- gap: 4px;
2672
- }
2673
- .sp-assignee {
2674
- display: inline-flex;
2675
- align-items: center;
2676
- gap: 6px;
2677
- padding: 3px 10px 3px 4px;
2678
- border: 1px solid var(--dpk-rule-strong);
2679
- border-radius: 999px;
2680
- background: var(--dpk-paper-raised);
2681
- color: var(--dpk-ink-soft);
2682
- font: inherit;
2683
- font-size: 12px;
2684
- font-weight: 600;
2685
- cursor: pointer;
2686
- transition:
2687
- background 140ms var(--dpk-ease),
2688
- border-color 140ms var(--dpk-ease);
2689
- }
2690
- .sp-assignee[data-assignee=''] {
2691
- padding-left: 10px;
2692
- }
2693
- .sp-assignee:hover {
2694
- border-color: var(--dpk-rule-hover);
2695
- }
2696
- .sp-assignee:focus-visible {
2697
- outline: none;
2698
- box-shadow: var(--dpk-focus);
2699
- }
2700
- .sp-assignee[aria-checked='true'] {
2701
- border-color: var(--usm-tone, var(--dpk-ink));
2702
- background: color-mix(in oklab, var(--usm-tone, var(--dpk-ink)) 12%, var(--dpk-paper-raised));
2703
- color: var(--dpk-ink);
2704
- }
2705
- .sp-avatar {
2706
- display: inline-grid;
2707
- place-items: center;
2708
- width: 18px;
2709
- height: 18px;
2710
- border-radius: 50%;
2711
- background: var(--usm-tone);
2712
- color: var(--dpk-paper-raised);
2713
- font-size: 10px;
2714
- font-weight: 700;
2715
- line-height: 1;
2716
- }
2717
- .sp-field-head {
2718
- display: flex;
2719
- align-items: baseline;
2720
- justify-content: space-between;
2721
- gap: 8px;
2722
- }
2723
- .sp-manage {
2724
- /* A button, since it opens the settings dialog rather than moving the page. */
2725
- padding: 0;
2726
- border: 0;
2727
- background: none;
2728
- color: var(--dpk-ink-faint);
2729
- font: inherit;
2730
- font-size: 11px;
2731
- font-weight: 600;
2732
- letter-spacing: 0;
2733
- text-transform: none;
2734
- cursor: pointer;
2735
- }
2736
- .sp-manage:hover {
2737
- color: var(--dpk-blue);
2738
- }
2739
- .sp-empty {
2740
- margin: 0;
2741
- color: var(--dpk-ink-faint);
2742
- font-size: 12.5px;
2743
- }
2744
- .sp-labels {
2745
- display: flex;
2746
- flex-wrap: wrap;
2747
- gap: 6px;
2748
- }
2749
- .sp-label {
2750
- display: inline-flex;
2751
- align-items: center;
2752
- gap: 6px;
2753
- padding: 3px 10px 3px 8px;
2754
- border: 1px dashed var(--dpk-rule-strong);
2755
- border-radius: 999px;
2756
- background: transparent;
2757
- color: var(--dpk-ink-soft);
2758
- font: inherit;
2759
- font-size: 12px;
2760
- font-weight: 600;
2761
- cursor: pointer;
2762
- transition:
2763
- background 140ms var(--dpk-ease),
2764
- border-color 140ms var(--dpk-ease);
2765
- }
2766
- .sp-label:hover {
2767
- border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
2768
- }
2769
- .sp-label:focus-visible {
2770
- outline: none;
2771
- box-shadow: var(--dpk-focus);
2772
- }
2773
- .sp-label[aria-pressed='true'] {
2774
- border-style: solid;
2775
- border-color: color-mix(in oklab, var(--usm-tone) 55%, transparent);
2776
- background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
2777
- color: var(--dpk-ink);
2778
- }
2779
- .sp-label-dot {
2780
- width: 7px;
2781
- height: 7px;
2782
- border-radius: 50%;
2783
- background: var(--usm-tone);
2784
- opacity: 0.5;
2785
- }
2786
- .sp-label[aria-pressed='true'] .sp-label-dot {
2787
- opacity: 1;
2788
- }
2789
- .sp-deps {
2790
- gap: 12px;
2791
- }
2792
- .sp-dep-side {
2793
- display: grid;
2794
- gap: 6px;
2795
- }
2796
- .sp-dep-side h4 {
2797
- margin: 0;
2798
- color: var(--dpk-ink-soft);
2799
- font-size: 11.5px;
2800
- font-weight: 650;
2801
- }
2802
- .sp-dep-list {
2803
- display: grid;
2804
- gap: 4px;
2805
- margin: 0;
2806
- padding: 0;
2807
- list-style: none;
2808
- }
2809
- .sp-dep-list li {
2810
- display: flex;
2811
- align-items: center;
2812
- gap: 4px;
2813
- border: 1px solid var(--dpk-rule);
2814
- border-radius: var(--dpk-radius-sm);
2815
- background: var(--dpk-paper-sunken);
2816
- }
2817
- .sp-dep-name {
2818
- display: flex;
2819
- align-items: center;
2820
- gap: 8px;
2821
- flex: 1 1 auto;
2822
- min-width: 0;
2823
- padding: 6px 4px 6px 10px;
2824
- color: var(--dpk-ink);
2825
- font-size: 12.5px;
2826
- font-weight: 600;
2827
- text-decoration: none;
2828
- }
2829
- .sp-dep-name span {
2830
- overflow: hidden;
2831
- text-overflow: ellipsis;
2832
- white-space: nowrap;
2833
- }
2834
- .sp-dep-name:hover span {
2835
- text-decoration: underline;
2836
- }
2837
- .sp-dep-list li[data-finished='true'] .sp-dep-name span {
2838
- color: var(--dpk-ink-faint);
2839
- text-decoration: line-through;
2840
- }
2841
- .sp-description {
2842
- display: block;
2843
- margin: 0 -4px;
2844
- color: var(--dpk-ink-soft);
2845
- font-size: 13px;
2846
- line-height: 1.65;
2847
- }
2848
- .sp-links {
2849
- display: grid;
2850
- gap: 4px;
2851
- margin: 0;
2852
- padding: 0;
2853
- list-style: none;
2854
- }
2855
- .sp-links li {
2856
- display: flex;
2857
- align-items: center;
2858
- gap: 4px;
2859
- border: 1px solid var(--dpk-rule);
2860
- border-radius: var(--dpk-radius-sm);
2861
- background: var(--dpk-paper-sunken);
2862
- }
2863
- .sp-link {
2864
- display: grid;
2865
- grid-template-columns: 16px minmax(0, 1fr);
2866
- column-gap: 9px;
2867
- align-items: center;
2868
- flex: 1 1 auto;
2869
- min-width: 0;
2870
- padding: 7px 4px 7px 10px;
2871
- color: var(--dpk-ink);
2872
- text-decoration: none;
2873
- }
2874
- .sp-link:hover .sp-link-text {
2875
- text-decoration: underline;
2876
- }
2877
- .sp-link svg {
2878
- grid-row: span 2;
2879
- width: 16px;
2880
- height: 16px;
2881
- color: var(--dpk-ink-soft);
2882
- }
2883
- .sp-link-text {
2884
- overflow: hidden;
2885
- font-family: var(--dpk-mono);
2886
- font-size: 12.5px;
2887
- font-weight: 650;
2888
- text-overflow: ellipsis;
2889
- white-space: nowrap;
2890
- }
2891
- .sp-link-url {
2892
- overflow: hidden;
2893
- color: var(--dpk-ink-faint);
2894
- font-size: 11px;
2895
- text-overflow: ellipsis;
2896
- white-space: nowrap;
2897
- }
2898
- .sp-add-link {
2899
- display: flex;
2900
- gap: 6px;
2901
- }
2902
- .sp-add-link input {
2903
- flex: 1 1 auto;
2904
- min-width: 0;
2905
- }
2906
- .sp-add-link input[aria-invalid='true'] {
2907
- border-color: var(--dpk-accent);
2908
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--dpk-accent) 22%, transparent);
2909
- }
2910
- .sp-comments dpk-comment-thread {
2911
- margin-top: 6px;
2912
- }
2913
- /* A request to the agent, not part of the story: it carries the review rail's comment icon. */
2914
- .sp-review {
2915
- display: inline-flex;
2916
- flex: none;
2917
- align-items: center;
2918
- gap: 6px;
2919
- height: 28px;
2920
- padding: 0 10px;
2921
- border: 1px solid var(--dpk-rule-strong);
2922
- border-radius: 999px;
2923
- background: var(--dpk-paper-raised);
2924
- color: var(--dpk-ink-soft);
2925
- font: inherit;
2926
- font-size: 11.5px;
2927
- font-weight: 600;
2928
- cursor: pointer;
2929
- }
2930
- .sp-review:hover {
2931
- color: var(--dpk-accent);
2932
- border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
2933
- }
2934
- .sp-review:focus-visible {
2935
- outline: none;
2936
- box-shadow: var(--dpk-focus);
2937
- }
2938
- .sp-review svg {
2939
- width: 14px;
2940
- height: 14px;
2941
- }
2942
- .sp-review-count {
2943
- min-width: 16px;
2944
- padding: 0 4px;
2945
- border-radius: 999px;
2946
- background: var(--dpk-accent-soft);
2947
- color: var(--dpk-accent);
2948
- font-family: var(--dpk-mono);
2949
- font-size: 10px;
2950
- line-height: 16px;
2951
- text-align: center;
2952
- }
2953
- .sp-foot {
2954
- display: flex;
2955
- justify-content: flex-start;
2956
- padding: 12px 22px;
2957
- border-top: 1px solid var(--dpk-rule);
2958
- }
2959
- .sp-delete {
2960
- display: inline-flex;
2961
- align-items: center;
2962
- gap: 6px;
2963
- color: var(--dpk-ink-soft);
2964
- }
2965
- .sp-delete svg {
2966
- width: 14px;
2967
- height: 14px;
2968
- }
2969
- `,wr="usm-story-table",Sr=e=>e==="accent"?"violet":e,Er=(e,t)=>{const s=[{id:"key",label:e.storyKeyColumn,type:"text",sortable:!0},{id:"name",label:e.storyTitleLabel,type:"text",sortable:!0},{id:"activity",label:e.activityNameLabel,type:"text",sortable:!0},{id:"step",label:e.stepNameLabel,type:"text",sortable:!0},{id:"milestone",label:e.burndownMilestoneLabel,type:"text",sortable:!0},...t.statuses.length===0?[]:[{id:"status",label:e.storyStatusLabel,type:"status",sortable:!0}],...P(t,"assignees")?[{id:"assignee",label:e.storyAssigneeLabel,type:"person",sortable:!0}]:[],...P(t,"estimates")?[{id:"estimate",label:e.storyEstimateLabel,type:"number",sortable:!0}]:[],...t.labels.length===0?[]:[{id:"labels",label:e.storyLabelsLabel,type:"tag",sortable:!1}]],a=t.stories.map(n=>{const i=N(t,ce(n.activityId,n.stepId)),o=U(t,n.milestoneId),r=D(t,n.statusId),d=z(t,n.estimateId),p=lt(t,n),m=pt(t,n);return{id:n.id,cells:{key:{type:"text",value:de(n)},name:{type:"text",value:n.name},activity:{type:"text",value:i?.activity.name??null},step:{type:"text",value:i?.step.name??null},milestone:{type:"text",value:o?.name??null},...r===void 0?{}:{status:{type:"status",value:{label:r.name,tone:Sr(r.tone)}}},...P(t,"assignees")?{assignee:{type:"person",value:p?.name??null}}:{},...P(t,"estimates")?{estimate:{type:"number",value:d?.points??null}}:{},...t.labels.length===0?{}:{labels:{type:"tag",value:m.map(y=>y.name)}}},...n.questions===void 0?{}:{questions:n.questions}}});return{columns:s,rows:a}},$r=(e,t)=>{const s=Er(e,t.state);return l`
2970
- <section class="story-table" data-testid="usm-table">
2971
- <dpk-table
2972
- id=${wr}
2973
- readonly
2974
- .data=${s}
2975
- @dpk-table-select=${a=>{const n=t.state.stories.find(i=>i.id===a.detail.id);n&&t.navigate({step:n.stepId,story:n.id})}}
2976
- ></dpk-table>
2977
- </section>
2978
- `},Tr=q`
2979
- :host {
2980
- --dpk-usm-accent: var(--dpk-blue);
2981
- }
2982
- /*
2983
- * A wide table must scroll inside itself and never widen the template shell.
2984
- * It scrolls both ways so the backbone can stick to its top and the
2985
- * milestone column to its left: a box that scrolls only sideways still
2986
- * becomes the sticky ancestor, and its top would never move. It takes the
2987
- * height left under the board head (tabs and toolbar), down to the page's
2988
- * bottom edge: the hand-off dock floats over its corner, and the map's own
2989
- * padding lets the last row scroll clear of it, so the page body keeps no
2990
- * second clearance under it.
2991
- *
2992
- * The map's row is the space that is actually left, never a fixed minimum:
2993
- * the supplements bar at the foot of the column is sticky and takes its own
2994
- * height out of the column, so a floor taller than what remains would push the
2995
- * map's last rows under that bar — off screen, with nothing left to scroll
2996
- * them into view. The map itself scrolls; it does not need to be tall.
2997
- */
2998
- .dpk-main-body:has(> dpk-matrix) {
2999
- flex: 1 1 0;
3000
- min-height: 0;
3001
- grid-template-rows: auto minmax(0, 1fr);
3002
- padding-bottom: 16px;
3003
- }
3004
- /* The grid, its scroll, its sticky head and lead column are \`<dpk-matrix>\`'s
3005
- own; this only wires the hand-off dock's clearance through to matrix's
3006
- own variable, which it does not otherwise know about. Every head here
3007
- (\`.corner\`, \`.act-head\`, \`.col-head\`, \`.row-lead\`) already carries its
3008
- own full padding, so matrix's own generic head padding is kept to a
3009
- small edge buffer rather than stack a second full inset around each
3010
- one — just enough room that a grip never sits flush against the
3011
- column/row rule it's next to, the way every head had before this board
3012
- moved its padding onto \`<dpk-matrix>\`; the cell keeps matrix's own
3013
- padding and paper surface, now that \`.cell\` no longer sets either
3014
- itself. */
3015
- dpk-matrix {
3016
- --dpk-matrix-dock-clearance: var(--dpk-dock-clearance, 0px);
3017
- --dpk-matrix-head-pad: 4px;
3018
- /* A grid item will not shrink below its own content unless told to; the map
3019
- is a scroll frame, so it may be exactly as tall as the row it was given. */
3020
- min-height: 0;
3021
- }
3022
- .row-lead {
3023
- display: flex;
3024
- flex-direction: column;
3025
- align-items: flex-start;
3026
- justify-content: center;
3027
- gap: 2px;
3028
- min-width: 0;
3029
- padding: 8px 6px 8px 4px;
3030
- background: var(--dpk-paper-sunken);
3031
- }
3032
- /* Row names and their meta line share one column: past \`<dpk-matrix>\`'s own
3033
- grip and gap (its exposed span) and the inline edit's own padding (4px). */
3034
- .row-lead {
3035
- --usm-row-indent: calc(var(--dpk-matrix-grip-span, 22px) + 4px);
3036
- }
3037
- /* \`<dpk-matrix>\`'s own grip bleed (\`margin-inline-start: -grip-span\` plus a
3038
- matching \`padding-inline-start\`) lands on this box, the slot's direct
3039
- child — but this box's own left padding above (4px, for the ungripped
3040
- case) is a physical property on the same side, so it wins the cascade
3041
- over the matrix's logical one and leaves the title undercompensated,
3042
- pulled in under the grip instead of past it. Matching the matrix's own
3043
- target value here, rather than fighting over which side wins, keeps the
3044
- title's start exactly where the grip's own gap ends (the same inset a
3045
- column head's flat, ungrouped slot node gets for free). The column heads
3046
- below carry the identical fix, for the identical reason. */
3047
- .row-lead[draggable='true'] {
3048
- padding-inline-start: var(--dpk-matrix-grip-span, 22px);
3049
- }
3050
- .row-meta {
3051
- display: flex;
3052
- flex-wrap: wrap;
3053
- gap: 2px 8px;
3054
- padding-left: var(--usm-row-indent);
3055
- font-size: 10.5px;
3056
- color: var(--dpk-ink-faint);
3057
- }
3058
- .row-timeframe {
3059
- color: var(--dpk-ink-soft);
3060
- font-weight: 600;
3061
- }
3062
- .row-count {
3063
- font-family: var(--dpk-mono);
3064
- font-variant-numeric: tabular-nums;
3065
- }
3066
- .corner {
3067
- display: grid;
3068
- gap: 3px;
3069
- align-content: start;
3070
- }
3071
- /* The backbone is read on every scroll, so its rows are kept short: the
3072
- axis labels sit tight and the step names get a single slim line. */
3073
- .corner {
3074
- gap: 1px;
3075
- padding: 7px 10px;
3076
- line-height: 1.3;
3077
- text-wrap: balance;
3078
- }
3079
-
3080
- /* Above the content: the page tabs (map / milestones) and, on the map, the
3081
- unit toggle (group band vs one column per activity). */
3082
-
3083
- /* The board bar and the map's toolbar stay on top together while a long
3084
- milestone list or the map scrolls under them. */
3085
- .board-head {
3086
- position: sticky;
3087
- top: 0;
3088
- z-index: 5;
3089
- margin: -24px -24px 0;
3090
- background: var(--dpk-glass);
3091
- backdrop-filter: saturate(1.6) blur(14px);
3092
- min-width: 0;
3093
- }
3094
-
3095
- .board-bar {
3096
- --usm-bar-pad: 6px;
3097
- border-bottom: 1px solid var(--dpk-rule);
3098
- padding: var(--usm-bar-pad) 24px;
3099
- display: flex;
3100
- flex-wrap: wrap;
3101
- align-items: center;
3102
- gap: 10px 14px;
3103
- min-width: 0;
3104
- }
3105
-
3106
- /* The pages: an underlined tab strip, heavier than the view toggle. The
3107
- tabs that do not fit fold behind the more button beside it (\`.page-nav\`);
3108
- the bottom padding keeps the selected tab's underline, which sits on the
3109
- bar's bottom rule, inside the clip. */
3110
- .page-tabs {
3111
- --dpk-tabstrip-pad: var(--usm-bar-pad);
3112
- --dpk-tabstrip-accent: var(--dpk-usm-accent);
3113
- display: inline-flex;
3114
- margin-bottom: calc(-1 * var(--usm-bar-pad) - 1px);
3115
- padding-bottom: calc(var(--usm-bar-pad) + 1px);
3116
- border-bottom: none;
3117
- overflow: hidden;
3118
- }
3119
-
3120
- /* Activity band: raised above the working canvas. A head spans its steps,
3121
- so its contents stay in view beside the sticky column while the map
3122
- scrolls sideways. */
3123
- .act-head {
3124
- position: relative;
3125
- /* The head fills its column's head row, so the progress bar at its bottom
3126
- edge lines up with every other group's, however many steps (and so
3127
- however tall) a group lists beside it. */
3128
- align-self: stretch;
3129
- display: grid;
3130
- align-content: start;
3131
- gap: 4px;
3132
- padding: 7px 10px 11px;
3133
- background: var(--dpk-paper-raised);
3134
- box-shadow:
3135
- var(--dpk-bevel),
3136
- inset 0 -1px 0 var(--dpk-rule-strong);
3137
- font-size: 13px;
3138
- font-weight: 650;
3139
- letter-spacing: -0.005em;
3140
- }
3141
- /* Same undercompensation as \`.row-lead\` above, same fix: this box's own
3142
- left padding (10px, physical) otherwise wins over \`<dpk-matrix>\`'s grip
3143
- bleed compensation (logical), leaving the title pulled in under the
3144
- grip. */
3145
- .act-head[draggable='true'] {
3146
- padding-inline-start: var(--dpk-matrix-grip-span, 22px);
3147
- }
3148
- .act-title,
3149
- .act-steps {
3150
- position: sticky;
3151
- left: 150px;
3152
- width: min(100%, 340px);
3153
- min-width: 0;
3154
- }
3155
- .act-title {
3156
- display: flex;
3157
- align-items: center;
3158
- gap: 8px;
3159
- }
3160
- /* The name wraps at the column width, and the actor only drops to its own
3161
- line when the two cannot share one; a long name is then read in full
3162
- instead of being cut to a stub beside a shrunken actor. */
3163
- .act-name {
3164
- display: flex;
3165
- flex: 1 1 auto;
3166
- flex-wrap: wrap;
3167
- align-items: center;
3168
- gap: 4px 8px;
3169
- min-width: 0;
3170
- }
3171
- .act-name > dpk-inline-edit {
3172
- flex: 0 1 auto;
3173
- max-width: 100%;
3174
- }
3175
- /* How far the group's stories have come: a strip along the head's bottom
3176
- edge, as wide as the steps it spans, so it costs the band no line. */
3177
- .act-head > .status-bar {
3178
- position: absolute;
3179
- left: 0;
3180
- right: 0;
3181
- bottom: 0;
3182
- height: 4px;
3183
- gap: 1px;
3184
- }
3185
- .act-head > .status-bar .status-bar-part {
3186
- border-radius: 0;
3187
- }
3188
- /* Whose experience the activity is: a label beside the name, editable in place. */
3189
- .act-actor {
3190
- display: flex;
3191
- flex: 0 1 auto;
3192
- min-width: 24px;
3193
- max-width: 100%;
3194
- padding: 0 4px;
3195
- border-radius: 999px;
3196
- background: var(--dpk-blue-soft);
3197
- color: var(--dpk-blue);
3198
- font-size: 11px;
3199
- font-weight: 650;
3200
- line-height: 20px;
3201
- }
3202
- .act-actor > dpk-inline-edit {
3203
- min-width: 0;
3204
- }
3205
- .act-actor[data-empty='true'] {
3206
- background: transparent;
3207
- opacity: 0;
3208
- transition: opacity 150ms ease;
3209
- }
3210
- .act-head:hover .act-actor[data-empty='true'],
3211
- .act-actor[data-empty='true']:focus-within {
3212
- opacity: 1;
3213
- }
3214
- /* The group view gives the steps no columns; the head lists them instead. */
3215
- .act-steps {
3216
- display: grid;
3217
- gap: 3px;
3218
- margin: 0;
3219
- padding: 0 0 0 18px;
3220
- color: var(--dpk-ink-soft);
3221
- font-size: 11.5px;
3222
- font-weight: 500;
3223
- line-height: 1.45;
3224
- }
3225
- .act-steps li::marker {
3226
- color: var(--dpk-ink-faint);
3227
- font-family: var(--dpk-mono);
3228
- font-size: 10px;
3229
- }
3230
- .col-head {
3231
- display: flex;
3232
- align-items: center;
3233
- gap: 6px;
3234
- padding: 5px 10px;
3235
- background: var(--dpk-paper-sunken);
3236
- transition: background 160ms var(--dpk-ease);
3237
- }
3238
- .col-head h4 {
3239
- flex: 1 1 auto;
3240
- min-width: 0;
3241
- }
3242
- .col-head[data-current='true'] {
3243
- background: color-mix(in srgb, var(--dpk-usm-accent) 8%, var(--dpk-paper-sunken));
3244
- }
3245
- /* Same undercompensation as \`.row-lead\` above, same fix. */
3246
- .col-head[draggable='true'] {
3247
- padding-inline-start: var(--dpk-matrix-grip-span, 22px);
3248
- }
3249
- .col-head h4 {
3250
- font-size: 13px;
3251
- font-weight: 600;
3252
- margin: 0;
3253
- }
3254
-
3255
- .row-head {
3256
- display: flex;
3257
- align-items: center;
3258
- gap: 6px;
3259
- padding: 10px;
3260
- }
3261
-
3262
- /* Milestone row label: plain text with a grip, not a chip. The "add
3263
- milestone" row reuses \`.row-head\` for its ghost button. */
3264
- .row-head[data-milestone] {
3265
- align-self: stretch;
3266
- margin: 0;
3267
- padding: 0 6px 0 0;
3268
- color: var(--dpk-ink);
3269
- font-size: 12.5px;
3270
- font-weight: 650;
3271
- max-width: 100%;
3272
- }
3273
-
3274
- /* \`<dpk-matrix>\` is the row's drag handle, grip and cursor now; this only
3275
- keeps a browser-native drag affordance off the name editor inside it. */
3276
- .row-head dpk-inline-edit {
3277
- -webkit-user-drag: none;
3278
- }
3279
-
3280
- /* Column drag: a group's head or a step's head is its column's handle, the
3281
- way a row head is a milestone's; \`<dpk-matrix>\` is the handle, grip and
3282
- cursor now. This only keeps native drag off the editors inside. */
3283
- .act-head dpk-inline-edit,
3284
- .col-head dpk-inline-edit {
3285
- -webkit-user-drag: none;
3286
- }
3287
-
3288
- /* Unassigned is a holding area, not a release: its label is quieter. */
3289
- .row-head[data-unassigned='true'] {
3290
- padding-left: var(--usm-row-indent);
3291
- color: var(--dpk-ink-soft);
3292
- }
3293
-
3294
- /* Cells are the working canvas: sunken, with a quiet dot lattice, so raised
3295
- story cards read as things placed on the board. */
3296
- /* The padding and the sunken dot surface are \`<dpk-matrix>\`'s own now; this
3297
- only stacks cards inside the cell it already gives us. */
3298
- .cell {
3299
- display: flex;
3300
- flex-direction: column;
3301
- gap: 8px;
3302
- min-height: 100px;
3303
- }
3304
- .cell[data-drop='true'] {
3305
- outline: 2px dashed var(--dpk-blue);
3306
- outline-offset: -2px;
3307
- }
3308
- .card-list {
3309
- display: grid;
3310
- gap: 10px;
3311
- align-content: start;
3312
- flex: 1 1 auto;
3313
- }
3314
- /* A grid item keeps the default min-width (auto), so a card whose foot
3315
- cannot shrink (a long step-name chip in it) would widen the column instead
3316
- of ellipsis-ing inside it. The card shrinks to the column; its own foot
3317
- clips. */
3318
- .card-list > * {
3319
- min-width: 0;
3320
- }
3321
- /* The add button (the kit's add atom) shows on the cell's hover only. */
3322
- .add-cell {
3323
- margin-top: auto;
3324
- opacity: 0;
3325
- transition:
3326
- opacity 180ms var(--dpk-ease),
3327
- background 160ms var(--dpk-ease),
3328
- border-color 160ms var(--dpk-ease),
3329
- color 160ms var(--dpk-ease);
3330
- }
3331
- .add-cell:focus-visible {
3332
- opacity: 1;
3333
- }
3334
- .cell:hover .add-cell {
3335
- opacity: 1;
3336
- }
3337
- .empty {
3338
- border: 1px dashed var(--dpk-rule-strong);
3339
- border-radius: var(--dpk-radius-lg);
3340
- padding: 28px 24px;
3341
- background: var(--dpk-dots), var(--dpk-paper-sunken);
3342
- max-width: 620px;
3343
- display: grid;
3344
- gap: 10px;
3345
- }
3346
-
3347
- /* ------------------------------------------------------ milestones tab */
3348
-
3349
- /* The release slices as a timeline, like the experience section of a
3350
- portfolio: when on the left, one node per slice on a single rail, what
3351
- and how big on the right. Nothing is boxed; the rail carries the order. */
3352
- .ms-overview {
3353
- --ms-node: 30px;
3354
- --ms-when: 132px;
3355
- --ms-gap: 44px;
3356
- display: grid;
3357
- gap: 28px;
3358
- max-width: 920px;
3359
- padding: 28px 0 40px;
3360
- }
3361
- .ms-timeline {
3362
- margin: 0;
3363
- padding: 0;
3364
- list-style: none;
3365
- }
3366
- .ms-entry,
3367
- .ms-add {
3368
- display: grid;
3369
- grid-template-columns: var(--ms-when) var(--ms-node) minmax(0, 1fr);
3370
- grid-template-areas: 'when rail body';
3371
- column-gap: 24px;
3372
- }
3373
- .ms-entry {
3374
- padding-bottom: var(--ms-gap);
3375
- }
3376
- .ms-when {
3377
- grid-area: when;
3378
- display: flex;
3379
- justify-content: flex-end;
3380
- padding-top: 5px;
3381
- }
3382
- .ms-timeframe {
3383
- color: var(--dpk-ink);
3384
- font-size: 13px;
3385
- font-weight: 650;
3386
- font-variant-numeric: tabular-nums;
3387
- letter-spacing: 0.01em;
3388
- text-align: right;
3389
- }
3390
- .ms-timeframe[data-empty='true'] {
3391
- color: var(--dpk-ink-faint);
3392
- font-weight: 500;
3393
- }
3394
-
3395
- /* The rail runs through every entry's padding, so the nodes read as one line;
3396
- it starts at the first node and fades out into the add node. */
3397
- .ms-rail {
3398
- grid-area: rail;
3399
- position: relative;
3400
- display: flex;
3401
- justify-content: center;
3402
- }
3403
- .ms-rail::before {
3404
- content: '';
3405
- position: absolute;
3406
- top: 0;
3407
- bottom: calc(-1 * var(--ms-gap));
3408
- left: calc(50% - 1px);
3409
- width: 2px;
3410
- border-radius: 1px;
3411
- background: var(--dpk-rule-strong);
3412
- }
3413
- .ms-entry:first-child .ms-rail::before {
3414
- top: calc(var(--ms-node) / 2);
3415
- }
3416
- .ms-add .ms-rail::before {
3417
- bottom: auto;
3418
- height: calc(var(--ms-node) / 2);
3419
- background: repeating-linear-gradient(to bottom, var(--dpk-rule-strong) 0 3px, transparent 3px 7px);
3420
- }
3421
- .ms-node {
3422
- position: relative;
3423
- display: grid;
3424
- place-items: center;
3425
- width: var(--ms-node);
3426
- height: var(--ms-node);
3427
- box-sizing: border-box;
3428
- border: 1px solid var(--dpk-rule-strong);
3429
- border-radius: 50%;
3430
- background: var(--dpk-paper-raised);
3431
- color: var(--dpk-ink);
3432
- font-family: var(--dpk-mono);
3433
- font-size: 12px;
3434
- font-weight: 700;
3435
- font-variant-numeric: tabular-nums;
3436
- /* A ring of page color cuts the rail around the node. */
3437
- box-shadow:
3438
- 0 0 0 5px var(--dpk-paper),
3439
- var(--dpk-bevel),
3440
- var(--dpk-shadow-xs);
3441
- transition:
3442
- border-color 160ms var(--dpk-ease),
3443
- color 160ms var(--dpk-ease);
3444
- }
3445
- .ms-entry:hover .ms-node,
3446
- .ms-entry:focus-within .ms-node {
3447
- border-color: var(--dpk-blue);
3448
- color: var(--dpk-blue-strong);
3449
- }
3450
- .ms-node--add {
3451
- border-style: dashed;
3452
- background: var(--dpk-paper);
3453
- box-shadow: 0 0 0 5px var(--dpk-paper);
3454
- }
3455
- .ms-node--add::before,
3456
- .ms-node--add::after {
3457
- content: '';
3458
- position: absolute;
3459
- left: 50%;
3460
- top: 50%;
3461
- width: 10px;
3462
- height: 1.5px;
3463
- border-radius: 1px;
3464
- background: var(--dpk-ink-faint);
3465
- transform: translate(-50%, -50%);
3466
- }
3467
- .ms-node--add::after {
3468
- transform: translate(-50%, -50%) rotate(90deg);
3469
- }
3470
- .ms-add .ms-body {
3471
- display: flex;
3472
- align-items: center;
3473
- min-height: var(--ms-node);
3474
- }
3475
- /* The label lines up with the names above; the button's padding hangs out. */
3476
- .ms-add .dpk-btn {
3477
- margin-left: -12px;
3478
- }
3479
-
3480
- .ms-body {
3481
- grid-area: body;
3482
- display: grid;
3483
- gap: 10px;
3484
- min-width: 0;
3485
- justify-items: start;
3486
- }
3487
- .ms-name {
3488
- justify-self: stretch;
3489
- min-width: 0;
3490
- margin: 0;
3491
- padding-top: 1px;
3492
- font-size: 19px;
3493
- font-weight: 700;
3494
- line-height: 1.4;
3495
- letter-spacing: -0.015em;
3496
- }
3497
- /* The field pads its text by 4px; pull it out by as much so the name lines
3498
- up with the description and keeps its place when editing starts. */
3499
- .ms-name dpk-inline-edit {
3500
- display: block;
3501
- margin: 0 -4px;
3502
- }
3503
- .ms-description {
3504
- margin: 0;
3505
- max-width: 64ch;
3506
- color: var(--dpk-ink-soft);
3507
- font-size: 14px;
3508
- line-height: 1.75;
3509
- white-space: pre-wrap;
3510
- }
3511
- .ms-description[data-empty='true'] {
3512
- color: var(--dpk-ink-faint);
3513
- font-size: 13px;
3514
- }
3515
- .ms-facts {
3516
- display: flex;
3517
- flex-wrap: wrap;
3518
- gap: 10px 36px;
3519
- margin: 6px 0 0;
3520
- }
3521
- .ms-facts dt {
3522
- margin-bottom: 3px;
3523
- color: var(--dpk-ink-faint);
3524
- font-size: 11px;
3525
- font-weight: 600;
3526
- letter-spacing: 0.02em;
3527
- }
3528
- .ms-facts dd {
3529
- display: flex;
3530
- align-items: center;
3531
- gap: 10px;
3532
- margin: 0;
3533
- color: var(--dpk-ink-faint);
3534
- font-size: 12px;
3535
- }
3536
- .ms-facts strong {
3537
- color: var(--dpk-ink);
3538
- font-size: 15px;
3539
- font-weight: 650;
3540
- font-variant-numeric: tabular-nums;
3541
- }
3542
- .ms-meter {
3543
- display: block;
3544
- width: 72px;
3545
- height: 4px;
3546
- border-radius: 2px;
3547
- background: var(--dpk-paper-inset);
3548
- overflow: hidden;
3549
- }
3550
- .ms-meter > span {
3551
- display: block;
3552
- height: 100%;
3553
- border-radius: inherit;
3554
- background: var(--dpk-blue);
3555
- }
3556
-
3557
- /* Where the slice's stories sit across the backbone, in activity tones. */
3558
- .ms-breakdown {
3559
- display: grid;
3560
- gap: 10px;
3561
- width: min(100%, 460px);
3562
- margin-top: 4px;
3563
- }
3564
- .ms-breakdown .status-bar {
3565
- height: 8px;
3566
- }
3567
- .ms-legend {
3568
- display: flex;
3569
- flex-wrap: wrap;
3570
- gap: 6px 16px;
3571
- margin: 0;
3572
- padding: 0;
3573
- list-style: none;
3574
- }
3575
- .ms-legend li {
3576
- display: inline-flex;
3577
- align-items: center;
3578
- gap: 6px;
3579
- color: var(--dpk-ink-soft);
3580
- font-size: 12px;
3581
- }
3582
- .ms-breakdown-count {
3583
- color: var(--dpk-ink-faint);
3584
- font-family: var(--dpk-mono);
3585
- font-size: 11px;
3586
- font-variant-numeric: tabular-nums;
3587
- }
3588
-
3589
- /* Narrow: the date moves above the name, the rail stays on the left. */
3590
- @media (max-width: 640px) {
3591
- .ms-overview {
3592
- --ms-node: 26px;
3593
- }
3594
- .ms-entry,
3595
- .ms-add {
3596
- grid-template-columns: var(--ms-node) minmax(0, 1fr);
3597
- grid-template-areas:
3598
- 'rail when'
3599
- 'rail body';
3600
- column-gap: 16px;
3601
- }
3602
- .ms-add {
3603
- grid-template-areas: 'rail body';
3604
- }
3605
- .ms-add .ms-when {
3606
- display: none;
3607
- }
3608
- .ms-when {
3609
- justify-content: flex-start;
3610
- padding: 4px 0 2px;
3611
- }
3612
- .ms-timeframe {
3613
- text-align: left;
3614
- }
3615
- }
3616
-
3617
- /*
3618
- * The statuses, labels and members overviews are no longer styled here: they
3619
- * are rendered by <dpk-usm-settings-section>, which carries its own copy of
3620
- * that CSS in its own shadow root, because the settings dialog may be drawn
3621
- * by the element that owns the page's chrome (see that file).
3622
- */
3623
-
3624
- /* Step picker shown after a cross-activity drop. */
3625
- .move-dialog {
3626
- min-width: 220px;
3627
- }
3628
- .move-dialog .dpk-rich-select {
3629
- width: 100%;
3630
- }
3631
-
3632
- /* ----------------------------------------------------------- table tab */
3633
-
3634
- /* The flat view of every story: dpk-table supplies its own
3635
- chrome, this just gives it the page's margins. */
3636
- .story-table {
3637
- display: block;
3638
- max-width: 1200px;
3639
- padding: 28px 0 40px;
3640
- }
3641
- `,j={kind:"idle"},xr={width:300,height:240},wa="statuses",Sa="labels",Ea="members",_r={status:wa,label:Sa,member:Ea},Ir=240,Ar=31,Mr=14,$a=160,Lr=1500;class Ta extends Mt{static{this.styles=[Mt.styles,Ot,Tr,Ke,Dt,kr,Co,Do,Wo,Ko,Uo,or,xt]}definitionFor(t){return Ds(t)}static{this.properties={mode:{state:!0}}}#t=new Xa(this);#e=new _t(this);#n=null;#i=new jn(this,{row:()=>this.renderRoot.querySelector(".page-nav"),items:t=>[...t.querySelectorAll('.page-tabs [role="tab"]')],keyOf:t=>t.getAttribute("data-tab")??"",kept:t=>t.getAttribute("aria-selected")==="true",more:t=>t.querySelector("[data-tabs-more-trigger]")});#a=!1;#s=null;#o;#r=new Lt(this);#l=new Lt(this);#d=null;constructor(){super(),this.mode=j,new st(this,{open:()=>this.#p()!==null,closesOn:t=>this.#u(t),ownsEscape:t=>this.mode.kind==="idle"&&(t.includes(this)||t[0]===document.body||t[0]===document.documentElement),dismiss:()=>this.context().navigate({story:null})}),new st(this,{open:()=>this.mode.kind==="filtering",closesOn:t=>!t.some(s=>s instanceof Element&&(s.id==="filter-menu"||s.hasAttribute("data-filter-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=j}),new st(this,{open:()=>this.mode.kind==="choosing-tab",closesOn:t=>!t.some(s=>s instanceof Element&&(s.id==="tabs-menu"||s.hasAttribute("data-tabs-more-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=j})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.#o),this.#s=null}renderRegions(t){return{main:this.#b(t)}}renderSettingsSections(t){const s=ne(this.locale),a=[kt(wa,s.statusesSection,"statuses",this.locale),kt(Sa,s.labelsSection,"labels",this.locale)];return P(t.state,"assignees")&&a.push(kt(Ea,s.membersSection,"members",this.locale)),a}showTarget(t){const s=_r[t.type];s!==void 0&&(t.type==="member"&&!P(this.context().state,"assignees")||this.openSettings(s))}updated(){if(super.updated(),this.#h(),this.#m(),this.mode.kind==="picking-dependency"){this.#c();return}if(this.mode.kind==="filtering"){const s=this.renderRoot.querySelector("#filter-menu"),a=this.renderRoot.querySelector(`[data-filter-trigger="${CSS.escape(this.mode.key)}"]`),n=(s?.childElementCount??0)*Ar+Mr;s&&a&&this.#e.open(s,a,{width:Ir,height:n});return}if(this.mode.kind==="choosing-tab"){const s=this.renderRoot.querySelector("#tabs-menu"),a=this.renderRoot.querySelector("[data-tabs-more-trigger]");if(!s){this.mode=j;return}const n=s.childElementCount*ar+nr;a&&this.#e.open(s,a,{width:ir,height:n},{placement:"bottom-start"});return}if(this.mode.kind!=="picking-step")return;const t=this.renderRoot.querySelector("#move-dialog");t&&this.#e.open(t,Ga(this.mode.point.x,this.mode.point.y),xr)}#c(){const t=this.renderRoot instanceof ShadowRoot?this.renderRoot.activeElement:null;if(!t?.matches(".sp-dep-search")){this.mode=j;return}const s=t.getAttribute("aria-activedescendant");s&&this.renderRoot.querySelector(`#${CSS.escape(s)}`)?.scrollIntoView?.({block:"nearest"})}#p(){return this.renderRoot.querySelector(".story-panel")}#u(t){const s=this.#p(),a=this.renderRoot.querySelector(".dpk-main");return!s||!a||t.includes(s)||!t.includes(a)?!1:!t.some(n=>n instanceof Element&&(n.localName==="dpk-internal-usm-story-card"||n.hasAttribute("popover")))}#m(){const t=this.#p(),s=t?.dataset.story??null,a=this.#n;if(s===a)return;this.#n=s;const n=this.shadowRoot?.activeElement??null;if(t){(!n||!t.contains(n))&&t.focus({preventScroll:!0});return}a===null||n!==null&&n.isConnected||this.renderRoot.querySelector(`dpk-internal-usm-story-card[data-story="${CSS.escape(a)}"]`)?.focus({preventScroll:!0})}#h(){if(!(Ve(this.navigation)!==null)){this.#a=!1;return}const a=this.renderRoot.querySelector("dpk-matrix")?.shadowRoot?.querySelector(".matrix-scroll")??null,n=this.renderRoot.querySelector('dpk-internal-usm-story-card[data-highlight="on"]');this.#a||!a||!n||(this.#a=!0,Ha(a,n,$a),Ka(a,n,$a))}#b(t){const s=ne(this.locale),a=ys(t.state,t.navigation);return l`
3642
- ${Qo(tr(s,t,a,{folded:this.#i.hidden,minimum:this.#i.minimum,open:this.mode.kind==="choosing-tab",toggle:()=>this.mode=this.mode.kind==="choosing-tab"?j:{kind:"choosing-tab"},close:()=>this.mode=j}),this.#g(s,t,a))}
3643
- ${this.#v(s,t,a)} ${this.#f(s,t,a)}
3644
- ${Jo(s,t,this.mode,this.#l,this.#d,{pick:n=>{this.#d=n,this.requestUpdate()},confirm:n=>this.#_(n),cancel:()=>{this.#d=null,this.mode=j}})}
3645
- `}#g(t,s,a){return a!=="map"||Pe(s.state).length===0?u:qo(t,s,{openFor:this.mode.kind==="filtering"?this.mode.key:null,toggle:n=>{const i=this.mode.kind==="filtering"&&this.mode.key===n;this.mode=i?j:{kind:"filtering",key:n}},close:()=>this.mode=j})}#f(t,s,a){if(a!=="map"&&a!=="table")return u;const n=lr(s);if(!n)return u;const i={search:this.mode.kind==="picking-dependency"?this.mode.search:null,set:d=>this.mode=d?{kind:"picking-dependency",search:d}:j},o={copied:this.#s,copy:d=>{this.#y(d)}};return pr(t,s,n,i,o,{open:d=>this.openSettings(d)})}async#y(t){await Me(t)&&(clearTimeout(this.#o),this.#s=t,this.requestUpdate(),this.#o=setTimeout(()=>{this.#s=null,this.requestUpdate()},Lr))}#v(t,s,a){switch(a){case"table":return $r(t,s);case"milestones":return jo(t,s,to(s.state));case"burndown":return Eo(t,s,new Date,this.#r);case"map":return this.#k(t,s)}}#k(t,s){return oo({m:t,context:s,drag:this.#t,handlers:{selectStory:a=>this.#w(a),dropOnCell:(a,n)=>this.#S(a,n),dropOnGroupCell:(a,n,i)=>this.#E(a,n,i),reorderMilestone:a=>this.#$(a),reorderActivity:a=>this.#T(a),reorderStep:a=>this.#x(a)},highlighted:Fn(s.state,s.navigation)})}#w(t){const s=this.context(),a=T(s.state,t);a&&s.navigate({step:a.stepId,story:a.id})}#S(t,s){const a=this.context();a.dispatch(js(a.state,t,s.item.id,s.hoveredId,s.place))}#E(t,s,a){const n=this.context(),i=T(n.state,a.item.id);if(!i)return;if(i.activityId!==t){this.#d=null,this.mode={kind:"picking-step",storyId:i.id,activityId:t,milestoneId:s,point:{x:a.event.clientX,y:a.event.clientY}};return}const o=Xs(n.state,t,s,i.id,a.hoveredId,a.place);o&&n.dispatch(o)}#$(t){this.context().dispatch({type:"REORDER_MILESTONE",target:{type:"milestone",id:t.rowId},payload:{after:t.after}})}#T(t){this.context().dispatch({type:"REORDER_ACTIVITY",target:{type:"activity",id:t.columnId},payload:{after:t.after}})}#x(t){const s=t.columnId;this.context().dispatch({type:"REORDER_STEP",target:{type:"step",id:ce(s,t.subColumnId)},payload:{after:t.after===null?null:ce(s,t.after)}})}#_(t){const s=this.mode;if(s.kind!=="picking-step")return;const a=this.context();a.dispatch(Zs(a.state,s.storyId,s.activityId,t,s.milestoneId)),this.#d=null,this.mode=j}}const xa=()=>{ji(),Bi(),bi(),Qi(),customElements.get("dpk-view-usm")||customElements.define("dpk-view-usm",Ta)},Dr=Object.freeze(Object.defineProperty({__proto__:null,DpkViewUsm:Ta,IDLE_MODE:j,allUsmIds:W,applyUsmAction:cs,defineUsmElement:xa,describeUsmAction:Ts,dropAfter:eo,emptyUsmBase:dt,findActivity:te,findMilestone:U,findStep:N,findStory:T,flatSteps:Pe,parseUsmBase:Zt,resolveCellDrop:js,resolveGroupDrop:Xs,resolvePickedStepMove:Zs,resolveUsmNavigation:Ms,serializeUsmAction:xs,storiesInCell:ze,storyCountForStep:es,usmAction:In,usmActions:v,usmCommentTargets:Is,usmCurrentTarget:As,usmDefinitionFor:Ds,usmHasTarget:Ls,usmMessages:ne,usmTargetLabel:_s,usmTitle:ht},Symbol.toStringTag,{value:"Module"}));export{xa as d,Dr as i};