dev-process-kit 0.2.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 (30) 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-BkM7jfZs.js → shared-C5n6LBUz.js} +41 -40
  4. package/dist/chunks/{shared-BCmqTEeQ.js → shared-CAWKGcWJ.js} +55 -53
  5. package/dist/chunks/{shared-DLdJfSN-.js → shared-CdZhkPto.js} +1 -1
  6. package/dist/chunks/{shared-C02b6b2m.js → shared-DB_C1Mdu.js} +1 -1
  7. package/dist/chunks/{shared-Ae8HmujL.js → shared-DDOpqbVL.js} +1 -1
  8. package/dist/chunks/shared-DeXM1v86.js +610 -0
  9. package/dist/chunks/{shared-DbBoZvUP.js → shared-DehzCTC2.js} +179 -172
  10. package/dist/chunks/{shared-v63w_5VP.js → shared-Dfj6O0K4.js} +1 -1
  11. package/dist/chunks/{shared-DnJBtKmH.js → shared-DiFAX1_p.js} +155 -144
  12. package/dist/chunks/{shared-DbnPOaXf.js → shared-DkPo0jX3.js} +236 -232
  13. package/dist/chunks/{shared-Bo8OdTee.js → shared-GL2Z98Cz.js} +1 -1
  14. package/dist/chunks/shared-cMhjZGRs.js +301 -0
  15. package/dist/chunks/{shared-DJruxrrR.js → shared-zZF1zU0o.js} +1 -1
  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-C-7mxPbV.js +0 -301
  29. package/dist/chunks/shared-C-Os1zsf.js +0 -572
  30. package/dist/chunks/shared-DYKbMmHn.js +0 -610
