dev-process-kit 0.0.17 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/shared-B5lBiq5s.js +1 -0
  3. package/dist/chunks/shared-BDka-8DG.js +3720 -0
  4. package/dist/chunks/shared-BWk3i0ft.js +2774 -0
  5. package/dist/chunks/{shared-XCFMpX43.js → shared-BZK_cqqQ.js} +12 -12
  6. package/dist/chunks/{shared-3uutHtJD.js → shared-Bhrkz9uX.js} +22 -25
  7. package/dist/chunks/{shared-D7TEJdR2.js → shared-BqL8W-G6.js} +1 -1
  8. package/dist/chunks/shared-BqvHpTHr.js +572 -0
  9. package/dist/chunks/shared-CjW1DhGL.js +1 -0
  10. package/dist/chunks/{shared-B_MRyp8K.js → shared-CqjOqXJ3.js} +32 -50
  11. package/dist/chunks/shared-D1W4I3eq.js +4143 -0
  12. package/dist/chunks/{shared-C_Ru__JO.js → shared-D6pr-dx0.js} +1 -1
  13. package/dist/chunks/{shared-DG16QEdg.js → shared-DRzfRsiJ.js} +173 -203
  14. package/dist/chunks/{shared-Bnqz77V3.js → shared-XXW1oBnj.js} +15 -13
  15. package/dist/chunks/{shared-QJPpnJIO.js → shared-gytWODMC.js} +2 -2
  16. package/dist/chunks/shared-k9bZPE_p.js +49 -0
  17. package/dist/components.js +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/templates/delegation-poker.js +1 -1
  20. package/dist/templates/event-storming.js +1 -1
  21. package/dist/templates/example-mapping.js +1 -1
  22. package/dist/templates/plain.js +1 -1
  23. package/dist/templates/prototype.js +1 -1
  24. package/dist/templates/slides.js +1 -1
  25. package/dist/templates/task-board.js +1 -1
  26. package/dist/templates/usm.js +1 -1
  27. package/dist/templates/whiteboard.js +1 -1
  28. package/package.json +1 -2
  29. package/dist/chunks/shared-B9XMvOh-.js +0 -1027
  30. package/dist/chunks/shared-BnGxP2qu.js +0 -2560
  31. package/dist/chunks/shared-CLSKGVCT.js +0 -572
  32. package/dist/chunks/shared-CjhDJ2vV.js +0 -2766
  33. package/dist/chunks/shared-CtHWU02m.js +0 -1
  34. package/dist/chunks/shared-D4K7KsfJ.js +0 -1
  35. package/dist/chunks/shared-DdefS1nG.js +0 -1
  36. package/dist/chunks/shared-DmOHk6B_.js +0 -3457
  37. package/dist/chunks/shared-OIF3QVAa.js +0 -30
  38. package/dist/chunks/shared-ml5h7U5L.js +0 -1
  39. package/dist/templates/grill.js +0 -1
