dev-process-kit 0.1.0 → 0.2.1

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 (31) hide show
  1. package/dist/chunks/shared-BjyoXjSO.js +1 -0
  2. package/dist/chunks/shared-C-d71uRP.js +573 -0
  3. package/dist/chunks/shared-C5n6LBUz.js +1105 -0
  4. package/dist/chunks/{shared-XXW1oBnj.js → shared-CAWKGcWJ.js} +56 -54
  5. package/dist/chunks/{shared-BqL8W-G6.js → shared-CdZhkPto.js} +1 -1
  6. package/dist/chunks/{shared-D6pr-dx0.js → shared-DB_C1Mdu.js} +1 -1
  7. package/dist/chunks/{shared-k9bZPE_p.js → shared-DDOpqbVL.js} +1 -1
  8. package/dist/chunks/shared-DeXM1v86.js +610 -0
  9. package/dist/chunks/{shared-DRzfRsiJ.js → shared-DehzCTC2.js} +179 -172
  10. package/dist/chunks/{shared-BWk3i0ft.js → shared-Dfj6O0K4.js} +1 -1
  11. package/dist/chunks/{shared-BDka-8DG.js → shared-DiFAX1_p.js} +264 -204
  12. package/dist/chunks/{shared-D1W4I3eq.js → shared-DkPo0jX3.js} +391 -320
  13. package/dist/chunks/shared-GL2Z98Cz.js +4206 -0
  14. package/dist/chunks/shared-cMhjZGRs.js +301 -0
  15. package/dist/chunks/{shared-CqjOqXJ3.js → shared-zZF1zU0o.js} +2 -2
  16. package/dist/components.js +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/templates/delegation-poker.js +1 -1
  19. package/dist/templates/event-storming.js +1 -1
  20. package/dist/templates/example-mapping.js +1 -1
  21. package/dist/templates/plain.js +1 -1
  22. package/dist/templates/prototype.js +1 -1
  23. package/dist/templates/slides.js +1 -1
  24. package/dist/templates/task-board.js +1 -1
  25. package/dist/templates/usm.js +1 -1
  26. package/dist/templates/whiteboard.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/chunks/shared-BZK_cqqQ.js +0 -1104
  29. package/dist/chunks/shared-Bhrkz9uX.js +0 -3595
  30. package/dist/chunks/shared-BqvHpTHr.js +0 -572
  31. package/dist/chunks/shared-gytWODMC.js +0 -610