@@ -1,4 +1,4 @@
1
- import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS as je,bd as hs,be as gs,aF as yt,aR as kt,ae as bs,aU as fs,aH as A,al as $,ag as z,ah as C,aG as D,p as g,at as wt,au as b,w as Q,aD as P,aq as vs,P as ys,e as ks,a0 as ws,V as _,R as w,aZ as B,a2 as q,a4 as l,a3 as m,a7 as O,a9 as Xe,ab as Ze,G as xs,j as $s,aX as Ss,aY as Es,b2 as Ts,B as xt,l as X,a5 as Y,F as Je,aK as Z,J as As,bf as $t,K as _e,bg as _s,aL as Is,b9 as Qe,aO as Ms,A as et,ba as Ls,T as St,a1 as Ds,aa as Rs,ax as tt,aP as Os,aB as Ns,bh as Cs,bb as Bs}from"./shared-DnJBtKmH.js";import{r as xe,D as Ys}from"./shared-B5lBiq5s.js";import{L as Us}from"./shared-CjW1DhGL.js";const zs=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],Ps=[["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"}]],Fs=[["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"}]],Gs=[["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"}]],Hs=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Vs=[["circle",{cx:"12",cy:"12",r:"10"}]],Ks=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],qs=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],Ws=[["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"}]],Xs=[["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"}]],Zs=[["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"}]],Js=[["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"}]],Qs=[["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"}]],Et=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),at=(e,t,a)=>{const s=Et(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},en=e=>{const t=Et(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},Ie=["gray","blue","violet","green","amber","accent"],Tt=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],Me=["estimates","assignees"],At=["stories","points","weighted"],_t=y(h(),hs(),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")),It=y(we(),We(),ke(0)),st=y(we(),We(),ke(0)),Mt=K({milestoneId:A(y(h(),$(1))),statusId:A(y(h(),$(1))),stories:y(we(),yt(),ke(0)),points:y(we(),We(),ke(0))}),Le=y(h(),ms()),tn=K({id:y(h(),$(1)),name:y(h(),$(1))}),an=K({id:D,name:y(h(),$(1)),actor:A(h()),steps:z(C(tn),[])}),sn=K({id:y(h(),$(1)),name:y(h(),$(1)),timeframe:A(h()),description:A(h()),dueDate:A(_t)}),se=Ae(Ie),nt=Ae(Tt),it=y(h(),gs(),je(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),nn=K({url:it,label:A(y(h(),$(1)))}),rn=K({id:D,name:y(h(),$(1)),tone:z(se),icon:z(nt),weight:A(It)}),on=K({id:D,name:y(h(),$(1)),tone:z(se)}),Lt=y(h(),je(e=>e.trim()!=="","a comment needs some text")),dn=K({id:D,body:Lt,createdAt:A(Le)}),Dt=y(we(),yt(),ke(1)),ln=K({id:D,number:A(Dt),name:y(h(),$(1)),description:A(h()),activityId:y(h(),$(1)),stepId:y(h(),$(1)),milestoneId:A(h()),statusId:A(h()),links:A(C(nn)),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(dn))}),pn=K({id:D,name:y(h(),$(1)),tone:z(se)}),Rt=Ae(Me),Ot=Ae(At),cn=K({id:D,name:y(h(),$(1)),points:st}),un=K({id:D,at:Le,tally:C(Mt)}),mn=K({title:A(h()),features:z(C(Rt),[]),measure:A(Ot),doneStatusId:A(y(h(),$(1))),activities:z(C(an),[]),milestones:z(C(sn),[]),statuses:z(C(rn),[]),labels:z(C(on),[]),members:z(C(pn),[]),estimates:z(C(cn),[]),stories:z(C(ln),[]),snapshots:z(C(un),[])}),rt=e=>Ie[e%Ie.length]??"gray",De=e=>rt(e+1),Nt=e=>{const t=bs(mn,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??rt(T),icon:c.icon??"progress"})),labels:t.labels.map((c,T)=>({...c,tone:c.tone??De(T)})),members:t.members.map((c,T)=>({...c,tone:c.tone??De(T)})),features:Me.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 vt=ve.find(ye=>!u.has(ye));if(vt!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${vt}"`);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=Ct(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=en(r.stories);if(ue!==null)throw new Error(`stories block one another in a cycle: ${ue.join(" \u2192 ")}`);return r},Ct=(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=Re(s);if(a.has(n))return`tallies "${n}" twice`;a.add(n)}return null},Re=e=>`${e.milestoneId??""}/${e.statusId??""}`,Bt=()=>({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=fs(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)},hn=(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)},gn=(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)},Oe=e=>e.activities.flatMap(t=>t.steps.map(a=>({activity:t,step:a}))),bn=e=>({...e,stories:kt(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Ne=(e,t,a)=>e.stories.filter(s=>s.stepId===t&&(s.milestoneId??void 0)===a),Yt=(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)],Ut=(e,t)=>e.stories.filter(a=>a.stepId===t).length,zt=b({feature:Rt,enabled:vs()}),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(Dt)}),{dedupeKey:Q}),DELETE_STORY:g("DELETE_STORY","story",b({})),ADD_STORY_LINK:g("ADD_STORY_LINK","story",b({url:it,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:Lt,createdAt:A(Le)}),{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(_t)})),ADD_STATUS:g("ADD_STATUS","page",b({id:D,name:y(h(),$(1)),tone:se,icon:A(nt)}),{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:nt})),SET_STATUS_WEIGHT:g("SET_STATUS_WEIGHT","status",b({weight:It})),SET_MEASURE:g("SET_MEASURE","page",b({measure:Ot})),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:st}),{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:st})),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:Le,tally:C(Mt)}),{dedupeKey:Q}),DELETE_SNAPSHOT:g("DELETE_SNAPSHOT","snapshot",b({})),SET_FEATURE:g("SET_FEATURE","page",zt,{dedupeKey:e=>{const t=wt(zt,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},fn={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},Pt=e=>e.statuses[me(e)],Ft=(e,t)=>{if(t===void 0)return!1;const a=e.statuses.findIndex(s=>s.id===t);return a>=0&&a>=me(e)},Gt=e=>e.statuses.slice(0,me(e)+1),vn=(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",Ht=e=>e.weight??1,ae=10,Vt=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(Ht),n=Ce(s),i=s.map(r=>n>0?r/n:1/s.length);return t.map((r,o)=>Ce(i.slice(o)))},yn=1,Kt=(e,t)=>H(e,t.estimateId)?.points??yn,qt=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=Re(i),o=t.get(r)??{...i,stories:0,points:0};t.set(r,{...o,stories:o.stories+1,points:o.points+Kt(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(Re({milestoneId:n,statusId:i}));return r?[r]:[]}))},kn=(e,t,a)=>{const s=he(e),i=[...kt(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:a,tally:qt(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:wn(e.statuses,d.tally,t,s)})),r=Vt(e),o=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:xn(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,Ce(u.values.slice(0,p+1))))}))}},wn=(e,t,a,s)=>e.map(n=>Ce(t.filter(i=>i.milestoneId===a&&i.statusId===n.id).map(i=>s==="stories"?i.stories:i.points))),xn=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())}`},Ce=e=>e.reduce((t,a)=>t+a,0),Wt="STORY-",Be=e=>`${Wt}${e.number}`,jt=(...e)=>Math.max(0,...e.flatMap(t=>t.stories.map(a=>a.number)))+1,$n=(e,t)=>{if(t===void 0)return;const a=E(e,t);if(a)return a;const s=new RegExp(`^${Wt}([1-9]\\d*)$`,"i").exec(t.trim());if(!s)return;const n=Number(s[1]);return e.stories.find(i=>i.number===n)},Xt=(e,t)=>{const a=ys(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 dt({...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?dt({...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?ot(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?{...ot(i),activityId:r.activity.id,stepId:r.step.id}:{...i,activityId:r.activity.id,stepId:r.step.id,milestoneId:o};return Qt(e,d,n.after)}case"REORDER_STORY":{const{after:n}=a.payload,i=E(e,s);return i?Qt(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)?dt(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?ot(n):n),snapshots:lt(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:lt(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?Sn(r):{...r,statusId:i}),snapshots:lt(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)?Zt(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=>Zt(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||at(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=>Jt(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:Ct(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=Me.filter(o=>o===n?i:e.features.includes(o));return{...e,features:r}}default:return ks(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,ot=e=>{const{milestoneId:t,...a}=e;return a},Zt=(e,t)=>{const{labelIds:a=[],...s}=e,n=a.filter(i=>i!==t);return n.length===0?s:{...s,labelIds:n}},Jt=(e,t)=>{const{blockedBy:a=[],...s}=e,n=a.filter(i=>!t.has(i));return n.length===0?s:{...s,blockedBy:n}},dt=(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))?Jt(s,a):s)}},oe=(e,t)=>{const{[t]:a,...s}=e;return s},lt=(e,t)=>e.snapshots.map(a=>{const s=new Map;for(const n of a.tally.map(t)){const i=Re(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()]}}),Sn=e=>{const{statusId:t,...a}=e;return a},Qt=(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]:ea(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 ea(n,s,a)},ea=(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=ws({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)=>aa("en-US",e,t),commentDate:e=>ta("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)=>aa("ja-JP",e,t),commentDate:e=>ta("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"}}),ta=(e,t)=>new Intl.DateTimeFormat(e,{dateStyle:"medium",timeStyle:"short"}).format(new Date(t)),aa=(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)}},pt=/^[A-Z][A-Z0-9]+-\d+$/,sa=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},En=(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}},Tn=(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}},An=(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=>pt.test(n));return s&&pt.test(s)?{kind:"jira",text:s,title:`${t} ${s}`}:{kind:"jira",text:"Jira",title:t}},_n=(e,t)=>{if(e!=="linear.app")return null;const a=t[1]==="issue"?t[2]?.toUpperCase():void 0;return a&&pt.test(a)?{kind:"linear",text:a,title:a}:{kind:"linear",text:"Linear",title:e}},In=(e,t)=>{if(e!=="figma.com")return null;const[a,,s]=t;if((a==="file"||a==="design"||a==="proto"||a==="board")&&s){const n=sa(s);return{kind:"figma",text:n,title:n}}return{kind:"figma",text:"Figma",title:e}},Mn=(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":sa(s);return{kind:"notion",text:n,title:n}},Ye=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 En(a,s)??Tn(a,s)??An(t,a,s)??_n(a,s)??In(a,s)??Mn(a,s)??{kind:"web",text:a,title:e}},Ln=["map","milestones","statuses","labels","members","burndown"],Dn={members:"assignees",burndown:"estimates"},na=e=>Ln.filter(t=>{const a=Dn[t];return a===void 0||J(e,a)}),ia=(e,t)=>na(e).find(a=>a===t.tab)??"map",Se=(e,t)=>Ft(e,t.statusId),ra=(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)}},Rn=(e,t)=>{const a=new Set(E(e,t)?.blockedBy??[]);return e.stories.filter(s=>s.id!==t&&!a.has(s.id)&&!at(e.stories,s.id,t))},On=(e,t)=>e.stories.filter(a=>a.id!==t&&!a.blockedBy?.includes(t)&&!at(e.stories,t,a.id)),Nn=["critical-path"],Ue=e=>Nn.find(t=>t===e.highlight)??null,Cn=(e,t)=>{if(Se(e,t))return 0;const a=he(e)==="stories"?1:Kt(e,t),s=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return a*(Vt(e)[s]??1)},Bn=(e,t)=>Ue(t)==="critical-path"?oa(e).ids:null,Yn=1e-9,oa=e=>{const t=new Map(e.stories.map(d=>[d.id,Cn(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=da(t,a),i=da(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<Yn).map(([d])=>d)),work:o}},da=(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"},la=(e,t)=>t[ie.key]===ie.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(a=>Ft(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]}},ze=(e,t)=>{const a=la(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}},pa=(e,t,a)=>{const s=be(e,t).filter(n=>a.has(n));return s.length===0?null:s.join(",")},Un=(e,t)=>{const a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a},zn=e=>Ee.some(t=>e[t].size>0),ca=(e,t)=>{const a=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&Pe(e.status,t.statusId===void 0?[]:[t.statusId])&&Pe(e.label,a.length===0?[ne]:a)&&Pe(e.estimate,[t.estimateId??ne])&&Pe(e.assignee,[t.assigneeId??ne])},Pe=(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,Pn={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??Ye(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??Ye(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,Pt(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)}}},ua=(e,t,a,s)=>{let n;try{const i=Pn[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:ha(e,a,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},ma=e=>`${e.type} ${_(e.target)} ${JSON.stringify(e.payload)}`,ha=(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,ct(t));default:return`${a.type} \xB7 ${a.id}`}}catch{return`${a.type} \xB7 ${a.id}`}},ga=(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},ba=(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},ct=e=>e.title??"User Story Mapping",Fn=(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}},fa=(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=$n(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=ze(e,t);for(const u of Ee){const f=pa(e,u,o[u]);f===null?delete r[u]:r[u]=f}t[ie.key]!==ie.value&&delete r[ie.key];const d=ia(e,t);d==="map"?delete r.tab:r.tab=d,F(e,t.milestone)||delete r.milestone;const p=Ue(t);return p===null?delete r.highlight:r.highlight=p,r},va=(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}},ya=e=>{const t=ge(e);return{name:"usm",label:"User Story Mapping",parseBase:Nt,emptyBase:Bt,actions:k,apply:Xt,canonicalState:bn,hasTarget:va,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)=>ua(t,a,s,n),serialize:ma,resolveNavigation:fa,navigationFor:Fn,commentTargets:(a,s)=>ga(t,a),currentTarget:(a,s)=>ba(t,a,s),settings:a=>({items:Me.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:ct}},ka=.5,Gn=({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+ka)return[];const r=t-s+ka,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])},wa=new Set;class Hn{#i;#e;#a=wa;#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?xa(i):0,o=this.#e.more(t),d=o?o.getBoundingClientRect().width+xa(t):0,p=Gn({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);Vn(u,this.#a)&&f===this.#n||(this.#a=u.size===0?wa:u,this.#n=f,this.#i.requestUpdate())}}const xa=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,Vn=(e,t)=>e.size===t.size&&[...e].every(a=>t.has(a)),ut=1440*60*1e3,Kn=48,qn=8,Wn=(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<ut&&(r-=ut/2,o+=ut/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=Zn(r,o,Math.floor((n.right-n.left)/Kn));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=Xn(e/4),a=Math.max(1,Math.ceil(e/t));return Array.from({length:a+1},(s,n)=>n*t)},Xn=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,Zn=(e,t,a)=>{const s=Math.max(1,a),n=["day","week","biweek","month","quarter"];for(const i of n){const r=$a(i,e,t,s);if(r!==null)return{unit:i,ats:r}}return{unit:"year",ats:$a("year",e,t,1/0)??[]}},$a=(e,t,a,s)=>{const n=[];for(let i=Jn(e,t);i<=a;i=Qn(e,i)){if(n.length===s)return null;n.push(i)}return n},Jn=(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))}},Qn=(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()},Sa=(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)<=qn?r:null,d=o?.at??s.start+(i-a.left)/(a.right-a.left)*(s.end-s.start),p=o?.value??ei(n,d),u=ti(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}},ei=(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},ti=(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})`,Ea={circle:B(Vs),lightbulb:B(Xs),flag:B(js),play:B(Gs),clock:B(Ks),eye:B(Ws),pause:B(Fs),check:B(zs),x:B(Hs)},ai=B(Ps),si=e=>{if(e>=1)return Ea.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
3
  ${e>0?O`<circle
4
4
  class="si-pie"
@@ -8,14 +8,14 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS 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?ai():e.icon==="progress"?si(e.progress??1):Ea[e.icon]();return l`<span class="status-icon">${t}</span>`},Ta=(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
16
  style=${`${M(a.tone)};flex-grow:${a.count}`}
17
17
  ></span>`)}
18
- </span>`,mt=q`
18
+ </span>`,bt=q`
19
19
  .status-icon {
20
20
  display: block;
21
21
  flex: none;
@@ -45,7 +45,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
45
45
  .status-bar-part[data-status=''] {
46
46
  background: color-mix(in srgb, var(--dpk-ink-faint) 30%, transparent);
47
47
  }
48
- `,ni=q`
48
+ `,oi=q`
49
49
  :host {
50
50
  position: relative;
51
51
  display: block;
@@ -178,7 +178,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
178
178
  .bd-swatch[data-line='ideal'] {
179
179
  border-top: 1.5px dashed var(--dpk-ink-faint);
180
180
  }
181
- `;class ii extends Xe{static{this.styles=[ni]}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 Ze(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=Wn(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"
@@ -191,10 +191,10 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
191
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
- ${ri(t,a)} ${oi(a)} ${this.readout?di(a,this.readout):m}
194
+ ${li(t,a)} ${pi(a)} ${this.readout?ci(a,this.readout):m}
195
195
  </svg>
196
- ${this.readout?li(t,a,this.readout):m}
197
- </div>`}#e(t,a){const s=this.renderRoot.querySelector("svg")?.getBoundingClientRect();!s||s.width===0||(this.readout=Sa(t,(a.clientX-s.left)/s.width*t.size.width))}#a(t,a){const s=t.dots[a];this.readout=s?Sa(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 ri=(e,t)=>{const{plot:a,size:s}=t,n=s.height-8;return O`
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
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
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>
@@ -203,15 +203,15 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
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
- `},oi=e=>O`
206
+ `},pi=e=>O`
207
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
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
- `,di=(e,t)=>O`
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
212
  ${t.idealY===null?m:O`<circle class="bd-mark" data-line="ideal" cx=${t.x} cy=${t.idealY} r="3.5"></circle>`}
213
213
  ${t.actualY===null?m:O`<circle class="bd-mark" data-line="actual" cx=${t.x} cy=${t.actualY} r="4.5"></circle>`}
214
- `,li=(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
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 y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS 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>`},pi=()=>{customElements.get("dpk-internal-usm-burndown-chart")||customElements.define("dpk-internal-usm-burndown-chart",ii)},ci=new Intl.Segmenter(void 0,{granularity:"grapheme"}),ht=e=>{const[t]=ci.segment(e.trim());return t?t.segment.toUpperCase():"?"},ui={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>`},Aa=e=>e==="web"?xs():l`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${ui[e]}</svg>`,_a=q`
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 y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
266
266
  text-overflow: ellipsis;
267
267
  white-space: nowrap;
268
268
  }
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:Ia(s,t)}))},Ia=(e,t)=>t<=0?1:Math.min(1,e/t),Ma=(e,t)=>e.find(a=>a.id===t.statusId),La=(e,t)=>ce(e).map(a=>({...a,count:t.filter(s=>s.statusId===a.id).length})).filter(a=>a.count>0),mi=B(Zs),hi=B(Us),gi=3,bi=q`
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
@@ -605,27 +605,27 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
605
605
  border-color: color-mix(in oklab, var(--card-tone) 16%, var(--dpk-rule));
606
606
  background: var(--dpk-paper-raised);
607
607
  }
608
- `;class fi extends Xe{static{this.styles=[$s,mt,_a,bi]}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 Ze(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`
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`
609
609
  <div class="card-head">
610
610
  ${this.statuses.length===0?m:this.#e(a,t)}
611
611
  <div class="card-name"><span>${t.name}</span></div>
612
612
  ${this.estimate||this.assignee?this.#a(a):m}
613
613
  </div>
614
- ${t.description?l`<div class="card-text" @click=${yi}>${Ss(Es(t.description))}</div>`:m}
614
+ ${t.description?l`<div class="card-text" @click=${xi}>${As(_s(t.description))}</div>`:m}
615
615
  ${this.blocks>0||this.waits>0?this.#n(a):m}
616
- ${this.labels.length>0?vi(this.labels):m}
616
+ ${this.labels.length>0?wi(this.labels):m}
617
617
  ${t.links&&t.links.length>0?this.#t(t.links):m}
618
618
  <div class="card-foot">
619
- <span class="card-key">${Be(t)}</span>
619
+ <span class="card-key">${ze(t)}</span>
620
620
  ${this.stepName===""?m:l`<span class="card-chip" data-kind="step"><span>${this.stepName}</span></span>`}
621
621
  ${s>0?l`<span class="card-chip" data-kind="comments" aria-label=${a.commentCountAria(s)}>
622
- ${Ts()}<span>${s}</span>
622
+ ${Is()}<span>${s}</span>
623
623
  </span>`:m}
624
624
  ${this.reviewCount>0?l`<span class="card-chip" data-kind="review" aria-label=${a.reviewCountAria(this.reviewCount)}>
625
- ${xt()}<span>${this.reviewCount}</span>
625
+ ${Et()}<span>${this.reviewCount}</span>
626
626
  </span>`:m}
627
627
  </div>
628
- `}#e(t,a){const s=Ma(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}>
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}>
629
629
  ${re(s)}
630
630
  </span>`}#a(t){const{estimate:a,assignee:s}=this;return l`<span class="card-meta">
631
631
  ${a?l`<span
@@ -637,17 +637,17 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
637
637
  class="assignee-avatar"
638
638
  style=${M(s.tone)}
639
639
  title=${t.assigneeChipTitle(s.name)}
640
- >${ht(s.name)}</span
640
+ >${ft(s.name)}</span
641
641
  >`:m}
642
642
  </span>`}#n(t){return l`<div class="card-deps">
643
643
  ${this.blocks>0?l`<span class="dep-chip" data-kind="blocks" title=${t.blocksChipTitle(this.blocks)}
644
- >${mi()}${t.blocksChip(this.blocks)}</span
644
+ >${bi()}${t.blocksChip(this.blocks)}</span
645
645
  >`:m}
646
646
  ${this.waits>0?l`<span class="dep-chip" data-kind="waits" title=${t.waitsChipTitle(this.waits)}
647
- >${hi()}${t.waitsChip(this.waits)}</span
647
+ >${fi()}${t.waitsChip(this.waits)}</span
648
648
  >`:m}
649
- </div>`}#t(t){const a=t.slice(0,gi);return l`<div class="card-links">
650
- ${a.map(s=>{const n=Ye(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
651
651
  class="link-chip"
652
652
  data-kind=${n.kind}
653
653
  href=${s.url}
@@ -657,12 +657,12 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
657
657
  draggable="false"
658
658
  tabindex="-1"
659
659
  @click=${i=>i.stopPropagation()}
660
- >${Aa(n.kind)}<span>${s.label??n.text}</span></a
660
+ >${Ma(n.kind)}<span>${s.label??n.text}</span></a
661
661
  >`})}
662
662
  ${t.length>a.length?l`<span class="link-chip">+${t.length-a.length}</span>`:m}
663
- </div>`}}const vi=e=>l`<div class="card-labels">
663
+ </div>`}}const wi=e=>l`<div class="card-labels">
664
664
  ${e.map(t=>l`<span class="label-chip" data-label=${t.id} style=${M(t.tone)}>${t.name}</span>`)}
665
- </div>`,yi=e=>{e.target instanceof Element&&e.target.closest("a")&&e.stopPropagation()},ki=()=>{customElements.get("dpk-internal-usm-story-card")||customElements.define("dpk-internal-usm-story-card",fi)},Da=e=>{const t=e.slice(0,-1).map(Ht),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))},Ra=(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)},Fe=e=>[...e,ae].map((t,a)=>t-(e[a-1]??0)),wi=(e,t)=>{const a=Fe(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}]})},xi=q`
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`
666
666
  :host {
667
667
  display: block;
668
668
  }
@@ -808,16 +808,16 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
808
808
  transition: none;
809
809
  }
810
810
  }
811
- `;class $i extends Xe{static{this.styles=[mt,xi]}static{this.properties={statuses:{attribute:!1},dividers:{attribute:!1},commit:{attribute:!1},drag:{state:!0}}}#i=new Ze(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=Fe(n),r=o=>`${o/ae*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">
812
812
  <div class="wb-track" role="group" aria-label=${t.statusWeightLabel} ?data-dragging=${this.drag!==null}>
813
813
  <div class="wb-parts">
814
814
  ${a.map((o,d)=>{const p=n[d-1]??0,u=i[d]??0;return l`<span
815
815
  class="wb-part"
816
816
  data-part=${o.id}
817
- title=${`${o.name} ${Ge(u)}`}
817
+ title=${`${o.name} ${Ke(u)}`}
818
818
  style=${`${M(o.tone)}; left: ${r(p)}; width: ${r(u)}`}
819
819
  >
820
- <span class="wb-name">${o.name}</span><span class="wb-value">${Ge(u)}</span>
820
+ <span class="wb-name">${o.name}</span><span class="wb-value">${Ke(u)}</span>
821
821
  </span>`})}
822
822
  </div>
823
823
  ${n.map((o,d)=>this.#e(t,a,n,d,r(o)))}
@@ -828,7 +828,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
828
828
  <span class="wb-scale-end" data-at="0">0</span>
829
829
  <span class="wb-scale-end" data-at="max">${ae}</span>
830
830
  </div>
831
- </div>`}#e(t,a,s,n,i){const r=a[n]?.name??"",o=a[n+1]?.name??"",d=Fe(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
832
832
  class="wb-line"
833
833
  role="slider"
834
834
  tabindex="0"
@@ -837,29 +837,29 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
837
837
  aria-valuemin=${String(s[n-1]??0)}
838
838
  aria-valuemax=${String(s[n+1]??ae)}
839
839
  aria-valuenow=${String(p)}
840
- aria-valuetext=${t.weightLineValue(r,Ge(d[n]??0),o,Ge(d[n+1]??0))}
840
+ aria-valuetext=${t.weightLineValue(r,Ke(d[n]??0),o,Ke(d[n+1]??0))}
841
841
  ?data-active=${this.drag?.index===n}
842
842
  @keydown=${u=>this.#a(u,n)}
843
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(Ra(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:Ra(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 Ge=e=>String(Math.round(e*10)/10),Si=()=>{customElements.get("dpk-internal-usm-weight-bar")||customElements.define("dpk-internal-usm-weight-bar",$i)},Ei=(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},Oa=(e,t,a,s,n)=>{const i=Ne(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)}}},Na=(e,t,a,s,n,i)=>{const r=E(e,s);if(!r||r.activityId!==t)return null;const o=Yt(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)}}},Ca=(e,t,a,s,n)=>{const i=Ne(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}}},Ba=(e,t,a,s)=>e.includes(t)?{type:"REORDER_MILESTONE",target:{type:"milestone",id:t},payload:{after:xe(e,t,a,s)}}:null,Ti=(e,t,a,s)=>e.includes(t)?{type:"REORDER_ACTIVITY",target:{type:"activity",id:t},payload:{after:xe(e,t,a,s)}}:null,Ai=(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)}}},_i=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}})}},Ii=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}})}},Mi=e=>{const t=e.stories.length,a=Oe(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:La(e,i)}})},Ya=(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},Li=(e,t)=>{const a=t.flatMap(d=>{const p=Ya(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=>Ya(e,d)?{left:d.left-n,top:d.top-i,width:d.width,height:d.height}:null)}},Di=(e,t,a)=>{const s=e.dataTransfer;if(!s)return;const n=Li(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=He(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)},He=e=>{if(e instanceof Element&&e.shadowRoot)return Ri(e,e.shadowRoot);const t=e.cloneNode(!1);t instanceof Element&&t.removeAttribute("id");for(const a of e.childNodes)t.appendChild(He(a));return t},Ri=(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(He(r));for(const r of e.childNodes)a.appendChild(He(r));return a},Ua=(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})},Oi=(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}})},za=(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}})},Pa=(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})},Ni=(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:rt(t.state.statuses.length)}})},Ci=(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:De(t.state.labels.length)}})},Bi=(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:De(t.state.members.length)}})},Yi=(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}})},Ui=(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:qt(e.state)}})},Fa=(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)}]},zi=(e,t)=>l`
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`
845
845
  <div class="empty">
846
846
  <h2>${e.emptyTitle}</h2>
847
847
  <p>${e.emptyBody}</p>
848
- <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>Ua(e,t)}>
848
+ <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>Fa(e,t)}>
849
849
  ${e.firstActivityButton}
850
850
  </button>
851
851
  </div>
852
- `,Pi=e=>{const{m:t,context:a}=e,s=Oe(a.state);return s.length===0?zi(t,a):Ga(a)==="activity"?Gi(e,s):Hi(e)},Ga=e=>e.navigation.view==="group"?"group":"activity",Fi=(e,t)=>{const a=Ga(t);return l`<div class="segmented view-tabs" role="tablist" aria-label=${e.groupingLabel}>
853
- ${Ha(t,"activity",a,e.activityGroup)}
854
- ${Ha(t,"group",a,e.groupViewTab)}
855
- </div>`},Ha=(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
856
856
  class="tab"
857
857
  role="tab"
858
858
  data-current=${String(n)}
859
859
  aria-selected=${n?"true":"false"}
860
860
  href=${e.hashFor({view:t})}
861
861
  >${s}</a
862
- >`},Gi=(e,t)=>{const{m:a,context:s}=e,{state:n}=s,i=Fa(a,n);return l`
862
+ >`},Ki=(e,t)=>{const{m:a,context:s}=e,{state:n}=s,i=Va(a,n);return l`
863
863
  <div class="map-scroll">
864
864
  <div class="map" style=${`--cols:${t.length+1}`} data-testid="usm-map">
865
865
  <div class="map-head">
@@ -867,47 +867,48 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
867
867
  <div class="corner">
868
868
  <span class="dpk-label">${a.groupAxisHeader}</span>
869
869
  </div>
870
- ${Y(n.activities,r=>r.id,r=>Ka(e,r.id,`grid-column: span ${Math.max(r.steps.length,1)}`))}
871
- ${Wa(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)}
872
872
  </div>
873
873
  <div class="map-row">
874
- ${Va(a)}
875
- ${Y(t,({activity:r,step:o})=>`${r.id}.${o.id}`,({activity:r,step:o})=>Vi(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))}
876
876
  <div class="corner"><span class="dpk-label">—</span></div>
877
877
  </div>
878
878
  </div>
879
- ${Y(i,r=>r.id,r=>Xa(e,r,l`${Y(t,({activity:o,step:d})=>`${o.id}.${d.id}`,({activity:o,step:d})=>qi(e,{activityId:o.id,stepId:d.id,milestoneId:r.id}))}`))}
880
- ${ja(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)}
881
881
  </div>
882
882
  </div>
883
- `},Hi=e=>{const{m:t,context:a}=e,{state:s}=a,n=Fa(t,s);return l`
883
+ `},qi=e=>{const{m:t,context:a}=e,{state:s}=a,n=Va(t,s);return l`
884
884
  <div class="map-scroll">
885
885
  <div class="map" style=${`--cols:${s.activities.length+1}`} data-testid="usm-map-group">
886
886
  <div class="map-head">
887
887
  <div class="map-row">
888
- ${Va(t)}
889
- ${Y(s.activities,i=>i.id,i=>Ka(e,i.id,void 0,!0))}
890
- ${Wa(t,a)}
888
+ ${Wa(t)}
889
+ ${Y(s.activities,i=>i.id,i=>ja(e,i.id,void 0,!0))}
890
+ ${Za(t,a)}
891
891
  </div>
892
892
  </div>
893
- ${Y(n,i=>i.id,i=>Xa(e,i,l`${Y(s.activities,r=>r.id,r=>Wi(e,r.id,i.id))}`))}
894
- ${ja(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)}
895
895
  </div>
896
896
  </div>
897
- `},Va=e=>l`<div class="corner">
897
+ `},Wa=e=>l`<div class="corner">
898
898
  <span class="dpk-label">${e.activityAxis}</span>
899
899
  <span class="dpk-label">${e.milestoneAxis}</span>
900
- </div>`,Ka=(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=La(o,p),f=r.combine("activity",Ve(e,d.id)),x=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`
901
901
  <div
902
902
  class="act-head"
903
903
  style=${a??""}
904
904
  data-activity=${d.id}
905
905
  data-column=${d.id}
906
906
  data-dpk-target=${_({type:"activity",id:d.id})}
907
+ data-grill-questions=${Le(Ie(d.questions))}
907
908
  draggable="true"
908
909
  data-col-dragging=${String(r.isDragging("activity",d.id))}
909
- data-col-drop=${Ke(r,d.id)}
910
- @dragstart=${v=>{ts(v,d.id),x.dragstart(v)}}
910
+ data-col-drop=${je(r,d.id)}
911
+ @dragstart=${v=>{ns(v,d.id),x.dragstart(v)}}
911
912
  @dragend=${x.dragend}
912
913
  @dragenter=${f.dragenter}
913
914
  @dragover=${f.dragover}
@@ -915,7 +916,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
915
916
  @drop=${f.drop}
916
917
  >
917
918
  <div class="act-title">
918
- <span class="col-grip" aria-hidden="true">${Je()}</span>
919
+ <span class="col-grip" aria-hidden="true">${tt()}</span>
919
920
  <span class="act-name">
920
921
  <dpk-component-inline-edit
921
922
  draggable="false"
@@ -939,17 +940,17 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
939
940
  class="dpk-icon-btn"
940
941
  type="button"
941
942
  aria-label=${n.addStepAria}
942
- @click=${()=>Oi(n,i,d.id)}
943
+ @click=${()=>Bi(n,i,d.id)}
943
944
  >
944
- ${As()}
945
+ ${Ms()}
945
946
  </button>
946
947
  </div>
947
- ${Ta(u,n.progressAria(u.map(v=>`${v.name} ${v.count}`).join(", ")))}
948
+ ${Ia(u,n.progressAria(u.map(v=>`${v.name} ${v.count}`).join(", ")))}
948
949
  ${s&&d.steps.length>0?l`<ol class="act-steps">
949
950
  ${d.steps.map(v=>l`<li>${v.name}</li>`)}
950
951
  </ol>`:m}
951
952
  </div>
952
- `},Vi=(e,t,a)=>{const{m:s,context:n,drag:i}=e,r=te(t,a.id),o=i.combine("step",Ve(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`
953
954
  <div
954
955
  class="col-head"
955
956
  data-step=${r}
@@ -957,18 +958,19 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
957
958
  data-column-step=${a.id}
958
959
  data-current=${String(n.navigation.step===a.id)}
959
960
  data-dpk-target=${_({type:"step",id:r})}
961
+ data-grill-questions=${Le(Ie(a.questions))}
960
962
  draggable="true"
961
- data-col-dragging=${String(gt(i,t,a.id))}
962
- data-col-drop=${Ke(i,t,a.id)}
963
- data-step-edge=${qa(n.state,t,a.id)}
964
- @dragstart=${p=>{ts(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)}}
965
967
  @dragend=${d.dragend}
966
968
  @dragenter=${o.dragenter}
967
969
  @dragover=${o.dragover}
968
970
  @dragleave=${o.dragleave}
969
971
  @drop=${o.drop}
970
972
  >
971
- <span class="col-grip" aria-hidden="true">${Je()}</span>
973
+ <span class="col-grip" aria-hidden="true">${tt()}</span>
972
974
  <h4>
973
975
  <dpk-component-inline-edit
974
976
  draggable="false"
@@ -978,22 +980,22 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
978
980
  @click=${p=>p.stopPropagation()}
979
981
  ></dpk-component-inline-edit>
980
982
  </h4>
981
- <span class="count">${Ut(n.state,a.id)}</span>
983
+ <span class="count">${Ft(n.state,a.id)}</span>
982
984
  </div>
983
- `},Ve=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=n.target({key:`activity:${t}`,accepts:"activity",hovered:es(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:es(p),onDrop:f=>i.dropOnStep(f)});return[["activity",r],["step",u]]},Ke=(e,t,a)=>e.isOver(`activity:${t}`)?"activity":a!==void 0&&e.isOver(`step:${te(t,a)}`)?"step":"none",qa=(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(" ")},gt=(e,t,a)=>e.isDragging("activity",t)||a!==void 0&&e.isDragging("step",te(t,a)),Wa=(e,t)=>l`<div class="act-head">
984
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ua(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)}>
985
987
  ${e.newActivityButton}
986
988
  </button>
987
- </div>`,ja=(e,t,a)=>l`<div class="map-row">
989
+ </div>`,Ja=(e,t,a)=>l`<div class="map-row">
988
990
  <div class="row-lead">
989
991
  <div class="row-head">
990
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>za(e,t)}>
992
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ga(e,t)}>
991
993
  ${e.newMilestoneButton}
992
994
  </button>
993
995
  </div>
994
996
  </div>
995
997
  ${Array.from({length:a+1},()=>l`<div class="cell"></div>`)}
996
- </div>`,Xa=(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
997
999
  class="map-row"
998
1000
  data-unassigned="true"
999
1001
  data-draggable="false"
@@ -1002,11 +1004,11 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1002
1004
  >
1003
1005
  <div class="row-lead">
1004
1006
  <div class="row-head" data-milestone="" draggable="false"><span>${t.name}</span></div>
1005
- ${Za(s,t)}
1007
+ ${es(s,t)}
1006
1008
  </div>
1007
1009
  ${a}
1008
1010
  <div class="cell"></div>
1009
- </div>`;const d=Ki(s,n,o,t.name),p=`row:${o}`,u=i.target({key:p,accepts:"milestone",hovered:Ji,onDrop:x=>r.dropOnMilestoneRow(o,x)}),f=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`
1010
1012
  <div
1011
1013
  class="map-row"
1012
1014
  data-draggable="true"
@@ -1022,26 +1024,27 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1022
1024
  class="row-head"
1023
1025
  data-milestone=${o}
1024
1026
  data-dpk-target=${_({type:"milestone",id:o})}
1027
+ data-grill-questions=${Le(Ie(t.questions))}
1025
1028
  draggable="true"
1026
- @dragstart=${x=>{Zi(x),f.dragstart(x)}}
1029
+ @dragstart=${x=>{er(x),f.dragstart(x)}}
1027
1030
  @dragend=${f.dragend}
1028
1031
  >
1029
- <span class="row-grip" aria-hidden="true">${Je()}</span>${d}
1032
+ <span class="row-grip" aria-hidden="true">${tt()}</span>${d}
1030
1033
  </div>
1031
- ${Za(s,t)}
1034
+ ${es(s,t)}
1032
1035
  </div>
1033
1036
  ${a}
1034
1037
  <div class="cell"></div>
1035
1038
  </div>
1036
- `},Za=(e,t)=>l`<div class="row-meta">
1039
+ `},es=(e,t)=>l`<div class="row-meta">
1037
1040
  ${t.timeframe===""?m:l`<span class="row-timeframe">${t.timeframe}</span>`}
1038
1041
  <span class="row-count">${e.storyCount(t.storyCount)}</span>
1039
- </div>`,Ki=(e,t,a,s)=>l`<dpk-component-inline-edit
1042
+ </div>`,ji=(e,t,a,s)=>l`<dpk-component-inline-edit
1040
1043
  draggable="false"
1041
1044
  .value=${s}
1042
1045
  .label=${e.milestoneNameLabel}
1043
1046
  @dpk-commit=${Z(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:a},payload:{name:n}}))}
1044
- ></dpk-component-inline-edit>`,qi=(e,t)=>{const{m:a,context:s,drag:n,handlers:i}=e,r=ze(s.state,s.navigation),o=Ne(s.state,t.stepId,t.milestoneId).filter(u=>ca(r,u)),d=`cell:${t.stepId}:${t.milestoneId??""}`,p=n.combine("story",[["story",n.target({key:d,accepts:"story",hovered:Qa,onDrop:u=>i.dropOnCell(t,u)})],...Ve(e,t.activityId,t.stepId)]);return l`
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`
1045
1048
  <div
1046
1049
  class="cell"
1047
1050
  data-step=${t.stepId}
@@ -1049,71 +1052,72 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1049
1052
  data-column=${t.activityId}
1050
1053
  data-column-step=${t.stepId}
1051
1054
  data-drop=${String(n.isOver(d))}
1052
- data-col-dragging=${String(gt(n,t.activityId,t.stepId))}
1053
- data-col-drop=${Ke(n,t.activityId,t.stepId)}
1054
- data-step-edge=${qa(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)}
1055
1058
  @dragenter=${p.dragenter}
1056
1059
  @dragover=${p.dragover}
1057
1060
  @dragleave=${p.dragleave}
1058
1061
  @drop=${p.drop}
1059
1062
  >
1060
1063
  <div class="card-list" data-testid=${`cell-${t.stepId}-${t.milestoneId??"unassigned"}`}>
1061
- ${Y(o,u=>u.id,u=>Ja(e,u,""))}
1064
+ ${Y(o,u=>u.id,u=>ts(e,u,""))}
1062
1065
  </div>
1063
1066
  <button
1064
1067
  class="dpk-btn dpk-btn--ghost add-cell"
1065
1068
  type="button"
1066
1069
  title=${a.addStoryCellAria}
1067
- @click=${()=>Pa(a,s,t.activityId,t.stepId,t.milestoneId)}
1070
+ @click=${()=>Ha(a,s,t.activityId,t.stepId,t.milestoneId)}
1068
1071
  >
1069
1072
  ${a.addCellButton}
1070
1073
  </button>
1071
1074
  </div>
1072
- `},Wi=(e,t,a)=>{const{m:s,context:n,drag:i,handlers:r}=e,{state:o}=n,d=ze(o,n.navigation),p=Yt(o,t,a).filter(S=>ca(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:Qa,onDrop:S=>r.dropOnGroupCell(t,a,S)})],...Ve(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`
1073
1076
  <div
1074
1077
  class="cell"
1075
1078
  data-activity=${t}
1076
1079
  data-milestone=${a??""}
1077
1080
  data-column=${t}
1078
1081
  data-drop=${String(i.isOver(v))}
1079
- data-col-dragging=${String(gt(i,t))}
1080
- data-col-drop=${Ke(i,t)}
1082
+ data-col-dragging=${String(vt(i,t))}
1083
+ data-col-drop=${je(i,t)}
1081
1084
  @dragenter=${I.dragenter}
1082
1085
  @dragover=${I.dragover}
1083
1086
  @dragleave=${I.dragleave}
1084
1087
  @drop=${I.drop}
1085
1088
  >
1086
1089
  <div class="card-list" data-testid=${`group-cell-${t}-${a??"unassigned"}`}>
1087
- ${Y(p,S=>S.id,S=>Ja(e,S,x(S.stepId)))}
1090
+ ${Y(p,S=>S.id,S=>ts(e,S,x(S.stepId)))}
1088
1091
  </div>
1089
1092
  ${f?l`<button
1090
1093
  class="dpk-btn dpk-btn--ghost add-cell"
1091
1094
  type="button"
1092
1095
  aria-label=${s.addStoryCellAria}
1093
- @click=${()=>Pa(s,n,t,f.id,a)}
1096
+ @click=${()=>Ha(s,n,t,f.id,a)}
1094
1097
  >
1095
1098
  ${s.addCellButton}
1096
1099
  </button>`:m}
1097
1100
  </div>
1098
- `},Ja=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=ce(s.state),o=n.source({type:"story",id:t.id}),d=ra(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
1099
1102
  data-story=${t.id}
1100
1103
  data-status=${t.statusId??""}
1101
- data-relation=${Xi(s.state,s.navigation.story,t)??m}
1102
- data-highlight=${ji(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}
1103
1106
  data-dpk-target=${_({type:"story",id:t.id})}
1107
+ data-grill-questions=${Le(Ie(t.questions))}
1104
1108
  draggable="true"
1105
1109
  tabindex="0"
1106
1110
  role="button"
1107
1111
  aria-haspopup="dialog"
1108
1112
  aria-label=${t.name}
1109
- style=${M(Ma(r,t)?.tone)}
1113
+ style=${M(Ra(r,t)?.tone)}
1110
1114
  .story=${t}
1111
1115
  .stepName=${a}
1112
1116
  .statuses=${r}
1113
- .labels=${gn(s.state,t)}
1117
+ .labels=${vn(s.state,t)}
1114
1118
  .reviewCount=${s.commentCount({type:"story",id:t.id})}
1115
1119
  .estimate=${J(s.state,"estimates")?H(s.state,t.estimateId)??null:null}
1116
- .assignee=${J(s.state,"assignees")?hn(s.state,t)??null:null}
1120
+ .assignee=${J(s.state,"assignees")?fn(s.state,t)??null:null}
1117
1121
  .blocks=${d.dependents.length}
1118
1122
  .waits=${d.openBlockers}
1119
1123
  @click=${()=>i.selectStory(t.id)}
@@ -1122,22 +1126,22 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1122
1126
  ?dragging=${n.isDragging("story",t.id)}
1123
1127
  @dragstart=${o.dragstart}
1124
1128
  @dragend=${o.dragend}
1125
- ></dpk-internal-usm-story-card>`},ji=(e,t)=>{if(e!==null)return e.has(t)?"on":"dimmed"},Xi=(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},Qa=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},Zi=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)},es=e=>t=>t.currentTarget instanceof Element?{id:e,element:t.currentTarget}:null,ts=(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"));Di(e,[...o,...r],n)},Ji=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}},Qi=(e,t)=>$t((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)}),er=(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`
1126
1130
  <section class="st-overview" data-testid="usm-statuses">
1127
1131
  ${a.rows.length===0?l`<div class="empty">
1128
1132
  <h2>${e.noStatusesTitle}</h2>
1129
1133
  <p>${e.noStatusesBody}</p>
1130
1134
  </div>`:m}
1131
1135
  <ol class="st-list">
1132
- ${Y(a.rows,n=>n.id,n=>tr(e,t,n,s))}
1136
+ ${Y(a.rows,n=>n.id,n=>nr(e,t,n,s))}
1133
1137
  </ol>
1134
1138
  <div>
1135
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ni(e,t)}>
1139
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Yi(e,t)}>
1136
1140
  ${e.newStatusButton}