@@ -1,4 +1,4 @@
1
- import{ad as xt,ae as q,af as oe,ag as ie,aB as _,ah as v,aA as X,ai as K,aj as M,ak as N,p as I,au as L,v as se,az as Ee,P as bt,e as vt,a0 as kt,V as W,R as $,a2 as ye,a8 as Et,j as yt,a1 as we,a9 as $e,aa as wt,a3 as T,aE as $t,a4 as k,A as Tt,K as St,h as It,aH as Lt,a7 as F,a5 as Te,aI as Mt,T as Se,aJ as Nt,aK as _t,l as z}from"./shared-CjhDJ2vV.js";import{c as Ct,r as Ot,p as At}from"./shared-OIF3QVAa.js";import{c as Ie}from"./shared-ml5h7U5L.js";function zt(t,e){let n=0;for(let o=0;o<t.length;o++)n+=e(t[o],o);return n}const j=["actor","command","aggregate","event","policy","readmodel","external","hotspot"],Dt=q({id:X,name:M(v(),N(1)),description:_(v())}),Pt=q({id:X,type:K(j),name:M(v(),N(1)),description:_(v()),contextId:_(v())}),Rt=q({id:X,from:M(v(),N(1)),to:M(v(),N(1)),label:_(v()),kind:_(K(["member","flow"]))}),Le=q({title:_(v()),contexts:oe(ie(Dt),[]),elements:oe(ie(Pt),[]),links:oe(ie(Rt),[])}),Me=t=>{const e=xt(Le,t),n=new Set(e.elements.map(i=>i.id)),o=new Set(e.contexts.map(i=>i.id));for(const i of e.elements)if(i.contextId!==void 0&&!o.has(i.contextId))throw new Error(`unknown context "${i.contextId}" for note "${i.id}"`);for(const i of e.links){if(!n.has(i.from))throw new Error(`unknown note "${i.from}" in link "${i.id}"`);if(!n.has(i.to))throw new Error(`unknown note "${i.to}" in link "${i.id}"`)}return e},Ne=()=>({contexts:[],elements:[],links:[]}),D=(t,e)=>{if(e!==void 0)return t.elements.find(n=>n.id===e)},Y=(t,e)=>{if(e!==void 0)return t.contexts.find(n=>n.id===e)},re=(t,e)=>{if(e!==void 0)return t.links.find(n=>n.id===e)},G=t=>t.elements.map(e=>e.id),w={SET_ELEMENT_NAME:I("SET_ELEMENT_NAME","element",L({name:M(v(),N(1))})),SET_ELEMENT_DESCRIPTION:I("SET_ELEMENT_DESCRIPTION","element",L({description:v()})),SET_ELEMENT_TYPE:I("SET_ELEMENT_TYPE","element",L({type:K(j)})),SET_ELEMENT_CONTEXT:I("SET_ELEMENT_CONTEXT","element",L({contextId:Ee(v())})),MOVE_ELEMENT:I("MOVE_ELEMENT","element",L({after:Ee(v())}),{mode:"sequence"}),ADD_ELEMENT:I("ADD_ELEMENT","page",L({id:X,type:K(j),name:M(v(),N(1)),description:_(v()),contextId:_(v())}),{dedupeKey:se}),DELETE_ELEMENT:I("DELETE_ELEMENT","element",L({})),LINK_ELEMENTS:I("LINK_ELEMENTS","page",L({id:X,from:M(v(),N(1)),to:M(v(),N(1)),label:_(v()),kind:_(K(["member","flow"]))}),{dedupeKey:se}),SET_LINK_LABEL:I("SET_LINK_LABEL","link",L({label:v()})),UNLINK_ELEMENTS:I("UNLINK_ELEMENTS","page",L({from:M(v(),N(1)),to:M(v(),N(1))}),{mode:"sequence"}),ADD_CONTEXT:I("ADD_CONTEXT","page",L({id:X,name:M(v(),N(1)),description:_(v())}),{dedupeKey:se}),SET_CONTEXT_NAME:I("SET_CONTEXT_NAME","context",L({name:M(v(),N(1))})),DELETE_CONTEXT:I("DELETE_CONTEXT","context",L({}))},y={setElementName:(t,e)=>({type:"SET_ELEMENT_NAME",target:{type:"element",id:t},payload:{name:e}}),setElementDescription:(t,e)=>({type:"SET_ELEMENT_DESCRIPTION",target:{type:"element",id:t},payload:{description:e}}),setElementType:(t,e)=>({type:"SET_ELEMENT_TYPE",target:{type:"element",id:t},payload:{type:e}}),setElementContext:(t,e)=>({type:"SET_ELEMENT_CONTEXT",target:{type:"element",id:t},payload:{contextId:e}}),moveElement:(t,e)=>({type:"MOVE_ELEMENT",target:{type:"element",id:t},payload:{after:e}}),addElement:(t,e,n)=>({type:"ADD_ELEMENT",target:{type:"page",id:"event-storming"},payload:{id:t,type:e,name:n}}),deleteElement:t=>({type:"DELETE_ELEMENT",target:{type:"element",id:t},payload:{}}),linkElements:(t,e,n,o)=>({type:"LINK_ELEMENTS",target:{type:"page",id:"event-storming"},payload:{id:t,from:e,to:n,...o?.label===void 0?{}:{label:o.label},...o?.kind===void 0?{}:{kind:o.kind}}}),setLinkLabel:(t,e)=>({type:"SET_LINK_LABEL",target:{type:"link",id:t},payload:{label:e}}),unlinkElements:(t,e)=>({type:"UNLINK_ELEMENTS",target:{type:"page",id:"event-storming"},payload:{from:t,to:e}}),addContext:(t,e)=>({type:"ADD_CONTEXT",target:{type:"page",id:"event-storming"},payload:{id:t,name:e}}),setContextName:(t,e)=>({type:"SET_CONTEXT_NAME",target:{type:"context",id:t},payload:{name:e}}),deleteContext:t=>({type:"DELETE_CONTEXT",target:{type:"context",id:t},payload:{}})},_e=(t,e)=>{const n=bt(w,e);if(n===null)return null;const o=n.target.id;switch(n.type){case"SET_ELEMENT_NAME":return Z(t,o,i=>({...i,name:n.payload.name}));case"SET_ELEMENT_DESCRIPTION":return Z(t,o,i=>({...i,description:n.payload.description}));case"SET_ELEMENT_TYPE":return Z(t,o,i=>({...i,type:n.payload.type}));case"SET_ELEMENT_CONTEXT":{const{contextId:i}=n.payload;return i!==null&&!t.contexts.some(s=>s.id===i)?null:Z(t,o,s=>i===null?Ce(s):{...s,contextId:i})}case"MOVE_ELEMENT":{const{after:i}=n.payload,s=Bt(t.elements,o,i);return s===null?null:{...t,elements:s}}case"ADD_ELEMENT":{const i=n.payload;if(t.elements.some(r=>r.id===i.id))return t;if(i.contextId!==void 0&&!t.contexts.some(r=>r.id===i.contextId))return null;const s={id:i.id,type:i.type,name:i.name,...i.description===void 0?{}:{description:i.description},...i.contextId===void 0?{}:{contextId:i.contextId}};return{...t,elements:[...t.elements,s]}}case"DELETE_ELEMENT":return t.elements.some(i=>i.id===o)?{...t,elements:t.elements.filter(i=>i.id!==o),links:t.links.filter(i=>i.from!==o&&i.to!==o)}:null;case"LINK_ELEMENTS":{const i=n.payload;return t.links.some(s=>s.id===i.id)?t:!t.elements.some(s=>s.id===i.from)||!t.elements.some(s=>s.id===i.to)?null:{...t,links:[...t.links,{id:i.id,from:i.from,to:i.to,...i.label===void 0?{}:{label:i.label},...i.kind===void 0?{}:{kind:i.kind}}]}}case"SET_LINK_LABEL":return t.links.some(i=>i.id===o)?{...t,links:t.links.map(i=>i.id===o?{...i,label:n.payload.label}:i)}:null;case"UNLINK_ELEMENTS":{const i=n.payload;return t.links.some(s=>s.from===i.from&&s.to===i.to)?{...t,links:t.links.filter(s=>!(s.from===i.from&&s.to===i.to))}:null}case"ADD_CONTEXT":{const i=n.payload;if(t.contexts.some(r=>r.id===i.id))return t;const s={id:i.id,name:i.name,...i.description===void 0?{}:{description:i.description}};return{...t,contexts:[...t.contexts,s]}}case"SET_CONTEXT_NAME":return t.contexts.some(i=>i.id===o)?{...t,contexts:t.contexts.map(i=>i.id===o?{...i,name:n.payload.name}:i)}:null;case"DELETE_CONTEXT":return t.contexts.some(i=>i.id===o)?{...t,contexts:t.contexts.filter(i=>i.id!==o),elements:t.elements.map(i=>i.contextId===o?Ce(i):i)}:null;default:return vt(n)}},Ce=t=>{const e={...t};return delete e.contextId,e},Z=(t,e,n)=>t.elements.some(o=>o.id===e)?{...t,elements:t.elements.map(o=>o.id===e?n(o):o)}:null,Bt=(t,e,n)=>{const o=t.findIndex(a=>a.id===e);if(o<0||n!==null&&!t.some(a=>a.id===n))return null;const i=t[o];if(i===void 0)return null;const r=[...t.filter(a=>a.id!==e)];return r.splice(n===null?0:r.findIndex(a=>a.id===n)+1,0,i),r},Xt=new Set(["actor>command","command>aggregate","aggregate>event","command>event","policy>command","external>event"]),J=(t,e)=>Xt.has(`${t}>${e}`),Yt=(t,e,n)=>t.kind!==void 0?t.kind==="member":J(e,n),Ht=["readmodel","actor","policy","command","aggregate","external","event","hotspot"],Kt=(t,e)=>{const n=new Map;for(const o of t.links){const i=e.get(o.from),s=e.get(o.to);if(i===void 0||s===void 0||i==="hotspot"==(s==="hotspot")||o.kind!==void 0&&o.kind!=="member")continue;const r=i==="hotspot"?o.from:o.to;n.has(r)||n.set(r,i==="hotspot"?o.to:o.from)}return n},Wt=(t,e,n)=>{const o=new Map(t.map(a=>[a.id,a.id])),i=a=>{let d=a;for(;o.get(d)!==d;)d=o.get(d)??d;let l=a;for(;l!==d;){const p=o.get(l)??d;o.set(l,d),l=p}return d};for(const a of e){if(!o.has(a.from)||!o.has(a.to))continue;const d=n.get(a.from),l=n.get(a.to);d===void 0||l===void 0||Yt(a,d,l)&&o.set(i(a.from),i(a.to))}const s=new Map,r=new Map;for(const a of t){const d=i(a.id);r.set(a.id,d);const l=s.get(d);l?l.push(a):s.set(d,[a])}return{groups:s,rootOf:r}},B=t=>{const e=new Map(t.elements.map(l=>[l.id,l.type])),n=Kt(t,e),o=t.elements.filter(l=>!n.has(l.id)),{groups:i,rootOf:s}=Wt(o,t.links,e),r=new Map;for(const[l,p]of n){const m=D(t,l),u=s.get(p);if(m===void 0||u===void 0)continue;const b=r.get(u);b?b.push({note:m,targetId:p}):r.set(u,[{note:m,targetId:p}])}const a=new Map(Ht.map((l,p)=>[l,p])),d=new Map(t.elements.map((l,p)=>[l.id,p]));return[...i].map(([l,p])=>{const m=[...p].sort((u,b)=>(a.get(u.type)??0)-(a.get(b.type)??0)||(d.get(u.id)??0)-(d.get(b.id)??0));return{id:p[0]?.id??"",notes:m,pins:r.get(l)??[],contextId:p.find(u=>u.contextId!==void 0)?.contextId}})},Ft=t=>{const e=B(t).flatMap(o=>[...o.notes,...o.pins.map(i=>i.note)]),n=new Set(e.map(o=>o.id));return{...t,elements:[...e,...t.elements.filter(o=>!n.has(o.id))]}},Oe=(t,e)=>{const n=[...t.notes,...t.pins.map(r=>r.note)],o=n.find(r=>J(e,r.type));if(o!==void 0)return{anchorId:o.id,incoming:!0};const i=n.find(r=>J(r.type,e));if(i!==void 0)return{anchorId:i.id,incoming:!1};const s=n[0];return s===void 0?void 0:{anchorId:s.id,incoming:!0}},Ae=(t,e)=>{const n=new Map(e.flatMap(o=>o.notes.map(i=>[i.id,o.id])));return t.links.flatMap(o=>{const i=n.get(o.from),s=n.get(o.to);return i===void 0||s===void 0||i===s?[]:[{id:o.id,from:i,to:s,...o.label!==void 0?{label:o.label}:{}}]})},ae=(t,e)=>`${t}\0${e}`,ze=(t,e,n)=>{const{widthOf:o,gapX:i,padX:s,maxWidth:r}=n,a=new Map;for(const c of e)a.set(ae(c.from,c.to),c),a.set(ae(c.to,c.from),c);const d=(c,g)=>c===void 0||g===void 0?void 0:a.get(ae(c,g)),l=c=>zt(c,g=>o(g))+i*Math.max(0,c.length-1)+s*2<=r,p=[];let m=[],u;const b=()=>{m.length!==0&&(p.push({sliceIds:m,...u===void 0?{}:{cutFrom:u}}),m=[],u=void 0)};for(const c of t.map(g=>g.id)){if(m.length>0&&!l([...m,c])){let g=m.length;for(;d(m[g-1],g===m.length?c:m[g])!==void 0&&(g-=1,g!==0););const f=g===0?[]:m.splice(g),x=g===0?d(m.at(-1),c):d(m.at(-1),f[0]);b(),m=f,u=x}m.push(c)}return b(),p},U=t=>[...t.notes].reverse().find(e=>e.type==="event")??t.notes.at(-1),De=(t,e)=>{const n=U(t),o=e.notes[0];if(!(n===void 0||o===void 0))return{from:n.id,to:o.id}},Pe={actor:"Actor",command:"Command",aggregate:"Aggregate",event:"Domain Event",policy:"Policy",readmodel:"Read Model",external:"External System",hotspot:"Hotspot"},Re={actor:"\u30A2\u30AF\u30BF\u30FC",command:"\u30B3\u30DE\u30F3\u30C9",aggregate:"\u96C6\u7D04",event:"\u30A4\u30D9\u30F3\u30C8",policy:"\u30DD\u30EA\u30B7\u30FC",readmodel:"\u30EA\u30FC\u30C9\u30E2\u30C7\u30EB",external:"\u5916\u90E8\u30B7\u30B9\u30C6\u30E0",hotspot:"\u30DB\u30C3\u30C8\u30B9\u30DD\u30C3\u30C8"},O=kt({en:{renameElementTitle:"Rename element",updateDescriptionTitle:"Update element description",changeTypeTitle:"Change element type",changeContextTitle:"Change the element\u2019s context",moveTitle:"Change timeline position",addElementTitle:"Add element",deleteElementTitle:"Delete element",linkTitle:"Link elements",renameLinkTitle:"Change link label",unlinkTitle:"Remove link",addContextTitle:"Add bounded context",renameContextTitle:"Rename bounded context",deleteContextTitle:"Delete bounded context",renamed:(t,e)=>`"${t}" \u2192 "${e}"`,noContext:"No context",moveToFront:"\u2192 To the front",moveAfter:t=>`\u2192 Right after "${t}"`,elementLabel:t=>`Element \xB7 ${t}`,contextLabel:t=>`Bounded context \xB7 ${t}`,linkLabel:(t,e)=>`Link \xB7 ${t}\u2192${e}`,linkGroup:"Link",pageLabel:t=>`Page \xB7 ${t}`,elementGroup:"Element",contextGroup:"Bounded context",noteTypeLabel:t=>Pe[t],addTypeLabel:t=>`+ ${Pe[t]}`,addHotspot:"+ Hotspot",pinHotspotTitle:"Pin a hotspot on this note",deleteNote:"Delete",noteNameLabel:"Note name",newContextTitle:"New bounded context",contextNamePlaceholder:"Context name",cancel:"Cancel",create:"Create",save:"Save",appendMenuNext:"Note to add next",appendMenuAfter:t=>`Continue after \u201C${t}\u201D`,emptyTitle:"No notes yet",emptyBody:"Start Event Storming by placing domain events on the timeline.",addFirstEvent:"+ First event",portAriaLabel:"Add what comes next (pick a type, or drag to connect to another slice)",portTitle:"Click: pick a note to continue / Drag: connect to another slice",renameContextHint:"Click to rename",dissolveContextAria:t=>`Dissolve bounded context "${t}"`,dissolveContextTitle:"Dissolve the bounded context (notes stay)",noteCount:t=>`${t} notes`,sliceCount:t=>`${t} slices`,contextCount:t=>`${t} bounded contexts`,hudHint:"Wheel: pan \xB7 Pinch: zoom \xB7 Drag background: select area",zoomOut:"Zoom out",zoomReset:"Reset to 100%",zoomIn:"Zoom in",zoomFit:"Fit to view",selectedLinks:t=>`${t} links selected`,deleteLinks:"Delete links",deleteHint:"Delete works too",clearSelection:"Clear selection",selectedSlices:t=>`${t} slices selected`,groupIntoContext:"Group into a bounded context",addToExistingAria:"Add to an existing bounded context",addToExistingOption:"Add to existing\u2026",removeFromContext:"Remove from context",deleteButton:"Delete"},ja:{renameElementTitle:"\u8981\u7D20\u540D\u3092\u5909\u66F4",updateDescriptionTitle:"\u8981\u7D20\u306E\u8AAC\u660E\u3092\u66F4\u65B0",changeTypeTitle:"\u8981\u7D20\u306E\u7A2E\u5225\u3092\u5909\u66F4",changeContextTitle:"\u6240\u5C5E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u5909\u66F4",moveTitle:"\u30BF\u30A4\u30E0\u30E9\u30A4\u30F3\u4F4D\u7F6E\u3092\u5909\u66F4",addElementTitle:"\u8981\u7D20\u3092\u8FFD\u52A0",deleteElementTitle:"\u8981\u7D20\u3092\u524A\u9664",linkTitle:"\u8981\u7D20\u3092\u9023\u7D50",renameLinkTitle:"\u30EA\u30F3\u30AF\u540D\u3092\u5909\u66F4",unlinkTitle:"\u30EA\u30F3\u30AF\u3092\u524A\u9664",addContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8FFD\u52A0",renameContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u540D\u3092\u5909\u66F4",deleteContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u524A\u9664",renamed:(t,e)=>`"${t}" \u2192 "${e}"`,noContext:"\u672A\u6240\u5C5E",moveToFront:"\u2192 \u5148\u982D\u3078",moveAfter:t=>`\u2192 "${t}" \u306E\u76F4\u5F8C\u3078`,elementLabel:t=>`\u8981\u7D20 \xB7 ${t}`,contextLabel:t=>`\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8 \xB7 ${t}`,linkLabel:(t,e)=>`\u30EA\u30F3\u30AF \xB7 ${t}\u2192${e}`,linkGroup:"\u30EA\u30F3\u30AF",pageLabel:t=>`\u30DA\u30FC\u30B8 \xB7 ${t}`,elementGroup:"\u8981\u7D20",contextGroup:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8",noteTypeLabel:t=>Re[t],addTypeLabel:t=>`+ ${Re[t]}`,addHotspot:"+ \u30DB\u30C3\u30C8\u30B9\u30DD\u30C3\u30C8",pinHotspotTitle:"\u3053\u306E\u4ED8\u7B8B\u306B\u30DB\u30C3\u30C8\u30B9\u30DD\u30C3\u30C8\u3092\u7ACB\u3066\u308B",deleteNote:"\u524A\u9664",noteNameLabel:"\u4ED8\u7B8B\u540D",newContextTitle:"\u65B0\u3057\u3044\u5883\u754C\u3065\u3051\u3089\u308C\u305F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8",contextNamePlaceholder:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u540D",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",create:"\u4F5C\u6210",save:"\u4FDD\u5B58",appendMenuNext:"\u7D9A\u304D\u306B\u8FFD\u52A0\u3059\u308B\u4ED8\u7B8B",appendMenuAfter:t=>`\u300C${t}\u300D\u306E\u7D9A\u304D\u306B\u8FFD\u52A0`,emptyTitle:"\u4ED8\u7B8B\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",emptyBody:"\u30A4\u30D9\u30F3\u30C8\u30B9\u30C8\u30FC\u30DF\u30F3\u30B0\u3092\u958B\u59CB\u3057\u307E\u3057\u3087\u3046\u3002\u30C9\u30E1\u30A4\u30F3\u30A4\u30D9\u30F3\u30C8\u3092\u6642\u7CFB\u5217\u306B\u8CBC\u308B\u3068\u3053\u308D\u304B\u3089\u59CB\u3081\u307E\u3059\u3002",addFirstEvent:"+ \u6700\u521D\u306E\u30A4\u30D9\u30F3\u30C8",portAriaLabel:"\u7D9A\u304D\u3092\u8FFD\u52A0\uFF08\u7A2E\u985E\u3092\u9078\u3093\u3067\u8FFD\u52A0 / \u30C9\u30E9\u30C3\u30B0\u3067\u4ED6\u306E\u30B9\u30E9\u30A4\u30B9\u3078\u63A5\u7D9A\uFF09",portTitle:"\u30AF\u30EA\u30C3\u30AF: \u7D9A\u304D\u306E\u4ED8\u7B8B\u3092\u9078\u3093\u3067\u8FFD\u52A0 / \u30C9\u30E9\u30C3\u30B0: \u4ED6\u306E\u30B9\u30E9\u30A4\u30B9\u3078\u63A5\u7D9A",renameContextHint:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u540D\u524D\u3092\u5909\u66F4",dissolveContextAria:t=>`\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u300C${t}\u300D\u3092\u89E3\u4F53`,dissolveContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u89E3\u4F53\uFF08\u4ED8\u7B8B\u306F\u6B8B\u308A\u307E\u3059\uFF09",noteCount:t=>`${t} \u4ED8\u7B8B`,sliceCount:t=>`${t} \u30B9\u30E9\u30A4\u30B9`,contextCount:t=>`${t} \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8`,hudHint:"\u30DB\u30A4\u30FC\u30EB: \u79FB\u52D5 \xB7 \u30D4\u30F3\u30C1: \u30BA\u30FC\u30E0 \xB7 \u80CC\u666F\u30C9\u30E9\u30C3\u30B0: \u7BC4\u56F2\u9078\u629E",zoomOut:"\u7E2E\u5C0F",zoomReset:"100% \u306B\u623B\u3059",zoomIn:"\u62E1\u5927",zoomFit:"\u5168\u4F53\u3092\u8868\u793A",selectedLinks:t=>`${t} \u672C\u306E\u30EA\u30F3\u30AF\u3092\u9078\u629E\u4E2D`,deleteLinks:"\u30EA\u30F3\u30AF\u3092\u524A\u9664",deleteHint:"Delete \u3067\u3082\u524A\u9664\u3067\u304D\u307E\u3059",clearSelection:"\u9078\u629E\u89E3\u9664",selectedSlices:t=>`${t} \u30B9\u30E9\u30A4\u30B9\u3092\u9078\u629E\u4E2D`,groupIntoContext:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u307E\u3068\u3081\u308B",addToExistingAria:"\u65E2\u5B58\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3078\u8FFD\u52A0",addToExistingOption:"\u65E2\u5B58\u3078\u8FFD\u52A0\u2026",removeFromContext:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u89E3\u9664",deleteButton:"\u524A\u9664"}}),Gt={SET_ELEMENT_NAME:(t,e,n)=>({title:t.renameElementTitle,tone:"update",body:t.renamed(D(n,e.target.id)?.name??"?",$(w.SET_ELEMENT_NAME,e).name)}),SET_ELEMENT_DESCRIPTION:(t,e)=>({title:t.updateDescriptionTitle,tone:"update",body:`\u2192 "${$(w.SET_ELEMENT_DESCRIPTION,e).description.slice(0,60)}"`}),SET_ELEMENT_TYPE:(t,e)=>({title:t.changeTypeTitle,tone:"update",body:`\u2192 ${$(w.SET_ELEMENT_TYPE,e).type}`}),SET_ELEMENT_CONTEXT:(t,e)=>({title:t.changeContextTitle,tone:"move",body:`\u2192 ${$(w.SET_ELEMENT_CONTEXT,e).contextId??t.noContext}`}),MOVE_ELEMENT:(t,e)=>({title:t.moveTitle,tone:"move",body:$(w.MOVE_ELEMENT,e).after===null?t.moveToFront:t.moveAfter($(w.MOVE_ELEMENT,e).after??"")}),ADD_ELEMENT:(t,e)=>({title:t.addElementTitle,tone:"create",body:`+ "${$(w.ADD_ELEMENT,e).name}"`}),DELETE_ELEMENT:(t,e,n)=>({title:t.deleteElementTitle,tone:"delete",body:`\u2212 "${D(n,e.target.id)?.name??e.target.id}"`}),LINK_ELEMENTS:(t,e)=>({title:t.linkTitle,tone:"create",body:`${$(w.LINK_ELEMENTS,e).from} \u2192 ${$(w.LINK_ELEMENTS,e).to}`}),SET_LINK_LABEL:(t,e)=>({title:t.renameLinkTitle,tone:"update",body:`\u2192 "${$(w.SET_LINK_LABEL,e).label}"`}),UNLINK_ELEMENTS:(t,e)=>({title:t.unlinkTitle,tone:"delete",body:`${$(w.UNLINK_ELEMENTS,e).from} \u2192 ${$(w.UNLINK_ELEMENTS,e).to}`}),ADD_CONTEXT:(t,e)=>({title:t.addContextTitle,tone:"create",body:`+ "${$(w.ADD_CONTEXT,e).name}"`}),SET_CONTEXT_NAME:(t,e)=>({title:t.renameContextTitle,tone:"update",body:`\u2192 "${$(w.SET_CONTEXT_NAME,e).name}"`}),DELETE_CONTEXT:(t,e,n)=>({title:t.deleteContextTitle,tone:"delete",body:`\u2212 "${Y(n,e.target.id)?.name??e.target.id}"`})},Be=(t,e,n,o)=>{const i=Gt[e.type],r=i?i(t,e,o??n):{title:e.type,tone:"meta"};return{title:r.title,targetLabel:Ye(t,n,e.target),tone:r.tone,...r.body===void 0?{}:{summary:r.body}}},Xe=t=>`${t.type} ${W(t.target)} ${JSON.stringify(t.payload)}`,Ye=(t,e,n)=>{switch(n.type){case"element":{const o=D(e,n.id);return o?t.elementLabel(o.name):`${t.elementLabel(n.id)} (missing)`}case"context":{const o=Y(e,n.id);return o?t.contextLabel(o.name):`${t.contextLabel(n.id)} (missing)`}case"link":{const o=re(e,n.id);return o?t.linkLabel(o.from,o.to):`${t.linkGroup} \xB7 ${n.id} (missing)`}case"page":return t.pageLabel(de(e));default:return`${n.type} \xB7 ${n.id}`}},He=(t,e)=>[...e.elements.map(n=>({value:W({type:"element",id:n.id}),label:n.name,group:t.elementGroup})),...e.contexts.map(n=>({value:W({type:"context",id:n.id}),label:n.name,group:t.contextGroup}))],Ut=(t,e,n)=>{const o=e.elements.find(i=>i.id===n.note);return o?{value:W({type:"element",id:o.id}),label:o.name,group:t.elementGroup}:null},de=t=>t.title??"Event Storming",Ke=(t,e)=>{const n={...e},o=D(t,e.note);e.note!==void 0&&!o&&delete n.note;const i=Y(t,e.context);return e.context!==void 0&&!i&&delete n.context,n},We=(t,e)=>{switch(e.type){case"element":return D(t,e.id)!==void 0;case"context":return Y(t,e.id)!==void 0;case"link":return re(t,e.id)!==void 0;case"page":return!0;default:return!1}},Fe=t=>{const e=O(t);return{name:"event-storming",label:"Event Storming",parseBase:Me,emptyBase:Ne,actions:w,apply:_e,canonicalState:Ft,hasTarget:We,describe:(n,o,i)=>Be(e,n,o,i),serialize:Xe,resolveNavigation:Ke,navigationFor:(n,o)=>o.type==="element"&&D(n,o.id)!==void 0?{note:o.id}:null,commentTargets:(n,o)=>He(e,n),currentTarget:(n,o)=>Ut(e,n,o),title:de}},Vt={width:300,height:260},qt={event:{bg:"linear-gradient(178deg, #ffbc55, #f8a52e)",ink:"#402703"},command:{bg:"linear-gradient(178deg, #93c9f2, #74b4e8)",ink:"#0e2c4b"},aggregate:{bg:"linear-gradient(178deg, #fff3a6, #fdea7e)",ink:"#4a3a06"},actor:{bg:"linear-gradient(178deg, #ffdf63, #fdd23e)",ink:"#423204"},policy:{bg:"linear-gradient(178deg, #dcc2f7, #c9a6f0)",ink:"#32195c"},readmodel:{bg:"linear-gradient(178deg, #c0e788, #a8dc63)",ink:"#22380a"},external:{bg:"linear-gradient(178deg, #f9bcd3, #f4a0c0)",ink:"#4b1029"},hotspot:{bg:"linear-gradient(178deg, #d63550, #b81c33)",ink:"#ffffff"}},le=t=>{const{bg:e,ink:n}=qt[t];return`--es-note-bg:${e};--es-note-ink:${n}`},jt=ye`
1
+ import{ae as xt,af as q,ag as oe,ah as ie,aC as _,ai as v,aB as X,aj as K,ak as M,al as N,p as I,av as L,v as se,ay as Ee,P as bt,e as vt,a0 as kt,V as F,R as $,a2 as ye,a9 as Et,j as yt,a1 as we,aa as $e,ab as wt,a3 as T,aF as $t,a4 as k,A as Tt,K as St,h as It,a8 as Te,aI as Lt,a7 as W,a5 as Se,aJ as Mt,T as Ie,aK as Nt,aL as _t,l as z}from"./shared-BDka-8DG.js";import{c as Ct,r as Ot,p as At}from"./shared-k9bZPE_p.js";function zt(t,e){let n=0;for(let o=0;o<t.length;o++)n+=e(t[o],o);return n}const j=["actor","command","aggregate","event","policy","readmodel","external","hotspot"],Dt=q({id:X,name:M(v(),N(1)),description:_(v())}),Pt=q({id:X,type:K(j),name:M(v(),N(1)),description:_(v()),contextId:_(v())}),Rt=q({id:X,from:M(v(),N(1)),to:M(v(),N(1)),label:_(v()),kind:_(K(["member","flow"]))}),Le=q({title:_(v()),contexts:oe(ie(Dt),[]),elements:oe(ie(Pt),[]),links:oe(ie(Rt),[])}),Me=t=>{const e=xt(Le,t),n=new Set(e.elements.map(i=>i.id)),o=new Set(e.contexts.map(i=>i.id));for(const i of e.elements)if(i.contextId!==void 0&&!o.has(i.contextId))throw new Error(`unknown context "${i.contextId}" for note "${i.id}"`);for(const i of e.links){if(!n.has(i.from))throw new Error(`unknown note "${i.from}" in link "${i.id}"`);if(!n.has(i.to))throw new Error(`unknown note "${i.to}" in link "${i.id}"`)}return e},Ne=()=>({contexts:[],elements:[],links:[]}),D=(t,e)=>{if(e!==void 0)return t.elements.find(n=>n.id===e)},Y=(t,e)=>{if(e!==void 0)return t.contexts.find(n=>n.id===e)},re=(t,e)=>{if(e!==void 0)return t.links.find(n=>n.id===e)},G=t=>t.elements.map(e=>e.id),w={SET_ELEMENT_NAME:I("SET_ELEMENT_NAME","element",L({name:M(v(),N(1))})),SET_ELEMENT_DESCRIPTION:I("SET_ELEMENT_DESCRIPTION","element",L({description:v()})),SET_ELEMENT_TYPE:I("SET_ELEMENT_TYPE","element",L({type:K(j)})),SET_ELEMENT_CONTEXT:I("SET_ELEMENT_CONTEXT","element",L({contextId:Ee(v())})),MOVE_ELEMENT:I("MOVE_ELEMENT","element",L({after:Ee(v())}),{mode:"sequence"}),ADD_ELEMENT:I("ADD_ELEMENT","page",L({id:X,type:K(j),name:M(v(),N(1)),description:_(v()),contextId:_(v())}),{dedupeKey:se}),DELETE_ELEMENT:I("DELETE_ELEMENT","element",L({})),LINK_ELEMENTS:I("LINK_ELEMENTS","page",L({id:X,from:M(v(),N(1)),to:M(v(),N(1)),label:_(v()),kind:_(K(["member","flow"]))}),{dedupeKey:se}),SET_LINK_LABEL:I("SET_LINK_LABEL","link",L({label:v()})),UNLINK_ELEMENTS:I("UNLINK_ELEMENTS","page",L({from:M(v(),N(1)),to:M(v(),N(1))}),{mode:"sequence"}),ADD_CONTEXT:I("ADD_CONTEXT","page",L({id:X,name:M(v(),N(1)),description:_(v())}),{dedupeKey:se}),SET_CONTEXT_NAME:I("SET_CONTEXT_NAME","context",L({name:M(v(),N(1))})),DELETE_CONTEXT:I("DELETE_CONTEXT","context",L({}))},y={setElementName:(t,e)=>({type:"SET_ELEMENT_NAME",target:{type:"element",id:t},payload:{name:e}}),setElementDescription:(t,e)=>({type:"SET_ELEMENT_DESCRIPTION",target:{type:"element",id:t},payload:{description:e}}),setElementType:(t,e)=>({type:"SET_ELEMENT_TYPE",target:{type:"element",id:t},payload:{type:e}}),setElementContext:(t,e)=>({type:"SET_ELEMENT_CONTEXT",target:{type:"element",id:t},payload:{contextId:e}}),moveElement:(t,e)=>({type:"MOVE_ELEMENT",target:{type:"element",id:t},payload:{after:e}}),addElement:(t,e,n)=>({type:"ADD_ELEMENT",target:{type:"page",id:"event-storming"},payload:{id:t,type:e,name:n}}),deleteElement:t=>({type:"DELETE_ELEMENT",target:{type:"element",id:t},payload:{}}),linkElements:(t,e,n,o)=>({type:"LINK_ELEMENTS",target:{type:"page",id:"event-storming"},payload:{id:t,from:e,to:n,...o?.label===void 0?{}:{label:o.label},...o?.kind===void 0?{}:{kind:o.kind}}}),setLinkLabel:(t,e)=>({type:"SET_LINK_LABEL",target:{type:"link",id:t},payload:{label:e}}),unlinkElements:(t,e)=>({type:"UNLINK_ELEMENTS",target:{type:"page",id:"event-storming"},payload:{from:t,to:e}}),addContext:(t,e)=>({type:"ADD_CONTEXT",target:{type:"page",id:"event-storming"},payload:{id:t,name:e}}),setContextName:(t,e)=>({type:"SET_CONTEXT_NAME",target:{type:"context",id:t},payload:{name:e}}),deleteContext:t=>({type:"DELETE_CONTEXT",target:{type:"context",id:t},payload:{}})},_e=(t,e)=>{const n=bt(w,e);if(n===null)return null;const o=n.target.id;switch(n.type){case"SET_ELEMENT_NAME":return Z(t,o,i=>({...i,name:n.payload.name}));case"SET_ELEMENT_DESCRIPTION":return Z(t,o,i=>({...i,description:n.payload.description}));case"SET_ELEMENT_TYPE":return Z(t,o,i=>({...i,type:n.payload.type}));case"SET_ELEMENT_CONTEXT":{const{contextId:i}=n.payload;return i!==null&&!t.contexts.some(s=>s.id===i)?null:Z(t,o,s=>i===null?Ce(s):{...s,contextId:i})}case"MOVE_ELEMENT":{const{after:i}=n.payload,s=Bt(t.elements,o,i);return s===null?null:{...t,elements:s}}case"ADD_ELEMENT":{const i=n.payload;if(t.elements.some(r=>r.id===i.id))return t;if(i.contextId!==void 0&&!t.contexts.some(r=>r.id===i.contextId))return null;const s={id:i.id,type:i.type,name:i.name,...i.description===void 0?{}:{description:i.description},...i.contextId===void 0?{}:{contextId:i.contextId}};return{...t,elements:[...t.elements,s]}}case"DELETE_ELEMENT":return t.elements.some(i=>i.id===o)?{...t,elements:t.elements.filter(i=>i.id!==o),links:t.links.filter(i=>i.from!==o&&i.to!==o)}:null;case"LINK_ELEMENTS":{const i=n.payload;return t.links.some(s=>s.id===i.id)?t:!t.elements.some(s=>s.id===i.from)||!t.elements.some(s=>s.id===i.to)?null:{...t,links:[...t.links,{id:i.id,from:i.from,to:i.to,...i.label===void 0?{}:{label:i.label},...i.kind===void 0?{}:{kind:i.kind}}]}}case"SET_LINK_LABEL":return t.links.some(i=>i.id===o)?{...t,links:t.links.map(i=>i.id===o?{...i,label:n.payload.label}:i)}:null;case"UNLINK_ELEMENTS":{const i=n.payload;return t.links.some(s=>s.from===i.from&&s.to===i.to)?{...t,links:t.links.filter(s=>!(s.from===i.from&&s.to===i.to))}:null}case"ADD_CONTEXT":{const i=n.payload;if(t.contexts.some(r=>r.id===i.id))return t;const s={id:i.id,name:i.name,...i.description===void 0?{}:{description:i.description}};return{...t,contexts:[...t.contexts,s]}}case"SET_CONTEXT_NAME":return t.contexts.some(i=>i.id===o)?{...t,contexts:t.contexts.map(i=>i.id===o?{...i,name:n.payload.name}:i)}:null;case"DELETE_CONTEXT":return t.contexts.some(i=>i.id===o)?{...t,contexts:t.contexts.filter(i=>i.id!==o),elements:t.elements.map(i=>i.contextId===o?Ce(i):i)}:null;default:return vt(n)}},Ce=t=>{const e={...t};return delete e.contextId,e},Z=(t,e,n)=>t.elements.some(o=>o.id===e)?{...t,elements:t.elements.map(o=>o.id===e?n(o):o)}:null,Bt=(t,e,n)=>{const o=t.findIndex(a=>a.id===e);if(o<0||n!==null&&!t.some(a=>a.id===n))return null;const i=t[o];if(i===void 0)return null;const r=[...t.filter(a=>a.id!==e)];return r.splice(n===null?0:r.findIndex(a=>a.id===n)+1,0,i),r},Xt=new Set(["actor>command","command>aggregate","aggregate>event","command>event","policy>command","external>event"]),J=(t,e)=>Xt.has(`${t}>${e}`),Yt=(t,e,n)=>t.kind!==void 0?t.kind==="member":J(e,n),Ht=["readmodel","actor","policy","command","aggregate","external","event","hotspot"],Kt=(t,e)=>{const n=new Map;for(const o of t.links){const i=e.get(o.from),s=e.get(o.to);if(i===void 0||s===void 0||i==="hotspot"==(s==="hotspot")||o.kind!==void 0&&o.kind!=="member")continue;const r=i==="hotspot"?o.from:o.to;n.has(r)||n.set(r,i==="hotspot"?o.to:o.from)}return n},Ft=(t,e,n)=>{const o=new Map(t.map(a=>[a.id,a.id])),i=a=>{let d=a;for(;o.get(d)!==d;)d=o.get(d)??d;let l=a;for(;l!==d;){const p=o.get(l)??d;o.set(l,d),l=p}return d};for(const a of e){if(!o.has(a.from)||!o.has(a.to))continue;const d=n.get(a.from),l=n.get(a.to);d===void 0||l===void 0||Yt(a,d,l)&&o.set(i(a.from),i(a.to))}const s=new Map,r=new Map;for(const a of t){const d=i(a.id);r.set(a.id,d);const l=s.get(d);l?l.push(a):s.set(d,[a])}return{groups:s,rootOf:r}},B=t=>{const e=new Map(t.elements.map(l=>[l.id,l.type])),n=Kt(t,e),o=t.elements.filter(l=>!n.has(l.id)),{groups:i,rootOf:s}=Ft(o,t.links,e),r=new Map;for(const[l,p]of n){const m=D(t,l),u=s.get(p);if(m===void 0||u===void 0)continue;const b=r.get(u);b?b.push({note:m,targetId:p}):r.set(u,[{note:m,targetId:p}])}const a=new Map(Ht.map((l,p)=>[l,p])),d=new Map(t.elements.map((l,p)=>[l.id,p]));return[...i].map(([l,p])=>{const m=[...p].sort((u,b)=>(a.get(u.type)??0)-(a.get(b.type)??0)||(d.get(u.id)??0)-(d.get(b.id)??0));return{id:p[0]?.id??"",notes:m,pins:r.get(l)??[],contextId:p.find(u=>u.contextId!==void 0)?.contextId}})},Wt=t=>{const e=B(t).flatMap(o=>[...o.notes,...o.pins.map(i=>i.note)]),n=new Set(e.map(o=>o.id));return{...t,elements:[...e,...t.elements.filter(o=>!n.has(o.id))]}},Oe=(t,e)=>{const n=[...t.notes,...t.pins.map(r=>r.note)],o=n.find(r=>J(e,r.type));if(o!==void 0)return{anchorId:o.id,incoming:!0};const i=n.find(r=>J(r.type,e));if(i!==void 0)return{anchorId:i.id,incoming:!1};const s=n[0];return s===void 0?void 0:{anchorId:s.id,incoming:!0}},Ae=(t,e)=>{const n=new Map(e.flatMap(o=>o.notes.map(i=>[i.id,o.id])));return t.links.flatMap(o=>{const i=n.get(o.from),s=n.get(o.to);return i===void 0||s===void 0||i===s?[]:[{id:o.id,from:i,to:s,...o.label!==void 0?{label:o.label}:{}}]})},ae=(t,e)=>`${t}\0${e}`,ze=(t,e,n)=>{const{widthOf:o,gapX:i,padX:s,maxWidth:r}=n,a=new Map;for(const c of e)a.set(ae(c.from,c.to),c),a.set(ae(c.to,c.from),c);const d=(c,g)=>c===void 0||g===void 0?void 0:a.get(ae(c,g)),l=c=>zt(c,g=>o(g))+i*Math.max(0,c.length-1)+s*2<=r,p=[];let m=[],u;const b=()=>{m.length!==0&&(p.push({sliceIds:m,...u===void 0?{}:{cutFrom:u}}),m=[],u=void 0)};for(const c of t.map(g=>g.id)){if(m.length>0&&!l([...m,c])){let g=m.length;for(;d(m[g-1],g===m.length?c:m[g])!==void 0&&(g-=1,g!==0););const f=g===0?[]:m.splice(g),x=g===0?d(m.at(-1),c):d(m.at(-1),f[0]);b(),m=f,u=x}m.push(c)}return b(),p},U=t=>[...t.notes].reverse().find(e=>e.type==="event")??t.notes.at(-1),De=(t,e)=>{const n=U(t),o=e.notes[0];if(!(n===void 0||o===void 0))return{from:n.id,to:o.id}},Pe={actor:"Actor",command:"Command",aggregate:"Aggregate",event:"Domain Event",policy:"Policy",readmodel:"Read Model",external:"External System",hotspot:"Hotspot"},Re={actor:"\u30A2\u30AF\u30BF\u30FC",command:"\u30B3\u30DE\u30F3\u30C9",aggregate:"\u96C6\u7D04",event:"\u30A4\u30D9\u30F3\u30C8",policy:"\u30DD\u30EA\u30B7\u30FC",readmodel:"\u30EA\u30FC\u30C9\u30E2\u30C7\u30EB",external:"\u5916\u90E8\u30B7\u30B9\u30C6\u30E0",hotspot:"\u30DB\u30C3\u30C8\u30B9\u30DD\u30C3\u30C8"},O=kt({en:{renameElementTitle:"Rename element",updateDescriptionTitle:"Update element description",changeTypeTitle:"Change element type",changeContextTitle:"Change the element\u2019s context",moveTitle:"Change timeline position",addElementTitle:"Add element",deleteElementTitle:"Delete element",linkTitle:"Link elements",renameLinkTitle:"Change link label",unlinkTitle:"Remove link",addContextTitle:"Add bounded context",renameContextTitle:"Rename bounded context",deleteContextTitle:"Delete bounded context",renamed:(t,e)=>`"${t}" \u2192 "${e}"`,noContext:"No context",moveToFront:"\u2192 To the front",moveAfter:t=>`\u2192 Right after "${t}"`,elementLabel:t=>`Element \xB7 ${t}`,contextLabel:t=>`Bounded context \xB7 ${t}`,linkLabel:(t,e)=>`Link \xB7 ${t}\u2192${e}`,linkGroup:"Link",pageLabel:t=>`Page \xB7 ${t}`,elementGroup:"Element",contextGroup:"Bounded context",noteTypeLabel:t=>Pe[t],addTypeLabel:t=>`+ ${Pe[t]}`,addHotspot:"+ Hotspot",pinHotspotTitle:"Pin a hotspot on this note",deleteNote:"Delete",noteNameLabel:"Note name",newContextTitle:"New bounded context",contextNamePlaceholder:"Context name",cancel:"Cancel",create:"Create",save:"Save",appendMenuNext:"Note to add next",appendMenuAfter:t=>`Continue after \u201C${t}\u201D`,emptyTitle:"No notes yet",emptyBody:"Start Event Storming by placing domain events on the timeline.",addFirstEvent:"+ First event",portAriaLabel:"Add what comes next (pick a type, or drag to connect to another slice)",portTitle:"Click: pick a note to continue / Drag: connect to another slice",renameContextHint:"Click to rename",dissolveContextAria:t=>`Dissolve bounded context "${t}"`,dissolveContextTitle:"Dissolve the bounded context (notes stay)",noteCount:t=>`${t} notes`,sliceCount:t=>`${t} slices`,contextCount:t=>`${t} bounded contexts`,hudHint:"Wheel: pan \xB7 Pinch: zoom \xB7 Drag background: select area",zoomOut:"Zoom out",zoomReset:"Reset to 100%",zoomIn:"Zoom in",zoomFit:"Fit to view",selectedLinks:t=>`${t} links selected`,deleteLinks:"Delete links",deleteHint:"Delete works too",clearSelection:"Clear selection",selectedSlices:t=>`${t} slices selected`,groupIntoContext:"Group into a bounded context",addToExistingAria:"Add to an existing bounded context",addToExistingOption:"Add to existing\u2026",removeFromContext:"Remove from context",deleteButton:"Delete"},ja:{renameElementTitle:"\u8981\u7D20\u540D\u3092\u5909\u66F4",updateDescriptionTitle:"\u8981\u7D20\u306E\u8AAC\u660E\u3092\u66F4\u65B0",changeTypeTitle:"\u8981\u7D20\u306E\u7A2E\u5225\u3092\u5909\u66F4",changeContextTitle:"\u6240\u5C5E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u5909\u66F4",moveTitle:"\u30BF\u30A4\u30E0\u30E9\u30A4\u30F3\u4F4D\u7F6E\u3092\u5909\u66F4",addElementTitle:"\u8981\u7D20\u3092\u8FFD\u52A0",deleteElementTitle:"\u8981\u7D20\u3092\u524A\u9664",linkTitle:"\u8981\u7D20\u3092\u9023\u7D50",renameLinkTitle:"\u30EA\u30F3\u30AF\u540D\u3092\u5909\u66F4",unlinkTitle:"\u30EA\u30F3\u30AF\u3092\u524A\u9664",addContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8FFD\u52A0",renameContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u540D\u3092\u5909\u66F4",deleteContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u524A\u9664",renamed:(t,e)=>`"${t}" \u2192 "${e}"`,noContext:"\u672A\u6240\u5C5E",moveToFront:"\u2192 \u5148\u982D\u3078",moveAfter:t=>`\u2192 "${t}" \u306E\u76F4\u5F8C\u3078`,elementLabel:t=>`\u8981\u7D20 \xB7 ${t}`,contextLabel:t=>`\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8 \xB7 ${t}`,linkLabel:(t,e)=>`\u30EA\u30F3\u30AF \xB7 ${t}\u2192${e}`,linkGroup:"\u30EA\u30F3\u30AF",pageLabel:t=>`\u30DA\u30FC\u30B8 \xB7 ${t}`,elementGroup:"\u8981\u7D20",contextGroup:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8",noteTypeLabel:t=>Re[t],addTypeLabel:t=>`+ ${Re[t]}`,addHotspot:"+ \u30DB\u30C3\u30C8\u30B9\u30DD\u30C3\u30C8",pinHotspotTitle:"\u3053\u306E\u4ED8\u7B8B\u306B\u30DB\u30C3\u30C8\u30B9\u30DD\u30C3\u30C8\u3092\u7ACB\u3066\u308B",deleteNote:"\u524A\u9664",noteNameLabel:"\u4ED8\u7B8B\u540D",newContextTitle:"\u65B0\u3057\u3044\u5883\u754C\u3065\u3051\u3089\u308C\u305F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8",contextNamePlaceholder:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u540D",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",create:"\u4F5C\u6210",save:"\u4FDD\u5B58",appendMenuNext:"\u7D9A\u304D\u306B\u8FFD\u52A0\u3059\u308B\u4ED8\u7B8B",appendMenuAfter:t=>`\u300C${t}\u300D\u306E\u7D9A\u304D\u306B\u8FFD\u52A0`,emptyTitle:"\u4ED8\u7B8B\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",emptyBody:"\u30A4\u30D9\u30F3\u30C8\u30B9\u30C8\u30FC\u30DF\u30F3\u30B0\u3092\u958B\u59CB\u3057\u307E\u3057\u3087\u3046\u3002\u30C9\u30E1\u30A4\u30F3\u30A4\u30D9\u30F3\u30C8\u3092\u6642\u7CFB\u5217\u306B\u8CBC\u308B\u3068\u3053\u308D\u304B\u3089\u59CB\u3081\u307E\u3059\u3002",addFirstEvent:"+ \u6700\u521D\u306E\u30A4\u30D9\u30F3\u30C8",portAriaLabel:"\u7D9A\u304D\u3092\u8FFD\u52A0\uFF08\u7A2E\u985E\u3092\u9078\u3093\u3067\u8FFD\u52A0 / \u30C9\u30E9\u30C3\u30B0\u3067\u4ED6\u306E\u30B9\u30E9\u30A4\u30B9\u3078\u63A5\u7D9A\uFF09",portTitle:"\u30AF\u30EA\u30C3\u30AF: \u7D9A\u304D\u306E\u4ED8\u7B8B\u3092\u9078\u3093\u3067\u8FFD\u52A0 / \u30C9\u30E9\u30C3\u30B0: \u4ED6\u306E\u30B9\u30E9\u30A4\u30B9\u3078\u63A5\u7D9A",renameContextHint:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u540D\u524D\u3092\u5909\u66F4",dissolveContextAria:t=>`\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u300C${t}\u300D\u3092\u89E3\u4F53`,dissolveContextTitle:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u89E3\u4F53\uFF08\u4ED8\u7B8B\u306F\u6B8B\u308A\u307E\u3059\uFF09",noteCount:t=>`${t} \u4ED8\u7B8B`,sliceCount:t=>`${t} \u30B9\u30E9\u30A4\u30B9`,contextCount:t=>`${t} \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8`,hudHint:"\u30DB\u30A4\u30FC\u30EB: \u79FB\u52D5 \xB7 \u30D4\u30F3\u30C1: \u30BA\u30FC\u30E0 \xB7 \u80CC\u666F\u30C9\u30E9\u30C3\u30B0: \u7BC4\u56F2\u9078\u629E",zoomOut:"\u7E2E\u5C0F",zoomReset:"100% \u306B\u623B\u3059",zoomIn:"\u62E1\u5927",zoomFit:"\u5168\u4F53\u3092\u8868\u793A",selectedLinks:t=>`${t} \u672C\u306E\u30EA\u30F3\u30AF\u3092\u9078\u629E\u4E2D`,deleteLinks:"\u30EA\u30F3\u30AF\u3092\u524A\u9664",deleteHint:"Delete \u3067\u3082\u524A\u9664\u3067\u304D\u307E\u3059",clearSelection:"\u9078\u629E\u89E3\u9664",selectedSlices:t=>`${t} \u30B9\u30E9\u30A4\u30B9\u3092\u9078\u629E\u4E2D`,groupIntoContext:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u307E\u3068\u3081\u308B",addToExistingAria:"\u65E2\u5B58\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3078\u8FFD\u52A0",addToExistingOption:"\u65E2\u5B58\u3078\u8FFD\u52A0\u2026",removeFromContext:"\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u89E3\u9664",deleteButton:"\u524A\u9664"}}),Gt={SET_ELEMENT_NAME:(t,e,n)=>({title:t.renameElementTitle,tone:"update",body:t.renamed(D(n,e.target.id)?.name??"?",$(w.SET_ELEMENT_NAME,e).name)}),SET_ELEMENT_DESCRIPTION:(t,e)=>({title:t.updateDescriptionTitle,tone:"update",body:`\u2192 "${$(w.SET_ELEMENT_DESCRIPTION,e).description.slice(0,60)}"`}),SET_ELEMENT_TYPE:(t,e)=>({title:t.changeTypeTitle,tone:"update",body:`\u2192 ${$(w.SET_ELEMENT_TYPE,e).type}`}),SET_ELEMENT_CONTEXT:(t,e)=>({title:t.changeContextTitle,tone:"move",body:`\u2192 ${$(w.SET_ELEMENT_CONTEXT,e).contextId??t.noContext}`}),MOVE_ELEMENT:(t,e)=>({title:t.moveTitle,tone:"move",body:$(w.MOVE_ELEMENT,e).after===null?t.moveToFront:t.moveAfter($(w.MOVE_ELEMENT,e).after??"")}),ADD_ELEMENT:(t,e)=>({title:t.addElementTitle,tone:"create",body:`+ "${$(w.ADD_ELEMENT,e).name}"`}),DELETE_ELEMENT:(t,e,n)=>({title:t.deleteElementTitle,tone:"delete",body:`\u2212 "${D(n,e.target.id)?.name??e.target.id}"`}),LINK_ELEMENTS:(t,e)=>({title:t.linkTitle,tone:"create",body:`${$(w.LINK_ELEMENTS,e).from} \u2192 ${$(w.LINK_ELEMENTS,e).to}`}),SET_LINK_LABEL:(t,e)=>({title:t.renameLinkTitle,tone:"update",body:`\u2192 "${$(w.SET_LINK_LABEL,e).label}"`}),UNLINK_ELEMENTS:(t,e)=>({title:t.unlinkTitle,tone:"delete",body:`${$(w.UNLINK_ELEMENTS,e).from} \u2192 ${$(w.UNLINK_ELEMENTS,e).to}`}),ADD_CONTEXT:(t,e)=>({title:t.addContextTitle,tone:"create",body:`+ "${$(w.ADD_CONTEXT,e).name}"`}),SET_CONTEXT_NAME:(t,e)=>({title:t.renameContextTitle,tone:"update",body:`\u2192 "${$(w.SET_CONTEXT_NAME,e).name}"`}),DELETE_CONTEXT:(t,e,n)=>({title:t.deleteContextTitle,tone:"delete",body:`\u2212 "${Y(n,e.target.id)?.name??e.target.id}"`})},Be=(t,e,n,o)=>{const i=Gt[e.type],r=i?i(t,e,o??n):{title:e.type,tone:"meta"};return{title:r.title,targetLabel:Ye(t,n,e.target),tone:r.tone,...r.body===void 0?{}:{summary:r.body}}},Xe=t=>`${t.type} ${F(t.target)} ${JSON.stringify(t.payload)}`,Ye=(t,e,n)=>{switch(n.type){case"element":{const o=D(e,n.id);return o?t.elementLabel(o.name):`${t.elementLabel(n.id)} (missing)`}case"context":{const o=Y(e,n.id);return o?t.contextLabel(o.name):`${t.contextLabel(n.id)} (missing)`}case"link":{const o=re(e,n.id);return o?t.linkLabel(o.from,o.to):`${t.linkGroup} \xB7 ${n.id} (missing)`}case"page":return t.pageLabel(de(e));default:return`${n.type} \xB7 ${n.id}`}},He=(t,e)=>[...e.elements.map(n=>({value:F({type:"element",id:n.id}),label:n.name,group:t.elementGroup})),...e.contexts.map(n=>({value:F({type:"context",id:n.id}),label:n.name,group:t.contextGroup}))],Ut=(t,e,n)=>{const o=e.elements.find(i=>i.id===n.note);return o?{value:F({type:"element",id:o.id}),label:o.name,group:t.elementGroup}:null},de=t=>t.title??"Event Storming",Ke=(t,e)=>{const n={...e},o=D(t,e.note);e.note!==void 0&&!o&&delete n.note;const i=Y(t,e.context);return e.context!==void 0&&!i&&delete n.context,n},Fe=(t,e)=>{switch(e.type){case"element":return D(t,e.id)!==void 0;case"context":return Y(t,e.id)!==void 0;case"link":return re(t,e.id)!==void 0;case"page":return!0;default:return!1}},We=t=>{const e=O(t);return{name:"event-storming",label:"Event Storming",parseBase:Me,emptyBase:Ne,actions:w,apply:_e,canonicalState:Wt,hasTarget:Fe,describe:(n,o,i)=>Be(e,n,o,i),serialize:Xe,resolveNavigation:Ke,navigationFor:(n,o)=>o.type==="element"&&D(n,o.id)!==void 0?{note:o.id}:null,commentTargets:(n,o)=>He(e,n),currentTarget:(n,o)=>Ut(e,n,o),title:de}},Vt={width:300,height:260},qt={event:{bg:"linear-gradient(178deg, #ffbc55, #f8a52e)",ink:"#402703"},command:{bg:"linear-gradient(178deg, #93c9f2, #74b4e8)",ink:"#0e2c4b"},aggregate:{bg:"linear-gradient(178deg, #fff3a6, #fdea7e)",ink:"#4a3a06"},actor:{bg:"linear-gradient(178deg, #ffdf63, #fdd23e)",ink:"#423204"},policy:{bg:"linear-gradient(178deg, #dcc2f7, #c9a6f0)",ink:"#32195c"},readmodel:{bg:"linear-gradient(178deg, #c0e788, #a8dc63)",ink:"#22380a"},external:{bg:"linear-gradient(178deg, #f9bcd3, #f4a0c0)",ink:"#4b1029"},hotspot:{bg:"linear-gradient(178deg, #d63550, #b81c33)",ink:"#ffffff"}},le=t=>{const{bg:e,ink:n}=qt[t];return`--es-note-bg:${e};--es-note-ink:${n}`},jt=ye`
2
2
  :host {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -236,7 +236,7 @@ import{ad as xt,ae as q,af as oe,ag as ie,aB as _,ah as v,aA as X,ai as K,aj as
236
236
  </button>
237
237
  </div>
238
238
  ${this.mode==="commenting"?this.#t(o):T}
239
- `}#t(e){return Ot(e,At(this.#e,this.notes.map(It),this.note?{key:`note:${this.note.id}`}:{}),n=>{n.kind==="input"?(this.#e=n.body,this.requestUpdate()):this.#r(n)})}#s(e){return n=>{n.stopPropagation(),this.#r(e(n))}}#r(e){this.onIntent?.(e)}}const Jt=()=>{customElements.get("dpk-internal-event-storming-note")||customElements.define("dpk-internal-event-storming-note",Zt)},ce=.25,Ge=2,pe=(t,e,n)=>({...t,panX:t.panX+e,panY:t.panY+n}),Ue=(t,e,n,o)=>t>=o&&t+e<=n-o?0:t<o||e>n-2*o?o-t:n-o-(t+e),Qt=(t,e,n,o)=>{const i=Ue(e.left,e.width,n.width,o),s=Ue(e.top,e.height,n.height,o);return i===0&&s===0?t:pe(t,i,s)},he=(t,e,n,o)=>{const i=Ie(t.zoom*o,ce,Ge),s=(e-t.panX)/t.zoom,r=(n-t.panY)/t.zoom;return{panX:e-s*i,panY:n-r*i,zoom:i}},Ve=(t,e,n)=>{const o=Math.max(1,e.width-n*2),i=Math.max(1,e.height-n*2),s=Math.max(ce,Math.min(1,o/Math.max(1,t.width),i/Math.max(1,t.height)));return{panX:(e.width-t.width*s)/2,panY:(e.height-t.height*s)/2,zoom:s}},qe=(t,e,n,o)=>{const i=(s,r,a,d)=>{const l=a*t.zoom;return l<=d?(d-l)/2-r*t.zoom:Math.min(-r*t.zoom,Math.max(d-(r+a)*t.zoom,s))};return{zoom:t.zoom,panX:i(t.panX,-o,e.width+o*2,n.width),panY:i(t.panY,-o,e.height+o*2,n.height)}},en=(t,e,n)=>e>=t.left&&e<=t.left+t.width&&n>=t.top&&n<=t.top+t.height,me=(t,e,n)=>{for(let o=t.length-1;o>=0;o-=1){const i=t[o];if(i!==void 0&&en(i.rect,e,n))return i.id}},je=(t,e)=>e<t.left+t.width/2?"before":"after",Ze=(t,e)=>t.filter(({rect:n})=>n.left<e.left+e.width&&e.left<n.left+n.width&&n.top<e.top+e.height&&e.top<n.top+n.height).map(({id:n})=>n),ue=(t,e,n,o)=>{const i=new Set(e);if(n.some(p=>i.has(p)))return[];const s=t.filter(p=>!i.has(p)),r=n.map(p=>s.indexOf(p)).filter(p=>p>=0);if(r.length===0)return[];const a=o==="before"?Math.min(...r):Math.max(...r)+1,d=[];let l=s[a-1]??null;for(const p of t)i.has(p)&&(d.push({id:p,after:l}),l=p);return d},Je=(t,e,n,o)=>{const i=ue(t,e,n,o);if(i.length===0)return i;const s=[...t];for(const r of i){const a=s.indexOf(r.id),d=a<0?void 0:s[a];d!==void 0&&(s.splice(a,1),s.splice(r.after===null?0:s.indexOf(r.after)+1,0,d))}return Lt(s,t)?[]:i},Qe=(t,e,n,o=4)=>{if(e.pointerId!==t.pointerId)return t;const{point:i}=e,s={pointerId:t.pointerId,start:t.start,current:i,moved:t.moved||Math.hypot(i.x-t.start.x,i.y-t.start.y)>o},r=me(n,i.x,i.y);switch(t.kind){case"connect":return{...s,kind:"connect",fromSliceId:t.fromSliceId,...r!==void 0&&r!==t.fromSliceId?{targetSliceId:r}:{}};case"move-slice":{const a=n.find(d=>d.id===r)?.rect;return{...s,kind:"move-slice",sliceId:t.sliceId,...r!==void 0&&r!==t.sliceId&&a!==void 0?{drop:{sliceId:r,side:je(a,i.x)}}:{}}}case"select":return{...s,kind:"select"}}},fe="data-pin";class tn{#e;#n=new Set;#o;#t=new Map;constructor(e){this.#e=e,e.addController(this)}get heights(){return this.#t}hostConnected(){typeof ResizeObserver>"u"||(this.#o=new ResizeObserver(e=>this.#s(e)))}hostUpdated(){const e=this.#o;if(e===void 0)return;const n=new Set(this.#e.renderRoot.querySelectorAll(`[${fe}]`));for(const i of this.#n)n.has(i)||(e.unobserve(i),this.#n.delete(i));for(const i of n)this.#n.has(i)||(e.observe(i),this.#n.add(i));const o=new Set([...n].map(i=>i.getAttribute(fe)));[...this.#t.keys()].some(i=>!o.has(i))&&(this.#t=new Map([...this.#t].filter(([i])=>o.has(i))))}hostDisconnected(){this.#o?.disconnect(),this.#o=void 0,this.#n.clear()}#s(e){const n=new Map(this.#t);for(const o of e){const i=o.target.getAttribute(fe),s=o.borderBoxSize[0]?.blockSize;i===null||s===void 0||s===0||n.set(i,s)}[...n].every(([o,i])=>this.#t.get(o)===i)||(this.#t=n,this.#e.requestUpdate())}}const C={kind:"idle"},et=(t,e)=>t.kind==="editing"&&t.noteId===e?"editing":t.kind==="commenting"&&t.noteId===e?"commenting":"view",tt=(t,e,n)=>{switch(n.kind){case"toggle-comment":return t.kind==="commenting"&&t.noteId===e?C:{kind:"commenting",noteId:e};case"comment":case"delete":case"dismiss":return C;case"select":case"add-hotspot":return t;case"rename":return t.kind==="editing"&&t.noteId===e?C:t}},nn=6,on=10,nt="\u2026",sn=[[4352,4447],[11904,42191],[44032,55203],[63744,64255],[65072,65103],[65280,65376],[65504,65510],[127744,129791],[131072,262141]],ge=t=>{const e=t.codePointAt(0)??0;return sn.some(([n,o])=>e>=n&&e<=o)?on:nn},rn=(t,e)=>{const n=Array.from(t);if(n.reduce((s,r)=>s+ge(r),0)<=e)return t;let o=ge(nt),i="";for(const s of n){if(o+=ge(s),o>e)break;i+=s}return`${i}${nt}`},ot=92,xe=54,an=18,it=4,st=t=>{const e=[];let n=an;for(const o of t)e.push(n),n+=o+it;return{lifts:e,extent:t.length===0?0:n-it}},rt=240,V=132,at=96,be=10,Q=24,ee=12,P=at+ee*2,te=46,ne=16,dt=44,lt=40,ve=16,ct=13,H=8,dn=6,ln=26,cn=(t,e)=>Math.max(dt,t-ee+(e?ln:0)),pn=st([xe]).extent,hn=["actor","command","aggregate","event","policy","readmodel","external"],pt=t=>Q*2+t*V+(t-1)*be,mn=(t,e)=>{const n=new Map;let o=0;for(const i of t.notes){const s=t.pins.filter(a=>a.targetId===i.id),r=st(s.map(a=>e(a.note.id)));s.forEach((a,d)=>n.set(a.note.id,r.lifts[d]??0)),o=Math.max(o,r.extent)}return{liftOf:n,extent:o}},un=(t,e,n,o)=>{const i=new Map(e.map(f=>[f.id,pt(f.notes.length)])),s=Ae(t,e),r=ze(e,s,{widthOf:f=>i.get(f)??0,gapX:te,padX:ne,maxWidth:Math.max(n,pt(1))}),a=new Map,d=new Map,l=new Map,p=new Map,m=new Map,u=new Map(e.map(f=>[f.id,f.contextId]));for(const f of e){const x=mn(f,E=>o.get(E)??xe);for(const[E,h]of x.liftOf)p.set(E,h);m.set(f.id,x.extent)}let b=H;const c=r.map((f,x)=>{const E=f.cutFrom===void 0?void 0:d.get(f.cutFrom.from),h=E===void 0?0:Math.max(0,E-ne);let S=h+ne;const A=cn(Math.max(pn,...f.sliceIds.map(R=>m.get(R)??0)),f.sliceIds.some(R=>u.get(R)!==void 0));for(const R of f.sliceIds)a.set(R,S-h),d.set(R,S),l.set(R,x),S+=(i.get(R)??0)+te;const ke=A+P+lt,gt={sliceIds:f.sliceIds,x:h,width:S-te+ne-h,height:ke,y:b,head:A,cutFrom:f.cutFrom};return b+=ke+dn,gt}),g=c.at(-1);return{slices:e,bands:c,xOf:a,absXOf:d,bandOf:l,widthOf:i,pinLiftOf:p,arrows:s,width:Math.max(0,...c.map(f=>f.x+f.width))+H*2,height:g===void 0?H*2:g.y+g.height+H}},fn=t=>{const{m:e,context:n,maxRowWidth:o,pinHeights:i,viewport:s,handlers:r}=t,{state:a}=n,d=24*s.zoom,l=`background-size:${d}px ${d}px;background-position:${s.panX}px ${s.panY}px`;if(a.elements.length===0)return k`<div class="board-viewport board-viewport--empty" style=${l}>
239
+ `}#t(e){return Ot(e,At(this.#e,this.notes.map(It),this.note?{key:`note:${this.note.id}`}:{}),n=>{n.kind==="input"?(this.#e=n.body,this.requestUpdate()):n.kind!=="choose"&&this.#r(n)})}#s(e){return n=>{n.stopPropagation(),this.#r(e(n))}}#r(e){this.onIntent?.(e)}}const Jt=()=>{customElements.get("dpk-internal-event-storming-note")||customElements.define("dpk-internal-event-storming-note",Zt)},ce=.25,Ge=2,pe=(t,e,n)=>({...t,panX:t.panX+e,panY:t.panY+n}),Ue=(t,e,n,o)=>t>=o&&t+e<=n-o?0:t<o||e>n-2*o?o-t:n-o-(t+e),Qt=(t,e,n,o)=>{const i=Ue(e.left,e.width,n.width,o),s=Ue(e.top,e.height,n.height,o);return i===0&&s===0?t:pe(t,i,s)},he=(t,e,n,o)=>{const i=Te(t.zoom*o,ce,Ge),s=(e-t.panX)/t.zoom,r=(n-t.panY)/t.zoom;return{panX:e-s*i,panY:n-r*i,zoom:i}},Ve=(t,e,n)=>{const o=Math.max(1,e.width-n*2),i=Math.max(1,e.height-n*2),s=Math.max(ce,Math.min(1,o/Math.max(1,t.width),i/Math.max(1,t.height)));return{panX:(e.width-t.width*s)/2,panY:(e.height-t.height*s)/2,zoom:s}},qe=(t,e,n,o)=>{const i=(s,r,a,d)=>{const l=a*t.zoom;return l<=d?(d-l)/2-r*t.zoom:Math.min(-r*t.zoom,Math.max(d-(r+a)*t.zoom,s))};return{zoom:t.zoom,panX:i(t.panX,-o,e.width+o*2,n.width),panY:i(t.panY,-o,e.height+o*2,n.height)}},en=(t,e,n)=>e>=t.left&&e<=t.left+t.width&&n>=t.top&&n<=t.top+t.height,me=(t,e,n)=>{for(let o=t.length-1;o>=0;o-=1){const i=t[o];if(i!==void 0&&en(i.rect,e,n))return i.id}},je=(t,e)=>e<t.left+t.width/2?"before":"after",Ze=(t,e)=>t.filter(({rect:n})=>n.left<e.left+e.width&&e.left<n.left+n.width&&n.top<e.top+e.height&&e.top<n.top+n.height).map(({id:n})=>n),ue=(t,e,n,o)=>{const i=new Set(e);if(n.some(p=>i.has(p)))return[];const s=t.filter(p=>!i.has(p)),r=n.map(p=>s.indexOf(p)).filter(p=>p>=0);if(r.length===0)return[];const a=o==="before"?Math.min(...r):Math.max(...r)+1,d=[];let l=s[a-1]??null;for(const p of t)i.has(p)&&(d.push({id:p,after:l}),l=p);return d},Je=(t,e,n,o)=>{const i=ue(t,e,n,o);if(i.length===0)return i;const s=[...t];for(const r of i){const a=s.indexOf(r.id),d=a<0?void 0:s[a];d!==void 0&&(s.splice(a,1),s.splice(r.after===null?0:s.indexOf(r.after)+1,0,d))}return Lt(s,t)?[]:i},Qe=(t,e,n,o=4)=>{if(e.pointerId!==t.pointerId)return t;const{point:i}=e,s={pointerId:t.pointerId,start:t.start,current:i,moved:t.moved||Math.hypot(i.x-t.start.x,i.y-t.start.y)>o},r=me(n,i.x,i.y);switch(t.kind){case"connect":return{...s,kind:"connect",fromSliceId:t.fromSliceId,...r!==void 0&&r!==t.fromSliceId?{targetSliceId:r}:{}};case"move-slice":{const a=n.find(d=>d.id===r)?.rect;return{...s,kind:"move-slice",sliceId:t.sliceId,...r!==void 0&&r!==t.sliceId&&a!==void 0?{drop:{sliceId:r,side:je(a,i.x)}}:{}}}case"select":return{...s,kind:"select"}}},fe="data-pin";class tn{#e;#n=new Set;#o;#t=new Map;constructor(e){this.#e=e,e.addController(this)}get heights(){return this.#t}hostConnected(){typeof ResizeObserver>"u"||(this.#o=new ResizeObserver(e=>this.#s(e)))}hostUpdated(){const e=this.#o;if(e===void 0)return;const n=new Set(this.#e.renderRoot.querySelectorAll(`[${fe}]`));for(const i of this.#n)n.has(i)||(e.unobserve(i),this.#n.delete(i));for(const i of n)this.#n.has(i)||(e.observe(i),this.#n.add(i));const o=new Set([...n].map(i=>i.getAttribute(fe)));[...this.#t.keys()].some(i=>!o.has(i))&&(this.#t=new Map([...this.#t].filter(([i])=>o.has(i))))}hostDisconnected(){this.#o?.disconnect(),this.#o=void 0,this.#n.clear()}#s(e){const n=new Map(this.#t);for(const o of e){const i=o.target.getAttribute(fe),s=o.borderBoxSize[0]?.blockSize;i===null||s===void 0||s===0||n.set(i,s)}[...n].every(([o,i])=>this.#t.get(o)===i)||(this.#t=n,this.#e.requestUpdate())}}const C={kind:"idle"},et=(t,e)=>t.kind==="editing"&&t.noteId===e?"editing":t.kind==="commenting"&&t.noteId===e?"commenting":"view",tt=(t,e,n)=>{switch(n.kind){case"toggle-comment":return t.kind==="commenting"&&t.noteId===e?C:{kind:"commenting",noteId:e};case"comment":case"delete":case"dismiss":return C;case"select":case"add-hotspot":return t;case"rename":return t.kind==="editing"&&t.noteId===e?C:t}},nn=6,on=10,nt="\u2026",sn=[[4352,4447],[11904,42191],[44032,55203],[63744,64255],[65072,65103],[65280,65376],[65504,65510],[127744,129791],[131072,262141]],ge=t=>{const e=t.codePointAt(0)??0;return sn.some(([n,o])=>e>=n&&e<=o)?on:nn},rn=(t,e)=>{const n=Array.from(t);if(n.reduce((s,r)=>s+ge(r),0)<=e)return t;let o=ge(nt),i="";for(const s of n){if(o+=ge(s),o>e)break;i+=s}return`${i}${nt}`},ot=92,xe=54,an=18,it=4,st=t=>{const e=[];let n=an;for(const o of t)e.push(n),n+=o+it;return{lifts:e,extent:t.length===0?0:n-it}},rt=240,V=132,at=96,be=10,Q=24,ee=12,P=at+ee*2,te=46,ne=16,dt=44,lt=40,ve=16,ct=13,H=8,dn=6,ln=26,cn=(t,e)=>Math.max(dt,t-ee+(e?ln:0)),pn=st([xe]).extent,hn=["actor","command","aggregate","event","policy","readmodel","external"],pt=t=>Q*2+t*V+(t-1)*be,mn=(t,e)=>{const n=new Map;let o=0;for(const i of t.notes){const s=t.pins.filter(a=>a.targetId===i.id),r=st(s.map(a=>e(a.note.id)));s.forEach((a,d)=>n.set(a.note.id,r.lifts[d]??0)),o=Math.max(o,r.extent)}return{liftOf:n,extent:o}},un=(t,e,n,o)=>{const i=new Map(e.map(f=>[f.id,pt(f.notes.length)])),s=Ae(t,e),r=ze(e,s,{widthOf:f=>i.get(f)??0,gapX:te,padX:ne,maxWidth:Math.max(n,pt(1))}),a=new Map,d=new Map,l=new Map,p=new Map,m=new Map,u=new Map(e.map(f=>[f.id,f.contextId]));for(const f of e){const x=mn(f,E=>o.get(E)??xe);for(const[E,h]of x.liftOf)p.set(E,h);m.set(f.id,x.extent)}let b=H;const c=r.map((f,x)=>{const E=f.cutFrom===void 0?void 0:d.get(f.cutFrom.from),h=E===void 0?0:Math.max(0,E-ne);let S=h+ne;const A=cn(Math.max(pn,...f.sliceIds.map(R=>m.get(R)??0)),f.sliceIds.some(R=>u.get(R)!==void 0));for(const R of f.sliceIds)a.set(R,S-h),d.set(R,S),l.set(R,x),S+=(i.get(R)??0)+te;const ke=A+P+lt,gt={sliceIds:f.sliceIds,x:h,width:S-te+ne-h,height:ke,y:b,head:A,cutFrom:f.cutFrom};return b+=ke+dn,gt}),g=c.at(-1);return{slices:e,bands:c,xOf:a,absXOf:d,bandOf:l,widthOf:i,pinLiftOf:p,arrows:s,width:Math.max(0,...c.map(f=>f.x+f.width))+H*2,height:g===void 0?H*2:g.y+g.height+H}},fn=t=>{const{m:e,context:n,maxRowWidth:o,pinHeights:i,viewport:s,handlers:r}=t,{state:a}=n,d=24*s.zoom,l=`background-size:${d}px ${d}px;background-position:${s.panX}px ${s.panY}px`;if(a.elements.length===0)return k`<div class="board-viewport board-viewport--empty" style=${l}>
240
240
  <div class="empty">
241
241
  <h2>${e.emptyTitle}</h2>
242
242
  <p>${e.emptyBody}</p>
@@ -290,8 +290,8 @@ import{ad as xt,ae as q,af as oe,ag as ie,aB as _,ah as v,aA as X,ai as K,aj as
290
290
  style=${`left:${g}px;top:${f}px;width:${x}px;height:${P}px`}
291
291
  @pointerdown=${E=>l.slicePointerDown(c.id,E)}
292
292
  ></div>`})}
293
- ${Te(m.flatMap(c=>c.notes.map((g,f)=>({slice:c,note:g,slot:f}))),({note:c})=>c.id,({slice:c,note:g,slot:f})=>{const{x,y:E}=u(c),h=x+Q+f*(V+be);return b(g,`${le(g.type)};position:absolute;left:${h}px;top:${E+ee}px;width:${V}px;height:${at}px;--es-tilt:${In(g.id)}deg;z-index:2`)})}
294
- ${Te(m.flatMap(c=>{const g=u(c);return c.notes.flatMap((f,x)=>c.pins.filter(h=>h.targetId===f.id).map((h,S)=>({pin:h,slot:x,index:S,at:g})))}),({pin:c})=>c.note.id,({pin:c,slot:g,index:f,at:x})=>{const E=x.x+Q+g*(V+be),h=x.y+ee;return b(c.note,`${le(c.note.type)};position:absolute;left:${E+V-ot-6-f*10}px;bottom:${n.height-(h-(e.pinLiftOf.get(c.note.id)??0))}px;width:${ot}px;min-height:${xe}px;--es-tilt:-2.4deg;z-index:3`,!0)})}
293
+ ${Se(m.flatMap(c=>c.notes.map((g,f)=>({slice:c,note:g,slot:f}))),({note:c})=>c.id,({slice:c,note:g,slot:f})=>{const{x,y:E}=u(c),h=x+Q+f*(V+be);return b(g,`${le(g.type)};position:absolute;left:${h}px;top:${E+ee}px;width:${V}px;height:${at}px;--es-tilt:${In(g.id)}deg;z-index:2`)})}
294
+ ${Se(m.flatMap(c=>{const g=u(c);return c.notes.flatMap((f,x)=>c.pins.filter(h=>h.targetId===f.id).map((h,S)=>({pin:h,slot:x,index:S,at:g})))}),({pin:c})=>c.note.id,({pin:c,slot:g,index:f,at:x})=>{const E=x.x+Q+g*(V+be),h=x.y+ee;return b(c.note,`${le(c.note.type)};position:absolute;left:${E+V-ot-6-f*10}px;bottom:${n.height-(h-(e.pinLiftOf.get(c.note.id)??0))}px;width:${ot}px;min-height:${xe}px;--es-tilt:-2.4deg;z-index:3`,!0)})}
295
295
  ${m.map(c=>{const{x:g,y:f,w:x}=u(c),E=d===c.id||a?.kind==="connect"&&a.fromSliceId===c.id;return k`<button
296
296
  class="slice-port${E?" slice-port--on":""}"
297
297
  type="button"
@@ -345,7 +345,7 @@ ${o.renameContextHint}`}
345
345
  ✕
346
346
  </button>
347
347
  </div>`]});return r.length>0?k`${r}`:T},vn=t=>{if(t===void 0||!t.moved)return T;if(t.kind==="connect")return k`<svg class="gesture-layer" aria-hidden="true">
348
- ${F`<path class="connect-line" d=${`M ${t.start.x} ${t.start.y} L ${t.current.x} ${t.current.y}`}></path>
348
+ ${W`<path class="connect-line" d=${`M ${t.start.x} ${t.start.y} L ${t.current.x} ${t.current.y}`}></path>
349
349
  <circle class="connect-tip" cx=${t.current.x} cy=${t.current.y} r="5"></circle>`}
350
350
  </svg>`;if(t.kind==="select"){const e=Math.min(t.start.x,t.current.x),n=Math.min(t.start.y,t.current.y),o=Math.abs(t.current.x-t.start.x),i=Math.abs(t.current.y-t.start.y);return k`<div
351
351
  class="select-rect"
@@ -400,13 +400,13 @@ ${o.renameContextHint}`}
400
400
  <button class="dpk-icon-btn" type="button" aria-label=${e.clearSelection} @click=${()=>s.clearSelection()}>
401
401
  ✕
402
402
  </button>
403
- </div>`},ht=(t,e,n,o)=>({d:`M ${t.x} ${t.y} C ${e.x} ${e.y}, ${n.x} ${n.y}, ${o.x} ${o.y}`,mid:{x:(t.x+3*e.x+3*n.x+o.x)/8,y:(t.y+3*e.y+3*n.y+o.y)/8}}),wn=()=>F`<marker id="es-arrow" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
403
+ </div>`},ht=(t,e,n,o)=>({d:`M ${t.x} ${t.y} C ${e.x} ${e.y}, ${n.x} ${n.y}, ${o.x} ${o.y}`,mid:{x:(t.x+3*e.x+3*n.x+o.x)/8,y:(t.y+3*e.y+3*n.y+o.y)/8}}),wn=()=>W`<marker id="es-arrow" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
404
404
  <path d="M0,0 L8,4 L0,8 z"></path>
405
- </marker>`,$n=(t,e)=>{const n="url(#es-arrow)",o=[],i=a=>{const d=e.absXOf.get(a),l=e.bandOf.get(a),p=l===void 0?void 0:e.bands[l];if(!(d===void 0||l===void 0||p===void 0))return{x:H+d,y:p.y+p.head,w:e.widthOf.get(a)??0,band:l}},s=a=>{const d=e.bands[a];return d===void 0?0:d.y+d.height},r=(a,d,l,p,m)=>{const u=t.selectedLinkIds.includes(a.id)?" is-selected":"",b={start:6,end:-6,middle:0}[p];o.push(F`<g data-link-id=${a.id} data-dpk-target=${`link:${a.id}`}>
405
+ </marker>`,$n=(t,e)=>{const n="url(#es-arrow)",o=[],i=a=>{const d=e.absXOf.get(a),l=e.bandOf.get(a),p=l===void 0?void 0:e.bands[l];if(!(d===void 0||l===void 0||p===void 0))return{x:H+d,y:p.y+p.head,w:e.widthOf.get(a)??0,band:l}},s=a=>{const d=e.bands[a];return d===void 0?0:d.y+d.height},r=(a,d,l,p,m)=>{const u=t.selectedLinkIds.includes(a.id)?" is-selected":"",b={start:6,end:-6,middle:0}[p];o.push(W`<g data-link-id=${a.id} data-dpk-target=${`link:${a.id}`}>
406
406
  <path class="link-hit" d=${d} @pointerdown=${c=>c.stopPropagation()} @click=${c=>t.handlers.linkClick(a.id,c.shiftKey||c.metaKey||c.ctrlKey)}></path>
407
407
  <path class=${`link-path${u}`} d=${d} marker-end=${n}></path>
408
- ${a.label===void 0?T:F`<text class="link-label" x=${l.x+b} y=${l.y-6} text-anchor=${p}><title>${a.label}</title>${rn(a.label,Math.min(m,rt))}</text>`}
409
- </g>`)};for(const a of e.arrows){const d=i(a.from),l=i(a.to);if(d===void 0||l===void 0)continue;if(d.band===l.band){const f=l.x>=d.x+d.w,x=f?l.x-(d.x+d.w):d.x-(l.x+l.w);if(x<=te+2){const h=d.y+P/2,S=f?d.x+d.w:d.x,A=f?l.x:l.x+l.w;r(a,`M ${S} ${h} L ${A} ${h}`,{x:(S+A)/2,y:h},"middle",Math.abs(A-S)-4);continue}const E=Tn(d,l,s(d.band)-lt/2);r(a,E.d,E.mid,"middle",x+2*Q);continue}const p=d.y<l.y,m=d.x+ve,u=Ie(m,l.x+ve,l.x+l.w-ve),b={x:m,y:p?d.y+P:d.y},c={x:u,y:p?l.y:l.y+P},g=p?(s(d.band)+(e.bands[l.band]?.y??0))/2:(s(l.band)+(e.bands[d.band]?.y??0))/2;r(a,Sn([b,{x:b.x,y:g},{x:c.x,y:g},c]),{x:c.x-6,y:g},"end",rt)}return F`<svg class="links-layer" width=${e.width} height=${e.height}>
408
+ ${a.label===void 0?T:W`<text class="link-label" x=${l.x+b} y=${l.y-6} text-anchor=${p}><title>${a.label}</title>${rn(a.label,Math.min(m,rt))}</text>`}
409
+ </g>`)};for(const a of e.arrows){const d=i(a.from),l=i(a.to);if(d===void 0||l===void 0)continue;if(d.band===l.band){const f=l.x>=d.x+d.w,x=f?l.x-(d.x+d.w):d.x-(l.x+l.w);if(x<=te+2){const h=d.y+P/2,S=f?d.x+d.w:d.x,A=f?l.x:l.x+l.w;r(a,`M ${S} ${h} L ${A} ${h}`,{x:(S+A)/2,y:h},"middle",Math.abs(A-S)-4);continue}const E=Tn(d,l,s(d.band)-lt/2);r(a,E.d,E.mid,"middle",x+2*Q);continue}const p=d.y<l.y,m=d.x+ve,u=Te(m,l.x+ve,l.x+l.w-ve),b={x:m,y:p?d.y+P:d.y},c={x:u,y:p?l.y:l.y+P},g=p?(s(d.band)+(e.bands[l.band]?.y??0))/2:(s(l.band)+(e.bands[d.band]?.y??0))/2;r(a,Sn([b,{x:b.x,y:g},{x:c.x,y:g},c]),{x:c.x-6,y:g},"end",rt)}return W`<svg class="links-layer" width=${e.width} height=${e.height}>
410
410
  <defs>${wn()}</defs>
411
411
  ${o}
412
412
  </svg>`},Tn=(t,e,n)=>{const o=t.y+P;if(e.x>=t.x+t.w){const r={x:t.x+t.w-18,y:o},a={x:e.x+18,y:o};return ht(r,{x:r.x+48,y:n},{x:a.x-48,y:n},a)}const i={x:t.x+18,y:o},s={x:e.x+e.w-18,y:o};return ht(i,{x:i.x-48,y:n},{x:s.x+48,y:n},s)},Sn=(t,e=10)=>{let n=`M ${t[0]?.x??0} ${t[0]?.y??0}`;for(let i=1;i<t.length-1;i+=1){const s=t[i-1],r=t[i],a=t[i+1];if(s===void 0||r===void 0||a===void 0)continue;const d=Math.sign(r.x-s.x),l=Math.sign(r.y-s.y),p=Math.sign(a.x-r.x),m=Math.sign(a.y-r.y),u=Math.hypot(r.x-s.x,r.y-s.y),b=Math.hypot(a.x-r.x,a.y-r.y),c=Math.max(0,Math.min(e,u/2,b/2));n+=` L ${r.x-d*c} ${r.y-l*c} Q ${r.x} ${r.y} ${r.x+p*c} ${r.y+m*c}`}const o=t.at(-1);return o===void 0?n:`${n} L ${o.x} ${o.y}`},In=t=>{let e=0;for(const n of t)e=(e*31+n.charCodeAt(0))%997;return(e%17-8)*.09},Ln=ye`
@@ -1010,11 +1010,11 @@ ${o.renameContextHint}`}
1010
1010
  flex: 1 1 auto;
