dev-process-kit 0.0.8 → 0.0.9

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 (34) hide show
  1. package/README.md +1 -0
  2. package/dist/chunks/shared-7qenhU4J.js +2173 -0
  3. package/dist/chunks/{shared-Dn4XK7mS.js → shared-8lYUcRvS.js} +25 -15
  4. package/dist/chunks/shared-BHGClRU3.js +29 -0
  5. package/dist/chunks/{shared-DNk3phV5.js → shared-BIdQ89rB.js} +1 -1
  6. package/dist/chunks/{shared-BTlCV660.js → shared-BOFIcKZe.js} +8 -8
  7. package/dist/chunks/shared-Cia5FdOF.js +1112 -0
  8. package/dist/chunks/shared-D4czF1TI.js +1252 -0
  9. package/dist/chunks/{shared-DEdm-PCj.js → shared-D6Yx-euS.js} +2 -2
  10. package/dist/chunks/{shared-CwwZhA40.js → shared-Dkx_2Lbf.js} +336 -268
  11. package/dist/chunks/shared-Dn5j0MCU.js +1 -0
  12. package/dist/chunks/{shared-CupreHTH.js → shared-SGSKyTNs.js} +7 -7
  13. package/dist/chunks/shared-U2T3astJ.js +1094 -0
  14. package/dist/chunks/shared-nW8tfMgg.js +556 -0
  15. package/dist/chunks/{shared-CaLe76va.js → shared-p8037r6P.js} +2 -2
  16. package/dist/components.js +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/templates/delegation-poker.js +1 -1
  19. package/dist/templates/event-storming.js +1 -1
  20. package/dist/templates/example-mapping.js +1 -1
  21. package/dist/templates/grill.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 -0
  28. package/package.json +3 -2
  29. package/dist/chunks/shared-1AA-0t4O.js +0 -29
  30. package/dist/chunks/shared-BAePwoKi.js +0 -679
  31. package/dist/chunks/shared-BYZoeQ97.js +0 -1963
  32. package/dist/chunks/shared-CSV1HkB2.js +0 -1
  33. package/dist/chunks/shared-Csmm_KdH.js +0 -761
  34. package/dist/chunks/shared-VNSWugEg.js +0 -556