1137
1141
  </button>
1138
1142
  </div>
1139
1143
  </section>
1140
- `,tr=(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`
1141
1145
  <li
1142
1146
  class="st-row st-row--status"
1143
1147
  data-status=${a.id}
@@ -1156,7 +1160,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1156
1160
  >
1157
1161
  ${re(a)}
1158
1162
  </button>
1159
- ${n?ar(e,t,a,s):m}
1163
+ ${n?ir(e,t,a,s):m}
1160
1164
  <span class="st-name">
1161
1165
  <dpk-component-inline-edit
1162
1166
  .value=${a.name}
@@ -1164,8 +1168,8 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1164
1168
  @dpk-commit=${Z(o=>t.dispatch({type:"SET_STATUS_NAME",target:i,payload:{name:o}}))}
1165
1169
  ></dpk-component-inline-edit>
1166
1170
  </span>
1167
- ${ft(e,a.storyCount,a.share)}
1168
- ${bt(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}}))}
1169
1173
  <label class="st-done" title=${e.doneStatusAria(a.name)}>
1170
1174
  <input
1171
1175
  type="radio"
@@ -1177,9 +1181,9 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1177
1181
  />
1178
1182
  <span aria-hidden="true">${e.doneStatusMark}</span>
1179
1183
  </label>