1011
1011
  min-width: 0;
1012
1012
  }
1013
- `,Mn={width:260,height:150},Nn={width:236,height:210},_n=64,Cn=48,On=["event","command","aggregate","actor","policy","readmodel","external"],An=1200,mt=5,zn={x:20,top:46,bottom:40};class ut extends Se{static{this.styles=[Se.styles,Ln,we]}definitionFor(e){return Fe(e)}static{this.properties={mode:{state:!0},boardWidth:{state:!0},viewport:{state:!0},gesture:{state:!0},hoverSliceId:{state:!0},selectedSliceIds:{state:!0},selectedLinkIds:{state:!0},naming:{state:!0}}}#e;#n=new $e(this);#o=new tn(this);constructor(){super(),this.mode=C,this.boardWidth=An,this.viewport={panX:24,panY:16,zoom:1},this.gesture=void 0,this.hoverSliceId=void 0,this.selectedSliceIds=[],this.selectedLinkIds=[],this.naming=void 0}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect(),this.#e=void 0}firstUpdated(){typeof ResizeObserver>"u"||(this.#e=new ResizeObserver(e=>{const n=e[0]?.contentRect.width;n!==void 0&&n>0&&(this.boardWidth=n)}),this.#e.observe(this))}updated(){super.updated(),this.#c(this.viewport),this.mode.kind==="append"&&this.#t("#append-menu",this.mode.point,Nn),this.naming!==void 0&&this.#t("#context-pop",this.naming.point,Mn,"#context-name")}#t(e,n,o,i){const s=this.renderRoot.querySelector(e);if(!s||s.matches(":popover-open")||(this.#n.open(s,Nt(n.x,n.y),o),i===void 0))return;const r=this.renderRoot.querySelector(i);r?.focus(),r instanceof HTMLInputElement&&r.select()}#s(){return Math.max(Dn,this.boardWidth-96)}renderRegions(e){return{main:this.#r(e)}}#r(e){const n=O(this.locale);return k`
1013
+ `,Mn={width:260,height:150},Nn={width:236,height:210},_n=64,Cn=48,On=["event","command","aggregate","actor","policy","readmodel","external"],An=1200,mt=5,zn={x:20,top:46,bottom:40};class ut extends Ie{static{this.styles=[Ie.styles,Ln,we]}definitionFor(e){return We(e)}static{this.properties={mode:{state:!0},boardWidth:{state:!0},viewport:{state:!0},gesture:{state:!0},hoverSliceId:{state:!0},selectedSliceIds:{state:!0},selectedLinkIds:{state:!0},naming:{state:!0}}}#e;#n=new $e(this);#o=new tn(this);constructor(){super(),this.mode=C,this.boardWidth=An,this.viewport={panX:24,panY:16,zoom:1},this.gesture=void 0,this.hoverSliceId=void 0,this.selectedSliceIds=[],this.selectedLinkIds=[],this.naming=void 0}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect(),this.#e=void 0}firstUpdated(){typeof ResizeObserver>"u"||(this.#e=new ResizeObserver(e=>{const n=e[0]?.contentRect.width;n!==void 0&&n>0&&(this.boardWidth=n)}),this.#e.observe(this))}updated(){super.updated(),this.#c(this.viewport),this.mode.kind==="append"&&this.#t("#append-menu",this.mode.point,Nn),this.naming!==void 0&&this.#t("#context-pop",this.naming.point,Mn,"#context-name")}#t(e,n,o,i){const s=this.renderRoot.querySelector(e);if(!s||s.matches(":popover-open")||(this.#n.open(s,Nt(n.x,n.y),o),i===void 0))return;const r=this.renderRoot.querySelector(i);r?.focus(),r instanceof HTMLInputElement&&r.select()}#s(){return Math.max(Dn,this.boardWidth-96)}renderRegions(e){return{main:this.#r(e)}}#r(e){const n=O(this.locale);return k`
1014
1014
  ${fn({m:n,context:e,mode:this.mode,maxRowWidth:this.#s(),pinHeights:this.#o.heights,viewport:this.viewport,gesture:this.gesture,hoverSliceId:this.hoverSliceId,selectedSliceIds:this.selectedSliceIds,selectedLinkIds:this.selectedLinkIds,handlers:{noteIntent:(o,i)=>this.#S(o,i),addFirst:()=>this.#R(e),attachNote:(o,i)=>this.#C(e,o,i),viewportPointerDown:o=>this.#k(o),viewportPointerMove:o=>this.#E(o),viewportPointerUp:o=>this.#y(e,o),viewportPointerCancel:()=>this.gesture=void 0,viewportPointerLeave:()=>{this.gesture===void 0&&(this.hoverSliceId=void 0)},viewportWheel:o=>this.#w(o),portPointerDown:(o,i)=>this.#b(o,i),slicePointerDown:(o,i)=>this.#v(o,i),zoomStep:o=>this.#$(o),zoomFit:()=>this.#T(),zoomReset:()=>this.#m(1/this.viewport.zoom),groupSelection:o=>{this.selectedSliceIds.length>0&&(this.naming={kind:"create-context",sliceIds:this.selectedSliceIds,point:o})},assignSelection:o=>this.#g(e,o),stripSelectionContext:()=>this.#g(e,null),clearSelection:()=>{this.selectedSliceIds=[],this.selectedLinkIds=[]},linkClick:(o,i)=>this.#A(o,i),deleteSelection:()=>this.#f(e),keyDown:o=>this.#z(e,o),renameContext:(o,i)=>this.naming={kind:"rename-context",contextId:o,point:i},dissolveContext:o=>e.dispatch(y.deleteContext(o))}})}
1015
1015
  ${this.mode.kind==="append"?this.#P(e,this.mode.sliceId):T}
1016
1016
  ${this.naming!==void 0?this.#D(e,this.naming):T}
1017
- `}#i(){return this.renderRoot.querySelector(".board-viewport")}#a(e){const n=this.#i()?.getBoundingClientRect();return n===void 0?{x:e.clientX,y:e.clientY}:{x:e.clientX-n.left,y:e.clientY-n.top}}#l(e){const n=this.#i();if(n===null)return[];const o=n.getBoundingClientRect();return[...this.renderRoot.querySelectorAll("[data-slice-id]")].map(i=>{const s=i.getBoundingClientRect();return{id:i.dataset.sliceId??"",rect:{left:s.left-o.left-(e?.x??0),top:s.top-o.top-(e?.top??0),width:s.width+(e?.x??0)*2,height:s.height+(e?.top??0)+(e?.bottom??0)}}})}#h(e,n){const o=this.#i();o!==null&&(o.setPointerCapture(e.pointerId),this.gesture=n)}#b(e,n){if(n.button!==0)return;n.stopPropagation(),n.preventDefault();const o=this.#a(n);this.#h(n,{kind:"connect",pointerId:n.pointerId,fromSliceId:e,start:o,current:o,moved:!1})}#v(e,n){if(n.button!==0)return;n.stopPropagation(),n.preventDefault();const o=this.#a(n);this.#h(n,{kind:"move-slice",pointerId:n.pointerId,sliceId:e,start:o,current:o,moved:!1})}#k(e){if(e.button!==0||this.gesture!==void 0)return;for(const o of e.composedPath()){if(o===e.currentTarget)break;if(o instanceof Element&&(o.tagName.toLowerCase()==="dpk-internal-event-storming-note"||o.matches("button, select, textarea, input, a")))return}const n=this.#a(e);(this.mode.kind==="editing"||this.mode.kind==="append")&&(this.mode=C),this.selectedLinkIds=[],this.#h(e,{kind:"select",pointerId:e.pointerId,start:n,current:n,moved:!1})}#E(e){const n=this.gesture,o=this.#a(e);if(n===void 0){const i=me(this.#l(zn),o.x,o.y);i!==this.hoverSliceId&&(this.hoverSliceId=i);return}this.gesture=Qe(n,{pointerId:e.pointerId,point:o},this.#l(),mt)}#y(e,n){const o=this.gesture;if(o===void 0||n.pointerId!==o.pointerId)return;const i=Qe(o,{pointerId:n.pointerId,point:this.#a(n)},this.#l(),mt);if(this.gesture=void 0,i.kind==="connect"){i.moved?i.targetSliceId!==void 0&&this.#I(e,i.fromSliceId,i.targetSliceId):this.#M(i.fromSliceId);return}if(i.kind==="move-slice"){if(!i.moved){this.selectedSliceIds=this.selectedSliceIds.includes(i.sliceId)?this.selectedSliceIds.filter(r=>r!==i.sliceId):[...this.selectedSliceIds,i.sliceId];return}i.drop!==void 0&&this.#O(e,i.sliceId,i.drop.sliceId,i.drop.side);return}if(!i.moved){this.selectedSliceIds=[];return}const s={left:Math.min(i.start.x,i.current.x),top:Math.min(i.start.y,i.current.y),width:Math.abs(i.current.x-i.start.x),height:Math.abs(i.current.y-i.start.y)};this.selectedSliceIds=[...Ze(this.#l(),s)]}#w(e){e.preventDefault();const n=this.#a(e);this.#c(e.ctrlKey||e.metaKey?he(this.viewport,n.x,n.y,Math.exp(-e.deltaY*.01)):pe(this.viewport,-e.deltaX,-e.deltaY))}#m(e){const n=this.#i()?.getBoundingClientRect();this.#c(he(this.viewport,(n?.width??0)/2,(n?.height??0)/2,e))}#$(e){this.#m(e===1?1.2:1/1.2)}showTarget(e){this.updateComplete.then(()=>{const n=this.#i(),o=_t(this,W(e));if(n===null||o===null)return;const i=n.getBoundingClientRect(),s=o.getBoundingClientRect();if(i.width===0||i.height===0)return;const r={left:s.left-i.left,top:s.top-i.top,width:s.width,height:s.height};this.#c(Qt(this.viewport,r,i,Cn))})}#T(){const e=this.#i()?.getBoundingClientRect(),n=this.#u();e===void 0||n===void 0||this.#c(Ve(n,{width:e.width,height:e.height},48))}#u(){const e=this.renderRoot.querySelector(".wall");return e===null?void 0:{width:e.offsetWidth,height:e.offsetHeight}}#c(e){const n=this.#i()?.getBoundingClientRect(),o=this.#u(),i=n===void 0||o===void 0||o.width===0||n.width===0?e:qe(e,o,{width:n.width,height:n.height},_n),s=this.viewport;i.panX===s.panX&&i.panY===s.panY&&i.zoom===s.zoom||(this.viewport=i)}#S(e,n){const o=this.context();switch(n.kind){case"select":o.navigate({note:e});break;case"rename":o.dispatch(y.setElementName(e,n.name));break;case"comment":o.dispatch({type:"comment",target:`element:${e}`,payload:{body:n.body}});break;case"delete":o.dispatch(y.deleteElement(e)),o.navigation.note===e&&o.navigate({note:null});break;case"add-hotspot":this.#_(o,e);break}this.mode=tt(this.mode,e,n)}#p(e,n){return B(e).find(o=>o.id===n)}#d(e){return e===void 0?[]:[...e.notes,...e.pins.map(n=>n.note)].map(n=>n.id)}#I(e,n,o){if(n===o)return;const i=B(e.state),s=i.find(u=>u.id===n),r=i.find(u=>u.id===o),a=s&&r?De(s,r):void 0;if(s===void 0||r===void 0||a===void 0||e.state.links.some(u=>u.from===a.from&&u.to===a.to))return;const d=e.state.links.map(u=>u.id),l=e.state.elements.map(u=>u.id),p=U(s)?.id,m=p!==void 0&&i.indexOf(r)>i.indexOf(s)?Je(l,this.#d(r),[p],"after"):[];e.dispatchBatch([y.linkElements(z(`link-${a.from}`,d),a.from,a.to,{kind:"flow"}),...m.map(u=>y.moveElement(u.id,u.after))])}#L(e){const n=this.#i(),o=this.#l().find(s=>s.id===e)?.rect;if(n===null||o===void 0)return;const i=n.getBoundingClientRect();return{x:i.left+o.left+o.width,y:i.top+o.top+o.height/2}}#M(e){const n=this.#L(e);n!==void 0&&(this.mode={kind:"append",sliceId:e,point:n})}#N(e,n,o){const i=this.#p(e.state,n),s=i?U(i):void 0;if(s===void 0){this.mode=C;return}const r=z(`new-${o}`,G(e.state)),a=e.state.links.map(l=>l.id);if(!e.dispatchBatch([y.addElement(r,o,O(this.locale).noteTypeLabel(o)),y.linkElements(z(`link-${s.id}`,a),s.id,r,{kind:"flow"})]).ok){this.mode=C;return}e.navigate({note:r}),this.mode={kind:"editing",noteId:r}}#_(e,n){const o=z("new-hotspot",G(e.state)),i=e.state.links.map(r=>r.id);e.dispatchBatch([y.addElement(o,"hotspot",O(this.locale).noteTypeLabel("hotspot")),y.linkElements(z(`link-${o}`,i),o,n,{kind:"member"})]).ok&&(e.navigate({note:o}),this.mode={kind:"editing",noteId:o})}#C(e,n,o){const i=this.#p(e.state,n),s=i===void 0?void 0:Oe(i,o);if(s===void 0)return;const r=z(`new-${o}`,G(e.state)),[a,d]=s.incoming?[r,s.anchorId]:[s.anchorId,r],l=e.state.links.map(m=>m.id);e.dispatchBatch([y.addElement(r,o,O(this.locale).noteTypeLabel(o)),y.linkElements(z(`link-${a}`,l),a,d,{kind:"member"})]).ok&&(e.navigate({note:r}),this.mode={kind:"editing",noteId:r})}#O(e,n,o,i){const s=e.state,r=ue(s.elements.map(a=>a.id),this.#d(this.#p(s,n)),this.#d(this.#p(s,o)),i);e.dispatchBatch(r.map(a=>y.moveElement(a.id,a.after)))}#A(e,n){this.mode.kind==="editing"&&(this.mode=C),this.selectedSliceIds=[],this.selectedLinkIds=n?this.selectedLinkIds.includes(e)?this.selectedLinkIds.filter(o=>o!==e):[...this.selectedLinkIds,e]:[e],this.#i()?.focus()}#f(e){if(this.selectedLinkIds.length>0){const i=e.state.links.filter(s=>this.selectedLinkIds.includes(s.id));e.dispatchBatch(i.map(s=>y.unlinkElements(s.from,s.to))),this.selectedLinkIds=[];return}if(this.selectedSliceIds.length===0)return;const n=B(e.state),o=this.selectedSliceIds.flatMap(i=>this.#d(n.find(s=>s.id===i)));e.dispatchBatch(o.map(i=>y.deleteElement(i))),this.selectedSliceIds=[]}#z(e,n){if(n.target!==n.currentTarget)return;if(n.key==="Escape"){this.selectedSliceIds=[],this.selectedLinkIds=[];return}if(n.key!=="Delete"&&n.key!=="Backspace"||this.mode.kind!=="idle"||this.naming!==void 0)return;if(n.preventDefault(),this.selectedLinkIds.length>0||this.selectedSliceIds.length>0){this.#f(e);return}const o=e.navigation.note;o===void 0||D(e.state,o)===void 0||(e.dispatch(y.deleteElement(o)),e.navigate({note:null}))}#g(e,n){const o=B(e.state),i=this.selectedSliceIds.flatMap(r=>this.#d(o.find(a=>a.id===r)));e.dispatchBatch(i.map(r=>y.setElementContext(r,n))).ok&&(this.selectedSliceIds=[])}#x(e,n){const i=this.renderRoot.querySelector("#context-name")?.value.trim()??"";if(i==="")return;if(n.kind==="rename-context"){e.dispatch(y.setContextName(n.contextId,i)).ok&&(this.naming=void 0);return}const s=z("context",e.state.contexts.map(l=>l.id)),r=B(e.state),a=n.sliceIds.flatMap(l=>this.#d(r.find(p=>p.id===l)));e.dispatchBatch([y.addContext(s,i),...a.map(l=>y.setElementContext(l,s))]).ok&&(this.selectedSliceIds=[],this.naming=void 0)}#D(e,n){const o=O(this.locale),i=n.kind==="rename-context"?Y(e.state,n.contextId)?.name??"":"";return k`<div id="context-pop" class="comment-pop context-pop" popover="manual">
1017
+ `}#i(){return this.renderRoot.querySelector(".board-viewport")}#a(e){const n=this.#i()?.getBoundingClientRect();return n===void 0?{x:e.clientX,y:e.clientY}:{x:e.clientX-n.left,y:e.clientY-n.top}}#l(e){const n=this.#i();if(n===null)return[];const o=n.getBoundingClientRect();return[...this.renderRoot.querySelectorAll("[data-slice-id]")].map(i=>{const s=i.getBoundingClientRect();return{id:i.dataset.sliceId??"",rect:{left:s.left-o.left-(e?.x??0),top:s.top-o.top-(e?.top??0),width:s.width+(e?.x??0)*2,height:s.height+(e?.top??0)+(e?.bottom??0)}}})}#h(e,n){const o=this.#i();o!==null&&(o.setPointerCapture(e.pointerId),this.gesture=n)}#b(e,n){if(n.button!==0)return;n.stopPropagation(),n.preventDefault();const o=this.#a(n);this.#h(n,{kind:"connect",pointerId:n.pointerId,fromSliceId:e,start:o,current:o,moved:!1})}#v(e,n){if(n.button!==0)return;n.stopPropagation(),n.preventDefault();const o=this.#a(n);this.#h(n,{kind:"move-slice",pointerId:n.pointerId,sliceId:e,start:o,current:o,moved:!1})}#k(e){if(e.button!==0||this.gesture!==void 0)return;for(const o of e.composedPath()){if(o===e.currentTarget)break;if(o instanceof Element&&(o.tagName.toLowerCase()==="dpk-internal-event-storming-note"||o.matches("button, select, textarea, input, a")))return}const n=this.#a(e);(this.mode.kind==="editing"||this.mode.kind==="append")&&(this.mode=C),this.selectedLinkIds=[],this.#h(e,{kind:"select",pointerId:e.pointerId,start:n,current:n,moved:!1})}#E(e){const n=this.gesture,o=this.#a(e);if(n===void 0){const i=me(this.#l(zn),o.x,o.y);i!==this.hoverSliceId&&(this.hoverSliceId=i);return}this.gesture=Qe(n,{pointerId:e.pointerId,point:o},this.#l(),mt)}#y(e,n){const o=this.gesture;if(o===void 0||n.pointerId!==o.pointerId)return;const i=Qe(o,{pointerId:n.pointerId,point:this.#a(n)},this.#l(),mt);if(this.gesture=void 0,i.kind==="connect"){i.moved?i.targetSliceId!==void 0&&this.#I(e,i.fromSliceId,i.targetSliceId):this.#M(i.fromSliceId);return}if(i.kind==="move-slice"){if(!i.moved){this.selectedSliceIds=this.selectedSliceIds.includes(i.sliceId)?this.selectedSliceIds.filter(r=>r!==i.sliceId):[...this.selectedSliceIds,i.sliceId];return}i.drop!==void 0&&this.#O(e,i.sliceId,i.drop.sliceId,i.drop.side);return}if(!i.moved){this.selectedSliceIds=[];return}const s={left:Math.min(i.start.x,i.current.x),top:Math.min(i.start.y,i.current.y),width:Math.abs(i.current.x-i.start.x),height:Math.abs(i.current.y-i.start.y)};this.selectedSliceIds=[...Ze(this.#l(),s)]}#w(e){e.preventDefault();const n=this.#a(e);this.#c(e.ctrlKey||e.metaKey?he(this.viewport,n.x,n.y,Math.exp(-e.deltaY*.01)):pe(this.viewport,-e.deltaX,-e.deltaY))}#m(e){const n=this.#i()?.getBoundingClientRect();this.#c(he(this.viewport,(n?.width??0)/2,(n?.height??0)/2,e))}#$(e){this.#m(e===1?1.2:1/1.2)}showTarget(e){this.updateComplete.then(()=>{const n=this.#i(),o=_t(this,F(e));if(n===null||o===null)return;const i=n.getBoundingClientRect(),s=o.getBoundingClientRect();if(i.width===0||i.height===0)return;const r={left:s.left-i.left,top:s.top-i.top,width:s.width,height:s.height};this.#c(Qt(this.viewport,r,i,Cn))})}#T(){const e=this.#i()?.getBoundingClientRect(),n=this.#u();e===void 0||n===void 0||this.#c(Ve(n,{width:e.width,height:e.height},48))}#u(){const e=this.renderRoot.querySelector(".wall");return e===null?void 0:{width:e.offsetWidth,height:e.offsetHeight}}#c(e){const n=this.#i()?.getBoundingClientRect(),o=this.#u(),i=n===void 0||o===void 0||o.width===0||n.width===0?e:qe(e,o,{width:n.width,height:n.height},_n),s=this.viewport;i.panX===s.panX&&i.panY===s.panY&&i.zoom===s.zoom||(this.viewport=i)}#S(e,n){const o=this.context();switch(n.kind){case"select":o.navigate({note:e});break;case"rename":o.dispatch(y.setElementName(e,n.name));break;case"comment":o.dispatch({type:"comment",target:`element:${e}`,payload:{body:n.body}});break;case"delete":o.dispatch(y.deleteElement(e)),o.navigation.note===e&&o.navigate({note:null});break;case"add-hotspot":this.#_(o,e);break}this.mode=tt(this.mode,e,n)}#p(e,n){return B(e).find(o=>o.id===n)}#d(e){return e===void 0?[]:[...e.notes,...e.pins.map(n=>n.note)].map(n=>n.id)}#I(e,n,o){if(n===o)return;const i=B(e.state),s=i.find(u=>u.id===n),r=i.find(u=>u.id===o),a=s&&r?De(s,r):void 0;if(s===void 0||r===void 0||a===void 0||e.state.links.some(u=>u.from===a.from&&u.to===a.to))return;const d=e.state.links.map(u=>u.id),l=e.state.elements.map(u=>u.id),p=U(s)?.id,m=p!==void 0&&i.indexOf(r)>i.indexOf(s)?Je(l,this.#d(r),[p],"after"):[];e.dispatchBatch([y.linkElements(z(`link-${a.from}`,d),a.from,a.to,{kind:"flow"}),...m.map(u=>y.moveElement(u.id,u.after))])}#L(e){const n=this.#i(),o=this.#l().find(s=>s.id===e)?.rect;if(n===null||o===void 0)return;const i=n.getBoundingClientRect();return{x:i.left+o.left+o.width,y:i.top+o.top+o.height/2}}#M(e){const n=this.#L(e);n!==void 0&&(this.mode={kind:"append",sliceId:e,point:n})}#N(e,n,o){const i=this.#p(e.state,n),s=i?U(i):void 0;if(s===void 0){this.mode=C;return}const r=z(`new-${o}`,G(e.state)),a=e.state.links.map(l=>l.id);if(!e.dispatchBatch([y.addElement(r,o,O(this.locale).noteTypeLabel(o)),y.linkElements(z(`link-${s.id}`,a),s.id,r,{kind:"flow"})]).ok){this.mode=C;return}e.navigate({note:r}),this.mode={kind:"editing",noteId:r}}#_(e,n){const o=z("new-hotspot",G(e.state)),i=e.state.links.map(r=>r.id);e.dispatchBatch([y.addElement(o,"hotspot",O(this.locale).noteTypeLabel("hotspot")),y.linkElements(z(`link-${o}`,i),o,n,{kind:"member"})]).ok&&(e.navigate({note:o}),this.mode={kind:"editing",noteId:o})}#C(e,n,o){const i=this.#p(e.state,n),s=i===void 0?void 0:Oe(i,o);if(s===void 0)return;const r=z(`new-${o}`,G(e.state)),[a,d]=s.incoming?[r,s.anchorId]:[s.anchorId,r],l=e.state.links.map(m=>m.id);e.dispatchBatch([y.addElement(r,o,O(this.locale).noteTypeLabel(o)),y.linkElements(z(`link-${a}`,l),a,d,{kind:"member"})]).ok&&(e.navigate({note:r}),this.mode={kind:"editing",noteId:r})}#O(e,n,o,i){const s=e.state,r=ue(s.elements.map(a=>a.id),this.#d(this.#p(s,n)),this.#d(this.#p(s,o)),i);e.dispatchBatch(r.map(a=>y.moveElement(a.id,a.after)))}#A(e,n){this.mode.kind==="editing"&&(this.mode=C),this.selectedSliceIds=[],this.selectedLinkIds=n?this.selectedLinkIds.includes(e)?this.selectedLinkIds.filter(o=>o!==e):[...this.selectedLinkIds,e]:[e],this.#i()?.focus()}#f(e){if(this.selectedLinkIds.length>0){const i=e.state.links.filter(s=>this.selectedLinkIds.includes(s.id));e.dispatchBatch(i.map(s=>y.unlinkElements(s.from,s.to))),this.selectedLinkIds=[];return}if(this.selectedSliceIds.length===0)return;const n=B(e.state),o=this.selectedSliceIds.flatMap(i=>this.#d(n.find(s=>s.id===i)));e.dispatchBatch(o.map(i=>y.deleteElement(i))),this.selectedSliceIds=[]}#z(e,n){if(n.target!==n.currentTarget)return;if(n.key==="Escape"){this.selectedSliceIds=[],this.selectedLinkIds=[];return}if(n.key!=="Delete"&&n.key!=="Backspace"||this.mode.kind!=="idle"||this.naming!==void 0)return;if(n.preventDefault(),this.selectedLinkIds.length>0||this.selectedSliceIds.length>0){this.#f(e);return}const o=e.navigation.note;o===void 0||D(e.state,o)===void 0||(e.dispatch(y.deleteElement(o)),e.navigate({note:null}))}#g(e,n){const o=B(e.state),i=this.selectedSliceIds.flatMap(r=>this.#d(o.find(a=>a.id===r)));e.dispatchBatch(i.map(r=>y.setElementContext(r,n))).ok&&(this.selectedSliceIds=[])}#x(e,n){const i=this.renderRoot.querySelector("#context-name")?.value.trim()??"";if(i==="")return;if(n.kind==="rename-context"){e.dispatch(y.setContextName(n.contextId,i)).ok&&(this.naming=void 0);return}const s=z("context",e.state.contexts.map(l=>l.id)),r=B(e.state),a=n.sliceIds.flatMap(l=>this.#d(r.find(p=>p.id===l)));e.dispatchBatch([y.addContext(s,i),...a.map(l=>y.setElementContext(l,s))]).ok&&(this.selectedSliceIds=[],this.naming=void 0)}#D(e,n){const o=O(this.locale),i=n.kind==="rename-context"?Y(e.state,n.contextId)?.name??"":"";return k`<div id="context-pop" class="comment-pop context-pop" popover="manual">
1018
1018
  <span class="dpk-label"> ${n.kind==="create-context"?o.newContextTitle:o.renameContextTitle} </span>
1019
1019
  <input
1020
1020
  id="context-name"
@@ -1025,7 +1025,9 @@ ${o.renameContextHint}`}
1025
1025
  @keydown=${s=>{s.key==="Enter"&&this.#x(e,n),s.key==="Escape"&&(this.naming=void 0)}}
1026
1026
  />
1027
1027
  <div class="pop-actions">
1028
- <button class="dpk-btn" type="button" @click=${()=>this.naming=void 0}>${o.cancel}</button>
1028
+ <button class="dpk-btn" type="button" data-dpk-text-discard @click=${()=>this.naming=void 0}>
1029
+ ${o.cancel}
1030
+ </button>
1029
1031
  <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>this.#x(e,n)}>
1030
1032
  ${n.kind==="create-context"?o.create:o.save}
1031
1033
  </button>
@@ -1046,4 +1048,4 @@ ${o.renameContextHint}`}
1046
1048
  <div class="pop-actions">
1047
1049
  <button class="dpk-btn" type="button" @click=${()=>this.mode=C}>${o.cancel}</button>
1048
1050
  </div>
1049
- </div>`}#R(e){const n=z("new-event",G(e.state));if(!e.dispatch(y.addElement(n,"event",O(this.locale).noteTypeLabel("event"))).ok){this.mode=C;return}e.navigate({note:n}),this.mode={kind:"editing",noteId:n}}}const Dn=264,ft=()=>{Jt(),customElements.get("dpk-template-event-storming")||customElements.define("dpk-template-event-storming",ut)},Pn=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateEventStorming:ut,ES_IDLE:C,NOTE_TYPES:j,ZOOM_MAX:Ge,ZOOM_MIN:ce,allNoteIds:G,applyEventStormingAction:_e,attachAnchor:Oe,buildSlices:B,connectionEndpoints:De,constrainViewport:qe,defineEventStormingElement:ft,describeEventStormingAction:Be,dropSide:je,emptyEventStormingBase:Ne,eventStormingAction:y,eventStormingActions:w,eventStormingBaseSchema:Le,eventStormingCommentTargets:He,eventStormingDefinitionFor:Fe,eventStormingHasTarget:We,eventStormingMessages:O,eventStormingTargetLabel:Ye,eventStormingTitle:de,findContext:Y,findLink:re,findNote:D,fitViewport:Ve,hitRect:me,noteCardModeOf:et,panBy:pe,parseEventStormingBase:Me,planSliceBands:ze,rectsInBand:Ze,reduceNoteIntent:tt,resolveEventStormingNavigation:Ke,sameSlice:J,serializeEventStormingAction:Xe,sliceArrows:Ae,sliceMovePlan:ue,sliceMoveSteps:Je,sliceVoice:U,zoomAt:he},Symbol.toStringTag,{value:"Module"}));export{ft as d,Pn as i};
1051
+ </div>`}#R(e){const n=z("new-event",G(e.state));if(!e.dispatch(y.addElement(n,"event",O(this.locale).noteTypeLabel("event"))).ok){this.mode=C;return}e.navigate({note:n}),this.mode={kind:"editing",noteId:n}}}const Dn=264,ft=()=>{Jt(),customElements.get("dpk-template-event-storming")||customElements.define("dpk-template-event-storming",ut)},Pn=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateEventStorming:ut,ES_IDLE:C,NOTE_TYPES:j,ZOOM_MAX:Ge,ZOOM_MIN:ce,allNoteIds:G,applyEventStormingAction:_e,attachAnchor:Oe,buildSlices:B,connectionEndpoints:De,constrainViewport:qe,defineEventStormingElement:ft,describeEventStormingAction:Be,dropSide:je,emptyEventStormingBase:Ne,eventStormingAction:y,eventStormingActions:w,eventStormingBaseSchema:Le,eventStormingCommentTargets:He,eventStormingDefinitionFor:We,eventStormingHasTarget:Fe,eventStormingMessages:O,eventStormingTargetLabel:Ye,eventStormingTitle:de,findContext:Y,findLink:re,findNote:D,fitViewport:Ve,hitRect:me,noteCardModeOf:et,panBy:pe,parseEventStormingBase:Me,planSliceBands:ze,rectsInBand:Ze,reduceNoteIntent:tt,resolveEventStormingNavigation:Ke,sameSlice:J,serializeEventStormingAction:Xe,sliceArrows:Ae,sliceMovePlan:ue,sliceMoveSteps:Je,sliceVoice:U,zoomAt:he},Symbol.toStringTag,{value:"Module"}));export{ft as d,Pn as i};
@@ -1,4 +1,4 @@
1
- import{ad as se,ai as le,ae as v,af as w,ag as E,aA as D,aB as l,ah as p,aj as A,ak as L,p as b,au as f,v as ce,P as pe,e as R,a0 as ue,V as B,R as $,aC as ge,aD as me,a3 as c,A as ve,a4 as s,a5 as be,aE as he,K as ke,aF as ye,aG as fe,a2 as $e,T as z,l as xe}from"./shared-CjhDJ2vV.js";const h=[1,2,3,4,5,6,7],k=le(h,"a delegation level is an integer from 1 to 7"),y=A(p(),L(1)),we=v({player:y,level:k,reason:l(p())}),K=v({title:l(p()),parties:l(v({delegator:l(y),delegate:l(y)})),players:w(E(v({id:D,name:y})),[]),decisions:w(E(v({id:D,name:y,description:l(p()),cards:w(E(we),[]),agreed:l(k)})),[])}),M=e=>{const a=se(K,e),r=new Set;for(const t of a.players){if(r.has(t.id))throw new Error(`duplicate id "${t.id}" in players`);r.add(t.id)}const o=new Set;for(const t of a.decisions){if(o.has(t.id))throw new Error(`duplicate id "${t.id}" in decisions`);o.add(t.id);const i=new Set;for(const d of t.cards){if(!r.has(d.player))throw new Error(`decision "${t.id}" has a card from unknown player "${d.player}"`);if(i.has(d.player))throw new Error(`player "${d.player}" played more than one card on decision "${t.id}"`);i.add(d.player)}}return a},F=()=>({players:[],decisions:[]}),u=(e,a)=>{if(a!==void 0)return e.decisions.find(r=>r.id===a)},j=(e,a)=>e.players.find(r=>r.id===a),T=e=>[...e.players.map(a=>a.id),...e.decisions.map(a=>a.id)],x="delegation-poker",g={PLAY_CARD:b("PLAY_CARD","decision",v({level:k})),AGREE_LEVEL:b("AGREE_LEVEL","decision",f({level:k})),ADD_DECISION:b("ADD_DECISION","page",f({id:D,name:A(p(),L(1)),description:l(p())}),{dedupeKey:ce}),SET_DECISION_NAME:b("SET_DECISION_NAME","decision",f({name:A(p(),L(1))})),DELETE_DECISION:b("DELETE_DECISION","decision",f({}))},m={playCard:(e,a)=>({type:"PLAY_CARD",target:{type:"decision",id:e},payload:{level:a}}),agreeLevel:(e,a)=>({type:"AGREE_LEVEL",target:{type:"decision",id:e},payload:{level:a}}),addDecision:(e,a)=>({type:"ADD_DECISION",target:{type:"page",id:x},payload:{id:e,name:a}}),setDecisionName:(e,a)=>({type:"SET_DECISION_NAME",target:{type:"decision",id:e},payload:{name:a}}),deleteDecision:e=>({type:"DELETE_DECISION",target:{type:"decision",id:e},payload:{}})},V=(e,a)=>{const r=pe(g,a);if(r===null)return null;const o=r.target.id;switch(r.type){case"PLAY_CARD":return C(e,o,t=>({...t,yours:r.payload.level}));case"AGREE_LEVEL":return C(e,o,t=>({...t,agreed:r.payload.level}));case"ADD_DECISION":{const t=r.payload;return e.decisions.some(i=>i.id===t.id)?e:T(e).includes(t.id)?null:{...e,decisions:[...e.decisions,{id:t.id,name:t.name,...t.description===void 0?{}:{description:t.description},cards:[]}]}}case"SET_DECISION_NAME":return C(e,o,t=>({...t,name:r.payload.name}));case"DELETE_DECISION":return e.decisions.some(t=>t.id===o)?{...e,decisions:e.decisions.filter(t=>t.id!==o)}:null;default:return R(r)}},C=(e,a,r)=>e.decisions.some(o=>o.id===a)?{...e,decisions:e.decisions.map(o=>o.id===a?r(o):o)}:null,G={1:"Tell",2:"Sell",3:"Consult",4:"Agree",5:"Advise",6:"Inquire",7:"Delegate"},Y={1:"\u547D\u4EE4\u3059\u308B",2:"\u8AAC\u5F97\u3059\u308B",3:"\u76F8\u8AC7\u3059\u308B",4:"\u5408\u610F\u3059\u308B",5:"\u52A9\u8A00\u3059\u308B",6:"\u5C0B\u306D\u308B",7:"\u59D4\u4EFB\u3059\u308B"},Ee={1:(e,a)=>`${e} decide and tell ${a}`,2:(e,a)=>`${e} decide and convince ${a}`,3:(e,a)=>`${e} decide after hearing ${a}`,4:(e,a)=>`${e} and ${a} decide together`,5:(e,a)=>`${a} decides after ${e} advise`,6:(e,a)=>`${a} decides, then ${e} ask why`,7:(e,a)=>`${a} decides; ${e} need not know`},De={1:(e,a)=>`${e}\u304C\u6C7A\u3081\u3066\u3001${a}\u306B\u4F1D\u3048\u308B`,2:(e,a)=>`${e}\u304C\u6C7A\u3081\u3066\u3001${a}\u306B\u7D0D\u5F97\u3057\u3066\u3082\u3089\u3046`,3:(e,a)=>`${e}\u304C${a}\u306E\u610F\u898B\u3092\u805E\u3044\u3066\u304B\u3089\u6C7A\u3081\u308B`,4:(e,a)=>`${e}\u3068${a}\u304C\u4E00\u7DD2\u306B\u6C7A\u3081\u308B`,5:(e,a)=>`${e}\u304C\u52A9\u8A00\u3057\u3001${a}\u304C\u6C7A\u3081\u308B`,6:(e,a)=>`${a}\u304C\u6C7A\u3081\u3001\u3042\u3068\u3067${e}\u304C\u7406\u7531\u3092\u5C0B\u306D\u308B`,7:(e,a)=>`${a}\u304C\u6C7A\u3081\u308B\u3002${e}\u306F\u77E5\u3089\u306A\u304F\u3066\u3088\u3044`},Ae={"to-play":"Your card",discuss:"Discuss",consensus:"Same card",agreed:"Agreed"},Le={"to-play":"\u30AB\u30FC\u30C9\u5F85\u3061",discuss:"\u8981\u8B70\u8AD6",consensus:"\u4E00\u81F4",agreed:"\u5408\u610F\u6E08\u307F"},S=ue({en:{levelName:e=>G[e],levelPhrase:(e,a,r)=>Ee[e](a,r),levelLabel:e=>`${e} ${G[e]}`,statusLabel:e=>Ae[e],defaultDelegator:"Leaders",defaultDelegate:"Team",you:"You",progress:(e,a,r)=>`Played ${e}/${r} \xB7 Agreed ${a}/${r}`,partiesLabel:"Who delegates to whom",board:"Delegation board",boardHint:e=>e==="strict"?"Click a cell to play your card for that decision area. The other cards on a row stay face down until you play on it, and your card cannot be changed afterwards.":"Click a cell to play your card for that decision area. The other cards on a row stay face down until you play on it; you can still change your card afterwards.",modeLabel:e=>e==="strict"?"One card only":"Card can be changed",modeTitle:e=>e==="strict"?"Strict mode: a card, once played, is final":"Lax mode: you may change your card after seeing the others",locked:"Final",confirmTitle:"Your card is final",confirmBody:(e,a)=>`You are playing ${e} on \u201C${a}\u201D. On this board a card cannot be changed once played, even after you see the others.`,confirmSkip:"Don\u2019t ask again",confirmPlay:"Play this card",confirmCancel:"Cancel",decisionColumn:"Decision area",agreeColumn:"Agreed",notAgreed:"Not yet",agreeLabel:e=>`Agreed level for \u201C${e}\u201D`,playAt:(e,a)=>`Play ${e} on \u201C${a}\u201D`,hiddenCards:e=>`${e} face down`,addDecision:"+ Decision area",newDecision:"New decision area",noDecisionsTitle:"No decision areas yet",noDecisionsBody:"List the key decisions whose ownership is unclear. For each one, everyone plays one of seven cards, from 1 (the delegator decides alone) to 7 (fully delegated), and then settles on one level.",firstDecision:"+ First decision area",commentCount:e=>`${e} comments`,decisionNameLabel:"Decision area name",commentButton:"Comment",deleteButton:"Delete",cardPlayedTitle:"Played a card",levelAgreedTitle:"Agreed on a level",decisionAddedTitle:"Added a decision area",decisionRenamedTitle:"Renamed the decision area",decisionDeletedTitle:"Deleted the decision area",arrowTo:e=>`\u2192 ${e}`,arrowFrom:(e,a)=>`${e} \u2192 ${a}`,quotedArrowTo:e=>`\u2192 \u201C${e}\u201D`,quotedArrowFrom:(e,a)=>`\u201C${e}\u201D \u2192 \u201C${a}\u201D`,added:e=>`+ \u201C${e}\u201D`,deleted:e=>`\u2212 \u201C${e}\u201D`,decisionKind:"Decision area",boardKind:"Board",wholeBoard:"Whole board"},ja:{levelName:e=>Y[e],levelPhrase:(e,a,r)=>De[e](a,r),levelLabel:e=>`${e} ${Y[e]}`,statusLabel:e=>Le[e],defaultDelegator:"\u30EA\u30FC\u30C0\u30FC",defaultDelegate:"\u30C1\u30FC\u30E0",you:"\u3042\u306A\u305F",progress:(e,a,r)=>`\u63D0\u51FA ${e}/${r} \xB7 \u5408\u610F ${a}/${r}`,partiesLabel:"\u8AB0\u304C\u8AB0\u306B\u4EFB\u305B\u308B\u304B",board:"\u30C7\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30DC\u30FC\u30C9",boardHint:e=>e==="strict"?"\u30BB\u30EB\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u305D\u306E\u5224\u65AD\u9818\u57DF\u306B\u3042\u306A\u305F\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u307E\u3067\u305D\u306E\u884C\u306E\u4ED6\u306E\u30AB\u30FC\u30C9\u306F\u4F0F\u305B\u305F\u307E\u307E\u3067\u3059\u3002\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u3042\u3068\u304B\u3089\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002":"\u30BB\u30EB\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u305D\u306E\u5224\u65AD\u9818\u57DF\u306B\u3042\u306A\u305F\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u307E\u3067\u305D\u306E\u884C\u306E\u4ED6\u306E\u30AB\u30FC\u30C9\u306F\u4F0F\u305B\u305F\u307E\u307E\u3067\u3059\u3002\u51FA\u3057\u305F\u3042\u3068\u3082\u5909\u66F4\u3067\u304D\u307E\u3059\u3002",modeLabel:e=>e==="strict"?"\u51FA\u3057\u76F4\u3057\u4E0D\u53EF":"\u51FA\u3057\u76F4\u3057\u53EF",modeTitle:e=>e==="strict"?"strict \u30E2\u30FC\u30C9: \u4E00\u5EA6\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u5909\u66F4\u3067\u304D\u307E\u305B\u3093":"lax \u30E2\u30FC\u30C9: \u4ED6\u306E\u4EBA\u306E\u30AB\u30FC\u30C9\u3092\u898B\u305F\u3042\u3068\u3067\u3082\u30AB\u30FC\u30C9\u3092\u5909\u66F4\u3067\u304D\u307E\u3059",locked:"\u78BA\u5B9A",confirmTitle:"\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u3068\u5909\u66F4\u3067\u304D\u307E\u305B\u3093",confirmBody:(e,a)=>`\u300C${a}\u300D\u306B\u300C${e}\u300D\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u3053\u306E\u30DC\u30FC\u30C9\u3067\u306F\u3001\u4E00\u5EA6\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u4ED6\u306E\u4EBA\u306E\u30AB\u30FC\u30C9\u3092\u898B\u305F\u3042\u3068\u3067\u3082\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002`,confirmSkip:"\u6B21\u56DE\u304B\u3089\u78BA\u8A8D\u3057\u306A\u3044",confirmPlay:"\u3053\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3059",confirmCancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",decisionColumn:"\u5224\u65AD\u9818\u57DF",agreeColumn:"\u5408\u610F",notAgreed:"\u672A\u5408\u610F",agreeLabel:e=>`\u300C${e}\u300D\u306E\u5408\u610F\u30EC\u30D9\u30EB`,playAt:(e,a)=>`\u300C${a}\u300D\u306B ${e} \u3092\u51FA\u3059`,hiddenCards:e=>`\u4F0F\u305B\u672D ${e} \u679A`,addDecision:"+ \u5224\u65AD\u9818\u57DF",newDecision:"\u65B0\u3057\u3044\u5224\u65AD\u9818\u57DF",noDecisionsTitle:"\u5224\u65AD\u9818\u57DF\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noDecisionsBody:"\u8AB0\u304C\u6C7A\u3081\u308B\u306E\u304B\u304C\u66D6\u6627\u306A\u5224\u65AD\u3092\u4E26\u3079\u307E\u3059\u3002\u5224\u65AD\u3054\u3068\u306B\u5168\u54E1\u304C 1\uFF08\u4EFB\u305B\u308B\u5074\u3060\u3051\u3067\u6C7A\u3081\u308B\uFF09\u301C 7\uFF08\u5B8C\u5168\u306B\u4EFB\u305B\u308B\uFF09\u306E\u30AB\u30FC\u30C9\u3092 1 \u679A\u51FA\u3057\u3001\u8A71\u3057\u5408\u3063\u3066 1 \u3064\u306E\u30EC\u30D9\u30EB\u306B\u5408\u610F\u3057\u307E\u3059\u3002",firstDecision:"+ \u6700\u521D\u306E\u5224\u65AD\u9818\u57DF",commentCount:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,decisionNameLabel:"\u5224\u65AD\u9818\u57DF\u306E\u540D\u524D",commentButton:"\u30B3\u30E1\u30F3\u30C8",deleteButton:"\u524A\u9664",cardPlayedTitle:"\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u305F",levelAgreedTitle:"\u30EC\u30D9\u30EB\u306B\u5408\u610F",decisionAddedTitle:"\u5224\u65AD\u9818\u57DF\u3092\u8FFD\u52A0",decisionRenamedTitle:"\u5224\u65AD\u9818\u57DF\u306E\u540D\u524D\u3092\u5909\u66F4",decisionDeletedTitle:"\u5224\u65AD\u9818\u57DF\u3092\u524A\u9664",arrowTo:e=>`\u2192 ${e}`,arrowFrom:(e,a)=>`${e} \u2192 ${a}`,quotedArrowTo:e=>`\u2192 \u300C${e}\u300D`,quotedArrowFrom:(e,a)=>`\u300C${e}\u300D\u2192\u300C${a}\u300D`,added:e=>`+ \u300C${e}\u300D`,deleted:e=>`\u2212 \u300C${e}\u300D`,decisionKind:"\u5224\u65AD\u9818\u57DF",boardKind:"\u30DC\u30FC\u30C9",wholeBoard:"\u30DC\u30FC\u30C9\u5168\u4F53"}}),_=e=>e==="strict"?"strict":"lax",P=(e,a)=>e==="strict"&&a.yours!==void 0,q=(e,a,r)=>e==="lax"?{kind:"play"}:P(e,a)?{kind:"locked"}:r?{kind:"play"}:{kind:"confirm"},N=(e,a)=>({delegator:a.parties?.delegator??e.defaultDelegator,delegate:a.parties?.delegate??e.defaultDelegate}),H=e=>e.yours!==void 0||e.agreed!==void 0,Te=(e,a,r)=>[...r.yours===void 0?[]:[{label:e.you,kind:"you",level:r.yours}],...r.cards.map(t=>({label:j(a,t.player)?.name??t.player,kind:"player",level:t.level,...t.reason===void 0?{}:{reason:t.reason}}))],Ce=(e,a)=>e.agreed!==void 0?"agreed":e.yours===void 0?"to-play":a.every(r=>r.level===e.yours)?"consensus":"discuss",Se=(e,a,r,o)=>{const t=Te(e,a,o),i=H(o)?t:[];return{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description},status:Ce(o,t),hidden:H(o)?0:o.cards.length,...o.agreed===void 0?{}:{agreed:o.agreed},locked:P(r,o),cells:h.map(d=>({level:d,chips:i.filter(n=>n.level===d).map(({level:n,...ne})=>ne),yours:o.yours===d,agreed:o.agreed===d}))}},I=(e,a,r)=>{const{delegator:o,delegate:t}=N(e,a);return{levels:h.map(i=>({level:i,name:e.levelName(i),label:e.levelLabel(i),phrase:e.levelPhrase(i,o,t)})),rows:a.decisions.map(i=>Se(e,a,r,i)),progress:{played:a.decisions.filter(i=>i.yours!==void 0).length,agreed:a.decisions.filter(i=>i.agreed!==void 0).length,total:a.decisions.length}}},J=(e,a,r)=>{const o=r===void 0?"":e.levelLabel(r);return a===void 0?e.arrowTo(o):e.arrowFrom(e.levelLabel(a),o)},_e=(e,a,r)=>a===void 0?e.quotedArrowTo(r):e.quotedArrowFrom(a,r),U={PLAY_CARD:(e,a,r)=>{const o=$(g.PLAY_CARD,a);return{title:e.cardPlayedTitle,tone:"update",body:J(e,u(r,a.target.id)?.yours,o.level)}},AGREE_LEVEL:(e,a,r)=>({title:e.levelAgreedTitle,tone:"update",body:J(e,u(r,a.target.id)?.agreed,$(g.AGREE_LEVEL,a).level)}),ADD_DECISION:(e,a)=>({title:e.decisionAddedTitle,tone:"create",body:e.added(String($(g.ADD_DECISION,a).name??""))}),SET_DECISION_NAME:(e,a,r)=>({title:e.decisionRenamedTitle,tone:"update",body:_e(e,u(r,a.target.id)?.name,String($(g.SET_DECISION_NAME,a).name??""))}),DELETE_DECISION:(e,a,r)=>({title:e.decisionDeletedTitle,tone:"delete",body:e.deleted(u(r,a.target.id)?.name??a.target.id)})},W=(e,a,r,o)=>{let t;try{const i=Object.hasOwn(U,a.type)?U[a.type]:void 0;t=i?i(e,a,o??r):{title:a.type,tone:"meta"}}catch{t={title:a.type,tone:"meta"}}return{title:t.title,targetLabel:X(e,r,a.target),tone:t.tone,...t.body===void 0?{}:{summary:t.body}}},Q=e=>`${e.type} ${B(e.target)} ${JSON.stringify(e.payload)}`,X=(e,a,r)=>{switch(r.type){case"decision":{const o=u(a,r.id);return o?`${e.decisionKind} \xB7 ${o.name}`:`${e.decisionKind} \xB7 ${r.id} (missing)`}case"page":return`${e.boardKind} \xB7 ${O(a)}`;default:return`${r.type} \xB7 ${r.id}`}},Z=(e,a,r)=>[{value:`page:${x}`,label:e.wholeBoard,group:e.boardKind},...a.decisions.map(o=>({value:B({type:"decision",id:o.id}),label:o.name,group:e.decisionKind}))],O=e=>e.title??"Delegation Poker",ee=(e,a)=>a,ae=(e,a)=>{switch(a.type){case"decision":return u(e,a.id)!==void 0;case"page":return a.id===x;default:return!1}},re=e=>{const a=S(e);return{name:"delegation-poker",label:"Delegation Poker",parseBase:M,emptyBase:F,actions:g,apply:V,hasTarget:ae,describe:(r,o,t)=>W(a,r,o,t),serialize:Q,resolveNavigation:ee,commentTargets:(r,o)=>Z(a,r),title:O}},oe="dev-process-kit:delegation-poker:skip-strict-confirm",te=e=>e===!0?!0:null,Pe=e=>{const a=e?ge(te):me(te);return{read:()=>a.read(oe)===!0,remember:()=>a.write(oe,!0)}},Ne=(e,a,r,o)=>s`
1
+ import{ae as se,aj as le,af as v,ag as w,ah as E,aB as D,aC as l,ai as p,ak as A,al as L,p as b,av as f,v as ce,P as pe,e as R,a0 as ue,V as B,R as $,aD as ge,aE as me,a3 as c,A as ve,a4 as s,a5 as be,aF as he,K as ke,aG as ye,aH as fe,a2 as $e,T as z,l as xe}from"./shared-BDka-8DG.js";const h=[1,2,3,4,5,6,7],k=le(h,"a delegation level is an integer from 1 to 7"),y=A(p(),L(1)),we=v({player:y,level:k,reason:l(p())}),K=v({title:l(p()),parties:l(v({delegator:l(y),delegate:l(y)})),players:w(E(v({id:D,name:y})),[]),decisions:w(E(v({id:D,name:y,description:l(p()),cards:w(E(we),[]),agreed:l(k)})),[])}),M=e=>{const a=se(K,e),r=new Set;for(const t of a.players){if(r.has(t.id))throw new Error(`duplicate id "${t.id}" in players`);r.add(t.id)}const o=new Set;for(const t of a.decisions){if(o.has(t.id))throw new Error(`duplicate id "${t.id}" in decisions`);o.add(t.id);const i=new Set;for(const d of t.cards){if(!r.has(d.player))throw new Error(`decision "${t.id}" has a card from unknown player "${d.player}"`);if(i.has(d.player))throw new Error(`player "${d.player}" played more than one card on decision "${t.id}"`);i.add(d.player)}}return a},F=()=>({players:[],decisions:[]}),u=(e,a)=>{if(a!==void 0)return e.decisions.find(r=>r.id===a)},j=(e,a)=>e.players.find(r=>r.id===a),T=e=>[...e.players.map(a=>a.id),...e.decisions.map(a=>a.id)],x="delegation-poker",g={PLAY_CARD:b("PLAY_CARD","decision",v({level:k})),AGREE_LEVEL:b("AGREE_LEVEL","decision",f({level:k})),ADD_DECISION:b("ADD_DECISION","page",f({id:D,name:A(p(),L(1)),description:l(p())}),{dedupeKey:ce}),SET_DECISION_NAME:b("SET_DECISION_NAME","decision",f({name:A(p(),L(1))})),DELETE_DECISION:b("DELETE_DECISION","decision",f({}))},m={playCard:(e,a)=>({type:"PLAY_CARD",target:{type:"decision",id:e},payload:{level:a}}),agreeLevel:(e,a)=>({type:"AGREE_LEVEL",target:{type:"decision",id:e},payload:{level:a}}),addDecision:(e,a)=>({type:"ADD_DECISION",target:{type:"page",id:x},payload:{id:e,name:a}}),setDecisionName:(e,a)=>({type:"SET_DECISION_NAME",target:{type:"decision",id:e},payload:{name:a}}),deleteDecision:e=>({type:"DELETE_DECISION",target:{type:"decision",id:e},payload:{}})},V=(e,a)=>{const r=pe(g,a);if(r===null)return null;const o=r.target.id;switch(r.type){case"PLAY_CARD":return C(e,o,t=>({...t,yours:r.payload.level}));case"AGREE_LEVEL":return C(e,o,t=>({...t,agreed:r.payload.level}));case"ADD_DECISION":{const t=r.payload;return e.decisions.some(i=>i.id===t.id)?e:T(e).includes(t.id)?null:{...e,decisions:[...e.decisions,{id:t.id,name:t.name,...t.description===void 0?{}:{description:t.description},cards:[]}]}}case"SET_DECISION_NAME":return C(e,o,t=>({...t,name:r.payload.name}));case"DELETE_DECISION":return e.decisions.some(t=>t.id===o)?{...e,decisions:e.decisions.filter(t=>t.id!==o)}:null;default:return R(r)}},C=(e,a,r)=>e.decisions.some(o=>o.id===a)?{...e,decisions:e.decisions.map(o=>o.id===a?r(o):o)}:null,G={1:"Tell",2:"Sell",3:"Consult",4:"Agree",5:"Advise",6:"Inquire",7:"Delegate"},H={1:"\u547D\u4EE4\u3059\u308B",2:"\u8AAC\u5F97\u3059\u308B",3:"\u76F8\u8AC7\u3059\u308B",4:"\u5408\u610F\u3059\u308B",5:"\u52A9\u8A00\u3059\u308B",6:"\u5C0B\u306D\u308B",7:"\u59D4\u4EFB\u3059\u308B"},Ee={1:(e,a)=>`${e} decide and tell ${a}`,2:(e,a)=>`${e} decide and convince ${a}`,3:(e,a)=>`${e} decide after hearing ${a}`,4:(e,a)=>`${e} and ${a} decide together`,5:(e,a)=>`${a} decides after ${e} advise`,6:(e,a)=>`${a} decides, then ${e} ask why`,7:(e,a)=>`${a} decides; ${e} need not know`},De={1:(e,a)=>`${e}\u304C\u6C7A\u3081\u3066\u3001${a}\u306B\u4F1D\u3048\u308B`,2:(e,a)=>`${e}\u304C\u6C7A\u3081\u3066\u3001${a}\u306B\u7D0D\u5F97\u3057\u3066\u3082\u3089\u3046`,3:(e,a)=>`${e}\u304C${a}\u306E\u610F\u898B\u3092\u805E\u3044\u3066\u304B\u3089\u6C7A\u3081\u308B`,4:(e,a)=>`${e}\u3068${a}\u304C\u4E00\u7DD2\u306B\u6C7A\u3081\u308B`,5:(e,a)=>`${e}\u304C\u52A9\u8A00\u3057\u3001${a}\u304C\u6C7A\u3081\u308B`,6:(e,a)=>`${a}\u304C\u6C7A\u3081\u3001\u3042\u3068\u3067${e}\u304C\u7406\u7531\u3092\u5C0B\u306D\u308B`,7:(e,a)=>`${a}\u304C\u6C7A\u3081\u308B\u3002${e}\u306F\u77E5\u3089\u306A\u304F\u3066\u3088\u3044`},Ae={"to-play":"Your card",discuss:"Discuss",consensus:"Same card",agreed:"Agreed"},Le={"to-play":"\u30AB\u30FC\u30C9\u5F85\u3061",discuss:"\u8981\u8B70\u8AD6",consensus:"\u4E00\u81F4",agreed:"\u5408\u610F\u6E08\u307F"},S=ue({en:{levelName:e=>G[e],levelPhrase:(e,a,r)=>Ee[e](a,r),levelLabel:e=>`${e} ${G[e]}`,statusLabel:e=>Ae[e],defaultDelegator:"Leaders",defaultDelegate:"Team",you:"You",progress:(e,a,r)=>`Played ${e}/${r} \xB7 Agreed ${a}/${r}`,partiesLabel:"Who delegates to whom",board:"Delegation board",boardHint:e=>e==="strict"?"Click a cell to play your card for that decision area. The other cards on a row stay face down until you play on it, and your card cannot be changed afterwards.":"Click a cell to play your card for that decision area. The other cards on a row stay face down until you play on it; you can still change your card afterwards.",modeLabel:e=>e==="strict"?"One card only":"Card can be changed",modeTitle:e=>e==="strict"?"Strict mode: a card, once played, is final":"Lax mode: you may change your card after seeing the others",locked:"Final",confirmTitle:"Your card is final",confirmBody:(e,a)=>`You are playing ${e} on \u201C${a}\u201D. On this board a card cannot be changed once played, even after you see the others.`,confirmSkip:"Don\u2019t ask again",confirmPlay:"Play this card",confirmCancel:"Cancel",decisionColumn:"Decision area",agreeColumn:"Agreed",notAgreed:"Not yet",agreeLabel:e=>`Agreed level for \u201C${e}\u201D`,playAt:(e,a)=>`Play ${e} on \u201C${a}\u201D`,hiddenCards:e=>`${e} face down`,addDecision:"+ Decision area",newDecision:"New decision area",noDecisionsTitle:"No decision areas yet",noDecisionsBody:"List the key decisions whose ownership is unclear. For each one, everyone plays one of seven cards, from 1 (the delegator decides alone) to 7 (fully delegated), and then settles on one level.",firstDecision:"+ First decision area",commentCount:e=>`${e} comments`,decisionNameLabel:"Decision area name",commentButton:"Comment",deleteButton:"Delete",cardPlayedTitle:"Played a card",levelAgreedTitle:"Agreed on a level",decisionAddedTitle:"Added a decision area",decisionRenamedTitle:"Renamed the decision area",decisionDeletedTitle:"Deleted the decision area",arrowTo:e=>`\u2192 ${e}`,arrowFrom:(e,a)=>`${e} \u2192 ${a}`,quotedArrowTo:e=>`\u2192 \u201C${e}\u201D`,quotedArrowFrom:(e,a)=>`\u201C${e}\u201D \u2192 \u201C${a}\u201D`,added:e=>`+ \u201C${e}\u201D`,deleted:e=>`\u2212 \u201C${e}\u201D`,decisionKind:"Decision area",boardKind:"Board",wholeBoard:"Whole board"},ja:{levelName:e=>H[e],levelPhrase:(e,a,r)=>De[e](a,r),levelLabel:e=>`${e} ${H[e]}`,statusLabel:e=>Le[e],defaultDelegator:"\u30EA\u30FC\u30C0\u30FC",defaultDelegate:"\u30C1\u30FC\u30E0",you:"\u3042\u306A\u305F",progress:(e,a,r)=>`\u63D0\u51FA ${e}/${r} \xB7 \u5408\u610F ${a}/${r}`,partiesLabel:"\u8AB0\u304C\u8AB0\u306B\u4EFB\u305B\u308B\u304B",board:"\u30C7\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30DC\u30FC\u30C9",boardHint:e=>e==="strict"?"\u30BB\u30EB\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u305D\u306E\u5224\u65AD\u9818\u57DF\u306B\u3042\u306A\u305F\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u307E\u3067\u305D\u306E\u884C\u306E\u4ED6\u306E\u30AB\u30FC\u30C9\u306F\u4F0F\u305B\u305F\u307E\u307E\u3067\u3059\u3002\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u3042\u3068\u304B\u3089\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002":"\u30BB\u30EB\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u305D\u306E\u5224\u65AD\u9818\u57DF\u306B\u3042\u306A\u305F\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u307E\u3067\u305D\u306E\u884C\u306E\u4ED6\u306E\u30AB\u30FC\u30C9\u306F\u4F0F\u305B\u305F\u307E\u307E\u3067\u3059\u3002\u51FA\u3057\u305F\u3042\u3068\u3082\u5909\u66F4\u3067\u304D\u307E\u3059\u3002",modeLabel:e=>e==="strict"?"\u51FA\u3057\u76F4\u3057\u4E0D\u53EF":"\u51FA\u3057\u76F4\u3057\u53EF",modeTitle:e=>e==="strict"?"strict \u30E2\u30FC\u30C9: \u4E00\u5EA6\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u5909\u66F4\u3067\u304D\u307E\u305B\u3093":"lax \u30E2\u30FC\u30C9: \u4ED6\u306E\u4EBA\u306E\u30AB\u30FC\u30C9\u3092\u898B\u305F\u3042\u3068\u3067\u3082\u30AB\u30FC\u30C9\u3092\u5909\u66F4\u3067\u304D\u307E\u3059",locked:"\u78BA\u5B9A",confirmTitle:"\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u3068\u5909\u66F4\u3067\u304D\u307E\u305B\u3093",confirmBody:(e,a)=>`\u300C${a}\u300D\u306B\u300C${e}\u300D\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u3053\u306E\u30DC\u30FC\u30C9\u3067\u306F\u3001\u4E00\u5EA6\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u4ED6\u306E\u4EBA\u306E\u30AB\u30FC\u30C9\u3092\u898B\u305F\u3042\u3068\u3067\u3082\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002`,confirmSkip:"\u6B21\u56DE\u304B\u3089\u78BA\u8A8D\u3057\u306A\u3044",confirmPlay:"\u3053\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3059",confirmCancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",decisionColumn:"\u5224\u65AD\u9818\u57DF",agreeColumn:"\u5408\u610F",notAgreed:"\u672A\u5408\u610F",agreeLabel:e=>`\u300C${e}\u300D\u306E\u5408\u610F\u30EC\u30D9\u30EB`,playAt:(e,a)=>`\u300C${a}\u300D\u306B ${e} \u3092\u51FA\u3059`,hiddenCards:e=>`\u4F0F\u305B\u672D ${e} \u679A`,addDecision:"+ \u5224\u65AD\u9818\u57DF",newDecision:"\u65B0\u3057\u3044\u5224\u65AD\u9818\u57DF",noDecisionsTitle:"\u5224\u65AD\u9818\u57DF\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noDecisionsBody:"\u8AB0\u304C\u6C7A\u3081\u308B\u306E\u304B\u304C\u66D6\u6627\u306A\u5224\u65AD\u3092\u4E26\u3079\u307E\u3059\u3002\u5224\u65AD\u3054\u3068\u306B\u5168\u54E1\u304C 1\uFF08\u4EFB\u305B\u308B\u5074\u3060\u3051\u3067\u6C7A\u3081\u308B\uFF09\u301C 7\uFF08\u5B8C\u5168\u306B\u4EFB\u305B\u308B\uFF09\u306E\u30AB\u30FC\u30C9\u3092 1 \u679A\u51FA\u3057\u3001\u8A71\u3057\u5408\u3063\u3066 1 \u3064\u306E\u30EC\u30D9\u30EB\u306B\u5408\u610F\u3057\u307E\u3059\u3002",firstDecision:"+ \u6700\u521D\u306E\u5224\u65AD\u9818\u57DF",commentCount:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,decisionNameLabel:"\u5224\u65AD\u9818\u57DF\u306E\u540D\u524D",commentButton:"\u30B3\u30E1\u30F3\u30C8",deleteButton:"\u524A\u9664",cardPlayedTitle:"\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u305F",levelAgreedTitle:"\u30EC\u30D9\u30EB\u306B\u5408\u610F",decisionAddedTitle:"\u5224\u65AD\u9818\u57DF\u3092\u8FFD\u52A0",decisionRenamedTitle:"\u5224\u65AD\u9818\u57DF\u306E\u540D\u524D\u3092\u5909\u66F4",decisionDeletedTitle:"\u5224\u65AD\u9818\u57DF\u3092\u524A\u9664",arrowTo:e=>`\u2192 ${e}`,arrowFrom:(e,a)=>`${e} \u2192 ${a}`,quotedArrowTo:e=>`\u2192 \u300C${e}\u300D`,quotedArrowFrom:(e,a)=>`\u300C${e}\u300D\u2192\u300C${a}\u300D`,added:e=>`+ \u300C${e}\u300D`,deleted:e=>`\u2212 \u300C${e}\u300D`,decisionKind:"\u5224\u65AD\u9818\u57DF",boardKind:"\u30DC\u30FC\u30C9",wholeBoard:"\u30DC\u30FC\u30C9\u5168\u4F53"}}),_=e=>e==="strict"?"strict":"lax",P=(e,a)=>e==="strict"&&a.yours!==void 0,Y=(e,a,r)=>e==="lax"?{kind:"play"}:P(e,a)?{kind:"locked"}:r?{kind:"play"}:{kind:"confirm"},N=(e,a)=>({delegator:a.parties?.delegator??e.defaultDelegator,delegate:a.parties?.delegate??e.defaultDelegate}),q=e=>e.yours!==void 0||e.agreed!==void 0,Te=(e,a,r)=>[...r.yours===void 0?[]:[{label:e.you,kind:"you",level:r.yours}],...r.cards.map(t=>({label:j(a,t.player)?.name??t.player,kind:"player",level:t.level,...t.reason===void 0?{}:{reason:t.reason}}))],Ce=(e,a)=>e.agreed!==void 0?"agreed":e.yours===void 0?"to-play":a.every(r=>r.level===e.yours)?"consensus":"discuss",Se=(e,a,r,o)=>{const t=Te(e,a,o),i=q(o)?t:[];return{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description},status:Ce(o,t),hidden:q(o)?0:o.cards.length,...o.agreed===void 0?{}:{agreed:o.agreed},locked:P(r,o),cells:h.map(d=>({level:d,chips:i.filter(n=>n.level===d).map(({level:n,...ne})=>ne),yours:o.yours===d,agreed:o.agreed===d}))}},I=(e,a,r)=>{const{delegator:o,delegate:t}=N(e,a);return{levels:h.map(i=>({level:i,name:e.levelName(i),label:e.levelLabel(i),phrase:e.levelPhrase(i,o,t)})),rows:a.decisions.map(i=>Se(e,a,r,i)),progress:{played:a.decisions.filter(i=>i.yours!==void 0).length,agreed:a.decisions.filter(i=>i.agreed!==void 0).length,total:a.decisions.length}}},J=(e,a,r)=>{const o=r===void 0?"":e.levelLabel(r);return a===void 0?e.arrowTo(o):e.arrowFrom(e.levelLabel(a),o)},_e=(e,a,r)=>a===void 0?e.quotedArrowTo(r):e.quotedArrowFrom(a,r),U={PLAY_CARD:(e,a,r)=>{const o=$(g.PLAY_CARD,a);return{title:e.cardPlayedTitle,tone:"update",body:J(e,u(r,a.target.id)?.yours,o.level)}},AGREE_LEVEL:(e,a,r)=>({title:e.levelAgreedTitle,tone:"update",body:J(e,u(r,a.target.id)?.agreed,$(g.AGREE_LEVEL,a).level)}),ADD_DECISION:(e,a)=>({title:e.decisionAddedTitle,tone:"create",body:e.added(String($(g.ADD_DECISION,a).name??""))}),SET_DECISION_NAME:(e,a,r)=>({title:e.decisionRenamedTitle,tone:"update",body:_e(e,u(r,a.target.id)?.name,String($(g.SET_DECISION_NAME,a).name??""))}),DELETE_DECISION:(e,a,r)=>({title:e.decisionDeletedTitle,tone:"delete",body:e.deleted(u(r,a.target.id)?.name??a.target.id)})},W=(e,a,r,o)=>{let t;try{const i=Object.hasOwn(U,a.type)?U[a.type]:void 0;t=i?i(e,a,o??r):{title:a.type,tone:"meta"}}catch{t={title:a.type,tone:"meta"}}return{title:t.title,targetLabel:X(e,r,a.target),tone:t.tone,...t.body===void 0?{}:{summary:t.body}}},Q=e=>`${e.type} ${B(e.target)} ${JSON.stringify(e.payload)}`,X=(e,a,r)=>{switch(r.type){case"decision":{const o=u(a,r.id);return o?`${e.decisionKind} \xB7 ${o.name}`:`${e.decisionKind} \xB7 ${r.id} (missing)`}case"page":return`${e.boardKind} \xB7 ${O(a)}`;default:return`${r.type} \xB7 ${r.id}`}},Z=(e,a,r)=>[{value:`page:${x}`,label:e.wholeBoard,group:e.boardKind},...a.decisions.map(o=>({value:B({type:"decision",id:o.id}),label:o.name,group:e.decisionKind}))],O=e=>e.title??"Delegation Poker",ee=(e,a)=>a,ae=(e,a)=>{switch(a.type){case"decision":return u(e,a.id)!==void 0;case"page":return a.id===x;default:return!1}},re=e=>{const a=S(e);return{name:"delegation-poker",label:"Delegation Poker",parseBase:M,emptyBase:F,actions:g,apply:V,hasTarget:ae,describe:(r,o,t)=>W(a,r,o,t),serialize:Q,resolveNavigation:ee,commentTargets:(r,o)=>Z(a,r),title:O}},oe="dev-process-kit:delegation-poker:skip-strict-confirm",te=e=>e===!0?!0:null,Pe=e=>{const a=e?ge(te):me(te);return{read:()=>a.read(oe)===!0,remember:()=>a.write(oe,!0)}},Ne=(e,a,r,o)=>s`
2
2
  <button
3
3
  class="dpk-icon-btn"
4
4
  type="button"
@@ -607,4 +607,4 @@ ${i} \u2192 ${d}`}
607
607
  .empty .dpk-btn {
608
608
  justify-self: start;
609
609
  }
610
- `;class ie extends z{static{this.styles=[z.styles,Ve]}static{this.properties={mode:{type:String},pending:{state:!0},skipConfirm:{state:!0}}}#a=null;#e=null;constructor(){super(),this.mode=null,this.pending=null,this.skipConfirm=!1}connectedCallback(){super.connectedCallback(),this.#a=Pe(this.storage!=="off"&&this.storage!=="memory"),this.skipConfirm=this.#a.read()}definitionFor(a){return re(a)}renderRegions(a){const r=S(this.locale),o=this.#r(a,r),t={context:a,handlers:o,m:r,mode:_(this.mode)},i=a.state.decisions.length===0?Oe(t):Re(t);return{header:Ie(t),main:s`${i}${je(r,this.pending,this.#o(a))}`}}updated(){super.updated();const a=this.#e;if(a!==null){if(this.#e=null,a==="dialog"){this.renderRoot.querySelector('[data-testid="confirm-play-ok"]')?.focus();return}this.renderRoot.querySelector(`[data-decision="${a.decisionId}"] .cell-play[data-level="${a.level}"]`)?.focus()}}#r(a,r){return{play:(o,t)=>{const i=a.state.decisions.find(n=>n.id===o);if(i===void 0)return;const d=q(_(this.mode),i,this.skipConfirm);switch(d.kind){case"play":a.dispatch(m.playCard(o,t));return;case"confirm":this.pending={decisionId:o,decisionName:i.name,level:t,skip:!1},this.#e="dialog";return;case"locked":return;default:R(d)}},agree:(o,t)=>{a.dispatch(m.agreeLevel(o,t))},addDecision:()=>{const o=xe("decision",T(a.state));a.dispatch(m.addDecision(o,r.newDecision))},rename:(o,t)=>{a.dispatch(m.setDecisionName(o,t))},deleteDecision:o=>{a.dispatch(m.deleteDecision(o))},comment:o=>this.requestComment(o)}}#o(a){const r=o=>{this.pending=null,this.#e={decisionId:o.decisionId,level:o.level}};return{toggleSkip:o=>{this.pending!==null&&(this.pending={...this.pending,skip:o})},confirm:()=>{const o=this.pending;o!==null&&(o.skip&&(this.#a?.remember(),this.skipConfirm=!0),a.dispatch(m.playCard(o.decisionId,o.level)),r(o))},cancel:()=>{this.pending!==null&&r(this.pending)}}}}const de=()=>{customElements.get("dpk-template-delegation-poker")||customElements.define("dpk-template-delegation-poker",ie)},Ge=Object.freeze(Object.defineProperty({__proto__:null,DELEGATION_LEVELS:h,DELEGATION_POKER_PAGE:x,DpkTemplateDelegationPoker:ie,allDelegationPokerIds:T,applyDelegationPokerAction:V,defineDelegationPokerElement:de,delegationLevelSchema:k,delegationParties:N,delegationPokerAction:m,delegationPokerActions:g,delegationPokerBaseSchema:K,delegationPokerCommentTargets:Z,delegationPokerDefinitionFor:re,delegationPokerHasTarget:ae,delegationPokerMessages:S,delegationPokerTargetLabel:X,delegationPokerTitle:O,describeDelegationPokerAction:W,emptyDelegationPokerBase:F,findDecision:u,findPlayer:j,isLocked:P,parseDelegationPokerBase:M,parsePlayMode:_,playIntent:q,presentBoard:I,resolveDelegationPokerNavigation:ee,serializeDelegationPokerAction:Q},Symbol.toStringTag,{value:"Module"}));export{de as d,Ge as i};
610
+ `;class ie extends z{static{this.styles=[z.styles,Ve]}static{this.properties={mode:{type:String},pending:{state:!0},skipConfirm:{state:!0}}}#a=null;#e=null;constructor(){super(),this.mode=null,this.pending=null,this.skipConfirm=!1}connectedCallback(){super.connectedCallback(),this.#a=Pe(this.storage!=="off"&&this.storage!=="memory"),this.skipConfirm=this.#a.read()}definitionFor(a){return re(a)}renderRegions(a){const r=S(this.locale),o=this.#r(a,r),t={context:a,handlers:o,m:r,mode:_(this.mode)},i=a.state.decisions.length===0?Oe(t):Re(t);return{header:Ie(t),main:s`${i}${je(r,this.pending,this.#o(a))}`}}updated(){super.updated();const a=this.#e;if(a!==null){if(this.#e=null,a==="dialog"){this.renderRoot.querySelector('[data-testid="confirm-play-ok"]')?.focus();return}this.renderRoot.querySelector(`[data-decision="${a.decisionId}"] .cell-play[data-level="${a.level}"]`)?.focus()}}#r(a,r){return{play:(o,t)=>{const i=a.state.decisions.find(n=>n.id===o);if(i===void 0)return;const d=Y(_(this.mode),i,this.skipConfirm);switch(d.kind){case"play":a.dispatch(m.playCard(o,t));return;case"confirm":this.pending={decisionId:o,decisionName:i.name,level:t,skip:!1},this.#e="dialog";return;case"locked":return;default:R(d)}},agree:(o,t)=>{a.dispatch(m.agreeLevel(o,t))},addDecision:()=>{const o=xe("decision",T(a.state));a.dispatch(m.addDecision(o,r.newDecision))},rename:(o,t)=>{a.dispatch(m.setDecisionName(o,t))},deleteDecision:o=>{a.dispatch(m.deleteDecision(o))},comment:o=>this.requestComment(o)}}#o(a){const r=o=>{this.pending=null,this.#e={decisionId:o.decisionId,level:o.level}};return{toggleSkip:o=>{this.pending!==null&&(this.pending={...this.pending,skip:o})},confirm:()=>{const o=this.pending;o!==null&&(o.skip&&(this.#a?.remember(),this.skipConfirm=!0),a.dispatch(m.playCard(o.decisionId,o.level)),r(o))},cancel:()=>{this.pending!==null&&r(this.pending)}}}}const de=()=>{customElements.get("dpk-template-delegation-poker")||customElements.define("dpk-template-delegation-poker",ie)},Ge=Object.freeze(Object.defineProperty({__proto__:null,DELEGATION_LEVELS:h,DELEGATION_POKER_PAGE:x,DpkTemplateDelegationPoker:ie,allDelegationPokerIds:T,applyDelegationPokerAction:V,defineDelegationPokerElement:de,delegationLevelSchema:k,delegationParties:N,delegationPokerAction:m,delegationPokerActions:g,delegationPokerBaseSchema:K,delegationPokerCommentTargets:Z,delegationPokerDefinitionFor:re,delegationPokerHasTarget:ae,delegationPokerMessages:S,delegationPokerTargetLabel:X,delegationPokerTitle:O,describeDelegationPokerAction:W,emptyDelegationPokerBase:F,findDecision:u,findPlayer:j,isLocked:P,parseDelegationPokerBase:M,parsePlayMode:_,playIntent:Y,presentBoard:I,resolveDelegationPokerNavigation:ee,serializeDelegationPokerAction:Q},Symbol.toStringTag,{value:"Module"}));export{de as d,Ge as i};
@@ -0,0 +1,49 @@
1
+ import{a0 as i,a3 as o,a4 as s}from"./shared-BDka-8DG.js";const r=i({en:{comment:"Comment",commentOn:a=>`Comment on ${a}`,submit:"Send",cancel:"Cancel"},ja:{comment:"\u30B3\u30E1\u30F3\u30C8",commentOn:a=>`${a}\u3078\u306E\u30B3\u30E1\u30F3\u30C8`,submit:"\u9001\u4FE1",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB"}}),c=(a,e,n={})=>({body:a,notes:e,submission:a.trim()||null,label:n.label??null,error:n.error??null,key:n.key??null,choice:n.choice??null,submitLabel:n.submitLabel??null}),u=(a,e,n)=>{const t=()=>{e.submission!==null&&n({kind:"comment",body:e.submission})};return s`<div
2
+ class="comment-pop"
3
+ popover="manual"
4
+ role="dialog"
5
+ aria-label=${e.label?a.commentOn(e.label):a.comment}
6
+ @click=${l=>l.stopPropagation()}
7
+ @keydown=${l=>{l.isComposing||l.key!=="Escape"||(l.preventDefault(),l.stopPropagation(),n({kind:"dismiss"}))}}
8
+ >
9
+ ${e.label?s`<strong class="comment-target">${e.label}</strong>`:o}
10
+ ${e.error?s`<p class="comment-error" role="alert">${e.error}</p>`:o}
11
+ ${e.choice?m(e.choice,n):o}
12
+ ${e.notes.length?s`<ul class="comment-list">
13
+ ${e.notes.map(l=>s`<li>${l}</li>`)}
14
+ </ul>`:o}
15
+ <textarea
16
+ class="dpk-textarea"
17
+ aria-label=${a.comment}
18
+ data-dpk-text-key=${e.key??o}
19
+ .value=${e.body}
20
+ @input=${l=>{l.currentTarget instanceof HTMLTextAreaElement&&n({kind:"input",body:l.currentTarget.value})}}
21
+ @keydown=${l=>{l.isComposing||l.key==="Enter"&&(l.ctrlKey||l.metaKey)&&(l.preventDefault(),t())}}
22
+ ></textarea>
23
+ <div class="pop-actions">
24
+ <button class="dpk-btn dpk-btn--accent" type="button" ?disabled=${e.submission===null} @click=${t}>
25
+ ${e.submitLabel??a.submit}
26
+ </button>
27
+ <button
28
+ class="dpk-btn dpk-btn--ghost"
29
+ type="button"
30
+ data-dpk-text-discard
31
+ @click=${()=>n({kind:"dismiss"})}
32
+ >
33
+ ${a.cancel}
34
+ </button>
35
+ </div>
36
+ </div>`},m=(a,e)=>{const n=a.options.find(t=>t.value===a.value)?.hint;return s`<fieldset class="comment-kinds">
37
+ <legend>${a.label}</legend>
38
+ ${a.options.map(t=>s`<label class="comment-kind">
39
+ <input
40
+ type="radio"
41
+ name="comment-kind"
42
+ .value=${t.value}
43
+ .checked=${t.value===a.value}
44
+ @change=${()=>e({kind:"choose",value:t.value})}
45
+ />
46
+ <span>${t.label}</span>
47
+ </label>`)}
48
+ </fieldset>
49
+ ${n===void 0?o:s`<p class="comment-kind-hint">${n}</p>`}`};export{r as c,c as p,u as r};
@@ -1 +1 @@
1
- import{r as a}from"./chunks/shared-3uutHtJD.js";import{D as e,a as s,b as n,c as t,d as o,e as r,f as i,g as p,h as m,i as c,j as d,k as D,l as f,m as l,n as g,o as C,p as S,q as A,s as E,t as M,u as k,v as u}from"./chunks/shared-3uutHtJD.js";import{s as y}from"./chunks/shared-CjhDJ2vV.js";import{C as h,a as T,D as I,b as v,c as K,E as N,F as O,M as b,T as R,W as P,d as q,e as F,f as G,g as j,h as w,i as _,j as B,k as H,l as V,m as W,n as x,o as z,p as L,q as U,r as Y,t as J,u as Q,v as X,w as Z,x as $,y as aa,z as ea,A as sa,B as na,G as ta,H as oa,I as ra,J as ia,K as pa,L as ma,N as ca,O as da,P as Da,Q as fa,R as la,S as ga,U as Ca,V as Sa,X as Aa,Y as Ea,Z as Ma}from"./chunks/shared-CjhDJ2vV.js";y({entry:"components.js",templates:[],register:()=>{a()}});export{h as COMMENT_ACTION,T as COMMENT_DESCRIPTOR,e as DpkComponentArchitectureMap,I as DpkComponentCommentPanel,s as DpkComponentDependencyGraph,n as DpkComponentErDiagram,t as DpkComponentFormalSpec,v as DpkComponentInlineEdit,o as DpkComponentKanban,r as DpkComponentMindMap,i as DpkComponentSequenceDiagram,p as DpkComponentStateDiagram,K as DraftController,N as EMPTY_NAVIGATION,O as FRAMEWORK_VERSION,b as MemoryDraftStorage,R as TemplateElement,P as WebStorageDraftStorage,q as appendAction,F as assertNever,G as buildAgentBrief,j as commentActionSchema,w as commentBody,_ as commentTargetKey,B as controls,H as createActionId,V as createEntityId,W as dedupeKeyOf,x as defaultStorage,z as defaultStorageKey,L as defineAction,m as defineArchitectureMap,U as defineCommentPanel,c as defineDependencyGraph,d as defineErDiagram,D as defineFormalSpec,Y as defineInlineEdit,f as defineKanban,l as defineMindMap,g as defineSequenceDiagram,C as defineStateDiagram,J as derive,Q as draftActionEnvelopeSchema,X as entityDedupeKey,Z as formatHash,$ as iconArrowDown,aa as iconArrowUp,ea as iconClose,sa as iconComment,na as iconGrip,ta as iconLink,oa as iconMove,ra as iconPencil,ia as iconPlus,pa as iconTrash,ma as liveActions,S as parseFormalSpecData,ca as parseHash,A as parseKanbanData,E as parseMindMapData,M as parseSequenceData,k as parseStateData,da as parseTargetRef,Da as parseTemplateAction,fa as patchNavigation,la as payloadFor,a as registerComponentElements,u as registerDiagramElements,ga as serializeDraft,Ca as slugify,Sa as targetRef,Aa as targetSchema,Ea as toTarget,Ma as tokens};
1
+ import{r as a}from"./chunks/shared-Bhrkz9uX.js";import{D as e,a as s,b as n,c as t,d as o,e as r,f as i,g as p,h as m,i as c,j as d,k as D,l as f,m as l,n as g,o as C,p as S,q as A,s as E,t as M,u as k,v as u}from"./chunks/shared-Bhrkz9uX.js";import{s as y}from"./chunks/shared-BDka-8DG.js";import{C as h,a as T,D as I,b as v,c as K,E as N,F as O,M as b,T as R,W as P,d as q,e as F,f as G,g as j,h as w,i as _,j as B,k as H,l as V,m as W,n as x,o as z,p as L,q as U,r as Y,t as J,u as Q,v as X,w as Z,x as $,y as aa,z as ea,A as sa,B as na,G as ta,H as oa,I as ra,J as ia,K as pa,L as ma,N as ca,O as da,P as Da,Q as fa,R as la,S as ga,U as Ca,V as Sa,X as Aa,Y as Ea,Z as Ma}from"./chunks/shared-BDka-8DG.js";y({entry:"components.js",templates:[],register:()=>{a()}});export{h as COMMENT_ACTION,T as COMMENT_DESCRIPTOR,e as DpkComponentArchitectureMap,I as DpkComponentCommentPanel,s as DpkComponentDependencyGraph,n as DpkComponentErDiagram,t as DpkComponentFormalSpec,v as DpkComponentInlineEdit,o as DpkComponentKanban,r as DpkComponentMindMap,i as DpkComponentSequenceDiagram,p as DpkComponentStateDiagram,K as DraftController,N as EMPTY_NAVIGATION,O as FRAMEWORK_VERSION,b as MemoryDraftStorage,R as TemplateElement,P as WebStorageDraftStorage,q as appendAction,F as assertNever,G as buildAgentBrief,j as commentActionSchema,w as commentBody,_ as commentTargetKey,B as controls,H as createActionId,V as createEntityId,W as dedupeKeyOf,x as defaultStorage,z as defaultStorageKey,L as defineAction,m as defineArchitectureMap,U as defineCommentPanel,c as defineDependencyGraph,d as defineErDiagram,D as defineFormalSpec,Y as defineInlineEdit,f as defineKanban,l as defineMindMap,g as defineSequenceDiagram,C as defineStateDiagram,J as derive,Q as draftActionEnvelopeSchema,X as entityDedupeKey,Z as formatHash,$ as iconArrowDown,aa as iconArrowUp,ea as iconClose,sa as iconComment,na as iconGrip,ta as iconLink,oa as iconMove,ra as iconPencil,ia as iconPlus,pa as iconTrash,ma as liveActions,S as parseFormalSpecData,ca as parseHash,A as parseKanbanData,E as parseMindMapData,M as parseSequenceData,k as parseStateData,da as parseTargetRef,Da as parseTemplateAction,fa as patchNavigation,la as payloadFor,a as registerComponentElements,u as registerDiagramElements,ga as serializeDraft,Ca as slugify,Sa as targetRef,Aa as targetSchema,Ea as toTarget,Ma as tokens};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{r as e}from"./chunks/shared-3uutHtJD.js";import{D as r,a as s,b as i,c as m,d as n,e as p,f as l,g as f,v as d}from"./chunks/shared-3uutHtJD.js";import{s as g,_ as E,$ as D,F as t}from"./chunks/shared-CjhDJ2vV.js";import{C as c,D as k,b as C,c as y,M as S,T as M,W as b,e as u,f as A,h as T,l as h,n as v,o as P,p as R,t as N,v as O,w as x,N as I,O as B,P as F,Q as K,R as W,U as _,V as w}from"./chunks/shared-CjhDJ2vV.js";import{d as V}from"./chunks/shared-QJPpnJIO.js";import{i as G}from"./chunks/shared-QJPpnJIO.js";import{d as H}from"./chunks/shared-Bnqz77V3.js";import{i as U}from"./chunks/shared-Bnqz77V3.js";import{d as j}from"./chunks/shared-CLSKGVCT.js";import{i as q}from"./chunks/shared-CLSKGVCT.js";import{d as L}from"./chunks/shared-B9XMvOh-.js";import{i as Q}from"./chunks/shared-B9XMvOh-.js";import{d as $}from"./chunks/shared-D7TEJdR2.js";import{i as z}from"./chunks/shared-D7TEJdR2.js";import{d as J}from"./chunks/shared-BnGxP2qu.js";import{i as X}from"./chunks/shared-BnGxP2qu.js";import{d as Y}from"./chunks/shared-B_MRyp8K.js";import{i as Z}from"./chunks/shared-B_MRyp8K.js";import{d as ee}from"./chunks/shared-DG16QEdg.js";import{i as ae}from"./chunks/shared-DG16QEdg.js";import{d as te}from"./chunks/shared-DmOHk6B_.js";import{i as oe}from"./chunks/shared-DmOHk6B_.js";import{d as re}from"./chunks/shared-XCFMpX43.js";import{i as se}from"./chunks/shared-XCFMpX43.js";const a=()=>{J(),te(),H(),j(),L(),$(),Y(),ee(),V(),re()},o=["prototype","usm","event-storming","example-mapping","grill","plain","slides","task-board","delegation-poker","whiteboard"],ie=()=>{e(),a(),E(t,o,D)};g({entry:"index.js",templates:o,register:()=>{e(),a()}});export{c as COMMENT_ACTION,r as DpkComponentArchitectureMap,k as DpkComponentCommentPanel,s as DpkComponentDependencyGraph,i as DpkComponentErDiagram,m as DpkComponentFormalSpec,C as DpkComponentInlineEdit,n as DpkComponentKanban,p as DpkComponentMindMap,l as DpkComponentSequenceDiagram,f as DpkComponentStateDiagram,y as DraftController,t as FRAMEWORK_VERSION,S as MemoryDraftStorage,M as TemplateElement,b as WebStorageDraftStorage,u as assertNever,A as buildAgentBrief,T as commentBody,h as createEntityId,v as defaultStorage,P as defaultStorageKey,R as defineAction,G as delegationPoker,N as derive,O as entityDedupeKey,U as eventStorming,q as exampleMapping,x as formatHash,Q as grill,I as parseHash,B as parseTargetRef,F as parseTemplateAction,K as patchNavigation,W as payloadFor,z as plain,X as prototype,ie as registerAllElements,e as registerComponentElements,d as registerDiagramElements,a as registerTemplateElements,Z as slides,_ as slugify,w as targetRef,ae as taskBoard,oe as usm,se as whiteboard};
1
+ import{r as e}from"./chunks/shared-Bhrkz9uX.js";import{D as r,a as s,b as m,c as i,d as n,e as p,f,g as d,v as l}from"./chunks/shared-Bhrkz9uX.js";import{s as g,_ as E,$ as D,F as t}from"./chunks/shared-BDka-8DG.js";import{C as c,D as k,b as C,c as y,M as S,T as M,W as b,e as u,f as A,h as T,l as h,n as v,o as P,p as R,t as N,v as O,w as x,N as I,O as B,P as F,Q as K,R as W,U as _,V as w}from"./chunks/shared-BDka-8DG.js";import{d as V}from"./chunks/shared-gytWODMC.js";import{i as H}from"./chunks/shared-gytWODMC.js";import{d as U}from"./chunks/shared-XXW1oBnj.js";import{i as j}from"./chunks/shared-XXW1oBnj.js";import{d as q}from"./chunks/shared-BqvHpTHr.js";import{i as G}from"./chunks/shared-BqvHpTHr.js";import{d as L}from"./chunks/shared-BqL8W-G6.js";import{i as Q}from"./chunks/shared-BqL8W-G6.js";import{d as $}from"./chunks/shared-BWk3i0ft.js";import{i as z}from"./chunks/shared-BWk3i0ft.js";import{d as J}from"./chunks/shared-CqjOqXJ3.js";import{i as X}from"./chunks/shared-CqjOqXJ3.js";import{d as Y}from"./chunks/shared-DRzfRsiJ.js";import{i as Z}from"./chunks/shared-DRzfRsiJ.js";import{d as ee}from"./chunks/shared-D1W4I3eq.js";import{i as ae}from"./chunks/shared-D1W4I3eq.js";import{d as te}from"./chunks/shared-BZK_cqqQ.js";import{i as oe}from"./chunks/shared-BZK_cqqQ.js";const a=()=>{$(),ee(),U(),q(),L(),J(),Y(),V(),te()},o=["prototype","usm","event-storming","example-mapping","plain","slides","task-board","delegation-poker","whiteboard"],re=()=>{e(),a(),E(t,o,D)};g({entry:"index.js",templates:o,register:()=>{e(),a()}});export{c as COMMENT_ACTION,r as DpkComponentArchitectureMap,k as DpkComponentCommentPanel,s as DpkComponentDependencyGraph,m as DpkComponentErDiagram,i as DpkComponentFormalSpec,C as DpkComponentInlineEdit,n as DpkComponentKanban,p as DpkComponentMindMap,f as DpkComponentSequenceDiagram,d as DpkComponentStateDiagram,y as DraftController,t as FRAMEWORK_VERSION,S as MemoryDraftStorage,M as TemplateElement,b as WebStorageDraftStorage,u as assertNever,A as buildAgentBrief,T as commentBody,h as createEntityId,v as defaultStorage,P as defaultStorageKey,R as defineAction,H as delegationPoker,N as derive,O as entityDedupeKey,j as eventStorming,G as exampleMapping,x as formatHash,I as parseHash,B as parseTargetRef,F as parseTemplateAction,K as patchNavigation,W as payloadFor,Q as plain,z as prototype,re as registerAllElements,e as registerComponentElements,l as registerDiagramElements,a as registerTemplateElements,X as slides,_ as slugify,w as targetRef,Z as taskBoard,ae as usm,oe as whiteboard};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as l,T as p,W as d,d as f,e as g,f as A,g as E,h as y,i as T,j as C,k as D,l as S,m as I,n as k,o as M,p as N,t as O,u as P,v as h,w as u,x as R,y as v,z as K,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-QJPpnJIO.js";import{i as $}from"../chunks/shared-QJPpnJIO.js";a({entry:"templates/delegation-poker.js",templates:["delegation-poker"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,d as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,D as createActionId,S as createEntityId,I as dedupeKeyOf,k as defaultStorage,M as defaultStorageKey,N as defineAction,$ as delegationPoker,O as derive,P as draftActionEnvelopeSchema,h as entityDedupeKey,u as formatHash,R as iconArrowDown,v as iconArrowUp,K as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as l,T as p,W as d,d as f,e as g,f as A,g as E,h as y,i as T,j as C,k as D,l as S,m as I,n as k,o as M,p as N,t as O,u as P,v as h,w as u,x as R,y as v,z as K,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-gytWODMC.js";import{i as $}from"../chunks/shared-gytWODMC.js";a({entry:"templates/delegation-poker.js",templates:["delegation-poker"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,d as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,D as createActionId,S as createEntityId,I as dedupeKeyOf,k as defaultStorage,M as defaultStorageKey,N as defineAction,$ as delegationPoker,O as derive,P as draftActionEnvelopeSchema,h as entityDedupeKey,u as formatHash,R as iconArrowDown,v as iconArrowUp,K as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as p,T as l,W as f,d,e as g,f as A,g as E,h as y,i as S,j as T,k as C,l as v,m as D,n as I,o as M,p as N,t as O,u as h,v as u,w as R,x as P,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-Bnqz77V3.js";import{i as $}from"../chunks/shared-Bnqz77V3.js";a({entry:"templates/event-storming.js",templates:["event-storming"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,S as commentTargetKey,T as controls,C as createActionId,v as createEntityId,D as dedupeKeyOf,I as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,u as entityDedupeKey,$ as eventStorming,R as formatHash,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as p,T as l,W as f,d,e as g,f as A,g as E,h as y,i as S,j as T,k as C,l as v,m as D,n as I,o as M,p as N,t as O,u as h,v as u,w as R,x as P,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-XXW1oBnj.js";import{i as $}from"../chunks/shared-XXW1oBnj.js";a({entry:"templates/event-storming.js",templates:["event-storming"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,S as commentTargetKey,T as controls,C as createActionId,v as createEntityId,D as dedupeKeyOf,I as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,u as entityDedupeKey,$ as eventStorming,R as formatHash,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as p,M as c,T as l,W as f,d,e as g,f as A,g as E,h as y,i as T,j as C,k as M,l as S,m as D,n as I,o as N,p as O,t as h,u,v as R,w as v,x as P,y as x,z as K,A as k,B as w,G as _,H as b,I as B,J as F,K as G,L as H,N as V,O as W,P as j,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-CLSKGVCT.js";import{i as $}from"../chunks/shared-CLSKGVCT.js";a({entry:"templates/example-mapping.js",templates:["example-mapping"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,p as FRAMEWORK_VERSION,c as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,M as createActionId,S as createEntityId,D as dedupeKeyOf,I as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,R as entityDedupeKey,$ as exampleMapping,v as formatHash,P as iconArrowDown,x as iconArrowUp,K as iconClose,k as iconComment,w as iconGrip,_ as iconLink,b as iconMove,B as iconPencil,F as iconPlus,G as iconTrash,H as liveActions,V as parseHash,W as parseTargetRef,j as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as p,M as c,T as l,W as f,d,e as g,f as A,g as E,h as y,i as T,j as C,k as M,l as S,m as D,n as I,o as N,p as O,t as h,u,v as R,w as v,x as P,y as x,z as K,A as k,B as w,G as _,H as b,I as B,J as F,K as G,L as H,N as V,O as W,P as j,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-BqvHpTHr.js";import{i as $}from"../chunks/shared-BqvHpTHr.js";a({entry:"templates/example-mapping.js",templates:["example-mapping"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,p as FRAMEWORK_VERSION,c as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,M as createActionId,S as createEntityId,D as dedupeKeyOf,I as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,R as entityDedupeKey,$ as exampleMapping,v as formatHash,P as iconArrowDown,x as iconArrowUp,K as iconClose,k as iconComment,w as iconGrip,_ as iconLink,b as iconMove,B as iconPencil,F as iconPlus,G as iconTrash,H as liveActions,V as parseHash,W as parseTargetRef,j as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as l,T as p,W as f,d,e as g,f as A,g as E,h as y,i as T,j as C,k as S,l as D,m as I,n as M,o as N,p as O,t as h,u,v as P,w as R,x as v,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-D7TEJdR2.js";import{i as $}from"../chunks/shared-D7TEJdR2.js";a({entry:"templates/plain.js",templates:["plain"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,M as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,P as entityDedupeKey,R as formatHash,v as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,$ as plain,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as l,T as p,W as f,d,e as g,f as A,g as E,h as y,i as T,j as C,k as S,l as D,m as I,n as M,o as N,p as O,t as h,u,v as P,w as R,x as v,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-BqL8W-G6.js";import{i as $}from"../chunks/shared-BqL8W-G6.js";a({entry:"templates/plain.js",templates:["plain"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,M as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,P as entityDedupeKey,R as formatHash,v as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,$ as plain,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
@@ -1 +1 @@
1
- import{s as a,q as e,r as t}from"../chunks/shared-CjhDJ2vV.js";import{C as s,a as o,D as r,b as n,c as i,E as m,F as p,M as c,T as l,W as f,d,e as y,f as g,g as A,h as E,i as T,j as C,k as S,l as D,m as I,n as M,o as N,p as O,t as h,u,v as P,w as R,x as v,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-BnGxP2qu.js";import{i as $}from"../chunks/shared-BnGxP2qu.js";a({entry:"templates/prototype.js",templates:["prototype"],register:()=>{e(),t(),Z()}});export{s as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,n as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,p as FRAMEWORK_VERSION,c as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,y as assertNever,g as buildAgentBrief,A as commentActionSchema,E as commentBody,T as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,M as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,P as entityDedupeKey,R as formatHash,v as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,$ as prototype,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
1
+ import{s as a,q as e,r as t}from"../chunks/shared-BDka-8DG.js";import{C as s,a as o,D as r,b as n,c as i,E as m,F as p,M as c,T as l,W as f,d,e as y,f as g,g as A,h as E,i as T,j as C,k as S,l as D,m as I,n as M,o as N,p as O,t as h,u,v as P,w as R,x as v,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-BWk3i0ft.js";import{i as $}from"../chunks/shared-BWk3i0ft.js";a({entry:"templates/prototype.js",templates:["prototype"],register:()=>{e(),t(),Z()}});export{s as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,n as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,p as FRAMEWORK_VERSION,c as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,y as assertNever,g as buildAgentBrief,A as commentActionSchema,E as commentBody,T as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,M as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,P as entityDedupeKey,R as formatHash,v as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,$ as prototype,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as l,T as p,W as d,d as f,e as g,f as A,g as E,h as y,i as T,j as C,k as S,l as D,m as I,n as M,o as N,p as O,t as h,u,v as R,w as v,x as P,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-B_MRyp8K.js";import{i as $}from"../chunks/shared-B_MRyp8K.js";a({entry:"templates/slides.js",templates:["slides"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,d as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,M as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,R as entityDedupeKey,v as formatHash,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,$ as slides,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as l,T as p,W as d,d as f,e as g,f as A,g as E,h as y,i as T,j as C,k as S,l as D,m as I,n as M,o as N,p as O,t as h,u,v as R,w as v,x as P,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-CqjOqXJ3.js";import{i as $}from"../chunks/shared-CqjOqXJ3.js";a({entry:"templates/slides.js",templates:["slides"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,d as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,M as defaultStorage,N as defaultStorageKey,O as defineAction,h as derive,u as draftActionEnvelopeSchema,R as entityDedupeKey,v as formatHash,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,$ as slides,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as r,b as n,c as i,E as m,F as c,M as p,T as d,W as l,d as f,e as g,f as A,g as E,h as T,i as y,j as C,k as S,l as D,m as I,n as k,o as M,p as N,t as O,u as h,v as u,w as R,x as v,y as P,z as K,A as b,B,G as w,H as _,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-DG16QEdg.js";import{i as $}from"../chunks/shared-DG16QEdg.js";a({entry:"templates/task-board.js",templates:["task-board"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,n as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,d as TemplateElement,l as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,T as commentBody,y as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,k as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,u as entityDedupeKey,R as formatHash,v as iconArrowDown,P as iconArrowUp,K as iconClose,b as iconComment,B as iconGrip,w as iconLink,_ as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,$ as taskBoard,Q as toTarget,X as tokens};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as r,b as n,c as i,E as m,F as c,M as p,T as d,W as l,d as f,e as g,f as A,g as E,h as T,i as y,j as C,k as S,l as D,m as I,n as k,o as M,p as N,t as O,u as h,v as u,w as R,x as v,y as P,z as K,A as b,B,G as w,H as _,I as F,J as G,K as H,L as V,N as W,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-DRzfRsiJ.js";import{i as $}from"../chunks/shared-DRzfRsiJ.js";a({entry:"templates/task-board.js",templates:["task-board"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,n as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,d as TemplateElement,l as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,T as commentBody,y as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,k as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,u as entityDedupeKey,R as formatHash,v as iconArrowDown,P as iconArrowUp,K as iconClose,b as iconComment,B as iconGrip,w as iconLink,_ as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,V as liveActions,W as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,$ as taskBoard,Q as toTarget,X as tokens};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as p,T as l,W as f,d,e as g,f as A,g as E,h as y,i as T,j as C,k as u,l as S,m as D,n as I,o as M,p as N,t as O,u as h,v as R,w as v,x as P,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as U,N as V,O as W,P as j,Q as x,R as z,S as L,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-DmOHk6B_.js";import{i as $}from"../chunks/shared-DmOHk6B_.js";a({entry:"templates/usm.js",templates:["usm"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,u as createActionId,S as createEntityId,D as dedupeKeyOf,I as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,R as entityDedupeKey,v as formatHash,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,U as liveActions,V as parseHash,W as parseTargetRef,j as parseTemplateAction,x as patchNavigation,z as payloadFor,L as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens,$ as usm};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as n,b as r,c as i,E as m,F as c,M as p,T as l,W as f,d,e as g,f as A,g as E,h as y,i as T,j as C,k as u,l as S,m as D,n as I,o as M,p as N,t as O,u as h,v as R,w as v,x as P,y as K,z as k,A as w,B as _,G as b,H as B,I as F,J as G,K as H,L as U,N as V,O as W,P as j,Q as x,R as z,S as L,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-D1W4I3eq.js";import{i as $}from"../chunks/shared-D1W4I3eq.js";a({entry:"templates/usm.js",templates:["usm"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,n as DpkComponentCommentPanel,r as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,C as controls,u as createActionId,S as createEntityId,D as dedupeKeyOf,I as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,R as entityDedupeKey,v as formatHash,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,_ as iconGrip,b as iconLink,B as iconMove,F as iconPencil,G as iconPlus,H as iconTrash,U as liveActions,V as parseHash,W as parseTargetRef,j as parseTemplateAction,x as patchNavigation,z as payloadFor,L as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens,$ as usm};
@@ -1 +1 @@
1
- import{s as a,q as e,r as s}from"../chunks/shared-CjhDJ2vV.js";import{C as t,a as o,D as r,b as n,c as i,E as m,F as c,M as p,T as d,W as l,d as f,e as g,f as A,g as E,h as y,i as T,j as h,k as C,l as S,m as D,n as I,o as M,p as N,t as O,u,v as R,w as b,x as v,y as w,z as P,A as K,B as k,G as W,H as _,I as B,J as F,K as G,L as H,N as V,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-CjhDJ2vV.js";import{d as Z}from"../chunks/shared-XCFMpX43.js";import{i as $}from"../chunks/shared-XCFMpX43.js";a({entry:"templates/whiteboard.js",templates:["whiteboard"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,n as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,d as TemplateElement,l as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,h as controls,C as createActionId,S as createEntityId,D as dedupeKeyOf,I as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,u as draftActionEnvelopeSchema,R as entityDedupeKey,b as formatHash,v as iconArrowDown,w as iconArrowUp,P as iconClose,K as iconComment,k as iconGrip,W as iconLink,_ as iconMove,B as iconPencil,F as iconPlus,G as iconTrash,H as liveActions,V as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens,$ as whiteboard};
1
+ import{s as a,q as e,r as s}from"../chunks/shared-BDka-8DG.js";import{C as t,a as o,D as r,b as n,c as i,E as m,F as c,M as p,T as d,W as l,d as f,e as g,f as A,g as E,h as y,i as T,j as h,k as C,l as S,m as D,n as I,o as M,p as N,t as O,u,v as R,w as b,x as v,y as w,z as P,A as K,B as k,G as W,H as _,I as B,J as F,K as G,L as H,N as V,O as j,P as x,Q as z,R as L,S as U,U as Y,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BDka-8DG.js";import{d as Z}from"../chunks/shared-BZK_cqqQ.js";import{i as $}from"../chunks/shared-BZK_cqqQ.js";a({entry:"templates/whiteboard.js",templates:["whiteboard"],register:()=>{e(),s(),Z()}});export{t as COMMENT_ACTION,o as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,n as DpkComponentInlineEdit,i as DraftController,m as EMPTY_NAVIGATION,c as FRAMEWORK_VERSION,p as MemoryDraftStorage,d as TemplateElement,l as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,y as commentBody,T as commentTargetKey,h as controls,C as createActionId,S as createEntityId,D as dedupeKeyOf,I as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,u as draftActionEnvelopeSchema,R as entityDedupeKey,b as formatHash,v as iconArrowDown,w as iconArrowUp,P as iconClose,K as iconComment,k as iconGrip,W as iconLink,_ as iconMove,B as iconPencil,F as iconPlus,G as iconTrash,H as liveActions,V as parseHash,j as parseTargetRef,x as parseTemplateAction,z as patchNavigation,L as payloadFor,U as serializeDraft,Y as slugify,q as targetRef,J as targetSchema,Q as toTarget,X as tokens,$ as whiteboard};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-process-kit",
3
- "version": "0.0.17",
3
+ "version": "0.1.0",
4
4
  "description": "Web Components for single-file HTML pages that a human reviews in the browser, with a structured draft/feedback loop back to an agent.",
5
5
  "keywords": [
6
6
  "agent",
@@ -30,7 +30,6 @@
30
30
  "./templates/usm": "./dist/templates/usm.js",
31
31
  "./templates/event-storming": "./dist/templates/event-storming.js",
32
32
  "./templates/example-mapping": "./dist/templates/example-mapping.js",
33
- "./templates/grill": "./dist/templates/grill.js",
34
33
  "./templates/plain": "./dist/templates/plain.js",
35
34
  "./templates/slides": "./dist/templates/slides.js",
36
35
  "./templates/task-board": "./dist/templates/task-board.js",