@@ -1,4 +1,4 @@
1
- import{a9 as se,ae as le,aa as v,ab as E,ac as D,at as w,av as l,ad as p,af as A,ag as L,q as y,an as f,v as ce,P as pe,f as R,_ as ue,V as B,R as $,aw as ge,ax as me,a1 as c,A as ve,a2 as s,a3 as ye,ay as be,K as ke,az as he,aA as fe,a0 as $e,T as z,m as xe}from"./shared-BYZoeQ97.js";const b=[1,2,3,4,5,6,7],k=le(b,"a delegation level is an integer from 1 to 7"),h=A(p(),L(1)),Ee=v({player:h,level:k,reason:l(p())}),K=v({title:l(p()),parties:l(v({delegator:l(h),delegate:l(h)})),players:E(D(v({id:w,name:h})),[]),decisions:E(D(v({id:w,name:h,description:l(p()),cards:E(D(Ee),[]),agreed:l(k)})),[])}),F=e=>{const a=se(K,e),r=new Set;for(const o of a.players){if(r.has(o.id))throw new Error(`duplicate id "${o.id}" in players`);r.add(o.id)}const t=new Set;for(const o of a.decisions){if(t.has(o.id))throw new Error(`duplicate id "${o.id}" in decisions`);t.add(o.id);const i=new Set;for(const n of o.cards){if(!r.has(n.player))throw new Error(`decision "${o.id}" has a card from unknown player "${n.player}"`);if(i.has(n.player))throw new Error(`player "${n.player}" played more than one card on decision "${o.id}"`);i.add(n.player)}}return a},M=()=>({players:[],decisions:[]}),u=(e,a)=>{if(a!==void 0)return e.decisions.find(r=>r.id===a)},V=(e,a)=>e.players.find(r=>r.id===a),C=e=>[...e.players.map(a=>a.id),...e.decisions.map(a=>a.id)],x="delegation-poker",g={PLAY_CARD:y("PLAY_CARD","decision",v({level:k})),AGREE_LEVEL:y("AGREE_LEVEL","decision",f({level:k})),ADD_DECISION:y("ADD_DECISION","page",f({id:w,name:A(p(),L(1)),description:l(p())}),{dedupeKey:ce}),SET_DECISION_NAME:y("SET_DECISION_NAME","decision",f({name:A(p(),L(1))})),DELETE_DECISION:y("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:{}})},j=(e,a)=>{const r=pe(g,a);if(r===null)return null;const t=r.target.id;switch(r.type){case"PLAY_CARD":return T(e,t,o=>({...o,yours:r.payload.level}));case"AGREE_LEVEL":return T(e,t,o=>({...o,agreed:r.payload.level}));case"ADD_DECISION":{const o=r.payload;return e.decisions.some(i=>i.id===o.id)?e:C(e).includes(o.id)?null:{...e,decisions:[...e.decisions,{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description},cards:[]}]}}case"SET_DECISION_NAME":return T(e,t,o=>({...o,name:r.payload.name}));case"DELETE_DECISION":return e.decisions.some(o=>o.id===t)?{...e,decisions:e.decisions.filter(o=>o.id!==t)}:null;default:return R(r)}},T=(e,a,r)=>e.decisions.some(t=>t.id===a)?{...e,decisions:e.decisions.map(t=>t.id===a?r(t):t)}:null,q={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"},De={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`},we={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=>q[e],levelPhrase:(e,a,r)=>De[e](a,r),levelLabel:e=>`${e} ${q[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)=>we[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,G=(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,Ce=(e,a,r)=>[...r.yours===void 0?[]:[{label:e.you,kind:"you",level:r.yours}],...r.cards.map(o=>({label:V(a,o.player)?.name??o.player,kind:"player",level:o.level,...o.reason===void 0?{}:{reason:o.reason}}))],Te=(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,t)=>{const o=Ce(e,a,t),i=H(t)?o:[];return{id:t.id,name:t.name,...t.description===void 0?{}:{description:t.description},status:Te(t,o),hidden:H(t)?0:t.cards.length,...t.agreed===void 0?{}:{agreed:t.agreed},locked:P(r,t),cells:b.map(n=>({level:n,chips:i.filter(d=>d.level===n).map(({level:d,...de})=>de),yours:t.yours===n,agreed:t.agreed===n}))}},I=(e,a,r)=>{const{delegator:t,delegate:o}=N(e,a);return{levels:b.map(i=>({level:i,name:e.levelName(i),label:e.levelLabel(i),phrase:e.levelPhrase(i,t,o)})),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 t=r===void 0?"":e.levelLabel(r);return a===void 0?e.arrowTo(t):e.arrowFrom(e.levelLabel(a),t)},_e=(e,a,r)=>a===void 0?e.quotedArrowTo(r):e.quotedArrowFrom(a,r),U={PLAY_CARD:(e,a,r)=>{const t=$(g.PLAY_CARD,a);return{title:e.cardPlayedTitle,tone:"update",body:J(e,u(r,a.target.id)?.yours,t.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,t)=>{let o;try{const i=Object.hasOwn(U,a.type)?U[a.type]:void 0;o=i?i(e,a,t??r):{title:a.type,tone:"meta"}}catch{o={title:a.type,tone:"meta"}}return{title:o.title,targetLabel:X(e,r,a.target),tone:o.tone,...o.body===void 0?{}:{summary:o.body}}},Q=e=>`${e.type} ${B(e.target)} ${JSON.stringify(e.payload)}`,X=(e,a,r)=>{switch(r.type){case"decision":{const t=u(a,r.id);return t?`${e.decisionKind} \xB7 ${t.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(t=>({value:B({type:"decision",id:t.id}),label:t.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:F,emptyBase:M,actions:g,apply:j,hasTarget:ae,describe:(r,t,o)=>W(a,r,t,o),serialize:Q,resolveNavigation:ee,commentTargets:(r,t)=>Z(a,r),title:O}},te="dev-process-kit:delegation-poker:skip-strict-confirm",oe=e=>e===!0?!0:null,Pe=e=>{const a=e?ge(oe):me(oe);return{read:()=>a.read(te)===!0,remember:()=>a.write(te,!0)}},Ne=(e,a,r,t)=>s`
1
+ import{ab as se,ag as le,ac as v,ad as D,ae as E,aw as w,ay as l,af as p,ah as A,ai as C,p as y,aq as f,v as ce,P as pe,e as R,a0 as ue,V as B,R as $,az as ge,aA as me,a3 as c,A as ve,a4 as s,a5 as ye,aB as be,K as ke,aC as he,aD as fe,a2 as $e,T as z,l as xe}from"./shared-7qenhU4J.js";const b=[1,2,3,4,5,6,7],k=le(b,"a delegation level is an integer from 1 to 7"),h=A(p(),C(1)),De=v({player:h,level:k,reason:l(p())}),K=v({title:l(p()),parties:l(v({delegator:l(h),delegate:l(h)})),players:D(E(v({id:w,name:h})),[]),decisions:D(E(v({id:w,name:h,description:l(p()),cards:D(E(De),[]),agreed:l(k)})),[])}),F=e=>{const a=se(K,e),r=new Set;for(const o of a.players){if(r.has(o.id))throw new Error(`duplicate id "${o.id}" in players`);r.add(o.id)}const t=new Set;for(const o of a.decisions){if(t.has(o.id))throw new Error(`duplicate id "${o.id}" in decisions`);t.add(o.id);const i=new Set;for(const n of o.cards){if(!r.has(n.player))throw new Error(`decision "${o.id}" has a card from unknown player "${n.player}"`);if(i.has(n.player))throw new Error(`player "${n.player}" played more than one card on decision "${o.id}"`);i.add(n.player)}}return a},M=()=>({players:[],decisions:[]}),u=(e,a)=>{if(a!==void 0)return e.decisions.find(r=>r.id===a)},V=(e,a)=>e.players.find(r=>r.id===a),L=e=>[...e.players.map(a=>a.id),...e.decisions.map(a=>a.id)],x="delegation-poker",g={PLAY_CARD:y("PLAY_CARD","decision",v({level:k})),AGREE_LEVEL:y("AGREE_LEVEL","decision",f({level:k})),ADD_DECISION:y("ADD_DECISION","page",f({id:w,name:A(p(),C(1)),description:l(p())}),{dedupeKey:ce}),SET_DECISION_NAME:y("SET_DECISION_NAME","decision",f({name:A(p(),C(1))})),DELETE_DECISION:y("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:{}})},j=(e,a)=>{const r=pe(g,a);if(r===null)return null;const t=r.target.id;switch(r.type){case"PLAY_CARD":return T(e,t,o=>({...o,yours:r.payload.level}));case"AGREE_LEVEL":return T(e,t,o=>({...o,agreed:r.payload.level}));case"ADD_DECISION":{const o=r.payload;return e.decisions.some(i=>i.id===o.id)?e:L(e).includes(o.id)?null:{...e,decisions:[...e.decisions,{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description},cards:[]}]}}case"SET_DECISION_NAME":return T(e,t,o=>({...o,name:r.payload.name}));case"DELETE_DECISION":return e.decisions.some(o=>o.id===t)?{...e,decisions:e.decisions.filter(o=>o.id!==t)}:null;default:return R(r)}},T=(e,a,r)=>e.decisions.some(t=>t.id===a)?{...e,decisions:e.decisions.map(t=>t.id===a?r(t):t)}:null,q={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`},we={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"},Ce={"to-play":"\u30AB\u30FC\u30C9\u5F85\u3061",discuss:"\u8981\u8B70\u8AD6",consensus:"\u4E00\u81F4",agreed:"\u5408\u610F\u6E08\u307F"},S=ue({en:{levelName:e=>q[e],levelPhrase:(e,a,r)=>Ee[e](a,r),levelLabel:e=>`${e} ${q[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)=>we[e](a,r),levelLabel:e=>`${e} ${Y[e]}`,statusLabel:e=>Ce[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,G=(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,Le=(e,a,r)=>[...r.yours===void 0?[]:[{label:e.you,kind:"you",level:r.yours}],...r.cards.map(o=>({label:V(a,o.player)?.name??o.player,kind:"player",level:o.level,...o.reason===void 0?{}:{reason:o.reason}}))],Te=(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,t)=>{const o=Le(e,a,t),i=H(t)?o:[];return{id:t.id,name:t.name,...t.description===void 0?{}:{description:t.description},status:Te(t,o),hidden:H(t)?0:t.cards.length,...t.agreed===void 0?{}:{agreed:t.agreed},locked:P(r,t),cells:b.map(n=>({level:n,chips:i.filter(d=>d.level===n).map(({level:d,...de})=>de),yours:t.yours===n,agreed:t.agreed===n}))}},I=(e,a,r)=>{const{delegator:t,delegate:o}=N(e,a);return{levels:b.map(i=>({level:i,name:e.levelName(i),label:e.levelLabel(i),phrase:e.levelPhrase(i,t,o)})),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 t=r===void 0?"":e.levelLabel(r);return a===void 0?e.arrowTo(t):e.arrowFrom(e.levelLabel(a),t)},_e=(e,a,r)=>a===void 0?e.quotedArrowTo(r):e.quotedArrowFrom(a,r),U={PLAY_CARD:(e,a,r)=>{const t=$(g.PLAY_CARD,a);return{title:e.cardPlayedTitle,tone:"update",body:J(e,u(r,a.target.id)?.yours,t.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,t)=>{let o;try{const i=Object.hasOwn(U,a.type)?U[a.type]:void 0;o=i?i(e,a,t??r):{title:a.type,tone:"meta"}}catch{o={title:a.type,tone:"meta"}}return{title:o.title,targetLabel:X(e,r,a.target),tone:o.tone,...o.body===void 0?{}:{summary:o.body}}},Q=e=>`${e.type} ${B(e.target)} ${JSON.stringify(e.payload)}`,X=(e,a,r)=>{switch(r.type){case"decision":{const t=u(a,r.id);return t?`${e.decisionKind} \xB7 ${t.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(t=>({value:B({type:"decision",id:t.id}),label:t.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:F,emptyBase:M,actions:g,apply:j,hasTarget:ae,describe:(r,t,o)=>W(a,r,t,o),serialize:Q,resolveNavigation:ee,commentTargets:(r,t)=>Z(a,r),title:O}},te="dev-process-kit:delegation-poker:skip-strict-confirm",oe=e=>e===!0?!0:null,Pe=e=>{const a=e?ge(oe):me(oe);return{read:()=>a.read(te)===!0,remember:()=>a.write(te,!0)}},Ne=(e,a,r,t)=>s`
2
2
  <button
3
3
  class="dpk-icon-btn"
4
4
  type="button"
@@ -573,4 +573,4 @@ import{a9 as se,ae as le,aa as v,ab as E,ac as D,at as w,av as l,ad as p,af as A
573
573
  .empty .dpk-btn {
574
574
  justify-self: start;
575
575
  }
576
- `;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),t=this.#r(a,r),o={context:a,handlers:t,m:r,mode:_(this.mode)},i=a.state.decisions.length===0?Oe(o):Re(o);return{header:Ie(o),main:s`${i}${Me(r,this.pending,this.#t(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:(t,o)=>{const i=a.state.decisions.find(d=>d.id===t);if(i===void 0)return;const n=G(_(this.mode),i,this.skipConfirm);switch(n.kind){case"play":a.dispatch(m.playCard(t,o));return;case"confirm":this.pending={decisionId:t,decisionName:i.name,level:o,skip:!1},this.#e="dialog";return;case"locked":return;default:R(n)}},agree:(t,o)=>{a.dispatch(m.agreeLevel(t,o))},addDecision:()=>{const t=xe("decision",C(a.state));a.dispatch(m.addDecision(t,r.newDecision))},rename:(t,o)=>{a.dispatch(m.setDecisionName(t,o))},deleteDecision:t=>{a.dispatch(m.deleteDecision(t))},comment:t=>this.requestComment(t)}}#t(a){const r=t=>{this.pending=null,this.#e={decisionId:t.decisionId,level:t.level}};return{toggleSkip:t=>{this.pending!==null&&(this.pending={...this.pending,skip:t})},confirm:()=>{const t=this.pending;t!==null&&(t.skip&&(this.#a?.remember(),this.skipConfirm=!0),a.dispatch(m.playCard(t.decisionId,t.level)),r(t))},cancel:()=>{this.pending!==null&&r(this.pending)}}}}const ne=()=>{customElements.get("dpk-template-delegation-poker")||customElements.define("dpk-template-delegation-poker",ie)},je=Object.freeze(Object.defineProperty({__proto__:null,DELEGATION_LEVELS:b,DELEGATION_POKER_PAGE:x,DpkTemplateDelegationPoker:ie,allDelegationPokerIds:C,applyDelegationPokerAction:j,defineDelegationPokerElement:ne,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:M,findDecision:u,findPlayer:V,isLocked:P,parseDelegationPokerBase:F,parsePlayMode:_,playIntent:G,presentBoard:I,resolveDelegationPokerNavigation:ee,serializeDelegationPokerAction:Q},Symbol.toStringTag,{value:"Module"}));export{ne as d,je as i};
576
+ `;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),t=this.#r(a,r),o={context:a,handlers:t,m:r,mode:_(this.mode)},i=a.state.decisions.length===0?Oe(o):Re(o);return{header:Ie(o),main:s`${i}${Me(r,this.pending,this.#t(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:(t,o)=>{const i=a.state.decisions.find(d=>d.id===t);if(i===void 0)return;const n=G(_(this.mode),i,this.skipConfirm);switch(n.kind){case"play":a.dispatch(m.playCard(t,o));return;case"confirm":this.pending={decisionId:t,decisionName:i.name,level:o,skip:!1},this.#e="dialog";return;case"locked":return;default:R(n)}},agree:(t,o)=>{a.dispatch(m.agreeLevel(t,o))},addDecision:()=>{const t=xe("decision",L(a.state));a.dispatch(m.addDecision(t,r.newDecision))},rename:(t,o)=>{a.dispatch(m.setDecisionName(t,o))},deleteDecision:t=>{a.dispatch(m.deleteDecision(t))},comment:t=>this.requestComment(t)}}#t(a){const r=t=>{this.pending=null,this.#e={decisionId:t.decisionId,level:t.level}};return{toggleSkip:t=>{this.pending!==null&&(this.pending={...this.pending,skip:t})},confirm:()=>{const t=this.pending;t!==null&&(t.skip&&(this.#a?.remember(),this.skipConfirm=!0),a.dispatch(m.playCard(t.decisionId,t.level)),r(t))},cancel:()=>{this.pending!==null&&r(this.pending)}}}}const ne=()=>{customElements.get("dpk-template-delegation-poker")||customElements.define("dpk-template-delegation-poker",ie)},je=Object.freeze(Object.defineProperty({__proto__:null,DELEGATION_LEVELS:b,DELEGATION_POKER_PAGE:x,DpkTemplateDelegationPoker:ie,allDelegationPokerIds:L,applyDelegationPokerAction:j,defineDelegationPokerElement:ne,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:M,findDecision:u,findPlayer:V,isLocked:P,parseDelegationPokerBase:F,parsePlayMode:_,playIntent:G,presentBoard:I,resolveDelegationPokerNavigation:ee,serializeDelegationPokerAction:Q},Symbol.toStringTag,{value:"Module"}));export{ne as d,je as i};
@@ -1 +1 @@
1
- import{r as a}from"./chunks/shared-CwwZhA40.js";import{D as s,a as n,b as t,c as o,d as r,e as i,f as p,g as m,h as c,i as d,j as D,k as f,l,m as g,n as C,o as S,p as A,q as M,s as u,t as E,u as k,v as h}from"./chunks/shared-CwwZhA40.js";import{a as y,F as e}from"./chunks/shared-BYZoeQ97.js";import{C as T,b as I,D as v,c as K,d as N,E as O,M as b,T as R,W as P,e as q,f as F,g as G,h as w,i as _,j,k as B,l as H,m as V,n as W,o as x,p as z,q as L,r as U,s 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 Ma,Z as ua}from"./chunks/shared-BYZoeQ97.js";a(),y(e,[]);export{T as COMMENT_ACTION,I as COMMENT_DESCRIPTOR,s as DpkComponentArchitectureMap,v as DpkComponentCommentPanel,n as DpkComponentDependencyGraph,t as DpkComponentErDiagram,o as DpkComponentFormalSpec,K as DpkComponentInlineEdit,r as DpkComponentKanban,i as DpkComponentMindMap,p as DpkComponentSequenceDiagram,m as DpkComponentStateDiagram,N as DraftController,O as EMPTY_NAVIGATION,e as FRAMEWORK_VERSION,b as MemoryDraftStorage,R as TemplateElement,P as WebStorageDraftStorage,q as appendAction,F as assertNever,G as buildAgentBrief,w as commentActionSchema,_ as commentBody,j as commentTargetKey,B as controls,H as createActionId,V as createEntityId,W as dedupeKeyOf,x as defaultStorage,z as defaultStorageKey,L as defineAction,c as defineArchitectureMap,U as defineCommentPanel,d as defineDependencyGraph,D as defineErDiagram,f as defineFormalSpec,Y as defineInlineEdit,l as defineKanban,g as defineMindMap,C as defineSequenceDiagram,S 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,A as parseFormalSpecData,ca as parseHash,M as parseKanbanData,u as parseMindMapData,E as parseSequenceData,k as parseStateData,da as parseTargetRef,Da as parseTemplateAction,fa as patchNavigation,la as payloadFor,a as registerComponentElements,h as registerDiagramElements,ga as serializeDraft,Ca as slugify,Sa as targetRef,Aa as targetSchema,Ma as toTarget,ua as tokens};
1
+ import{r as a}from"./chunks/shared-Dkx_2Lbf.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-Dkx_2Lbf.js";import{s as y}from"./chunks/shared-7qenhU4J.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-7qenhU4J.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-CwwZhA40.js";import{D as r,a as s,b as m,c as i,d as n,e as p,f as l,g as f,v as d}from"./chunks/shared-CwwZhA40.js";import{a as g,F as a}from"./chunks/shared-BYZoeQ97.js";import{C as E,D,c,d as k,M as C,T as S,W as y,f as M,g as u,i as T,m as v,o as A,p as P,q as N,t as R,v as b,w as h,N as O,O as x,P as B,Q as F,R as I,U as K,V as W}from"./chunks/shared-BYZoeQ97.js";import{d as q}from"./chunks/shared-CaLe76va.js";import{i as G}from"./chunks/shared-CaLe76va.js";import{d as H}from"./chunks/shared-CupreHTH.js";import{i as U}from"./chunks/shared-CupreHTH.js";import{d as V}from"./chunks/shared-VNSWugEg.js";import{i as _}from"./chunks/shared-VNSWugEg.js";import{d as w}from"./chunks/shared-BTlCV660.js";import{i as L}from"./chunks/shared-BTlCV660.js";import{d as Q}from"./chunks/shared-CSV1HkB2.js";import{i as j}from"./chunks/shared-CSV1HkB2.js";import{d as z}from"./chunks/shared-Csmm_KdH.js";import{i as J}from"./chunks/shared-Csmm_KdH.js";import{d as X}from"./chunks/shared-DEdm-PCj.js";import{i as Y}from"./chunks/shared-DEdm-PCj.js";import{d as Z}from"./chunks/shared-Dn4XK7mS.js";import{i as $}from"./chunks/shared-Dn4XK7mS.js";import{d as ee}from"./chunks/shared-BAePwoKi.js";import{i as ae}from"./chunks/shared-BAePwoKi.js";const t=()=>{z(),ee(),H(),V(),w(),Q(),X(),Z(),q()},te=["prototype","usm","event-storming","example-mapping","grill","plain","slides","task-board","delegation-poker"],o=()=>{e(),t(),g(a,te)};o();export{E as COMMENT_ACTION,r as DpkComponentArchitectureMap,D as DpkComponentCommentPanel,s as DpkComponentDependencyGraph,m as DpkComponentErDiagram,i as DpkComponentFormalSpec,c as DpkComponentInlineEdit,n as DpkComponentKanban,p as DpkComponentMindMap,l as DpkComponentSequenceDiagram,f as DpkComponentStateDiagram,k as DraftController,a as FRAMEWORK_VERSION,C as MemoryDraftStorage,S as TemplateElement,y as WebStorageDraftStorage,M as assertNever,u as buildAgentBrief,T as commentBody,v as createEntityId,A as defaultStorage,P as defaultStorageKey,N as defineAction,G as delegationPoker,R as derive,b as entityDedupeKey,U as eventStorming,_ as exampleMapping,h as formatHash,L as grill,O as parseHash,x as parseTargetRef,B as parseTemplateAction,F as patchNavigation,I as payloadFor,j as plain,J as prototype,o as registerAllElements,e as registerComponentElements,d as registerDiagramElements,t as registerTemplateElements,Y as slides,K as slugify,W as targetRef,$ as taskBoard,ae as usm};
1
+ import{r as e}from"./chunks/shared-Dkx_2Lbf.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-Dkx_2Lbf.js";import{s as g,_ as E,$ as D,F as t}from"./chunks/shared-7qenhU4J.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-7qenhU4J.js";import{d as V}from"./chunks/shared-p8037r6P.js";import{i as G}from"./chunks/shared-p8037r6P.js";import{d as H}from"./chunks/shared-SGSKyTNs.js";import{i as U}from"./chunks/shared-SGSKyTNs.js";import{d as j}from"./chunks/shared-nW8tfMgg.js";import{i as q}from"./chunks/shared-nW8tfMgg.js";import{d as L}from"./chunks/shared-BOFIcKZe.js";import{i as Q}from"./chunks/shared-BOFIcKZe.js";import{d as $}from"./chunks/shared-Dn5j0MCU.js";import{i as z}from"./chunks/shared-Dn5j0MCU.js";import{d as J}from"./chunks/shared-Cia5FdOF.js";import{i as X}from"./chunks/shared-Cia5FdOF.js";import{d as Y}from"./chunks/shared-D6Yx-euS.js";import{i as Z}from"./chunks/shared-D6Yx-euS.js";import{d as ee}from"./chunks/shared-8lYUcRvS.js";import{i as ae}from"./chunks/shared-8lYUcRvS.js";import{d as te}from"./chunks/shared-D4czF1TI.js";import{i as oe}from"./chunks/shared-D4czF1TI.js";import{d as re}from"./chunks/shared-U2T3astJ.js";import{i as se}from"./chunks/shared-U2T3astJ.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 +1 @@
1
- import{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as r,c as i,d as m,E as c,M as l,T as p,W as d,e as f,f as g,g as A,h as E,i as T,j as C,k as y,l as D,m as S,n as I,o as u,p as M,q as N,t as O,u as P,v as h,w as k,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 x,P as z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-CaLe76va.js";import{i as $}from"../chunks/shared-CaLe76va.js";e(),s(),Z(),o(a,["delegation-poker"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,i as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,d as WebStorageDraftStorage,f as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,T as commentBody,C as commentTargetKey,y as controls,D as createActionId,S as createEntityId,I as dedupeKeyOf,u as defaultStorage,M as defaultStorageKey,N as defineAction,$ as delegationPoker,O as derive,P as draftActionEnvelopeSchema,h as entityDedupeKey,k 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,x as parseTargetRef,z as parseTemplateAction,L as patchNavigation,U as payloadFor,Y as serializeDraft,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-p8037r6P.js";import{i as $}from"../chunks/shared-p8037r6P.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{r as e,s,a as t,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as o,b as n,D as r,c as i,d as m,E as c,M as p,T as l,W as f,e as d,f as g,g as A,h as E,i as S,j as T,k as C,l as y,m as v,n as D,o as I,p as u,q as M,t as N,u as O,v as h,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 x,P as z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-CupreHTH.js";import{i as $}from"../chunks/shared-CupreHTH.js";e(),s(),Z(),t(a,["event-storming"]);export{o as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,i as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,p as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,S as commentBody,T as commentTargetKey,C as controls,y as createActionId,v as createEntityId,D as dedupeKeyOf,I as defaultStorage,u as defaultStorageKey,M as defineAction,N as derive,O as draftActionEnvelopeSchema,h 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,x as parseTargetRef,z as parseTemplateAction,L as patchNavigation,U as payloadFor,Y as serializeDraft,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-SGSKyTNs.js";import{i as $}from"../chunks/shared-SGSKyTNs.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{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as i,c as r,d as m,E as p,M as c,T as l,W as f,e as d,f as g,g as A,h as E,i as T,j as C,k as y,l as M,m as S,n as D,o as I,p as u,q 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 x,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 z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-VNSWugEg.js";import{i as $}from"../chunks/shared-VNSWugEg.js";e(),s(),Z(),o(a,["example-mapping"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,i as DpkComponentCommentPanel,r as DpkComponentInlineEdit,m as DraftController,p as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,c as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,T as commentBody,C as commentTargetKey,y as controls,M as createActionId,S as createEntityId,D as dedupeKeyOf,I as defaultStorage,u as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,R as entityDedupeKey,$ as exampleMapping,v as formatHash,P as iconArrowDown,K as iconArrowUp,k as iconClose,x 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,z as parseTemplateAction,L as patchNavigation,U as payloadFor,Y as serializeDraft,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-nW8tfMgg.js";import{i as $}from"../chunks/shared-nW8tfMgg.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{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as r,c as i,d as m,E as c,M as l,T as p,W as f,e as d,f as g,g as A,h as E,i as T,j as C,k as y,l as S,m as D,n as I,o as u,p as M,q 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,G as _,H as b,I as B,J as F,K as H,L as V,N as W,O as x,P as z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-BTlCV660.js";import{i as $}from"../chunks/shared-BTlCV660.js";e(),s(),Z(),o(a,["grill"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,i as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,f as WebStorageDraftStorage,d as appendAction,g as assertNever,A as buildAgentBrief,E as commentActionSchema,T as commentBody,C as commentTargetKey,y as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,u as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,R as entityDedupeKey,v as formatHash,$ as grill,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,G as iconGrip,_ as iconLink,b as iconMove,B as iconPencil,F as iconPlus,H as iconTrash,V as liveActions,W as parseHash,x as parseTargetRef,z as parseTemplateAction,L as patchNavigation,U as payloadFor,Y as serializeDraft,j 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-7qenhU4J.js";import{C as t,a as o,D as r,b as n,c as i,E as m,F as l,M as c,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 R,w as v,x as P,y as K,z as k,A as w,B as G,G as _,H as b,I as B,J as F,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-7qenhU4J.js";import{d as Z}from"../chunks/shared-BOFIcKZe.js";import{i as $}from"../chunks/shared-BOFIcKZe.js";a({entry:"templates/grill.js",templates:["grill"],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,l as FRAMEWORK_VERSION,c 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,R as entityDedupeKey,v as formatHash,$ as grill,P as iconArrowDown,K as iconArrowUp,k as iconClose,w as iconComment,G as iconGrip,_ as iconLink,b as iconMove,B as iconPencil,F 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{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as i,c as r,d as m,E as c,M as l,T as p,W as f,e as d,f as A,g,h as E,i as T,j as C,k as y,l as S,m as D,n as I,o as u,p as M,q as N,t as O,u as h,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 x,P as z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-CSV1HkB2.js";import{i as $}from"../chunks/shared-CSV1HkB2.js";e(),s(),Z(),o(a,["plain"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,i as DpkComponentCommentPanel,r as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,l as MemoryDraftStorage,p as TemplateElement,f as WebStorageDraftStorage,d as appendAction,A as assertNever,g as buildAgentBrief,E as commentActionSchema,T as commentBody,C as commentTargetKey,y as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,u as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h 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,x as parseTargetRef,z as parseTemplateAction,L as patchNavigation,U as payloadFor,$ as plain,Y as serializeDraft,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-Dn5j0MCU.js";import{i as $}from"../chunks/shared-Dn5j0MCU.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{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as r,c as i,d as m,E as c,M as p,T as l,W as f,e as d,f as A,g,h as y,i as E,j as T,k as C,l as S,m as D,n as I,o as u,p as M,q as N,t as O,u as h,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 x,P as z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-Csmm_KdH.js";import{i as $}from"../chunks/shared-Csmm_KdH.js";e(),s(),Z(),o(a,["prototype"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,i as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,p as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,A as assertNever,g as buildAgentBrief,y as commentActionSchema,E as commentBody,T as commentTargetKey,C as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,u as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h 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,x as parseTargetRef,z as parseTemplateAction,L as patchNavigation,U as payloadFor,$ as prototype,Y as serializeDraft,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-Cia5FdOF.js";import{i as $}from"../chunks/shared-Cia5FdOF.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{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as i,c as r,d as m,E as c,M as l,T as d,W as p,e as f,f as A,g,h as E,i as T,j as C,k as S,l as y,m as D,n as I,o as u,p as M,q 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 V,N as W,O as x,P as z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-DEdm-PCj.js";import{i as $}from"../chunks/shared-DEdm-PCj.js";e(),s(),Z(),o(a,["slides"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,i as DpkComponentCommentPanel,r as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,l as MemoryDraftStorage,d as TemplateElement,p as WebStorageDraftStorage,f as appendAction,A as assertNever,g as buildAgentBrief,E as commentActionSchema,T as commentBody,C as commentTargetKey,S as controls,y as createActionId,D as createEntityId,I as dedupeKeyOf,u 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,V as liveActions,W as parseHash,x as parseTargetRef,z as parseTemplateAction,L as patchNavigation,U as payloadFor,Y as serializeDraft,$ as slides,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-D6Yx-euS.js";import{i as $}from"../chunks/shared-D6Yx-euS.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{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as r,c as i,d as m,E as c,M as d,T as p,W as l,e as f,f as A,g,h as T,i as E,j as C,k as y,l as S,m as D,n as I,o as u,p as M,q as N,t as O,u as h,v as k,w as R,x as v,y as P,z as K,A as B,B as b,G as w,H as _,I as F,J as G,K as H,L as V,N as W,O as x,P as z,Q as L,R as U,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-Dn4XK7mS.js";import{i as $}from"../chunks/shared-Dn4XK7mS.js";e(),s(),Z(),o(a,["task-board"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,i as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,d as MemoryDraftStorage,p as TemplateElement,l as WebStorageDraftStorage,f as appendAction,A as assertNever,g as buildAgentBrief,T as commentActionSchema,E as commentBody,C as commentTargetKey,y as controls,S as createActionId,D as createEntityId,I as dedupeKeyOf,u as defaultStorage,M as defaultStorageKey,N as defineAction,O as derive,h as draftActionEnvelopeSchema,k 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,x as parseTargetRef,z as parseTemplateAction,L as patchNavigation,U as payloadFor,Y as serializeDraft,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-8lYUcRvS.js";import{i as $}from"../chunks/shared-8lYUcRvS.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{r as e,s,a as o,F as a}from"../chunks/shared-BYZoeQ97.js";import{C as t,b as n,D as r,c as i,d as m,E as c,M as p,T as l,W as f,e as d,f as A,g,h as E,i as T,j as C,k as u,l as y,m as S,n as D,o as I,p as M,q 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 x,Q as z,R as L,S as Y,U as j,V as q,X as J,Y as Q,Z as X}from"../chunks/shared-BYZoeQ97.js";import{d as Z}from"../chunks/shared-BAePwoKi.js";import{i as $}from"../chunks/shared-BAePwoKi.js";e(),s(),Z(),o(a,["usm"]);export{t as COMMENT_ACTION,n as COMMENT_DESCRIPTOR,r as DpkComponentCommentPanel,i as DpkComponentInlineEdit,m as DraftController,c as EMPTY_NAVIGATION,a as FRAMEWORK_VERSION,p as MemoryDraftStorage,l as TemplateElement,f as WebStorageDraftStorage,d as appendAction,A as assertNever,g as buildAgentBrief,E as commentActionSchema,T as commentBody,C as commentTargetKey,u as controls,y 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,x as parseTemplateAction,z as patchNavigation,L as payloadFor,Y as serializeDraft,j 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-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-D4czF1TI.js";import{i as $}from"../chunks/shared-D4czF1TI.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};
@@ -0,0 +1 @@
1
+ import{s as a,q as e,r as s}from"../chunks/shared-7qenhU4J.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-7qenhU4J.js";import{d as Z}from"../chunks/shared-U2T3astJ.js";import{i as $}from"../chunks/shared-U2T3astJ.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.8",
3
+ "version": "0.0.9",
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",
@@ -34,7 +34,8 @@
34
34
  "./templates/plain": "./dist/templates/plain.js",
35
35
  "./templates/slides": "./dist/templates/slides.js",
36
36
  "./templates/task-board": "./dist/templates/task-board.js",
37
- "./templates/delegation-poker": "./dist/templates/delegation-poker.js"
37
+ "./templates/delegation-poker": "./dist/templates/delegation-poker.js",
38
+ "./templates/whiteboard": "./dist/templates/whiteboard.js"
38
39
  },
39
40
  "engines": {
40
41
  "node": ">=24"
@@ -1,29 +0,0 @@
1
- import{_ as Wt,a1 as lt,a2 as K}from"./shared-BYZoeQ97.js";const I=Math.min,S=Math.max,Q=Math.round,Z=Math.floor,$=t=>({x:t,y:t}),Nt={left:"right",right:"left",bottom:"top",top:"bottom"};function Vt(t,e,n){return S(t,I(e,n))}function U(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function Y(t){return t.split("-")[1]}function xt(t){return t==="x"?"y":"x"}function bt(t){return t==="y"?"height":"width"}function k(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function vt(t){return xt(k(t))}function _t(t,e,n){n===void 0&&(n=!1);const o=Y(t),i=vt(t),s=bt(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=tt(r)),[r,tt(r)]}function Ht(t){const e=tt(t);return[at(t),e,at(e)]}function at(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Rt=["left","right"],Ct=["right","left"],Bt=["top","bottom"],zt=["bottom","top"];function It(t,e,n){switch(t){case"top":case"bottom":return n?e?Ct:Rt:e?Rt:Ct;case"left":case"right":return e?Bt:zt;default:return[]}}function Xt(t,e,n,o){const i=Y(t);let s=It(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(at)))),s}function tt(t){const e=_(t);return Nt[e]+t.slice(e.length)}function jt(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function qt(t){return typeof t!="number"?jt(t):{top:t,right:t,bottom:t,left:t}}function et(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function At(t,e,n){let{reference:o,floating:i}=t;const s=k(e),r=vt(e),c=bt(r),l=_(e),a=s==="y",f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}const h=Y(e);return h&&(d[r]+=m*(h==="end"?1:-1)*(n&&a?-1:1)),d}async function Kt(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:d=0}=U(e,t),h=qt(d),w=c[m?u==="floating"?"reference":"floating":u],p=et(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),y=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},C=et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:l}):y);return{top:(p.top-C.top+h.top)/b.y,bottom:(C.bottom-p.bottom+h.bottom)/b.y,left:(p.left-C.left+h.left)/b.x,right:(C.right-p.right+h.right)/b.x}}const Ut=50,Yt=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Kt},l=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=At(a,o,l),m=o,d=0;const h={};for(let g=0;g<s.length;g++){const w=s[g];if(!w)continue;const{name:p,fn:y}=w,{x,y:b,data:C,reset:v}=await y({x:f,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:h,rects:a,platform:c,elements:{reference:t,floating:e}});f=x??f,u=b??u,h[p]={...h[p],...C},v&&d<Ut&&(d++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:f,y:u}=At(a,m,l)),g=-1)}return{x:f,y:u,placement:m,strategy:i,middlewareData:h}},Gt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...w}=U(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=_(i),y=k(c),x=_(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),C=m||(x||!g?[tt(c)]:Ht(c)),v=h!=="none";!m&&v&&C.push(...Xt(c,g,h,b));const P=[c,...C],T=await l.detectOverflow(e,w),W=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&W.push(T[p]),u){const N=_t(i,r,b);W.push(T[N[0]],T[N[1]])}if(O=[...O,{placement:i,overflows:W}],!W.every(N=>N<=0)){var gt,wt;const N=(((gt=s.flip)==null?void 0:gt.index)||0)+1,ct=P[N];if(ct&&(!(u==="alignment"?y!==k(ct):!1)||O.every(A=>k(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:N,overflows:O},reset:{placement:ct}};let q=(wt=O.filter(V=>V.overflows[0]<=0).sort((V,A)=>V.overflows[1]-A.overflows[1])[0])==null?void 0:wt.placement;if(!q)switch(d){case"bestFit":{var yt;const V=(yt=O.filter(A=>{if(v){const M=k(A.placement);return M===y||M==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(M=>M>0).reduce((M,Ft)=>M+Ft,0)]).sort((A,M)=>A[1]-M[1])[0])==null?void 0:yt[0];V&&(q=V);break}case"initialPlacement":q=c;break}if(i!==q)return{reset:{placement:q}}}return{}}}},Jt=new Set(["left","top"]);async function Qt(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=Y(n),l=k(n)==="y",a=Jt.has(r)?-1:1,f=s&&l?-1:1,u=U(e,t);let{mainAxis:m,crossAxis:d,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof h=="number"&&(d=c==="end"?h*-1:h),l?{x:d*f,y:m*a}:{x:m*a,y:d*f}}const Zt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await Qt(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},te=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:y=>{let{x,y:b}=y;return{x,y:b}}},...a}=U(t,e),f={x:n,y:o},u=await s.detectOverflow(e,a),m=k(i),d=xt(m);let h=f[d],g=f[m];const w=(y,x)=>Vt(x+u[y==="y"?"top":"left"],x,x-u[y==="y"?"bottom":"right"]);r&&(h=w(d,h)),c&&(g=w(m,g));const p=l.fn({...e,[d]:h,[m]:g});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[d]:r,[m]:c}}}}}},ee=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:r=()=>{},...c}=U(t,e),l=await i.detectOverflow(e,c),a=_(n),f=Y(n),u=k(n)==="y",{width:m,height:d}=o.floating;let h,g;a==="top"||a==="bottom"?(h=a,g=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=a,h=f==="end"?"top":"bottom");const w=d-l.top-l.bottom,p=m-l.left-l.right,y=I(d-l[h],w),x=I(m-l[g],p),b=e.middlewareData.shift,C=!b;let v=y,P=x;b!=null&&b.enabled.x&&(P=p),b!=null&&b.enabled.y&&(v=w),C&&!f&&(u?P=m-2*S(l.left,l.right):v=d-2*S(l.top,l.bottom)),await r({...e,availableWidth:P,availableHeight:v});const T=await i.getDimensions(s.floating);return m!==T.width||d!==T.height?{reset:{rects:!0}}:{}}}};function nt(){return typeof window<"u"}function X(t){return Ot(t)?(t.nodeName||"").toLowerCase():"#document"}function R(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function D(t){var e;return(e=(Ot(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ot(t){return nt()?t instanceof Node||t instanceof R(t).Node:!1}function L(t){return nt()?t instanceof Element||t instanceof R(t).Element:!1}function F(t){return nt()?t instanceof HTMLElement||t instanceof R(t).HTMLElement:!1}function Lt(t){return!nt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof R(t).ShadowRoot}function ot(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function ne(t){return/^(table|td|th)$/.test(X(t))}function it(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const oe=/transform|translate|scale|rotate|perspective|filter/,ie=/paint|layout|strict|content/,H=t=>!!t&&t!=="none";let ft;function ut(t){const e=L(t)?E(t):t;return H(e.transform)||H(e.translate)||H(e.scale)||H(e.rotate)||H(e.perspective)||!dt()&&(H(e.backdropFilter)||H(e.filter))||oe.test(e.willChange||"")||ie.test(e.contain||"")}function se(t){let e=B(t);for(;F(e)&&!G(e);){if(ut(e))return e;if(it(e))return null;e=B(e)}return null}function dt(){return ft==null&&(ft=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ft}function G(t){return/^(html|body|#document)$/.test(X(t))}function E(t){return R(t).getComputedStyle(t)}function st(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function B(t){if(X(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lt(t)&&t.host||D(t);return Lt(e)?e.host:e}function Et(t){const e=B(t);return G(e)?(t.ownerDocument||t).body:F(e)&&ot(e)?e:Et(e)}function J(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Et(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=R(i);if(s){const c=mt(r);return e.concat(r,r.visualViewport||[],ot(i)?i:[],c&&n?J(c):[])}else return e.concat(i,J(i,[],n))}function mt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Tt(t){const e=E(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=F(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=Q(n)!==s||Q(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function ht(t){return L(t)?t:t.contextElement}function j(t){const e=ht(t);if(!F(e))return $(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Tt(e);let r=(s?Q(n.width):n.width)/o,c=(s?Q(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const re=$(0);function St(t){const e=R(t);return!dt()||!e.visualViewport?re:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ce(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===R(t)}function z(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=ht(t);let r=$(1);e&&(o?L(o)&&(r=j(o)):r=j(t));const c=ce(s,n,o)?St(s):$(0);let l=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,f=i.width/r.x,u=i.height/r.y;if(s&&o){const m=R(s),d=L(o)?R(o):o;let h=m,g=mt(h);for(;g&&d!==h;){const w=j(g),p=g.getBoundingClientRect(),y=E(g),x=p.left+(g.clientLeft+parseFloat(y.paddingLeft))*w.x,b=p.top+(g.clientTop+parseFloat(y.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=x,a+=b,h=R(g),g=mt(h)}}return et({width:f,height:u,x:l,y:a})}function rt(t,e){const n=st(t).scrollLeft;return e?e.left+n:z(D(t)).left+n}function $t(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-rt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function le(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=D(o),c=e?it(e.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=$(1);const f=$(0),u=F(o);if((u||!s)&&((X(o)!=="body"||ot(r))&&(l=st(o)),u)){const d=z(o);a=j(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const m=r&&!u&&!s?$t(r,l):$(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+m.x,y:n.y*a.y-l.scrollTop*a.y+f.y+m.y}}function ae(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function fe(t){const e=st(t),n=t.ownerDocument.body,o=S(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=S(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+rt(t);const r=-e.scrollTop;return E(n).direction==="rtl"&&(s+=S(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const ue=25;function de(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=R(t),s=D(t),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,a=0,f=0;if(r){const m=!dt()||e==="fixed";o?m||(a=-r.offsetLeft,f=-r.offsetTop):(c=r.width,l=r.height,m&&(a=r.offsetLeft,f=r.offsetTop))}if(rt(s)<=0){const m=s.ownerDocument,d=m.body,h=getComputedStyle(d),g=m.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(s.clientWidth-d.clientWidth-g),p=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;p<=ue&&(c-=p)}return{width:c,height:l,x:a,y:f}}function me(t,e){const n=z(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=j(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,a=o*s.y;return{width:r,height:c,x:l,y:a}}function kt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=de(t,n,e);else if(e==="document")o=fe(D(t));else if(L(e))o=me(e,n);else{const i=St(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return et(o)}function he(t,e){const n=e.get(t);if(n)return n;let o=J(t,[],!1).filter(c=>L(c)&&X(c)!=="body"),i=null;const s=E(t).position==="fixed";let r=s?B(t):t;for(;L(r)&&!G(r);){const c=E(r),l=ut(r),a=i?i.position:s?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=B(r)}return e.set(t,o),o}function pe(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?it(e)?[]:he(e,this._c):[].concat(n),o],c=kt(e,r[0],i);let l=c.top,a=c.right,f=c.bottom,u=c.left;for(let m=1;m<r.length;m++){const d=kt(e,r[m],i);l=S(d.top,l),a=I(d.right,a),f=I(d.bottom,f),u=S(d.left,u)}return{width:a-u,height:f-l,x:u,y:l}}function ge(t){const{width:e,height:n}=Tt(t);return{width:e,height:n}}function we(t,e,n){const o=F(e),i=D(e),s=n==="fixed",r=z(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=$(0);if((o||!s)&&((X(e)!=="body"||ot(i))&&(c=st(e)),o)){const m=z(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&i&&(l.x=rt(i));const a=i&&!o&&!s?$t(i,c):$(0),f=r.left+c.scrollLeft-l.x-a.x,u=r.top+c.scrollTop-l.y-a.y;return{x:f,y:u,width:r.width,height:r.height}}function pt(t){return E(t).position==="static"}function Dt(t,e){if(!F(t)||E(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return D(t)===n&&(n=n.ownerDocument.body),n}function Pt(t,e){const n=R(t);if(it(t))return n;if(!F(t)){let i=B(t);for(;i&&!G(i);){if(L(i)&&!pt(i))return i;i=B(i)}return n}let o=Dt(t,e);for(;o&&ne(o)&&pt(o);)o=Dt(o,e);return o&&G(o)&&pt(o)&&!ut(o)?n:o||se(t)||n}const ye=async function(t){const e=this.getOffsetParent||Pt,n=this.getDimensions,o=await n(t.floating);return{reference:we(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function xe(t){return E(t).direction==="rtl"}const be={convertOffsetParentRelativeRectToViewportRelativeRect:le,getDocumentElement:D,getClippingRect:pe,getOffsetParent:Pt,getElementRects:ye,getClientRects:ae,getDimensions:ge,getScale:j,isElement:L,isRTL:xe};function Mt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ve(t,e,n){let o=null,i;const s=D(t);function r(){var f;clearTimeout(i),(f=o)==null||f.disconnect(),o=null}function c(f,u){f===void 0&&(f=!1),u===void 0&&(u=1),r();const m=t.getBoundingClientRect(),{left:d,top:h,width:g,height:w}=m;if(f||e(),!g||!w)return;const p=Z(h),y=Z(s.clientWidth-(d+g)),x=Z(s.clientHeight-(h+w)),b=Z(d),v={rootMargin:-p+"px "+-y+"px "+-x+"px "+-b+"px",threshold:S(0,I(1,u))||1};let P=!0;function T(W){const O=W[0].intersectionRatio;if(!Mt(m,t.getBoundingClientRect()))return c();if(O!==u){if(!P)return c();O?c(!1,O):i=setTimeout(()=>{c(!1,1e-7)},1e3)}P=!1}try{o=new IntersectionObserver(T,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(T,v)}o.observe(t)}const l=R(t),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),r()}}function Re(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=ht(t),f=i||s?[...a?J(a):[],...e?J(e):[]]:[];f.forEach(p=>{i&&p.addEventListener("scroll",n),s&&p.addEventListener("resize",n)});const u=a&&c?ve(a,n,s):null;let m=-1,d=null;r&&(d=new ResizeObserver(p=>{let[y]=p;y&&y.target===a&&d&&e&&(d.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(e)})),n()}),a&&!l&&d.observe(a),e&&d.observe(e));let h,g=l?z(t):null;l&&w();function w(){const p=z(t);g&&!Mt(g,p)&&n(),g=p,h=requestAnimationFrame(w)}return n(),()=>{var p;f.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),u?.(),(p=d)==null||p.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const Ce=Zt,Ae=te,Oe=Gt,Le=ee,Ee=(t,e,n)=>{const o=new Map,i=n??{},s={...be,...i.platform,_c:o};return Yt(t,e,{...i,platform:s})},Te=(t,e)=>({top:e,bottom:e,right:t}),Se=(t,e,n,o={})=>{if(typeof t.showPopover!="function")return()=>{};try{t.showPopover()}catch{return()=>{}}let i=!0,s=0;const r=e instanceof Element?e:{getBoundingClientRect:()=>({x:e.right,y:e.top,left:e.right,right:e.right,top:e.top,bottom:e.bottom,width:0,height:e.bottom-e.top})};t.style.width=`${n.width}px`,t.style.maxHeight=`${n.height}px`;const l=Re(r,t,()=>{const a=++s;Ee(r,t,{strategy:"fixed",placement:o.placement??"bottom-end",middleware:[Ce(8),Oe({padding:8,fallbackAxisSideDirection:"end"}),Ae({padding:8}),Le({padding:8,apply:({availableWidth:f,availableHeight:u})=>{!i||a!==s||(t.style.width=`${Math.max(0,Math.min(n.width,f))}px`,t.style.maxHeight=`${Math.max(0,Math.min(n.height,u))}px`)}})]}).then(({x:f,y:u})=>{!i||a!==s||!t.isConnected||(t.style.left=`${f}px`,t.style.top=`${u}px`)}).catch(()=>{})},{animationFrame:o.trackTransform??!1,elementResize:typeof ResizeObserver<"u",layoutShift:typeof IntersectionObserver<"u"});return()=>{i=!1,l()}};class $e{#e;#t=new Map;constructor(e){this.#e=e,e.addController(this)}hostConnected(){this.#e.requestUpdate()}hostUpdated(){for(const[e,n]of this.#t)e.isConnected||(n(),this.#t.delete(e))}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}open(e,n,o,i){this.#t.get(e)?.(),this.#t.set(e,Se(e,n,o,i))}}const ke=Wt({en:{comment:"Comment",commentOn:t=>`Comment on ${t}`,submit:"Send",cancel:"Cancel"},ja:{comment:"\u30B3\u30E1\u30F3\u30C8",commentOn:t=>`${t}\u3078\u306E\u30B3\u30E1\u30F3\u30C8`,submit:"\u9001\u4FE1",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB"}}),De=(t,e,n={})=>({body:t,notes:e,submission:t.trim()||null,label:n.label??null,error:n.error??null}),Pe=(t,e,n)=>{const o=()=>{e.submission!==null&&n({kind:"comment",body:e.submission})};return K`<div
2
- class="comment-pop"
3
- popover="manual"
4
- role="dialog"
5
- aria-label=${e.label?t.commentOn(e.label):t.comment}
6
- @click=${i=>i.stopPropagation()}
7
- @keydown=${i=>{i.isComposing||i.key!=="Escape"||(i.preventDefault(),i.stopPropagation(),n({kind:"dismiss"}))}}
8
- >
9
- ${e.label?K`<strong class="comment-target">${e.label}</strong>`:lt}
10
- ${e.error?K`<p class="comment-error" role="alert">${e.error}</p>`:lt}
11
- ${e.notes.length?K`<ul class="comment-list">
12
- ${e.notes.map(i=>K`<li>${i}</li>`)}
13
- </ul>`:lt}
14
- <textarea
15
- class="dpk-textarea"
16
- aria-label=${t.comment}
17
- .value=${e.body}
18
- @input=${i=>{i.currentTarget instanceof HTMLTextAreaElement&&n({kind:"input",body:i.currentTarget.value})}}
19
- @keydown=${i=>{i.isComposing||i.key==="Enter"&&(i.ctrlKey||i.metaKey)&&(i.preventDefault(),o())}}
20
- ></textarea>
21
- <div class="pop-actions">
22
- <button class="dpk-btn dpk-btn--accent" type="button" ?disabled=${e.submission===null} @click=${o}>
23
- ${t.submit}
24
- </button>
25
- <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>n({kind:"dismiss"})}>
26
- ${t.cancel}
27
- </button>
28
- </div>
29
- </div>`};export{$e as P,Te as a,ke as c,De as p,Pe as r};