1180
- ${qe(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:{}})})}
1181
1185
  </li>
1182
- `},ar=(e,t,a,s)=>l`<div
1186
+ `},ir=(e,t,a,s)=>l`<div
1183
1187
  id="icon-menu"
1184
1188
  class="comment-pop icon-menu"
1185
1189
  popover="manual"
@@ -1188,7 +1192,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1188
1192
  style=${M(a.tone)}
1189
1193
  @keydown=${n=>{n.key==="Escape"&&(n.preventDefault(),s.close())}}
1190
1194
  >
1191
- ${Tt.map(n=>l`<button
1195
+ ${It.map(n=>l`<button
1192
1196
  class="icon-option"
1193
1197
  type="button"
1194
1198
  role="menuitemradio"
@@ -1200,8 +1204,8 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1200
1204
  >
1201
1205
  ${re({icon:n,progress:a.progress})}
1202
1206
  </button>`)}
1203
- </div>`,bt=(e,t,a)=>l`<span class="st-tones" role="radiogroup" aria-label=${e.statusToneLabel}>
1204
- ${Ie.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
1205
1209
  class="st-tone"
1206
1210
  type="button"
1207
1211
  role="radio"
@@ -1212,13 +1216,13 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1212
1216
  aria-checked=${s===t?"true":"false"}
1213
1217
  @click=${()=>{s!==t&&a(s)}}
1214
1218
  ></button>`)}