@@ -1,6 +1,6 @@
1
- import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN as Ke,b9 as rs,ba as os,aM as ht,ae as ds,aP as ls,aA as ps,aC as A,al as $,ag as U,ah as N,aB as L,p as f,au as gt,av as v,v as J,ay as z,aq as cs,P as us,e as ms,a0 as hs,V as _,R as x,aU as C,a2 as K,a4 as l,a3 as m,a7 as R,a9 as qe,ab as We,G as gs,j as bs,aS as fs,aT as vs,aZ as ys,A as bt,l as j,a5 as B,B as je,aF as X,J as ks,bb as ft,K as Te,bc as ws,aG as xs,b5 as vt,aJ as $s,z as Xe,T as yt,a1 as Es,aa as Ss,a$ as Ze,aK as Ts,bd as As,be as _s}from"./shared-BDka-8DG.js";import{r as fe,D as Is}from"./shared-B5lBiq5s.js";import{L as Ms}from"./shared-CjW1DhGL.js";const Ls=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],Ds=[["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"}]],Rs=[["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"}]],Os=[["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"}]],Ns=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Cs=[["circle",{cx:"12",cy:"12",r:"10"}]],Bs=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Ys=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],Us=[["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"}]],zs=[["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"}]],Ps=[["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"}]],Fs=[["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"}]],Gs=[["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"}]],Hs=[["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"}]],kt=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),Je=(e,t,a)=>{const s=kt(e),n=new Set,i=[...s.get(t)??[]];for(;i.length>0;){const r=i.pop();if(!(r===void 0||n.has(r))){if(r===a)return!0;n.add(r),i.push(...s.get(r)??[])}}return!1},Vs=e=>{const t=kt(e),a=new Set,s=(n,i)=>{const r=i.indexOf(n);if(r>=0)return[...i.slice(r),n];if(a.has(n))return null;for(const o of t.get(n)??[]){const d=s(o,[...i,n]);if(d)return d}return a.add(n),null};for(const n of e){const i=s(n.id,[]);if(i)return i}return null},Ae=["gray","blue","violet","green","amber","accent"],wt=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],_e=["estimates","assignees"],xt=["stories","points","weighted"],$t=k(h(),rs(),Ke(e=>{const[t=0,a=0,s=0]=e.split("-").map(Number),n=new Date(Date.UTC(t,a-1,s));return n.getUTCMonth()===a-1&&n.getUTCDate()===s},"a due date must be a calendar day")),Et=k(Ee(),Ve(),$e(0)),Qe=k(Ee(),Ve(),$e(0)),St=V({milestoneId:A(k(h(),$(1))),statusId:A(k(h(),$(1))),stories:k(Ee(),ps(),$e(0)),points:k(Ee(),Ve(),$e(0))}),Ie=k(h(),is()),Ks=V({id:k(h(),$(1)),name:k(h(),$(1))}),qs=V({id:L,name:k(h(),$(1)),actor:A(h()),steps:U(N(Ks),[])}),Ws=V({id:k(h(),$(1)),name:k(h(),$(1)),timeframe:A(h()),description:A(h()),dueDate:A($t)}),se=Se(Ae),et=Se(wt),tt=k(h(),os(),Ke(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),js=V({url:tt,label:A(k(h(),$(1)))}),Xs=V({id:L,name:k(h(),$(1)),tone:U(se),icon:U(et),weight:A(Et)}),Zs=V({id:L,name:k(h(),$(1)),tone:U(se)}),Tt=k(h(),Ke(e=>e.trim()!=="","a comment needs some text")),Js=V({id:L,body:Tt,createdAt:A(Ie)}),Qs=V({id:L,name:k(h(),$(1)),description:A(h()),activityId:k(h(),$(1)),stepId:k(h(),$(1)),milestoneId:A(h()),statusId:A(h()),links:A(N(js)),labelIds:A(N(k(h(),$(1)))),blockedBy:A(N(k(h(),$(1)))),estimateId:A(k(h(),$(1))),assigneeId:A(k(h(),$(1))),comments:A(N(Js))}),en=V({id:L,name:k(h(),$(1)),tone:U(se)}),At=Se(_e),_t=Se(xt),tn=V({id:L,name:k(h(),$(1)),points:Qe}),an=V({id:L,at:Ie,tally:N(St)}),sn=V({title:A(h()),features:U(N(At),[]),measure:A(_t),doneStatusId:A(k(h(),$(1))),activities:U(N(qs),[]),milestones:U(N(Ws),[]),statuses:U(N(Xs),[]),labels:U(N(Zs),[]),members:U(N(en),[]),estimates:U(N(tn),[]),stories:U(N(Qs),[]),snapshots:U(N(an),[])}),at=e=>Ae[e%Ae.length]??"gray",Me=e=>at(e+1),It=e=>{const t=ds(sn,e);if(new Set(t.features).size!==t.features.length)throw new Error("the base turns a feature on twice");const a=t.statuses[0]?.id,s={...t,stories:a===void 0?t.stories:t.stories.map(c=>c.statusId===void 0?{...c,statusId:a}:c),statuses:t.statuses.map((c,g)=>({...c,tone:c.tone??at(g),icon:c.icon??"progress"})),labels:t.labels.map((c,g)=>({...c,tone:c.tone??Me(g)})),members:t.members.map((c,g)=>({...c,tone:c.tone??Me(g)})),features:_e.filter(c=>t.features.includes(c))},n=new Map;for(const c of s.activities)for(const g of c.steps)n.set(g.id,c.id);const i=new Set(s.milestones.map(c=>c.id)),r=new Set(s.statuses.map(c=>c.id)),o=new Set(s.labels.map(c=>c.id));if(s.doneStatusId!==void 0&&!r.has(s.doneStatusId))throw new Error(`the base references unknown doneStatusId "${s.doneStatusId}"`);const d=new Set,p=(c,g)=>{if(d.has(g))throw new Error(`duplicate id "${g}" in ${c}`);d.add(g)};for(const c of s.activities){p("activities",c.id);for(const g of c.steps)p("steps",g.id)}for(const c of s.milestones)p("milestones",c.id);for(const c of s.statuses)p("statuses",c.id);for(const c of s.labels)p("labels",c.id);for(const c of s.members)p("members",c.id);for(const c of s.estimates)p("estimates",c.id);for(const c of s.snapshots)p("snapshots",c.id);const u=new Set(s.estimates.map(c=>c.id)),y=new Set(s.members.map(c=>c.id));for(const c of s.stories){p("stories",c.id);for(const be of c.comments??[])p("story comments",be.id);const g=n.get(c.stepId);if(g===void 0||g!==c.activityId)throw new Error(`story "${c.id}" references unknown activityId/stepId`);if(c.milestoneId!==void 0&&!i.has(c.milestoneId))throw new Error(`story "${c.id}" references unknown milestoneId "${c.milestoneId}"`);const ae=(c.links??[]).map(be=>be.url);if(new Set(ae).size!==ae.length)throw new Error(`story "${c.id}" links the same URL twice`);if(c.statusId!==void 0&&!r.has(c.statusId))throw new Error(`story "${c.id}" references unknown statusId "${c.statusId}"`);const T=c.labelIds??[];if(new Set(T).size!==T.length)throw new Error(`story "${c.id}" has a label twice`);const xe=T.find(be=>!o.has(be));if(xe!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${xe}"`);if(c.estimateId!==void 0&&!u.has(c.estimateId))throw new Error(`story "${c.id}" references unknown estimateId "${c.estimateId}"`);if(c.assigneeId!==void 0&&!y.has(c.assigneeId))throw new Error(`story "${c.id}" references unknown assigneeId "${c.assigneeId}"`)}for(const c of s.snapshots){const g=Mt(s,c.tally);if(g!==null)throw new Error(`snapshot "${c.id}" ${g}`)}const E=new Set(s.stories.map(c=>c.id));for(const c of s.stories){const g=c.blockedBy??[];if(g.includes(c.id))throw new Error(`story "${c.id}" is blocked by itself`);if(new Set(g).size!==g.length)throw new Error(`story "${c.id}" has a blocker twice`);const ae=g.find(T=>!E.has(T));if(ae!==void 0)throw new Error(`story "${c.id}" references unknown blocker "${ae}"`)}const b=Vs(s.stories);if(b!==null)throw new Error(`stories block one another in a cycle: ${b.join(" \u2192 ")}`);return s},Mt=(e,t)=>{const a=new Set;for(const s of t){if(s.milestoneId!==void 0&&!P(e,s.milestoneId))return`references unknown milestoneId "${s.milestoneId}"`;if(s.statusId!==void 0&&!O(e,s.statusId))return`references unknown statusId "${s.statusId}"`;const n=Le(s);if(a.has(n))return`tallies "${n}" twice`;a.add(n)}return null},Le=e=>`${e.milestoneId??""}/${e.statusId??""}`,Lt=()=>({features:[],activities:[],milestones:[],statuses:[],labels:[],members:[],estimates:[],stories:[],snapshots:[]}),Q=(e,t)=>{if(t!==void 0)return e.activities.find(a=>a.id===t)},ee=(e,t)=>`${e}.${t}`,M=(e,t)=>{if(t===void 0)return;const a=ls(t,2);if(a){const[s,n]=a;if(s===void 0||n===void 0)return;const i=e.activities.find(o=>o.id===s),r=i?.steps.find(o=>o.id===n);return i&&r?{activity:i,step:r}:void 0}if(!t.includes("."))for(const s of e.activities){const n=s.steps.find(i=>i.id===t);if(n)return{activity:s,step:n}}},P=(e,t)=>{if(t!==void 0)return e.milestones.find(a=>a.id===t)},O=(e,t)=>{if(t!==void 0)return e.statuses.find(a=>a.id===t)},W=(e,t)=>{if(t!==void 0)return e.labels.find(a=>a.id===t)},Z=(e,t)=>e.features.includes(t),F=(e,t)=>{if(t!==void 0)return e.members.find(a=>a.id===t)},nn=(e,t)=>F(e,t.assigneeId),G=(e,t)=>{if(t!==void 0)return e.estimates.find(a=>a.id===t)},ve=(e,t)=>{if(t!==void 0)return e.snapshots.find(a=>a.id===t)},rn=(e,t)=>{const a=new Set(t.labelIds??[]);return e.labels.filter(s=>a.has(s.id))},S=(e,t)=>{if(t!==void 0)return e.stories.find(a=>a.id===t)},De=e=>e.activities.flatMap(t=>t.steps.map(a=>({activity:t,step:a}))),on=e=>({...e,stories:ht(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Re=(e,t,a)=>e.stories.filter(s=>s.stepId===t&&(s.milestoneId??void 0)===a),Dt=(e,t,a)=>e.stories.filter(s=>s.activityId===t&&(s.milestoneId??void 0)===a),q=e=>[...e.activities.map(t=>t.id),...e.activities.flatMap(t=>t.steps.map(a=>a.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(a=>a.id)),...e.snapshots.map(t=>t.id)],Rt=(e,t)=>e.stories.filter(a=>a.stepId===t).length,Ot=v({feature:At,enabled:cs()}),w={SET_ACTIVITY_NAME:f("SET_ACTIVITY_NAME","activity",v({name:k(h(),$(1))})),SET_ACTIVITY_ACTOR:f("SET_ACTIVITY_ACTOR","activity",v({actor:h()})),SET_STEP_NAME:f("SET_STEP_NAME","step",v({name:k(h(),$(1))})),REORDER_STEP:f("REORDER_STEP","step",v({after:z(h())}),{mode:"sequence"}),REORDER_ACTIVITY:f("REORDER_ACTIVITY","activity",v({after:z(h())}),{mode:"sequence"}),ADD_ACTIVITY:f("ADD_ACTIVITY","page",v({id:L,name:k(h(),$(1))}),{dedupeKey:J}),ADD_STEP:f("ADD_STEP","activity",v({id:L,name:k(h(),$(1))}),{dedupeKey:J}),DELETE_ACTIVITY:f("DELETE_ACTIVITY","activity",v({})),DELETE_STEP:f("DELETE_STEP","step",v({})),SET_STORY_NAME:f("SET_STORY_NAME","story",v({name:k(h(),$(1))})),SET_STORY_DESCRIPTION:f("SET_STORY_DESCRIPTION","story",v({description:h()})),SET_STORY_MILESTONE:f("SET_STORY_MILESTONE","story",v({milestoneId:z(h())})),MOVE_STORY:f("MOVE_STORY","story",v({activityId:k(h(),$(1)),stepId:k(h(),$(1)),milestoneId:z(h()),after:z(h())}),{mode:"sequence"}),REORDER_STORY:f("REORDER_STORY","story",v({after:z(h())}),{mode:"sequence"}),ADD_STORY:f("ADD_STORY","step",v({id:L,name:k(h(),$(1)),activityId:k(h(),$(1)),milestoneId:A(h())}),{dedupeKey:J}),DELETE_STORY:f("DELETE_STORY","story",v({})),ADD_STORY_LINK:f("ADD_STORY_LINK","story",v({url:tt,label:A(k(h(),$(1)))})),REMOVE_STORY_LINK:f("REMOVE_STORY_LINK","story",v({url:h()})),ADD_STORY_COMMENT:f("ADD_STORY_COMMENT","story",v({id:L,body:Tt,createdAt:A(Ie)}),{dedupeKey:J}),DELETE_STORY_COMMENT:f("DELETE_STORY_COMMENT","story",v({commentId:k(h(),$(1))})),SET_STORY_STATUS:f("SET_STORY_STATUS","story",v({statusId:k(h(),$(1))})),SET_MILESTONE_NAME:f("SET_MILESTONE_NAME","milestone",v({name:k(h(),$(1))})),ADD_MILESTONE:f("ADD_MILESTONE","page",v({id:L,name:k(h(),$(1))}),{dedupeKey:J}),DELETE_MILESTONE:f("DELETE_MILESTONE","milestone",v({})),REORDER_MILESTONE:f("REORDER_MILESTONE","milestone",v({after:z(h())}),{mode:"sequence"}),SET_MILESTONE_DUE_DATE:f("SET_MILESTONE_DUE_DATE","milestone",v({dueDate:z($t)})),ADD_STATUS:f("ADD_STATUS","page",v({id:L,name:k(h(),$(1)),tone:se,icon:A(et)}),{dedupeKey:J}),SET_STATUS_NAME:f("SET_STATUS_NAME","status",v({name:k(h(),$(1))})),SET_STATUS_TONE:f("SET_STATUS_TONE","status",v({tone:se})),SET_STATUS_ICON:f("SET_STATUS_ICON","status",v({icon:et})),SET_STATUS_WEIGHT:f("SET_STATUS_WEIGHT","status",v({weight:Et})),SET_MEASURE:f("SET_MEASURE","page",v({measure:_t})),SET_DONE_STATUS:f("SET_DONE_STATUS","status",v({})),DELETE_STATUS:f("DELETE_STATUS","status",v({})),REORDER_STATUS:f("REORDER_STATUS","status",v({after:z(h())}),{mode:"sequence"}),ADD_LABEL:f("ADD_LABEL","page",v({id:L,name:k(h(),$(1)),tone:se}),{dedupeKey:J}),SET_LABEL_NAME:f("SET_LABEL_NAME","label",v({name:k(h(),$(1))})),SET_LABEL_TONE:f("SET_LABEL_TONE","label",v({tone:se})),DELETE_LABEL:f("DELETE_LABEL","label",v({})),REORDER_LABEL:f("REORDER_LABEL","label",v({after:z(h())}),{mode:"sequence"}),ADD_STORY_LABEL:f("ADD_STORY_LABEL","story",v({labelId:k(h(),$(1))})),REMOVE_STORY_LABEL:f("REMOVE_STORY_LABEL","story",v({labelId:k(h(),$(1))})),ADD_STORY_BLOCKER:f("ADD_STORY_BLOCKER","story",v({blockerId:k(h(),$(1))})),REMOVE_STORY_BLOCKER:f("REMOVE_STORY_BLOCKER","story",v({blockerId:k(h(),$(1))})),ADD_MEMBER:f("ADD_MEMBER","page",v({id:L,name:k(h(),$(1)),tone:se}),{dedupeKey:J}),SET_MEMBER_NAME:f("SET_MEMBER_NAME","member",v({name:k(h(),$(1))})),SET_MEMBER_TONE:f("SET_MEMBER_TONE","member",v({tone:se})),DELETE_MEMBER:f("DELETE_MEMBER","member",v({})),REORDER_MEMBER:f("REORDER_MEMBER","member",v({after:z(h())}),{mode:"sequence"}),SET_STORY_ASSIGNEE:f("SET_STORY_ASSIGNEE","story",v({memberId:z(k(h(),$(1)))})),ADD_ESTIMATE:f("ADD_ESTIMATE","page",v({id:L,name:k(h(),$(1)),points:Qe}),{dedupeKey:J}),SET_ESTIMATE_NAME:f("SET_ESTIMATE_NAME","estimate",v({name:k(h(),$(1))})),SET_ESTIMATE_POINTS:f("SET_ESTIMATE_POINTS","estimate",v({points:Qe})),DELETE_ESTIMATE:f("DELETE_ESTIMATE","estimate",v({})),REORDER_ESTIMATE:f("REORDER_ESTIMATE","estimate",v({after:z(h())}),{mode:"sequence"}),SET_STORY_ESTIMATE:f("SET_STORY_ESTIMATE","story",v({estimateId:z(k(h(),$(1)))})),RECORD_SNAPSHOT:f("RECORD_SNAPSHOT","page",v({id:L,at:Ie,tally:N(St)}),{dedupeKey:J}),DELETE_SNAPSHOT:f("DELETE_SNAPSHOT","snapshot",v({})),SET_FEATURE:f("SET_FEATURE","page",Ot,{dedupeKey:e=>{const t=gt(Ot,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},dn={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}})},ue=e=>{const t=e.statuses.findIndex(a=>a.id===e.doneStatusId);return t>=0?t:e.statuses.length-1},Nt=e=>e.statuses[ue(e)],Ct=(e,t)=>{if(t===void 0)return!1;const a=e.statuses.findIndex(s=>s.id===t);return a>=0&&a>=ue(e)},Bt=e=>e.statuses.slice(0,ue(e)+1),ln=(e,t)=>e.milestones.find(a=>a.id===t.milestone)??e.milestones.find(a=>a.dueDate!==void 0)??e.milestones[0],me=e=>Z(e,"estimates")?e.measure??(e.estimates.length>0?"points":"stories"):"stories",Yt=e=>e.weight??1,te=10,Ut=e=>{const{statuses:t}=e,a=ue(e);if(me(e)!=="weighted")return t.map((r,o)=>o<a?1:0);const s=t.slice(0,a).map(Yt),n=Oe(s),i=s.map(r=>n>0?r/n:1/s.length);return t.map((r,o)=>Oe(i.slice(o)))},pn=1,zt=(e,t)=>G(e,t.estimateId)?.points??pn,Pt=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}},r=Le(i),o=t.get(r)??{...i,stories:0,points:0};t.set(r,{...o,stories:o.stories+1,points:o.points+zt(e,n)})}const a=[...e.milestones.map(n=>n.id),void 0],s=e.statuses.length===0?[void 0]:e.statuses.map(n=>n.id);return a.flatMap(n=>s.flatMap(i=>{const r=t.get(Le({milestoneId:n,statusId:i}));return r?[r]:[]}))},cn=(e,t,a)=>{const s=me(e),i=[...ht(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:a,tally:Pt(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:un(e.statuses,d.tally,t,s)})),r=Ut(e),o=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:mn(e.milestones.find(d=>d.id===t)?.dueDate),combined:i.map(d=>o(d,d.values.reduce((p,u,y)=>p+u*(r[y]??0),0))),byStatus:e.statuses.slice(1).map((d,p)=>({status:d,points:i.map(u=>o(u,Oe(u.values.slice(0,p+1))))}))}},un=(e,t,a,s)=>e.map(n=>Oe(t.filter(i=>i.milestoneId===a&&i.statusId===n.id).map(i=>s==="stories"?i.stories:i.points))),mn=e=>{if(e===void 0)return null;const[t=0,a=1,s=1]=e.split("-").map(Number);return new Date(t,a-1,s,23,59,59).getTime()},le=e=>{const t=new Date(e),a=s=>String(s).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())} ${a(t.getHours())}:${a(t.getMinutes())}`},Oe=e=>e.reduce((t,a)=>t+a,0),Ft=(e,t)=>{const a=us(w,t);if(a===null)return null;const s=a.target.id;switch(a.type){case"SET_ACTIVITY_NAME":{const{name:n}=a.payload;return e.activities.some(i=>i.id===s)?{...e,activities:e.activities.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_ACTIVITY_ACTOR":{const n=a.payload.actor.trim();return e.activities.some(i=>i.id===s)?{...e,activities:e.activities.map(i=>{if(i.id!==s)return i;const{actor:r,...o}=i;return n===""?o:{...o,actor:n}})}:null}case"SET_STEP_NAME":{const{name:n}=a.payload,i=M(e,s);return i?{...e,activities:e.activities.map(r=>r.id===i.activity.id?{...r,steps:r.steps.map(o=>o.id===i.step.id?{...o,name:n}:o)}:r)}:null}case"REORDER_STEP":{const{after:n}=a.payload,i=M(e,s);if(!i)return null;const r=n===null?null:M(e,n);if(n!==null&&(!r||r.activity.id!==i.activity.id))return null;const o=pe(i.activity.steps,i.step.id,r?.step.id??null);return o===null?null:{...e,activities:e.activities.map(d=>d.id===i.activity.id?{...d,steps:o}:d)}}case"REORDER_ACTIVITY":{const{after:n}=a.payload,i=pe(e.activities,s,n);return i===null?null:{...e,activities:i}}case"ADD_ACTIVITY":{const n=a.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=a.payload,i=e.activities.find(r=>r.id===s);return i?i.steps.some(r=>r.id===n.id)?e:{...e,activities:e.activities.map(r=>r.id===s?{...r,steps:[...r.steps,{id:n.id,name:n.name}]}:r)}:null}case"DELETE_ACTIVITY":{const n=e.activities.find(r=>r.id===s);if(!n)return null;const i=new Set(n.steps.map(r=>r.id));return nt({...e,activities:e.activities.filter(r=>r.id!==s)},r=>r.activityId===s||i.has(r.stepId))}case"DELETE_STEP":{const n=M(e,s);return n?nt({...e,activities:e.activities.map(i=>i.id===n.activity.id?{...i,steps:i.steps.filter(r=>r.id!==n.step.id)}:i)},i=>i.activityId===n.activity.id&&i.stepId===n.step.id):null}case"SET_STORY_NAME":{const{name:n}=a.payload;return H(e,s,i=>({...i,name:n}))}case"SET_STORY_DESCRIPTION":{const{description:n}=a.payload;return H(e,s,i=>({...i,description:n}))}case"SET_STORY_MILESTONE":{const{milestoneId:n}=a.payload;return n!==null&&!P(e,n)?null:H(e,s,i=>n===null?st(i):{...i,milestoneId:n})}case"MOVE_STORY":{const n=a.payload,i=S(e,s);if(!i)return null;const r=M(e,n.stepId);if(!r||r.activity.id!==n.activityId||n.milestoneId!==null&&!P(e,n.milestoneId))return null;const o=n.milestoneId??void 0,d=o===void 0?{...st(i),activityId:r.activity.id,stepId:r.step.id}:{...i,activityId:r.activity.id,stepId:r.step.id,milestoneId:o};return Vt(e,d,n.after)}case"REORDER_STORY":{const{after:n}=a.payload,i=S(e,s);return i?Vt(e,i,n,!0):null}case"ADD_STORY":{const n=a.payload,i=M(e,t.target.id);if(!i||i.activity.id!==n.activityId||n.milestoneId!==void 0&&!P(e,n.milestoneId))return null;if(e.stories.some(o=>o.id===n.id))return e;const r={id:n.id,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===s)?nt(e,n=>n.id===s):null;case"ADD_STORY_LINK":{const{url:n,label:i}=a.payload,r=S(e,s);if(!r)return null;if(r.links?.some(d=>d.url===n))return e;const o=i===void 0?{url:n}:{url:n,label:i};return H(e,s,d=>({...d,links:[...d.links??[],o]}))}case"REMOVE_STORY_LINK":{const{url:n}=a.payload;return S(e,s)?.links?.some(r=>r.url===n)?H(e,s,r=>{const o=(r.links??[]).filter(u=>u.url!==n),{links:d,...p}=r;return o.length===0?p:{...p,links:o}}):null}case"ADD_STORY_COMMENT":{const{id:n,body:i,createdAt:r}=a.payload,o=S(e,s);if(!o)return null;if(o.comments?.some(p=>p.id===n))return e;if(q(e).includes(n))return null;const d=r===void 0?{id:n,body:i}:{id:n,body:i,createdAt:r};return H(e,s,p=>({...p,comments:[...p.comments??[],d]}))}case"DELETE_STORY_COMMENT":{const{commentId:n}=a.payload;return S(e,s)?.comments?.some(r=>r.id===n)?H(e,s,r=>{const o=(r.comments??[]).filter(u=>u.id!==n),{comments:d,...p}=r;return o.length===0?p:{...p,comments:o}}):null}case"SET_STORY_STATUS":{const{statusId:n}=a.payload;return O(e,n)?H(e,s,i=>({...i,statusId:n})):null}case"SET_MILESTONE_NAME":{const{name:n}=a.payload;return e.milestones.some(i=>i.id===s)?{...e,milestones:e.milestones.map(i=>i.id===s?{...i,name:n}:i)}:null}case"ADD_MILESTONE":{const n=a.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===s)?{...e,milestones:e.milestones.filter(n=>n.id!==s),stories:e.stories.map(n=>n.milestoneId===s?st(n):n),snapshots:it(e,n=>n.milestoneId===s?oe(n,"milestoneId"):n)}:null;case"REORDER_MILESTONE":{const{after:n}=a.payload,i=pe(e.milestones,s,n);return i===null?null:{...e,milestones:i}}case"SET_MILESTONE_DUE_DATE":{const{dueDate:n}=a.payload;return P(e,s)?{...e,milestones:e.milestones.map(i=>i.id!==s?i:n===null?oe(i,"dueDate"):{...i,dueDate:n})}:null}case"ADD_STATUS":{const{id:n,name:i,tone:r,icon:o}=a.payload;if(e.statuses.some(p=>p.id===n))return e;const d=[...e.statuses,{id:n,name:i,tone:r,icon:o??"progress"}];return e.statuses.length===0?{...e,statuses:d,stories:e.stories.map(p=>({...p,statusId:n})),snapshots:it(e,p=>({...p,statusId:n}))}:{...e,statuses:d}}case"SET_STATUS_NAME":{const{name:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_STATUS_TONE":{const{tone:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"SET_STATUS_ICON":{const{icon:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,icon:n}:i)}:null}case"SET_STATUS_WEIGHT":{const{weight:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,weight:n}:i)}:null}case"SET_MEASURE":{const{measure:n}=a.payload;return me(e)===n?e:{...e,measure:n}}case"SET_DONE_STATUS":return O(e,s)?e.doneStatusId===s?e:{...e,doneStatusId:s}:null;case"DELETE_STATUS":{if(!O(e,s))return null;const n=e.statuses.filter(r=>r.id!==s),i=n[0]?.id;return{...e.doneStatusId===s?oe(e,"doneStatusId"):e,statuses:n,stories:e.stories.map(r=>r.statusId!==s?r:i===void 0?hn(r):{...r,statusId:i}),snapshots:it(e,r=>r.statusId!==s?r:i===void 0?oe(r,"statusId"):{...r,statusId:i})}}case"REORDER_STATUS":{const{after:n}=a.payload,i=pe(e.statuses,s,n);return i===null?null:{...e,statuses:i}}case"ADD_LABEL":{const{id:n,name:i,tone:r}=a.payload;return W(e,n)?e:{...e,labels:[...e.labels,{id:n,name:i,tone:r}]}}case"SET_LABEL_NAME":{const{name:n}=a.payload;return W(e,s)?{...e,labels:e.labels.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_LABEL_TONE":{const{tone:n}=a.payload;return W(e,s)?{...e,labels:e.labels.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"DELETE_LABEL":return W(e,s)?{...e,labels:e.labels.filter(n=>n.id!==s),stories:e.stories.map(n=>n.labelIds?.includes(s)?Gt(n,s):n)}:null;case"REORDER_LABEL":{const{after:n}=a.payload,i=pe(e.labels,s,n);return i===null?null:{...e,labels:i}}case"ADD_STORY_LABEL":{const{labelId:n}=a.payload,i=S(e,s);return!i||!W(e,n)?null:i.labelIds?.includes(n)?e:H(e,s,r=>({...r,labelIds:[...r.labelIds??[],n]}))}case"REMOVE_STORY_LABEL":{const{labelId:n}=a.payload;return S(e,s)?.labelIds?.includes(n)?H(e,s,i=>Gt(i,n)):null}case"ADD_STORY_BLOCKER":{const{blockerId:n}=a.payload,i=S(e,s);return!i||!S(e,n)?null:i.blockedBy?.includes(n)?e:n===s||Je(e.stories,n,s)?null:H(e,s,r=>({...r,blockedBy:[...r.blockedBy??[],n]}))}case"REMOVE_STORY_BLOCKER":{const{blockerId:n}=a.payload;return S(e,s)?.blockedBy?.includes(n)?H(e,s,i=>Ht(i,new Set([n]))):null}case"ADD_MEMBER":{const{id:n,name:i,tone:r}=a.payload;return F(e,n)?e:{...e,members:[...e.members,{id:n,name:i,tone:r}]}}case"SET_MEMBER_NAME":{const{name:n}=a.payload;return F(e,s)?{...e,members:e.members.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_MEMBER_TONE":{const{tone:n}=a.payload;return F(e,s)?{...e,members:e.members.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"DELETE_MEMBER":return F(e,s)?{...e,members:e.members.filter(n=>n.id!==s),stories:e.stories.map(n=>n.assigneeId===s?oe(n,"assigneeId"):n)}:null;case"REORDER_MEMBER":{const{after:n}=a.payload,i=pe(e.members,s,n);return i===null?null:{...e,members:i}}case"SET_STORY_ASSIGNEE":{const{memberId:n}=a.payload;return n!==null&&!F(e,n)?null:H(e,s,i=>n===null?oe(i,"assigneeId"):{...i,assigneeId:n})}case"ADD_ESTIMATE":{const{id:n,name:i,points:r}=a.payload;return G(e,n)?e:{...e,estimates:[...e.estimates,{id:n,name:i,points:r}]}}case"SET_ESTIMATE_NAME":{const{name:n}=a.payload;return G(e,s)?{...e,estimates:e.estimates.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_ESTIMATE_POINTS":{const{points:n}=a.payload;return G(e,s)?{...e,estimates:e.estimates.map(i=>i.id===s?{...i,points:n}:i)}:null}case"DELETE_ESTIMATE":return G(e,s)?{...e,estimates:e.estimates.filter(n=>n.id!==s),stories:e.stories.map(n=>n.estimateId===s?oe(n,"estimateId"):n)}:null;case"REORDER_ESTIMATE":{const{after:n}=a.payload,i=pe(e.estimates,s,n);return i===null?null:{...e,estimates:i}}case"SET_STORY_ESTIMATE":{const{estimateId:n}=a.payload;return n!==null&&!G(e,n)?null:H(e,s,i=>n===null?oe(i,"estimateId"):{...i,estimateId:n})}case"RECORD_SNAPSHOT":{const{id:n,at:i,tally:r}=a.payload;return ve(e,n)?e:Mt(e,r)!==null?null:{...e,snapshots:[...e.snapshots,{id:n,at:i,tally:r}]}}case"DELETE_SNAPSHOT":return ve(e,s)?{...e,snapshots:e.snapshots.filter(n=>n.id!==s)}:null;case"SET_FEATURE":{const{feature:n,enabled:i}=a.payload;if(e.features.includes(n)===i)return e;const r=_e.filter(o=>o===n?i:e.features.includes(o));return{...e,features:r}}default:return ms(a)}},H=(e,t,a)=>e.stories.some(s=>s.id===t)?{...e,stories:e.stories.map(s=>s.id===t?a(s):s)}:null,st=e=>{const{milestoneId:t,...a}=e;return a},Gt=(e,t)=>{const{labelIds:a=[],...s}=e,n=a.filter(i=>i!==t);return n.length===0?s:{...s,labelIds:n}},Ht=(e,t)=>{const{blockedBy:a=[],...s}=e,n=a.filter(i=>!t.has(i));return n.length===0?s:{...s,blockedBy:n}},nt=(e,t)=>{const a=new Set(e.stories.filter(t).map(s=>s.id));return{...e,stories:e.stories.filter(s=>!a.has(s.id)).map(s=>s.blockedBy?.some(n=>a.has(n))?Ht(s,a):s)}},oe=(e,t)=>{const{[t]:a,...s}=e;return s},it=(e,t)=>e.snapshots.map(a=>{const s=new Map;for(const n of a.tally.map(t)){const i=Le(n),r=s.get(i);s.set(i,r?{...r,stories:r.stories+n.stories,points:r.points+n.points}:n)}return{...a,tally:[...s.values()]}}),hn=e=>{const{statusId:t,...a}=e;return a},Vt=(e,t,a,s=!1)=>{const n=t.milestoneId??void 0,i=e.stories.filter(b=>b.id!==t.id),r=i.filter(b=>b.stepId===t.stepId&&(b.milestoneId??void 0)===n);if(a!==null){const b=i.find(c=>c.id===a);if(!b||b.stepId!==t.stepId||(b.milestoneId??void 0)!==n)return null;if(s){const c=S(e,t.id);if(!c||b.stepId!==c.stepId||(b.milestoneId??void 0)!==(c.milestoneId??void 0))return null}}const o=a===null?[t,...r]:Kt(r,t,a),d=i.findIndex(b=>b.stepId===t.stepId&&(b.milestoneId??void 0)===n),p=new Set(r.map(b=>b.id)),u=i.filter(b=>!p.has(b.id)),y=d<0?u.length:Math.min(d,u.length),E=[...u.slice(0,y),...o,...u.slice(y)];return{...e,stories:E}},pe=(e,t,a)=>{if(!e.some(i=>i.id===t)||a!==null&&!e.some(i=>i.id===a))return null;if(a===t)return[...e];const s=e.find(i=>i.id===t);if(s===void 0)return null;const n=e.filter(i=>i.id!==t);return Kt(n,s,a)},Kt=(e,t,a)=>{const s=[...e],n=a===null?-1:s.findIndex(i=>i.id===a);return s.splice(n+1,0,t),s},he=hs({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",milestonesTab:"Milestones",statusesTab:"Statuses",labelsTab:"Labels",burndownTab:"Burndown",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:"Orange"})[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,a,s)=>`${e} ${t}, ${a} ${s}`,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)=>Wt("en-US",e,t),commentDate:e=>qt("en-US",e),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",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",storyCommentsHint:"Kept on the story as part of the map. To ask the agent for a change, write a review comment.",commentSubmit:"Add comment",deleteStoryCommentAria:"Delete comment",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",membersTab:"Members",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",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusesTab:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelsTab:"\u30E9\u30D9\u30EB",burndownTab:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",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:"\u30AA\u30EC\u30F3\u30B8"})[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,a,s)=>`${e} ${t}\u3001${a} ${s}`,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)=>Wt("ja-JP",e,t),commentDate:e=>qt("ja-JP",e),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",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",storyCommentsHint:"\u30DE\u30C3\u30D7\u306E\u4E00\u90E8\u3068\u3057\u3066\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u6B8B\u308A\u307E\u3059\u3002Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068\u306F\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u306B\u66F8\u304D\u307E\u3059\u3002",commentSubmit:"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteStoryCommentAria:"\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",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",membersTab:"\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"}}),qt=(e,t)=>new Intl.DateTimeFormat(e,{dateStyle:"medium",timeStyle:"short"}).format(new Date(t)),Wt=(e,t,a)=>{const s=new Date(t);switch(a){case"day":case"week":case"biweek":return`${s.getMonth()+1}/${s.getDate()}`;case"month":case"quarter":return new Intl.DateTimeFormat(e,{month:"short",...s.getMonth()===0?{year:"numeric"}:{}}).format(s);case"year":return new Intl.DateTimeFormat(e,{year:"numeric"}).format(s)}},rt=/^[A-Z][A-Z0-9]+-\d+$/,jt=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},gn=(e,t)=>{if(e!=="github.com")return null;const[a,s,n,i]=t;if(a===void 0)return{kind:"github",text:"GitHub",title:"github.com"};if(s===void 0)return{kind:"github",text:a,title:a};const r=`${a}/${s}`;return(n==="issues"||n==="pull"||n==="discussions")&&i&&/^\d+$/.test(i)?{kind:"github",text:`#${i}`,title:`${r}#${i}`}:n==="commit"&&i?{kind:"github",text:i.slice(0,7),title:`${r}@${i}`}:{kind:"github",text:r,title:r}},bn=(e,t)=>{if(e!=="gitlab.com")return null;const a=t.indexOf("-"),s=(a<0?t:t.slice(0,a)).join("/"),n=a<0?void 0:t[a+1],i=a<0?void 0:t[a+2];if(i&&/^\d+$/.test(i)){if(n==="issues")return{kind:"gitlab",text:`#${i}`,title:`${s}#${i}`};if(n==="merge_requests")return{kind:"gitlab",text:`!${i}`,title:`${s}!${i}`}}return{kind:"gitlab",text:s||"GitLab",title:s||e}},fn=(e,t,a)=>{if(!t.endsWith(".atlassian.net")&&!t.startsWith("jira."))return null;const s=(a[0]==="browse"?a[1]:void 0)??e.searchParams.get("selectedIssue")??a.find(n=>rt.test(n));return s&&rt.test(s)?{kind:"jira",text:s,title:`${t} ${s}`}:{kind:"jira",text:"Jira",title:t}},vn=(e,t)=>{if(e!=="linear.app")return null;const a=t[1]==="issue"?t[2]?.toUpperCase():void 0;return a&&rt.test(a)?{kind:"linear",text:a,title:a}:{kind:"linear",text:"Linear",title:e}},yn=(e,t)=>{if(e!=="figma.com")return null;const[a,,s]=t;if((a==="file"||a==="design"||a==="proto"||a==="board")&&s){const n=jt(s);return{kind:"figma",text:n,title:n}}return{kind:"figma",text:"Figma",title:e}},kn=(e,t)=>{if(e!=="notion.so"&&!e.endsWith(".notion.site"))return null;const s=(t.at(-1)??"").replace(/-?[0-9a-f]{32}$/i,""),n=s===""?"Notion":jt(s);return{kind:"notion",text:n,title:n}},Ne=e=>{let t;try{t=new URL(e)}catch{return{kind:"web",text:e,title:e}}const a=t.hostname.replace(/^www\./,""),s=t.pathname.split("/").filter(n=>n!=="");return gn(a,s)??bn(a,s)??fn(t,a,s)??vn(a,s)??yn(a,s)??kn(a,s)??{kind:"web",text:a,title:e}},wn=["map","milestones","statuses","labels","members","burndown"],xn={members:"assignees",burndown:"estimates"},Xt=e=>wn.filter(t=>{const a=xn[t];return a===void 0||Z(e,a)}),Zt=(e,t)=>Xt(e).find(a=>a===t.tab)??"map",ye=(e,t)=>Ct(e,t.statusId),Jt=(e,t)=>{const a=S(e,t)?.blockedBy??[];return{blockers:a,openBlockers:a.filter(s=>{const n=S(e,s);return n!==void 0&&!ye(e,n)}).length,dependents:e.stories.filter(s=>s.blockedBy?.includes(t)).map(s=>s.id)}},$n=(e,t)=>{const a=new Set(S(e,t)?.blockedBy??[]);return e.stories.filter(s=>s.id!==t&&!a.has(s.id)&&!Je(e.stories,s.id,t))},En=(e,t)=>e.stories.filter(a=>a.id!==t&&!a.blockedBy?.includes(t)&&!Je(e.stories,t,a.id)),Sn=["critical-path"],Ce=e=>Sn.find(t=>t===e.highlight)??null,Tn=(e,t)=>{if(ye(e,t))return 0;const a=me(e)==="stories"?1:zt(e,t),s=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return a*(Ut(e)[s]??1)},An=(e,t)=>Ce(t)==="critical-path"?Qt(e).ids:null,_n=1e-9,Qt=e=>{const t=new Map(e.stories.map(d=>[d.id,Tn(e,d)]).filter(([,d])=>d>0)),a=new Map,s=new Map;for(const d of e.stories)if(t.has(d.id))for(const p of d.blockedBy??[])t.has(p)&&(a.set(d.id,[...a.get(d.id)??[],p]),s.set(p,[...s.get(p)??[],d.id]));const n=ea(t,a),i=ea(t,s),r=[...t].map(([d,p])=>[d,n(d)+i(d)-p]),o=Math.max(0,...r.map(([,d])=>d));return{ids:new Set(r.filter(([,d])=>o-d<_n).map(([d])=>d)),work:o}},ea=(e,t)=>{const a=new Map,s=n=>{const i=a.get(n);if(i!==void 0)return i;const r=(e.get(n)??0)+Math.max(0,...(t.get(n)??[]).map(s));return a.set(n,r),r};return s},ke=["status","label","estimate","assignee"],ne="~none",ie={key:"done",value:"show"},ta=(e,t)=>t[ie.key]===ie.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(a=>Ct(e,a.id)).map(a=>a.id)),ge=(e,t)=>{switch(t){case"status":return e.statuses.map(a=>a.id);case"label":return e.labels.length===0?[]:[...e.labels.map(a=>a.id),ne];case"estimate":return!Z(e,"estimates")||e.estimates.length===0?[]:[...e.estimates.map(a=>a.id),ne];case"assignee":return!Z(e,"assignees")||e.members.length===0?[]:[...e.members.map(a=>a.id),ne]}},Be=(e,t)=>{const a=ta(e,t),s=n=>{const i=t[n];if(i===void 0||i==="")return new Set;const r=new Set(i.split(","));return new Set(ge(e,n).filter(o=>r.has(o)&&!a.has(o)))};return{status:s("status"),label:s("label"),estimate:s("estimate"),assignee:s("assignee"),hiddenStatusIds:a}},aa=(e,t,a)=>{const s=ge(e,t).filter(n=>a.has(n));return s.length===0?null:s.join(",")},In=(e,t)=>{const a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a},Mn=e=>ke.some(t=>e[t].size>0),sa=(e,t)=>{const a=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&Ye(e.status,t.statusId===void 0?[]:[t.statusId])&&Ye(e.label,a.length===0?[ne]:a)&&Ye(e.estimate,[t.estimateId??ne])&&Ye(e.assignee,[t.assigneeId??ne])},Ye=(e,t)=>e.size===0||t.some(a=>e.has(a)),D=(e,t,a)=>{const s=typeof a=="string"?a:"",n=typeof t=="string"?t:void 0;return n===void 0?e.toValue(s):e.fromTo(n,s)},de=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,Ln={SET_ACTIVITY_NAME:(e,t,a)=>({title:e.renameActivity,tone:"update",body:D(e,Q(a,t.target.id)?.name,x(w.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,a)=>{const s=x(w.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:s===""?e.removed(Q(a,t.target.id)?.actor??""):D(e,Q(a,t.target.id)?.actor,s)}},SET_STEP_NAME:(e,t,a)=>({title:e.renameStep,tone:"update",body:D(e,M(a,t.target.id)?.step.name,x(w.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:de(e,x(w.REORDER_STEP,t).after)}),REORDER_ACTIVITY:(e,t,a)=>{const s=x(w.REORDER_ACTIVITY,t).after;return{title:e.reorderActivity,tone:"move",body:de(e,s===null?null:Q(a,s)?.name??s)}},ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(x(w.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(x(w.ADD_STEP,t).name??""))}),DELETE_ACTIVITY:(e,t,a)=>({title:e.deleteActivity,tone:"delete",body:e.removed(Q(a,t.target.id)?.name??t.target.id)}),DELETE_STEP:(e,t,a)=>({title:e.deleteStep,tone:"delete",body:e.removed(M(a,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,a)=>({title:e.renameStory,tone:"update",body:D(e,S(a,t.target.id)?.name,x(w.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(x(w.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,a)=>{const s=x(w.SET_STORY_MILESTONE,t).milestoneId;return{title:e.changeMilestone,tone:"move",body:s==null?e.toUnassigned:e.toName(P(a,String(s))?.name??String(s))}},MOVE_STORY:(e,t,a)=>({title:e.moveStory,tone:"move",body:e.toName(M(a,String(x(w.MOVE_STORY,t).stepId))?.step.name??String(x(w.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:de(e,x(w.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(x(w.ADD_STORY,t).name??""))}),DELETE_STORY:(e,t,a)=>({title:e.deleteStory,tone:"delete",body:e.removed(S(a,t.target.id)?.name??t.target.id)}),SET_MILESTONE_NAME:(e,t,a)=>({title:e.renameMilestone,tone:"update",body:D(e,P(a,t.target.id)?.name,x(w.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(x(w.ADD_MILESTONE,t).name??""))}),DELETE_MILESTONE:(e,t,a)=>({title:e.deleteMilestone,tone:"delete",body:e.removed(P(a,t.target.id)?.name??t.target.id)}),REORDER_MILESTONE:(e,t)=>({title:e.reorderMilestone,tone:"move",body:de(e,x(w.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:a,label:s}=x(w.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(s??Ne(a).title)}},REMOVE_STORY_LINK:(e,t,a)=>{const{url:s}=x(w.REMOVE_STORY_LINK,t),n=S(a,t.target.id)?.links?.find(i=>i.url===s);return{title:e.removeStoryLink,tone:"delete",body:e.removed(n?.label??Ne(s).title)}},ADD_STORY_COMMENT:(e,t)=>({title:e.addStoryComment,tone:"create",body:e.added(x(w.ADD_STORY_COMMENT,t).body)}),DELETE_STORY_COMMENT:(e,t,a)=>{const{commentId:s}=x(w.DELETE_STORY_COMMENT,t),n=S(a,t.target.id)?.comments?.find(i=>i.id===s);return{title:e.deleteStoryComment,tone:"delete",body:e.removed(n?.body??s)}},SET_STORY_STATUS:(e,t,a)=>{const s=x(w.SET_STORY_STATUS,t).statusId;return{title:e.changeStoryStatus,tone:"update",body:e.toName(O(a,s)?.name??s)}},ADD_STATUS:(e,t)=>({title:e.addStatus,tone:"create",body:e.added(x(w.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,a)=>({title:e.renameStatus,tone:"update",body:D(e,O(a,t.target.id)?.name,x(w.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,a)=>{const s=O(a,t.target.id)?.tone,n=x(w.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:D(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},SET_STATUS_ICON:(e,t,a)=>{const s=O(a,t.target.id)?.icon,n=x(w.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:D(e,s===void 0?void 0:e.iconName(s),e.iconName(n))}},DELETE_STATUS:(e,t,a)=>({title:e.deleteStatus,tone:"delete",body:e.removed(O(a,t.target.id)?.name??t.target.id)}),REORDER_STATUS:(e,t)=>({title:e.reorderStatus,tone:"move",body:de(e,x(w.REORDER_STATUS,t).after)}),ADD_LABEL:(e,t)=>({title:e.addLabel,tone:"create",body:e.added(x(w.ADD_LABEL,t).name)}),SET_LABEL_NAME:(e,t,a)=>({title:e.renameLabel,tone:"update",body:D(e,W(a,t.target.id)?.name,x(w.SET_LABEL_NAME,t).name)}),SET_LABEL_TONE:(e,t,a)=>{const s=W(a,t.target.id)?.tone,n=x(w.SET_LABEL_TONE,t).tone;return{title:e.changeLabelTone,tone:"update",body:D(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},DELETE_LABEL:(e,t,a)=>({title:e.deleteLabel,tone:"delete",body:e.removed(W(a,t.target.id)?.name??t.target.id)}),REORDER_LABEL:(e,t)=>({title:e.reorderLabel,tone:"move",body:de(e,x(w.REORDER_LABEL,t).after)}),ADD_STORY_LABEL:(e,t,a)=>{const s=x(w.ADD_STORY_LABEL,t).labelId;return{title:e.addStoryLabel,tone:"create",body:e.added(W(a,s)?.name??s)}},REMOVE_STORY_LABEL:(e,t,a)=>{const s=x(w.REMOVE_STORY_LABEL,t).labelId;return{title:e.removeStoryLabel,tone:"delete",body:e.removed(W(a,s)?.name??s)}},ADD_STORY_BLOCKER:(e,t,a)=>{const s=x(w.ADD_STORY_BLOCKER,t).blockerId;return{title:e.addStoryBlocker,tone:"create",body:e.added(S(a,s)?.name??s)}},REMOVE_STORY_BLOCKER:(e,t,a)=>{const s=x(w.REMOVE_STORY_BLOCKER,t).blockerId;return{title:e.removeStoryBlocker,tone:"delete",body:e.removed(S(a,s)?.name??s)}},SET_MILESTONE_DUE_DATE:(e,t,a)=>{const s=x(w.SET_MILESTONE_DUE_DATE,t).dueDate;return{title:e.changeMilestoneDueDate,tone:s===null?"delete":"update",body:s===null?e.noDueDate:D(e,P(a,t.target.id)?.dueDate,s)}},SET_STATUS_WEIGHT:(e,t,a)=>{const s=O(a,t.target.id)?.weight,n=x(w.SET_STATUS_WEIGHT,t).weight;return{title:e.changeStatusWeight,tone:"update",body:D(e,s===void 0?void 0:String(s),String(n))}},SET_DONE_STATUS:(e,t,a)=>({title:e.setDoneStatus,tone:"update",body:D(e,Nt(a)?.name,O(a,t.target.id)?.name??t.target.id)}),SET_MEASURE:(e,t,a)=>({title:e.setMeasure,tone:"update",body:D(e,e.measureName(me(a)),e.measureName(x(w.SET_MEASURE,t).measure))}),ADD_MEMBER:(e,t)=>({title:e.addMember,tone:"create",body:e.added(x(w.ADD_MEMBER,t).name)}),SET_MEMBER_NAME:(e,t,a)=>({title:e.renameMember,tone:"update",body:D(e,F(a,t.target.id)?.name,x(w.SET_MEMBER_NAME,t).name)}),SET_MEMBER_TONE:(e,t,a)=>{const s=F(a,t.target.id)?.tone,n=x(w.SET_MEMBER_TONE,t).tone;return{title:e.changeMemberTone,tone:"update",body:D(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},DELETE_MEMBER:(e,t,a)=>({title:e.deleteMember,tone:"delete",body:e.removed(F(a,t.target.id)?.name??t.target.id)}),REORDER_MEMBER:(e,t)=>({title:e.reorderMember,tone:"move",body:de(e,x(w.REORDER_MEMBER,t).after)}),SET_STORY_ASSIGNEE:(e,t,a)=>{const s=x(w.SET_STORY_ASSIGNEE,t).memberId;if(s===null){const n=F(a,S(a,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(F(a,s)?.name??s)}},ADD_ESTIMATE:(e,t)=>{const{name:a,points:s}=x(w.ADD_ESTIMATE,t);return{title:e.addEstimate,tone:"create",body:e.added(e.estimateText(a,s))}},SET_ESTIMATE_NAME:(e,t,a)=>({title:e.renameEstimate,tone:"update",body:D(e,G(a,t.target.id)?.name,x(w.SET_ESTIMATE_NAME,t).name)}),SET_ESTIMATE_POINTS:(e,t,a)=>{const s=G(a,t.target.id)?.points,n=x(w.SET_ESTIMATE_POINTS,t).points;return{title:e.changeEstimatePoints,tone:"update",body:D(e,s===void 0?void 0:String(s),String(n))}},DELETE_ESTIMATE:(e,t,a)=>({title:e.deleteEstimate,tone:"delete",body:e.removed(G(a,t.target.id)?.name??t.target.id)}),REORDER_ESTIMATE:(e,t)=>({title:e.reorderEstimate,tone:"move",body:de(e,x(w.REORDER_ESTIMATE,t).after)}),SET_STORY_ESTIMATE:(e,t,a)=>{const s=x(w.SET_STORY_ESTIMATE,t).estimateId;return s===null?{title:e.setStoryEstimate,tone:"delete",body:e.toValue(e.unestimated)}:{title:e.setStoryEstimate,tone:"update",body:e.toValue(G(a,s)?.name??s)}},RECORD_SNAPSHOT:(e,t)=>{const{at:a,tally:s}=x(w.RECORD_SNAPSHOT,t),n=s.reduce((i,r)=>i+r.stories,0);return{title:e.recordSnapshot,tone:"create",body:e.snapshotSummary(le(a),n)}},DELETE_SNAPSHOT:(e,t,a)=>{const s=ve(a,t.target.id);return{title:e.deleteSnapshot,tone:"delete",body:e.removed(s?le(s.at):t.target.id)}},SET_FEATURE:(e,t)=>{const{feature:a,enabled:s}=x(w.SET_FEATURE,t);return{title:s?e.enableFeature:e.disableFeature,tone:s?"create":"delete",body:e.featureName(a)}}},na=(e,t,a,s)=>{let n;try{const i=Ln[t.type];n=i?i(e,t,s??a):{title:t.type,tone:"meta"}}catch{n={title:t.type,tone:"meta"}}return{title:n.title,targetLabel:ra(e,a,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},ia=e=>`${e.type} ${_(e.target)} ${JSON.stringify(e.payload)}`,ra=(e,t,a)=>{try{switch(a.type){case"activity":{const s=Q(t,a.id);return s?e.targetLabel(e.activityGroup,s.name):e.targetMissing(e.activityGroup,a.id)}case"step":{const s=M(t,a.id)?.step;return s?e.targetLabel(e.stepGroup,s.name):e.targetMissing(e.stepGroup,a.id)}case"story":{const s=S(t,a.id);return s?e.targetLabel(e.storyGroup,s.name):e.targetMissing(e.storyGroup,a.id)}case"milestone":{const s=P(t,a.id);return s?e.targetLabel(e.milestoneGroup,s.name):e.targetMissing(e.milestoneGroup,a.id)}case"status":{const s=O(t,a.id);return s?e.targetLabel(e.statusGroup,s.name):e.targetMissing(e.statusGroup,a.id)}case"label":{const s=W(t,a.id);return s?e.targetLabel(e.labelGroup,s.name):e.targetMissing(e.labelGroup,a.id)}case"member":{const s=F(t,a.id);return s?e.targetLabel(e.memberGroup,s.name):e.targetMissing(e.memberGroup,a.id)}case"estimate":{const s=G(t,a.id);return s?e.targetLabel(e.estimateGroup,s.name):e.targetMissing(e.estimateGroup,a.id)}case"snapshot":{const s=ve(t,a.id);return s?e.targetLabel(e.snapshotGroup,le(s.at)):e.targetMissing(e.snapshotGroup,a.id)}case"page":return e.targetLabel(e.mapGroup,ot(t));default:return`${a.type} \xB7 ${a.id}`}}catch{return`${a.type} \xB7 ${a.id}`}},oa=(e,t,a)=>{const s=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const n of t.activities){s.push({value:_({type:"activity",id:n.id}),label:n.name,group:e.activityGroup});for(const i of n.steps)s.push({value:_({type:"step",id:ee(n.id,i.id)}),label:`${n.name} \u203A ${i.name}`,group:e.stepGroup})}for(const n of t.milestones)s.push({value:_({type:"milestone",id:n.id}),label:n.name,group:e.milestoneGroup});for(const n of t.statuses)s.push({value:_({type:"status",id:n.id}),label:n.name,group:e.statusGroup});for(const n of t.labels)s.push({value:_({type:"label",id:n.id}),label:n.name,group:e.labelGroup});for(const n of t.members)s.push({value:_({type:"member",id:n.id}),label:n.name,group:e.memberGroup});for(const n of t.estimates)s.push({value:_({type:"estimate",id:n.id}),label:e.estimateText(n.name,n.points),group:e.estimateGroup});for(const n of t.snapshots)s.push({value:_({type:"snapshot",id:n.id}),label:le(n.at),group:e.snapshotGroup});for(const n of t.stories)s.push({value:_({type:"story",id:n.id}),label:n.name,group:e.storyGroup});return s},da=(e,t,a)=>{const s=t.stories.find(n=>n.id===a.story);if(s)return{value:_({type:"story",id:s.id}),label:s.name,group:e.storyGroup};for(const n of t.activities){const i=n.steps.find(r=>r.id===a.step);if(i)return{value:_({type:"step",id:ee(n.id,i.id)}),label:i.name,group:e.stepGroup}}return null},ot=e=>e.title??"User Story Mapping",Dn=(e,t)=>{switch(t.type){case"story":{const a=S(e,t.id);return{tab:null,highlight:null,...Object.fromEntries(ke.map(s=>[s,null])),...a&&ye(e,a)?{[ie.key]:ie.value}:{}}}case"step":case"activity":return{tab:null,view:null};case"milestone":return{tab:"milestones"};case"status":return{tab:"statuses"};case"label":return{tab:"labels"};case"member":return Z(e,"assignees")?{tab:"members"}:null;case"estimate":case"snapshot":return Z(e,"estimates")?{tab:"burndown"}:null;default:return null}},la=(e,t)=>{const a=M(e,t.step),s=a?.activity??Q(e,t.activity)??e.activities[0],n=a?.step??s?.steps.find(u=>u.id===t.step)??s?.steps[0],i=S(e,t.story),r={...t};s?r.activity=s.id:delete r.activity,n?r.step=n.id:delete r.step,i?r.story=i.id:delete r.story,r.view=t.view==="group"?"group":"activity";const o=Be(e,t);for(const u of ke){const y=aa(e,u,o[u]);y===null?delete r[u]:r[u]=y}t[ie.key]!==ie.value&&delete r[ie.key];const d=Zt(e,t);d==="map"?delete r.tab:r.tab=d,P(e,t.milestone)||delete r.milestone;const p=Ce(t);return p===null?delete r.highlight:r.highlight=p,r},pa=(e,t)=>{switch(t.type){case"activity":return Q(e,t.id)!==void 0;case"step":return M(e,t.id)!==void 0;case"story":return S(e,t.id)!==void 0;case"milestone":return P(e,t.id)!==void 0;case"status":return O(e,t.id)!==void 0;case"label":return W(e,t.id)!==void 0;case"member":return F(e,t.id)!==void 0;case"estimate":return G(e,t.id)!==void 0;case"snapshot":return ve(e,t.id)!==void 0;case"page":return!0;default:return!1}},ca=e=>{const t=he(e);return{name:"usm",label:"User Story Mapping",parseBase:It,emptyBase:Lt,actions:w,apply:Ft,canonicalState:on,hasTarget:pa,canonicalTarget:(a,s)=>{if(s.type!=="step")return s;const n=M(a,s.id);return n?{...s,id:ee(n.activity.id,n.step.id)}:s},describe:(a,s,n)=>na(t,a,s,n),serialize:ia,resolveNavigation:la,navigationFor:Dn,commentTargets:(a,s)=>oa(t,a),currentTarget:(a,s)=>da(t,a,s),settings:a=>({items:_e.map(s=>{const n=Z(a,s);return{key:s,label:t.featureName(s),hint:t.featureHint(s),on:n,toggle:{type:"SET_FEATURE",target:{type:"page",id:"usm"},payload:{feature:s,enabled:!n}}}}),note:t.featuresNote}),title:ot}},ua=.5,Rn=({widths:e,available:t,gap:a,moreWidth:s,keep:n})=>{if(e.reduce((u,y)=>u+y,0)+a*Math.max(0,e.length-1)<=t+ua)return[];const r=t-s+ua,o=new Set;let d=0;const p=u=>{d+=(o.size===0?0:a)+(e[u]??0),o.add(u)};n>=0&&n<e.length&&p(n);for(const[u,y]of e.entries())if(!o.has(u)){if(d+(o.size===0?0:a)+y>r)break;p(u)}return e.flatMap((u,y)=>o.has(y)?[]:[y])},ma=new Set;class On{#n;#e;#a=ma;#s=0;#t=null;#i=null;constructor(t,a){this.#n=t,this.#e=a,t.addController(this)}get hidden(){return this.#a}get minimum(){return this.#s}hostConnected(){typeof ResizeObserver>"u"||(this.#t=new ResizeObserver(()=>this.#r()))}hostUpdated(){const t=this.#e.row();t!==this.#i&&(this.#i&&this.#t?.unobserve(this.#i),t&&this.#t?.observe(t),this.#i=t),this.#r()}hostDisconnected(){this.#t?.disconnect(),this.#t=null,this.#i=null}#r(){const t=this.#e.row();if(!t)return;const a=this.#e.items(t),s=a.map(E=>E.getBoundingClientRect().width),n=a.findIndex(E=>this.#e.kept(E)),i=a[0]?.parentElement,r=i?ha(i):0,o=this.#e.more(t),d=o?o.getBoundingClientRect().width+ha(t):0,p=Rn({widths:s,available:t.getBoundingClientRect().width,gap:r,moreWidth:d,keep:n}),u=new Set(p.flatMap(E=>{const b=a[E];return b?[this.#e.keyOf(b)]:[]})),y=Math.ceil((s[n]??0)+d);Nn(u,this.#a)&&y===this.#s||(this.#a=u.size===0?ma:u,this.#s=y,this.#n.requestUpdate())}}const ha=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,Nn=(e,t)=>e.size===t.size&&[...e].every(a=>t.has(a)),dt=1440*60*1e3,Cn=48,Bn=8,Yn=(e,t,a,s)=>{const n={left:s.inset.left,top:s.inset.top,right:s.width-s.inset.right,bottom:s.height-s.inset.bottom},i=[...e.map(g=>g.at),a,...t===null?[]:[t]];let r=Math.min(...i),o=Math.max(...i);o-r<dt&&(r-=dt/2,o+=dt/2);const d=Un(Math.max(0,...e.map(g=>g.value))),p=d.at(-1)??1,u=g=>n.left+(g-r)/(o-r)*(n.right-n.left),y=g=>n.bottom-g/p*(n.bottom-n.top),E=e.map(g=>({x:u(g.at),y:y(g.value),at:g.at,value:g.value,...g.snapshotId===void 0?{}:{snapshotId:g.snapshotId}})),b=E[0],c=Pn(r,o,Math.floor((n.right-n.left)/Cn));return{size:s,plot:n,line:E.map(g=>`${we(g.x)},${we(g.y)}`).join(" "),dots:E,ideal:t===null||!b?null:{x1:b.x,y1:b.y,x2:u(t),y2:y(0)},nowX:u(a),dueX:t===null?null:u(t),yTicks:d.map(g=>({y:y(g),value:g})),valueTop:p,xUnit:c.unit,xTicks:c.ats.map(g=>({x:u(g),at:g})),domain:{start:r,end:o},idealSpan:t===null||!b?null:{at:b.at,value:b.value,due:t}}},Un=e=>{const t=zn(e/4),a=Math.max(1,Math.ceil(e/t));return Array.from({length:a+1},(s,n)=>n*t)},zn=e=>{if(e<=1)return 1;const t=10**Math.floor(Math.log10(e));return([1,2,2.5,5,10].find(s=>Number.isInteger(s*t)&&s*t>=e)??10)*t},we=e=>Math.round(e*100)/100,Pn=(e,t,a)=>{const s=Math.max(1,a),n=["day","week","biweek","month","quarter"];for(const i of n){const r=ga(i,e,t,s);if(r!==null)return{unit:i,ats:r}}return{unit:"year",ats:ga("year",e,t,1/0)??[]}},ga=(e,t,a,s)=>{const n=[];for(let i=Fn(e,t);i<=a;i=Gn(e,i)){if(n.length===s)return null;n.push(i)}return n},Fn=(e,t)=>{const a=new Date(t),[s,n,i]=[a.getFullYear(),a.getMonth(),a.getDate()],r=(o,d)=>o.getTime()>=t?o.getTime():d().getTime();switch(e){case"day":return r(new Date(s,n,i),()=>new Date(s,n,i+1));case"week":case"biweek":{const o=r(new Date(s,n,i),()=>new Date(s,n,i+1)),d=new Date(o),p=(8-d.getDay())%7;return new Date(d.getFullYear(),d.getMonth(),d.getDate()+p).getTime()}case"month":return r(new Date(s,n,1),()=>new Date(s,n+1,1));case"quarter":{const o=n-n%3;return r(new Date(s,o,1),()=>new Date(s,o+3,1))}case"year":return r(new Date(s,0,1),()=>new Date(s+1,0,1))}},Gn=(e,t)=>{const a=new Date(t),[s,n,i]=[a.getFullYear(),a.getMonth(),a.getDate()],r={day:1,week:7,biweek:14},o={month:1,quarter:3,year:12};return e==="day"||e==="week"||e==="biweek"?new Date(s,n,i+r[e]).getTime():new Date(s,n+o[e],1).getTime()},ba=(e,t)=>{const{plot:a,domain:s,dots:n}=e,i=Math.min(a.right,Math.max(a.left,t)),r=n.reduce((E,b)=>E===null||Math.abs(b.x-i)<Math.abs(E.x-i)?b:E,null),o=r!==null&&Math.abs(r.x-i)<=Bn?r:null,d=o?.at??s.start+(i-a.left)/(a.right-a.left)*(s.end-s.start),p=o?.value??Hn(n,d),u=Vn(e,d),y=E=>E===null?null:we(a.bottom-E/e.valueTop*(a.bottom-a.top));return{x:o?.x??i,at:d,actual:p,ideal:u,actualY:y(p),idealY:y(u),dot:o}},Hn=(e,t)=>{const a=e.findIndex(i=>i.at>=t),s=e[a];if(!s)return null;if(s.at===t)return s.value;const n=e[a-1];return n?we(n.value+(s.value-n.value)*(t-n.at)/(s.at-n.at)):null},Vn=(e,t)=>{const a=e.idealSpan;return a===null||t<a.at||t>a.due?null:we(a.value*(a.due-t)/(a.due-a.at))},I=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,fa={circle:C(Cs),lightbulb:C(Ps),flag:C(zs),play:C(Os),clock:C(Bs),eye:C(Us),pause:C(Rs),check:C(Ls),x:C(Ns)},Kn=C(Ds),qn=e=>{if(e>=1)return fa.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">
1
+ import{ak as y,aW as bs,ai as h,af as K,aE as ke,bf as Ze,am as we,aj as Ae,aV as Je,bg as fs,bh as vs,aF as xt,aU as $t,ae as ys,aX as ks,aI as A,al as $,ag as z,ah as C,aG as D,aH as _e,p as g,at as St,au as b,w as Q,aD as P,aq as ws,P as xs,e as $s,a0 as Ss,V as _,R as w,b0 as B,a2 as q,a4 as l,a3 as m,a7 as O,a9 as Qe,ab as et,G as Es,j as Ts,a_ as As,a$ as _s,b5 as Is,B as Et,l as X,a5 as Y,aR as Ie,F as tt,aM as Z,J as Ms,bi as Tt,K as Me,bj as Ls,aN as Ds,bc as at,aQ as Rs,A as st,bd as Os,T as At,a1 as Ns,aa as Cs,ax as nt,aS as Bs,aB as Ys,bk as Us,be as zs}from"./shared-DiFAX1_p.js";import{r as xe,D as Ps}from"./shared-B5lBiq5s.js";import{L as Fs}from"./shared-CjW1DhGL.js";import{o as Le}from"./shared-BjyoXjSO.js";const Gs=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],Hs=[["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"}]],Vs=[["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"}]],Ks=[["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"}]],qs=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Ws=[["circle",{cx:"12",cy:"12",r:"10"}]],js=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Xs=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],Zs=[["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"}]],Js=[["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"}]],Qs=[["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"}]],en=[["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"}]],tn=[["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"}]],an=[["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"}]],_t=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),it=(e,t,a)=>{const s=_t(e),n=new Set,i=[...s.get(t)??[]];for(;i.length>0;){const r=i.pop();if(!(r===void 0||n.has(r))){if(r===a)return!0;n.add(r),i.push(...s.get(r)??[])}}return!1},sn=e=>{const t=_t(e),a=new Set,s=(n,i)=>{const r=i.indexOf(n);if(r>=0)return[...i.slice(r),n];if(a.has(n))return null;for(const o of t.get(n)??[]){const d=s(o,[...i,n]);if(d)return d}return a.add(n),null};for(const n of e){const i=s(n.id,[]);if(i)return i}return null},De=["gray","blue","violet","green","amber","accent"],It=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],Re=["estimates","assignees"],Mt=["stories","points","weighted"],Lt=y(h(),fs(),Je(e=>{const[t=0,a=0,s=0]=e.split("-").map(Number),n=new Date(Date.UTC(t,a-1,s));return n.getUTCMonth()===a-1&&n.getUTCDate()===s},"a due date must be a calendar day")),Dt=y(we(),Ze(),ke(0)),rt=y(we(),Ze(),ke(0)),Rt=K({milestoneId:A(y(h(),$(1))),statusId:A(y(h(),$(1))),stories:y(we(),xt(),ke(0)),points:y(we(),Ze(),ke(0))}),Oe=y(h(),bs()),nn=K({id:y(h(),$(1)),name:y(h(),$(1)),questions:_e}),rn=K({id:D,name:y(h(),$(1)),actor:A(h()),steps:z(C(nn),[]),questions:_e}),on=K({id:y(h(),$(1)),name:y(h(),$(1)),timeframe:A(h()),description:A(h()),dueDate:A(Lt),questions:_e}),se=Ae(De),ot=Ae(It),dt=y(h(),vs(),Je(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),dn=K({url:dt,label:A(y(h(),$(1)))}),ln=K({id:D,name:y(h(),$(1)),tone:z(se),icon:z(ot),weight:A(Dt)}),pn=K({id:D,name:y(h(),$(1)),tone:z(se)}),Ot=y(h(),Je(e=>e.trim()!=="","a comment needs some text")),cn=K({id:D,body:Ot,createdAt:A(Oe)}),Nt=y(we(),xt(),ke(1)),un=K({id:D,number:A(Nt),name:y(h(),$(1)),description:A(h()),activityId:y(h(),$(1)),stepId:y(h(),$(1)),milestoneId:A(h()),statusId:A(h()),links:A(C(dn)),labelIds:A(C(y(h(),$(1)))),blockedBy:A(C(y(h(),$(1)))),estimateId:A(y(h(),$(1))),assigneeId:A(y(h(),$(1))),comments:A(C(cn)),questions:_e}),mn=K({id:D,name:y(h(),$(1)),tone:z(se)}),Ct=Ae(Re),Bt=Ae(Mt),hn=K({id:D,name:y(h(),$(1)),points:rt}),gn=K({id:D,at:Oe,tally:C(Rt)}),bn=K({title:A(h()),features:z(C(Ct),[]),measure:A(Bt),doneStatusId:A(y(h(),$(1))),activities:z(C(rn),[]),milestones:z(C(on),[]),statuses:z(C(ln),[]),labels:z(C(pn),[]),members:z(C(mn),[]),estimates:z(C(hn),[]),stories:z(C(un),[]),snapshots:z(C(gn),[])}),lt=e=>De[e%De.length]??"gray",Ne=e=>lt(e+1),Yt=e=>{const t=ys(bn,e);if(new Set(t.features).size!==t.features.length)throw new Error("the base turns a feature on twice");const a=t.statuses[0]?.id,s=t.stories.flatMap(c=>c.number===void 0?[]:[c.number]),n=s.find((c,T)=>s.indexOf(c)!==T);if(n!==void 0)throw new Error(`two stories share the number ${n}`);let i=Math.max(0,...s);const r={...t,stories:t.stories.map(c=>({...c,number:c.number??++i,...a===void 0||c.statusId!==void 0?{}:{statusId:a}})),statuses:t.statuses.map((c,T)=>({...c,tone:c.tone??lt(T),icon:c.icon??"progress"})),labels:t.labels.map((c,T)=>({...c,tone:c.tone??Ne(T)})),members:t.members.map((c,T)=>({...c,tone:c.tone??Ne(T)})),features:Re.filter(c=>t.features.includes(c))},o=new Map;for(const c of r.activities)for(const T of c.steps)o.set(T.id,c.id);const d=new Set(r.milestones.map(c=>c.id)),p=new Set(r.statuses.map(c=>c.id)),u=new Set(r.labels.map(c=>c.id));if(r.doneStatusId!==void 0&&!p.has(r.doneStatusId))throw new Error(`the base references unknown doneStatusId "${r.doneStatusId}"`);const f=new Set,x=(c,T)=>{if(f.has(T))throw new Error(`duplicate id "${T}" in ${c}`);f.add(T)};for(const c of r.activities){x("activities",c.id);for(const T of c.steps)x("steps",T.id)}for(const c of r.milestones)x("milestones",c.id);for(const c of r.statuses)x("statuses",c.id);for(const c of r.labels)x("labels",c.id);for(const c of r.members)x("members",c.id);for(const c of r.estimates)x("estimates",c.id);for(const c of r.snapshots)x("snapshots",c.id);const v=new Set(r.estimates.map(c=>c.id)),I=new Set(r.members.map(c=>c.id));for(const c of r.stories){x("stories",c.id);for(const ye of c.comments??[])x("story comments",ye.id);const T=o.get(c.stepId);if(T===void 0||T!==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 fe=(c.links??[]).map(ye=>ye.url);if(new Set(fe).size!==fe.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(ye=>!u.has(ye));if(wt!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${wt}"`);if(c.estimateId!==void 0&&!v.has(c.estimateId))throw new Error(`story "${c.id}" references unknown estimateId "${c.estimateId}"`);if(c.assigneeId!==void 0&&!I.has(c.assigneeId))throw new Error(`story "${c.id}" references unknown assigneeId "${c.assigneeId}"`)}for(const c of r.snapshots){const T=Ut(r,c.tally);if(T!==null)throw new Error(`snapshot "${c.id}" ${T}`)}const S=new Set(r.stories.map(c=>c.id));for(const c of r.stories){const T=c.blockedBy??[];if(T.includes(c.id))throw new Error(`story "${c.id}" is blocked by itself`);if(new Set(T).size!==T.length)throw new Error(`story "${c.id}" has a blocker twice`);const fe=T.find(ve=>!S.has(ve));if(fe!==void 0)throw new Error(`story "${c.id}" references unknown blocker "${fe}"`)}const ue=sn(r.stories);if(ue!==null)throw new Error(`stories block one another in a cycle: ${ue.join(" \u2192 ")}`);return r},Ut=(e,t)=>{const a=new Set;for(const s of t){if(s.milestoneId!==void 0&&!F(e,s.milestoneId))return`references unknown milestoneId "${s.milestoneId}"`;if(s.statusId!==void 0&&!N(e,s.statusId))return`references unknown statusId "${s.statusId}"`;const n=Ce(s);if(a.has(n))return`tallies "${n}" twice`;a.add(n)}return null},Ce=e=>`${e.milestoneId??""}/${e.statusId??""}`,zt=()=>({features:[],activities:[],milestones:[],statuses:[],labels:[],members:[],estimates:[],stories:[],snapshots:[]}),ee=(e,t)=>{if(t!==void 0)return e.activities.find(a=>a.id===t)},te=(e,t)=>`${e}.${t}`,L=(e,t)=>{if(t===void 0)return;const a=ks(t,2);if(a){const[s,n]=a;if(s===void 0||n===void 0)return;const i=e.activities.find(o=>o.id===s),r=i?.steps.find(o=>o.id===n);return i&&r?{activity:i,step:r}:void 0}if(!t.includes("."))for(const s of e.activities){const n=s.steps.find(i=>i.id===t);if(n)return{activity:s,step:n}}},F=(e,t)=>{if(t!==void 0)return e.milestones.find(a=>a.id===t)},N=(e,t)=>{if(t!==void 0)return e.statuses.find(a=>a.id===t)},j=(e,t)=>{if(t!==void 0)return e.labels.find(a=>a.id===t)},J=(e,t)=>e.features.includes(t),G=(e,t)=>{if(t!==void 0)return e.members.find(a=>a.id===t)},fn=(e,t)=>G(e,t.assigneeId),H=(e,t)=>{if(t!==void 0)return e.estimates.find(a=>a.id===t)},$e=(e,t)=>{if(t!==void 0)return e.snapshots.find(a=>a.id===t)},vn=(e,t)=>{const a=new Set(t.labelIds??[]);return e.labels.filter(s=>a.has(s.id))},E=(e,t)=>{if(t!==void 0)return e.stories.find(a=>a.id===t)},Be=e=>e.activities.flatMap(t=>t.steps.map(a=>({activity:t,step:a}))),yn=e=>({...e,stories:$t(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Ye=(e,t,a)=>e.stories.filter(s=>s.stepId===t&&(s.milestoneId??void 0)===a),Pt=(e,t,a)=>e.stories.filter(s=>s.activityId===t&&(s.milestoneId??void 0)===a),W=e=>[...e.activities.map(t=>t.id),...e.activities.flatMap(t=>t.steps.map(a=>a.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(a=>a.id)),...e.snapshots.map(t=>t.id)],Ft=(e,t)=>e.stories.filter(a=>a.stepId===t).length,Gt=b({feature:Ct,enabled:ws()}),k={SET_ACTIVITY_NAME:g("SET_ACTIVITY_NAME","activity",b({name:y(h(),$(1))})),SET_ACTIVITY_ACTOR:g("SET_ACTIVITY_ACTOR","activity",b({actor:h()})),SET_STEP_NAME:g("SET_STEP_NAME","step",b({name:y(h(),$(1))})),REORDER_STEP:g("REORDER_STEP","step",b({after:P(h())}),{mode:"sequence"}),REORDER_ACTIVITY:g("REORDER_ACTIVITY","activity",b({after:P(h())}),{mode:"sequence"}),ADD_ACTIVITY:g("ADD_ACTIVITY","page",b({id:D,name:y(h(),$(1))}),{dedupeKey:Q}),ADD_STEP:g("ADD_STEP","activity",b({id:D,name:y(h(),$(1))}),{dedupeKey:Q}),DELETE_ACTIVITY:g("DELETE_ACTIVITY","activity",b({})),DELETE_STEP:g("DELETE_STEP","step",b({})),SET_STORY_NAME:g("SET_STORY_NAME","story",b({name:y(h(),$(1))})),SET_STORY_DESCRIPTION:g("SET_STORY_DESCRIPTION","story",b({description:h()})),SET_STORY_MILESTONE:g("SET_STORY_MILESTONE","story",b({milestoneId:P(h())})),MOVE_STORY:g("MOVE_STORY","story",b({activityId:y(h(),$(1)),stepId:y(h(),$(1)),milestoneId:P(h()),after:P(h())}),{mode:"sequence"}),REORDER_STORY:g("REORDER_STORY","story",b({after:P(h())}),{mode:"sequence"}),ADD_STORY:g("ADD_STORY","step",b({id:D,name:y(h(),$(1)),activityId:y(h(),$(1)),milestoneId:A(h()),number:A(Nt)}),{dedupeKey:Q}),DELETE_STORY:g("DELETE_STORY","story",b({})),ADD_STORY_LINK:g("ADD_STORY_LINK","story",b({url:dt,label:A(y(h(),$(1)))})),REMOVE_STORY_LINK:g("REMOVE_STORY_LINK","story",b({url:h()})),ADD_STORY_COMMENT:g("ADD_STORY_COMMENT","story",b({id:D,body:Ot,createdAt:A(Oe)}),{dedupeKey:Q}),DELETE_STORY_COMMENT:g("DELETE_STORY_COMMENT","story",b({commentId:y(h(),$(1))})),SET_STORY_STATUS:g("SET_STORY_STATUS","story",b({statusId:y(h(),$(1))})),SET_MILESTONE_NAME:g("SET_MILESTONE_NAME","milestone",b({name:y(h(),$(1))})),ADD_MILESTONE:g("ADD_MILESTONE","page",b({id:D,name:y(h(),$(1))}),{dedupeKey:Q}),DELETE_MILESTONE:g("DELETE_MILESTONE","milestone",b({})),REORDER_MILESTONE:g("REORDER_MILESTONE","milestone",b({after:P(h())}),{mode:"sequence"}),SET_MILESTONE_DUE_DATE:g("SET_MILESTONE_DUE_DATE","milestone",b({dueDate:P(Lt)})),ADD_STATUS:g("ADD_STATUS","page",b({id:D,name:y(h(),$(1)),tone:se,icon:A(ot)}),{dedupeKey:Q}),SET_STATUS_NAME:g("SET_STATUS_NAME","status",b({name:y(h(),$(1))})),SET_STATUS_TONE:g("SET_STATUS_TONE","status",b({tone:se})),SET_STATUS_ICON:g("SET_STATUS_ICON","status",b({icon:ot})),SET_STATUS_WEIGHT:g("SET_STATUS_WEIGHT","status",b({weight:Dt})),SET_MEASURE:g("SET_MEASURE","page",b({measure:Bt})),SET_DONE_STATUS:g("SET_DONE_STATUS","status",b({})),DELETE_STATUS:g("DELETE_STATUS","status",b({})),REORDER_STATUS:g("REORDER_STATUS","status",b({after:P(h())}),{mode:"sequence"}),ADD_LABEL:g("ADD_LABEL","page",b({id:D,name:y(h(),$(1)),tone:se}),{dedupeKey:Q}),SET_LABEL_NAME:g("SET_LABEL_NAME","label",b({name:y(h(),$(1))})),SET_LABEL_TONE:g("SET_LABEL_TONE","label",b({tone:se})),DELETE_LABEL:g("DELETE_LABEL","label",b({})),REORDER_LABEL:g("REORDER_LABEL","label",b({after:P(h())}),{mode:"sequence"}),ADD_STORY_LABEL:g("ADD_STORY_LABEL","story",b({labelId:y(h(),$(1))})),REMOVE_STORY_LABEL:g("REMOVE_STORY_LABEL","story",b({labelId:y(h(),$(1))})),ADD_STORY_BLOCKER:g("ADD_STORY_BLOCKER","story",b({blockerId:y(h(),$(1))})),REMOVE_STORY_BLOCKER:g("REMOVE_STORY_BLOCKER","story",b({blockerId:y(h(),$(1))})),ADD_MEMBER:g("ADD_MEMBER","page",b({id:D,name:y(h(),$(1)),tone:se}),{dedupeKey:Q}),SET_MEMBER_NAME:g("SET_MEMBER_NAME","member",b({name:y(h(),$(1))})),SET_MEMBER_TONE:g("SET_MEMBER_TONE","member",b({tone:se})),DELETE_MEMBER:g("DELETE_MEMBER","member",b({})),REORDER_MEMBER:g("REORDER_MEMBER","member",b({after:P(h())}),{mode:"sequence"}),SET_STORY_ASSIGNEE:g("SET_STORY_ASSIGNEE","story",b({memberId:P(y(h(),$(1)))})),ADD_ESTIMATE:g("ADD_ESTIMATE","page",b({id:D,name:y(h(),$(1)),points:rt}),{dedupeKey:Q}),SET_ESTIMATE_NAME:g("SET_ESTIMATE_NAME","estimate",b({name:y(h(),$(1))})),SET_ESTIMATE_POINTS:g("SET_ESTIMATE_POINTS","estimate",b({points:rt})),DELETE_ESTIMATE:g("DELETE_ESTIMATE","estimate",b({})),REORDER_ESTIMATE:g("REORDER_ESTIMATE","estimate",b({after:P(h())}),{mode:"sequence"}),SET_STORY_ESTIMATE:g("SET_STORY_ESTIMATE","story",b({estimateId:P(y(h(),$(1)))})),RECORD_SNAPSHOT:g("RECORD_SNAPSHOT","page",b({id:D,at:Oe,tally:C(Rt)}),{dedupeKey:Q}),DELETE_SNAPSHOT:g("DELETE_SNAPSHOT","snapshot",b({})),SET_FEATURE:g("SET_FEATURE","page",Gt,{dedupeKey:e=>{const t=St(Gt,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},kn={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}})},me=e=>{const t=e.statuses.findIndex(a=>a.id===e.doneStatusId);return t>=0?t:e.statuses.length-1},Ht=e=>e.statuses[me(e)],Vt=(e,t)=>{if(t===void 0)return!1;const a=e.statuses.findIndex(s=>s.id===t);return a>=0&&a>=me(e)},Kt=e=>e.statuses.slice(0,me(e)+1),wn=(e,t)=>e.milestones.find(a=>a.id===t.milestone)??e.milestones.find(a=>a.dueDate!==void 0)??e.milestones[0],he=e=>J(e,"estimates")?e.measure??(e.estimates.length>0?"points":"stories"):"stories",qt=e=>e.weight??1,ae=10,Wt=e=>{const{statuses:t}=e,a=me(e);if(he(e)!=="weighted")return t.map((r,o)=>o<a?1:0);const s=t.slice(0,a).map(qt),n=Ue(s),i=s.map(r=>n>0?r/n:1/s.length);return t.map((r,o)=>Ue(i.slice(o)))},xn=1,jt=(e,t)=>H(e,t.estimateId)?.points??xn,Xt=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}},r=Ce(i),o=t.get(r)??{...i,stories:0,points:0};t.set(r,{...o,stories:o.stories+1,points:o.points+jt(e,n)})}const a=[...e.milestones.map(n=>n.id),void 0],s=e.statuses.length===0?[void 0]:e.statuses.map(n=>n.id);return a.flatMap(n=>s.flatMap(i=>{const r=t.get(Ce({milestoneId:n,statusId:i}));return r?[r]:[]}))},$n=(e,t,a)=>{const s=he(e),i=[...$t(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:a,tally:Xt(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:Sn(e.statuses,d.tally,t,s)})),r=Wt(e),o=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:En(e.milestones.find(d=>d.id===t)?.dueDate),combined:i.map(d=>o(d,d.values.reduce((p,u,f)=>p+u*(r[f]??0),0))),byStatus:e.statuses.slice(1).map((d,p)=>({status:d,points:i.map(u=>o(u,Ue(u.values.slice(0,p+1))))}))}},Sn=(e,t,a,s)=>e.map(n=>Ue(t.filter(i=>i.milestoneId===a&&i.statusId===n.id).map(i=>s==="stories"?i.stories:i.points))),En=e=>{if(e===void 0)return null;const[t=0,a=1,s=1]=e.split("-").map(Number);return new Date(t,a-1,s,23,59,59).getTime()},le=e=>{const t=new Date(e),a=s=>String(s).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())} ${a(t.getHours())}:${a(t.getMinutes())}`},Ue=e=>e.reduce((t,a)=>t+a,0),Zt="STORY-",ze=e=>`${Zt}${e.number}`,Jt=(...e)=>Math.max(0,...e.flatMap(t=>t.stories.map(a=>a.number)))+1,Tn=(e,t)=>{if(t===void 0)return;const a=E(e,t);if(a)return a;const s=new RegExp(`^${Zt}([1-9]\\d*)$`,"i").exec(t.trim());if(!s)return;const n=Number(s[1]);return e.stories.find(i=>i.number===n)},Qt=(e,t)=>{const a=xs(k,t);if(a===null)return null;const s=a.target.id;switch(a.type){case"SET_ACTIVITY_NAME":{const{name:n}=a.payload;return e.activities.some(i=>i.id===s)?{...e,activities:e.activities.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_ACTIVITY_ACTOR":{const n=a.payload.actor.trim();return e.activities.some(i=>i.id===s)?{...e,activities:e.activities.map(i=>{if(i.id!==s)return i;const{actor:r,...o}=i;return n===""?o:{...o,actor:n}})}:null}case"SET_STEP_NAME":{const{name:n}=a.payload,i=L(e,s);return i?{...e,activities:e.activities.map(r=>r.id===i.activity.id?{...r,steps:r.steps.map(o=>o.id===i.step.id?{...o,name:n}:o)}:r)}:null}case"REORDER_STEP":{const{after:n}=a.payload,i=L(e,s);if(!i)return null;const r=n===null?null:L(e,n);if(n!==null&&(!r||r.activity.id!==i.activity.id))return null;const o=pe(i.activity.steps,i.step.id,r?.step.id??null);return o===null?null:{...e,activities:e.activities.map(d=>d.id===i.activity.id?{...d,steps:o}:d)}}case"REORDER_ACTIVITY":{const{after:n}=a.payload,i=pe(e.activities,s,n);return i===null?null:{...e,activities:i}}case"ADD_ACTIVITY":{const n=a.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=a.payload,i=e.activities.find(r=>r.id===s);return i?i.steps.some(r=>r.id===n.id)?e:{...e,activities:e.activities.map(r=>r.id===s?{...r,steps:[...r.steps,{id:n.id,name:n.name}]}:r)}:null}case"DELETE_ACTIVITY":{const n=e.activities.find(r=>r.id===s);if(!n)return null;const i=new Set(n.steps.map(r=>r.id));return ct({...e,activities:e.activities.filter(r=>r.id!==s)},r=>r.activityId===s||i.has(r.stepId))}case"DELETE_STEP":{const n=L(e,s);return n?ct({...e,activities:e.activities.map(i=>i.id===n.activity.id?{...i,steps:i.steps.filter(r=>r.id!==n.step.id)}:i)},i=>i.activityId===n.activity.id&&i.stepId===n.step.id):null}case"SET_STORY_NAME":{const{name:n}=a.payload;return V(e,s,i=>({...i,name:n}))}case"SET_STORY_DESCRIPTION":{const{description:n}=a.payload;return V(e,s,i=>({...i,description:n}))}case"SET_STORY_MILESTONE":{const{milestoneId:n}=a.payload;return n!==null&&!F(e,n)?null:V(e,s,i=>n===null?pt(i):{...i,milestoneId:n})}case"MOVE_STORY":{const n=a.payload,i=E(e,s);if(!i)return null;const r=L(e,n.stepId);if(!r||r.activity.id!==n.activityId||n.milestoneId!==null&&!F(e,n.milestoneId))return null;const o=n.milestoneId??void 0,d=o===void 0?{...pt(i),activityId:r.activity.id,stepId:r.step.id}:{...i,activityId:r.activity.id,stepId:r.step.id,milestoneId:o};return aa(e,d,n.after)}case"REORDER_STORY":{const{after:n}=a.payload,i=E(e,s);return i?aa(e,i,n,!0):null}case"ADD_STORY":{const n=a.payload,i=L(e,t.target.id);if(!i||i.activity.id!==n.activityId||n.milestoneId!==void 0&&!F(e,n.milestoneId))return null;if(e.stories.some(d=>d.id===n.id))return e;const r=n.number!==void 0&&e.stories.some(d=>d.number===n.number),o={id:n.id,number:n.number===void 0||r?Jt(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,o]}}case"DELETE_STORY":return e.stories.some(n=>n.id===s)?ct(e,n=>n.id===s):null;case"ADD_STORY_LINK":{const{url:n,label:i}=a.payload,r=E(e,s);if(!r)return null;if(r.links?.some(d=>d.url===n))return e;const o=i===void 0?{url:n}:{url:n,label:i};return V(e,s,d=>({...d,links:[...d.links??[],o]}))}case"REMOVE_STORY_LINK":{const{url:n}=a.payload;return E(e,s)?.links?.some(r=>r.url===n)?V(e,s,r=>{const o=(r.links??[]).filter(u=>u.url!==n),{links:d,...p}=r;return o.length===0?p:{...p,links:o}}):null}case"ADD_STORY_COMMENT":{const{id:n,body:i,createdAt:r}=a.payload,o=E(e,s);if(!o)return null;if(o.comments?.some(p=>p.id===n))return e;if(W(e).includes(n))return null;const d=r===void 0?{id:n,body:i}:{id:n,body:i,createdAt:r};return V(e,s,p=>({...p,comments:[...p.comments??[],d]}))}case"DELETE_STORY_COMMENT":{const{commentId:n}=a.payload;return E(e,s)?.comments?.some(r=>r.id===n)?V(e,s,r=>{const o=(r.comments??[]).filter(u=>u.id!==n),{comments:d,...p}=r;return o.length===0?p:{...p,comments:o}}):null}case"SET_STORY_STATUS":{const{statusId:n}=a.payload;return N(e,n)?V(e,s,i=>({...i,statusId:n})):null}case"SET_MILESTONE_NAME":{const{name:n}=a.payload;return e.milestones.some(i=>i.id===s)?{...e,milestones:e.milestones.map(i=>i.id===s?{...i,name:n}:i)}:null}case"ADD_MILESTONE":{const n=a.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===s)?{...e,milestones:e.milestones.filter(n=>n.id!==s),stories:e.stories.map(n=>n.milestoneId===s?pt(n):n),snapshots:ut(e,n=>n.milestoneId===s?oe(n,"milestoneId"):n)}:null;case"REORDER_MILESTONE":{const{after:n}=a.payload,i=pe(e.milestones,s,n);return i===null?null:{...e,milestones:i}}case"SET_MILESTONE_DUE_DATE":{const{dueDate:n}=a.payload;return F(e,s)?{...e,milestones:e.milestones.map(i=>i.id!==s?i:n===null?oe(i,"dueDate"):{...i,dueDate:n})}:null}case"ADD_STATUS":{const{id:n,name:i,tone:r,icon:o}=a.payload;if(e.statuses.some(p=>p.id===n))return e;const d=[...e.statuses,{id:n,name:i,tone:r,icon:o??"progress"}];return e.statuses.length===0?{...e,statuses:d,stories:e.stories.map(p=>({...p,statusId:n})),snapshots:ut(e,p=>({...p,statusId:n}))}:{...e,statuses:d}}case"SET_STATUS_NAME":{const{name:n}=a.payload;return N(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_STATUS_TONE":{const{tone:n}=a.payload;return N(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"SET_STATUS_ICON":{const{icon:n}=a.payload;return N(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,icon:n}:i)}:null}case"SET_STATUS_WEIGHT":{const{weight:n}=a.payload;return N(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,weight:n}:i)}:null}case"SET_MEASURE":{const{measure:n}=a.payload;return he(e)===n?e:{...e,measure:n}}case"SET_DONE_STATUS":return N(e,s)?e.doneStatusId===s?e:{...e,doneStatusId:s}:null;case"DELETE_STATUS":{if(!N(e,s))return null;const n=e.statuses.filter(r=>r.id!==s),i=n[0]?.id;return{...e.doneStatusId===s?oe(e,"doneStatusId"):e,statuses:n,stories:e.stories.map(r=>r.statusId!==s?r:i===void 0?An(r):{...r,statusId:i}),snapshots:ut(e,r=>r.statusId!==s?r:i===void 0?oe(r,"statusId"):{...r,statusId:i})}}case"REORDER_STATUS":{const{after:n}=a.payload,i=pe(e.statuses,s,n);return i===null?null:{...e,statuses:i}}case"ADD_LABEL":{const{id:n,name:i,tone:r}=a.payload;return j(e,n)?e:{...e,labels:[...e.labels,{id:n,name:i,tone:r}]}}case"SET_LABEL_NAME":{const{name:n}=a.payload;return j(e,s)?{...e,labels:e.labels.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_LABEL_TONE":{const{tone:n}=a.payload;return j(e,s)?{...e,labels:e.labels.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"DELETE_LABEL":return j(e,s)?{...e,labels:e.labels.filter(n=>n.id!==s),stories:e.stories.map(n=>n.labelIds?.includes(s)?ea(n,s):n)}:null;case"REORDER_LABEL":{const{after:n}=a.payload,i=pe(e.labels,s,n);return i===null?null:{...e,labels:i}}case"ADD_STORY_LABEL":{const{labelId:n}=a.payload,i=E(e,s);return!i||!j(e,n)?null:i.labelIds?.includes(n)?e:V(e,s,r=>({...r,labelIds:[...r.labelIds??[],n]}))}case"REMOVE_STORY_LABEL":{const{labelId:n}=a.payload;return E(e,s)?.labelIds?.includes(n)?V(e,s,i=>ea(i,n)):null}case"ADD_STORY_BLOCKER":{const{blockerId:n}=a.payload,i=E(e,s);return!i||!E(e,n)?null:i.blockedBy?.includes(n)?e:n===s||it(e.stories,n,s)?null:V(e,s,r=>({...r,blockedBy:[...r.blockedBy??[],n]}))}case"REMOVE_STORY_BLOCKER":{const{blockerId:n}=a.payload;return E(e,s)?.blockedBy?.includes(n)?V(e,s,i=>ta(i,new Set([n]))):null}case"ADD_MEMBER":{const{id:n,name:i,tone:r}=a.payload;return G(e,n)?e:{...e,members:[...e.members,{id:n,name:i,tone:r}]}}case"SET_MEMBER_NAME":{const{name:n}=a.payload;return G(e,s)?{...e,members:e.members.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_MEMBER_TONE":{const{tone:n}=a.payload;return G(e,s)?{...e,members:e.members.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"DELETE_MEMBER":return G(e,s)?{...e,members:e.members.filter(n=>n.id!==s),stories:e.stories.map(n=>n.assigneeId===s?oe(n,"assigneeId"):n)}:null;case"REORDER_MEMBER":{const{after:n}=a.payload,i=pe(e.members,s,n);return i===null?null:{...e,members:i}}case"SET_STORY_ASSIGNEE":{const{memberId:n}=a.payload;return n!==null&&!G(e,n)?null:V(e,s,i=>n===null?oe(i,"assigneeId"):{...i,assigneeId:n})}case"ADD_ESTIMATE":{const{id:n,name:i,points:r}=a.payload;return H(e,n)?e:{...e,estimates:[...e.estimates,{id:n,name:i,points:r}]}}case"SET_ESTIMATE_NAME":{const{name:n}=a.payload;return H(e,s)?{...e,estimates:e.estimates.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_ESTIMATE_POINTS":{const{points:n}=a.payload;return H(e,s)?{...e,estimates:e.estimates.map(i=>i.id===s?{...i,points:n}:i)}:null}case"DELETE_ESTIMATE":return H(e,s)?{...e,estimates:e.estimates.filter(n=>n.id!==s),stories:e.stories.map(n=>n.estimateId===s?oe(n,"estimateId"):n)}:null;case"REORDER_ESTIMATE":{const{after:n}=a.payload,i=pe(e.estimates,s,n);return i===null?null:{...e,estimates:i}}case"SET_STORY_ESTIMATE":{const{estimateId:n}=a.payload;return n!==null&&!H(e,n)?null:V(e,s,i=>n===null?oe(i,"estimateId"):{...i,estimateId:n})}case"RECORD_SNAPSHOT":{const{id:n,at:i,tally:r}=a.payload;return $e(e,n)?e:Ut(e,r)!==null?null:{...e,snapshots:[...e.snapshots,{id:n,at:i,tally:r}]}}case"DELETE_SNAPSHOT":return $e(e,s)?{...e,snapshots:e.snapshots.filter(n=>n.id!==s)}:null;case"SET_FEATURE":{const{feature:n,enabled:i}=a.payload;if(e.features.includes(n)===i)return e;const r=Re.filter(o=>o===n?i:e.features.includes(o));return{...e,features:r}}default:return $s(a)}},V=(e,t,a)=>e.stories.some(s=>s.id===t)?{...e,stories:e.stories.map(s=>s.id===t?a(s):s)}:null,pt=e=>{const{milestoneId:t,...a}=e;return a},ea=(e,t)=>{const{labelIds:a=[],...s}=e,n=a.filter(i=>i!==t);return n.length===0?s:{...s,labelIds:n}},ta=(e,t)=>{const{blockedBy:a=[],...s}=e,n=a.filter(i=>!t.has(i));return n.length===0?s:{...s,blockedBy:n}},ct=(e,t)=>{const a=new Set(e.stories.filter(t).map(s=>s.id));return{...e,stories:e.stories.filter(s=>!a.has(s.id)).map(s=>s.blockedBy?.some(n=>a.has(n))?ta(s,a):s)}},oe=(e,t)=>{const{[t]:a,...s}=e;return s},ut=(e,t)=>e.snapshots.map(a=>{const s=new Map;for(const n of a.tally.map(t)){const i=Ce(n),r=s.get(i);s.set(i,r?{...r,stories:r.stories+n.stories,points:r.points+n.points}:n)}return{...a,tally:[...s.values()]}}),An=e=>{const{statusId:t,...a}=e;return a},aa=(e,t,a,s=!1)=>{const n=t.milestoneId??void 0,i=e.stories.filter(v=>v.id!==t.id),r=i.filter(v=>v.stepId===t.stepId&&(v.milestoneId??void 0)===n);if(a!==null){const v=i.find(I=>I.id===a);if(!v||v.stepId!==t.stepId||(v.milestoneId??void 0)!==n)return null;if(s){const I=E(e,t.id);if(!I||v.stepId!==I.stepId||(v.milestoneId??void 0)!==(I.milestoneId??void 0))return null}}const o=a===null?[t,...r]:sa(r,t,a),d=i.findIndex(v=>v.stepId===t.stepId&&(v.milestoneId??void 0)===n),p=new Set(r.map(v=>v.id)),u=i.filter(v=>!p.has(v.id)),f=d<0?u.length:Math.min(d,u.length),x=[...u.slice(0,f),...o,...u.slice(f)];return{...e,stories:x}},pe=(e,t,a)=>{if(!e.some(i=>i.id===t)||a!==null&&!e.some(i=>i.id===a))return null;if(a===t)return[...e];const s=e.find(i=>i.id===t);if(s===void 0)return null;const n=e.filter(i=>i.id!==t);return sa(n,s,a)},sa=(e,t,a)=>{const s=[...e],n=a===null?-1:s.findIndex(i=>i.id===a);return s.splice(n+1,0,t),s},ge=Ss({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",milestonesTab:"Milestones",statusesTab:"Statuses",labelsTab:"Labels",burndownTab:"Burndown",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:"Orange"})[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,a,s)=>`${e} ${t}, ${a} ${s}`,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)=>ia("en-US",e,t),commentDate:e=>na("en-US",e),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",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",storyCommentsHint:"Kept on the story as part of the map. To ask the agent for a change, write a review comment.",commentSubmit:"Add comment",deleteStoryCommentAria:"Delete comment",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",membersTab:"Members",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",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusesTab:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelsTab:"\u30E9\u30D9\u30EB",burndownTab:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",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:"\u30AA\u30EC\u30F3\u30B8"})[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,a,s)=>`${e} ${t}\u3001${a} ${s}`,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)=>ia("ja-JP",e,t),commentDate:e=>na("ja-JP",e),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",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",storyCommentsHint:"\u30DE\u30C3\u30D7\u306E\u4E00\u90E8\u3068\u3057\u3066\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u6B8B\u308A\u307E\u3059\u3002Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068\u306F\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u306B\u66F8\u304D\u307E\u3059\u3002",commentSubmit:"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteStoryCommentAria:"\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",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",membersTab:"\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"}}),na=(e,t)=>new Intl.DateTimeFormat(e,{dateStyle:"medium",timeStyle:"short"}).format(new Date(t)),ia=(e,t,a)=>{const s=new Date(t);switch(a){case"day":case"week":case"biweek":return`${s.getMonth()+1}/${s.getDate()}`;case"month":case"quarter":return new Intl.DateTimeFormat(e,{month:"short",...s.getMonth()===0?{year:"numeric"}:{}}).format(s);case"year":return new Intl.DateTimeFormat(e,{year:"numeric"}).format(s)}},mt=/^[A-Z][A-Z0-9]+-\d+$/,ra=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},_n=(e,t)=>{if(e!=="github.com")return null;const[a,s,n,i]=t;if(a===void 0)return{kind:"github",text:"GitHub",title:"github.com"};if(s===void 0)return{kind:"github",text:a,title:a};const r=`${a}/${s}`;return(n==="issues"||n==="pull"||n==="discussions")&&i&&/^\d+$/.test(i)?{kind:"github",text:`#${i}`,title:`${r}#${i}`}:n==="commit"&&i?{kind:"github",text:i.slice(0,7),title:`${r}@${i}`}:{kind:"github",text:r,title:r}},In=(e,t)=>{if(e!=="gitlab.com")return null;const a=t.indexOf("-"),s=(a<0?t:t.slice(0,a)).join("/"),n=a<0?void 0:t[a+1],i=a<0?void 0:t[a+2];if(i&&/^\d+$/.test(i)){if(n==="issues")return{kind:"gitlab",text:`#${i}`,title:`${s}#${i}`};if(n==="merge_requests")return{kind:"gitlab",text:`!${i}`,title:`${s}!${i}`}}return{kind:"gitlab",text:s||"GitLab",title:s||e}},Mn=(e,t,a)=>{if(!t.endsWith(".atlassian.net")&&!t.startsWith("jira."))return null;const s=(a[0]==="browse"?a[1]:void 0)??e.searchParams.get("selectedIssue")??a.find(n=>mt.test(n));return s&&mt.test(s)?{kind:"jira",text:s,title:`${t} ${s}`}:{kind:"jira",text:"Jira",title:t}},Ln=(e,t)=>{if(e!=="linear.app")return null;const a=t[1]==="issue"?t[2]?.toUpperCase():void 0;return a&&mt.test(a)?{kind:"linear",text:a,title:a}:{kind:"linear",text:"Linear",title:e}},Dn=(e,t)=>{if(e!=="figma.com")return null;const[a,,s]=t;if((a==="file"||a==="design"||a==="proto"||a==="board")&&s){const n=ra(s);return{kind:"figma",text:n,title:n}}return{kind:"figma",text:"Figma",title:e}},Rn=(e,t)=>{if(e!=="notion.so"&&!e.endsWith(".notion.site"))return null;const s=(t.at(-1)??"").replace(/-?[0-9a-f]{32}$/i,""),n=s===""?"Notion":ra(s);return{kind:"notion",text:n,title:n}},Pe=e=>{let t;try{t=new URL(e)}catch{return{kind:"web",text:e,title:e}}const a=t.hostname.replace(/^www\./,""),s=t.pathname.split("/").filter(n=>n!=="");return _n(a,s)??In(a,s)??Mn(t,a,s)??Ln(a,s)??Dn(a,s)??Rn(a,s)??{kind:"web",text:a,title:e}},On=["map","milestones","statuses","labels","members","burndown"],Nn={members:"assignees",burndown:"estimates"},oa=e=>On.filter(t=>{const a=Nn[t];return a===void 0||J(e,a)}),da=(e,t)=>oa(e).find(a=>a===t.tab)??"map",Se=(e,t)=>Vt(e,t.statusId),la=(e,t)=>{const a=E(e,t)?.blockedBy??[];return{blockers:a,openBlockers:a.filter(s=>{const n=E(e,s);return n!==void 0&&!Se(e,n)}).length,dependents:e.stories.filter(s=>s.blockedBy?.includes(t)).map(s=>s.id)}},Cn=(e,t)=>{const a=new Set(E(e,t)?.blockedBy??[]);return e.stories.filter(s=>s.id!==t&&!a.has(s.id)&&!it(e.stories,s.id,t))},Bn=(e,t)=>e.stories.filter(a=>a.id!==t&&!a.blockedBy?.includes(t)&&!it(e.stories,t,a.id)),Yn=["critical-path"],Fe=e=>Yn.find(t=>t===e.highlight)??null,Un=(e,t)=>{if(Se(e,t))return 0;const a=he(e)==="stories"?1:jt(e,t),s=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return a*(Wt(e)[s]??1)},zn=(e,t)=>Fe(t)==="critical-path"?pa(e).ids:null,Pn=1e-9,pa=e=>{const t=new Map(e.stories.map(d=>[d.id,Un(e,d)]).filter(([,d])=>d>0)),a=new Map,s=new Map;for(const d of e.stories)if(t.has(d.id))for(const p of d.blockedBy??[])t.has(p)&&(a.set(d.id,[...a.get(d.id)??[],p]),s.set(p,[...s.get(p)??[],d.id]));const n=ca(t,a),i=ca(t,s),r=[...t].map(([d,p])=>[d,n(d)+i(d)-p]),o=Math.max(0,...r.map(([,d])=>d));return{ids:new Set(r.filter(([,d])=>o-d<Pn).map(([d])=>d)),work:o}},ca=(e,t)=>{const a=new Map,s=n=>{const i=a.get(n);if(i!==void 0)return i;const r=(e.get(n)??0)+Math.max(0,...(t.get(n)??[]).map(s));return a.set(n,r),r};return s},Ee=["status","label","estimate","assignee"],ne="~none",ie={key:"done",value:"show"},ua=(e,t)=>t[ie.key]===ie.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(a=>Vt(e,a.id)).map(a=>a.id)),be=(e,t)=>{switch(t){case"status":return e.statuses.map(a=>a.id);case"label":return e.labels.length===0?[]:[...e.labels.map(a=>a.id),ne];case"estimate":return!J(e,"estimates")||e.estimates.length===0?[]:[...e.estimates.map(a=>a.id),ne];case"assignee":return!J(e,"assignees")||e.members.length===0?[]:[...e.members.map(a=>a.id),ne]}},Ge=(e,t)=>{const a=ua(e,t),s=n=>{const i=t[n];if(i===void 0||i==="")return new Set;const r=new Set(i.split(","));return new Set(be(e,n).filter(o=>r.has(o)&&!a.has(o)))};return{status:s("status"),label:s("label"),estimate:s("estimate"),assignee:s("assignee"),hiddenStatusIds:a}},ma=(e,t,a)=>{const s=be(e,t).filter(n=>a.has(n));return s.length===0?null:s.join(",")},Fn=(e,t)=>{const a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a},Gn=e=>Ee.some(t=>e[t].size>0),ha=(e,t)=>{const a=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&He(e.status,t.statusId===void 0?[]:[t.statusId])&&He(e.label,a.length===0?[ne]:a)&&He(e.estimate,[t.estimateId??ne])&&He(e.assignee,[t.assigneeId??ne])},He=(e,t)=>e.size===0||t.some(a=>e.has(a)),R=(e,t,a)=>{const s=typeof a=="string"?a:"",n=typeof t=="string"?t:void 0;return n===void 0?e.toValue(s):e.fromTo(n,s)},de=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,Hn={SET_ACTIVITY_NAME:(e,t,a)=>({title:e.renameActivity,tone:"update",body:R(e,ee(a,t.target.id)?.name,w(k.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,a)=>{const s=w(k.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:s===""?e.removed(ee(a,t.target.id)?.actor??""):R(e,ee(a,t.target.id)?.actor,s)}},SET_STEP_NAME:(e,t,a)=>({title:e.renameStep,tone:"update",body:R(e,L(a,t.target.id)?.step.name,w(k.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:de(e,w(k.REORDER_STEP,t).after)}),REORDER_ACTIVITY:(e,t,a)=>{const s=w(k.REORDER_ACTIVITY,t).after;return{title:e.reorderActivity,tone:"move",body:de(e,s===null?null:ee(a,s)?.name??s)}},ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(w(k.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(w(k.ADD_STEP,t).name??""))}),DELETE_ACTIVITY:(e,t,a)=>({title:e.deleteActivity,tone:"delete",body:e.removed(ee(a,t.target.id)?.name??t.target.id)}),DELETE_STEP:(e,t,a)=>({title:e.deleteStep,tone:"delete",body:e.removed(L(a,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,a)=>({title:e.renameStory,tone:"update",body:R(e,E(a,t.target.id)?.name,w(k.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(w(k.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,a)=>{const s=w(k.SET_STORY_MILESTONE,t).milestoneId;return{title:e.changeMilestone,tone:"move",body:s==null?e.toUnassigned:e.toName(F(a,String(s))?.name??String(s))}},MOVE_STORY:(e,t,a)=>({title:e.moveStory,tone:"move",body:e.toName(L(a,String(w(k.MOVE_STORY,t).stepId))?.step.name??String(w(k.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:de(e,w(k.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(w(k.ADD_STORY,t).name??""))}),DELETE_STORY:(e,t,a)=>({title:e.deleteStory,tone:"delete",body:e.removed(E(a,t.target.id)?.name??t.target.id)}),SET_MILESTONE_NAME:(e,t,a)=>({title:e.renameMilestone,tone:"update",body:R(e,F(a,t.target.id)?.name,w(k.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(w(k.ADD_MILESTONE,t).name??""))}),DELETE_MILESTONE:(e,t,a)=>({title:e.deleteMilestone,tone:"delete",body:e.removed(F(a,t.target.id)?.name??t.target.id)}),REORDER_MILESTONE:(e,t)=>({title:e.reorderMilestone,tone:"move",body:de(e,w(k.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:a,label:s}=w(k.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(s??Pe(a).title)}},REMOVE_STORY_LINK:(e,t,a)=>{const{url:s}=w(k.REMOVE_STORY_LINK,t),n=E(a,t.target.id)?.links?.find(i=>i.url===s);return{title:e.removeStoryLink,tone:"delete",body:e.removed(n?.label??Pe(s).title)}},ADD_STORY_COMMENT:(e,t)=>({title:e.addStoryComment,tone:"create",body:e.added(w(k.ADD_STORY_COMMENT,t).body)}),DELETE_STORY_COMMENT:(e,t,a)=>{const{commentId:s}=w(k.DELETE_STORY_COMMENT,t),n=E(a,t.target.id)?.comments?.find(i=>i.id===s);return{title:e.deleteStoryComment,tone:"delete",body:e.removed(n?.body??s)}},SET_STORY_STATUS:(e,t,a)=>{const s=w(k.SET_STORY_STATUS,t).statusId;return{title:e.changeStoryStatus,tone:"update",body:e.toName(N(a,s)?.name??s)}},ADD_STATUS:(e,t)=>({title:e.addStatus,tone:"create",body:e.added(w(k.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,a)=>({title:e.renameStatus,tone:"update",body:R(e,N(a,t.target.id)?.name,w(k.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,a)=>{const s=N(a,t.target.id)?.tone,n=w(k.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:R(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},SET_STATUS_ICON:(e,t,a)=>{const s=N(a,t.target.id)?.icon,n=w(k.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:R(e,s===void 0?void 0:e.iconName(s),e.iconName(n))}},DELETE_STATUS:(e,t,a)=>({title:e.deleteStatus,tone:"delete",body:e.removed(N(a,t.target.id)?.name??t.target.id)}),REORDER_STATUS:(e,t)=>({title:e.reorderStatus,tone:"move",body:de(e,w(k.REORDER_STATUS,t).after)}),ADD_LABEL:(e,t)=>({title:e.addLabel,tone:"create",body:e.added(w(k.ADD_LABEL,t).name)}),SET_LABEL_NAME:(e,t,a)=>({title:e.renameLabel,tone:"update",body:R(e,j(a,t.target.id)?.name,w(k.SET_LABEL_NAME,t).name)}),SET_LABEL_TONE:(e,t,a)=>{const s=j(a,t.target.id)?.tone,n=w(k.SET_LABEL_TONE,t).tone;return{title:e.changeLabelTone,tone:"update",body:R(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},DELETE_LABEL:(e,t,a)=>({title:e.deleteLabel,tone:"delete",body:e.removed(j(a,t.target.id)?.name??t.target.id)}),REORDER_LABEL:(e,t)=>({title:e.reorderLabel,tone:"move",body:de(e,w(k.REORDER_LABEL,t).after)}),ADD_STORY_LABEL:(e,t,a)=>{const s=w(k.ADD_STORY_LABEL,t).labelId;return{title:e.addStoryLabel,tone:"create",body:e.added(j(a,s)?.name??s)}},REMOVE_STORY_LABEL:(e,t,a)=>{const s=w(k.REMOVE_STORY_LABEL,t).labelId;return{title:e.removeStoryLabel,tone:"delete",body:e.removed(j(a,s)?.name??s)}},ADD_STORY_BLOCKER:(e,t,a)=>{const s=w(k.ADD_STORY_BLOCKER,t).blockerId;return{title:e.addStoryBlocker,tone:"create",body:e.added(E(a,s)?.name??s)}},REMOVE_STORY_BLOCKER:(e,t,a)=>{const s=w(k.REMOVE_STORY_BLOCKER,t).blockerId;return{title:e.removeStoryBlocker,tone:"delete",body:e.removed(E(a,s)?.name??s)}},SET_MILESTONE_DUE_DATE:(e,t,a)=>{const s=w(k.SET_MILESTONE_DUE_DATE,t).dueDate;return{title:e.changeMilestoneDueDate,tone:s===null?"delete":"update",body:s===null?e.noDueDate:R(e,F(a,t.target.id)?.dueDate,s)}},SET_STATUS_WEIGHT:(e,t,a)=>{const s=N(a,t.target.id)?.weight,n=w(k.SET_STATUS_WEIGHT,t).weight;return{title:e.changeStatusWeight,tone:"update",body:R(e,s===void 0?void 0:String(s),String(n))}},SET_DONE_STATUS:(e,t,a)=>({title:e.setDoneStatus,tone:"update",body:R(e,Ht(a)?.name,N(a,t.target.id)?.name??t.target.id)}),SET_MEASURE:(e,t,a)=>({title:e.setMeasure,tone:"update",body:R(e,e.measureName(he(a)),e.measureName(w(k.SET_MEASURE,t).measure))}),ADD_MEMBER:(e,t)=>({title:e.addMember,tone:"create",body:e.added(w(k.ADD_MEMBER,t).name)}),SET_MEMBER_NAME:(e,t,a)=>({title:e.renameMember,tone:"update",body:R(e,G(a,t.target.id)?.name,w(k.SET_MEMBER_NAME,t).name)}),SET_MEMBER_TONE:(e,t,a)=>{const s=G(a,t.target.id)?.tone,n=w(k.SET_MEMBER_TONE,t).tone;return{title:e.changeMemberTone,tone:"update",body:R(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},DELETE_MEMBER:(e,t,a)=>({title:e.deleteMember,tone:"delete",body:e.removed(G(a,t.target.id)?.name??t.target.id)}),REORDER_MEMBER:(e,t)=>({title:e.reorderMember,tone:"move",body:de(e,w(k.REORDER_MEMBER,t).after)}),SET_STORY_ASSIGNEE:(e,t,a)=>{const s=w(k.SET_STORY_ASSIGNEE,t).memberId;if(s===null){const n=G(a,E(a,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(a,s)?.name??s)}},ADD_ESTIMATE:(e,t)=>{const{name:a,points:s}=w(k.ADD_ESTIMATE,t);return{title:e.addEstimate,tone:"create",body:e.added(e.estimateText(a,s))}},SET_ESTIMATE_NAME:(e,t,a)=>({title:e.renameEstimate,tone:"update",body:R(e,H(a,t.target.id)?.name,w(k.SET_ESTIMATE_NAME,t).name)}),SET_ESTIMATE_POINTS:(e,t,a)=>{const s=H(a,t.target.id)?.points,n=w(k.SET_ESTIMATE_POINTS,t).points;return{title:e.changeEstimatePoints,tone:"update",body:R(e,s===void 0?void 0:String(s),String(n))}},DELETE_ESTIMATE:(e,t,a)=>({title:e.deleteEstimate,tone:"delete",body:e.removed(H(a,t.target.id)?.name??t.target.id)}),REORDER_ESTIMATE:(e,t)=>({title:e.reorderEstimate,tone:"move",body:de(e,w(k.REORDER_ESTIMATE,t).after)}),SET_STORY_ESTIMATE:(e,t,a)=>{const s=w(k.SET_STORY_ESTIMATE,t).estimateId;return s===null?{title:e.setStoryEstimate,tone:"delete",body:e.toValue(e.unestimated)}:{title:e.setStoryEstimate,tone:"update",body:e.toValue(H(a,s)?.name??s)}},RECORD_SNAPSHOT:(e,t)=>{const{at:a,tally:s}=w(k.RECORD_SNAPSHOT,t),n=s.reduce((i,r)=>i+r.stories,0);return{title:e.recordSnapshot,tone:"create",body:e.snapshotSummary(le(a),n)}},DELETE_SNAPSHOT:(e,t,a)=>{const s=$e(a,t.target.id);return{title:e.deleteSnapshot,tone:"delete",body:e.removed(s?le(s.at):t.target.id)}},SET_FEATURE:(e,t)=>{const{feature:a,enabled:s}=w(k.SET_FEATURE,t);return{title:s?e.enableFeature:e.disableFeature,tone:s?"create":"delete",body:e.featureName(a)}}},ga=(e,t,a,s)=>{let n;try{const i=Hn[t.type];n=i?i(e,t,s??a):{title:t.type,tone:"meta"}}catch{n={title:t.type,tone:"meta"}}return{title:n.title,targetLabel:fa(e,a,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},ba=e=>`${e.type} ${_(e.target)} ${JSON.stringify(e.payload)}`,fa=(e,t,a)=>{try{switch(a.type){case"activity":{const s=ee(t,a.id);return s?e.targetLabel(e.activityGroup,s.name):e.targetMissing(e.activityGroup,a.id)}case"step":{const s=L(t,a.id)?.step;return s?e.targetLabel(e.stepGroup,s.name):e.targetMissing(e.stepGroup,a.id)}case"story":{const s=E(t,a.id);return s?e.targetLabel(e.storyGroup,s.name):e.targetMissing(e.storyGroup,a.id)}case"milestone":{const s=F(t,a.id);return s?e.targetLabel(e.milestoneGroup,s.name):e.targetMissing(e.milestoneGroup,a.id)}case"status":{const s=N(t,a.id);return s?e.targetLabel(e.statusGroup,s.name):e.targetMissing(e.statusGroup,a.id)}case"label":{const s=j(t,a.id);return s?e.targetLabel(e.labelGroup,s.name):e.targetMissing(e.labelGroup,a.id)}case"member":{const s=G(t,a.id);return s?e.targetLabel(e.memberGroup,s.name):e.targetMissing(e.memberGroup,a.id)}case"estimate":{const s=H(t,a.id);return s?e.targetLabel(e.estimateGroup,s.name):e.targetMissing(e.estimateGroup,a.id)}case"snapshot":{const s=$e(t,a.id);return s?e.targetLabel(e.snapshotGroup,le(s.at)):e.targetMissing(e.snapshotGroup,a.id)}case"page":return e.targetLabel(e.mapGroup,ht(t));default:return`${a.type} \xB7 ${a.id}`}}catch{return`${a.type} \xB7 ${a.id}`}},va=(e,t,a)=>{const s=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const n of t.activities){s.push({value:_({type:"activity",id:n.id}),label:n.name,group:e.activityGroup});for(const i of n.steps)s.push({value:_({type:"step",id:te(n.id,i.id)}),label:`${n.name} \u203A ${i.name}`,group:e.stepGroup})}for(const n of t.milestones)s.push({value:_({type:"milestone",id:n.id}),label:n.name,group:e.milestoneGroup});for(const n of t.statuses)s.push({value:_({type:"status",id:n.id}),label:n.name,group:e.statusGroup});for(const n of t.labels)s.push({value:_({type:"label",id:n.id}),label:n.name,group:e.labelGroup});for(const n of t.members)s.push({value:_({type:"member",id:n.id}),label:n.name,group:e.memberGroup});for(const n of t.estimates)s.push({value:_({type:"estimate",id:n.id}),label:e.estimateText(n.name,n.points),group:e.estimateGroup});for(const n of t.snapshots)s.push({value:_({type:"snapshot",id:n.id}),label:le(n.at),group:e.snapshotGroup});for(const n of t.stories)s.push({value:_({type:"story",id:n.id}),label:n.name,group:e.storyGroup});return s},ya=(e,t,a)=>{const s=t.stories.find(n=>n.id===a.story);if(s)return{value:_({type:"story",id:s.id}),label:s.name,group:e.storyGroup};for(const n of t.activities){const i=n.steps.find(r=>r.id===a.step);if(i)return{value:_({type:"step",id:te(n.id,i.id)}),label:i.name,group:e.stepGroup}}return null},ht=e=>e.title??"User Story Mapping",Vn=(e,t)=>{switch(t.type){case"story":{const a=E(e,t.id);return{tab:null,highlight:null,...Object.fromEntries(Ee.map(s=>[s,null])),...a&&Se(e,a)?{[ie.key]:ie.value}:{}}}case"step":case"activity":return{tab:null,view:null};case"milestone":return{tab:"milestones"};case"status":return{tab:"statuses"};case"label":return{tab:"labels"};case"member":return J(e,"assignees")?{tab:"members"}:null;case"estimate":case"snapshot":return J(e,"estimates")?{tab:"burndown"}:null;default:return null}},ka=(e,t)=>{const a=L(e,t.step),s=a?.activity??ee(e,t.activity)??e.activities[0],n=a?.step??s?.steps.find(u=>u.id===t.step)??s?.steps[0],i=Tn(e,t.story),r={...t};s?r.activity=s.id:delete r.activity,n?r.step=n.id:delete r.step,i?r.story=i.id:delete r.story,r.view=t.view==="group"?"group":"activity";const o=Ge(e,t);for(const u of Ee){const f=ma(e,u,o[u]);f===null?delete r[u]:r[u]=f}t[ie.key]!==ie.value&&delete r[ie.key];const d=da(e,t);d==="map"?delete r.tab:r.tab=d,F(e,t.milestone)||delete r.milestone;const p=Fe(t);return p===null?delete r.highlight:r.highlight=p,r},wa=(e,t)=>{switch(t.type){case"activity":return ee(e,t.id)!==void 0;case"step":return L(e,t.id)!==void 0;case"story":return E(e,t.id)!==void 0;case"milestone":return F(e,t.id)!==void 0;case"status":return N(e,t.id)!==void 0;case"label":return j(e,t.id)!==void 0;case"member":return G(e,t.id)!==void 0;case"estimate":return H(e,t.id)!==void 0;case"snapshot":return $e(e,t.id)!==void 0;case"page":return!0;default:return!1}},xa=e=>{const t=ge(e);return{name:"usm",label:"User Story Mapping",parseBase:Yt,emptyBase:zt,actions:k,apply:Qt,canonicalState:yn,hasTarget:wa,canonicalTarget:(a,s)=>{if(s.type!=="step")return s;const n=L(a,s.id);return n?{...s,id:te(n.activity.id,n.step.id)}:s},describe:(a,s,n)=>ga(t,a,s,n),serialize:ba,resolveNavigation:ka,navigationFor:Vn,commentTargets:(a,s)=>va(t,a),currentTarget:(a,s)=>ya(t,a,s),settings:a=>({items:Re.map(s=>{const n=J(a,s);return{key:s,label:t.featureName(s),hint:t.featureHint(s),on:n,toggle:{type:"SET_FEATURE",target:{type:"page",id:"usm"},payload:{feature:s,enabled:!n}}}}),note:t.featuresNote}),title:ht}},$a=.5,Kn=({widths:e,available:t,gap:a,moreWidth:s,keep:n})=>{if(e.reduce((u,f)=>u+f,0)+a*Math.max(0,e.length-1)<=t+$a)return[];const r=t-s+$a,o=new Set;let d=0;const p=u=>{d+=(o.size===0?0:a)+(e[u]??0),o.add(u)};n>=0&&n<e.length&&p(n);for(const[u,f]of e.entries())if(!o.has(u)){if(d+(o.size===0?0:a)+f>r)break;p(u)}return e.flatMap((u,f)=>o.has(f)?[]:[f])},Sa=new Set;class qn{#i;#e;#a=Sa;#n=0;#t=null;#s=null;constructor(t,a){this.#i=t,this.#e=a,t.addController(this)}get hidden(){return this.#a}get minimum(){return this.#n}hostConnected(){typeof ResizeObserver>"u"||(this.#t=new ResizeObserver(()=>this.#r()))}hostUpdated(){const t=this.#e.row();t!==this.#s&&(this.#s&&this.#t?.unobserve(this.#s),t&&this.#t?.observe(t),this.#s=t),this.#r()}hostDisconnected(){this.#t?.disconnect(),this.#t=null,this.#s=null}#r(){const t=this.#e.row();if(!t)return;const a=this.#e.items(t),s=a.map(x=>x.getBoundingClientRect().width),n=a.findIndex(x=>this.#e.kept(x)),i=a[0]?.parentElement,r=i?Ea(i):0,o=this.#e.more(t),d=o?o.getBoundingClientRect().width+Ea(t):0,p=Kn({widths:s,available:t.getBoundingClientRect().width,gap:r,moreWidth:d,keep:n}),u=new Set(p.flatMap(x=>{const v=a[x];return v?[this.#e.keyOf(v)]:[]})),f=Math.ceil((s[n]??0)+d);Wn(u,this.#a)&&f===this.#n||(this.#a=u.size===0?Sa:u,this.#n=f,this.#i.requestUpdate())}}const Ea=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,Wn=(e,t)=>e.size===t.size&&[...e].every(a=>t.has(a)),gt=1440*60*1e3,jn=48,Xn=8,Zn=(e,t,a,s)=>{const n={left:s.inset.left,top:s.inset.top,right:s.width-s.inset.right,bottom:s.height-s.inset.bottom},i=[...e.map(S=>S.at),a,...t===null?[]:[t]];let r=Math.min(...i),o=Math.max(...i);o-r<gt&&(r-=gt/2,o+=gt/2);const d=Jn(Math.max(0,...e.map(S=>S.value))),p=d.at(-1)??1,u=S=>n.left+(S-r)/(o-r)*(n.right-n.left),f=S=>n.bottom-S/p*(n.bottom-n.top),x=e.map(S=>({x:u(S.at),y:f(S.value),at:S.at,value:S.value,...S.snapshotId===void 0?{}:{snapshotId:S.snapshotId}})),v=x[0],I=ei(r,o,Math.floor((n.right-n.left)/jn));return{size:s,plot:n,line:x.map(S=>`${Te(S.x)},${Te(S.y)}`).join(" "),dots:x,ideal:t===null||!v?null:{x1:v.x,y1:v.y,x2:u(t),y2:f(0)},nowX:u(a),dueX:t===null?null:u(t),yTicks:d.map(S=>({y:f(S),value:S})),valueTop:p,xUnit:I.unit,xTicks:I.ats.map(S=>({x:u(S),at:S})),domain:{start:r,end:o},idealSpan:t===null||!v?null:{at:v.at,value:v.value,due:t}}},Jn=e=>{const t=Qn(e/4),a=Math.max(1,Math.ceil(e/t));return Array.from({length:a+1},(s,n)=>n*t)},Qn=e=>{if(e<=1)return 1;const t=10**Math.floor(Math.log10(e));return([1,2,2.5,5,10].find(s=>Number.isInteger(s*t)&&s*t>=e)??10)*t},Te=e=>Math.round(e*100)/100,ei=(e,t,a)=>{const s=Math.max(1,a),n=["day","week","biweek","month","quarter"];for(const i of n){const r=Ta(i,e,t,s);if(r!==null)return{unit:i,ats:r}}return{unit:"year",ats:Ta("year",e,t,1/0)??[]}},Ta=(e,t,a,s)=>{const n=[];for(let i=ti(e,t);i<=a;i=ai(e,i)){if(n.length===s)return null;n.push(i)}return n},ti=(e,t)=>{const a=new Date(t),[s,n,i]=[a.getFullYear(),a.getMonth(),a.getDate()],r=(o,d)=>o.getTime()>=t?o.getTime():d().getTime();switch(e){case"day":return r(new Date(s,n,i),()=>new Date(s,n,i+1));case"week":case"biweek":{const o=r(new Date(s,n,i),()=>new Date(s,n,i+1)),d=new Date(o),p=(8-d.getDay())%7;return new Date(d.getFullYear(),d.getMonth(),d.getDate()+p).getTime()}case"month":return r(new Date(s,n,1),()=>new Date(s,n+1,1));case"quarter":{const o=n-n%3;return r(new Date(s,o,1),()=>new Date(s,o+3,1))}case"year":return r(new Date(s,0,1),()=>new Date(s+1,0,1))}},ai=(e,t)=>{const a=new Date(t),[s,n,i]=[a.getFullYear(),a.getMonth(),a.getDate()],r={day:1,week:7,biweek:14},o={month:1,quarter:3,year:12};return e==="day"||e==="week"||e==="biweek"?new Date(s,n,i+r[e]).getTime():new Date(s,n+o[e],1).getTime()},Aa=(e,t)=>{const{plot:a,domain:s,dots:n}=e,i=Math.min(a.right,Math.max(a.left,t)),r=n.reduce((x,v)=>x===null||Math.abs(v.x-i)<Math.abs(x.x-i)?v:x,null),o=r!==null&&Math.abs(r.x-i)<=Xn?r:null,d=o?.at??s.start+(i-a.left)/(a.right-a.left)*(s.end-s.start),p=o?.value??si(n,d),u=ni(e,d),f=x=>x===null?null:Te(a.bottom-x/e.valueTop*(a.bottom-a.top));return{x:o?.x??i,at:d,actual:p,ideal:u,actualY:f(p),idealY:f(u),dot:o}},si=(e,t)=>{const a=e.findIndex(i=>i.at>=t),s=e[a];if(!s)return null;if(s.at===t)return s.value;const n=e[a-1];return n?Te(n.value+(s.value-n.value)*(t-n.at)/(s.at-n.at)):null},ni=(e,t)=>{const a=e.idealSpan;return a===null||t<a.at||t>a.due?null:Te(a.value*(a.due-t)/(a.due-a.at))},M=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,_a={circle:B(Ws),lightbulb:B(Qs),flag:B(Js),play:B(Ks),clock:B(js),eye:B(Zs),pause:B(Vs),check:B(Gs),x:B(qs)},ii=B(Hs),ri=e=>{if(e>=1)return _a.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
2
  <circle cx="12" cy="12" r="10"></circle>
3
- ${e>0?R`<circle
3
+ ${e>0?O`<circle
4
4
  class="si-pie"
5
5
  cx="12"
6
6
  cy="12"
@@ -8,14 +8,14 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
8
8
  stroke-dasharray=${`${e*t} ${t}`}
9
9
  transform="rotate(-90 12 12)"
10
10
  ></circle>`:m}
11
- </svg>`},re=e=>{const t=e===void 0?Kn():e.icon==="progress"?qn(e.progress??1):fa[e.icon]();return l`<span class="status-icon">${t}</span>`},va=(e,t)=>e.length===0?m:l`<span class="status-bar" role="img" aria-label=${t}>
11
+ </svg>`},re=e=>{const t=e===void 0?ii():e.icon==="progress"?ri(e.progress??1):_a[e.icon]();return l`<span class="status-icon">${t}</span>`},Ia=(e,t)=>e.length===0?m:l`<span class="status-bar" role="img" aria-label=${t}>
12
12
  ${e.map(a=>l`<span
13
13
  class="status-bar-part"
14
14
  data-status=${a.id}
15
15
  title=${`${a.name}: ${a.count}`}
16
- style=${`${I(a.tone)};flex-grow:${a.count}`}
16
+ style=${`${M(a.tone)};flex-grow:${a.count}`}
17
17
  ></span>`)}
18
- </span>`,lt=K`
18
+ </span>`,bt=q`
19
19
  .status-icon {
20
20
  display: block;
21
21
  flex: none;
@@ -45,7 +45,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
45
45
  .status-bar-part[data-status=''] {
46
46
  background: color-mix(in srgb, var(--dpk-ink-faint) 30%, transparent);
47
47
  }
48
- `,Wn=K`
48
+ `,oi=q`
49
49
  :host {
50
50
  position: relative;
51
51
  display: block;
@@ -178,40 +178,40 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
178
178
  .bd-swatch[data-line='ideal'] {
179
179
  border-top: 1.5px dashed var(--dpk-ink-faint);
180
180
  }
181
- `;class jn extends qe{static{this.styles=[Wn]}static{this.properties={points:{attribute:!1},due:{attribute:!1},now:{attribute:!1},size:{attribute:!1},tone:{attribute:!1},label:{attribute:!1},readout:{state:!0}}}#n=new We(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=he(this.#n.locale),a=Yn(this.points,this.due,this.now,this.size),{size:s}=a,n=this.points.at(-1)?.value??0;return l`<div
181
+ `;class di extends Qe{static{this.styles=[oi]}static{this.properties={points:{attribute:!1},due:{attribute:!1},now:{attribute:!1},size:{attribute:!1},tone:{attribute:!1},label:{attribute:!1},readout:{state:!0}}}#i=new et(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=ge(this.#i.locale),a=Zn(this.points,this.due,this.now,this.size),{size:s}=a,n=this.points.at(-1)?.value??0;return l`<div
182
182
  class="bd-plot"
183
183
  tabindex="0"
184
184
  role="img"
185
185
  aria-label=${t.chartAria(this.label,n)}
186
- style=${I(this.tone)}
186
+ style=${M(this.tone)}
187
187
  @pointermove=${i=>this.#e(a,i)}
188
188
  @pointerleave=${()=>this.readout=null}
189
189
  @focus=${()=>this.#a(a,a.dots.length-1)}
190
190
  @blur=${()=>this.readout=null}
191
- @keydown=${i=>this.#s(a,i)}
191
+ @keydown=${i=>this.#n(a,i)}
192
192
  >
193
193
  <svg class="bd-svg" viewBox=${`0 0 ${s.width} ${s.height}`} aria-hidden="true">
194
- ${Xn(t,a)} ${Zn(a)} ${this.readout?Jn(a,this.readout):m}
194
+ ${li(t,a)} ${pi(a)} ${this.readout?ci(a,this.readout):m}
195
195
  </svg>
196
- ${this.readout?Qn(t,a,this.readout):m}
197
- </div>`}#e(t,a){const s=this.renderRoot.querySelector("svg")?.getBoundingClientRect();!s||s.width===0||(this.readout=ba(t,(a.clientX-s.left)/s.width*t.size.width))}#a(t,a){const s=t.dots[a];this.readout=s?ba(t,s.x):null}#s(t,a){const s=t.dots.length-1,n=t.dots.findIndex(r=>r===this.readout?.dot),i=(()=>{switch(a.key){case"ArrowLeft":return Math.max(0,(n===-1?s:n)-1);case"ArrowRight":return Math.min(s,(n===-1?s:n)+1);case"Home":return 0;case"End":return s;default:return null}})();i!==null&&(a.preventDefault(),this.#a(t,i))}}const Xn=(e,t)=>{const{plot:a,size:s}=t,n=s.height-8;return R`
198
- ${t.yTicks.map(i=>R`<line class="bd-grid-line" x1=${a.left} x2=${a.right} y1=${i.y} y2=${i.y}></line>
196
+ ${this.readout?ui(t,a,this.readout):m}
197
+ </div>`}#e(t,a){const s=this.renderRoot.querySelector("svg")?.getBoundingClientRect();!s||s.width===0||(this.readout=Aa(t,(a.clientX-s.left)/s.width*t.size.width))}#a(t,a){const s=t.dots[a];this.readout=s?Aa(t,s.x):null}#n(t,a){const s=t.dots.length-1,n=t.dots.findIndex(r=>r===this.readout?.dot),i=(()=>{switch(a.key){case"ArrowLeft":return Math.max(0,(n===-1?s:n)-1);case"ArrowRight":return Math.min(s,(n===-1?s:n)+1);case"Home":return 0;case"End":return s;default:return null}})();i!==null&&(a.preventDefault(),this.#a(t,i))}}const li=(e,t)=>{const{plot:a,size:s}=t,n=s.height-8;return O`
198
+ ${t.yTicks.map(i=>O`<line class="bd-grid-line" x1=${a.left} x2=${a.right} y1=${i.y} y2=${i.y}></line>
199
199
  <text class="bd-tick" x=${a.left-6} y=${i.y} text-anchor="end" dominant-baseline="middle">${i.value}</text>`)}
200
- ${t.xTicks.map(i=>R`<line class="bd-grid-line" data-axis="x" x1=${i.x} x2=${i.x} y1=${a.top} y2=${a.bottom}></line>
200
+ ${t.xTicks.map(i=>O`<line class="bd-grid-line" data-axis="x" x1=${i.x} x2=${i.x} y1=${a.top} y2=${a.bottom}></line>
201
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?m:R`<line class="bd-due" x1=${t.dueX} x2=${t.dueX} y1=${a.top} y2=${a.bottom}></line>
202
+ ${t.dueX===null||t.idealSpan===null?m:O`<line class="bd-due" x1=${t.dueX} x2=${t.dueX} y1=${a.top} y2=${a.bottom}></line>
203
203
  <text class="bd-marker" data-marker="due" x=${t.dueX-4} y=${a.top+10} text-anchor="end">${`${e.chartDue} ${e.axisDate(t.idealSpan.due,"day")}`}</text>`}
204
204
  <line class="bd-now" x1=${t.nowX} x2=${t.nowX} y1=${a.top} y2=${a.bottom}></line>
205
205
  <text class="bd-marker" data-marker="today" x=${t.nowX+4} y=${a.top+10} text-anchor="start">${e.chartToday}</text>
206
- `},Zn=e=>R`
207
- ${e.ideal?R`<line class="bd-ideal" x1=${e.ideal.x1} y1=${e.ideal.y1} x2=${e.ideal.x2} y2=${e.ideal.y2}></line>`:m}
206
+ `},pi=e=>O`
207
+ ${e.ideal?O`<line class="bd-ideal" x1=${e.ideal.x1} y1=${e.ideal.y1} x2=${e.ideal.x2} y2=${e.ideal.y2}></line>`:m}
208
208
  <polyline class="bd-line" points=${e.line}></polyline>
209
- ${e.dots.map(t=>R`<circle class="bd-dot" data-now=${t.snapshotId===void 0?"true":m} cx=${t.x} cy=${t.y} r="3.5"></circle>`)}
210
- `,Jn=(e,t)=>R`
209
+ ${e.dots.map(t=>O`<circle class="bd-dot" data-now=${t.snapshotId===void 0?"true":m} cx=${t.x} cy=${t.y} r="3.5"></circle>`)}
210
+ `,ci=(e,t)=>O`
211
211
  <line class="bd-cross" x1=${t.x} x2=${t.x} y1=${e.plot.top} y2=${e.plot.bottom}></line>
212
- ${t.idealY===null?m:R`<circle class="bd-mark" data-line="ideal" cx=${t.x} cy=${t.idealY} r="3.5"></circle>`}
213
- ${t.actualY===null?m:R`<circle class="bd-mark" data-line="actual" cx=${t.x} cy=${t.actualY} r="4.5"></circle>`}
214
- `,Qn=(e,t,a)=>{const{size:s,plot:n}=t,i=a.x>s.width*.6?"left":"right",r=a.dot?a.dot.snapshotId===void 0?`${e.chartNow} \xB7 ${le(a.dot.at)}`:le(a.dot.at):e.axisDate(a.at,"day");return l`<div
212
+ ${t.idealY===null?m:O`<circle class="bd-mark" data-line="ideal" cx=${t.x} cy=${t.idealY} r="3.5"></circle>`}
213
+ ${t.actualY===null?m:O`<circle class="bd-mark" data-line="actual" cx=${t.x} cy=${t.actualY} r="4.5"></circle>`}
214
+ `,ui=(e,t,a)=>{const{size:s,plot:n}=t,i=a.x>s.width*.6?"left":"right",r=a.dot?a.dot.snapshotId===void 0?`${e.chartNow} \xB7 ${le(a.dot.at)}`:le(a.dot.at):e.axisDate(a.at,"day");return l`<div
215
215
  class="bd-tip"
216
216
  data-testid="usm-chart-readout"
217
217
  data-side=${i}
@@ -224,7 +224,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
224
224
  ${a.ideal===null?m:l`<span class="bd-tip-row" data-line="ideal"
225
225
  ><span class="bd-swatch" data-line="ideal"></span>${e.chartIdeal}<b>${a.ideal}</b></span
226
226
  >`}
227
- </div>`},ei=()=>{customElements.get("dpk-internal-usm-burndown-chart")||customElements.define("dpk-internal-usm-burndown-chart",jn)},ti=new Intl.Segmenter(void 0,{granularity:"grapheme"}),pt=e=>{const[t]=ti.segment(e.trim());return t?t.segment.toUpperCase():"?"},ai={github:R`<path fill-rule="evenodd" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>`,gitlab:R`<path d="M8 15 1.2 9.9a.7.7 0 0 1-.25-.78L2.7 2.6a.35.35 0 0 1 .66 0L5.1 7.6h5.8l1.74-5a.35.35 0 0 1 .66 0l1.75 6.52a.7.7 0 0 1-.25.78z"></path>`,jira:R`<path d="M14.6 7.4 8.6 1.4 8 .8 3.5 5.3 1.4 7.4a.85.85 0 0 0 0 1.2l4.1 4.1L8 15.2l4.5-4.5.07-.07 2.03-2.03a.85.85 0 0 0 0-1.2zM8 9.9 5.9 8 8 5.9 10.1 8z"></path>`,linear:R`<path d="M1.2 9.4a6.9 6.9 0 0 0 5.4 5.4zM1 7.3l7.7 7.7a7 7 0 0 0 1.9-.5L1.5 5.4a7 7 0 0 0-.5 1.9zm1.2-3.1 9.6 9.6a7 7 0 0 0 1.2-1.1L3.3 3a7 7 0 0 0-1.1 1.2zM4.3 2.3a7 7 0 1 1 9.4 9.4z"></path>`,figma:R`<path d="M5.5 1h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm2.3 0h2.3a2.3 2.3 0 1 1 0 4.6H7.8zm2.3 4.6a2.3 2.3 0 1 1 0 4.6 2.3 2.3 0 0 1 0-4.6zM5.5 5.6h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm0 4.6h2.3v2.3a2.3 2.3 0 1 1-2.3-2.3z"></path>`,notion:R`<path fill-rule="evenodd" d="M2.5 1.6 11 1c1 0 1.3.1 2 .6l2.1 1.5c.4.3.5.4.5.7v9.6c0 .7-.3 1.1-1.1 1.2l-9.4.6c-.6 0-.9-.1-1.2-.5L1.9 12c-.3-.5-.5-.8-.5-1.3V2.8c0-.6.3-1.1 1.1-1.2zM5 4.4v8.9l8.6-.5V4zm1 1.2 2.9-.2 3 4.7V5.6l-.8-.1v-.5l2-.1v.6l-.6.1v6.1l-.9.1-3.5-5.4v4.9l.8.2v.5l-2.3.1v-.5l.6-.2V6.4l-.8-.1z"></path>`},ya=e=>e==="web"?gs():l`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${ai[e]}</svg>`,ka=K`
227
+ </div>`},mi=()=>{customElements.get("dpk-internal-usm-burndown-chart")||customElements.define("dpk-internal-usm-burndown-chart",di)},hi=new Intl.Segmenter(void 0,{granularity:"grapheme"}),ft=e=>{const[t]=hi.segment(e.trim());return t?t.segment.toUpperCase():"?"},gi={github:O`<path fill-rule="evenodd" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>`,gitlab:O`<path d="M8 15 1.2 9.9a.7.7 0 0 1-.25-.78L2.7 2.6a.35.35 0 0 1 .66 0L5.1 7.6h5.8l1.74-5a.35.35 0 0 1 .66 0l1.75 6.52a.7.7 0 0 1-.25.78z"></path>`,jira:O`<path d="M14.6 7.4 8.6 1.4 8 .8 3.5 5.3 1.4 7.4a.85.85 0 0 0 0 1.2l4.1 4.1L8 15.2l4.5-4.5.07-.07 2.03-2.03a.85.85 0 0 0 0-1.2zM8 9.9 5.9 8 8 5.9 10.1 8z"></path>`,linear:O`<path d="M1.2 9.4a6.9 6.9 0 0 0 5.4 5.4zM1 7.3l7.7 7.7a7 7 0 0 0 1.9-.5L1.5 5.4a7 7 0 0 0-.5 1.9zm1.2-3.1 9.6 9.6a7 7 0 0 0 1.2-1.1L3.3 3a7 7 0 0 0-1.1 1.2zM4.3 2.3a7 7 0 1 1 9.4 9.4z"></path>`,figma:O`<path d="M5.5 1h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm2.3 0h2.3a2.3 2.3 0 1 1 0 4.6H7.8zm2.3 4.6a2.3 2.3 0 1 1 0 4.6 2.3 2.3 0 0 1 0-4.6zM5.5 5.6h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm0 4.6h2.3v2.3a2.3 2.3 0 1 1-2.3-2.3z"></path>`,notion:O`<path fill-rule="evenodd" d="M2.5 1.6 11 1c1 0 1.3.1 2 .6l2.1 1.5c.4.3.5.4.5.7v9.6c0 .7-.3 1.1-1.1 1.2l-9.4.6c-.6 0-.9-.1-1.2-.5L1.9 12c-.3-.5-.5-.8-.5-1.3V2.8c0-.6.3-1.1 1.1-1.2zM5 4.4v8.9l8.6-.5V4zm1 1.2 2.9-.2 3 4.7V5.6l-.8-.1v-.5l2-.1v.6l-.6.1v6.1l-.9.1-3.5-5.4v4.9l.8.2v.5l-2.3.1v-.5l.6-.2V6.4l-.8-.1z"></path>`},Ma=e=>e==="web"?Es():l`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${gi[e]}</svg>`,La=q`
228
228
  .link-mark {
229
229
  fill: currentColor;
230
230
  }
@@ -266,7 +266,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
266
266
  text-overflow: ellipsis;
267
267
  white-space: nowrap;
268
268
  }
269
- `,ce=e=>{const t=ue(e);return e.statuses.map((a,s)=>({id:a.id,name:a.name,tone:a.tone,icon:a.icon,progress:wa(s,t)}))},wa=(e,t)=>t<=0?1:Math.min(1,e/t),xa=(e,t)=>e.find(a=>a.id===t.statusId),$a=(e,t)=>ce(e).map(a=>({...a,count:t.filter(s=>s.statusId===a.id).length})).filter(a=>a.count>0),si=C(Fs),ni=C(Ms),ii=3,ri=K`
269
+ `,ce=e=>{const t=me(e);return e.statuses.map((a,s)=>({id:a.id,name:a.name,tone:a.tone,icon:a.icon,progress:Da(s,t)}))},Da=(e,t)=>t<=0?1:Math.min(1,e/t),Ra=(e,t)=>e.find(a=>a.id===t.statusId),Oa=(e,t)=>ce(e).map(a=>({...a,count:t.filter(s=>s.statusId===a.id).length})).filter(a=>a.count>0),bi=B(en),fi=B(Fs),vi=3,yi=q`
270
270
  /*
271
271
  * The card wears its status's color the way a modern board does: a flat,
272
272
  * barely tinted face and a hairline edge in that hue, with a neutral, soft
@@ -447,6 +447,18 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
447
447
  min-width: 0;
448
448
  }
449
449
 
450
+ /* The key people call the story by, quiet like a ticket number. */
451
+ .card-key {
452
+ flex: none;
453
+ color: var(--dpk-ink-faint);
454
+ font-family: var(--dpk-mono);
455
+ font-size: 10.5px;
456
+ font-weight: 600;
457
+ line-height: 18px;
458
+ font-variant-numeric: tabular-nums;
459
+ white-space: nowrap;
460
+ }
461
+
450
462
  .card-chip {
451
463
  display: inline-flex;
452
464
  align-items: center;
@@ -477,8 +489,8 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
477
489
 
478
490
  /* The counts sit at the right end of the foot, the kept comments first. */
479
491
  .card-chip[data-kind='comments'],
480
- .card-chip[data-kind='review']:first-child,
481
- .card-chip[data-kind='step'] + .card-chip[data-kind='review'] {
492
+ .card-chip:not([data-kind='comments']) + .card-chip[data-kind='review'],
493
+ .card-key + .card-chip[data-kind='review'] {
482
494
  margin-left: auto;
483
495
  }
484
496
 
@@ -593,26 +605,27 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
593
605
  border-color: color-mix(in oklab, var(--card-tone) 16%, var(--dpk-rule));
594
606
  background: var(--dpk-paper-raised);
595
607
  }
596
- `;class oi extends qe{static{this.styles=[bs,lt,ka,ri]}static{this.properties={story:{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}}}#n=new We(this);constructor(){super(),this.story=null,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}render(){const t=this.story;if(!t)return m;const a=he(this.#n.locale),s=t.comments?.length??0,n=this.stepName!==""||s>0||this.reviewCount>0;return l`
608
+ `;class ki extends Qe{static{this.styles=[Ts,bt,La,yi]}static{this.properties={story:{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}}}#i=new et(this);constructor(){super(),this.story=null,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}render(){const t=this.story;if(!t)return m;const a=ge(this.#i.locale),s=t.comments?.length??0;return l`
597
609
  <div class="card-head">
598
610
  ${this.statuses.length===0?m:this.#e(a,t)}
599
611
  <div class="card-name"><span>${t.name}</span></div>
600
612
  ${this.estimate||this.assignee?this.#a(a):m}
601
613
  </div>
602
- ${t.description?l`<div class="card-text" @click=${li}>${fs(vs(t.description))}</div>`:m}
603
- ${this.blocks>0||this.waits>0?this.#s(a):m}
604
- ${this.labels.length>0?di(this.labels):m}
614
+ ${t.description?l`<div class="card-text" @click=${xi}>${As(_s(t.description))}</div>`:m}
615
+ ${this.blocks>0||this.waits>0?this.#n(a):m}
616
+ ${this.labels.length>0?wi(this.labels):m}
605
617
  ${t.links&&t.links.length>0?this.#t(t.links):m}
606
- ${n?l`<div class="card-foot">
607
- ${this.stepName===""?m:l`<span class="card-chip" data-kind="step"><span>${this.stepName}</span></span>`}
608
- ${s>0?l`<span class="card-chip" data-kind="comments" aria-label=${a.commentCountAria(s)}>
609
- ${ys()}<span>${s}</span>
610
- </span>`:m}
611
- ${this.reviewCount>0?l`<span class="card-chip" data-kind="review" aria-label=${a.reviewCountAria(this.reviewCount)}>
612
- ${bt()}<span>${this.reviewCount}</span>
613
- </span>`:m}
614
- </div>`:m}
615
- `}#e(t,a){const s=xa(this.statuses,a);if(!s)return m;const n=s.name;return l`<span class="card-status" role="img" aria-label=${t.storyStatusAria(n)} title=${n}>
618
+ <div class="card-foot">
619
+ <span class="card-key">${ze(t)}</span>
620
+ ${this.stepName===""?m:l`<span class="card-chip" data-kind="step"><span>${this.stepName}</span></span>`}
621
+ ${s>0?l`<span class="card-chip" data-kind="comments" aria-label=${a.commentCountAria(s)}>
622
+ ${Is()}<span>${s}</span>
623
+ </span>`:m}
624
+ ${this.reviewCount>0?l`<span class="card-chip" data-kind="review" aria-label=${a.reviewCountAria(this.reviewCount)}>
625
+ ${Et()}<span>${this.reviewCount}</span>
626
+ </span>`:m}
627
+ </div>
628
+ `}#e(t,a){const s=Ra(this.statuses,a);if(!s)return m;const n=s.name;return l`<span class="card-status" role="img" aria-label=${t.storyStatusAria(n)} title=${n}>
616
629
  ${re(s)}
617
630
  </span>`}#a(t){const{estimate:a,assignee:s}=this;return l`<span class="card-meta">
618
631
  ${a?l`<span
@@ -622,19 +635,19 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
622
635
  >`:m}
623
636
  ${s?l`<span
624
637
  class="assignee-avatar"
625
- style=${I(s.tone)}
638
+ style=${M(s.tone)}
626
639
  title=${t.assigneeChipTitle(s.name)}
627
- >${pt(s.name)}</span
640
+ >${ft(s.name)}</span
628
641
  >`:m}
629
- </span>`}#s(t){return l`<div class="card-deps">
642
+ </span>`}#n(t){return l`<div class="card-deps">
630
643
  ${this.blocks>0?l`<span class="dep-chip" data-kind="blocks" title=${t.blocksChipTitle(this.blocks)}
631
- >${si()}${t.blocksChip(this.blocks)}</span
644
+ >${bi()}${t.blocksChip(this.blocks)}</span
632
645
  >`:m}
633
646
  ${this.waits>0?l`<span class="dep-chip" data-kind="waits" title=${t.waitsChipTitle(this.waits)}
634
- >${ni()}${t.waitsChip(this.waits)}</span
647
+ >${fi()}${t.waitsChip(this.waits)}</span
635
648
  >`:m}
636
- </div>`}#t(t){const a=t.slice(0,ii);return l`<div class="card-links">
637
- ${a.map(s=>{const n=Ne(s.url);return l`<a
649
+ </div>`}#t(t){const a=t.slice(0,vi);return l`<div class="card-links">
650
+ ${a.map(s=>{const n=Pe(s.url);return l`<a
638
651
  class="link-chip"
639
652
  data-kind=${n.kind}
640
653
  href=${s.url}
@@ -644,12 +657,12 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
644
657
  draggable="false"
645
658
  tabindex="-1"
646
659
  @click=${i=>i.stopPropagation()}
647
- >${ya(n.kind)}<span>${s.label??n.text}</span></a
660
+ >${Ma(n.kind)}<span>${s.label??n.text}</span></a
648
661
  >`})}
649
662
  ${t.length>a.length?l`<span class="link-chip">+${t.length-a.length}</span>`:m}
650
- </div>`}}const di=e=>l`<div class="card-labels">
651
- ${e.map(t=>l`<span class="label-chip" data-label=${t.id} style=${I(t.tone)}>${t.name}</span>`)}
652
- </div>`,li=e=>{e.target instanceof Element&&e.target.closest("a")&&e.stopPropagation()},pi=()=>{customElements.get("dpk-internal-usm-story-card")||customElements.define("dpk-internal-usm-story-card",oi)},Ea=e=>{const t=e.slice(0,-1).map(Yt),a=t.reduce((n,i)=>n+i,0),s=t.map(n=>a>0?n/a*te:te/t.length);return s.slice(0,-1).map((n,i)=>s.slice(0,i+1).reduce((r,o)=>r+o,0))},Sa=(e,t,a)=>{if(t<0||t>=e.length)return e;const s=e[t-1]??0,n=e[t+1]??te;return e.map((i,r)=>r===t?Math.min(n,Math.max(s,Math.round(a))):i)},Ue=e=>[...e,te].map((t,a)=>t-(e[a-1]??0)),ci=(e,t)=>{const a=Ue(t.map(s=>Math.round(s)));return e.slice(0,-1).flatMap((s,n)=>{const i=a[n]??0;return s.weight===i?[]:[{statusId:s.id,weight:i}]})},ui=K`
663
+ </div>`}}const wi=e=>l`<div class="card-labels">
664
+ ${e.map(t=>l`<span class="label-chip" data-label=${t.id} style=${M(t.tone)}>${t.name}</span>`)}
665
+ </div>`,xi=e=>{e.target instanceof Element&&e.target.closest("a")&&e.stopPropagation()},$i=()=>{customElements.get("dpk-internal-usm-story-card")||customElements.define("dpk-internal-usm-story-card",ki)},Na=e=>{const t=e.slice(0,-1).map(qt),a=t.reduce((n,i)=>n+i,0),s=t.map(n=>a>0?n/a*ae:ae/t.length);return s.slice(0,-1).map((n,i)=>s.slice(0,i+1).reduce((r,o)=>r+o,0))},Ca=(e,t,a)=>{if(t<0||t>=e.length)return e;const s=e[t-1]??0,n=e[t+1]??ae;return e.map((i,r)=>r===t?Math.min(n,Math.max(s,Math.round(a))):i)},Ve=e=>[...e,ae].map((t,a)=>t-(e[a-1]??0)),Si=(e,t)=>{const a=Ve(t.map(s=>Math.round(s)));return e.slice(0,-1).flatMap((s,n)=>{const i=a[n]??0;return s.weight===i?[]:[{statusId:s.id,weight:i}]})},Ei=q`
653
666
  :host {
654
667
  display: block;
655
668
  }
@@ -795,58 +808,58 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
795
808
  transition: none;
796
809
  }
797
810
  }
798
- `;class mi extends qe{static{this.styles=[lt,ui]}static{this.properties={statuses:{attribute:!1},dividers:{attribute:!1},commit:{attribute:!1},drag:{state:!0}}}#n=new We(this);constructor(){super(),this.statuses=[],this.dividers=[],this.commit=()=>{},this.drag=null}disconnectedCallback(){super.disconnectedCallback(),this.#o()}render(){const t=he(this.#n.locale),a=this.statuses.slice(0,-1),s=this.statuses.at(-1);if(!s||a.length===0)return m;const n=this.drag?.dividers??this.dividers,i=Ue(n),r=o=>`${o/te*100}%`;return l`<div class="wb">
811
+ `;class Ti extends Qe{static{this.styles=[bt,Ei]}static{this.properties={statuses:{attribute:!1},dividers:{attribute:!1},commit:{attribute:!1},drag:{state:!0}}}#i=new et(this);constructor(){super(),this.statuses=[],this.dividers=[],this.commit=()=>{},this.drag=null}disconnectedCallback(){super.disconnectedCallback(),this.#d()}render(){const t=ge(this.#i.locale),a=this.statuses.slice(0,-1),s=this.statuses.at(-1);if(!s||a.length===0)return m;const n=this.drag?.dividers??this.dividers,i=Ve(n),r=o=>`${o/ae*100}%`;return l`<div class="wb">
799
812
  <div class="wb-track" role="group" aria-label=${t.statusWeightLabel} ?data-dragging=${this.drag!==null}>
800
813
  <div class="wb-parts">
801
814
  ${a.map((o,d)=>{const p=n[d-1]??0,u=i[d]??0;return l`<span
802
815
  class="wb-part"
803
816
  data-part=${o.id}
804
- title=${`${o.name} ${ze(u)}`}
805
- style=${`${I(o.tone)}; left: ${r(p)}; width: ${r(u)}`}
817
+ title=${`${o.name} ${Ke(u)}`}
818
+ style=${`${M(o.tone)}; left: ${r(p)}; width: ${r(u)}`}
806
819
  >
807
- <span class="wb-name">${o.name}</span><span class="wb-value">${ze(u)}</span>
820
+ <span class="wb-name">${o.name}</span><span class="wb-value">${Ke(u)}</span>
808
821
  </span>`})}
809
822
  </div>
810
823
  ${n.map((o,d)=>this.#e(t,a,n,d,r(o)))}
811
824
  </div>
812
- <span class="wb-end" data-end style=${I(s.tone)}>${re(s)}${s.name}</span>
825
+ <span class="wb-end" data-end style=${M(s.tone)}>${re(s)}${s.name}</span>
813
826
  <div class="wb-scale" aria-hidden="true">
814
- ${Array.from({length:te-1},(o,d)=>l`<span class="wb-tick" style=${`left: ${r(d+1)}`}></span>`)}
827
+ ${Array.from({length:ae-1},(o,d)=>l`<span class="wb-tick" style=${`left: ${r(d+1)}`}></span>`)}
815
828
  <span class="wb-scale-end" data-at="0">0</span>
816
- <span class="wb-scale-end" data-at="max">${te}</span>
829
+ <span class="wb-scale-end" data-at="max">${ae}</span>
817
830
  </div>
818
- </div>`}#e(t,a,s,n,i){const r=a[n]?.name??"",o=a[n+1]?.name??"",d=Ue(s),p=s[n]??0;return l`<span
831
+ </div>`}#e(t,a,s,n,i){const r=a[n]?.name??"",o=a[n+1]?.name??"",d=Ve(s),p=s[n]??0;return l`<span
819
832
  class="wb-line"
820
833
  role="slider"
821
834
  tabindex="0"
822
835
  style=${`left: ${i}`}
823
836
  aria-label=${t.weightLineLabel(r,o)}
824
837
  aria-valuemin=${String(s[n-1]??0)}
825
- aria-valuemax=${String(s[n+1]??te)}
838
+ aria-valuemax=${String(s[n+1]??ae)}
826
839
  aria-valuenow=${String(p)}
827
- aria-valuetext=${t.weightLineValue(r,ze(d[n]??0),o,ze(d[n+1]??0))}
840
+ aria-valuetext=${t.weightLineValue(r,Ke(d[n]??0),o,Ke(d[n+1]??0))}
828
841
  ?data-active=${this.drag?.index===n}
829
842
  @keydown=${u=>this.#a(u,n)}
830
- @pointerdown=${u=>this.#s(u,n)}
831
- ></span>`}#a(t,a){const s=this.dividers[a]??0,n=(()=>{switch(t.key){case"ArrowLeft":case"ArrowDown":return s-1;case"ArrowRight":case"ArrowUp":return s+1;case"Home":return 0;case"End":return te;default:return null}})();n!==null&&(t.preventDefault(),this.#d(Sa(this.dividers,a,n)))}#s(t,a){t.button===0&&(t.preventDefault(),t.currentTarget instanceof HTMLElement&&t.currentTarget.focus({preventScroll:!0}),this.drag={index:a,dividers:this.dividers},document.addEventListener("pointermove",this.#t),document.addEventListener("pointerup",this.#i),document.addEventListener("pointercancel",this.#r))}#t=t=>{const a=this.renderRoot.querySelector(".wb-track")?.getBoundingClientRect();if(!this.drag||!a||a.width===0)return;const s=(t.clientX-a.left)/a.width*te;this.drag={...this.drag,dividers:Sa(this.drag.dividers,this.drag.index,s)}};#i=()=>{const t=this.drag?.dividers;this.#o(),t&&this.#d(t)};#r=()=>this.#o();#o(){this.drag=null,document.removeEventListener("pointermove",this.#t),document.removeEventListener("pointerup",this.#i),document.removeEventListener("pointercancel",this.#r)}#d(t){t.some((a,s)=>a!==this.dividers[s])&&this.commit(t)}}const ze=e=>String(Math.round(e*10)/10),hi=()=>{customElements.get("dpk-internal-usm-weight-bar")||customElements.define("dpk-internal-usm-weight-bar",mi)},gi=(e,t,a)=>{const s=e.at(-1)??null;if(t===null||a==="end")return s;const n=e.indexOf(t);return n<0?s:a==="after"?t:n===0?null:e.at(n-1)??null},Ta=(e,t,a,s,n)=>{const i=Re(e,t.stepId,t.milestoneId).map(r=>r.id);return{type:"MOVE_STORY",target:{type:"story",id:a},payload:{activityId:t.activityId,stepId:t.stepId,milestoneId:t.milestoneId??null,after:fe(i,a,s,n)}}},Aa=(e,t,a,s,n,i)=>{const r=S(e,s);if(!r||r.activityId!==t)return null;const o=Dt(e,t,a).map(d=>d.id);return{type:"MOVE_STORY",target:{type:"story",id:s},payload:{activityId:t,stepId:r.stepId,milestoneId:a??null,after:fe(o,s,n,i)}}},_a=(e,t,a,s,n)=>{const i=Re(e,s,n).filter(r=>r.id!==t);return{type:"MOVE_STORY",target:{type:"story",id:t},payload:{activityId:a,stepId:s,milestoneId:n??null,after:i.at(-1)?.id??null}}},Ia=(e,t,a,s)=>e.includes(t)?{type:"REORDER_MILESTONE",target:{type:"milestone",id:t},payload:{after:fe(e,t,a,s)}}:null,bi=(e,t,a,s)=>e.includes(t)?{type:"REORDER_ACTIVITY",target:{type:"activity",id:t},payload:{after:fe(e,t,a,s)}}:null,fi=(e,t,a,s)=>{const n=M(e,t);if(!n)return null;const i=a===null?void 0:M(e,a);if(a!==null&&i?.activity.id!==n.activity.id)return null;const r=n.activity.id,o=n.activity.steps.map(u=>ee(r,u.id)),d=ee(r,n.step.id),p=i?ee(r,i.step.id):null;return{type:"REORDER_STEP",target:{type:"step",id:d},payload:{after:fe(o,d,p,s)}}},vi=e=>{const t=e.stories.length;return{rows:e.labels.map((s,n)=>{const i=e.stories.filter(r=>r.labelIds?.includes(s.id)).length;return{id:s.id,name:s.name,tone:s.tone,previousId:e.labels[n-1]?.id??null,nextId:e.labels[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},yi=e=>{const t=e.stories.length;return{rows:e.members.map((s,n)=>{const i=e.stories.filter(r=>r.assigneeId===s.id).length;return{id:s.id,name:s.name,tone:s.tone,previousId:e.members[n-1]?.id??null,nextId:e.members[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},ki=e=>{const t=e.stories.length,a=De(e);return e.milestones.map((s,n)=>{const i=e.stories.filter(o=>o.milestoneId===s.id),r=new Set(i.map(o=>o.stepId));return{id:s.id,ordinal:n+1,name:s.name,timeframe:s.timeframe?.trim()??"",description:s.description?.trim()??"",storyCount:i.length,share:t===0?0:i.length/t,coverage:{covered:a.filter(({step:o})=>r.has(o.id)).length,total:a.length},progress:$a(e,i)}})},Ma=(e,t)=>{const a=Math.max(e.left,t.left),s=Math.max(e.top,t.top),n=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height);return n>a&&i>s?{left:a,top:s,width:n-a,height:i-s}:null},wi=(e,t)=>{const a=t.flatMap(d=>{const p=Ma(e,d);return p?[p]:[]});if(!a[0])return null;const n=Math.min(...a.map(d=>d.left)),i=Math.min(...a.map(d=>d.top)),r=Math.max(...a.map(d=>d.left+d.width)),o=Math.max(...a.map(d=>d.top+d.height));return{box:{left:n,top:i,width:r-n,height:o-i},parts:t.map(d=>Ma(e,d)?{left:d.left-n,top:d.top-i,width:d.width,height:d.height}:null)}},xi=(e,t,a)=>{const s=e.dataTransfer;if(!s)return;const n=wi(a.getBoundingClientRect(),t.map(d=>d.getBoundingClientRect()));if(!n)return;const{box:i}=n,r=document.createElement("div");r.style.cssText=["position: fixed",`left: ${i.left}px`,`top: ${i.top}px`,`width: ${i.width}px`,`height: ${i.height}px`,"overflow: hidden","pointer-events: none","z-index: 2147483647",`background: ${getComputedStyle(a).backgroundColor}`].join("; ");for(const[d,p]of t.entries()){const u=n.parts[d],y=Pe(p);!u||!(y instanceof HTMLElement)||(y.style.position="absolute",y.style.left=`${u.left}px`,y.style.top=`${u.top}px`,y.style.width=`${u.width}px`,y.style.height=`${u.height}px`,y.style.margin="0",y.style.boxSizing="border-box",r.append(y))}const o=a.getRootNode();(o instanceof ShadowRoot?o:document.body).append(r),s.setDragImage(r,e.clientX-i.left,e.clientY-i.top),setTimeout(()=>r.remove(),0)},Pe=e=>{if(e instanceof Element&&e.shadowRoot)return $i(e,e.shadowRoot);const t=e.cloneNode(!1);t instanceof Element&&t.removeAttribute("id");for(const a of e.childNodes)t.appendChild(Pe(a));return t},$i=(e,t)=>{const a=document.createElement("span");for(const r of e.attributes)r.name!=="id"&&a.setAttribute(r.name,r.value);const s=getComputedStyle(e),n=e.getBoundingClientRect();a.style.display=s.display==="inline"?"inline-block":s.display,a.style.width=`${n.width}px`,a.style.height=`${n.height}px`,a.style.boxSizing="border-box",a.style.flex="none",a.style.verticalAlign=s.verticalAlign;const i=a.attachShadow({mode:"open"});"adoptedStyleSheets"in t&&(i.adoptedStyleSheets=t.adoptedStyleSheets);for(const r of t.childNodes)i.appendChild(Pe(r));for(const r of e.childNodes)a.appendChild(Pe(r));return a},La=(e,t)=>{const a=j("new-activity",q(t.state));if(!t.dispatch({type:"ADD_ACTIVITY",target:{type:"page",id:"usm"},payload:{id:a,name:e.newActivityName}}).ok)return;const n=j("new-step",[...q(t.state),a]);t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:n,name:e.newStepName}}),t.navigate({activity:a,step:null,story:null})},Ei=(e,t,a)=>{const s=j("new-step",q(t.state));t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:s,name:e.newStepName}})},Da=(e,t)=>{const a=j("new-milestone",q(t.state));t.dispatch({type:"ADD_MILESTONE",target:{type:"page",id:"usm"},payload:{id:a,name:e.newMilestoneName}})},Ra=(e,t,a,s,n)=>{const i=j("new-story",q(t.state));t.dispatch({type:"ADD_STORY",target:{type:"step",id:s},payload:{id:i,name:e.newStoryName,activityId:a,...n===void 0?{}:{milestoneId:n}}}).ok&&t.navigate({activity:a,step:s,story:i})},Si=(e,t)=>{const a=j("new-status",q(t.state));t.dispatch({type:"ADD_STATUS",target:{type:"page",id:"usm"},payload:{id:a,name:e.newStatusName,tone:at(t.state.statuses.length)}})},Ti=(e,t)=>{const a=j("new-label",q(t.state));t.dispatch({type:"ADD_LABEL",target:{type:"page",id:"usm"},payload:{id:a,name:e.newLabelName,tone:Me(t.state.labels.length)}})},Ai=(e,t)=>{const a=j("new-member",q(t.state));t.dispatch({type:"ADD_MEMBER",target:{type:"page",id:"usm"},payload:{id:a,name:e.newMemberName,tone:Me(t.state.members.length)}})},_i=(e,t)=>{const a=j("new-estimate",q(t.state)),s=Math.max(0,...t.state.estimates.map(n=>n.points))+1;t.dispatch({type:"ADD_ESTIMATE",target:{type:"page",id:"usm"},payload:{id:a,name:e.newEstimateName,points:s}})},Ii=(e,t)=>{const a=j(`snapshot-${t.toISOString().slice(0,10)}`,q(e.state));e.dispatch({type:"RECORD_SNAPSHOT",target:{type:"page",id:"usm"},payload:{id:a,at:t.toISOString(),tally:Pt(e.state)}})},Oa=(e,t)=>{const a=s=>t.stories.filter(n=>n.milestoneId===s).length;return[...t.milestones.map(({id:s,name:n,timeframe:i})=>({id:s,name:n,timeframe:i?.trim()??"",storyCount:a(s)})),{id:void 0,name:e.unassigned,timeframe:"",storyCount:a(void 0)}]},Mi=(e,t)=>l`
843
+ @pointerdown=${u=>this.#n(u,n)}
844
+ ></span>`}#a(t,a){const s=this.dividers[a]??0,n=(()=>{switch(t.key){case"ArrowLeft":case"ArrowDown":return s-1;case"ArrowRight":case"ArrowUp":return s+1;case"Home":return 0;case"End":return ae;default:return null}})();n!==null&&(t.preventDefault(),this.#o(Ca(this.dividers,a,n)))}#n(t,a){t.button===0&&(t.preventDefault(),t.currentTarget instanceof HTMLElement&&t.currentTarget.focus({preventScroll:!0}),this.drag={index:a,dividers:this.dividers},document.addEventListener("pointermove",this.#t),document.addEventListener("pointerup",this.#s),document.addEventListener("pointercancel",this.#r))}#t=t=>{const a=this.renderRoot.querySelector(".wb-track")?.getBoundingClientRect();if(!this.drag||!a||a.width===0)return;const s=(t.clientX-a.left)/a.width*ae;this.drag={...this.drag,dividers:Ca(this.drag.dividers,this.drag.index,s)}};#s=()=>{const t=this.drag?.dividers;this.#d(),t&&this.#o(t)};#r=()=>this.#d();#d(){this.drag=null,document.removeEventListener("pointermove",this.#t),document.removeEventListener("pointerup",this.#s),document.removeEventListener("pointercancel",this.#r)}#o(t){t.some((a,s)=>a!==this.dividers[s])&&this.commit(t)}}const Ke=e=>String(Math.round(e*10)/10),Ai=()=>{customElements.get("dpk-internal-usm-weight-bar")||customElements.define("dpk-internal-usm-weight-bar",Ti)},_i=(e,t,a)=>{const s=e.at(-1)??null;if(t===null||a==="end")return s;const n=e.indexOf(t);return n<0?s:a==="after"?t:n===0?null:e.at(n-1)??null},Ba=(e,t,a,s,n)=>{const i=Ye(e,t.stepId,t.milestoneId).map(r=>r.id);return{type:"MOVE_STORY",target:{type:"story",id:a},payload:{activityId:t.activityId,stepId:t.stepId,milestoneId:t.milestoneId??null,after:xe(i,a,s,n)}}},Ya=(e,t,a,s,n,i)=>{const r=E(e,s);if(!r||r.activityId!==t)return null;const o=Pt(e,t,a).map(d=>d.id);return{type:"MOVE_STORY",target:{type:"story",id:s},payload:{activityId:t,stepId:r.stepId,milestoneId:a??null,after:xe(o,s,n,i)}}},Ua=(e,t,a,s,n)=>{const i=Ye(e,s,n).filter(r=>r.id!==t);return{type:"MOVE_STORY",target:{type:"story",id:t},payload:{activityId:a,stepId:s,milestoneId:n??null,after:i.at(-1)?.id??null}}},za=(e,t,a,s)=>e.includes(t)?{type:"REORDER_MILESTONE",target:{type:"milestone",id:t},payload:{after:xe(e,t,a,s)}}:null,Ii=(e,t,a,s)=>e.includes(t)?{type:"REORDER_ACTIVITY",target:{type:"activity",id:t},payload:{after:xe(e,t,a,s)}}:null,Mi=(e,t,a,s)=>{const n=L(e,t);if(!n)return null;const i=a===null?void 0:L(e,a);if(a!==null&&i?.activity.id!==n.activity.id)return null;const r=n.activity.id,o=n.activity.steps.map(u=>te(r,u.id)),d=te(r,n.step.id),p=i?te(r,i.step.id):null;return{type:"REORDER_STEP",target:{type:"step",id:d},payload:{after:xe(o,d,p,s)}}},Li=e=>{const t=e.stories.length;return{rows:e.labels.map((s,n)=>{const i=e.stories.filter(r=>r.labelIds?.includes(s.id)).length;return{id:s.id,name:s.name,tone:s.tone,previousId:e.labels[n-1]?.id??null,nextId:e.labels[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},Di=e=>{const t=e.stories.length;return{rows:e.members.map((s,n)=>{const i=e.stories.filter(r=>r.assigneeId===s.id).length;return{id:s.id,name:s.name,tone:s.tone,previousId:e.members[n-1]?.id??null,nextId:e.members[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},Ri=e=>{const t=e.stories.length,a=Be(e);return e.milestones.map((s,n)=>{const i=e.stories.filter(o=>o.milestoneId===s.id),r=new Set(i.map(o=>o.stepId));return{id:s.id,ordinal:n+1,name:s.name,timeframe:s.timeframe?.trim()??"",description:s.description?.trim()??"",storyCount:i.length,share:t===0?0:i.length/t,coverage:{covered:a.filter(({step:o})=>r.has(o.id)).length,total:a.length},progress:Oa(e,i)}})},Pa=(e,t)=>{const a=Math.max(e.left,t.left),s=Math.max(e.top,t.top),n=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height);return n>a&&i>s?{left:a,top:s,width:n-a,height:i-s}:null},Oi=(e,t)=>{const a=t.flatMap(d=>{const p=Pa(e,d);return p?[p]:[]});if(!a[0])return null;const n=Math.min(...a.map(d=>d.left)),i=Math.min(...a.map(d=>d.top)),r=Math.max(...a.map(d=>d.left+d.width)),o=Math.max(...a.map(d=>d.top+d.height));return{box:{left:n,top:i,width:r-n,height:o-i},parts:t.map(d=>Pa(e,d)?{left:d.left-n,top:d.top-i,width:d.width,height:d.height}:null)}},Ni=(e,t,a)=>{const s=e.dataTransfer;if(!s)return;const n=Oi(a.getBoundingClientRect(),t.map(d=>d.getBoundingClientRect()));if(!n)return;const{box:i}=n,r=document.createElement("div");r.style.cssText=["position: fixed",`left: ${i.left}px`,`top: ${i.top}px`,`width: ${i.width}px`,`height: ${i.height}px`,"overflow: hidden","pointer-events: none","z-index: 2147483647",`background: ${getComputedStyle(a).backgroundColor}`].join("; ");for(const[d,p]of t.entries()){const u=n.parts[d],f=qe(p);!u||!(f instanceof HTMLElement)||(f.style.position="absolute",f.style.left=`${u.left}px`,f.style.top=`${u.top}px`,f.style.width=`${u.width}px`,f.style.height=`${u.height}px`,f.style.margin="0",f.style.boxSizing="border-box",r.append(f))}const o=a.getRootNode();(o instanceof ShadowRoot?o:document.body).append(r),s.setDragImage(r,e.clientX-i.left,e.clientY-i.top),setTimeout(()=>r.remove(),0)},qe=e=>{if(e instanceof Element&&e.shadowRoot)return Ci(e,e.shadowRoot);const t=e.cloneNode(!1);t instanceof Element&&t.removeAttribute("id");for(const a of e.childNodes)t.appendChild(qe(a));return t},Ci=(e,t)=>{const a=document.createElement("span");for(const r of e.attributes)r.name!=="id"&&a.setAttribute(r.name,r.value);const s=getComputedStyle(e),n=e.getBoundingClientRect();a.style.display=s.display==="inline"?"inline-block":s.display,a.style.width=`${n.width}px`,a.style.height=`${n.height}px`,a.style.boxSizing="border-box",a.style.flex="none",a.style.verticalAlign=s.verticalAlign;const i=a.attachShadow({mode:"open"});"adoptedStyleSheets"in t&&(i.adoptedStyleSheets=t.adoptedStyleSheets);for(const r of t.childNodes)i.appendChild(qe(r));for(const r of e.childNodes)a.appendChild(qe(r));return a},Fa=(e,t)=>{const a=X("new-activity",W(t.state));if(!t.dispatch({type:"ADD_ACTIVITY",target:{type:"page",id:"usm"},payload:{id:a,name:e.newActivityName}}).ok)return;const n=X("new-step",[...W(t.state),a]);t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:n,name:e.newStepName}}),t.navigate({activity:a,step:null,story:null})},Bi=(e,t,a)=>{const s=X("new-step",W(t.state));t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:s,name:e.newStepName}})},Ga=(e,t)=>{const a=X("new-milestone",W(t.state));t.dispatch({type:"ADD_MILESTONE",target:{type:"page",id:"usm"},payload:{id:a,name:e.newMilestoneName}})},Ha=(e,t,a,s,n)=>{const i=X("new-story",W(t.state));t.dispatch({type:"ADD_STORY",target:{type:"step",id:s},payload:{id:i,name:e.newStoryName,activityId:a,...n===void 0?{}:{milestoneId:n},number:Jt(t.base,t.state)}}).ok&&t.navigate({activity:a,step:s,story:i})},Yi=(e,t)=>{const a=X("new-status",W(t.state));t.dispatch({type:"ADD_STATUS",target:{type:"page",id:"usm"},payload:{id:a,name:e.newStatusName,tone:lt(t.state.statuses.length)}})},Ui=(e,t)=>{const a=X("new-label",W(t.state));t.dispatch({type:"ADD_LABEL",target:{type:"page",id:"usm"},payload:{id:a,name:e.newLabelName,tone:Ne(t.state.labels.length)}})},zi=(e,t)=>{const a=X("new-member",W(t.state));t.dispatch({type:"ADD_MEMBER",target:{type:"page",id:"usm"},payload:{id:a,name:e.newMemberName,tone:Ne(t.state.members.length)}})},Pi=(e,t)=>{const a=X("new-estimate",W(t.state)),s=Math.max(0,...t.state.estimates.map(n=>n.points))+1;t.dispatch({type:"ADD_ESTIMATE",target:{type:"page",id:"usm"},payload:{id:a,name:e.newEstimateName,points:s}})},Fi=(e,t)=>{const a=X(`snapshot-${t.toISOString().slice(0,10)}`,W(e.state));e.dispatch({type:"RECORD_SNAPSHOT",target:{type:"page",id:"usm"},payload:{id:a,at:t.toISOString(),tally:Xt(e.state)}})},Va=(e,t)=>{const a=s=>t.stories.filter(n=>n.milestoneId===s).length;return[...t.milestones.map(({id:s,name:n,timeframe:i,questions:r})=>({id:s,name:n,timeframe:i?.trim()??"",storyCount:a(s),...r===void 0?{}:{questions:r}})),{id:void 0,name:e.unassigned,timeframe:"",storyCount:a(void 0)}]},Gi=(e,t)=>l`
832
845
  <div class="empty">
833
846
  <h2>${e.emptyTitle}</h2>
834
847
  <p>${e.emptyBody}</p>
835
- <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>La(e,t)}>
848
+ <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>Fa(e,t)}>
836
849
  ${e.firstActivityButton}
837
850
  </button>
838
851
  </div>
839
- `,Li=e=>{const{m:t,context:a}=e,s=De(a.state);return s.length===0?Mi(t,a):Na(a)==="activity"?Ri(e,s):Oi(e)},Na=e=>e.navigation.view==="group"?"group":"activity",Di=(e,t)=>{const a=Na(t);return l`<div class="segmented view-tabs" role="tablist" aria-label=${e.groupingLabel}>
840
- ${Ca(t,"activity",a,e.activityGroup)}
841
- ${Ca(t,"group",a,e.groupViewTab)}
842
- </div>`},Ca=(e,t,a,s)=>{const n=t===a;return l`<a
852
+ `,Hi=e=>{const{m:t,context:a}=e,s=Be(a.state);return s.length===0?Gi(t,a):Ka(a)==="activity"?Ki(e,s):qi(e)},Ka=e=>e.navigation.view==="group"?"group":"activity",Vi=(e,t)=>{const a=Ka(t);return l`<div class="segmented view-tabs" role="tablist" aria-label=${e.groupingLabel}>
853
+ ${qa(t,"activity",a,e.activityGroup)}
854
+ ${qa(t,"group",a,e.groupViewTab)}
855
+ </div>`},qa=(e,t,a,s)=>{const n=t===a;return l`<a
843
856
  class="tab"
844
857
  role="tab"
845
858
  data-current=${String(n)}
846
859
  aria-selected=${n?"true":"false"}
847
860
  href=${e.hashFor({view:t})}
848
861
  >${s}</a
849
- >`},Ri=(e,t)=>{const{m:a,context:s}=e,{state:n}=s,i=Oa(a,n);return l`
862
+ >`},Ki=(e,t)=>{const{m:a,context:s}=e,{state:n}=s,i=Va(a,n);return l`
850
863
  <div class="map-scroll">
851
864
  <div class="map" style=${`--cols:${t.length+1}`} data-testid="usm-map">
852
865
  <div class="map-head">
@@ -854,61 +867,62 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
854
867
  <div class="corner">
855
868
  <span class="dpk-label">${a.groupAxisHeader}</span>
856
869
  </div>
857
- ${B(n.activities,r=>r.id,r=>Ya(e,r.id,`grid-column: span ${Math.max(r.steps.length,1)}`))}
858
- ${za(a,s)}
870
+ ${Y(n.activities,r=>r.id,r=>ja(e,r.id,`grid-column: span ${Math.max(r.steps.length,1)}`))}
871
+ ${Za(a,s)}
859
872
  </div>
860
873
  <div class="map-row">
861
- ${Ba(a)}
862
- ${B(t,({activity:r,step:o})=>`${r.id}.${o.id}`,({activity:r,step:o})=>Ni(e,r.id,o))}
874
+ ${Wa(a)}
875
+ ${Y(t,({activity:r,step:o})=>`${r.id}.${o.id}`,({activity:r,step:o})=>Wi(e,r.id,o))}
863
876
  <div class="corner"><span class="dpk-label">—</span></div>
864
877
  </div>
865
878
  </div>
866
- ${B(i,r=>r.id,r=>Fa(e,r,l`${B(t,({activity:o,step:d})=>`${o.id}.${d.id}`,({activity:o,step:d})=>Bi(e,{activityId:o.id,stepId:d.id,milestoneId:r.id}))}`))}
867
- ${Pa(a,s,t.length)}
879
+ ${Y(i,r=>r.id,r=>Qa(e,r,l`${Y(t,({activity:o,step:d})=>`${o.id}.${d.id}`,({activity:o,step:d})=>Xi(e,{activityId:o.id,stepId:d.id,milestoneId:r.id}))}`))}
880
+ ${Ja(a,s,t.length)}
868
881
  </div>
869
882
  </div>
870
- `},Oi=e=>{const{m:t,context:a}=e,{state:s}=a,n=Oa(t,s);return l`
883
+ `},qi=e=>{const{m:t,context:a}=e,{state:s}=a,n=Va(t,s);return l`
871
884
  <div class="map-scroll">
872
885
  <div class="map" style=${`--cols:${s.activities.length+1}`} data-testid="usm-map-group">
873
886
  <div class="map-head">
874
887
  <div class="map-row">
875
- ${Ba(t)}
876
- ${B(s.activities,i=>i.id,i=>Ya(e,i.id,void 0,!0))}
877
- ${za(t,a)}
888
+ ${Wa(t)}
889
+ ${Y(s.activities,i=>i.id,i=>ja(e,i.id,void 0,!0))}
890
+ ${Za(t,a)}
878
891
  </div>
879
892
  </div>
880
- ${B(n,i=>i.id,i=>Fa(e,i,l`${B(s.activities,r=>r.id,r=>Yi(e,r.id,i.id))}`))}
881
- ${Pa(t,a,s.activities.length)}
893
+ ${Y(n,i=>i.id,i=>Qa(e,i,l`${Y(s.activities,r=>r.id,r=>Zi(e,r.id,i.id))}`))}
894
+ ${Ja(t,a,s.activities.length)}
882
895
  </div>
883
896
  </div>
884
- `},Ba=e=>l`<div class="corner">
897
+ `},Wa=e=>l`<div class="corner">
885
898
  <span class="dpk-label">${e.activityAxis}</span>
886
899
  <span class="dpk-label">${e.milestoneAxis}</span>
887
- </div>`,Ya=(e,t,a,s=!1)=>{const{m:n,context:i,drag:r}=e,{state:o}=i,d=o.activities.find(b=>b.id===t);if(!d)return l`<div class="act-head"></div>`;const p=o.stories.filter(b=>b.activityId===d.id),u=$a(o,p),y=r.combine("activity",Fe(e,d.id)),E=r.source({type:"activity",id:d.id});return l`
900
+ </div>`,ja=(e,t,a,s=!1)=>{const{m:n,context:i,drag:r}=e,{state:o}=i,d=o.activities.find(v=>v.id===t);if(!d)return l`<div class="act-head"></div>`;const p=o.stories.filter(v=>v.activityId===d.id),u=Oa(o,p),f=r.combine("activity",We(e,d.id)),x=r.source({type:"activity",id:d.id});return l`
888
901
  <div
889
902
  class="act-head"
890
903
  style=${a??""}
891
904
  data-activity=${d.id}
892
905
  data-column=${d.id}
893
906
  data-dpk-target=${_({type:"activity",id:d.id})}
907
+ data-grill-questions=${Le(Ie(d.questions))}
894
908
  draggable="true"
895
909
  data-col-dragging=${String(r.isDragging("activity",d.id))}
896
- data-col-drop=${Ge(r,d.id)}
897
- @dragstart=${b=>{qa(b,d.id),E.dragstart(b)}}
898
- @dragend=${E.dragend}
899
- @dragenter=${y.dragenter}
900
- @dragover=${y.dragover}
901
- @dragleave=${y.dragleave}
902
- @drop=${y.drop}
910
+ data-col-drop=${je(r,d.id)}
911
+ @dragstart=${v=>{ns(v,d.id),x.dragstart(v)}}
912
+ @dragend=${x.dragend}
913
+ @dragenter=${f.dragenter}
914
+ @dragover=${f.dragover}
915
+ @dragleave=${f.dragleave}
916
+ @drop=${f.drop}
903
917
  >
904
918
  <div class="act-title">
905
- <span class="col-grip" aria-hidden="true">${je()}</span>
919
+ <span class="col-grip" aria-hidden="true">${tt()}</span>
906
920
  <span class="act-name">
907
921
  <dpk-component-inline-edit
908
922
  draggable="false"
909
923
  .value=${d.name}
910
924
  .label=${n.activityNameLabel}
911
- @dpk-commit=${X(b=>i.dispatch({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:d.id},payload:{name:b}}))}
925
+ @dpk-commit=${Z(v=>i.dispatch({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:d.id},payload:{name:v}}))}
912
926
  ></dpk-component-inline-edit>
913
927
  <span class="act-actor" data-empty=${String(d.actor===void 0)}>
914
928
  <dpk-component-inline-edit
@@ -917,7 +931,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
917
931
  .value=${d.actor??""}
918
932
  .label=${n.activityActorLabel}
919
933
  .placeholder=${n.activityActorLabel}
920
- @dpk-commit=${X(b=>i.dispatch({type:"SET_ACTIVITY_ACTOR",target:{type:"activity",id:d.id},payload:{actor:b}}))}
934
+ @dpk-commit=${Z(v=>i.dispatch({type:"SET_ACTIVITY_ACTOR",target:{type:"activity",id:d.id},payload:{actor:v}}))}
921
935
  ></dpk-component-inline-edit>
922
936
  </span>
923
937
  </span>
@@ -926,17 +940,17 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
926
940
  class="dpk-icon-btn"
927
941
  type="button"
928
942
  aria-label=${n.addStepAria}
929
- @click=${()=>Ei(n,i,d.id)}
943
+ @click=${()=>Bi(n,i,d.id)}
930
944
  >
931
- ${ks()}
945
+ ${Ms()}
932
946
  </button>
933
947
  </div>
934
- ${va(u,n.progressAria(u.map(b=>`${b.name} ${b.count}`).join(", ")))}
948
+ ${Ia(u,n.progressAria(u.map(v=>`${v.name} ${v.count}`).join(", ")))}
935
949
  ${s&&d.steps.length>0?l`<ol class="act-steps">
936
- ${d.steps.map(b=>l`<li>${b.name}</li>`)}
950
+ ${d.steps.map(v=>l`<li>${v.name}</li>`)}
937
951
  </ol>`:m}
938
952
  </div>
939
- `},Ni=(e,t,a)=>{const{m:s,context:n,drag:i}=e,r=ee(t,a.id),o=i.combine("step",Fe(e,t,a.id)),d=i.source({type:"step",id:r});return l`
953
+ `},Wi=(e,t,a)=>{const{m:s,context:n,drag:i}=e,r=te(t,a.id),o=i.combine("step",We(e,t,a.id)),d=i.source({type:"step",id:r});return l`
940
954
  <div
941
955
  class="col-head"
942
956
  data-step=${r}
@@ -944,43 +958,44 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
944
958
  data-column-step=${a.id}
945
959
  data-current=${String(n.navigation.step===a.id)}
946
960
  data-dpk-target=${_({type:"step",id:r})}
961
+ data-grill-questions=${Le(Ie(a.questions))}
947
962
  draggable="true"
948
- data-col-dragging=${String(ct(i,t,a.id))}
949
- data-col-drop=${Ge(i,t,a.id)}
950
- data-step-edge=${Ua(n.state,t,a.id)}
951
- @dragstart=${p=>{qa(p,t,a.id),d.dragstart(p)}}
963
+ data-col-dragging=${String(vt(i,t,a.id))}
964
+ data-col-drop=${je(i,t,a.id)}
965
+ data-step-edge=${Xa(n.state,t,a.id)}
966
+ @dragstart=${p=>{ns(p,t,a.id),d.dragstart(p)}}
952
967
  @dragend=${d.dragend}
953
968
  @dragenter=${o.dragenter}
954
969
  @dragover=${o.dragover}
955
970
  @dragleave=${o.dragleave}
956
971
  @drop=${o.drop}
957
972
  >
958
- <span class="col-grip" aria-hidden="true">${je()}</span>
973
+ <span class="col-grip" aria-hidden="true">${tt()}</span>
959
974
  <h4>
960
975
  <dpk-component-inline-edit
961
976
  draggable="false"
962
977
  .value=${a.name}
963
978
  .label=${s.stepNameLabel}
964
- @dpk-commit=${X(p=>n.dispatch({type:"SET_STEP_NAME",target:{type:"step",id:a.id},payload:{name:p}}))}
979
+ @dpk-commit=${Z(p=>n.dispatch({type:"SET_STEP_NAME",target:{type:"step",id:a.id},payload:{name:p}}))}
965
980
  @click=${p=>p.stopPropagation()}
966
981
  ></dpk-component-inline-edit>
967
982
  </h4>
968
- <span class="count">${Rt(n.state,a.id)}</span>
983
+ <span class="count">${Ft(n.state,a.id)}</span>
969
984
  </div>
970
- `},Fe=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=n.target({key:`activity:${t}`,accepts:"activity",hovered:Ka(t),onDrop:y=>i.dropOnActivity(y)});if(a===void 0)return[["activity",r]];const o=n.item;if(o?.type==="step"&&M(s.state,o.id)?.activity.id!==t)return[["activity",r]];const p=ee(t,a),u=n.target({key:`step:${p}`,accepts:"step",hovered:Ka(p),onDrop:y=>i.dropOnStep(y)});return[["activity",r],["step",u]]},Ge=(e,t,a)=>e.isOver(`activity:${t}`)?"activity":a!==void 0&&e.isOver(`step:${ee(t,a)}`)?"step":"none",Ua=(e,t,a)=>{const s=e.activities.find(n=>n.id===t)?.steps??[];return[s[0]?.id===a?"first":"",s.at(-1)?.id===a?"last":""].filter(n=>n!=="").join(" ")},ct=(e,t,a)=>e.isDragging("activity",t)||a!==void 0&&e.isDragging("step",ee(t,a)),za=(e,t)=>l`<div class="act-head">
971
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>La(e,t)}>
985
+ `},We=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=n.target({key:`activity:${t}`,accepts:"activity",hovered:ss(t),onDrop:f=>i.dropOnActivity(f)});if(a===void 0)return[["activity",r]];const o=n.item;if(o?.type==="step"&&L(s.state,o.id)?.activity.id!==t)return[["activity",r]];const p=te(t,a),u=n.target({key:`step:${p}`,accepts:"step",hovered:ss(p),onDrop:f=>i.dropOnStep(f)});return[["activity",r],["step",u]]},je=(e,t,a)=>e.isOver(`activity:${t}`)?"activity":a!==void 0&&e.isOver(`step:${te(t,a)}`)?"step":"none",Xa=(e,t,a)=>{const s=e.activities.find(n=>n.id===t)?.steps??[];return[s[0]?.id===a?"first":"",s.at(-1)?.id===a?"last":""].filter(n=>n!=="").join(" ")},vt=(e,t,a)=>e.isDragging("activity",t)||a!==void 0&&e.isDragging("step",te(t,a)),Za=(e,t)=>l`<div class="act-head">
986
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Fa(e,t)}>
972
987
  ${e.newActivityButton}
973
988
  </button>
974
- </div>`,Pa=(e,t,a)=>l`<div class="map-row">
989
+ </div>`,Ja=(e,t,a)=>l`<div class="map-row">
975
990
  <div class="row-lead">
976
991
  <div class="row-head">
977
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Da(e,t)}>
992
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ga(e,t)}>
978
993
  ${e.newMilestoneButton}
979
994
  </button>
980
995
  </div>
981
996
  </div>
982
997
  ${Array.from({length:a+1},()=>l`<div class="cell"></div>`)}
983
- </div>`,Fa=(e,t,a)=>{const{m:s,context:n,drag:i,handlers:r}=e,o=t.id;if(o===void 0)return l`<div
998
+ </div>`,Qa=(e,t,a)=>{const{m:s,context:n,drag:i,handlers:r}=e,o=t.id;if(o===void 0)return l`<div
984
999
  class="map-row"
985
1000
  data-unassigned="true"
986
1001
  data-draggable="false"
@@ -989,11 +1004,11 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
989
1004
  >
990
1005
  <div class="row-lead">
991
1006
  <div class="row-head" data-milestone="" draggable="false"><span>${t.name}</span></div>
992
- ${Ga(s,t)}
1007
+ ${es(s,t)}
993
1008
  </div>
994
1009
  ${a}
995
1010
  <div class="cell"></div>
996
- </div>`;const d=Ci(s,n,o,t.name),p=`row:${o}`,u=i.target({key:p,accepts:"milestone",hovered:Fi,onDrop:E=>r.dropOnMilestoneRow(o,E)}),y=i.source({type:"milestone",id:o});return l`
1011
+ </div>`;const d=ji(s,n,o,t.name),p=`row:${o}`,u=i.target({key:p,accepts:"milestone",hovered:tr,onDrop:x=>r.dropOnMilestoneRow(o,x)}),f=i.source({type:"milestone",id:o});return l`
997
1012
  <div
998
1013
  class="map-row"
999
1014
  data-draggable="true"
@@ -1009,26 +1024,27 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1009
1024
  class="row-head"
1010
1025
  data-milestone=${o}
1011
1026
  data-dpk-target=${_({type:"milestone",id:o})}
1027
+ data-grill-questions=${Le(Ie(t.questions))}
1012
1028
  draggable="true"
1013
- @dragstart=${E=>{Pi(E),y.dragstart(E)}}
1014
- @dragend=${y.dragend}
1029
+ @dragstart=${x=>{er(x),f.dragstart(x)}}
1030
+ @dragend=${f.dragend}
1015
1031
  >
1016
- <span class="row-grip" aria-hidden="true">${je()}</span>${d}
1032
+ <span class="row-grip" aria-hidden="true">${tt()}</span>${d}
1017
1033
  </div>
1018
- ${Ga(s,t)}
1034
+ ${es(s,t)}
1019
1035
  </div>
1020
1036
  ${a}
1021
1037
  <div class="cell"></div>
1022
1038
  </div>
1023
- `},Ga=(e,t)=>l`<div class="row-meta">
1039
+ `},es=(e,t)=>l`<div class="row-meta">
1024
1040
  ${t.timeframe===""?m:l`<span class="row-timeframe">${t.timeframe}</span>`}
1025
1041
  <span class="row-count">${e.storyCount(t.storyCount)}</span>
1026
- </div>`,Ci=(e,t,a,s)=>l`<dpk-component-inline-edit
1042
+ </div>`,ji=(e,t,a,s)=>l`<dpk-component-inline-edit
1027
1043
  draggable="false"
1028
1044
  .value=${s}
1029
1045
  .label=${e.milestoneNameLabel}
1030
- @dpk-commit=${X(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:a},payload:{name:n}}))}
1031
- ></dpk-component-inline-edit>`,Bi=(e,t)=>{const{m:a,context:s,drag:n,handlers:i}=e,r=Be(s.state,s.navigation),o=Re(s.state,t.stepId,t.milestoneId).filter(u=>sa(r,u)),d=`cell:${t.stepId}:${t.milestoneId??""}`,p=n.combine("story",[["story",n.target({key:d,accepts:"story",hovered:Va,onDrop:u=>i.dropOnCell(t,u)})],...Fe(e,t.activityId,t.stepId)]);return l`
1046
+ @dpk-commit=${Z(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:a},payload:{name:n}}))}
1047
+ ></dpk-component-inline-edit>`,Xi=(e,t)=>{const{m:a,context:s,drag:n,handlers:i}=e,r=Ge(s.state,s.navigation),o=Ye(s.state,t.stepId,t.milestoneId).filter(u=>ha(r,u)),d=`cell:${t.stepId}:${t.milestoneId??""}`,p=n.combine("story",[["story",n.target({key:d,accepts:"story",hovered:as,onDrop:u=>i.dropOnCell(t,u)})],...We(e,t.activityId,t.stepId)]);return l`
1032
1048
  <div
1033
1049
  class="cell"
1034
1050
  data-step=${t.stepId}
@@ -1036,71 +1052,72 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1036
1052
  data-column=${t.activityId}
1037
1053
  data-column-step=${t.stepId}
1038
1054
  data-drop=${String(n.isOver(d))}
1039
- data-col-dragging=${String(ct(n,t.activityId,t.stepId))}
1040
- data-col-drop=${Ge(n,t.activityId,t.stepId)}
1041
- data-step-edge=${Ua(s.state,t.activityId,t.stepId)}
1055
+ data-col-dragging=${String(vt(n,t.activityId,t.stepId))}
1056
+ data-col-drop=${je(n,t.activityId,t.stepId)}
1057
+ data-step-edge=${Xa(s.state,t.activityId,t.stepId)}
1042
1058
  @dragenter=${p.dragenter}
1043
1059
  @dragover=${p.dragover}
1044
1060
  @dragleave=${p.dragleave}
1045
1061
  @drop=${p.drop}
1046
1062
  >
1047
1063
  <div class="card-list" data-testid=${`cell-${t.stepId}-${t.milestoneId??"unassigned"}`}>
1048
- ${B(o,u=>u.id,u=>Ha(e,u,""))}
1064
+ ${Y(o,u=>u.id,u=>ts(e,u,""))}
1049
1065
  </div>
1050
1066
  <button
1051
1067
  class="dpk-btn dpk-btn--ghost add-cell"
1052
1068
  type="button"
1053
1069
  title=${a.addStoryCellAria}
1054
- @click=${()=>Ra(a,s,t.activityId,t.stepId,t.milestoneId)}
1070
+ @click=${()=>Ha(a,s,t.activityId,t.stepId,t.milestoneId)}
1055
1071
  >
1056
1072
  ${a.addCellButton}
1057
1073
  </button>
1058
1074
  </div>
1059
- `},Yi=(e,t,a)=>{const{m:s,context:n,drag:i,handlers:r}=e,{state:o}=n,d=Be(o,n.navigation),p=Dt(o,t,a).filter(g=>sa(d,g)),u=o.activities.find(g=>g.id===t)?.steps??[],y=u[0],E=g=>u.find(ae=>ae.id===g)?.name??"",b=`group:${t}:${a??""}`,c=i.combine("story",[["story",i.target({key:b,accepts:"story",hovered:Va,onDrop:g=>r.dropOnGroupCell(t,a,g)})],...Fe(e,t)]);return l`
1075
+ `},Zi=(e,t,a)=>{const{m:s,context:n,drag:i,handlers:r}=e,{state:o}=n,d=Ge(o,n.navigation),p=Pt(o,t,a).filter(S=>ha(d,S)),u=o.activities.find(S=>S.id===t)?.steps??[],f=u[0],x=S=>u.find(ue=>ue.id===S)?.name??"",v=`group:${t}:${a??""}`,I=i.combine("story",[["story",i.target({key:v,accepts:"story",hovered:as,onDrop:S=>r.dropOnGroupCell(t,a,S)})],...We(e,t)]);return l`
1060
1076
  <div
1061
1077
  class="cell"
1062
1078
  data-activity=${t}
1063
1079
  data-milestone=${a??""}
1064
1080
  data-column=${t}
1065
- data-drop=${String(i.isOver(b))}
1066
- data-col-dragging=${String(ct(i,t))}
1067
- data-col-drop=${Ge(i,t)}
1068
- @dragenter=${c.dragenter}
1069
- @dragover=${c.dragover}
1070
- @dragleave=${c.dragleave}
1071
- @drop=${c.drop}
1081
+ data-drop=${String(i.isOver(v))}
1082
+ data-col-dragging=${String(vt(i,t))}
1083
+ data-col-drop=${je(i,t)}
1084
+ @dragenter=${I.dragenter}
1085
+ @dragover=${I.dragover}
1086
+ @dragleave=${I.dragleave}
1087
+ @drop=${I.drop}
1072
1088
  >
1073
1089
  <div class="card-list" data-testid=${`group-cell-${t}-${a??"unassigned"}`}>
1074
- ${B(p,g=>g.id,g=>Ha(e,g,E(g.stepId)))}
1090
+ ${Y(p,S=>S.id,S=>ts(e,S,x(S.stepId)))}
1075
1091
  </div>
1076
- ${y?l`<button
1092
+ ${f?l`<button
1077
1093
  class="dpk-btn dpk-btn--ghost add-cell"
1078
1094
  type="button"
1079
1095
  aria-label=${s.addStoryCellAria}
1080
- @click=${()=>Ra(s,n,t,y.id,a)}
1096
+ @click=${()=>Ha(s,n,t,f.id,a)}
1081
1097
  >
1082
1098
  ${s.addCellButton}
1083
1099
  </button>`:m}
1084
1100
  </div>
1085
- `},Ha=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=ce(s.state),o=n.source({type:"story",id:t.id}),d=Jt(s.state,t.id);return l`<dpk-internal-usm-story-card
1101
+ `},ts=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=ce(s.state),o=n.source({type:"story",id:t.id}),d=la(s.state,t.id);return l`<dpk-internal-usm-story-card
1086
1102
  data-story=${t.id}
1087
1103
  data-status=${t.statusId??""}
1088
- data-relation=${zi(s.state,s.navigation.story,t)??m}
1089
- data-highlight=${Ui(e.highlighted,t.id)??m}
1104
+ data-relation=${Qi(s.state,s.navigation.story,t)??m}
1105
+ data-highlight=${Ji(e.highlighted,t.id)??m}
1090
1106
  data-dpk-target=${_({type:"story",id:t.id})}
1107
+ data-grill-questions=${Le(Ie(t.questions))}
1091
1108
  draggable="true"
1092
1109
  tabindex="0"
1093
1110
  role="button"
1094
1111
  aria-haspopup="dialog"
1095
1112
  aria-label=${t.name}
1096
- style=${I(xa(r,t)?.tone)}
1113
+ style=${M(Ra(r,t)?.tone)}
1097
1114
  .story=${t}
1098
1115
  .stepName=${a}
1099
1116
  .statuses=${r}
1100
- .labels=${rn(s.state,t)}
1117
+ .labels=${vn(s.state,t)}
1101
1118
  .reviewCount=${s.commentCount({type:"story",id:t.id})}
1102
- .estimate=${Z(s.state,"estimates")?G(s.state,t.estimateId)??null:null}
1103
- .assignee=${Z(s.state,"assignees")?nn(s.state,t)??null:null}
1119
+ .estimate=${J(s.state,"estimates")?H(s.state,t.estimateId)??null:null}
1120
+ .assignee=${J(s.state,"assignees")?fn(s.state,t)??null:null}
1104
1121
  .blocks=${d.dependents.length}
1105
1122
  .waits=${d.openBlockers}
1106
1123
  @click=${()=>i.selectStory(t.id)}
@@ -1109,27 +1126,27 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1109
1126
  ?dragging=${n.isDragging("story",t.id)}
1110
1127
  @dragstart=${o.dragstart}
1111
1128
  @dragend=${o.dragend}
1112
- ></dpk-internal-usm-story-card>`},Ui=(e,t)=>{if(e!==null)return e.has(t)?"on":"dimmed"},zi=(e,t,a)=>{if(!(t===void 0||t===a.id))return a.blockedBy?.includes(t)?"dependent":e.stories.find(s=>s.id===t)?.blockedBy?.includes(a.id)?"blocker":void 0},Va=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},Pi=e=>{const a=(e.currentTarget instanceof Element?e.currentTarget:null)?.closest(".map-row");if(!a||!e.dataTransfer)return;const s=a.getBoundingClientRect();e.dataTransfer.setDragImage(a,e.clientX-s.left,e.clientY-s.top)},Ka=e=>t=>t.currentTarget instanceof Element?{id:e,element:t.currentTarget}:null,qa=(e,t,a)=>{const n=(e.currentTarget instanceof Element?e.currentTarget:null)?.closest(".map-scroll");if(!n)return;const i=[...n.querySelectorAll("[data-column]")].filter(d=>d.getAttribute("data-column")===t&&(a===void 0||d.getAttribute("data-column-step")===a)),r=i.filter(d=>d.closest(".map-head")),o=i.filter(d=>!d.closest(".map-head"));xi(e,[...o,...r],n)},Fi=e=>{const t=e.target instanceof Element?e.target.closest(".map-row"):null,a=t?.querySelector(".row-head[data-milestone]");if(!t||!a)return null;const s=a.getAttribute("data-milestone");return{id:s===""?null:s,element:t}},Gi=(e,t)=>ft((a,s)=>{const n=a.trim()===""?Number.NaN:Number(a);if(!Number.isFinite(n)||n<0){s.value=String(e);return}n!==e&&t(n)}),Hi=(e,t,a,s)=>l`
1129
+ ></dpk-internal-usm-story-card>`},Ji=(e,t)=>{if(e!==null)return e.has(t)?"on":"dimmed"},Qi=(e,t,a)=>{if(!(t===void 0||t===a.id))return a.blockedBy?.includes(t)?"dependent":e.stories.find(s=>s.id===t)?.blockedBy?.includes(a.id)?"blocker":void 0},as=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},er=e=>{const a=(e.currentTarget instanceof Element?e.currentTarget:null)?.closest(".map-row");if(!a||!e.dataTransfer)return;const s=a.getBoundingClientRect();e.dataTransfer.setDragImage(a,e.clientX-s.left,e.clientY-s.top)},ss=e=>t=>t.currentTarget instanceof Element?{id:e,element:t.currentTarget}:null,ns=(e,t,a)=>{const n=(e.currentTarget instanceof Element?e.currentTarget:null)?.closest(".map-scroll");if(!n)return;const i=[...n.querySelectorAll("[data-column]")].filter(d=>d.getAttribute("data-column")===t&&(a===void 0||d.getAttribute("data-column-step")===a)),r=i.filter(d=>d.closest(".map-head")),o=i.filter(d=>!d.closest(".map-head"));Ni(e,[...o,...r],n)},tr=e=>{const t=e.target instanceof Element?e.target.closest(".map-row"):null,a=t?.querySelector(".row-head[data-milestone]");if(!t||!a)return null;const s=a.getAttribute("data-milestone");return{id:s===""?null:s,element:t}},ar=(e,t)=>Tt((a,s)=>{const n=a.trim()===""?Number.NaN:Number(a);if(!Number.isFinite(n)||n<0){s.value=String(e);return}n!==e&&t(n)}),sr=(e,t,a,s)=>l`
1113
1130
  <section class="st-overview" data-testid="usm-statuses">
1114
1131
  ${a.rows.length===0?l`<div class="empty">
1115
1132
  <h2>${e.noStatusesTitle}</h2>
1116
1133
  <p>${e.noStatusesBody}</p>
1117
1134
  </div>`:m}
1118
1135
  <ol class="st-list">
1119
- ${B(a.rows,n=>n.id,n=>Vi(e,t,n,s))}
1136
+ ${Y(a.rows,n=>n.id,n=>nr(e,t,n,s))}
1120
1137
  </ol>
1121
1138
  <div>
1122
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Si(e,t)}>
1139
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Yi(e,t)}>
1123
1140
  ${e.newStatusButton}
1124
1141
  </button>
1125
1142
  </div>
1126
1143
  </section>
1127
- `,Vi=(e,t,a,s)=>{const n=s.openFor===a.id,i={type:"status",id:a.id},r=o=>{t.dispatch({type:"REORDER_STATUS",target:i,payload:{after:o}})};return l`
1144
+ `,nr=(e,t,a,s)=>{const n=s.openFor===a.id,i={type:"status",id:a.id},r=o=>{t.dispatch({type:"REORDER_STATUS",target:i,payload:{after:o}})};return l`
1128
1145
  <li
1129
1146
  class="st-row st-row--status"
1130
1147
  data-status=${a.id}
1131
1148
  data-dpk-target=${_(i)}
1132
- style=${I(a.tone)}
1149
+ style=${M(a.tone)}
1133
1150
  >
1134
1151
  <button
1135
1152
  class="st-icon-trigger"
@@ -1143,16 +1160,16 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1143
1160
  >
1144
1161
  ${re(a)}
1145
1162
  </button>
1146
- ${n?Ki(e,t,a,s):m}
1163
+ ${n?ir(e,t,a,s):m}
1147
1164
  <span class="st-name">
1148
1165
  <dpk-component-inline-edit
1149
1166
  .value=${a.name}
1150
1167
  .label=${e.statusNameLabel}
1151
- @dpk-commit=${X(o=>t.dispatch({type:"SET_STATUS_NAME",target:i,payload:{name:o}}))}
1168
+ @dpk-commit=${Z(o=>t.dispatch({type:"SET_STATUS_NAME",target:i,payload:{name:o}}))}
1152
1169
  ></dpk-component-inline-edit>
1153
1170
  </span>
1154
- ${mt(e,a.storyCount,a.share)}
1155
- ${ut(e,a.tone,o=>t.dispatch({type:"SET_STATUS_TONE",target:i,payload:{tone:o}}))}
1171
+ ${kt(e,a.storyCount,a.share)}
1172
+ ${yt(e,a.tone,o=>t.dispatch({type:"SET_STATUS_TONE",target:i,payload:{tone:o}}))}
1156
1173
  <label class="st-done" title=${e.doneStatusAria(a.name)}>
1157
1174
  <input
1158
1175
  type="radio"
@@ -1164,18 +1181,18 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1164
1181
  />
1165
1182
  <span aria-hidden="true">${e.doneStatusMark}</span>
1166
1183
  </label>
1167
- ${He(e,{ids:t.state.statuses.map(o=>o.id),row:a,deleteLabel:e.deleteStatusAria,reorder:r,remove:()=>t.dispatch({type:"DELETE_STATUS",target:i,payload:{}})})}
1184
+ ${Xe(e,{ids:t.state.statuses.map(o=>o.id),row:a,deleteLabel:e.deleteStatusAria,reorder:r,remove:()=>t.dispatch({type:"DELETE_STATUS",target:i,payload:{}})})}
1168
1185
  </li>
1169
- `},Ki=(e,t,a,s)=>l`<div
1186
+ `},ir=(e,t,a,s)=>l`<div
1170
1187
  id="icon-menu"
1171
1188
  class="comment-pop icon-menu"
1172
1189
  popover="manual"
1173
1190
  role="menu"
1174
1191
  aria-label=${e.statusIconLabel}
1175
- style=${I(a.tone)}
1192
+ style=${M(a.tone)}
1176
1193
  @keydown=${n=>{n.key==="Escape"&&(n.preventDefault(),s.close())}}
1177
1194
  >
1178
- ${wt.map(n=>l`<button
1195
+ ${It.map(n=>l`<button
1179
1196
  class="icon-option"
1180
1197
  type="button"
1181
1198
  role="menuitemradio"
@@ -1187,25 +1204,25 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1187
1204
  >
1188
1205
  ${re({icon:n,progress:a.progress})}
1189
1206
  </button>`)}
1190
- </div>`,ut=(e,t,a)=>l`<span class="st-tones" role="radiogroup" aria-label=${e.statusToneLabel}>
1191
- ${Ae.map(s=>l`<button
1207
+ </div>`,yt=(e,t,a)=>l`<span class="st-tones" role="radiogroup" aria-label=${e.statusToneLabel}>
1208
+ ${De.map(s=>l`<button
1192
1209
  class="st-tone"
1193
1210
  type="button"
1194
1211
  role="radio"
1195
1212
  data-tone=${s}
1196
- style=${I(s)}
1213
+ style=${M(s)}
1197
1214
  title=${e.toneName(s)}
1198
1215
  aria-label=${e.toneName(s)}
1199
1216
  aria-checked=${s===t?"true":"false"}
1200
1217
  @click=${()=>{s!==t&&a(s)}}
1201
1218
  ></button>`)}
1202
- </span>`,He=(e,t)=>l`<span class="st-tools">
1219
+ </span>`,Xe=(e,t)=>l`<span class="st-tools">
1203
1220
  <button
1204
1221
  class="dpk-icon-btn"
1205
1222
  type="button"
1206
1223
  aria-label=${e.moveUpAria}
1207
1224
  ?disabled=${t.row.previousId===null}
1208
- @click=${()=>t.reorder(qi(t.ids,t.row.previousId))}
1225
+ @click=${()=>t.reorder(rr(t.ids,t.row.previousId))}
1209
1226
  >
1210
1227
  ↑
1211
1228
  </button>
@@ -1219,42 +1236,42 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1219
1236
  ↓
1220
1237
  </button>
1221
1238
  <button class="dpk-icon-btn" type="button" data-role="delete" aria-label=${t.deleteLabel} @click=${t.remove}>
1222
- ${Te()}
1239
+ ${Me()}
1223
1240
  </button>
1224
- </span>`,qi=(e,t)=>{const a=t===null?-1:e.indexOf(t);return a<=0?null:e[a-1]??null},mt=(e,t,a)=>l`
1241
+ </span>`,rr=(e,t)=>{const a=t===null?-1:e.indexOf(t);return a<=0?null:e[a-1]??null},kt=(e,t,a)=>l`
1225
1242
  <span class="st-share">
1226
1243
  <span class="st-share-text">${e.statusShare(t,Math.round(a*100))}</span>
1227
1244
  <span class="st-meter" aria-hidden="true"><span style=${`width:${a*100}%`}></span></span>
1228
1245
  </span>
1229
- `,Wi=C(ws),ji=C(Hs),Xi={width:720,height:240,inset:{top:16,right:20,bottom:26,left:40}},Zi={width:340,height:150,inset:{top:12,right:14,bottom:24,left:32}},Ji=(e,t,a)=>{const{state:s,navigation:n}=t,i=ln(s,n),r=me(s);return l`
1246
+ `,or=B(Ls),dr=B(an),lr={width:720,height:240,inset:{top:16,right:20,bottom:26,left:40}},pr={width:340,height:150,inset:{top:12,right:14,bottom:24,left:32}},cr=(e,t,a)=>{const{state:s,navigation:n}=t,i=wn(s,n),r=he(s);return l`
1230
1247
  <section class="bd-overview" data-testid="usm-burndown">
1231
1248
  <header class="bd-bar">
1232
- ${i?Qi(e,t,i):m} ${er(e,t,r)}
1249
+ ${i?ur(e,t,i):m} ${mr(e,t,r)}
1233
1250
  ${i?l`<span class="bd-record">
1234
1251
  <button
1235
1252
  class="dpk-btn dpk-btn--primary"
1236
1253
  type="button"
1237
1254
  data-role="record-snapshot"
1238
1255
  title=${e.recordSnapshotHint}
1239
- @click=${()=>Ii(t,new Date)}
1256
+ @click=${()=>Fi(t,new Date)}
1240
1257
  >
1241
1258
  ${e.recordSnapshotButton}
1242
1259
  </button>
1243
1260
  </span>`:m}
1244
1261
  </header>
1245
- ${r==="stories"?m:tr(e,t,r)}
1246
- ${i?ar(e,t,i,r,a):l`<div class="empty">
1262
+ ${r==="stories"?m:hr(e,t,r)}
1263
+ ${i?gr(e,t,i,r,a):l`<div class="empty">
1247
1264
  <h2>${e.burndownTab}</h2>
1248
1265
  <p>${e.noMilestonesForBurndown}</p>
1249
1266
  </div>`}
1250
- <div class="bd-side">${sr(e,t)}</div>
1267
+ <div class="bd-side">${br(e,t)}</div>
1251
1268
  </section>
1252
- `},Qi=(e,t,a)=>{const{state:s}=t;return l`<label class="bd-control">
1269
+ `},ur=(e,t,a)=>{const{state:s}=t;return l`<label class="bd-control">
1253
1270
  <span>${e.burndownMilestoneLabel}</span>
1254
1271
  <select
1255
1272
  class="dpk-select"
1256
1273
  data-role="milestone"
1257
- @change=${xs(n=>t.navigate({milestone:n}))}
1274
+ @change=${Ds(n=>t.navigate({milestone:n}))}
1258
1275
  >
1259
1276
  ${s.milestones.map(n=>l`<option value=${n.id} ?selected=${n.id===a.id}>${n.name}</option>`)}
1260
1277
  </select>
@@ -1266,12 +1283,12 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1266
1283
  type="date"
1267
1284
  data-role="due-date"
1268
1285
  .value=${a.dueDate??""}
1269
- @change=${ft(n=>{const i=n===""?null:n;i!==(a.dueDate??null)&&t.dispatch({type:"SET_MILESTONE_DUE_DATE",target:{type:"milestone",id:a.id},payload:{dueDate:i}})})}
1286
+ @change=${Tt(n=>{const i=n===""?null:n;i!==(a.dueDate??null)&&t.dispatch({type:"SET_MILESTONE_DUE_DATE",target:{type:"milestone",id:a.id},payload:{dueDate:i}})})}
1270
1287
  />
1271
- </label>`},er=(e,t,a)=>l`<span class="bd-control">
1288
+ </label>`},mr=(e,t,a)=>l`<span class="bd-control">
1272
1289
  <span id="bd-measure-label">${e.measureLabel}</span>
1273
1290
  <span class="bd-measures" role="radiogroup" aria-labelledby="bd-measure-label">
1274
- ${xt.map(s=>l`<label class="bd-measure"
1291
+ ${Mt.map(s=>l`<label class="bd-measure"
1275
1292
  ><input
1276
1293
  type="radio"
1277
1294
  name="bd-measure"
@@ -1281,7 +1298,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1281
1298
  />${e.measureName(s)}</label
1282
1299
  >`)}
1283
1300
  </span>
1284
- </span>`,tr=(e,t,a)=>{const{state:s}=t,n=Bt(s),i=Ea(n),r=s.estimates.map(d=>`${d.name} ${d.points}`).join(" \xB7 "),o=Ue(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>
1301
+ </span>`,hr=(e,t,a)=>{const{state:s}=t,n=Kt(s),i=Na(n),r=s.estimates.map(d=>`${d.name} ${d.points}`).join(" \xB7 "),o=Ve(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>
1285
1302
  <summary class="bd-settings-summary">
1286
1303
  <span class="bd-settings-chevron" aria-hidden="true"></span>
1287
1304
  <span class="bd-settings-title">${e.measureSettingsLabel}</span>
@@ -1291,24 +1308,24 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1291
1308
  </span>
1292
1309
  </summary>
1293
1310
  <div class="bd-settings-body">
1294
- ${nr(e,t)} ${a==="weighted"?rr(e,t):m}
1311
+ ${fr(e,t)} ${a==="weighted"?yr(e,t):m}
1295
1312
  </div>
1296
- </details>`},ar=(e,t,a,s,n)=>{const{state:i}=t,r=cn(i,a.id,n.getTime()),o=s==="weighted",d=i.stories.filter(p=>p.milestoneId===a.id&&p.estimateId===void 0).length;return l`
1313
+ </details>`},gr=(e,t,a,s,n)=>{const{state:i}=t,r=$n(i,a.id,n.getTime()),o=s==="weighted",d=i.stories.filter(p=>p.milestoneId===a.id&&p.estimateId===void 0).length;return l`
1297
1314
  ${s!=="stories"&&d>0?l`<p class="bd-warning" role="note" data-testid="usm-unestimated-warning">
1298
- ${ji()}<span>${e.unestimatedNote(d)}</span>
1315
+ ${dr()}<span>${e.unestimatedNote(d)}</span>
1299
1316
  </p>`:m}
1300
1317
  <figure class="bd-chart bd-chart--combined">
1301
1318
  <figcaption>
1302
1319
  <span class="bd-chart-title">${e.combinedChartTitle(o)}</span>
1303
1320
  <span class="bd-about">
1304
1321
  <button class="bd-about-btn" type="button" aria-label=${e.chartAbout} aria-describedby="bd-about-tip">
1305
- ${Wi()}
1322
+ ${or()}
1306
1323
  </button>
1307
1324
  <span class="bd-about-tip" id="bd-about-tip" role="tooltip">${e.combinedChartHint(s)}</span>
1308
1325
  </span>
1309
- <span class="bd-chart-latest">${e.chartLatest(ja(r.combined))}</span>
1326
+ <span class="bd-chart-latest">${e.chartLatest(rs(r.combined))}</span>
1310
1327
  </figcaption>
1311
- ${Wa({chart:"combined",title:e.combinedChartTitle(o),points:r.combined,due:r.due,now:n.getTime(),size:Xi,tone:"accent"})}
1328
+ ${is({chart:"combined",title:e.combinedChartTitle(o),points:r.combined,due:r.due,now:n.getTime(),size:lr,tone:"accent"})}
1312
1329
  </figure>
1313
1330
  ${r.byStatus.length===0?m:l`<section class="bd-multiples" aria-label=${e.statusChartsLabel}>
1314
1331
  <h3>${e.statusChartsLabel}</h3>
@@ -1316,13 +1333,13 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1316
1333
  ${r.byStatus.map(({status:p,points:u})=>l`<figure class="bd-chart" data-status=${p.id}>
1317
1334
  <figcaption>
1318
1335
  <span class="bd-chart-title">${e.statusChartTitle(p.name)}</span>
1319
- <span class="bd-chart-latest">${e.chartLatest(ja(u))}</span>
1336
+ <span class="bd-chart-latest">${e.chartLatest(rs(u))}</span>
1320
1337
  </figcaption>
1321
- ${Wa({chart:"status",statusId:p.id,title:e.statusChartTitle(p.name),points:u,due:r.due,now:n.getTime(),size:Zi,tone:p.tone})}
1338
+ ${is({chart:"status",statusId:p.id,title:e.statusChartTitle(p.name),points:u,due:r.due,now:n.getTime(),size:pr,tone:p.tone})}
1322
1339
  </figure>`)}
1323
1340
  </div>
1324
1341
  </section>`}
1325
- `},Wa=e=>l`<dpk-internal-usm-burndown-chart
1342
+ `},is=e=>l`<dpk-internal-usm-burndown-chart
1326
1343
  data-chart=${e.chart}
1327
1344
  data-status=${e.statusId??m}
1328
1345
  .points=${e.points}
@@ -1331,10 +1348,10 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1331
1348
  .size=${e.size}
1332
1349
  .tone=${e.tone}
1333
1350
  .label=${e.title}
1334
- ></dpk-internal-usm-burndown-chart>`,sr=(e,t)=>{const a=[...t.state.snapshots].reverse();return l`<section class="bd-panel">
1351
+ ></dpk-internal-usm-burndown-chart>`,br=(e,t)=>{const a=[...t.state.snapshots].reverse();return l`<section class="bd-panel">
1335
1352
  <h3>${e.snapshotsLabel}<span class="bd-count">${a.length}</span></h3>
1336
1353
  ${a.length===0?l`<p class="bd-empty">${e.noSnapshots} ${e.chartNeedsSnapshot}</p>`:l`<ol class="bd-snapshots">
1337
- ${B(a,s=>s.id,s=>{const n={type:"snapshot",id:s.id},i=le(s.at),r=s.tally.reduce((o,d)=>o+d.stories,0);return l`<li data-snapshot=${s.id} data-dpk-target=${_(n)}>
1354
+ ${Y(a,s=>s.id,s=>{const n={type:"snapshot",id:s.id},i=le(s.at),r=s.tally.reduce((o,d)=>o+d.stories,0);return l`<li data-snapshot=${s.id} data-dpk-target=${_(n)}>
1338
1355
  <span class="bd-snapshot-at">${i}</span>
1339
1356
  <span class="bd-snapshot-sum">${e.storyCount(r)}</span>
1340
1357
  <button
@@ -1344,27 +1361,27 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1344
1361
  aria-label=${e.deleteSnapshotAria(i)}
1345
1362
  @click=${()=>t.dispatch({type:"DELETE_SNAPSHOT",target:n,payload:{}})}
1346
1363
  >
1347
- ${Te()}
1364
+ ${Me()}
1348
1365
  </button>
1349
1366
  </li>`})}
1350
1367
  </ol>`}
1351
- </section>`},nr=(e,t)=>{const{estimates:a}=t.state;return l`<section class="bd-panel" data-testid="usm-estimates">
1368
+ </section>`},fr=(e,t)=>{const{estimates:a}=t.state;return l`<section class="bd-panel" data-testid="usm-estimates">
1352
1369
  <h3>${e.estimatesLabel}<span class="bd-count">${a.length}</span></h3>
1353
1370
  <p class="bd-empty">${e.estimatesHint}</p>
1354
1371
  ${a.length===0?m:l`<ol class="bd-estimates">
1355
- ${B(a,s=>s.id,(s,n)=>ir(e,t,s,n))}
1372
+ ${Y(a,s=>s.id,(s,n)=>vr(e,t,s,n))}
1356
1373
  </ol>`}
1357
1374
  <div>
1358
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>_i(e,t)}>
1375
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Pi(e,t)}>
1359
1376
  ${e.newEstimateButton}
1360
1377
  </button>
1361
1378
  </div>
1362
- </section>`},ir=(e,t,a,s)=>{const{estimates:n}=t.state,i={type:"estimate",id:a.id};return l`<li data-estimate=${a.id} data-dpk-target=${_(i)}>
1379
+ </section>`},vr=(e,t,a,s)=>{const{estimates:n}=t.state,i={type:"estimate",id:a.id};return l`<li data-estimate=${a.id} data-dpk-target=${_(i)}>
1363
1380
  <span class="bd-estimate-name">
1364
1381
  <dpk-component-inline-edit
1365
1382
  .value=${a.name}
1366
1383
  .label=${e.estimateNameLabel}
1367
- @dpk-commit=${X(r=>t.dispatch({type:"SET_ESTIMATE_NAME",target:i,payload:{name:r}}))}
1384
+ @dpk-commit=${Z(r=>t.dispatch({type:"SET_ESTIMATE_NAME",target:i,payload:{name:r}}))}
1368
1385
  ></dpk-component-inline-edit>
1369
1386
  </span>
1370
1387
  <label class="bd-estimate-points">
@@ -1377,20 +1394,20 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1377
1394
  data-role="points"
1378
1395
  aria-label=${e.estimatePointsLabel}
1379
1396
  .value=${String(a.points)}
1380
- @change=${Gi(a.points,r=>t.dispatch({type:"SET_ESTIMATE_POINTS",target:i,payload:{points:r}}))}
1397
+ @change=${ar(a.points,r=>t.dispatch({type:"SET_ESTIMATE_POINTS",target:i,payload:{points:r}}))}
1381
1398
  />
1382
1399
  <span>pt</span>
1383
1400
  </label>
1384
- ${He(e,{ids:n.map(r=>r.id),row:{previousId:n[s-1]?.id??null,nextId:n[s+1]?.id??null},deleteLabel:e.deleteEstimateAria,reorder:r=>t.dispatch({type:"REORDER_ESTIMATE",target:i,payload:{after:r}}),remove:()=>t.dispatch({type:"DELETE_ESTIMATE",target:i,payload:{}})})}
1385
- </li>`},rr=(e,t)=>{const{state:a}=t,s=Bt(a),n=Ea(s);return l`<section class="bd-panel" data-testid="usm-weights">
1401
+ ${Xe(e,{ids:n.map(r=>r.id),row:{previousId:n[s-1]?.id??null,nextId:n[s+1]?.id??null},deleteLabel:e.deleteEstimateAria,reorder:r=>t.dispatch({type:"REORDER_ESTIMATE",target:i,payload:{after:r}}),remove:()=>t.dispatch({type:"DELETE_ESTIMATE",target:i,payload:{}})})}
1402
+ </li>`},yr=(e,t)=>{const{state:a}=t,s=Kt(a),n=Na(s);return l`<section class="bd-panel" data-testid="usm-weights">
1386
1403
  <h3>${e.statusWeightLabel}</h3>
1387
1404
  <p class="bd-empty">${e.statusWeightHint}</p>
1388
1405
  ${n.length>0?l`<dpk-internal-usm-weight-bar
1389
1406
  .statuses=${ce(a).slice(0,s.length)}
1390
1407
  .dividers=${n}
1391
- .commit=${i=>{for(const{statusId:r,weight:o}of ci(s,i))t.dispatch({type:"SET_STATUS_WEIGHT",target:{type:"status",id:r},payload:{weight:o}})}}
1408
+ .commit=${i=>{for(const{statusId:r,weight:o}of Si(s,i))t.dispatch({type:"SET_STATUS_WEIGHT",target:{type:"status",id:r},payload:{weight:o}})}}
1392
1409
  ></dpk-internal-usm-weight-bar>`:l`<p class="bd-empty">${e.weightsNeedStatuses}</p>`}
1393
- </section>`},ja=e=>e.at(-1)?.value??0,or=K`
1410
+ </section>`},rs=e=>e.at(-1)?.value??0,kr=q`
1394
1411
  .bd-overview {
1395
1412
  display: grid;
1396
1413
  gap: 18px;
@@ -1741,31 +1758,31 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1741
1758
  min-width: 0;
1742
1759
  }
1743
1760
  }
1744
- `,dr=/[ァ-ヶ]/g,Xa=e=>e.normalize("NFKC").toLowerCase().replace(dr,t=>String.fromCharCode(t.charCodeAt(0)-96)),lr=(e,t)=>{const a=Xa(t).split(/\s+/).filter(Boolean),s=Xa(e);return a.every(n=>s.includes(n))},Za=(e,t,a,s)=>(a==="blocker"?$n(e,t):En(e,t)).flatMap(i=>{const r=M(e,`${i.activityId}.${i.stepId}`),o=r?[r.activity.name,r.step.name]:[];return lr([i.name,...o].join(" "),s)?[{story:i,place:o}]:[]}),Ja=(e,t,a,s,n,i)=>{const{state:r}=t;if(Za(r,a,s,"").length===0)return m;const o=n.search?.side===s?n.search:null,d=o?Za(r,a,s,o.query):[],p=Math.max(0,Math.min(o?.active??0,d.length-1)),u=o?d[p]:void 0,y=s==="blocker"?e.addBlockerPlaceholder:e.addDependentPlaceholder,E=`dep-${s}-choices`,b=T=>`dep-${s}-${T.story.id}`,c=T=>{o||!(T.currentTarget instanceof HTMLInputElement)||n.set({side:s,query:T.currentTarget.value,active:0})},g=T=>{i(T.story.id),n.set(null)},ae=T=>{if(!T.isComposing)switch(Qa(T)){case"ArrowDown":case"ArrowUp":{if(T.preventDefault(),!o){c(T);return}if(d.length===0)return;const xe=Qa(T)==="ArrowDown"?1:-1;n.set({...o,active:(p+xe+d.length)%d.length});return}case"Enter":if(!u)return;T.preventDefault(),g(u);return;case"Escape":if(!o)return;T.preventDefault(),n.set(null);return}};return l`<div class="sp-dep-picker">
1761
+ `,wr=/[ァ-ヶ]/g,os=e=>e.normalize("NFKC").toLowerCase().replace(wr,t=>String.fromCharCode(t.charCodeAt(0)-96)),xr=(e,t)=>{const a=os(t).split(/\s+/).filter(Boolean),s=os(e);return a.every(n=>s.includes(n))},ds=(e,t,a,s)=>(a==="blocker"?Cn(e,t):Bn(e,t)).flatMap(i=>{const r=L(e,`${i.activityId}.${i.stepId}`),o=r?[r.activity.name,r.step.name]:[];return xr([ze(i),i.name,...o].join(" "),s)?[{story:i,place:o}]:[]}),ls=(e,t,a,s,n,i)=>{const{state:r}=t;if(ds(r,a,s,"").length===0)return m;const o=n.search?.side===s?n.search:null,d=o?ds(r,a,s,o.query):[],p=Math.max(0,Math.min(o?.active??0,d.length-1)),u=o?d[p]:void 0,f=s==="blocker"?e.addBlockerPlaceholder:e.addDependentPlaceholder,x=`dep-${s}-choices`,v=c=>`dep-${s}-${c.story.id}`,I=c=>{o||!(c.currentTarget instanceof HTMLInputElement)||n.set({side:s,query:c.currentTarget.value,active:0})},S=c=>{i(c.story.id),n.set(null)},ue=c=>{if(!c.isComposing)switch(ps(c)){case"ArrowDown":case"ArrowUp":{if(c.preventDefault(),!o){I(c);return}if(d.length===0)return;const T=ps(c)==="ArrowDown"?1:-1;n.set({...o,active:(p+T+d.length)%d.length});return}case"Enter":if(!u)return;c.preventDefault(),S(u);return;case"Escape":if(!o)return;c.preventDefault(),n.set(null);return}};return l`<div class="sp-dep-picker">
1745
1762
  <input
1746
1763
  class="dpk-input sp-dep-search"
1747
1764
  type="text"
1748
1765
  role="combobox"
1749
1766
  data-role=${`add-${s}`}
1750
- aria-label=${y}
1751
- placeholder=${y}
1767
+ aria-label=${f}
1768
+ placeholder=${f}
1752
1769
  autocomplete="off"
1753
1770
  spellcheck="false"
1754
1771
  aria-autocomplete="list"
1755
1772
  aria-expanded=${String(d.length>0)}
1756
- aria-controls=${E}
1757
- aria-activedescendant=${u?b(u):m}
1773
+ aria-controls=${x}
1774
+ aria-activedescendant=${u?v(u):m}
1758
1775
  .value=${o?.query??""}
1759
- @focus=${c}
1760
- @click=${c}
1761
- @input=${T=>{T.currentTarget instanceof HTMLInputElement&&n.set({side:s,query:T.currentTarget.value,active:0})}}
1762
- @keydown=${ae}
1776
+ @focus=${I}
1777
+ @click=${I}
1778
+ @input=${c=>{c.currentTarget instanceof HTMLInputElement&&n.set({side:s,query:c.currentTarget.value,active:0})}}
1779
+ @keydown=${ue}
1763
1780
  @blur=${()=>{o&&n.set(null)}}
1764
1781
  />
1765
- ${o?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}>
1766
- ${d.map(T=>pr(r,T,b(T),T===u,g))}
1782
+ ${o?d.length===0?l`<p class="sp-dep-none" role="status">${e.noDependencyMatch}</p>`:l`<ul id=${x} class="sp-dep-choices" role="listbox" aria-label=${f}>
1783
+ ${d.map(c=>$r(r,c,v(c),c===u,S))}
1767
1784
  </ul>`:m}
1768
- </div>`},Qa=e=>!e.ctrlKey||e.altKey||e.metaKey||e.shiftKey?e.key:e.key==="n"?"ArrowDown":e.key==="p"?"ArrowUp":e.key,pr=(e,t,a,s,n)=>{const i=ce(e).find(r=>r.id===t.story.statusId);return l`<li
1785
+ </div>`},ps=e=>!e.ctrlKey||e.altKey||e.metaKey||e.shiftKey?e.key:e.key==="n"?"ArrowDown":e.key==="p"?"ArrowUp":e.key,$r=(e,t,a,s,n)=>{const i=ce(e).find(r=>r.id===t.story.statusId);return l`<li
1769
1786
  id=${a}
1770
1787
  role="option"
1771
1788
  data-story=${t.story.id}
@@ -1773,11 +1790,11 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1773
1790
  @pointerdown=${r=>r.preventDefault()}
1774
1791
  @click=${()=>n(t)}
1775
1792
  >
1776
- <span class="sp-dep-choice-name" style=${I(i?.tone)}>
1793
+ <span class="sp-dep-choice-name" style=${M(i?.tone)}>
1777
1794
  ${i?re(i):m}<span>${t.story.name}</span>
1778
1795
  </span>
1779
1796
  ${t.place.length===0?m:l`<span class="sp-dep-choice-place">${t.place.map(r=>l`<span>${r}</span>`)}</span>`}
1780
- </li>`},cr=K`
1797
+ </li>`},Sr=q`
1781
1798
  .sp-dep-picker {
1782
1799
  display: grid;
1783
1800
  gap: 4px;
@@ -1838,7 +1855,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1838
1855
  color: var(--dpk-ink-faint);
1839
1856
  font-size: 12px;
1840
1857
  }
1841
- `,ur=C(Gs),mr=(e,t)=>{const a=Ce(t.navigation)==="critical-path",s=a?Qt(t.state).ids.size:null;return l`<button
1858
+ `,Er=B(tn),Tr=(e,t)=>{const a=Fe(t.navigation)==="critical-path",s=a?pa(t.state).ids.size:null;return l`<button
1842
1859
  class="dpk-btn dpk-btn--ghost highlight-toggle"
1843
1860
  type="button"
1844
1861
  data-highlight-toggle="critical-path"
@@ -1846,9 +1863,9 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1846
1863
  title=${e.criticalPathHint}
1847
1864
  @click=${()=>t.navigate({highlight:a?null:"critical-path"})}
1848
1865
  >
1849
- ${ur()}<span>${e.criticalPathButton}</span>
1866
+ ${Er()}<span>${e.criticalPathButton}</span>
1850
1867
  ${s===null?m:l`<span class="highlight-count">${e.criticalPathCount(s)}</span>`}
1851
- </button>`},hr=K`
1868
+ </button>`},Ar=q`
1852
1869
  .highlight-toggle {
1853
1870
  gap: 6px;
1854
1871
  margin-left: auto;
@@ -1871,39 +1888,39 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1871
1888
  font-size: 10.5px;
1872
1889
  font-variant-numeric: tabular-nums;
1873
1890
  }
1874
- `,gr=(e,t,a)=>l`
1891
+ `,_r=(e,t,a)=>l`
1875
1892
  <section class="st-overview" data-testid="usm-labels">
1876
1893
  ${a.rows.length===0?l`<div class="empty">
1877
1894
  <h2>${e.noLabelsTitle}</h2>
1878
1895
  <p>${e.noLabelsBody}</p>
1879
1896
  </div>`:m}
1880
1897
  <ol class="st-list">
1881
- ${B(a.rows,s=>s.id,s=>br(e,t,s))}
1898
+ ${Y(a.rows,s=>s.id,s=>Ir(e,t,s))}
1882
1899
  </ol>
1883
1900
  <div>
1884
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ti(e,t)}>
1901
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ui(e,t)}>
1885
1902
  ${e.newLabelButton}
1886
1903
  </button>
1887
1904
  </div>
1888
1905
  </section>
1889
- `,br=(e,t,a)=>{const s={type:"label",id:a.id};return l`
1890
- <li class="st-row" data-label=${a.id} data-dpk-target=${_(s)} style=${I(a.tone)}>
1906
+ `,Ir=(e,t,a)=>{const s={type:"label",id:a.id};return l`
1907
+ <li class="st-row" data-label=${a.id} data-dpk-target=${_(s)} style=${M(a.tone)}>
1891
1908
  <span class="label-swatch" aria-hidden="true"></span>
1892
1909
  <span class="st-name">
1893
1910
  <dpk-component-inline-edit
1894
1911
  .value=${a.name}
1895
1912
  .label=${e.labelNameLabel}
1896
- @dpk-commit=${X(n=>t.dispatch({type:"SET_LABEL_NAME",target:s,payload:{name:n}}))}
1913
+ @dpk-commit=${Z(n=>t.dispatch({type:"SET_LABEL_NAME",target:s,payload:{name:n}}))}
1897
1914
  ></dpk-component-inline-edit>
1898
1915
  </span>
1899
- ${mt(e,a.storyCount,a.share)}
1900
- ${ut(e,a.tone,n=>t.dispatch({type:"SET_LABEL_TONE",target:s,payload:{tone:n}}))}
1901
- ${He(e,{ids:t.state.labels.map(n=>n.id),row:a,deleteLabel:e.deleteLabelAria,reorder:n=>t.dispatch({type:"REORDER_LABEL",target:s,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_LABEL",target:s,payload:{}})})}
1916
+ ${kt(e,a.storyCount,a.share)}
1917
+ ${yt(e,a.tone,n=>t.dispatch({type:"SET_LABEL_TONE",target:s,payload:{tone:n}}))}
1918
+ ${Xe(e,{ids:t.state.labels.map(n=>n.id),row:a,deleteLabel:e.deleteLabelAria,reorder:n=>t.dispatch({type:"REORDER_LABEL",target:s,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_LABEL",target:s,payload:{}})})}
1902
1919
  </li>
1903
- `},fr=(e,t,a)=>{const{state:s}=t,n=ke.filter(o=>ge(s,o).length>0);if(n.length===0)return m;const i=Be(s,t.navigation),r=Object.fromEntries(ke.map(o=>[o,null]));return l`<div class="map-filter" role="group" aria-label=${e.filterLabel} data-testid="usm-map-filter">
1904
- ${n.map(o=>yr(e,t,i,o,a))} ${vr(e,t)}
1905
- ${Mn(i)?l`<a class="filter-clear" href=${t.hashFor(r)}>${e.clearFilter}</a>`:m}
1906
- </div>`},vr=(e,t)=>{const{state:a}=t,s=Nt(a);if(!s||a.statuses.length<2)return m;const n=ta(a,t.navigation).size===0,i=a.stories.filter(r=>ye(a,r)).length;return l`<label class="show-finished">
1920
+ `},Mr=(e,t,a)=>{const{state:s}=t,n=Ee.filter(o=>be(s,o).length>0);if(n.length===0)return m;const i=Ge(s,t.navigation),r=Object.fromEntries(Ee.map(o=>[o,null]));return l`<div class="map-filter" role="group" aria-label=${e.filterLabel} data-testid="usm-map-filter">
1921
+ ${n.map(o=>Dr(e,t,i,o,a))} ${Lr(e,t)}
1922
+ ${Gn(i)?l`<a class="filter-clear" href=${t.hashFor(r)}>${e.clearFilter}</a>`:m}
1923
+ </div>`},Lr=(e,t)=>{const{state:a}=t,s=Ht(a);if(!s||a.statuses.length<2)return m;const n=ua(a,t.navigation).size===0,i=a.stories.filter(r=>Se(a,r)).length;return l`<label class="show-finished">
1907
1924
  <input
1908
1925
  type="checkbox"
1909
1926
  data-show-finished
@@ -1912,7 +1929,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1912
1929
  />
1913
1930
  <span>${e.showFinished(s.name)}</span>
1914
1931
  <span class="show-finished-count">${i}</span>
1915
- </label>`},yr=(e,t,a,s,n)=>{const i=a[s],r=xr(e,t.state,a.hiddenStatusIds,s),o=r.filter(p=>i.has(p.id)),d=n.openFor===s;return l`<span class="filter-field">
1932
+ </label>`},Dr=(e,t,a,s,n)=>{const i=a[s],r=Nr(e,t.state,a.hiddenStatusIds,s),o=r.filter(p=>i.has(p.id)),d=n.openFor===s;return l`<span class="filter-field">
1916
1933
  <button
1917
1934
  class="dpk-select filter-select"
1918
1935
  type="button"
@@ -1923,10 +1940,10 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1923
1940
  @click=${()=>n.toggle(s)}
1924
1941
  >
1925
1942
  <span class="filter-key">${e.filterKeyLabel(s)}</span>
1926
- <span class="filter-value">${kr(e,o)}</span>
1943
+ <span class="filter-value">${Rr(e,o)}</span>
1927
1944
  </button>
1928
- ${d?wr(e,t,s,i,r,n):m}
1929
- </span>`},kr=(e,t)=>{const[a]=t;return a?t.length===1?a.name:`${a.name} +${t.length-1}`:e.filterAll},wr=(e,t,a,s,n,i)=>l`<div
1945
+ ${d?Or(e,t,s,i,r,n):m}
1946
+ </span>`},Rr=(e,t)=>{const[a]=t;return a?t.length===1?a.name:`${a.name} +${t.length-1}`:e.filterAll},Or=(e,t,a,s,n,i)=>l`<div
1930
1947
  id="filter-menu"
1931
1948
  class="comment-pop filter-menu"
1932
1949
  popover="manual"
@@ -1942,7 +1959,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1942
1959
  aria-checked=${String(s.size===0)}
1943
1960
  href=${t.hashFor({[a]:null})}
1944
1961
  >
1945
- <span class="filter-check">${s.size===0?vt():m}</span>
1962
+ <span class="filter-check">${s.size===0?at():m}</span>
1946
1963
  <span class="filter-name">${e.filterAll}</span>
1947
1964
  </a>
1948
1965
  ${n.map(r=>{const o=s.has(r.id);return l`<a
@@ -1952,14 +1969,14 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
1952
1969
  data-none=${r.id===ne?"true":m}
1953
1970
  aria-checked=${String(o)}
1954
1971
  style=${r.style}
1955
- href=${t.hashFor({[a]:aa(t.state,a,In(s,r.id))})}
1972
+ href=${t.hashFor({[a]:ma(t.state,a,Fn(s,r.id))})}
1956
1973
  >
1957
- <span class="filter-check">${o?vt():m}</span>
1974
+ <span class="filter-check">${o?at():m}</span>
1958
1975
  ${r.mark}
1959
1976
  <span class="filter-name" title=${r.name}>${r.name}</span>
1960
1977
  <span class="filter-count">${r.count}</span>
1961
1978
  </a>`})}
1962
- </div>`,xr=(e,t,a,s)=>{const n=i=>t.stories.filter(r=>r.statusId===void 0||!a.has(r.statusId)).filter(i).length;switch(s){case"status":return ce(t).filter(i=>!a.has(i.id)).map(i=>({id:i.id,name:i.name,count:n(r=>r.statusId===i.id),mark:re(i),style:I(i.tone)}));case"label":return ge(t,s).map(i=>{const r=t.labels.find(o=>o.id===i);return{id:i,name:r?.name??e.noLabel,count:n(o=>r?(o.labelIds??[]).includes(i):(o.labelIds??[]).length===0),mark:l`<span class="filter-dot"></span>`,style:I(r?.tone)}});case"estimate":return ge(t,s).map(i=>{const r=G(t,i);return{id:i,name:r?.name??e.unestimatedFilter,count:n(o=>(o.estimateId??ne)===i),mark:r?l`<span class="filter-points">${r.points}pt</span>`:m,style:""}});case"assignee":return ge(t,s).map(i=>{const r=F(t,i);return{id:i,name:r?.name??e.noAssigneeFilter,count:n(o=>(o.assigneeId??ne)===i),mark:l`<span class="filter-dot"></span>`,style:I(r?.tone)}})}},$r=K`
1979
+ </div>`,Nr=(e,t,a,s)=>{const n=i=>t.stories.filter(r=>r.statusId===void 0||!a.has(r.statusId)).filter(i).length;switch(s){case"status":return ce(t).filter(i=>!a.has(i.id)).map(i=>({id:i.id,name:i.name,count:n(r=>r.statusId===i.id),mark:re(i),style:M(i.tone)}));case"label":return be(t,s).map(i=>{const r=t.labels.find(o=>o.id===i);return{id:i,name:r?.name??e.noLabel,count:n(o=>r?(o.labelIds??[]).includes(i):(o.labelIds??[]).length===0),mark:l`<span class="filter-dot"></span>`,style:M(r?.tone)}});case"estimate":return be(t,s).map(i=>{const r=H(t,i);return{id:i,name:r?.name??e.unestimatedFilter,count:n(o=>(o.estimateId??ne)===i),mark:r?l`<span class="filter-points">${r.points}pt</span>`:m,style:""}});case"assignee":return be(t,s).map(i=>{const r=G(t,i);return{id:i,name:r?.name??e.noAssigneeFilter,count:n(o=>(o.assigneeId??ne)===i),mark:l`<span class="filter-dot"></span>`,style:M(r?.tone)}})}},Cr=q`
1963
1980
  .show-finished {
1964
1981
  display: inline-flex;
1965
1982
  align-items: center;
@@ -2088,9 +2105,9 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2088
2105
  font-size: 10.5px;
2089
2106
  font-variant-numeric: tabular-nums;
2090
2107
  }
2091
- `,Er=(e,t,a)=>l`<div class="map-toolbar" data-testid="usm-map-toolbar">
2092
- ${fr(e,t,a)} ${mr(e,t)}
2093
- </div>`,Sr=K`
2108
+ `,Br=(e,t,a)=>l`<div class="map-toolbar" data-testid="usm-map-toolbar">
2109
+ ${Mr(e,t,a)} ${Tr(e,t)}
2110
+ </div>`,Yr=q`
2094
2111
  .map-toolbar {
2095
2112
  display: flex;
2096
2113
  flex-wrap: wrap;
@@ -2099,55 +2116,55 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2099
2116
  padding: 5px 24px;
2100
2117
  border-bottom: 1px solid var(--dpk-rule);
2101
2118
  }
2102
- `,Tr=(e,t,a)=>l`
2119
+ `,Ur=(e,t,a)=>l`
2103
2120
  <section class="st-overview" data-testid="usm-members">
2104
2121
  ${a.rows.length===0?l`<div class="empty">
2105
2122
  <h2>${e.noMembersTitle}</h2>
2106
2123
  <p>${e.noMembersBody}</p>
2107
2124
  </div>`:m}
2108
2125
  <ol class="st-list">
2109
- ${B(a.rows,s=>s.id,s=>Ar(e,t,s))}
2126
+ ${Y(a.rows,s=>s.id,s=>zr(e,t,s))}
2110
2127
  </ol>
2111
2128
  <div>
2112
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ai(e,t)}>
2129
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>zi(e,t)}>
2113
2130
  ${e.newMemberButton}
2114
2131
  </button>
2115
2132
  </div>
2116
2133
  </section>
2117
- `,Ar=(e,t,a)=>{const s={type:"member",id:a.id};return l`
2118
- <li class="st-row" data-member=${a.id} data-dpk-target=${_(s)} style=${I(a.tone)}>
2119
- <span class="member-avatar" aria-hidden="true">${pt(a.name)}</span>
2134
+ `,zr=(e,t,a)=>{const s={type:"member",id:a.id};return l`
2135
+ <li class="st-row" data-member=${a.id} data-dpk-target=${_(s)} style=${M(a.tone)}>
2136
+ <span class="member-avatar" aria-hidden="true">${ft(a.name)}</span>
2120
2137
  <span class="st-name">
2121
2138
  <dpk-component-inline-edit
2122
2139
  .value=${a.name}
2123
2140
  .label=${e.memberNameLabel}
2124
- @dpk-commit=${X(n=>t.dispatch({type:"SET_MEMBER_NAME",target:s,payload:{name:n}}))}
2141
+ @dpk-commit=${Z(n=>t.dispatch({type:"SET_MEMBER_NAME",target:s,payload:{name:n}}))}
2125
2142
  ></dpk-component-inline-edit>
2126
2143
  </span>
2127
- ${mt(e,a.storyCount,a.share)}
2128
- ${ut(e,a.tone,n=>t.dispatch({type:"SET_MEMBER_TONE",target:s,payload:{tone:n}}))}
2129
- ${He(e,{ids:t.state.members.map(n=>n.id),row:a,deleteLabel:e.deleteMemberAria,reorder:n=>t.dispatch({type:"REORDER_MEMBER",target:s,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_MEMBER",target:s,payload:{}})})}
2144
+ ${kt(e,a.storyCount,a.share)}
2145
+ ${yt(e,a.tone,n=>t.dispatch({type:"SET_MEMBER_TONE",target:s,payload:{tone:n}}))}
2146
+ ${Xe(e,{ids:t.state.members.map(n=>n.id),row:a,deleteLabel:e.deleteMemberAria,reorder:n=>t.dispatch({type:"REORDER_MEMBER",target:s,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_MEMBER",target:s,payload:{}})})}
2130
2147
  </li>
2131
- `},_r=(e,t,a)=>l`
2148
+ `},Pr=(e,t,a)=>l`
2132
2149
  <section class="ms-overview" data-testid="usm-milestones">
2133
2150
  ${a.length===0?l`<div class="empty">
2134
2151
  <h2>${e.noMilestonesTitle}</h2>
2135
2152
  <p>${e.noMilestonesBody}</p>
2136
2153
  </div>`:m}
2137
2154
  <ol class="ms-timeline">
2138
- ${B(a,s=>s.id,s=>Ir(e,t,s))}
2155
+ ${Y(a,s=>s.id,s=>Fr(e,t,s))}
2139
2156
  <li class="ms-add">
2140
2157
  <span class="ms-when" aria-hidden="true"></span>
2141
2158
  <span class="ms-rail" aria-hidden="true"><span class="ms-node ms-node--add"></span></span>
2142
2159
  <div class="ms-body">
2143
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Da(e,t)}>
2160
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ga(e,t)}>
2144
2161
  ${e.newMilestoneButton}
2145
2162
  </button>
2146
2163
  </div>
2147
2164
  </li>
2148
2165
  </ol>
2149
2166
  </section>
2150
- `,Ir=(e,t,a)=>{const s=a.id;return l`
2167
+ `,Fr=(e,t,a)=>{const s=a.id;return l`
2151
2168
  <li class="ms-entry" data-milestone-card=${s} data-dpk-target=${_({type:"milestone",id:s})}>
2152
2169
  <div class="ms-when">
2153
2170
  ${a.timeframe===""?l`<span class="ms-timeframe" data-empty="true">${e.timeframeUnset}</span>`:l`<span class="ms-timeframe">${a.timeframe}</span>`}
@@ -2158,7 +2175,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2158
2175
  <dpk-component-inline-edit
2159
2176
  .value=${a.name}
2160
2177
  .label=${e.milestoneNameLabel}
2161
- @dpk-commit=${X(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:s},payload:{name:n}}))}
2178
+ @dpk-commit=${Z(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:s},payload:{name:n}}))}
2162
2179
  ></dpk-component-inline-edit>
2163
2180
  </h3>
2164
2181
  ${a.description===""?l`<p class="ms-description" data-empty="true">${e.milestoneNoDescription}</p>`:l`<p class="ms-description">${a.description}</p>`}
@@ -2182,21 +2199,21 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2182
2199
  </dd>
2183
2200
  </div>
2184
2201
  </dl>
2185
- ${a.progress.length===0?m:Mr(e,a)}
2202
+ ${a.progress.length===0?m:Gr(e,a)}
2186
2203
  </article>
2187
2204
  </li>
2188
- `},Mr=(e,t)=>l`
2205
+ `},Gr=(e,t)=>l`
2189
2206
  <div class="ms-breakdown">
2190
- ${va(t.progress,e.progressAria(t.progress.map(a=>`${a.name} ${a.count}`).join(", ")))}
2207
+ ${Ia(t.progress,e.progressAria(t.progress.map(a=>`${a.name} ${a.count}`).join(", ")))}
2191
2208
  <ul class="ms-legend" aria-hidden="true">
2192
- ${t.progress.map(a=>l`<li data-status=${a.id} style=${I(a.tone)}>
2209
+ ${t.progress.map(a=>l`<li data-status=${a.id} style=${M(a.tone)}>
2193
2210
  ${re(a)}
2194
2211
  <span class="ms-breakdown-name">${a.name}</span>
2195
2212
  <span class="ms-breakdown-count">${a.count}</span>
2196
2213
  </li>`)}
2197
2214
  </ul>
2198
2215
  </div>
2199
- `,Lr=(e,t,a,s)=>{if(a.kind!=="picking-step")return m;const n=S(t.state,a.storyId),i=Q(t.state,a.activityId);if(!n||!i)return m;const r=i.steps[0]?.id;return l`<div class="comment-pop move-dialog" id="move-dialog" popover="manual">
2216
+ `,Hr=(e,t,a,s)=>{if(a.kind!=="picking-step")return m;const n=E(t.state,a.storyId),i=ee(t.state,a.activityId);if(!n||!i)return m;const r=i.steps[0]?.id;return l`<div class="comment-pop move-dialog" id="move-dialog" popover="manual">
2200
2217
  <span class="dpk-label">${e.moveDialogLabel}</span>
2201
2218
  <select class="dpk-select" aria-label=${e.moveDialogSelectLabel} data-move-dialog>
2202
2219
  ${i.steps.map(o=>l`<option value=${o.id} ?selected=${o.id===r}>${o.name}</option>`)}
@@ -2205,17 +2222,17 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2205
2222
  <button
2206
2223
  class="dpk-btn dpk-btn--accent"
2207
2224
  type="button"
2208
- @click=${o=>{const p=($s(o.currentTarget,HTMLElement)?.closest("#move-dialog")??null)?.querySelector("select")?.value??r;p?s.confirm(p):s.cancel()}}
2225
+ @click=${o=>{const p=(Rs(o.currentTarget,HTMLElement)?.closest("#move-dialog")??null)?.querySelector("select")?.value??r;p?s.confirm(p):s.cancel()}}
2209
2226
  >
2210
2227
  ${e.moveConfirm}
2211
2228
  </button>
2212
2229
  <button class="dpk-btn" type="button" @click=${s.cancel}>${e.moveCancel}</button>
2213
2230
  </div>
2214
- </div>`},Dr=(e,t)=>l`<div class="board-head" data-testid="usm-board-head">${e}${t}</div>`,Rr=C(Ys),Or=(e,t,a,s)=>{const{state:n}=t,i=Xt(n),r=i.filter(o=>s.folded.has(o));return l`
2231
+ </div>`},Vr=(e,t)=>l`<div class="board-head" data-testid="usm-board-head">${e}${t}</div>`,Kr=B(Xs),qr=(e,t,a,s)=>{const{state:n}=t,i=oa(n),r=i.filter(o=>s.folded.has(o));return l`
2215
2232
  <div class="board-bar">
2216
2233
  <div class="page-nav" style=${`min-width: ${s.minimum}px`}>
2217
2234
  <div class="page-tabs" role="tablist" aria-label=${e.pageTabsLabel}>
2218
- ${i.map(o=>Nr(t,o,a,es(e,o),ts(n,o),s.folded.has(o)))}
2235
+ ${i.map(o=>Wr(t,o,a,cs(e,o),us(n,o),s.folded.has(o)))}
2219
2236
  </div>
2220
2237
  <button
2221
2238
  class="dpk-btn dpk-btn--ghost tabs-more"
@@ -2227,7 +2244,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2227
2244
  aria-expanded=${String(s.open)}
2228
2245
  @click=${s.toggle}
2229
2246
  >
2230
- ${Rr()}
2247
+ ${Kr()}
2231
2248
  </button>
2232
2249
  ${s.open&&r.length>0?l`<div
2233
2250
  id="tabs-menu"
@@ -2243,13 +2260,13 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2243
2260
  data-tab=${o}
2244
2261
  href=${t.hashFor({tab:o==="map"?null:o})}
2245
2262
  @click=${s.close}
2246
- >${es(e,o)}<span class="page-tab-count">${ts(n,o)}</span></a
2263
+ >${cs(e,o)}<span class="page-tab-count">${us(n,o)}</span></a
2247
2264
  >`)}
2248
2265
  </div>`:m}
2249
2266
  </div>
2250
- ${a==="map"&&n.activities.some(o=>o.steps.length>0)?Di(e,t):m}
2267
+ ${a==="map"&&n.activities.some(o=>o.steps.length>0)?Vi(e,t):m}
2251
2268
  </div>
2252
- `},es=(e,t)=>{switch(t){case"map":return e.mapTab;case"milestones":return e.milestonesTab;case"statuses":return e.statusesTab;case"labels":return e.labelsTab;case"members":return e.membersTab;case"burndown":return e.burndownTab}},ts=(e,t)=>{switch(t){case"map":return e.stories.length;case"milestones":return e.milestones.length;case"statuses":return e.statuses.length;case"labels":return e.labels.length;case"members":return e.members.length;case"burndown":return e.snapshots.length}},Nr=(e,t,a,s,n,i)=>l`<a
2269
+ `},cs=(e,t)=>{switch(t){case"map":return e.mapTab;case"milestones":return e.milestonesTab;case"statuses":return e.statusesTab;case"labels":return e.labelsTab;case"members":return e.membersTab;case"burndown":return e.burndownTab}},us=(e,t)=>{switch(t){case"map":return e.stories.length;case"milestones":return e.milestones.length;case"statuses":return e.statuses.length;case"labels":return e.labels.length;case"members":return e.members.length;case"burndown":return e.snapshots.length}},Wr=(e,t,a,s,n,i)=>l`<a
2253
2270
  role="tab"
2254
2271
  data-tab=${t}
2255
2272
  data-overflow=${i?"":m}
@@ -2258,7 +2275,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2258
2275
  aria-selected=${t===a?"true":"false"}
2259
2276
  href=${e.hashFor({tab:t==="map"?null:t})}
2260
2277
  >${s}<span class="page-tab-count">${n}</span></a
2261
- >`,Cr=36,Br=12,Yr=220,Ur=K`
2278
+ >`,jr=36,Xr=12,Zr=220,Jr=q`
2262
2279
  /* The tabs and their more button share what the bar's line leaves; the line
2263
2280
  wraps only when even the current tab and the button do not fit. */
2264
2281
  .page-nav {
@@ -2314,7 +2331,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2314
2331
  outline: none;
2315
2332
  background: var(--dpk-paper-sunken);
2316
2333
  }
2317
- `,zr=e=>S(e.state,e.navigation.story),Pr=(e,t,a,s)=>{const{state:n}=t,i={type:"story",id:a.id},r=()=>t.navigate({story:null}),o=M(n,`${a.activityId}.${a.stepId}`),d=P(n,a.milestoneId);return l`<aside
2334
+ `,Qr=e=>E(e.state,e.navigation.story),eo=(e,t,a,s,n)=>{const{state:i}=t,r={type:"story",id:a.id},o=()=>t.navigate({story:null}),d=L(i,`${a.activityId}.${a.stepId}`),p=F(i,a.milestoneId);return l`<aside
2318
2335
  class="story-panel"
2319
2336
  role="dialog"
2320
2337
  aria-label=${e.panelLabel(a.name)}
@@ -2324,27 +2341,30 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2324
2341
  >
2325
2342
  <header class="sp-head">
2326
2343
  <span class="sp-where">
2327
- ${o?l`<span>${o.activity.name}</span><span>${o.step.name}</span>`:m}
2328
- <span>${d?.name??e.unassigned}</span>
2344
+ ${d?l`<span>${d.activity.name}</span><span>${d.step.name}</span>`:m}
2345
+ <span>${p?.name??e.unassigned}</span>
2329
2346
  </span>
2330
- ${Wr(e,t,a)}
2331
- <button class="dpk-icon-btn" type="button" data-role="close" aria-label=${e.closePanelAria} @click=${r}>
2332
- ${Xe()}
2347
+ ${lo(e,t,a)}
2348
+ <button class="dpk-icon-btn" type="button" data-role="close" aria-label=${e.closePanelAria} @click=${o}>
2349
+ ${st()}
2333
2350
  </button>
2334
2351
  </header>
2335
2352
  <div class="sp-body">
2336
- <h2 class="sp-title">
2337
- <dpk-component-inline-edit
2338
- wrap
2339
- .value=${a.name}
2340
- .label=${e.storyTitleLabel}
2341
- @dpk-commit=${X(p=>t.dispatch({type:"SET_STORY_NAME",target:i,payload:{name:p}}))}
2342
- ></dpk-component-inline-edit>
2343
- </h2>
2344
- ${n.statuses.length===0?m:Fr(e,t,a)}
2345
- ${Z(n,"estimates")?Gr(e,t,a):m}
2346
- ${Z(n,"assignees")?Hr(e,t,a):m}
2347
- ${Vr(e,t,a)} ${Kr(e,t,a,s)}
2353
+ <div class="sp-heading">
2354
+ ${to(e,ze(a),n)}
2355
+ <h2 class="sp-title">
2356
+ <dpk-component-inline-edit
2357
+ wrap
2358
+ .value=${a.name}
2359
+ .label=${e.storyTitleLabel}
2360
+ @dpk-commit=${Z(u=>t.dispatch({type:"SET_STORY_NAME",target:r,payload:{name:u}}))}
2361
+ ></dpk-component-inline-edit>
2362
+ </h2>
2363
+ </div>
2364
+ ${i.statuses.length===0?m:ao(e,t,a)}
2365
+ ${J(i,"estimates")?so(e,t,a):m}
2366
+ ${J(i,"assignees")?no(e,t,a):m}
2367
+ ${io(e,t,a)} ${ro(e,t,a,s)}
2348
2368
  <section class="sp-field">
2349
2369
  <h3>${e.storyDescriptionLabel}</h3>
2350
2370
  <dpk-component-inline-edit
@@ -2353,21 +2373,31 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2353
2373
  class="sp-description"
2354
2374
  .value=${a.description??""}
2355
2375
  .label=${e.storyDescriptionLabel}
2356
- @dpk-commit=${X(p=>t.dispatch({type:"SET_STORY_DESCRIPTION",target:i,payload:{description:p}}))}
2376
+ @dpk-commit=${Z(u=>t.dispatch({type:"SET_STORY_DESCRIPTION",target:r,payload:{description:u}}))}
2357
2377
  ></dpk-component-inline-edit>
2358
2378
  </section>
2359
- ${qr(e,t,a)} ${jr(e,t,a)}
2379
+ ${oo(e,t,a)} ${po(e,t,a)}
2360
2380
  </div>
2361
2381
  <footer class="sp-foot">
2362
2382
  <button
2363
2383
  class="dpk-btn dpk-btn--ghost sp-delete"
2364
2384
  type="button"
2365
- @click=${()=>{t.dispatch({type:"DELETE_STORY",target:i,payload:{}}).ok&&r()}}
2385
+ @click=${()=>{t.dispatch({type:"DELETE_STORY",target:r,payload:{}}).ok&&o()}}
2366
2386
  >
2367
- ${Te()}<span>${e.deleteStoryButton}</span>
2387
+ ${Me()}<span>${e.deleteStoryButton}</span>
2368
2388
  </button>
2369
2389
  </footer>
2370
- </aside>`},Fr=(e,t,a)=>{const s=ce(t.state),n=a.statusId;return l`<section class="sp-field">
2390
+ </aside>`},to=(e,t,a)=>{const s=a.copied?e.storyKeyCopied:e.copyStoryKey(t);return l`<button
2391
+ class="sp-key"
2392
+ type="button"
2393
+ data-role="copy-key"
2394
+ data-copied=${a.copied?"true":"false"}
2395
+ title=${s}
2396
+ aria-label=${s}
2397
+ @click=${()=>a.copy(t)}
2398
+ >
2399
+ <span>${t}</span>${a.copied?at():Os()}
2400
+ </button>`},ao=(e,t,a)=>{const s=ce(t.state),n=a.statusId;return l`<section class="sp-field">
2371
2401
  <h3 id="sp-status-label">${e.storyStatusLabel}</h3>
2372
2402
  <div class="sp-statuses" role="radiogroup" aria-labelledby="sp-status-label">
2373
2403
  ${s.map(i=>l`<button
@@ -2376,13 +2406,13 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2376
2406
  role="radio"
2377
2407
  data-status=${i.id}
2378
2408
  aria-checked=${String(i.id===n)}
2379
- style=${I(i.tone)}
2409
+ style=${M(i.tone)}
2380
2410
  @click=${()=>{i.id!==n&&t.dispatch({type:"SET_STORY_STATUS",target:{type:"story",id:a.id},payload:{statusId:i.id}})}}
2381
2411
  >
2382
2412
  ${re(i)}<span>${i.name}</span>
2383
2413
  </button>`)}
2384
2414
  </div>
2385
- </section>`},Gr=(e,t,a)=>{const s=a.estimateId??null,n=r=>()=>{r!==s&&t.dispatch({type:"SET_STORY_ESTIMATE",target:{type:"story",id:a.id},payload:{estimateId:r}})},i=[{id:null,name:e.unestimated,title:e.unestimated},...t.state.estimates.map(r=>({id:r.id,name:r.name,title:e.estimateText(r.name,r.points)}))];return l`<section class="sp-field">
2415
+ </section>`},so=(e,t,a)=>{const s=a.estimateId??null,n=r=>()=>{r!==s&&t.dispatch({type:"SET_STORY_ESTIMATE",target:{type:"story",id:a.id},payload:{estimateId:r}})},i=[{id:null,name:e.unestimated,title:e.unestimated},...t.state.estimates.map(r=>({id:r.id,name:r.name,title:e.estimateText(r.name,r.points)}))];return l`<section class="sp-field">
2386
2416
  <h3 id="sp-estimate-label" class="sp-field-head">
2387
2417
  <span>${e.storyEstimateLabel}</span>
2388
2418
  <a class="sp-manage" href=${t.hashFor({tab:"burndown",story:null})}>${e.manageEstimates}</a>
@@ -2400,7 +2430,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2400
2430
  ${r.name}
2401
2431
  </button>`)}
2402
2432
  </div>`}
2403
- </section>`},Hr=(e,t,a)=>{const s=a.assigneeId??null,n=i=>()=>{i!==s&&t.dispatch({type:"SET_STORY_ASSIGNEE",target:{type:"story",id:a.id},payload:{memberId:i}})};return l`<section class="sp-field">
2433
+ </section>`},no=(e,t,a)=>{const s=a.assigneeId??null,n=i=>()=>{i!==s&&t.dispatch({type:"SET_STORY_ASSIGNEE",target:{type:"story",id:a.id},payload:{memberId:i}})};return l`<section class="sp-field">
2404
2434
  <h3 id="sp-assignee-label" class="sp-field-head">
2405
2435
  <span>${e.storyAssigneeLabel}</span>
2406
2436
  <a class="sp-manage" href=${t.hashFor({tab:"members",story:null})}>${e.manageMembers}</a>
@@ -2422,13 +2452,13 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2422
2452
  role="radio"
2423
2453
  data-assignee=${i.id}
2424
2454
  aria-checked=${String(i.id===s)}
2425
- style=${I(i.tone)}
2455
+ style=${M(i.tone)}
2426
2456
  @click=${n(i.id)}
2427
2457
  >
2428
- <span class="sp-avatar" aria-hidden="true">${pt(i.name)}</span>${i.name}
2458
+ <span class="sp-avatar" aria-hidden="true">${ft(i.name)}</span>${i.name}
2429
2459
  </button>`)}
2430
2460
  </div>`}
2431
- </section>`},Vr=(e,t,a)=>{const s={type:"story",id:a.id},n=new Set(a.labelIds??[]);return l`<section class="sp-field">
2461
+ </section>`},io=(e,t,a)=>{const s={type:"story",id:a.id},n=new Set(a.labelIds??[]);return l`<section class="sp-field">
2432
2462
  <h3 id="sp-labels-label" class="sp-field-head">
2433
2463
  <span>${e.storyLabelsLabel}</span>
2434
2464
  <a class="sp-manage" href=${t.hashFor({tab:"labels",story:null})}>${e.manageLabels}</a>
@@ -2439,28 +2469,28 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2439
2469
  type="button"
2440
2470
  data-label=${i.id}
2441
2471
  aria-pressed=${String(r)}
2442
- style=${I(i.tone)}
2472
+ style=${M(i.tone)}
2443
2473
  @click=${()=>t.dispatch({type:r?"REMOVE_STORY_LABEL":"ADD_STORY_LABEL",target:s,payload:{labelId:i.id}})}
2444
2474
  >
2445
2475
  <span class="sp-label-dot" aria-hidden="true"></span><span>${i.name}</span>
2446
2476
  </button>`})}
2447
2477
  </div>`}
2448
- </section>`},Kr=(e,t,a,s)=>{const{state:n}=t,i=Jt(n,a.id),r=(d,p,u)=>t.dispatch({type:d,target:{type:"story",id:p},payload:{blockerId:u}}),o=(d,p,u,y)=>{const E=S(n,p);if(!E)return m;const b=ce(n).find(c=>c.id===E.statusId);return l`<li
2478
+ </section>`},ro=(e,t,a,s)=>{const{state:n}=t,i=la(n,a.id),r=(d,p,u)=>t.dispatch({type:d,target:{type:"story",id:p},payload:{blockerId:u}}),o=(d,p,u,f)=>{const x=E(n,p);if(!x)return m;const v=ce(n).find(I=>I.id===x.statusId);return l`<li
2449
2479
  data-blocker=${d==="data-blocker"?p:m}
2450
2480
  data-dependent=${d==="data-dependent"?p:m}
2451
- data-finished=${String(ye(n,E))}
2481
+ data-finished=${String(Se(n,x))}
2452
2482
  >
2453
- <a class="sp-dep-name" href=${t.hashFor({story:p})} style=${I(b?.tone)}>
2454
- ${b?re(b):m}<span>${E.name}</span>
2483
+ <a class="sp-dep-name" href=${t.hashFor({story:p})} style=${M(v?.tone)}>
2484
+ ${v?re(v):m}<span>${x.name}</span>
2455
2485
  </a>
2456
2486
  <button
2457
2487
  class="dpk-icon-btn"
2458
2488
  type="button"
2459
2489
  data-role="remove"
2460
- aria-label=${u(E.name)}
2461
- @click=${y}
2490
+ aria-label=${u(x.name)}
2491
+ @click=${f}
2462
2492
  >
2463
- ${Xe()}
2493
+ ${st()}
2464
2494
  </button>
2465
2495
  </li>`};return l`<section class="sp-field sp-deps">
2466
2496
  <h3>${e.storyDependenciesLabel}</h3>
@@ -2469,21 +2499,21 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2469
2499
  ${i.blockers.length===0?l`<p class="sp-empty">${e.storyNoBlockers}</p>`:l`<ul class="sp-dep-list">
2470
2500
  ${i.blockers.map(d=>o("data-blocker",d,e.removeBlockerAria,()=>r("REMOVE_STORY_BLOCKER",a.id,d)))}
2471
2501
  </ul>`}
2472
- ${Ja(e,t,a.id,"blocker",s,d=>r("ADD_STORY_BLOCKER",a.id,d))}
2502
+ ${ls(e,t,a.id,"blocker",s,d=>r("ADD_STORY_BLOCKER",a.id,d))}
2473
2503
  </div>
2474
2504
  <div class="sp-dep-side">
2475
2505
  <h4>${e.storyDependentsLabel}</h4>
2476
2506
  ${i.dependents.length===0?l`<p class="sp-empty">${e.storyNoDependents}</p>`:l`<ul class="sp-dep-list">
2477
2507
  ${i.dependents.map(d=>o("data-dependent",d,e.removeDependentAria,()=>r("REMOVE_STORY_BLOCKER",d,a.id)))}
2478
2508
  </ul>`}
2479
- ${Ja(e,t,a.id,"dependent",s,d=>r("ADD_STORY_BLOCKER",d,a.id))}
2509
+ ${ls(e,t,a.id,"dependent",s,d=>r("ADD_STORY_BLOCKER",d,a.id))}
2480
2510
  </div>
2481
- </section>`},qr=(e,t,a)=>{const s={type:"story",id:a.id},n=a.links??[],i=r=>{r.preventDefault();const o=r.currentTarget instanceof HTMLFormElement?r.currentTarget:null,d=o?.querySelector("input");if(!o||!d)return;const p=d.value.trim();if(!gt(tt,p).success){d.setAttribute("aria-invalid","true");return}t.dispatch({type:"ADD_STORY_LINK",target:s,payload:{url:p}}).ok&&(d.removeAttribute("aria-invalid"),o.reset())};return l`<section class="sp-field">
2511
+ </section>`},oo=(e,t,a)=>{const s={type:"story",id:a.id},n=a.links??[],i=r=>{r.preventDefault();const o=r.currentTarget instanceof HTMLFormElement?r.currentTarget:null,d=o?.querySelector("input");if(!o||!d)return;const p=d.value.trim();if(!St(dt,p).success){d.setAttribute("aria-invalid","true");return}t.dispatch({type:"ADD_STORY_LINK",target:s,payload:{url:p}}).ok&&(d.removeAttribute("aria-invalid"),o.reset())};return l`<section class="sp-field">
2482
2512
  <h3>${e.storyLinksLabel}</h3>
2483
2513
  ${n.length===0?m:l`<ul class="sp-links">
2484
- ${n.map(r=>{const o=Ne(r.url),d=r.label??o.text;return l`<li data-kind=${o.kind}>
2514
+ ${n.map(r=>{const o=Pe(r.url),d=r.label??o.text;return l`<li data-kind=${o.kind}>
2485
2515
  <a class="sp-link" href=${r.url} target="_blank" rel="noopener noreferrer" title=${r.url}>
2486
- ${ya(o.kind)}
2516
+ ${Ma(o.kind)}
2487
2517
  <span class="sp-link-text">${d}</span>
2488
2518
  <span class="sp-link-url">${o.title===d?r.url:o.title}</span>
2489
2519
  </a>
@@ -2493,7 +2523,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2493
2523
  aria-label=${e.removeLinkAria(d)}
2494
2524
  @click=${()=>t.dispatch({type:"REMOVE_STORY_LINK",target:s,payload:{url:r.url}})}
2495
2525
  >
2496
- ${Xe()}
2526
+ ${st()}
2497
2527
  </button>
2498
2528
  </li>`})}
2499
2529
  </ul>`}
@@ -2508,7 +2538,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2508
2538
  />
2509
2539
  <button class="dpk-btn" type="submit">${e.addLinkButton}</button>
2510
2540
  </form>
2511
- </section>`},Wr=(e,t,a)=>{const s=t.commentCount({type:"story",id:a.id});return l`<button
2541
+ </section>`},lo=(e,t,a)=>{const s=t.commentCount({type:"story",id:a.id});return l`<button
2512
2542
  class="sp-review"
2513
2543
  type="button"
2514
2544
  data-role="review-story"
@@ -2516,8 +2546,8 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2516
2546
  aria-label=${s>0?`${e.reviewStoryButton} (${s})`:e.reviewStoryButton}
2517
2547
  @click=${()=>t.requestComment({type:"story",id:a.id})}
2518
2548
  >
2519
- ${bt()}<span>${e.reviewStoryButton}</span>${s>0?l`<span class="sp-review-count">${s}</span>`:m}
2520
- </button>`},jr=(e,t,a)=>{const s={type:"story",id:a.id},n=a.comments??[],i=r=>{const o=r.querySelector("textarea"),d=o?.value.trim()??"";if(!o||d==="")return;const p=j("comment",q(t.state));t.dispatch({type:"ADD_STORY_COMMENT",target:s,payload:{id:p,body:d,createdAt:new Date().toISOString()}}).ok&&(o.value="")};return l`<section class="sp-field sp-comments">
2549
+ ${Et()}<span>${e.reviewStoryButton}</span>${s>0?l`<span class="sp-review-count">${s}</span>`:m}
2550
+ </button>`},po=(e,t,a)=>{const s={type:"story",id:a.id},n=a.comments??[],i=r=>{const o=r.querySelector("textarea"),d=o?.value.trim()??"";if(!o||d==="")return;const p=X("comment",W(t.state));t.dispatch({type:"ADD_STORY_COMMENT",target:s,payload:{id:p,body:d,createdAt:new Date().toISOString()}}).ok&&(o.value="")};return l`<section class="sp-field sp-comments">
2521
2551
  <h3>
2522
2552
  ${e.storyCommentsLabel}${n.length>0?l`<span class="sp-count">${n.length}</span>`:m}
2523
2553
  </h3>
@@ -2536,7 +2566,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2536
2566
  aria-label=${e.deleteStoryCommentAria}
2537
2567
  @click=${()=>t.dispatch({type:"DELETE_STORY_COMMENT",target:s,payload:{commentId:r.id}})}
2538
2568
  >
2539
- ${Te()}
2569
+ ${Me()}
2540
2570
  </button>
2541
2571
  </li>`)}
2542
2572
  </ol>`}
@@ -2557,7 +2587,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2557
2587
  <button class="dpk-btn dpk-btn--accent" type="submit">${e.commentSubmit}</button>
2558
2588
  </div>
2559
2589
  </form>
2560
- </section>`},Xr=K`
2590
+ </section>`},co=q`
2561
2591
  /* Over the main column's edge, below the header: the page's own controls stay in reach. */
2562
2592
  .story-panel {
2563
2593
  position: absolute;
@@ -2592,6 +2622,47 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
2592
2622
  box-sizing: border-box;
2593
2623
  border-bottom: 1px solid var(--dpk-rule);
2594
2624
  }
2625
+ .sp-heading {
2626
+ display: grid;
2627
+ justify-items: start;
2628
+ gap: 6px;
2629
+ }
2630
+ .sp-heading .sp-title {
2631
+ justify-self: stretch;
2632
+ }
2633
+ .sp-key {
2634
+ display: inline-flex;
2635
+ align-items: center;
2636
+ gap: 5px;
2637
+ padding: 2px 7px;
2638
+ border: 1px solid var(--dpk-rule);
2639
+ border-radius: 6px;
2640
+ background: var(--dpk-paper-sunken);
2641
+ color: var(--dpk-ink-soft);
2642
+ font: inherit;
2643
+ font-family: var(--dpk-mono);
2644
+ font-size: 11px;
2645
+ font-weight: 650;
2646
+ line-height: 18px;
2647
+ font-variant-numeric: tabular-nums;
2648
+ cursor: pointer;
2649
+ }
2650
+ .sp-key:hover {
2651
+ border-color: var(--dpk-rule-strong);
2652
+ color: var(--dpk-ink);
2653
+ }
2654
+ .sp-key:focus-visible {
2655
+ outline: none;
2656
+ box-shadow: var(--dpk-focus);
2657
+ }
2658
+ .sp-key[data-copied='true'] {
2659
+ color: var(--dpk-green);
2660
+ }
2661
+ .sp-key svg {
2662
+ flex: none;
2663
+ width: 12px;
2664
+ height: 12px;
2665
+ }
2595
2666
  .sp-where {
2596
2667
  display: flex;
2597
2668
  flex-wrap: wrap;
@@ -3064,7 +3135,7 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
3064
3135
  width: 14px;
3065
3136
  height: 14px;
3066
3137
  }
3067
- `,Zr=e=>{const t=e.stories.length,a=r=>t===0?0:r/t,s=r=>e.stories.filter(o=>o.statusId===r).length,n=ue(e);return{rows:e.statuses.map((r,o)=>{const d=s(r.id);return{id:r.id,name:r.name,tone:r.tone,icon:r.icon,progress:wa(o,n),done:o===n,previousId:e.statuses[o-1]?.id??null,nextId:e.statuses[o+1]?.id??null,storyCount:d,share:a(d)}})}},Jr=K`
3138
+ `,uo=e=>{const t=e.stories.length,a=r=>t===0?0:r/t,s=r=>e.stories.filter(o=>o.statusId===r).length,n=me(e);return{rows:e.statuses.map((r,o)=>{const d=s(r.id);return{id:r.id,name:r.name,tone:r.tone,icon:r.icon,progress:Da(o,n),done:o===n,previousId:e.statuses[o-1]?.id??null,nextId:e.statuses[o+1]?.id??null,storyCount:d,share:a(d)}})}},mo=q`
3068
3139
  :host {
3069
3140
  --dpk-usm-accent: var(--dpk-blue);
3070
3141
  }
@@ -4136,8 +4207,8 @@ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN a
4136
4207
  .move-dialog {
4137
4208
  min-width: 220px;
4138
4209
  }
4139
- `,Y={kind:"idle"},Qr={width:300,height:240},eo={width:228,height:116},to=240,ao=31,so=14,as=160;class ss extends yt{static{this.styles=[yt.styles,Jr,lt,ka,Xr,cr,or,Sr,$r,hr,Ur,Es]}definitionFor(t){return ca(t)}static{this.properties={mode:{state:!0}}}#n=new Is(this);#e=new Ss(this);#a=null;#s=new On(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]")});#t=!1;constructor(){super(),this.mode=Y,new Ze(this,{open:()=>this.#r()!==null,closesOn:t=>this.#o(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 Ze(this,{open:()=>this.mode.kind==="filtering",closesOn:t=>!t.some(a=>a instanceof Element&&(a.id==="filter-menu"||a.hasAttribute("data-filter-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=Y}),new Ze(this,{open:()=>this.mode.kind==="choosing-tab",closesOn:t=>!t.some(a=>a instanceof Element&&(a.id==="tabs-menu"||a.hasAttribute("data-tabs-more-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=Y})}renderRegions(t){return{main:this.#p(t)}}updated(){if(super.updated(),this.#l(),this.#d(),this.mode.kind==="picking-dependency"){this.#i();return}if(this.mode.kind==="picking-icon"){const a=this.renderRoot.querySelector("#icon-menu"),s=this.renderRoot.querySelector(`[data-icon-trigger="${CSS.escape(this.mode.statusId)}"]`);a&&s&&this.#e.open(a,s,eo);return}if(this.mode.kind==="filtering"){const a=this.renderRoot.querySelector("#filter-menu"),s=this.renderRoot.querySelector(`[data-filter-trigger="${CSS.escape(this.mode.key)}"]`),n=(a?.childElementCount??0)*ao+so;a&&s&&this.#e.open(a,s,{width:to,height:n});return}if(this.mode.kind==="choosing-tab"){const a=this.renderRoot.querySelector("#tabs-menu"),s=this.renderRoot.querySelector("[data-tabs-more-trigger]");if(!a){this.mode=Y;return}const n=a.childElementCount*Cr+Br;s&&this.#e.open(a,s,{width:Yr,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,Ts(this.mode.point.x,this.mode.point.y),Qr)}#i(){const t=this.renderRoot instanceof ShadowRoot?this.renderRoot.activeElement:null;if(!t?.matches(".sp-dep-search")){this.mode=Y;return}const a=t.getAttribute("aria-activedescendant");a&&this.renderRoot.querySelector(`#${CSS.escape(a)}`)?.scrollIntoView?.({block:"nearest"})}#r(){return this.renderRoot.querySelector(".story-panel")}#o(t){const a=this.#r(),s=this.renderRoot.querySelector(".dpk-main");return!a||!s||t.includes(a)||!t.includes(s)?!1:!t.some(n=>n instanceof Element&&(n.localName==="dpk-internal-usm-story-card"||n.hasAttribute("popover")))}#d(){const t=this.#r(),a=t?.dataset.story??null,s=this.#a;if(a===s)return;this.#a=a;const n=this.shadowRoot?.activeElement??null;if(t){(!n||!t.contains(n))&&t.focus({preventScroll:!0});return}s===null||n!==null&&n.isConnected||this.renderRoot.querySelector(`dpk-internal-usm-story-card[data-story="${CSS.escape(s)}"]`)?.focus({preventScroll:!0})}#l(){if(!(Ce(this.navigation)!==null)){this.#t=!1;return}const a=this.renderRoot.querySelector(".map-scroll"),s=a?.querySelector('dpk-internal-usm-story-card[data-highlight="on"]');this.#t||!a||!s||(this.#t=!0,As(a,s,as),_s(a,s,as))}#p(t){const a=he(this.locale),s=Zt(t.state,t.navigation);return l`
4140
- ${Dr(Or(a,t,s,{folded:this.#s.hidden,minimum:this.#s.minimum,open:this.mode.kind==="choosing-tab",toggle:()=>this.mode=this.mode.kind==="choosing-tab"?Y:{kind:"choosing-tab"},close:()=>this.mode=Y}),this.#c(a,t,s))}
4141
- ${this.#m(a,t,s)} ${this.#u(a,t,s)}
4142
- ${Lr(a,t,this.mode,{confirm:n=>this.#w(n),cancel:()=>this.mode=Y})}
4143
- `}#c(t,a,s){return s!=="map"||De(a.state).length===0?m:Er(t,a,{openFor:this.mode.kind==="filtering"?this.mode.key:null,toggle:n=>{const i=this.mode.kind==="filtering"&&this.mode.key===n;this.mode=i?Y:{kind:"filtering",key:n}},close:()=>this.mode=Y})}#u(t,a,s){if(s!=="map")return m;const n=zr(a);if(!n)return m;const i={search:this.mode.kind==="picking-dependency"?this.mode.search:null,set:r=>this.mode=r?{kind:"picking-dependency",search:r}:Y};return Pr(t,a,n,i)}#m(t,a,s){switch(s){case"milestones":return _r(t,a,ki(a.state));case"statuses":return Hi(t,a,Zr(a.state),{openFor:this.mode.kind==="picking-icon"?this.mode.statusId:null,toggle:n=>{const i=this.mode.kind==="picking-icon"&&this.mode.statusId===n;this.mode=i?Y:{kind:"picking-icon",statusId:n}},close:()=>this.mode=Y});case"labels":return gr(t,a,vi(a.state));case"members":return Tr(t,a,yi(a.state));case"burndown":return Ji(t,a,new Date);case"map":return this.#h(t,a)}}#h(t,a){return Li({m:t,context:a,drag:this.#n,handlers:{selectStory:s=>this.#g(s),dropOnCell:(s,n)=>this.#b(s,n),dropOnGroupCell:(s,n,i)=>this.#f(s,n,i),dropOnMilestoneRow:(s,n)=>this.#v(s,n),dropOnActivity:s=>this.#y(s),dropOnStep:s=>this.#k(s)},highlighted:An(a.state,a.navigation)})}#g(t){const a=this.context(),s=S(a.state,t);s&&a.navigate({step:s.stepId,story:s.id})}#b(t,a){const s=this.context();s.dispatch(Ta(s.state,t,a.item.id,a.hoveredId,a.place))}#f(t,a,s){const n=this.context(),i=S(n.state,s.item.id);if(!i)return;if(i.activityId!==t){this.mode={kind:"picking-step",storyId:i.id,activityId:t,milestoneId:a,point:{x:s.event.clientX,y:s.event.clientY}};return}const r=Aa(n.state,t,a,i.id,s.hoveredId,s.place);r&&n.dispatch(r)}#v(t,a){const s=this.context(),n=s.state.milestones.map(r=>r.id),i=Ia(n,a.item.id,a.hoveredId,a.place);i&&s.dispatch(i)}#y(t){const a=this.context(),s=a.state.activities.map(i=>i.id),n=bi(s,t.item.id,t.hoveredId,t.place);n&&a.dispatch(n)}#k(t){const a=this.context(),s=fi(a.state,t.item.id,t.hoveredId,t.place);s&&a.dispatch(s)}#w(t){const a=this.mode;if(a.kind!=="picking-step")return;const s=this.context();s.dispatch(_a(s.state,a.storyId,a.activityId,t,a.milestoneId)),this.mode=Y}}const ns=()=>{pi(),ei(),hi(),customElements.get("dpk-template-usm")||customElements.define("dpk-template-usm",ss)},no=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateUsm:ss,IDLE_MODE:Y,allUsmIds:q,applyUsmAction:Ft,defineUsmElement:ns,describeUsmAction:na,dropAfter:gi,emptyUsmBase:Lt,findActivity:Q,findMilestone:P,findStep:M,findStory:S,flatSteps:De,parseUsmBase:It,resolveCellDrop:Ta,resolveGroupDrop:Aa,resolveMilestoneDrop:Ia,resolvePickedStepMove:_a,resolveUsmNavigation:la,serializeUsmAction:ia,storiesInCell:Re,storyCountForStep:Rt,usmAction:dn,usmActions:w,usmCommentTargets:oa,usmCurrentTarget:da,usmDefinitionFor:ca,usmHasTarget:pa,usmMessages:he,usmTargetLabel:ra,usmTitle:ot},Symbol.toStringTag,{value:"Module"}));export{ns as d,no as i};
4210
+ `,U={kind:"idle"},ho={width:300,height:240},go={width:228,height:116},bo=240,fo=31,vo=14,ms=160,yo=1500;class hs extends At{static{this.styles=[At.styles,mo,bt,La,co,Sr,kr,Yr,Cr,Ar,Jr,Ns]}definitionFor(t){return xa(t)}static{this.properties={mode:{state:!0}}}#i=new Ps(this);#e=new Cs(this);#a=null;#n=new qn(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]")});#t=!1;#s=null;#r;constructor(){super(),this.mode=U,new nt(this,{open:()=>this.#o()!==null,closesOn:t=>this.#l(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 nt(this,{open:()=>this.mode.kind==="filtering",closesOn:t=>!t.some(a=>a instanceof Element&&(a.id==="filter-menu"||a.hasAttribute("data-filter-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=U}),new nt(this,{open:()=>this.mode.kind==="choosing-tab",closesOn:t=>!t.some(a=>a instanceof Element&&(a.id==="tabs-menu"||a.hasAttribute("data-tabs-more-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=U})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.#r),this.#s=null}renderRegions(t){return{main:this.#u(t)}}updated(){if(super.updated(),this.#c(),this.#p(),this.mode.kind==="picking-dependency"){this.#d();return}if(this.mode.kind==="picking-icon"){const a=this.renderRoot.querySelector("#icon-menu"),s=this.renderRoot.querySelector(`[data-icon-trigger="${CSS.escape(this.mode.statusId)}"]`);a&&s&&this.#e.open(a,s,go);return}if(this.mode.kind==="filtering"){const a=this.renderRoot.querySelector("#filter-menu"),s=this.renderRoot.querySelector(`[data-filter-trigger="${CSS.escape(this.mode.key)}"]`),n=(a?.childElementCount??0)*fo+vo;a&&s&&this.#e.open(a,s,{width:bo,height:n});return}if(this.mode.kind==="choosing-tab"){const a=this.renderRoot.querySelector("#tabs-menu"),s=this.renderRoot.querySelector("[data-tabs-more-trigger]");if(!a){this.mode=U;return}const n=a.childElementCount*jr+Xr;s&&this.#e.open(a,s,{width:Zr,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,Bs(this.mode.point.x,this.mode.point.y),ho)}#d(){const t=this.renderRoot instanceof ShadowRoot?this.renderRoot.activeElement:null;if(!t?.matches(".sp-dep-search")){this.mode=U;return}const a=t.getAttribute("aria-activedescendant");a&&this.renderRoot.querySelector(`#${CSS.escape(a)}`)?.scrollIntoView?.({block:"nearest"})}#o(){return this.renderRoot.querySelector(".story-panel")}#l(t){const a=this.#o(),s=this.renderRoot.querySelector(".dpk-main");return!a||!s||t.includes(a)||!t.includes(s)?!1:!t.some(n=>n instanceof Element&&(n.localName==="dpk-internal-usm-story-card"||n.hasAttribute("popover")))}#p(){const t=this.#o(),a=t?.dataset.story??null,s=this.#a;if(a===s)return;this.#a=a;const n=this.shadowRoot?.activeElement??null;if(t){(!n||!t.contains(n))&&t.focus({preventScroll:!0});return}s===null||n!==null&&n.isConnected||this.renderRoot.querySelector(`dpk-internal-usm-story-card[data-story="${CSS.escape(s)}"]`)?.focus({preventScroll:!0})}#c(){if(!(Fe(this.navigation)!==null)){this.#t=!1;return}const a=this.renderRoot.querySelector(".map-scroll"),s=a?.querySelector('dpk-internal-usm-story-card[data-highlight="on"]');this.#t||!a||!s||(this.#t=!0,Ys(a,s,ms),Us(a,s,ms))}#u(t){const a=ge(this.locale),s=da(t.state,t.navigation);return l`
4211
+ ${Vr(qr(a,t,s,{folded:this.#n.hidden,minimum:this.#n.minimum,open:this.mode.kind==="choosing-tab",toggle:()=>this.mode=this.mode.kind==="choosing-tab"?U:{kind:"choosing-tab"},close:()=>this.mode=U}),this.#m(a,t,s))}
4212
+ ${this.#b(a,t,s)} ${this.#h(a,t,s)}
4213
+ ${Hr(a,t,this.mode,{confirm:n=>this.#S(n),cancel:()=>this.mode=U})}
4214
+ `}#m(t,a,s){return s!=="map"||Be(a.state).length===0?m:Br(t,a,{openFor:this.mode.kind==="filtering"?this.mode.key:null,toggle:n=>{const i=this.mode.kind==="filtering"&&this.mode.key===n;this.mode=i?U:{kind:"filtering",key:n}},close:()=>this.mode=U})}#h(t,a,s){if(s!=="map")return m;const n=Qr(a);if(!n)return m;const i={search:this.mode.kind==="picking-dependency"?this.mode.search:null,set:o=>this.mode=o?{kind:"picking-dependency",search:o}:U},r={copied:this.#s===ze(n),copy:o=>{this.#g(o)}};return eo(t,a,n,i,r)}async#g(t){await zs(t)&&(clearTimeout(this.#r),this.#s=t,this.requestUpdate(),this.#r=setTimeout(()=>{this.#s=null,this.requestUpdate()},yo))}#b(t,a,s){switch(s){case"milestones":return Pr(t,a,Ri(a.state));case"statuses":return sr(t,a,uo(a.state),{openFor:this.mode.kind==="picking-icon"?this.mode.statusId:null,toggle:n=>{const i=this.mode.kind==="picking-icon"&&this.mode.statusId===n;this.mode=i?U:{kind:"picking-icon",statusId:n}},close:()=>this.mode=U});case"labels":return _r(t,a,Li(a.state));case"members":return Ur(t,a,Di(a.state));case"burndown":return cr(t,a,new Date);case"map":return this.#f(t,a)}}#f(t,a){return Hi({m:t,context:a,drag:this.#i,handlers:{selectStory:s=>this.#v(s),dropOnCell:(s,n)=>this.#y(s,n),dropOnGroupCell:(s,n,i)=>this.#k(s,n,i),dropOnMilestoneRow:(s,n)=>this.#w(s,n),dropOnActivity:s=>this.#x(s),dropOnStep:s=>this.#$(s)},highlighted:zn(a.state,a.navigation)})}#v(t){const a=this.context(),s=E(a.state,t);s&&a.navigate({step:s.stepId,story:s.id})}#y(t,a){const s=this.context();s.dispatch(Ba(s.state,t,a.item.id,a.hoveredId,a.place))}#k(t,a,s){const n=this.context(),i=E(n.state,s.item.id);if(!i)return;if(i.activityId!==t){this.mode={kind:"picking-step",storyId:i.id,activityId:t,milestoneId:a,point:{x:s.event.clientX,y:s.event.clientY}};return}const r=Ya(n.state,t,a,i.id,s.hoveredId,s.place);r&&n.dispatch(r)}#w(t,a){const s=this.context(),n=s.state.milestones.map(r=>r.id),i=za(n,a.item.id,a.hoveredId,a.place);i&&s.dispatch(i)}#x(t){const a=this.context(),s=a.state.activities.map(i=>i.id),n=Ii(s,t.item.id,t.hoveredId,t.place);n&&a.dispatch(n)}#$(t){const a=this.context(),s=Mi(a.state,t.item.id,t.hoveredId,t.place);s&&a.dispatch(s)}#S(t){const a=this.mode;if(a.kind!=="picking-step")return;const s=this.context();s.dispatch(Ua(s.state,a.storyId,a.activityId,t,a.milestoneId)),this.mode=U}}const gs=()=>{$i(),mi(),Ai(),customElements.get("dpk-template-usm")||customElements.define("dpk-template-usm",hs)},ko=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateUsm:hs,IDLE_MODE:U,allUsmIds:W,applyUsmAction:Qt,defineUsmElement:gs,describeUsmAction:ga,dropAfter:_i,emptyUsmBase:zt,findActivity:ee,findMilestone:F,findStep:L,findStory:E,flatSteps:Be,parseUsmBase:Yt,resolveCellDrop:Ba,resolveGroupDrop:Ya,resolveMilestoneDrop:za,resolvePickedStepMove:Ua,resolveUsmNavigation:ka,serializeUsmAction:ba,storiesInCell:Ye,storyCountForStep:Ft,usmAction:kn,usmActions:k,usmCommentTargets:va,usmCurrentTarget:ya,usmDefinitionFor:xa,usmHasTarget:wa,usmMessages:ge,usmTargetLabel:fa,usmTitle:ht},Symbol.toStringTag,{value:"Module"}));export{gs as d,ko as i};