1215
- </span>`,qe=(e,t)=>l`<span class="st-tools">
1219
+ </span>`,Xe=(e,t)=>l`<span class="st-tools">
1216
1220
  <button
1217
1221
  class="dpk-icon-btn"
1218
1222
  type="button"
1219
1223
  aria-label=${e.moveUpAria}
1220
1224
  ?disabled=${t.row.previousId===null}
1221
- @click=${()=>t.reorder(sr(t.ids,t.row.previousId))}
1225
+ @click=${()=>t.reorder(rr(t.ids,t.row.previousId))}
1222
1226
  >
1223
1227
  ↑
1224
1228
  </button>
@@ -1232,42 +1236,42 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1232
1236
  ↓
1233
1237
  </button>
1234
1238
  <button class="dpk-icon-btn" type="button" data-role="delete" aria-label=${t.deleteLabel} @click=${t.remove}>
1235
- ${_e()}
1239
+ ${Me()}
1236
1240
  </button>
1237
- </span>`,sr=(e,t)=>{const a=t===null?-1:e.indexOf(t);return a<=0?null:e[a-1]??null},ft=(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`
1238
1242
  <span class="st-share">
1239
1243
  <span class="st-share-text">${e.statusShare(t,Math.round(a*100))}</span>
1240
1244
  <span class="st-meter" aria-hidden="true"><span style=${`width:${a*100}%`}></span></span>
1241
1245
  </span>
1242
- `,nr=B(_s),ir=B(Qs),rr={width:720,height:240,inset:{top:16,right:20,bottom:26,left:40}},or={width:340,height:150,inset:{top:12,right:14,bottom:24,left:32}},dr=(e,t,a)=>{const{state:s,navigation:n}=t,i=vn(s,n),r=he(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`
1243
1247
  <section class="bd-overview" data-testid="usm-burndown">
1244
1248
  <header class="bd-bar">
1245
- ${i?lr(e,t,i):m} ${pr(e,t,r)}
1249
+ ${i?ur(e,t,i):m} ${mr(e,t,r)}
1246
1250
  ${i?l`<span class="bd-record">
1247
1251
  <button
1248
1252
  class="dpk-btn dpk-btn--primary"
1249
1253
  type="button"
1250
1254
  data-role="record-snapshot"
1251
1255
  title=${e.recordSnapshotHint}
1252
- @click=${()=>Ui(t,new Date)}
1256
+ @click=${()=>Fi(t,new Date)}
1253
1257
  >
1254
1258
  ${e.recordSnapshotButton}
1255
1259
  </button>
1256
1260
  </span>`:m}
1257
1261
  </header>
1258
- ${r==="stories"?m:cr(e,t,r)}
1259
- ${i?ur(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">
1260
1264
  <h2>${e.burndownTab}</h2>
1261
1265
  <p>${e.noMilestonesForBurndown}</p>
1262
1266
  </div>`}
1263
- <div class="bd-side">${mr(e,t)}</div>
1267
+ <div class="bd-side">${br(e,t)}</div>
1264
1268
  </section>
1265
- `},lr=(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">
1266
1270
  <span>${e.burndownMilestoneLabel}</span>
1267
1271
  <select
1268
1272
  class="dpk-select"
1269
1273
  data-role="milestone"
1270
- @change=${Is(n=>t.navigate({milestone:n}))}
1274
+ @change=${Ds(n=>t.navigate({milestone:n}))}
1271
1275
  >
1272
1276
  ${s.milestones.map(n=>l`<option value=${n.id} ?selected=${n.id===a.id}>${n.name}</option>`)}
1273
1277
  </select>
@@ -1279,12 +1283,12 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1279
1283
  type="date"
1280
1284
  data-role="due-date"
1281
1285
  .value=${a.dueDate??""}
1282
- @change=${$t(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}})})}
1283
1287
  />
1284
- </label>`},pr=(e,t,a)=>l`<span class="bd-control">
1288
+ </label>`},mr=(e,t,a)=>l`<span class="bd-control">
1285
1289
  <span id="bd-measure-label">${e.measureLabel}</span>
1286
1290
  <span class="bd-measures" role="radiogroup" aria-labelledby="bd-measure-label">
1287
- ${At.map(s=>l`<label class="bd-measure"
1291
+ ${Mt.map(s=>l`<label class="bd-measure"
1288
1292
  ><input
1289
1293
  type="radio"
1290
1294
  name="bd-measure"
@@ -1294,7 +1298,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1294
1298
  />${e.measureName(s)}</label
1295
1299
  >`)}
1296
1300
  </span>
1297
- </span>`,cr=(e,t,a)=>{const{state:s}=t,n=Gt(s),i=Da(n),r=s.estimates.map(d=>`${d.name} ${d.points}`).join(" \xB7 "),o=Fe(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>
1298
1302
  <summary class="bd-settings-summary">
1299
1303
  <span class="bd-settings-chevron" aria-hidden="true"></span>
1300
1304
  <span class="bd-settings-title">${e.measureSettingsLabel}</span>
@@ -1304,24 +1308,24 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1304
1308
  </span>
1305
1309
  </summary>
1306
1310
  <div class="bd-settings-body">
1307
- ${hr(e,t)} ${a==="weighted"?br(e,t):m}
1311
+ ${fr(e,t)} ${a==="weighted"?yr(e,t):m}
1308
1312
  </div>
1309
- </details>`},ur=(e,t,a,s,n)=>{const{state:i}=t,r=kn(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`
1310
1314
  ${s!=="stories"&&d>0?l`<p class="bd-warning" role="note" data-testid="usm-unestimated-warning">
1311
- ${ir()}<span>${e.unestimatedNote(d)}</span>
1315
+ ${dr()}<span>${e.unestimatedNote(d)}</span>
1312
1316
  </p>`:m}
1313
1317
  <figure class="bd-chart bd-chart--combined">
1314
1318
  <figcaption>
1315
1319
  <span class="bd-chart-title">${e.combinedChartTitle(o)}</span>
1316
1320
  <span class="bd-about">
1317
1321
  <button class="bd-about-btn" type="button" aria-label=${e.chartAbout} aria-describedby="bd-about-tip">
1318
- ${nr()}
1322
+ ${or()}
1319
1323
  </button>
1320
1324
  <span class="bd-about-tip" id="bd-about-tip" role="tooltip">${e.combinedChartHint(s)}</span>
1321
1325
  </span>
1322
- <span class="bd-chart-latest">${e.chartLatest(ss(r.combined))}</span>
1326
+ <span class="bd-chart-latest">${e.chartLatest(rs(r.combined))}</span>
1323
1327
  </figcaption>
1324
- ${as({chart:"combined",title:e.combinedChartTitle(o),points:r.combined,due:r.due,now:n.getTime(),size:rr,tone:"accent"})}
1328
+ ${is({chart:"combined",title:e.combinedChartTitle(o),points:r.combined,due:r.due,now:n.getTime(),size:lr,tone:"accent"})}
1325
1329
  </figure>
1326
1330
  ${r.byStatus.length===0?m:l`<section class="bd-multiples" aria-label=${e.statusChartsLabel}>
1327
1331
  <h3>${e.statusChartsLabel}</h3>
@@ -1329,13 +1333,13 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1329
1333
  ${r.byStatus.map(({status:p,points:u})=>l`<figure class="bd-chart" data-status=${p.id}>
1330
1334
  <figcaption>
1331
1335
  <span class="bd-chart-title">${e.statusChartTitle(p.name)}</span>
1332
- <span class="bd-chart-latest">${e.chartLatest(ss(u))}</span>
1336
+ <span class="bd-chart-latest">${e.chartLatest(rs(u))}</span>
1333
1337
  </figcaption>
1334
- ${as({chart:"status",statusId:p.id,title:e.statusChartTitle(p.name),points:u,due:r.due,now:n.getTime(),size:or,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})}
1335
1339
  </figure>`)}
1336
1340
  </div>
1337
1341
  </section>`}
1338
- `},as=e=>l`<dpk-internal-usm-burndown-chart
1342
+ `},is=e=>l`<dpk-internal-usm-burndown-chart
1339
1343
  data-chart=${e.chart}
1340
1344
  data-status=${e.statusId??m}
1341
1345
  .points=${e.points}
@@ -1344,7 +1348,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1344
1348
  .size=${e.size}
1345
1349
  .tone=${e.tone}
1346
1350
  .label=${e.title}
1347
- ></dpk-internal-usm-burndown-chart>`,mr=(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">
1348
1352
  <h3>${e.snapshotsLabel}<span class="bd-count">${a.length}</span></h3>
1349
1353
  ${a.length===0?l`<p class="bd-empty">${e.noSnapshots} ${e.chartNeedsSnapshot}</p>`:l`<ol class="bd-snapshots">
1350
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)}>
@@ -1357,22 +1361,22 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1357
1361
  aria-label=${e.deleteSnapshotAria(i)}
1358
1362
  @click=${()=>t.dispatch({type:"DELETE_SNAPSHOT",target:n,payload:{}})}
1359
1363
  >
1360
- ${_e()}
1364
+ ${Me()}
1361
1365
  </button>
1362
1366
  </li>`})}
1363
1367
  </ol>`}
1364
- </section>`},hr=(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">
1365
1369
  <h3>${e.estimatesLabel}<span class="bd-count">${a.length}</span></h3>
1366
1370
  <p class="bd-empty">${e.estimatesHint}</p>
1367
1371
  ${a.length===0?m:l`<ol class="bd-estimates">
1368
- ${Y(a,s=>s.id,(s,n)=>gr(e,t,s,n))}
1372
+ ${Y(a,s=>s.id,(s,n)=>vr(e,t,s,n))}
1369
1373
  </ol>`}
1370
1374
  <div>
1371
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Yi(e,t)}>
1375
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Pi(e,t)}>
1372
1376
  ${e.newEstimateButton}
1373
1377
  </button>
1374
1378
  </div>
1375
- </section>`},gr=(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)}>
1376
1380
  <span class="bd-estimate-name">
1377
1381
  <dpk-component-inline-edit
1378
1382
  .value=${a.name}
@@ -1390,20 +1394,20 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1390
1394
  data-role="points"
1391
1395
  aria-label=${e.estimatePointsLabel}
1392
1396
  .value=${String(a.points)}
1393
- @change=${Qi(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}}))}
1394
1398
  />
1395
1399
  <span>pt</span>
1396
1400
  </label>
1397
- ${qe(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:{}})})}
1398
- </li>`},br=(e,t)=>{const{state:a}=t,s=Gt(a),n=Da(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">
1399
1403
  <h3>${e.statusWeightLabel}</h3>
1400
1404
  <p class="bd-empty">${e.statusWeightHint}</p>
1401
1405
  ${n.length>0?l`<dpk-internal-usm-weight-bar
1402
1406
  .statuses=${ce(a).slice(0,s.length)}
1403
1407
  .dividers=${n}
1404
- .commit=${i=>{for(const{statusId:r,weight:o}of wi(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}})}}
1405
1409
  ></dpk-internal-usm-weight-bar>`:l`<p class="bd-empty">${e.weightsNeedStatuses}</p>`}
1406
- </section>`},ss=e=>e.at(-1)?.value??0,fr=q`
1410
+ </section>`},rs=e=>e.at(-1)?.value??0,kr=q`
1407
1411
  .bd-overview {
1408
1412
  display: grid;
1409
1413
  gap: 18px;
@@ -1754,7 +1758,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1754
1758
  min-width: 0;
1755
1759
  }
1756
1760
  }
1757
- `,vr=/[ァ-ヶ]/g,ns=e=>e.normalize("NFKC").toLowerCase().replace(vr,t=>String.fromCharCode(t.charCodeAt(0)-96)),yr=(e,t)=>{const a=ns(t).split(/\s+/).filter(Boolean),s=ns(e);return a.every(n=>s.includes(n))},is=(e,t,a,s)=>(a==="blocker"?Rn(e,t):On(e,t)).flatMap(i=>{const r=L(e,`${i.activityId}.${i.stepId}`),o=r?[r.activity.name,r.step.name]:[];return yr([Be(i),i.name,...o].join(" "),s)?[{story:i,place:o}]:[]}),rs=(e,t,a,s,n,i)=>{const{state:r}=t;if(is(r,a,s,"").length===0)return m;const o=n.search?.side===s?n.search:null,d=o?is(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(os(c)){case"ArrowDown":case"ArrowUp":{if(c.preventDefault(),!o){I(c);return}if(d.length===0)return;const T=os(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">
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">
1758
1762
  <input
1759
1763
  class="dpk-input sp-dep-search"
1760
1764
  type="text"
@@ -1776,9 +1780,9 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1776
1780
  @blur=${()=>{o&&n.set(null)}}
1777
1781
  />
1778
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}>
1779
- ${d.map(c=>kr(r,c,v(c),c===u,S))}
1783
+ ${d.map(c=>$r(r,c,v(c),c===u,S))}
1780
1784
  </ul>`:m}
1781
- </div>`},os=e=>!e.ctrlKey||e.altKey||e.metaKey||e.shiftKey?e.key:e.key==="n"?"ArrowDown":e.key==="p"?"ArrowUp":e.key,kr=(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
1782
1786
  id=${a}
1783
1787
  role="option"
1784
1788
  data-story=${t.story.id}
@@ -1790,7 +1794,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1790
1794
  ${i?re(i):m}<span>${t.story.name}</span>
1791
1795
  </span>
1792
1796
  ${t.place.length===0?m:l`<span class="sp-dep-choice-place">${t.place.map(r=>l`<span>${r}</span>`)}</span>`}
1793
- </li>`},wr=q`
1797
+ </li>`},Sr=q`
1794
1798
  .sp-dep-picker {
1795
1799
  display: grid;
1796
1800
  gap: 4px;
@@ -1851,7 +1855,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1851
1855
  color: var(--dpk-ink-faint);
1852
1856
  font-size: 12px;
1853
1857
  }
1854
- `,xr=B(Js),$r=(e,t)=>{const a=Ue(t.navigation)==="critical-path",s=a?oa(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
1855
1859
  class="dpk-btn dpk-btn--ghost highlight-toggle"
1856
1860
  type="button"
1857
1861
  data-highlight-toggle="critical-path"
@@ -1859,9 +1863,9 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1859
1863
  title=${e.criticalPathHint}
1860
1864
  @click=${()=>t.navigate({highlight:a?null:"critical-path"})}
1861
1865
  >
1862
- ${xr()}<span>${e.criticalPathButton}</span>
1866
+ ${Er()}<span>${e.criticalPathButton}</span>
1863
1867
  ${s===null?m:l`<span class="highlight-count">${e.criticalPathCount(s)}</span>`}
1864
- </button>`},Sr=q`
1868
+ </button>`},Ar=q`
1865
1869
  .highlight-toggle {
1866
1870
  gap: 6px;
1867
1871
  margin-left: auto;
@@ -1884,22 +1888,22 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1884
1888
  font-size: 10.5px;
1885
1889
  font-variant-numeric: tabular-nums;
1886
1890
  }
1887
- `,Er=(e,t,a)=>l`
1891
+ `,_r=(e,t,a)=>l`
1888
1892
  <section class="st-overview" data-testid="usm-labels">
1889
1893
  ${a.rows.length===0?l`<div class="empty">
1890
1894
  <h2>${e.noLabelsTitle}</h2>
1891
1895
  <p>${e.noLabelsBody}</p>
1892
1896
  </div>`:m}
1893
1897
  <ol class="st-list">
1894
- ${Y(a.rows,s=>s.id,s=>Tr(e,t,s))}
1898
+ ${Y(a.rows,s=>s.id,s=>Ir(e,t,s))}
1895
1899
  </ol>
1896
1900
  <div>
1897
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ci(e,t)}>
1901
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ui(e,t)}>
1898
1902
  ${e.newLabelButton}
1899
1903
  </button>
1900
1904
  </div>
1901
1905
  </section>
1902
- `,Tr=(e,t,a)=>{const s={type:"label",id:a.id};return l`
1906
+ `,Ir=(e,t,a)=>{const s={type:"label",id:a.id};return l`
1903
1907
  <li class="st-row" data-label=${a.id} data-dpk-target=${_(s)} style=${M(a.tone)}>
1904
1908
  <span class="label-swatch" aria-hidden="true"></span>
1905
1909
  <span class="st-name">
@@ -1909,14 +1913,14 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1909
1913
  @dpk-commit=${Z(n=>t.dispatch({type:"SET_LABEL_NAME",target:s,payload:{name:n}}))}
1910
1914
  ></dpk-component-inline-edit>
1911
1915
  </span>
1912
- ${ft(e,a.storyCount,a.share)}
1913
- ${bt(e,a.tone,n=>t.dispatch({type:"SET_LABEL_TONE",target:s,payload:{tone:n}}))}
1914
- ${qe(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:{}})})}
1915
1919
  </li>
1916
- `},Ar=(e,t,a)=>{const{state:s}=t,n=Ee.filter(o=>be(s,o).length>0);if(n.length===0)return m;const i=ze(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">
1917
- ${n.map(o=>Ir(e,t,i,o,a))} ${_r(e,t)}
1918
- ${zn(i)?l`<a class="filter-clear" href=${t.hashFor(r)}>${e.clearFilter}</a>`:m}
1919
- </div>`},_r=(e,t)=>{const{state:a}=t,s=Pt(a);if(!s||a.statuses.length<2)return m;const n=la(a,t.navigation).size===0,i=a.stories.filter(r=>Se(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">
1920
1924
  <input
1921
1925
  type="checkbox"
1922
1926
  data-show-finished
@@ -1925,7 +1929,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1925
1929
  />
1926
1930
  <span>${e.showFinished(s.name)}</span>
1927
1931
  <span class="show-finished-count">${i}</span>
1928
- </label>`},Ir=(e,t,a,s,n)=>{const i=a[s],r=Dr(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">
1929
1933
  <button
1930
1934
  class="dpk-select filter-select"
1931
1935
  type="button"
@@ -1936,10 +1940,10 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1936
1940
  @click=${()=>n.toggle(s)}
1937
1941
  >
1938
1942
  <span class="filter-key">${e.filterKeyLabel(s)}</span>
1939
- <span class="filter-value">${Mr(e,o)}</span>
1943
+ <span class="filter-value">${Rr(e,o)}</span>
1940
1944
  </button>
1941
- ${d?Lr(e,t,s,i,r,n):m}
1942
- </span>`},Mr=(e,t)=>{const[a]=t;return a?t.length===1?a.name:`${a.name} +${t.length-1}`:e.filterAll},Lr=(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
1943
1947
  id="filter-menu"
1944
1948
  class="comment-pop filter-menu"
1945
1949
  popover="manual"
@@ -1955,7 +1959,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1955
1959
  aria-checked=${String(s.size===0)}
1956
1960
  href=${t.hashFor({[a]:null})}
1957
1961
  >
1958
- <span class="filter-check">${s.size===0?Qe():m}</span>
1962
+ <span class="filter-check">${s.size===0?at():m}</span>
1959
1963
  <span class="filter-name">${e.filterAll}</span>
1960
1964
  </a>
1961
1965
  ${n.map(r=>{const o=s.has(r.id);return l`<a
@@ -1965,14 +1969,14 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
1965
1969
  data-none=${r.id===ne?"true":m}
1966
1970
  aria-checked=${String(o)}
1967
1971
  style=${r.style}
1968
- href=${t.hashFor({[a]:pa(t.state,a,Un(s,r.id))})}
1972
+ href=${t.hashFor({[a]:ma(t.state,a,Fn(s,r.id))})}
1969
1973
  >
1970
- <span class="filter-check">${o?Qe():m}</span>
1974
+ <span class="filter-check">${o?at():m}</span>
1971
1975
  ${r.mark}
1972
1976
  <span class="filter-name" title=${r.name}>${r.name}</span>
1973
1977
  <span class="filter-count">${r.count}</span>
1974
1978
  </a>`})}
1975
- </div>`,Dr=(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)}})}},Rr=q`
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`
1976
1980
  .show-finished {
1977
1981
  display: inline-flex;
1978
1982
  align-items: center;
@@ -2101,9 +2105,9 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2101
2105
  font-size: 10.5px;
2102
2106
  font-variant-numeric: tabular-nums;
2103
2107
  }
2104
- `,Or=(e,t,a)=>l`<div class="map-toolbar" data-testid="usm-map-toolbar">
2105
- ${Ar(e,t,a)} ${$r(e,t)}
2106
- </div>`,Nr=q`
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`
2107
2111
  .map-toolbar {
2108
2112
  display: flex;
2109
2113
  flex-wrap: wrap;
@@ -2112,24 +2116,24 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2112
2116
  padding: 5px 24px;
2113
2117
  border-bottom: 1px solid var(--dpk-rule);
2114
2118
  }
2115
- `,Cr=(e,t,a)=>l`
2119
+ `,Ur=(e,t,a)=>l`
2116
2120
  <section class="st-overview" data-testid="usm-members">
2117
2121
  ${a.rows.length===0?l`<div class="empty">
2118
2122
  <h2>${e.noMembersTitle}</h2>
2119
2123
  <p>${e.noMembersBody}</p>
2120
2124
  </div>`:m}
2121
2125
  <ol class="st-list">
2122
- ${Y(a.rows,s=>s.id,s=>Br(e,t,s))}
2126
+ ${Y(a.rows,s=>s.id,s=>zr(e,t,s))}
2123
2127
  </ol>
2124
2128
  <div>
2125
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Bi(e,t)}>
2129
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>zi(e,t)}>
2126
2130
  ${e.newMemberButton}
2127
2131
  </button>
2128
2132
  </div>
2129
2133
  </section>
2130
- `,Br=(e,t,a)=>{const s={type:"member",id:a.id};return l`
2134
+ `,zr=(e,t,a)=>{const s={type:"member",id:a.id};return l`
2131
2135
  <li class="st-row" data-member=${a.id} data-dpk-target=${_(s)} style=${M(a.tone)}>
2132
- <span class="member-avatar" aria-hidden="true">${ht(a.name)}</span>
2136
+ <span class="member-avatar" aria-hidden="true">${ft(a.name)}</span>
2133
2137
  <span class="st-name">
2134
2138
  <dpk-component-inline-edit
2135
2139
  .value=${a.name}
@@ -2137,30 +2141,30 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2137
2141
  @dpk-commit=${Z(n=>t.dispatch({type:"SET_MEMBER_NAME",target:s,payload:{name:n}}))}
2138
2142
  ></dpk-component-inline-edit>
2139
2143
  </span>
2140
- ${ft(e,a.storyCount,a.share)}
2141
- ${bt(e,a.tone,n=>t.dispatch({type:"SET_MEMBER_TONE",target:s,payload:{tone:n}}))}
2142
- ${qe(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:{}})})}
2143
2147
  </li>
2144
- `},Yr=(e,t,a)=>l`
2148
+ `},Pr=(e,t,a)=>l`
2145
2149
  <section class="ms-overview" data-testid="usm-milestones">
2146
2150
  ${a.length===0?l`<div class="empty">
2147
2151
  <h2>${e.noMilestonesTitle}</h2>
2148
2152
  <p>${e.noMilestonesBody}</p>
2149
2153
  </div>`:m}
2150
2154
  <ol class="ms-timeline">
2151
- ${Y(a,s=>s.id,s=>Ur(e,t,s))}
2155
+ ${Y(a,s=>s.id,s=>Fr(e,t,s))}
2152
2156
  <li class="ms-add">
2153
2157
  <span class="ms-when" aria-hidden="true"></span>
2154
2158
  <span class="ms-rail" aria-hidden="true"><span class="ms-node ms-node--add"></span></span>
2155
2159
  <div class="ms-body">
2156
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>za(e,t)}>
2160
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ga(e,t)}>
2157
2161
  ${e.newMilestoneButton}
2158
2162
  </button>
2159
2163
  </div>
2160
2164
  </li>
2161
2165
  </ol>
2162
2166
  </section>
2163
- `,Ur=(e,t,a)=>{const s=a.id;return l`
2167
+ `,Fr=(e,t,a)=>{const s=a.id;return l`
2164
2168
  <li class="ms-entry" data-milestone-card=${s} data-dpk-target=${_({type:"milestone",id:s})}>
2165
2169
  <div class="ms-when">
2166
2170
  ${a.timeframe===""?l`<span class="ms-timeframe" data-empty="true">${e.timeframeUnset}</span>`:l`<span class="ms-timeframe">${a.timeframe}</span>`}
@@ -2195,12 +2199,12 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2195
2199
  </dd>
2196
2200
  </div>
2197
2201
  </dl>
2198
- ${a.progress.length===0?m:zr(e,a)}
2202
+ ${a.progress.length===0?m:Gr(e,a)}
2199
2203
  </article>
2200
2204
  </li>
2201
- `},zr=(e,t)=>l`
2205
+ `},Gr=(e,t)=>l`
2202
2206
  <div class="ms-breakdown">
2203
- ${Ta(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(", ")))}
2204
2208
  <ul class="ms-legend" aria-hidden="true">
2205
2209
  ${t.progress.map(a=>l`<li data-status=${a.id} style=${M(a.tone)}>
2206
2210
  ${re(a)}
@@ -2209,7 +2213,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2209
2213
  </li>`)}
2210
2214
  </ul>
2211
2215
  </div>
2212
- `,Pr=(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">
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">
2213
2217
  <span class="dpk-label">${e.moveDialogLabel}</span>
2214
2218
  <select class="dpk-select" aria-label=${e.moveDialogSelectLabel} data-move-dialog>
2215
2219
  ${i.steps.map(o=>l`<option value=${o.id} ?selected=${o.id===r}>${o.name}</option>`)}
@@ -2218,17 +2222,17 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2218
2222
  <button
2219
2223
  class="dpk-btn dpk-btn--accent"
2220
2224
  type="button"
2221
- @click=${o=>{const p=(Ms(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()}}
2222
2226
  >
2223
2227
  ${e.moveConfirm}
2224
2228
  </button>
2225
2229
  <button class="dpk-btn" type="button" @click=${s.cancel}>${e.moveCancel}</button>
2226
2230
  </div>
2227
- </div>`},Fr=(e,t)=>l`<div class="board-head" data-testid="usm-board-head">${e}${t}</div>`,Gr=B(qs),Hr=(e,t,a,s)=>{const{state:n}=t,i=na(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`
2228
2232
  <div class="board-bar">
2229
2233
  <div class="page-nav" style=${`min-width: ${s.minimum}px`}>
2230
2234
  <div class="page-tabs" role="tablist" aria-label=${e.pageTabsLabel}>
2231
- ${i.map(o=>Vr(t,o,a,ds(e,o),ls(n,o),s.folded.has(o)))}
2235
+ ${i.map(o=>Wr(t,o,a,cs(e,o),us(n,o),s.folded.has(o)))}
2232
2236
  </div>
2233
2237
  <button
2234
2238
  class="dpk-btn dpk-btn--ghost tabs-more"
@@ -2240,7 +2244,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2240
2244
  aria-expanded=${String(s.open)}
2241
2245
  @click=${s.toggle}
2242
2246
  >
2243
- ${Gr()}
2247
+ ${Kr()}
2244
2248
  </button>
2245
2249
  ${s.open&&r.length>0?l`<div
2246
2250
  id="tabs-menu"
@@ -2256,13 +2260,13 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2256
2260
  data-tab=${o}
2257
2261
  href=${t.hashFor({tab:o==="map"?null:o})}
2258
2262
  @click=${s.close}
2259
- >${ds(e,o)}<span class="page-tab-count">${ls(n,o)}</span></a
2263
+ >${cs(e,o)}<span class="page-tab-count">${us(n,o)}</span></a
2260
2264
  >`)}
2261
2265
  </div>`:m}
2262
2266
  </div>
2263
- ${a==="map"&&n.activities.some(o=>o.steps.length>0)?Fi(e,t):m}
2267
+ ${a==="map"&&n.activities.some(o=>o.steps.length>0)?Vi(e,t):m}
2264
2268
  </div>
2265
- `},ds=(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}},ls=(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}},Vr=(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
2266
2270
  role="tab"
2267
2271
  data-tab=${t}
2268
2272
  data-overflow=${i?"":m}
@@ -2271,7 +2275,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2271
2275
  aria-selected=${t===a?"true":"false"}
2272
2276
  href=${e.hashFor({tab:t==="map"?null:t})}
2273
2277
  >${s}<span class="page-tab-count">${n}</span></a
2274
- >`,Kr=36,qr=12,Wr=220,jr=q`
2278
+ >`,jr=36,Xr=12,Zr=220,Jr=q`
2275
2279
  /* The tabs and their more button share what the bar's line leaves; the line
2276
2280
  wraps only when even the current tab and the button do not fit. */
2277
2281
  .page-nav {
@@ -2327,7 +2331,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2327
2331
  outline: none;
2328
2332
  background: var(--dpk-paper-sunken);
2329
2333
  }
2330
- `,Xr=e=>E(e.state,e.navigation.story),Zr=(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
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
2331
2335
  class="story-panel"
2332
2336
  role="dialog"
2333
2337
  aria-label=${e.panelLabel(a.name)}
@@ -2340,14 +2344,14 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2340
2344
  ${d?l`<span>${d.activity.name}</span><span>${d.step.name}</span>`:m}
2341
2345
  <span>${p?.name??e.unassigned}</span>
2342
2346
  </span>
2343
- ${io(e,t,a)}
2347
+ ${lo(e,t,a)}
2344
2348
  <button class="dpk-icon-btn" type="button" data-role="close" aria-label=${e.closePanelAria} @click=${o}>
2345
- ${et()}
2349
+ ${st()}
2346
2350
  </button>
2347
2351
  </header>
2348
2352
  <div class="sp-body">
2349
2353
  <div class="sp-heading">
2350
- ${Jr(e,Be(a),n)}
2354
+ ${to(e,ze(a),n)}
2351
2355
  <h2 class="sp-title">
2352
2356
  <dpk-component-inline-edit
2353
2357
  wrap
@@ -2357,10 +2361,10 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2357
2361
  ></dpk-component-inline-edit>
2358
2362
  </h2>
2359
2363
  </div>
2360
- ${i.statuses.length===0?m:Qr(e,t,a)}
2361
- ${J(i,"estimates")?eo(e,t,a):m}
2362
- ${J(i,"assignees")?to(e,t,a):m}
2363
- ${ao(e,t,a)} ${so(e,t,a,s)}
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)}
2364
2368
  <section class="sp-field">
2365
2369
  <h3>${e.storyDescriptionLabel}</h3>
2366
2370
  <dpk-component-inline-edit
@@ -2372,7 +2376,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2372
2376
  @dpk-commit=${Z(u=>t.dispatch({type:"SET_STORY_DESCRIPTION",target:r,payload:{description:u}}))}
2373
2377
  ></dpk-component-inline-edit>
2374
2378
  </section>
2375
- ${no(e,t,a)} ${ro(e,t,a)}
2379
+ ${oo(e,t,a)} ${po(e,t,a)}
2376
2380
  </div>
2377
2381
  <footer class="sp-foot">
2378
2382
  <button
@@ -2380,10 +2384,10 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2380
2384
  type="button"
2381
2385
  @click=${()=>{t.dispatch({type:"DELETE_STORY",target:r,payload:{}}).ok&&o()}}
2382
2386
  >
2383
- ${_e()}<span>${e.deleteStoryButton}</span>
2387
+ ${Me()}<span>${e.deleteStoryButton}</span>
2384
2388
  </button>
2385
2389
  </footer>
2386
- </aside>`},Jr=(e,t,a)=>{const s=a.copied?e.storyKeyCopied:e.copyStoryKey(t);return l`<button
2390
+ </aside>`},to=(e,t,a)=>{const s=a.copied?e.storyKeyCopied:e.copyStoryKey(t);return l`<button
2387
2391
  class="sp-key"
2388
2392
  type="button"
2389
2393
  data-role="copy-key"
@@ -2392,8 +2396,8 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2392
2396
  aria-label=${s}
2393
2397
  @click=${()=>a.copy(t)}
2394
2398
  >
2395
- <span>${t}</span>${a.copied?Qe():Ls()}
2396
- </button>`},Qr=(e,t,a)=>{const s=ce(t.state),n=a.statusId;return l`<section class="sp-field">
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">
2397
2401
  <h3 id="sp-status-label">${e.storyStatusLabel}</h3>
2398
2402
  <div class="sp-statuses" role="radiogroup" aria-labelledby="sp-status-label">
2399
2403
  ${s.map(i=>l`<button
@@ -2408,7 +2412,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2408
2412
  ${re(i)}<span>${i.name}</span>
2409
2413
  </button>`)}
2410
2414
  </div>
2411
- </section>`},eo=(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">
2412
2416
  <h3 id="sp-estimate-label" class="sp-field-head">
2413
2417
  <span>${e.storyEstimateLabel}</span>
2414
2418
  <a class="sp-manage" href=${t.hashFor({tab:"burndown",story:null})}>${e.manageEstimates}</a>
@@ -2426,7 +2430,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2426
2430
  ${r.name}
2427
2431
  </button>`)}
2428
2432
  </div>`}
2429
- </section>`},to=(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">
2430
2434
  <h3 id="sp-assignee-label" class="sp-field-head">
2431
2435
  <span>${e.storyAssigneeLabel}</span>
2432
2436
  <a class="sp-manage" href=${t.hashFor({tab:"members",story:null})}>${e.manageMembers}</a>
@@ -2451,10 +2455,10 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2451
2455
  style=${M(i.tone)}
2452
2456
  @click=${n(i.id)}
2453
2457
  >
2454
- <span class="sp-avatar" aria-hidden="true">${ht(i.name)}</span>${i.name}
2458
+ <span class="sp-avatar" aria-hidden="true">${ft(i.name)}</span>${i.name}
2455
2459
  </button>`)}
2456
2460
  </div>`}
2457
- </section>`},ao=(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">
2458
2462
  <h3 id="sp-labels-label" class="sp-field-head">
2459
2463
  <span>${e.storyLabelsLabel}</span>
2460
2464
  <a class="sp-manage" href=${t.hashFor({tab:"labels",story:null})}>${e.manageLabels}</a>
@@ -2471,7 +2475,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2471
2475
  <span class="sp-label-dot" aria-hidden="true"></span><span>${i.name}</span>
2472
2476
  </button>`})}
2473
2477
  </div>`}
2474
- </section>`},so=(e,t,a,s)=>{const{state:n}=t,i=ra(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
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
2475
2479
  data-blocker=${d==="data-blocker"?p:m}
2476
2480
  data-dependent=${d==="data-dependent"?p:m}
2477
2481
  data-finished=${String(Se(n,x))}
@@ -2486,7 +2490,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2486
2490
  aria-label=${u(x.name)}
2487
2491
  @click=${f}
2488
2492
  >
2489
- ${et()}
2493
+ ${st()}
2490
2494
  </button>
2491
2495
  </li>`};return l`<section class="sp-field sp-deps">
2492
2496
  <h3>${e.storyDependenciesLabel}</h3>
@@ -2495,21 +2499,21 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2495
2499
  ${i.blockers.length===0?l`<p class="sp-empty">${e.storyNoBlockers}</p>`:l`<ul class="sp-dep-list">
2496
2500
  ${i.blockers.map(d=>o("data-blocker",d,e.removeBlockerAria,()=>r("REMOVE_STORY_BLOCKER",a.id,d)))}
2497
2501
  </ul>`}
2498
- ${rs(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))}
2499
2503
  </div>
2500
2504
  <div class="sp-dep-side">
2501
2505
  <h4>${e.storyDependentsLabel}</h4>
2502
2506
  ${i.dependents.length===0?l`<p class="sp-empty">${e.storyNoDependents}</p>`:l`<ul class="sp-dep-list">
2503
2507
  ${i.dependents.map(d=>o("data-dependent",d,e.removeDependentAria,()=>r("REMOVE_STORY_BLOCKER",d,a.id)))}
2504
2508
  </ul>`}
2505
- ${rs(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))}
2506
2510
  </div>
2507
- </section>`},no=(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(!wt(it,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">
2508
2512
  <h3>${e.storyLinksLabel}</h3>
2509
2513
  ${n.length===0?m:l`<ul class="sp-links">
2510
- ${n.map(r=>{const o=Ye(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}>
2511
2515
  <a class="sp-link" href=${r.url} target="_blank" rel="noopener noreferrer" title=${r.url}>
2512
- ${Aa(o.kind)}
2516
+ ${Ma(o.kind)}
2513
2517
  <span class="sp-link-text">${d}</span>
2514
2518
  <span class="sp-link-url">${o.title===d?r.url:o.title}</span>
2515
2519
  </a>
@@ -2519,7 +2523,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2519
2523
  aria-label=${e.removeLinkAria(d)}
2520
2524
  @click=${()=>t.dispatch({type:"REMOVE_STORY_LINK",target:s,payload:{url:r.url}})}
2521
2525
  >
2522
- ${et()}
2526
+ ${st()}
2523
2527
  </button>
2524
2528
  </li>`})}
2525
2529
  </ul>`}
@@ -2534,7 +2538,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2534
2538
  />
2535
2539
  <button class="dpk-btn" type="submit">${e.addLinkButton}</button>
2536
2540
  </form>
2537
- </section>`},io=(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
2538
2542
  class="sp-review"
2539
2543
  type="button"
2540
2544
  data-role="review-story"
@@ -2542,8 +2546,8 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2542
2546
  aria-label=${s>0?`${e.reviewStoryButton} (${s})`:e.reviewStoryButton}
2543
2547
  @click=${()=>t.requestComment({type:"story",id:a.id})}
2544
2548
  >
2545
- ${xt()}<span>${e.reviewStoryButton}</span>${s>0?l`<span class="sp-review-count">${s}</span>`:m}
2546
- </button>`},ro=(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">
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">
2547
2551
  <h3>
2548
2552
  ${e.storyCommentsLabel}${n.length>0?l`<span class="sp-count">${n.length}</span>`:m}
2549
2553
  </h3>
@@ -2562,7 +2566,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2562
2566
  aria-label=${e.deleteStoryCommentAria}
2563
2567
  @click=${()=>t.dispatch({type:"DELETE_STORY_COMMENT",target:s,payload:{commentId:r.id}})}
2564
2568
  >
2565
- ${_e()}
2569
+ ${Me()}
2566
2570
  </button>
2567
2571
  </li>`)}
2568
2572
  </ol>`}
@@ -2583,7 +2587,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
2583
2587
  <button class="dpk-btn dpk-btn--accent" type="submit">${e.commentSubmit}</button>
2584
2588
  </div>
2585
2589
  </form>
2586
- </section>`},oo=q`
2590
+ </section>`},co=q`
2587
2591
  /* Over the main column's edge, below the header: the page's own controls stay in reach. */
2588
2592
  .story-panel {
2589
2593
  position: absolute;
@@ -3131,7 +3135,7 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
3131
3135
  width: 14px;
3132
3136
  height: 14px;
3133
3137
  }
3134
- `,lo=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:Ia(o,n),done:o===n,previousId:e.statuses[o-1]?.id??null,nextId:e.statuses[o+1]?.id??null,storyCount:d,share:a(d)}})}},po=q`
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`
3135
3139
  :host {
3136
3140
  --dpk-usm-accent: var(--dpk-blue);
3137
3141
  }
@@ -4203,8 +4207,8 @@ import{ak as y,aT as ms,ai as h,af as K,aE as ke,bc as We,am as we,aj as Ae,aS a
4203
4207
  .move-dialog {
4204
4208
  min-width: 220px;
4205
4209
  }
4206
- `,U={kind:"idle"},co={width:300,height:240},uo={width:228,height:116},mo=240,ho=31,go=14,ps=160,bo=1500;class cs extends St{static{this.styles=[St.styles,po,mt,_a,oo,wr,fr,Nr,Rr,Sr,jr,Ds]}definitionFor(t){return ya(t)}static{this.properties={mode:{state:!0}}}#i=new Ys(this);#e=new Rs(this);#a=null;#n=new Hn(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 tt(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 tt(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 tt(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,uo);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)*ho+go;a&&s&&this.#e.open(a,s,{width:mo,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*Kr+qr;s&&this.#e.open(a,s,{width:Wr,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,Os(this.mode.point.x,this.mode.point.y),co)}#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(!(Ue(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,Ns(a,s,ps),Cs(a,s,ps))}#u(t){const a=ge(this.locale),s=ia(t.state,t.navigation);return l`
4207
- ${Fr(Hr(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))}
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))}
4208
4212
  ${this.#b(a,t,s)} ${this.#h(a,t,s)}
4209
- ${Pr(a,t,this.mode,{confirm:n=>this.#S(n),cancel:()=>this.mode=U})}
4210
- `}#m(t,a,s){return s!=="map"||Oe(a.state).length===0?m:Or(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=Xr(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===Be(n),copy:o=>{this.#g(o)}};return Zr(t,a,n,i,r)}async#g(t){await Bs(t)&&(clearTimeout(this.#r),this.#s=t,this.requestUpdate(),this.#r=setTimeout(()=>{this.#s=null,this.requestUpdate()},bo))}#b(t,a,s){switch(s){case"milestones":return Yr(t,a,Mi(a.state));case"statuses":return er(t,a,lo(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 Er(t,a,_i(a.state));case"members":return Cr(t,a,Ii(a.state));case"burndown":return dr(t,a,new Date);case"map":return this.#f(t,a)}}#f(t,a){return Pi({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:Bn(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(Oa(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=Na(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=Ba(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=Ti(s,t.item.id,t.hoveredId,t.place);n&&a.dispatch(n)}#$(t){const a=this.context(),s=Ai(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(Ca(s.state,a.storyId,a.activityId,t,a.milestoneId)),this.mode=U}}const us=()=>{ki(),pi(),Si(),customElements.get("dpk-template-usm")||customElements.define("dpk-template-usm",cs)},fo=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateUsm:cs,IDLE_MODE:U,allUsmIds:W,applyUsmAction:Xt,defineUsmElement:us,describeUsmAction:ua,dropAfter:Ei,emptyUsmBase:Bt,findActivity:ee,findMilestone:F,findStep:L,findStory:E,flatSteps:Oe,parseUsmBase:Nt,resolveCellDrop:Oa,resolveGroupDrop:Na,resolveMilestoneDrop:Ba,resolvePickedStepMove:Ca,resolveUsmNavigation:fa,serializeUsmAction:ma,storiesInCell:Ne,storyCountForStep:Ut,usmAction:fn,usmActions:k,usmCommentTargets:ga,usmCurrentTarget:ba,usmDefinitionFor:ya,usmHasTarget:va,usmMessages:ge,usmTargetLabel:ha,usmTitle:ct},Symbol.toStringTag,{value:"Module"}));export{us as d,fo as i};
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};