@kubitnodes/stellaris 0.3.23 → 0.3.25

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 (77) hide show
  1. package/dist/cli/index.js +543 -682
  2. package/dist/server/index.js +866 -735
  3. package/package.json +4 -4
  4. package/web/dist/assets/BackLink-UTiLF1J4.js +1 -0
  5. package/web/dist/assets/{Button-f4jgBZY1.js → Button-Cp4cNRUX.js} +1 -1
  6. package/web/dist/assets/ChannelForms-DD2B0tey.js +1 -0
  7. package/web/dist/assets/ChannelView-CY3oG9hZ.js +2 -0
  8. package/web/dist/assets/CitizenView-BNK5ro-6.js +2 -0
  9. package/web/dist/assets/CitizensView-WPQ6Jhl3.js +1 -0
  10. package/web/dist/assets/{CliIcon-CLHaA65A.js → CliIcon-C7bwChMP.js} +1 -1
  11. package/web/dist/assets/CronsView-_pdgwX1I.js +1 -0
  12. package/web/dist/assets/FileTree-jyDUSu7g.js +1 -0
  13. package/web/dist/assets/FileView-DcQvlc8V.js +4 -0
  14. package/web/dist/assets/KnowledgeView-DDl0HQPG.js +1 -0
  15. package/web/dist/assets/Markdown-DT3V-EVe.js +30 -0
  16. package/web/dist/assets/{MessageItem-Bk9eBp1U.js → MessageItem-agtEugfG.js} +1 -1
  17. package/web/dist/assets/MetricsView-DiXyYeWP.js +1 -0
  18. package/web/dist/assets/NeedsYouView-CKmuYan_.js +1 -0
  19. package/web/dist/assets/Overview-CKcTqsMM.js +1 -0
  20. package/web/dist/assets/{Pane-CJYRVkwh.js → Pane-BaM0TdE6.js} +1 -1
  21. package/web/dist/assets/{Picker-DoxCN6C7.js → Picker-C2ig-0dT.js} +1 -1
  22. package/web/dist/assets/ProjectView-T2OHTh5j.js +1 -0
  23. package/web/dist/assets/ProposalView-B5yjTAcn.js +1 -0
  24. package/web/dist/assets/ProposalsView-p4KjwV9p.js +1 -0
  25. package/web/dist/assets/Quota-CfFGIql9.js +1 -0
  26. package/web/dist/assets/RunnersView-DdvwoOur.js +1 -0
  27. package/web/dist/assets/SkillFileList-CgrCnuaC.js +2 -0
  28. package/web/dist/assets/SkillView-Di5Z9h2L.js +1 -0
  29. package/web/dist/assets/SocietyView-BDiVxUC5.js +1 -0
  30. package/web/dist/assets/StickyList-BaV_KZ8x.js +1 -0
  31. package/web/dist/assets/SubjectThread-DD_ZCCnr.js +1 -0
  32. package/web/dist/assets/TaskView-CKcs-MOC.js +3 -0
  33. package/web/dist/assets/TasksView-oZMjncOU.js +1 -0
  34. package/web/dist/assets/{ThreadForms-C846TvtS.js → ThreadForms-CG5Y926b.js} +1 -1
  35. package/web/dist/assets/ThreadItem-D-n2arFA.js +1 -0
  36. package/web/dist/assets/ThreadView-CT9vd0P4.js +1 -0
  37. package/web/dist/assets/citizen-BiHfph2A.js +1 -0
  38. package/web/dist/assets/{compose-BmqQmcZH.js → compose-DY1WL8zB.js} +1 -1
  39. package/web/dist/assets/format-CENiwkJC.js +55 -0
  40. package/web/dist/assets/governance-C6ez5MLh.js +1 -0
  41. package/web/dist/assets/index-CPXALUV6.js +23 -0
  42. package/web/dist/assets/index-DIa8Dlav.css +2 -0
  43. package/web/dist/assets/mentions-BEL5U6ra.js +3 -0
  44. package/web/dist/assets/{tasks-R3YgpYTe.js → tasks-CAI8Eci7.js} +1 -1
  45. package/web/dist/assets/useMatch-CINzyDWa.js +1 -0
  46. package/web/dist/index.html +9 -9
  47. package/web/dist/assets/BackLink-DGYs80bb.js +0 -1
  48. package/web/dist/assets/ChannelForms-q9zdj4p2.js +0 -1
  49. package/web/dist/assets/ChannelView-CGs_aWL3.js +0 -2
  50. package/web/dist/assets/CitizenView-gcIo_sKt.js +0 -2
  51. package/web/dist/assets/CitizensView-DZ7S8vnJ.js +0 -1
  52. package/web/dist/assets/CronsView-1wns6Uwv.js +0 -1
  53. package/web/dist/assets/KnowledgeView-Cxfi2-Pt.js +0 -1
  54. package/web/dist/assets/Markdown-BhtIFcWc.js +0 -30
  55. package/web/dist/assets/MetricsView-CTEH6rJn.js +0 -1
  56. package/web/dist/assets/NeedsYouView-2VNqH2Sb.js +0 -1
  57. package/web/dist/assets/Overview-CS9HCSmm.js +0 -1
  58. package/web/dist/assets/ProjectView-CJ3r4UdN.js +0 -1
  59. package/web/dist/assets/ProposalView-DLn9dNPp.js +0 -2
  60. package/web/dist/assets/ProposalsView-B-cOxTsQ.js +0 -1
  61. package/web/dist/assets/Quota-Bo7UdWTV.js +0 -1
  62. package/web/dist/assets/RunnersView-DlQruhwp.js +0 -1
  63. package/web/dist/assets/SocietyView-Bl4ErnV8.js +0 -1
  64. package/web/dist/assets/StickyList-MVP34ytV.js +0 -1
  65. package/web/dist/assets/SubjectThread-BFFnHxIF.js +0 -1
  66. package/web/dist/assets/TaskFileView-GZ0eQFUb.js +0 -4
  67. package/web/dist/assets/TaskView-DppFelLW.js +0 -3
  68. package/web/dist/assets/TasksView-DDNXzeG4.js +0 -1
  69. package/web/dist/assets/ThreadItem-C8cou6wD.js +0 -1
  70. package/web/dist/assets/ThreadView-DvSGDYoD.js +0 -1
  71. package/web/dist/assets/citizen-B2Dlbcpe.js +0 -1
  72. package/web/dist/assets/format-DT52SbbR.js +0 -55
  73. package/web/dist/assets/governance-Cr5OlQnw.js +0 -1
  74. package/web/dist/assets/index-BTVy_xFF.js +0 -23
  75. package/web/dist/assets/index-DzV6CCnG.css +0 -2
  76. package/web/dist/assets/mentions-D5hNgtg6.js +0 -3
  77. package/web/dist/assets/useMatch-pEF6RJ6Q.js +0 -1
@@ -1,30 +0,0 @@
1
- import{Gn as e,Hn as t,Kn as n,L as r,Un as i,W as a,Wn as o,ct as s,qt as c}from"./format-DT52SbbR.js";import{b as l,g as u,x as d,y as f}from"./index-BTVy_xFF.js";import{a as p,c as m,d as h,i as g,l as _,o as ee,r as v,s as y,t as te,u as b}from"./mentions-D5hNgtg6.js";function ne(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function x(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&y(e.charCodeAt(n+1))&&y(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function re(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ie=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ae=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S={};function C(e,t){return((t||S).jsx?ae:ie).test(e)}var oe=/[ \t\n\f\r]/g;function se(e){return typeof e==`object`?e.type===`text`&&ce(e.value):ce(e)}function ce(e){return e.replace(oe,``)===``}var w=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};w.prototype.normal={},w.prototype.property={},w.prototype.space=void 0;function le(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new w(n,r,t)}function T(e){return e.toLowerCase()}var E=class{constructor(e,t){this.attribute=t,this.property=e}};E.prototype.attribute=``,E.prototype.booleanish=!1,E.prototype.boolean=!1,E.prototype.commaOrSpaceSeparated=!1,E.prototype.commaSeparated=!1,E.prototype.defined=!1,E.prototype.mustUseProperty=!1,E.prototype.number=!1,E.prototype.overloadedBoolean=!1,E.prototype.property=``,E.prototype.spaceSeparated=!1,E.prototype.space=void 0;var D=e({boolean:()=>O,booleanish:()=>k,commaOrSpaceSeparated:()=>N,commaSeparated:()=>M,number:()=>A,overloadedBoolean:()=>de,spaceSeparated:()=>j}),ue=0,O=P(),k=P(),de=P(),A=P(),j=P(),M=P(),N=P();function P(){return 2**++ue}var F=Object.keys(D),I=class extends E{constructor(e,t,n,r){let i=-1;if(super(e,t),fe(this,`space`,r),typeof n==`number`)for(;++i<F.length;){let e=F[i];fe(this,F[i],(n&D[e])===D[e])}}};I.prototype.defined=!0;function fe(e,t,n){n&&(e[t]=n)}function L(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new I(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[T(r)]=r,n[T(a.attribute)]=r}return new w(t,n,e.space)}var pe=L({properties:{ariaActiveDescendant:null,ariaAtomic:k,ariaAutoComplete:null,ariaBusy:k,ariaChecked:k,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:j,ariaCurrent:null,ariaDescribedBy:j,ariaDetails:null,ariaDisabled:k,ariaDropEffect:j,ariaErrorMessage:null,ariaExpanded:k,ariaFlowTo:j,ariaGrabbed:k,ariaHasPopup:null,ariaHidden:k,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:j,ariaLevel:A,ariaLive:null,ariaModal:k,ariaMultiLine:k,ariaMultiSelectable:k,ariaOrientation:null,ariaOwns:j,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:k,ariaReadOnly:k,ariaRelevant:null,ariaRequired:k,ariaRoleDescription:j,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:k,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function me(e,t){return t in e?e[t]:t}function he(e,t){return me(e,t.toLowerCase())}var ge=L({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:M,acceptCharset:j,accessKey:j,action:null,allow:null,allowFullScreen:O,allowPaymentRequest:O,allowUserMedia:O,alpha:O,alt:null,as:null,async:O,autoCapitalize:null,autoComplete:j,autoFocus:O,autoPlay:O,blocking:j,capture:null,charSet:null,checked:O,cite:null,className:j,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:k,controls:O,controlsList:j,coords:A|M,crossOrigin:null,data:null,dateTime:null,decoding:null,default:O,defer:O,dir:null,dirName:null,disabled:O,download:de,draggable:k,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:O,formTarget:null,headers:j,height:A,hidden:de,high:A,href:null,hrefLang:null,htmlFor:j,httpEquiv:j,id:null,imageSizes:null,imageSrcSet:null,inert:O,inputMode:null,integrity:null,is:null,isMap:O,itemId:null,itemProp:j,itemRef:j,itemScope:O,itemType:j,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:O,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:O,muted:O,name:null,nonce:null,noModule:O,noValidate:O,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:O,optimum:A,pattern:null,ping:j,placeholder:null,playsInline:O,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:O,referrerPolicy:null,rel:j,required:O,reversed:O,rows:A,rowSpan:A,sandbox:j,scope:null,scoped:O,seamless:O,selected:O,shadowRootClonable:O,shadowRootCustomElementRegistry:O,shadowRootDelegatesFocus:O,shadowRootMode:null,shadowRootSerializable:O,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:k,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:O,useMap:null,value:k,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:j,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:O,declare:O,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:O,noHref:O,noShade:O,noWrap:O,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:k,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:O,disablePictureInPicture:O,disableRemotePlayback:O,exportParts:M,part:j,prefix:null,property:null,results:A,security:null,unselectable:null},space:`html`,transform:he}),_e=L({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:N,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:j,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:O,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:M,g2:M,glyphName:M,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:N,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:j,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:N,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:N,rev:N,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:N,requiredFeatures:N,requiredFonts:N,requiredFormats:N,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:N,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:N,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:N,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:me}),ve=L({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ye=L({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:he}),be=L({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xe={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Se=/[A-Z]/g,Ce=/-[a-z]/g,we=/^data[-\w.:]+$/i;function Te(e,t){let n=T(t),r=t,i=E;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&we.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ce,De);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ce.test(e)){let n=e.replace(Se,Ee);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=I}return new i(r,t)}function Ee(e){return`-`+e.toLowerCase()}function De(e){return e.charAt(1).toUpperCase()}var Oe=le([pe,ge,ve,ye,be],`html`),ke=le([pe,_e,ve,ye,be],`svg`);function Ae(e){return e.join(` `).trim()}var je=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
2
- `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function ee(e){var t;for(e||=[];t=v();)t!==!1&&e.push(t);return e}function v(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function y(){var e=p(),t=g(a);if(t){if(v(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function te(){var e=[];ee(e);for(var t;t=y();)t!==!1&&(e.push(t),ee(e));return e}return _(),te()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Me=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(je());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Ne=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Pe=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Me()),r=Ne();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Fe=Le(`end`),Ie=Le(`start`);function Le(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Re(e){let t=Ie(e),n=Fe(e);if(t&&n)return{start:t,end:n}}function R(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Be(e.position):`start`in e||`end`in e?Be(e):`line`in e||`column`in e?ze(e):``}function ze(e){return Ve(e&&e.line)+`:`+Ve(e&&e.column)}function Be(e){return ze(e&&e.start)+`-`+ze(e&&e.end)}function Ve(e){return e&&typeof e==`number`?e:1}var z=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=R(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};z.prototype.file=``,z.prototype.name=``,z.prototype.reason=``,z.prototype.message=``,z.prototype.stack=``,z.prototype.column=void 0,z.prototype.line=void 0,z.prototype.ancestors=void 0,z.prototype.cause=void 0,z.prototype.fatal=void 0,z.prototype.place=void 0,z.prototype.ruleId=void 0,z.prototype.source=void 0;var He=n(Pe(),1),Ue={}.hasOwnProperty,We=new Map,Ge=/[A-Z]/g,Ke=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),qe=new Set([`td`,`th`]),Je=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Ye(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=ot(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=at(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?ke:Oe,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Xe(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Xe(e,t,n){if(t.type===`element`)return Ze(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Qe(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return et(e,t,n);if(t.type===`mdxjsEsm`)return $e(e,t);if(t.type===`root`)return tt(e,t,n);if(t.type===`text`)return nt(e,t)}function Ze(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ke,e.schema=i),e.ancestors.push(t);let a=ft(e,t.tagName,!1),o=st(e,t),s=lt(e,t);return Ke.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!se(e)})),rt(e,o,a,t),it(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Qe(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}B(e,t.position)}function $e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);B(e,t.position)}function et(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ke,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:ft(e,t.name,!0),o=ct(e,t),s=lt(e,t);return rt(e,o,a,t),it(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function tt(e,t,n){let r={};return it(r,lt(e,t)),e.create(t,e.Fragment,r,n)}function nt(e,t){return t.value}function rt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function it(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function at(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function ot(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ie(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function st(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ue.call(t.properties,i)){let a=ut(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&qe.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function ct(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else B(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else B(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function lt(e,t){let n=[],r=-1,i=e.passKeys?new Map:We;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Xe(e,a,o);s!==void 0&&n.push(s)}return n}function ut(e,t,n){let r=Te(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?re(n):Ae(n)),r.property===`style`){let t=typeof n==`object`?n:dt(e,String(n));return e.stylePropertyNameCase===`css`&&(t=pt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?xe[r.property]||r.property:r.attribute,n]}}function dt(e,t){try{return(0,He.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Je+`#cannot-parse-style-attribute`,r}}function ft(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=C(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=C(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ue.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);B(e)}function B(e,t){let n=new z("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Je+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function pt(e){let t={},n;for(n in e)Ue.call(e,n)&&(t[mt(n)]=e[n]);return t}function mt(e){let t=e.replace(Ge,ht);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ht(e){return`-`+e.toLowerCase()}var gt={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},_t={};function vt(e,t){let n=t||_t;return yt(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function yt(e,t,n){if(xt(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return bt(e.children,t,n)}return Array.isArray(e)?bt(e,t,n):``}function bt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=yt(e[i],t,n);return r.join(``)}function xt(e){return!!(e&&typeof e==`object`)}var St=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ct(e){return e.replace(St,wt)}function wt(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return ne(n.slice(t?2:1),t?16:10)}return h(n)||e}var Tt={}.hasOwnProperty;function Et(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Dt(n)(p(ee(n).document().write(g()(e,t,!0))))}function Dt(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(be),autolinkProtocol:S,autolinkEmail:S,atxHeading:a(ge),blockQuote:a(fe),characterEscape:S,characterReference:S,codeFenced:a(L),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(L,o),codeText:a(pe,o),codeTextData:S,data:S,codeFlowValue:S,definition:a(me),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(he),hardBreakEscape:a(_e),hardBreakTrailing:a(_e),htmlFlow:a(ve,o),htmlFlowData:S,htmlText:a(ve,o),htmlTextData:S,image:a(ye),label:o,link:a(be),listItem:a(Se),listItemValue:f,listOrdered:a(xe,d),listUnordered:a(xe),paragraph:a(Ce),reference:A,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ge),strong:a(we),thematicBreak:a(Ee)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:I,autolinkProtocol:F,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:M,characterReferenceMarkerNumeric:M,characterReferenceValue:N,characterReference:P,codeFenced:c(_),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:C,codeIndented:c(ee),codeText:c(le),codeTextData:C,data:C,definition:c(),definitionDestinationString:te,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(se),hardBreakTrailing:c(se),htmlFlow:c(ce),htmlFlowData:C,htmlText:c(w),htmlTextData:C,image:c(E),label:ue,labelText:D,lineEnding:oe,link:c(T),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:j,resourceDestinationString:O,resourceTitleString:k,resource:de,setextHeading:c(ae),setextHeadingLineSequence:ie,setextHeadingText:re,strong:c(),thematicBreak:c()}};Ot(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Tt.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||At).call(a,void 0,e[0])}for(r.position={start:V(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:V(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:V(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||At).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+R({start:e.start,end:e.end})+`): it’s not open`);n.position.end=V(e.end)}function u(){return vt(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=b(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function re(){this.data.setextHeadingSlurpLineEnding=!0}function ie(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Te(),n.position={start:V(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=V(e.end)}function oe(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=V(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),C.call(this,e))}function se(){this.data.atHardBreak=!0}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function w(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function le(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function T(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function E(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Ct(t),n.identifier=b(t).toLowerCase()}function ue(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function O(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function de(){this.data.inReference=void 0}function A(){this.data.referenceType=`collapsed`}function j(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=b(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function M(e){this.data.characterReferenceType=e.type}function N(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=ne(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=h(t);let i=this.stack[this.stack.length-1];i.value+=r}function P(e){let t=this.stack.pop();t.position.end=V(e.end)}function F(e){C.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function I(e){C.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function fe(){return{type:`blockquote`,children:[]}}function L(){return{type:`code`,lang:null,meta:null,value:``}}function pe(){return{type:`inlineCode`,value:``}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function he(){return{type:`emphasis`,children:[]}}function ge(){return{type:`heading`,depth:0,children:[]}}function _e(){return{type:`break`}}function ve(){return{type:`html`,value:``}}function ye(){return{type:`image`,title:null,url:``,alt:null}}function be(){return{type:`link`,title:null,url:``,children:[]}}function xe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Se(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ce(){return{type:`paragraph`,children:[]}}function we(){return{type:`strong`,children:[]}}function Te(){return{type:`text`,value:``}}function Ee(){return{type:`thematicBreak`}}}function V(e){return{line:e.line,column:e.column,offset:e.offset}}function Ot(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ot(e,r):kt(e,r)}}function kt(e,t){let n;for(n in t)if(Tt.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function At(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+R({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+R({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+R({start:t.start,end:t.end})+`) is still open`)}function jt(e){let t=this;t.parser=n;function n(n){return Et(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Mt(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Nt(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
3
- `}]}function Pt(e,t){let n=t.value?t.value+`
4
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ft(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function It(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lt(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=x(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Rt(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zt(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Bt(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Vt(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bt(e,t);let i={src:x(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ht(e,t){let n={src:x(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ut(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Wt(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bt(e,t);let i={href:x(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Gt(e,t){let n={href:x(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Kt(e,t,n){let r=e.all(t),i=n?qt(n):Jt(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
5
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
6
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function qt(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Jt(n[r])}return t}function Jt(e){return e.spread??e.children.length>1}function Yt(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Xt(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zt(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Qt(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $t(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Ie(t.children[1]),o=Fe(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function en(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function tn(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var nn=9,rn=32;function an(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(on(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(on(t.slice(i),i>0,!1)),a.join(``)}function on(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===nn||t===rn;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===nn||t===rn;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function sn(e,t){let n={type:`text`,value:an(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cn(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var ln={blockquote:Mt,break:Nt,code:Pt,delete:Ft,emphasis:It,footnoteReference:Lt,heading:Rt,html:zt,imageReference:Vt,image:Ht,inlineCode:Ut,linkReference:Wt,link:Gt,listItem:Kt,list:Yt,paragraph:Xt,root:Zt,strong:Qt,table:$t,tableCell:tn,tableRow:en,text:sn,thematicBreak:cn,toml:H,yaml:H,definition:H,footnoteDefinition:H};function H(){}var{defineProperty:un}=Object,dn=typeof self==`object`?self:globalThis,fn=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new dn[e](t)},pn=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?un(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof dn[e]==`function`?fn(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(fn(a,o),i)};return r},mn=e=>pn(new Map,e)(0),U=``,{toString:hn}={},{keys:gn,is:_n}=Object,W=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=hn.call(e).slice(8,-1);switch(n){case`Array`:return[1,U];case`Object`:return[2,U];case`Date`:return[3,U];case`RegExp`:return[4,U];case`Map`:return[5,U];case`Set`:return[6,U];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},G=([e,t])=>e===0&&(t===`function`||t===`symbol`),vn=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=W(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&_n(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of gn(o))(e||!G(W(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?U:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(G(W(n))||G(W(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!G(W(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},yn=(e,{json:t,lossy:n}={})=>{let r=[];return vn(!(t||n),!!t,new Map,r)(e),r},K=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?mn(yn(e,t)):structuredClone(e):(e,t)=>mn(yn(e,t));function bn(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function xn(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Sn(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||bn,r=e.options.footnoteBackLabel||xn,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=x(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...K(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
7
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
8
- `}]}}var q=(function(e){if(e==null)return En;if(typeof e==`function`)return J(e);if(typeof e==`object`)return Array.isArray(e)?Cn(e):wn(e);if(typeof e==`string`)return Tn(e);throw Error(`Expected function, string, or object as test`)});function Cn(e){let t=[],n=-1;for(;++n<e.length;)t[n]=q(e[n]);return J(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function wn(e){let t=e;return J(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Tn(e){return J(t);function t(t){return t&&t.type===e}}function J(e){return t;function t(t,n,r){return!!(Dn(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function En(){return!0}function Dn(e){return typeof e==`object`&&!!e&&`type`in e}function On(e){return e}var kn=[];function An(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=q(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+On(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=kn,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=jn(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function jn(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?kn:[e]}function Mn(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),An(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Nn={}.hasOwnProperty,Pn={};function Fn(e,t){let n=t||Pn,r=new Map,i=new Map,a={all:s,applyData:Ln,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ln,...n.handlers},one:o,options:n,patch:In,wrap:zn};return Mn(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Nn.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=K(n);return r.children=a.all(e),r}return K(e)}return(a.options.unknownHandler||Rn)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Bn(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Bn(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function In(e,t){e.position&&(t.position=Re(e))}function Ln(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,K(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Rn(e,t){let n=t.data||{},r=`value`in t&&!(Nn.call(n,`hProperties`)||Nn.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zn(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
9
- `});++r<e.length;)r&&n.push({type:`text`,value:`
10
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
11
- `}),n}function Bn(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Vn(e,t){let n=Fn(e,t),r=n.one(e,void 0),i=Sn(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
12
- `},i)),a}function Hn(e,t){return e&&`run`in e?async function(n,r){let i=Vn(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Vn(n,{file:r,...e||t})}}function Un(e){if(e)throw e}var Wn=n(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function Gn(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Kn(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?qn(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function qn(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Y={basename:Jn,dirname:Yn,extname:Xn,join:Zn,sep:`/`};function Jn(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);X(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Yn(e){if(X(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Xn(e){X(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Zn(...e){let t=-1,n;for(;++t<e.length;)X(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Qn(n)}function Qn(e){X(e);let t=e.codePointAt(0)===47,n=$n(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function $n(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function X(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var er={cwd:tr};function tr(){return`/`}function nr(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function rr(e){if(typeof e==`string`)e=new URL(e);else if(!nr(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return ir(e)}function ir(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var ar=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],or=class{constructor(e){let t;t=e?nr(e)?{path:e}:typeof e==`string`||ur(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:er.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<ar.length;){let e=ar[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)ar.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Y.basename(this.path):void 0}set basename(e){cr(e,`basename`),sr(e,`basename`),this.path=Y.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Y.dirname(this.path):void 0}set dirname(e){lr(this.basename,`dirname`),this.path=Y.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Y.extname(this.path):void 0}set extname(e){if(sr(e,`extname`),lr(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Y.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){nr(e)&&(e=rr(e)),cr(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Y.basename(this.path,this.extname):void 0}set stem(e){cr(e,`stem`),sr(e,`stem`),this.path=Y.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new z(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function sr(e,t){if(e&&e.includes(Y.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Y.sep+"`")}function cr(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function lr(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function ur(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var dr=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),fr={}.hasOwnProperty,pr=new class e extends dr{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Kn()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Wn.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(gr(`data`,this.frozen),this.namespace[e]=t,this):fr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(gr(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Z(e),n=this.parser||this.Parser;return mr(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),mr(`process`,this.parser||this.Parser),hr(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Z(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);br(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),mr(`processSync`,this.parser||this.Parser),hr(`processSync`,this.compiler||this.Compiler),this.process(e,r),vr(`processSync`,`process`,t),n;function r(e,r){t=!0,Un(e),n=r}}run(e,t,n){_r(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Z(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),vr(`runSync`,`run`,n),r;function i(e,t){Un(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Z(t),r=this.compiler||this.Compiler;return hr(`stringify`,r),_r(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(gr(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Wn.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Gn(o)&&Gn(r)&&(r=(0,Wn.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function mr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function hr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function gr(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _r(e){if(!Gn(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function vr(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Z(e){return yr(e)?e:new or(e)}function yr(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function br(e){return typeof e==`string`||xr(e)}function xr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Q=t(),$=n(i(),1),Sr=[],Cr={allowDangerousHtml:!0},wr=/^(https?|ircs?|mailto|xmpp)$/i,Tr=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Er(e){let t=Dr(e),n=Or(e);return kr(t.runSync(t.parse(n),n),e)}function Dr(e){let t=e.rehypePlugins||Sr,n=e.remarkPlugins||Sr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cr}:Cr;return pr().use(jt).use(n).use(Hn,r).use(t)}function Or(e){let t=e.children||``,n=new or;return typeof t==`string`?n.value=t:``+t,n}function kr(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ar;for(let e of Tr)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Mn(e,l),Ye(e,{Fragment:Q.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Q.jsx,jsxs:Q.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in gt)if(Object.hasOwn(gt,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=gt[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ar(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||wr.test(e.slice(0,t))?e:``}function jr(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Mr(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Nr(e,t,n){let r=q((n||{}).ignore||[]),i=Pr(t),a=-1;for(;++a<i.length;)An(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Pr(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Fr(e[0]),Ir(e[1])])}return t}function Fr(e){return typeof e==`string`?new RegExp(Mr(e),`g`):e}function Ir(e){return typeof e==`function`?e:function(){return e}}var Lr=`phrasing`,Rr=[`autolink`,`link`,`image`,`label`];function zr(){return{transforms:[qr],enter:{literalAutolink:Vr,literalAutolinkEmail:Hr,literalAutolinkHttp:Hr,literalAutolinkWww:Hr},exit:{literalAutolink:Kr,literalAutolinkEmail:Gr,literalAutolinkHttp:Ur,literalAutolinkWww:Wr}}}function Br(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Lr,notInConstruct:Rr},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Lr,notInConstruct:Rr},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Lr,notInConstruct:Rr}]}}function Vr(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Hr(e){this.config.enter.autolinkProtocol.call(this,e)}function Ur(e){this.config.exit.autolinkProtocol.call(this,e)}function Wr(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Gr(e){this.config.exit.autolinkEmail.call(this,e)}function Kr(e){this.exit(e)}function qr(e){Nr(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Jr],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Yr]],{ignore:[`link`,`linkReference`]})}function Jr(e,t,n,r,i){let a=``;if(!Qr(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Xr(n)))return!1;let o=Zr(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Yr(e,t,n,r){return!Qr(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Xr(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Zr(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=jr(e,`(`),a=jr(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Qr(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||_(n)||m(n))&&(!t||n!==47)}ci.peek=si;function $r(){this.buffer()}function ei(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ti(){this.buffer()}function ni(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function ri(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=b(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ii(e){this.exit(e)}function ai(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=b(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oi(e){this.exit(e)}function si(){return`[`}function ci(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function li(){return{enter:{gfmFootnoteCallString:$r,gfmFootnoteCall:ei,gfmFootnoteDefinitionLabelString:ti,gfmFootnoteDefinition:ni},exit:{gfmFootnoteCallString:ri,gfmFootnoteCall:ii,gfmFootnoteDefinitionLabelString:ai,gfmFootnoteDefinition:oi}}}function ui(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ci},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
13
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?fi:di))),s(),o}}function di(e,t,n){return t===0?e:fi(e,t,n)}function fi(e,t,n){return(n?``:` `)+e}var pi=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];vi.attention=yi,vi.peek=bi;function mi(){return{canContainEols:[`delete`],enter:{strikethrough:gi},exit:{strikethrough:_i}}}function hi(){return{handlers:{delete:vi},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:pi}]}}function gi(e){this.enter({type:`delete`,children:[],position:void 0},e)}function _i(e){this.exit(e)}function vi(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function yi(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function bi(){return`~`}function xi(e){return e.length}function Si(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||xi,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Ci(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=wi(r[d]);else{let e=wi(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
14
- `)}function Ci(e){return e==null?``:String(e)}function wi(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Ti=q([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Ei(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Di);return i(),o}function Di(e,t,n){return`>`+(n?``:` `)+e}function Oi(e,t){return ki(e,t.inConstruct,!0)&&!ki(e,t.notInConstruct,!1)}function ki(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ai(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
15
- `&&!e.before&&!e.after&&Oi(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
16
- `}function ji(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Mi(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Ni(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Pi(e,t,n,r){let i=Ni(n),a=e.value||``;if(Mi(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Fi);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(ji(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
17
- `,encode:["`"],...o.current()})),t()}return u+=o.move(`
18
- `),a&&(u+=o.move(a+`
19
- `)),u+=o.move(s),c(),u}function Fi(e,t,n){return(n?``:` `)+e}function Ii(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Li(e,t,n,r){let i=Ii(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
20
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Ri(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}zi.attention=Bi,zi.peek=Vi;function zi(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Bi(e,t){return{construct:`emphasis`,markers:Ri(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function Vi(e,t,n){return n.options.emphasis||`*`}function Hi(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Ui(e,t){let n=!1;return Mn(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&vt(e)&&(t.options.setext||n))}function Wi(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Ui(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
21
- `,after:`
22
- `});return r(),t(),o+`
23
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
24
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
25
- `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Hi(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Gi.peek=Ki;function Gi(e){return e.value||``}function Ki(){return`<`}qi.peek=Ji;function qi(e,t,n,r){let i=Ii(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Ji(){return`!`}Yi.peek=Xi;function Yi(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Xi(){return`!`}Zi.peek=Qi;function Zi(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Qi(){return"`"}function $i(e,t){let n=vt(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}ea.peek=ta;function ea(e,t,n,r){let i=Ii(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if($i(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function ta(e,t,n){return $i(e,n)?`<`:`[`}na.peek=ra;function na(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ra(){return`[`}function ia(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function aa(e){let t=ia(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function oa(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function sa(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ca(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?oa(n):ia(n),s=e.ordered?o===`.`?`)`:`.`:aa(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),sa(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function la(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ua(e,t,n,r){let i=la(n),a=n.bulletCurrent||ia(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function da(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function fa(e,t,n,r){if(!e.children.some(function(e){return Ti(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function pa(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ma.attention=ha,ma.peek=ga;function ma(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function ha(e,t){return{construct:`strong`,markers:pa(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function ga(e,t,n){return n.options.strong||`*`}function _a(e,t,n,r){return n.safe(e.value,r)}function va(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ya(e,t,n){let r=(sa(n)+(n.options.ruleSpaces?` `:``)).repeat(va(n));return n.options.ruleSpaces?r.slice(0,-1):r}var ba={blockquote:Ei,break:Ai,code:Pi,definition:Li,emphasis:zi,hardBreak:Ai,heading:Wi,html:Gi,image:qi,imageReference:Yi,inlineCode:Zi,link:ea,linkReference:na,list:ca,listItem:ua,paragraph:da,root:fa,strong:ma,text:_a,thematicBreak:ya};function xa(){return{enter:{table:Sa,tableData:Ea,tableHeader:Ea,tableRow:wa},exit:{codeText:Da,table:Ca,tableData:Ta,tableHeader:Ta,tableRow:Ta}}}function Sa(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Ca(e){this.exit(e),this.data.inTable=void 0}function wa(e){this.enter({type:`tableRow`,children:[]},e)}function Ta(e){this.exit(e)}function Ea(e){this.enter({type:`tableCell`,children:[]},e)}function Da(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Oa));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Oa(e,t){return t===`|`?t:e}function ka(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
26
- `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
27
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Si(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ba.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Aa(){return{exit:{taskListCheckValueChecked:Ma,taskListCheckValueUnchecked:Ma,paragraph:Na}}}function ja(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Pa}}}function Ma(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Na(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Pa(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=ba.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Fa(){return[zr(),li(),mi(),xa(),Aa()]}function Ia(e){return{extensions:[Br(),ui(e),hi(),ka(e),ja()]}}var La={};function Ra(e){let t=this,n=e||La,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(v(n)),a.push(Fa()),o.push(Ia(n))}var za={kind:`local`},Ba=/(?:^|\/)worktrees\/[^/]+\/\.tasks\/([0-9A-HJKMNP-TV-Z]{26})(?:\/(.*))?$/,Va=/^[a-z][a-z0-9+.-]*:/i,Ha=/:(\d+)(?::\d+)?$/,Ua=/#L(\d+)/,Wa=/^[^/?#:]*\.[^/?#:]*:\d+(?::\d+)?(?:[?#].*)?$/;function Ga(e){return Wa.test(e)}function Ka(e){let t=Ha.exec(e),n=Number(t?.[1]);return t===null||!(n>0)?{path:e}:{path:e.slice(0,t.index),line:n}}function qa(e){let t=[];for(let n of e.split(`/`))if(n!==``&&n!==`.`){if(n===`..`){if(t.pop()===void 0)return null;continue}t.push(n)}return t.join(`/`)}function Ja(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function Ya(e){try{return decodeURIComponent(e)}catch{return e}}function Xa(e,t){if(e===void 0||e===``)return za;let n=s(e);if(n!==null)return{kind:`upload`,id:n};if(e.startsWith(`#`)||e.startsWith(`//`)||Va.test(e)&&!Ga(e))return null;let r=Ka(Ya(e.replace(/[?#].*$/,``))),i=r.path,a=Number(Ua.exec(e)?.[1]),o=r.line??(a>0?a:void 0),c=o===void 0?{}:{line:o},l=Ba.exec(i);if(l?.[1]!==void 0){let e=qa(l[2]??``);return e===null?za:{kind:`task-file`,taskId:l[1],path:e,...c}}if(t!==void 0&&!i.startsWith(`/`)){let e=qa(`${t.dir}/${i}`);return e===null?za:{kind:`task-file`,taskId:t.taskId,path:e,...c}}return za}var Za={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,avif:`image/avif`,bmp:`image/bmp`,ico:`image/x-icon`,svg:`image/svg+xml`};function Qa(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?``:t.slice(n+1).toLowerCase()}function $a(e){return Za[Qa(e)]??null}function eo(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return n}function to(e){try{let t=new TextDecoder(`utf-8`,{fatal:!0}).decode(e);return t.includes(`\0`)?null:t}catch{return null}}function no(e,t){let n=[],r=[],i=``,a=!1;for(let o=0;o<e.length;o+=1){let s=e.charAt(o);a?s===`"`?e.charAt(o+1)===`"`?(i+=`"`,o+=1):a=!1:i+=s:s===`"`&&i===``?a=!0:s===t?(r.push(i),i=``):s===`
28
- `||s===`\r`?(s===`\r`&&e.charAt(o+1)===`
29
- `&&(o+=1),r.push(i),n.push(r),r=[],i=``):i+=s}return(i!==``||r.length>0)&&(r.push(i),n.push(r)),n}function ro(e,t){let n=$a(e);if(n!==null)return{kind:`image`,type:n};let r=to(t);if(r===null)return{kind:`binary`};let i=Qa(e);return i===`md`||i===`markdown`?{kind:`markdown`,text:r}:i===`csv`||i===`tsv`?{kind:`table`,rows:no(r,i===`csv`?`,`:` `)}:{kind:`text`,text:r}}var io=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`li`,`pre`,`blockquote`,`table`,`tr`,`hr`]);function ao(e){return t=>{let n=[],r=e=>{e.tagName!==void 0&&io.has(e.tagName)&&e.position&&n.push({node:e,start:e.position.start.line,end:e.position.end.line});for(let t of e.children??[])r(t)};r(t);let{line:i}=e,a=n.filter(e=>e.start<=i&&i<=e.end).at(-1)??n.find(e=>e.start>i);if(a!==void 0){let e=a.node.properties?.className;a.node.properties={...a.node.properties,className:[...Array.isArray(e)?e:[],`line-target`]}}}}function oo(e){if(e.status===`deleted`)return`deleted`;let t=e.added===null||e.removed===null?`binary`:e.status===`added`?`+${e.added}`:`+${e.added} −${e.removed}`;return e.status===`added`?`new · ${t}`:t}function so(e){if(e===``)return[];let t=0;return e.split(`
30
- `).map(e=>{let n=/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(e);return n===null?e.startsWith(`-`)?{kind:`removed`,text:e}:e.startsWith(`\\`)?{kind:`note`,text:e}:(t+=1,{kind:e.startsWith(`+`)?`added`:`context`,text:e,line:t-1}):(t=Number(n[1]),{kind:`hunk`,text:e})})}function co(e){let t=[...[...e.folders.values()].map(co).toSorted((e,t)=>e.name.localeCompare(t.name)),...e.files.toSorted((e,t)=>e.name.localeCompare(t.name))],{name:n,path:r}=e,[i]=t;e.path!==``&&t.length===1&&i?.kind===`dir`&&(n=`${n}/${i.name}`,r=i.path,t=[...i.children]);let a=0,o;for(let e of t){a+=e.kind===`dir`?e.files:1;let t=e.kind===`dir`?e.lastChange:e.change.lastChange;t!==void 0&&(o===void 0||t.at>o.at)&&(o=t)}return{kind:`dir`,name:n,path:r,children:t,files:a,...o===void 0?{}:{lastChange:o}}}function lo(e){let t={name:``,path:``,folders:new Map,files:[]};for(let n of e){let e=n.path.split(`/`),r=t;for(let t of e.slice(0,-1)){let e=r.folders.get(t);e===void 0&&(e={name:t,path:r.path===``?t:`${r.path}/${t}`,folders:new Map,files:[]},r.folders.set(t,e)),r=e}r.files.push({kind:`file`,name:e.at(-1)??n.path,change:n})}return co(t)}function uo(e,t=24){let n=new Set,r=e.children.length,i=e.children.filter(e=>e.kind===`dir`);for(let e=i.shift();e!==void 0;e=i.shift())r+e.children.length>t||(n.add(e.path),r+=e.children.length,i.push(...e.children.filter(e=>e.kind===`dir`)));return n}function fo(e){if(e<1024)return`${e} B`;let t=e/1024;return t<1024?`${t.toFixed(1)} KB`:`${(t/1024).toFixed(1)} MB`}var po=new Set([`code`,`inlineCode`,`link`,`linkReference`,`html`]);function mo(e){let t=[],n=0;for(let r of e.matchAll(te)){let i=(r.index??0)+(r[1]?.length??0);i>n&&t.push({type:`text`,value:e.slice(n,i)});let a=r[2]??``;t.push({type:`mention`,data:{hName:`span`,hProperties:{className:[`mention`]},hChildren:[{type:`text`,value:`@${a}`}]}}),n=i+a.length+1}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t}function ho(e){e.children!==void 0&&(e.children=e.children.flatMap(e=>e.type===`text`&&e.value!==void 0?mo(e.value):(po.has(e.type)||ho(e),[e])))}function go(){return e=>ho(e)}var _o=`text-fg-primary underline decoration-fg-muted underline-offset-2 hover:decoration-fg-primary`,vo=(0,$.createContext)(void 0);function yo(e,t){return(0,$.useMemo)(()=>e==null?null:`data:${t};base64,${e}`,[e,t])}function bo({taskId:e,path:t,line:n,className:r=_o,children:i}){return(0,Q.jsx)(c,{to:`/task/$taskId/files/$`,params:{taskId:e,_splat:t},search:n===void 0?{}:{line:n},title:`${t===``?`The files`:t}${n===void 0?``:`:${n}`} on task/${e}`,className:r,children:i})}function xo({taskId:e,path:t,alt:n}){let i=r(e,t),a=yo(i.data?.kind===`file`?i.data.content:null,$a(t)??`application/octet-stream`),o=n===``?t.split(`/`).at(-1)??t:n;return(0,Q.jsx)(bo,{taskId:e,path:t,children:a===null?(0,Q.jsx)(`span`,{className:`text-meta`,children:i.isPending?`Loading ${o}…`:`${o} cannot be shown here`}):(0,Q.jsx)(`img`,{src:a,alt:n,className:`max-h-[32rem] max-w-full rounded-lg`})})}function So({id:e,alt:t}){let n=a(e),r=t===``?`an image`:t;return n.data===void 0?n.isPending?(0,Q.jsxs)(`span`,{className:`text-meta`,children:[`Loading `,r,`…`]}):(0,Q.jsx)(`span`,{title:n.error?.message,children:r}):(0,Q.jsx)(`img`,{src:n.data,alt:t,className:`max-h-[32rem] max-w-full rounded-lg`})}function Co({href:e,children:t}){return(0,Q.jsx)(`span`,{title:e===void 0||e===``?void 0:`${e}, on a runner's machine`,children:t})}function wo({href:e,children:t}){let n=(0,$.useContext)(vo),r=l(e);if(r!==null)return(0,Q.jsx)(u,{kind:r.kind,id:r.id,place:r.place,children:t});let i=Xa(e,n);return i?.kind===`task-file`?(0,Q.jsx)(bo,{taskId:i.taskId,path:i.path,line:i.line,children:t}):i?.kind===`local`?(0,Q.jsx)(Co,{href:e,children:t}):i?.kind===`upload`?(0,Q.jsx)(`span`,{children:t}):(0,Q.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer noopener`,children:t})}function To({src:e,alt:t}){let n=(0,$.useContext)(vo),r=Xa(typeof e==`string`?e:void 0,n);if(r?.kind===`task-file`)return(0,Q.jsx)(xo,{taskId:r.taskId,path:r.path,alt:t??``});if(r?.kind===`upload`)return(0,Q.jsx)(So,{id:r.id,alt:t??``});if(r?.kind===`local`){let n=typeof e==`string`?e:void 0;return(0,Q.jsx)(Co,{href:n,children:t===void 0||t===``?n:t})}return(0,Q.jsx)(`img`,{src:typeof e==`string`?e:void 0,alt:t,className:`max-h-[32rem] max-w-full rounded-lg`})}var Eo={a:wo,img:To};function Do(e){return Ga(e)||s(e)!==null?e:Ar(e)}function Oo({text:e,base:t,line:n}){let r=f(e),i=(0,$.useMemo)(()=>[Ra,[d,{index:r}],go],[r]),a=(0,$.useMemo)(()=>n===void 0?[]:[[ao,{line:n}]],[n]),o=t?.taskId,s=t?.dir,c=(0,$.useMemo)(()=>o===void 0||s===void 0?void 0:{taskId:o,dir:s},[o,s]);return(0,Q.jsx)(`div`,{className:`board-markdown`,children:(0,Q.jsx)(vo,{value:c,children:(0,Q.jsx)(Er,{remarkPlugins:i,rehypePlugins:a,components:Eo,urlTransform:Do,children:e})})})}export{oo as a,$a as c,Ja as d,so as f,eo as i,qa as l,ro as m,bo as n,Ka as o,fo as p,yo as r,lo as s,Oo as t,uo as u};
@@ -1 +0,0 @@
1
- import{G as e,Hn as t,b as n,qt as r,r as i,t as a,y as o}from"./format-DT52SbbR.js";import{g as s,k as c,s as l}from"./index-BTVy_xFF.js";import{n as u,t as d}from"./Pane-CJYRVkwh.js";import{n as f}from"./Overview-CS9HCSmm.js";var p=t(),m=[{window:`24h`,label:`24 hours`},{window:`7d`,label:`7 days`},{window:`all`,label:`All time`}],h={stage:`a stage to take`,mention:`a mention`,user_post:`your post`,heartbeat:`a heartbeat`,task_done:`a finished task`,proposal_decided:`a decided proposal`,ops_event:`a signal`,onboarding:`joining`,manual:`your wake`},g=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,timeZone:`UTC`});function _(e,t){return t===0?``:`${Math.round(e/t*100)}%`}function v(e){return e.toFixed(1).replace(/\.0$/,``)}function y({part:e,whole:t}){return(0,p.jsxs)(p.Fragment,{children:[e,(0,p.jsx)(`span`,{className:`ml-1.5 inline-block w-9 text-right text-fg-muted`,children:e===0?``:_(e,t)})]})}function b({children:e}){return(0,p.jsx)(`p`,{className:`text-sm text-fg-primary`,children:e})}function x({children:e}){return(0,p.jsx)(`p`,{className:`mt-1 text-meta`,children:e})}function S({label:e,columns:t,rows:n}){return n.length===0?null:(0,p.jsxs)(`table`,{"aria-label":e,className:`mt-3 w-full table-fixed text-sm`,children:[(0,p.jsxs)(`colgroup`,{children:[(0,p.jsx)(`col`,{}),t.slice(1).map(e=>(0,p.jsx)(`col`,{className:`w-24`},e))]}),(0,p.jsx)(`thead`,{children:(0,p.jsx)(`tr`,{children:t.map((e,t)=>(0,p.jsx)(`th`,{scope:`col`,className:`text-caps pb-1 font-normal ${t===0?`text-left`:`text-right`}`,children:e},e))})}),(0,p.jsx)(`tbody`,{children:n.map((e,t)=>(0,p.jsx)(`tr`,{className:`border-t border-line/50`,children:e.map((e,t)=>(0,p.jsx)(`td`,{className:`py-1.5 ${t===0?`pr-3 text-fg-primary`:`text-right text-fg-secondary tabular-nums`}`,children:e},t))},t))})]})}function C({name:e}){let t=l();return e===`user`?(0,p.jsx)(`span`,{children:t(e)}):(0,p.jsx)(r,{to:`/citizen/$name`,params:{name:e},className:`hover:underline`,children:e})}function w(e){return e.window===`24h`?1:e.window===`7d`?7:Math.max(1,e.decisions.byDay.length)}function T(){let{window:t=`7d`}=c({from:`/metrics`}),l=o(t),T=n(6e4),E=(0,p.jsx)(`nav`,{"aria-label":`Window`,className:`flex shrink-0 gap-1`,children:m.map(e=>(0,p.jsx)(r,{to:`/metrics`,search:{window:e.window},"aria-current":e.window===t?`page`:void 0,className:`rounded-md px-2 py-1 text-xs transition-colors ${e.window===t?`bg-surface-2 text-fg-primary`:`text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`}`,children:e.label},e.window))}),D=(0,p.jsx)(d,{title:`Metrics`,subtitle:`How the society works, counted from its event log`,trailing:E});if(l.data===void 0)return(0,p.jsxs)(p.Fragment,{children:[D,(0,p.jsx)(u,{children:l.error instanceof e?l.error.message:`Counting the event log…`})]});let{idle:O,sentBack:k,messages:A,latency:j,decisions:M,blocked:N}=l.data,P=w(l.data);return(0,p.jsxs)(p.Fragment,{children:[D,(0,p.jsxs)(`div`,{className:`flex-1 space-y-5 overflow-y-auto px-4 py-4`,children:[(0,p.jsxs)(f,{title:`Turns that did nothing`,children:[O.turns===0?(0,p.jsx)(x,{children:`No finished turns in this window.`}):(0,p.jsxs)(b,{children:[O.idle,` of `,O.turns,` turns changed nothing on the board`,` `,(0,p.jsx)(`span`,{className:`text-fg-muted`,children:_(O.idle,O.turns)})]}),(0,p.jsxs)(x,{children:[`A turn that took no board action: no post, claim, handover, plan, proposal, decision, or knowledge. Reflections are left out, since they write memory.`,O.unknown>0?` ${O.unknown} ${O.unknown===1?`turn`:`turns`} kept no transcript and could not be counted.`:``]}),(0,p.jsx)(S,{label:`By what woke them`,columns:[`Woken by`,`Turns`,`Did nothing`],rows:O.byTrigger.map(e=>[h[e.trigger]??e.trigger,e.turns,(0,p.jsx)(y,{part:e.idle,whole:e.turns},`idle`)])}),(0,p.jsx)(S,{label:`By citizen`,columns:[`Citizen`,`Turns`,`Did nothing`],rows:O.byAgent.map(e=>[(0,p.jsxs)(`span`,{children:[(0,p.jsx)(C,{name:e.agent}),e.role===null?null:(0,p.jsxs)(`span`,{className:`text-meta`,children:[` · `,e.role]})]},`who`),e.turns,(0,p.jsx)(y,{part:e.idle,whole:e.turns},`idle`)])})]}),(0,p.jsxs)(f,{title:`Work sent back`,children:[k.finished===0?(0,p.jsx)(x,{children:`No task finished in this window.`}):(0,p.jsxs)(b,{children:[k.tasksSentBack,` of `,k.finished,` finished tasks were sent back,`,` `,k.sendBacks,` `,k.sendBacks===1?`time`:`times`,` in all`]}),(0,p.jsx)(S,{label:`Where work came back from`,columns:[`Came back from`,`Times`],rows:k.byStage.map(e=>[`${e.project} · ${e.stage}`,e.count])}),(0,p.jsx)(S,{label:`Who sent work back`,columns:[`Sent back by`,`Times`],rows:k.bySender.map(e=>[(0,p.jsx)(C,{name:e.agent},`who`),e.count])})]}),(0,p.jsxs)(f,{title:`Messages per finished task`,children:[A.finished===0?(0,p.jsx)(x,{children:`No task finished in this window.`}):(0,p.jsxs)(b,{children:[v(A.messages/A.finished),` posts a task, across`,` `,A.finished,` finished `,A.finished===1?`task`:`tasks`]}),(0,p.jsx)(x,{children:`Posts in each finished task's thread, handovers included, the board's own left out.`}),(0,p.jsx)(S,{label:`By project`,columns:[`Project`,`Tasks`,`Posts a task`],rows:A.byProject.map(e=>[e.project,e.finished,v(e.messages/e.finished)])}),(0,p.jsx)(S,{label:`Most talked-over tasks`,columns:[`Task`,`Posts`],rows:A.busiest.map(e=>[(0,p.jsx)(s,{kind:`task`,id:e.taskId,children:e.title},`task`),e.messages])})]}),(0,p.jsxs)(f,{title:`Wake latency`,children:[j.medianMs===null||j.slowestMs===null?(0,p.jsx)(x,{children:`No mention led to a turn in this window.`}):(0,p.jsxs)(b,{children:[i(j.medianMs),` from a mention to its turn, at the median; the slowest took`,` `,i(j.slowestMs)]}),(0,p.jsxs)(x,{children:[`From a post that mentions a citizen to the start of its turn in the same conversation, debounce included.`,j.unanswered>0?` ${j.unanswered} ${j.unanswered===1?`mention has`:`mentions have`} no turn yet.`:``]}),(0,p.jsx)(S,{label:`By citizen`,columns:[`Citizen`,`Mentions`,`Median`,`Slowest`],rows:j.byAgent.map(e=>[(0,p.jsx)(C,{name:e.agent},`who`),e.mentions,i(e.medianMs),i(e.slowestMs)])})]}),(0,p.jsxs)(f,{title:`Your decisions`,children:[M.total===0?(0,p.jsx)(x,{children:`You decided nothing in this window.`}):(0,p.jsxs)(b,{children:[M.total,` `,M.total===1?`decision`:`decisions`,`, about`,` `,v(M.total/P),` a day`]}),(0,p.jsx)(x,{children:`Proposals you decided, questions to you that you answered, and stages you passed or sent back.`}),(0,p.jsx)(S,{label:`By day`,columns:[`Day`,`Proposals`,`Answers`,`Stages`],rows:M.byDay.map(e=>[g.format(new Date(`${e.day}T00:00:00Z`)),e.proposals,e.answers,e.stages])})]}),(0,p.jsx)(f,{title:`Blocked on a capability`,children:N.length===0?(0,p.jsx)(x,{children:`No task waited for a capability no runner offers.`}):(0,p.jsx)(`ul`,{className:`space-y-2`,children:N.map(e=>(0,p.jsxs)(`li`,{children:[(0,p.jsxs)(`p`,{className:`text-sm text-fg-primary`,children:[(0,p.jsx)(s,{kind:`task`,id:e.taskId,children:e.title??e.taskId}),(0,p.jsx)(`span`,{className:e.holds?`text-amber-300`:`text-fg-muted`,children:e.holds?` · blocked now`:` · cleared`})]}),(0,p.jsxs)(`p`,{className:`text-meta`,children:[e.summary,` · since `,a(e.firstAt,T)]})]},e.taskId))})})]})]})}export{T as MetricsView};
@@ -1 +0,0 @@
1
- import{Hn as e,b as t,n,qt as r,t as i,x as a}from"./format-DT52SbbR.js";import{o}from"./governance-Cr5OlQnw.js";import{S as s,_ as c,s as l}from"./index-BTVy_xFF.js";import{n as u,t as d}from"./Pane-CJYRVkwh.js";var f=e(),p=[{kind:`proposal`,label:`Proposals to decide`},{kind:`stage`,label:`Stages that name you`},{kind:`request`,label:`Asked of you`}],m=`block rounded-xl px-3 py-2.5 transition-colors hover:bg-surface-2/50`;function h({title:e,meta:t}){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{className:`text-title block truncate`,children:e}),(0,f.jsx)(`span`,{className:`mt-1 block truncate text-meta`,children:t})]})}function g(){let e=s(),g=a(),_=t(3e4),v=l(),y=e=>g.data?.find(t=>t.slug===e)?.name??e;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d,{title:`Needs you`,subtitle:e.length===0?`Nothing waits on you`:`${e.length} waiting on you, oldest first`}),(0,f.jsx)(`div`,{className:`flex-1 overflow-y-auto px-2 py-2`,children:e.length===0?(0,f.jsx)(u,{children:`Nothing waits on you. Proposals you may decide, stages that name you, and questions citizens ask you with @user appear here until you answer where they asked.`}):p.map(({kind:t,label:a})=>{let s=e.filter(e=>e.kind===t);return s.length===0?null:(0,f.jsxs)(`section`,{className:`mb-3`,children:[(0,f.jsxs)(`h3`,{className:`px-3 pt-2 pb-1 text-[11px] font-semibold tracking-wider text-fg-muted uppercase`,children:[a,` · `,s.length]}),(0,f.jsx)(`ul`,{children:s.map(e=>{if(e.kind===`proposal`)return(0,f.jsx)(`li`,{children:(0,f.jsx)(r,{to:`/proposal/$proposalId`,params:{proposalId:e.proposal.id},className:m,children:(0,f.jsx)(h,{title:o(e.proposal),meta:`proposed by ${v(e.proposal.proposedBy)} ${i(e.since,_)}`})})},e.proposal.id);if(e.kind===`stage`)return(0,f.jsx)(`li`,{children:(0,f.jsx)(r,{to:`/task/$taskId`,params:{taskId:e.task.id},className:m,children:(0,f.jsx)(h,{title:e.task.title,meta:`${e.stage.name}${e.stage.gate?` (gate)`:``} in ${y(e.task.project)} · waiting since ${i(e.since,_)}`})})},e.task.id);let t=`${v(e.message.author)} in ${e.thread===null?`#${e.message.channel}`:e.thread.title} ${i(e.since,_)}`,a=(0,f.jsx)(h,{title:(0,f.jsx)(c,{text:n(e.message.body,160),links:!1}),meta:t}),s=e.thread?.subject;return(0,f.jsx)(`li`,{children:s?.kind===`task`?(0,f.jsx)(r,{to:`/task/$taskId`,params:{taskId:s.id},className:m,children:a}):s?.kind===`proposal`?(0,f.jsx)(r,{to:`/proposal/$proposalId`,params:{proposalId:s.id},className:m,children:a}):e.thread===null?(0,f.jsx)(r,{to:`/c/$`,params:{_splat:e.message.channel},className:m,children:a}):(0,f.jsx)(r,{to:`/thread/$threadId`,params:{threadId:e.thread.id},className:m,children:a})},e.message.id)})})]},t)})})]})}export{g as NeedsYouView};
@@ -1 +0,0 @@
1
- import{Hn as e,O as t,Y as n,n as r,qt as i,t as a}from"./format-DT52SbbR.js";import{t as o}from"./CliIcon-CLHaA65A.js";import{_ as s}from"./index-BTVy_xFF.js";import{a as c}from"./citizen-B2Dlbcpe.js";var l=e();function u({title:e,aside:t,children:n}){return(0,l.jsxs)(`section`,{className:`border-t border-line pt-4 first:border-t-0 first:pt-0`,children:[(0,l.jsxs)(`h3`,{className:`flex items-baseline justify-between gap-2`,children:[(0,l.jsx)(`span`,{className:`text-section`,children:e}),t]}),(0,l.jsx)(`div`,{className:`mt-2`,children:n})]})}function d({members:e,scope:r}){let a=t(),s=n(a.data?.running??[]),u=n(a.data?.pending??[]);return e.length===0?(0,l.jsx)(`p`,{className:`text-meta`,children:`Nobody yet.`}):(0,l.jsx)(`ul`,{className:`-mx-2`,children:e.map(e=>{let t=s.filter(t=>t.agent===e.name).map(e=>e.scope),n=t.includes(r),a=u.some(t=>t.agent===e.name),d=n?`in a turn here`:t.length>0?`in a turn at ${t.map(c).join(` and `)}`:a?`queued`:`resting`;return(0,l.jsx)(`li`,{children:(0,l.jsxs)(i,{to:`/citizen/$name`,params:{name:e.name},search:n&&r!==`society`?{scope:r}:{},className:`flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm transition-colors hover:bg-surface-2/50`,children:[(0,l.jsx)(`span`,{className:`grid size-4 shrink-0 place-items-center`,children:e.cli===null?null:(0,l.jsx)(o,{cli:e.cli,size:13})}),(0,l.jsx)(`span`,{className:`text-fg-primary`,children:e.name}),(0,l.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-fg-muted`,children:e.role}),(0,l.jsx)(`span`,{className:`shrink-0 text-xs ${t.length>0?`text-emerald-300`:a?`text-amber-300`:`text-fg-muted`}`,children:d})]})},e.name)})})}function f({scope:e,topics:t,now:n}){return t===void 0?(0,l.jsx)(`p`,{className:`text-meta`,children:`Reading…`}):t.length===0?(0,l.jsxs)(`p`,{className:`text-meta`,children:[`No knowledge yet. `,e===`society`?`The steward and you`:`Members`,` write it with write_knowledge.`]}):(0,l.jsx)(`ul`,{className:`-mx-2`,children:t.toSorted((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).map(t=>(0,l.jsx)(`li`,{children:(0,l.jsxs)(i,{to:`/knowledge/$scope/$topic`,params:{scope:e,topic:t.topic},className:`block rounded-lg px-2 py-1.5 transition-colors hover:bg-surface-2/50`,children:[(0,l.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,l.jsx)(`span`,{className:`text-sm text-fg-primary`,children:t.topic}),(0,l.jsxs)(`span`,{className:`text-meta`,children:[`by `,t.updatedBy,` `,a(t.updatedAt,n)]})]}),(0,l.jsx)(`span`,{className:`mt-0.5 line-clamp-2 block text-sm leading-relaxed text-fg-secondary`,children:(0,l.jsx)(s,{text:r(t.body,240),links:!1})})]})},t.topic))})}export{u as n,f as r,d as t};
@@ -1 +0,0 @@
1
- import{A as e,Hn as t,Kn as n,R as r,Un as i,Vn as a,_ as o,b as s,c,h as l,qt as u,t as d,u as f,x as p}from"./format-DT52SbbR.js";import{n as m,t as h}from"./Button-f4jgBZY1.js";import{i as g,t as _}from"./tasks-R3YgpYTe.js";import{A as v}from"./index-BTVy_xFF.js";import{t as y}from"./Markdown-BhtIFcWc.js";import{n as b,r as x}from"./ThreadForms-C846TvtS.js";import{n as S,r as C}from"./ChannelForms-q9zdj4p2.js";import{n as w,t as T}from"./Pane-CJYRVkwh.js";import{n as E,r as D,t as O}from"./Overview-CS9HCSmm.js";var k=n(i(),1),A=t();function j({project:t,onDone:n}){let{api:r}=e(),i=a(),[o,s]=(0,k.useState)(t.name),[c,l]=(0,k.useState)(t.defaultBranch),u={...o.trim()===t.name?{}:{name:o.trim()},...c.trim()===t.defaultBranch?{}:{default_branch:c.trim()}},d=m({mutationFn:()=>r.configureProject(t.slug,u),onSuccess:async()=>{await i.invalidateQueries({queryKey:[`projects`]}),n()}}),f=Object.keys(u).length===0||o.trim()===``||c.trim()===``;return(0,A.jsxs)(`form`,{"aria-label":`Edit ${t.slug}`,className:`space-y-2 border-b border-line bg-surface-2/20 p-3`,onSubmit:e=>{e.preventDefault(),d.mutate()},children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`input`,{value:o,maxLength:120,"aria-label":`Project name`,onChange:e=>s(e.target.value),className:`${b} min-w-0 flex-1`}),(0,A.jsx)(`div`,{className:`w-36 shrink-0`,children:(0,A.jsx)(`input`,{value:c,maxLength:100,spellCheck:!1,"aria-label":`Default branch`,onChange:e=>l(e.target.value),className:`${b} font-mono`})}),(0,A.jsx)(h,{onClick:n,children:`Cancel`}),(0,A.jsx)(h,{variant:`primary`,type:`submit`,disabled:d.isPending||f,children:d.isPending?`Saving…`:`Save`})]}),(0,A.jsxs)(`p`,{className:`text-meta`,children:[t.slug,` stays in its addresses, channels, and branches. A new default branch is where tasks start and land from now; its runner makes it from the project's remote, or from where the repository stands, before the next turn.`]}),(0,A.jsx)(x,{error:d.error})]})}function M(){let{slug:e}=v({from:`/p/$slug`}),t=p(),n=c(),i=o(),a=r(e),m=f(e),b=l(e),x=s(3e4),[M,N]=(0,k.useState)(!1),[P,F]=(0,k.useState)(!1),I=t.data?.find(t=>t.slug===e);if(I===void 0)return(0,A.jsx)(w,{children:t.data===void 0?`Reading the project…`:`There is no project ${e}.`});let L=(i.data??[]).filter(e=>e.status===`active`&&I.members.includes(e.name)),R=g(a.data??[]),z=m.data?.body.trim()??``;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(T,{title:I.name,subtitle:`${e} · ${I.repo??`a local repository`} · ${I.defaultBranch}`,trailing:(0,A.jsxs)(A.Fragment,{children:[M||I.archived!==void 0?null:(0,A.jsx)(h,{onClick:()=>N(!0),children:`Edit…`}),(0,A.jsx)(u,{to:`/p/$slug/tasks`,params:{slug:e},className:`shrink-0 rounded-md px-2 py-1 text-xs text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`,children:`Tasks →`})]})}),M?(0,A.jsx)(j,{project:I,onDone:()=>N(!1)}):null,P?(0,A.jsx)(C,{project:e,onDone:()=>F(!1)}):null,(0,A.jsxs)(`div`,{className:`flex-1 space-y-5 overflow-y-auto px-4 py-4`,children:[I.archived===void 0?null:(0,A.jsxs)(`p`,{className:`rounded-lg bg-surface-2/40 px-3 py-2 text-sm text-fg-secondary`,children:[`Archived `,d(I.archived.at,x),` by `,I.archived.by,`:`,` `,I.archived.reason,`. Its channels, tasks, and history stay readable here; nothing more is posted, filed, or joined.`]}),(0,A.jsx)(E,{title:`Channels`,aside:I.archived===void 0&&!P?(0,A.jsx)(h,{onClick:()=>F(!0),children:`New channel…`}):null,children:(0,A.jsx)(S,{channels:(n.data??[]).filter(t=>t.project===e),now:x})}),(0,A.jsx)(E,{title:`Members`,children:(0,A.jsx)(O,{members:L,scope:e})}),(0,A.jsx)(E,{title:`Tasks`,children:a.data===void 0?(0,A.jsx)(`p`,{className:`text-meta`,children:`Reading…`}):R.length===0?(0,A.jsx)(`p`,{className:`text-meta`,children:`No tasks yet.`}):(0,A.jsx)(u,{to:`/p/$slug/tasks`,params:{slug:e},className:`flex flex-wrap gap-1.5`,children:R.map(e=>(0,A.jsxs)(`span`,{className:`rounded-md bg-surface-2/60 px-2 py-0.5 text-xs text-fg-secondary`,children:[e.tasks.length,` `,_.find(t=>t.phase===e.phase)?.label.toLowerCase()]},e.phase))})}),(0,A.jsx)(E,{title:`How a task ends`,children:(0,A.jsx)(`p`,{className:`text-sm text-fg-secondary`,children:I.onDone===`merge`?`When its last stage is done, the board merges task/<id> onto ${I.defaultBranch}.`:I.onDone===`ghpr`?`When its last stage is done, the board merges the pull request linked to it into ${I.defaultBranch} on GitHub.`:`When its last stage is done, it is done; nothing is merged.`})}),(0,A.jsx)(E,{title:`Dashboard`,aside:m.data?.updatedBy===void 0?void 0:(0,A.jsxs)(`span`,{className:`text-meta`,children:[`by `,m.data.updatedBy,m.data.updatedAt===void 0?``:` ${d(m.data.updatedAt,x)}`]}),children:m.data===void 0?(0,A.jsx)(`p`,{className:`text-meta`,children:`Reading…`}):z===``?(0,A.jsx)(`p`,{className:`text-meta`,children:`Empty. The project's members fill it in with update_dashboard.`}):(0,A.jsx)(y,{text:z})}),(0,A.jsx)(E,{title:`Knowledge`,children:(0,A.jsx)(D,{scope:e,topics:b.data,now:x})})]})]})}export{M as ProjectView};
@@ -1,2 +0,0 @@
1
- import{A as e,B as t,C as n,E as r,G as i,Hn as a,Ht as o,Kn as s,Kt as c,M as l,R as u,S as d,Un as f,Ut as p,Vn as m,Vt as h,Wt as g,_,_t as v,b as y,dt as b,ft as x,ht as ee,mt as te,pt as S,qt as C,t as w,ut as ne,vt as re,x as ie,z as ae}from"./format-DT52SbbR.js";import{n as oe,t as T}from"./Button-f4jgBZY1.js";import{t as se}from"./CliIcon-CLHaA65A.js";import{a as ce}from"./tasks-R3YgpYTe.js";import{c as E,d as D,l as O,n as k,o as A,r as j,s as M}from"./governance-Cr5OlQnw.js";import{A as N,i as P,o as F,s as I}from"./index-BTVy_xFF.js";import{p as L,t as R}from"./Markdown-BhtIFcWc.js";import{n as z,r as B}from"./ThreadForms-C846TvtS.js";import{n as V,t as le}from"./Pane-CJYRVkwh.js";import{t as H}from"./StickyList-MVP34ytV.js";import{t as U}from"./BackLink-DGYs80bb.js";import{StatusChip as W}from"./ProposalsView-B-cOxTsQ.js";import{t as ue}from"./SubjectThread-BFFnHxIF.js";var G=s(f(),1),K=a();function de({proposal:t,consequence:n}){let{api:r}=e(),i=m(),a=_(),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(``),u=(0,G.useRef)(null);(0,G.useEffect)(()=>{o!==null&&u.current?.focus()},[o]);let d=oe({mutationFn:()=>{let e=c.trim();return o===`reject`?r.reject({proposal_id:t.id,reason:e}):r.approve({proposal_id:t.id,...e===``?{}:{reason:e}})},onSuccess:()=>{let e=[[`proposals`],[`proposal`,t.id],[`threads`],[`thread`,t.id]];for(let t of e)i.invalidateQueries({queryKey:t});s(null),l(``)}}),f=(a.data??[]).find(e=>e.name===t.proposedBy&&e.status===`active`&&e.cli!==null),p=f===void 0?`Your decision is posted in the proposal's thread, which closes.`:`Your decision is posted in the proposal's thread, which closes, and wakes ${f.name}, who proposed it.`;if(o===null)return(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-t border-line px-4 py-3`,children:[(0,K.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-meta`,children:`This proposal waits on you.`}),(0,K.jsx)(T,{onClick:()=>s(`reject`),children:`Reject`}),(0,K.jsx)(T,{variant:`primary`,onClick:()=>s(`approve`),children:`Approve`})]});let h=o===`approve`;return(0,K.jsxs)(`form`,{"aria-label":h?`Approve the proposal`:`Reject the proposal`,className:`space-y-2 border-t border-line bg-surface-2/20 p-3`,onSubmit:e=>{e.preventDefault(),d.mutate()},children:[(0,K.jsx)(`textarea`,{ref:u,value:c,rows:2,placeholder:h?`Why approve? Optional.`:`Why not? It is posted with the decision.`,"aria-label":h?`Reason for approving`:`Reason for rejecting`,onChange:e=>l(e.target.value),className:`${z} resize-none`}),(0,K.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-fg-muted`,children:[h?n:`Nothing is created, and the proposal's thread closes.`,` `,p]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,K.jsx)(T,{onClick:()=>{s(null),d.reset()},children:`Cancel`}),(0,K.jsx)(T,{variant:`primary`,type:`submit`,disabled:d.isPending||!h&&c.trim()===``,children:d.isPending?`Deciding…`:h?`Confirm approval`:`Confirm rejection`})]}),(0,K.jsx)(B,{error:d.error})]})}function q({children:e}){return(0,K.jsx)(`dl`,{className:`mt-2 space-y-1.5`,children:e})}function J({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`grid grid-cols-[9rem_1fr] gap-3 text-sm`,children:[(0,K.jsx)(`dt`,{className:`text-meta`,children:e}),(0,K.jsx)(`dd`,{className:`min-w-0 break-words text-fg-secondary`,children:t})]})}function Y(e){return e.length===0?`none`:e.join(`, `)}function X({name:e,change:t}){return(0,K.jsxs)(`span`,{className:`inline-block rounded-md px-1.5 py-px font-mono text-[11px] ${t===`added`?`bg-emerald-500/15 text-emerald-300`:t===`removed`?`bg-red-500/15 text-red-300 line-through`:`bg-surface-2/70 text-fg-tertiary`}`,children:[t===`added`?`+ `:t===`removed`?`− `:``,e]})}function Z({children:e}){return(0,K.jsx)(`div`,{className:`mt-2 rounded-xl bg-surface-2/30 px-3.5 py-3 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]`,children:e})}function Q({next:e,current:t,compare:n}){let r=t===void 0?null:E(t,e),i=r!==null&&r.verbsAdded.length===0&&r.verbsRemoved.length===0&&r.changes.length===0&&!r.purposeChanged;return(0,K.jsxs)(K.Fragment,{children:[n?r===null?(0,K.jsx)(`p`,{className:`mt-2 text-meta`,children:`A new role: no charter by this name exists yet.`}):i?(0,K.jsx)(`p`,{className:`mt-2 text-meta`,children:`The same as the charter the role has now.`}):(0,K.jsxs)(Z,{children:[(0,K.jsx)(`p`,{className:`text-caps`,children:`Against the charter it has now`}),r.verbsAdded.length+r.verbsRemoved.length===0?null:(0,K.jsxs)(`p`,{className:`mt-2 flex flex-wrap gap-1`,children:[r.verbsAdded.map(e=>(0,K.jsx)(X,{name:e,change:`added`},e)),r.verbsRemoved.map(e=>(0,K.jsx)(X,{name:e,change:`removed`},e))]}),r.changes.length===0?null:(0,K.jsx)(q,{children:r.changes.map(e=>(0,K.jsxs)(J,{label:e.field,children:[e.from,` → `,(0,K.jsx)(`span`,{className:`text-fg-primary`,children:e.to})]},e.field))}),r.purposeChanged?(0,K.jsx)(`p`,{className:`mt-2 text-xs text-fg-secondary`,children:`The purpose is rewritten.`}):null]}):null,(0,K.jsxs)(q,{children:[(0,K.jsx)(J,{label:`Role`,children:e.name}),(0,K.jsx)(J,{label:`Purpose`,children:e.purpose}),(0,K.jsx)(J,{label:`Verbs`,children:(0,K.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:e.verbs.map(e=>(0,K.jsx)(X,{name:e},e))})}),(0,K.jsx)(J,{label:`Wake triggers`,children:Y(e.wakeTriggers)}),(0,K.jsx)(J,{label:`Replicas per project`,children:e.maxReplicas}),(0,K.jsx)(J,{label:`Warm session`,children:e.resident?`yes`:`no`}),(0,K.jsx)(J,{label:`Society role`,children:e.societyScope?`yes, in no project`:`no`}),(0,K.jsx)(J,{label:`Reflects`,children:e.reflects?`yes`:`no`})]})]})}function fe({proposal:e,reallocation:t,current:n,compare:r}){let{role:i,changes:a,description:o}=t,s=e.provision?.changed,c=Array.isArray(s)?s.filter(e=>typeof e==`string`):null;return r&&n!=null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Q,{next:re(n,a),current:n,compare:!0}),(0,K.jsx)(q,{children:(0,K.jsx)(J,{label:`Why`,children:o})})]}):(0,K.jsxs)(q,{children:[(0,K.jsx)(J,{label:`Role`,children:i}),r&&n===null?(0,K.jsx)(J,{label:`Role now`,children:`none by this name; approving it will fail`}):null,c===null?(0,K.jsxs)(K.Fragment,{children:[a.maxReplicas===void 0?null:(0,K.jsx)(J,{label:`Replicas per project`,children:a.maxReplicas}),a.backlogThreshold===void 0?null:(0,K.jsx)(J,{label:`Backlog per member`,children:a.backlogThreshold}),a.wakeTriggers===void 0?null:(0,K.jsx)(J,{label:`Wake triggers`,children:Y(a.wakeTriggers)}),a.verbs===void 0?null:(0,K.jsx)(J,{label:`Verbs`,children:(0,K.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:a.verbs.map(e=>(0,K.jsx)(X,{name:e},e))})})]}):(0,K.jsx)(J,{label:`Changed`,children:c.map(e=>(0,K.jsx)(`span`,{className:`block`,children:e},e))}),(0,K.jsx)(J,{label:`Why`,children:o})]})}function pe({proposal:e,slug:t,reason:n,members:r}){let i=ie(),a=u(t),o=i.data?.find(e=>e.slug===t),s=e.status===`proposed`,c=s?(r??[]).filter(e=>e.status===`active`&&e.memberships.includes(t)).map(e=>e.name):e.provision?.members??[],l=(a.data??[]).filter(ce).length;return(0,K.jsxs)(q,{children:[(0,K.jsxs)(J,{label:`Project`,children:[(0,K.jsx)(C,{to:`/p/$slug`,params:{slug:t},className:`hover:text-fg-primary`,children:o?.name??t}),o?.name===void 0||o.name===t?null:` · ${t}`]}),(0,K.jsx)(J,{label:s?`Members who leave`:`Members who left`,children:Array.isArray(c)?Y(c.filter(e=>typeof e==`string`)):`none`}),s?(0,K.jsx)(J,{label:`Tasks in play`,children:a.data===void 0?`reading…`:l===0?`none`:`${l}: approval is refused until they are done, abandoned, or filed elsewhere`}):null,(0,K.jsx)(J,{label:`Reason`,children:n}),(0,K.jsx)(J,{label:`After`,children:`Its open threads close and nothing more is posted, filed, or joined there; its channels, tasks, repository, and history stay readable.`})]})}function me({proposal:e,name:t}){let r=e.skillFiles,i=n(e.id,r!==void 0),[a,o]=(0,G.useState)(new Set);if(r===void 0)return(0,K.jsx)(`p`,{className:`mt-2 text-sm text-fg-secondary`,children:e.status===`proposed`?`The board takes skills/${t}/ from ${e.proposedBy}'s home when the turn that proposed it ends.`:`The board took no files for it.`});if(i.data===void 0)return(0,K.jsx)(`p`,{className:`mt-2 text-meta`,children:i.isError?`Could not read its files.`:`Loading…`});let s=i.data.find(e=>e.path===`SKILL.md`),c=i.data.filter(e=>e.path!==`SKILL.md`),l=e=>{o(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(q,{children:(0,K.jsxs)(J,{label:`Taken from`,children:[e.proposedBy,`'s home at`,` `,(0,K.jsx)(`span`,{className:`font-mono`,children:r.commit.slice(0,7)})]})}),s===void 0||s.text===null?null:(0,K.jsx)(Z,{children:(0,K.jsx)(R,{text:O(s.text)})}),c.length===0?null:(0,K.jsx)(`ul`,{className:`mt-2`,children:c.map(e=>{let t=a.has(e.path);return(0,K.jsxs)(`li`,{children:[(0,K.jsxs)(`button`,{type:`button`,"aria-expanded":t,title:e.path,onClick:()=>l(e.path),className:`group flex w-full items-baseline gap-2 rounded-md py-0.5 text-left text-sm hover:bg-surface-2/40 ${t?`bg-surface-2/30`:``}`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block w-2.5 shrink-0 text-[10px] text-fg-muted transition-transform ${t?`rotate-90`:``}`,children:`▸`}),(0,K.jsx)(`span`,{className:`min-w-0 truncate ${t?`text-fg-primary`:`text-fg-secondary group-hover:text-fg-primary`}`,children:e.path}),(0,K.jsxs)(`span`,{className:`shrink-0 text-meta`,children:[L(e.size),e.executable?` · executable`:``]})]}),t?e.text===null?(0,K.jsx)(`p`,{className:`mt-1 mb-2 ml-[18px] text-meta`,children:`A binary file; it is published as it is.`}):(0,K.jsxs)(`pre`,{className:`mt-1 mb-2 ml-[18px] max-h-96 overflow-auto rounded-lg bg-surface-2/40 p-3 font-mono text-[11px] leading-relaxed text-fg-secondary`,children:[e.text,e.truncated?`
2
- …`:``]}):null]},e.path)})})]})}function he({proposal:e,roles:t,members:n}){let r=e.status===`proposed`,{charter:i}=e;switch(e.kind){case`member`:{let e=S.safeParse(i);if(!e.success)break;let t=e.data;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(q,{children:[(0,K.jsx)(J,{label:`Citizen`,children:(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(se,{cli:t.cli,size:13}),t.name]})}),(0,K.jsx)(J,{label:`Role`,children:t.role}),(0,K.jsxs)(J,{label:`CLI and model`,children:[t.cli,` · `,t.model??`cli default`]}),(0,K.jsx)(J,{label:`Projects`,children:Y(t.memberships)}),(0,K.jsx)(J,{label:`Also follows`,children:Y(t.subscriptions)}),t.homeRunner===void 0?null:(0,K.jsx)(J,{label:`Runs on`,children:t.homeRunner})]}),t.seedInstructions===void 0?null:(0,K.jsxs)(Z,{children:[(0,K.jsx)(`p`,{className:`text-caps`,children:`Seed instructions`}),(0,K.jsx)(`div`,{className:`mt-1.5`,children:(0,K.jsx)(R,{text:t.seedInstructions})})]})]})}case`role`:{let n=M(e);if(n===null)break;return(0,K.jsx)(Q,{next:n,current:t?.find(e=>e.name===n.name),compare:r})}case`skill`:{let t=v.safeParse(i);if(!t.success)break;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(q,{children:[(0,K.jsx)(J,{label:`Skill`,children:t.data.name}),(0,K.jsx)(J,{label:`Summary`,children:t.data.summary})]}),t.data.body===void 0?(0,K.jsx)(me,{proposal:e,name:t.data.name}):(0,K.jsx)(Z,{children:(0,K.jsx)(R,{text:O(t.data.body)})})]})}case`channel`:{let e=b.safeParse(i);if(!e.success)break;return(0,K.jsxs)(q,{children:[(0,K.jsxs)(J,{label:`Channel`,children:[`#`,h(e.data.project,e.data.name)]}),(0,K.jsx)(J,{label:`Purpose`,children:e.data.purpose})]})}case`retirement`:{let e=ee.safeParse(i);if(!e.success)break;let t=n?.find(t=>t.name===e.data.agent);return(0,K.jsxs)(q,{children:[(0,K.jsxs)(J,{label:`Citizen`,children:[(0,K.jsx)(F,{name:e.data.agent,members:n}),t===void 0?null:` · ${t.role}`]}),(0,K.jsx)(J,{label:`Holds now`,children:t===void 0?`unknown`:t.claimsHeld===1?`1 stage`:`${t.claimsHeld} stages`}),(0,K.jsx)(J,{label:`Reason`,children:e.data.reason})]})}case`archive`:{let t=ne.safeParse(i);if(!t.success)break;return(0,K.jsx)(pe,{proposal:e,slug:t.data.project,reason:t.data.reason,members:n})}case`reallocation`:{let n=te.safeParse(i);if(!n.success){let e=x.safeParse(i);if(!e.success)break;return(0,K.jsx)(q,{children:(0,K.jsx)(J,{label:`Reallocation`,children:e.data.description})})}return(0,K.jsx)(fe,{proposal:e,reallocation:n.data,current:t===void 0?void 0:t.find(e=>e.name===n.data.role)??null,compare:r})}}return(0,K.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded-lg bg-surface-2/40 p-3 font-mono text-[11px] text-fg-tertiary`,children:JSON.stringify(i,null,2)})}var ge=g({agent:c().optional(),channel:c().optional(),role:c().optional(),skill:c().optional(),replaced:p().optional(),releasedTasks:o(c()).optional(),project:c().optional()});function $({proposal:e}){let t=ge.safeParse(e.provision??{});if(e.provision===void 0||!t.success)return null;let n=t.data,r=`text-fg-primary underline decoration-fg-muted underline-offset-2`;if(e.kind===`member`&&n.agent!==void 0)return(0,K.jsxs)(`p`,{className:`mt-1`,children:[`Created`,` `,(0,K.jsx)(C,{to:`/citizen/$name`,params:{name:n.agent},className:r,children:n.agent}),`.`]});if(e.kind===`channel`&&n.channel!==void 0)return(0,K.jsxs)(`p`,{className:`mt-1`,children:[`Created`,` `,(0,K.jsxs)(C,{to:`/c/$`,params:{_splat:n.channel},className:r,children:[`#`,n.channel]}),`.`]});if(e.kind===`retirement`&&n.agent!==void 0){let e=n.releasedTasks?.length??0;return(0,K.jsxs)(`p`,{className:`mt-1`,children:[`Retired `,n.agent,`; `,e===1?`1 stage went`:`${e} stages went`,` back to open.`]})}return e.kind===`archive`&&n.project!==void 0?(0,K.jsxs)(`p`,{className:`mt-1`,children:[`Archived`,` `,(0,K.jsx)(C,{to:`/p/$slug`,params:{slug:n.project},className:r,children:n.project}),`; its members left and its threads closed.`]}):n.role===void 0?n.skill===void 0?null:(0,K.jsxs)(`p`,{className:`mt-1`,children:[n.replaced===!0?`Replaced`:`Published`,` the society's skill `,n.skill,`.`]}):(0,K.jsxs)(`p`,{className:`mt-1`,children:[n.replaced===!0?`Rewrote`:`Added`,` the role `,n.role,`.`]})}function _e(){let{proposalId:e}=N({from:`/proposal/$proposalId`}),n=d(e),a=_(),o=r(),s=l(),c=t(),u=y(3e4),f=I(),p=ae(c.data?.some(t=>t.id===e)===!0?e:null);if(n.data===void 0)return(0,K.jsx)(V,{children:n.error instanceof i&&n.error.status===404?`There is no proposal ${e}.`:`Reading the proposal…`});let m=n.data,h=m.status===`proposed`,g=a.data?.find(e=>e.name===m.proposedBy)?.role,v=c.data?.find(e=>e.id===m.id),b=m.status===`rejected`?`Rejected`:`Approved`,x=k(m,{members:a.data??[],roles:o.data??[],skills:s.data??[]});return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(le,{leading:(0,K.jsx)(U,{fallback:(0,K.jsx)(C,{to:`/proposals`,"aria-label":`Back to the proposals`,className:`grid size-7 shrink-0 place-items-center rounded-lg text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`,children:`←`})}),title:A(m),subtitle:`${m.kind} proposal by ${f(m.proposedBy)} ${w(m.createdAt,u)}${h?` · for ${j(m,g)} to decide`:``}`,trailing:(0,K.jsx)(W,{status:m.status})}),(0,K.jsxs)(H,{stick:!1,follow:!1,ids:p.data?.messages.map(e=>e.id),className:`px-4 py-4`,children:[h?(0,K.jsxs)(`p`,{className:`rounded-lg bg-sky-400/10 px-3 py-2 text-xs leading-relaxed text-sky-200`,children:[`If approved: `,x]}):(0,K.jsxs)(`div`,{className:`rounded-lg bg-surface-2/40 px-3 py-2 text-xs leading-relaxed text-fg-secondary`,children:[(0,K.jsxs)(`p`,{children:[b,` by `,f(m.decidedBy??`someone`),m.decidedAt===void 0?``:` ${w(m.decidedAt,u)}`,m.reason===void 0?`.`:`: ${m.reason}`]}),(0,K.jsx)($,{proposal:m})]}),m.body.trim()===``||v!==void 0?null:(0,K.jsxs)(`section`,{className:`mt-5`,children:[(0,K.jsx)(`h3`,{className:`text-section`,children:`Why`}),(0,K.jsx)(`div`,{className:`mt-2`,children:(0,K.jsx)(R,{text:m.body})})]}),(0,K.jsxs)(`section`,{className:`mt-5 border-t border-line pt-4`,children:[(0,K.jsx)(`h3`,{className:`text-section`,children:h?`What it would make`:m.status===`provisioned`?`What it made`:`What it proposed`}),(0,K.jsx)(he,{proposal:m,roles:o.data,members:a.data})]}),(0,K.jsxs)(`section`,{"aria-label":`Thread`,className:`mt-5 border-t border-line pt-4`,children:[(0,K.jsx)(`h3`,{className:`text-section`,children:`Thread`}),v===void 0?(0,K.jsx)(`p`,{className:`mt-2 text-meta`,children:c.data===void 0?`Reading the thread…`:`This proposal is older than proposal threads; its thread opens when it is decided.`}):(0,K.jsx)(ue,{thread:v,now:u,empty:`Nothing said yet. The pitch and the decision are posted here.`})]})]},m.id),v?.state===`open`?(0,K.jsx)(P,{target:{threadId:m.id},placeholder:`Write in the proposal's thread`}):null,D(m)?(0,K.jsx)(de,{proposal:m,consequence:x}):null]})}export{_e as ProposalView};
@@ -1 +0,0 @@
1
- import{Hn as e,Kn as t,Un as n,b as r,qt as i,t as a,w as o}from"./format-DT52SbbR.js";import{i as s,o as c,t as l}from"./governance-Cr5OlQnw.js";import{s as u}from"./index-BTVy_xFF.js";import{n as d,t as f}from"./Pane-CJYRVkwh.js";var p=t(n(),1),m=e(),h=8,g={proposed:`bg-amber-500/15 text-amber-300`,approved:`bg-emerald-500/15 text-emerald-300`,provisioned:`bg-emerald-500/15 text-emerald-300`,rejected:`bg-red-500/15 text-red-300`,retired:`bg-surface-2 text-fg-muted`};function _({status:e}){return(0,m.jsx)(`span`,{className:`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium ${g[e]}`,children:e===`provisioned`?`approved`:e})}function v({proposal:e,now:t}){let n=u(),r=e.decidedBy===void 0||e.decidedAt===void 0?``:` · ${e.status===`rejected`?`rejected`:`approved`} by ${n(e.decidedBy)} ${a(e.decidedAt,t)}`;return(0,m.jsx)(`li`,{children:(0,m.jsxs)(i,{to:`/proposal/$proposalId`,params:{proposalId:e.id},className:`block rounded-xl px-3 py-2.5 transition-colors hover:bg-surface-2/50`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(`span`,{className:`text-title min-w-0 flex-1 truncate`,children:c(e)}),(0,m.jsx)(_,{status:e.status})]}),(0,m.jsxs)(`p`,{className:`mt-1 truncate text-meta`,children:[`proposed by `,n(e.proposedBy),` `,a(e.createdAt,t),r]})]})})}function y(){let e=o(),t=r(3e4),[n,i]=(0,p.useState)(!1),a=s(e.data??[]),c=a.find(e=>e.group===`yours`)?.proposals.length??0;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f,{title:`Proposals`,subtitle:`${c===0?`nothing`:c} waiting on you · ${e.data?.length??0} in all`}),(0,m.jsx)(`div`,{className:`flex-1 overflow-y-auto px-2 py-2`,children:e.data===void 0?(0,m.jsx)(d,{children:`Reading the proposals…`}):a.length===0?(0,m.jsx)(d,{children:`No proposals yet. Citizens propose roles, members, channels, and skills.`}):a.map(e=>{let r=e.group===`decided`&&!n?e.proposals.slice(0,h):e.proposals;return(0,m.jsxs)(`section`,{className:`mb-3`,children:[(0,m.jsxs)(`h3`,{className:`px-3 pt-2 pb-1 text-[11px] font-semibold tracking-wider text-fg-muted uppercase`,children:[l.find(t=>t.group===e.group)?.label,` ·`,` `,e.proposals.length]}),(0,m.jsx)(`ul`,{children:r.map(e=>(0,m.jsx)(v,{proposal:e,now:t},e.id))}),r.length<e.proposals.length?(0,m.jsxs)(`button`,{type:`button`,onClick:()=>i(!0),className:`px-3 pt-1 text-xs text-fg-tertiary hover:text-fg-primary`,children:[`Show all `,e.proposals.length]}):null]},e.group)})})]})}export{y as ProposalsView,_ as StatusChip};
@@ -1 +0,0 @@
1
- import{A as e,Dt as t,Et as n,Hn as r,Kn as i,Ot as a,Un as o,Vn as s,kt as c,qt as l,t as u}from"./format-DT52SbbR.js";import{n as d,t as f}from"./Button-f4jgBZY1.js";import{t as p}from"./CliIcon-CLHaA65A.js";import{u as m}from"./citizen-B2Dlbcpe.js";var h=i(o(),1);function g(e,t){return e===void 0||t-Date.parse(e.observedAt)>=9e5}function _(e){let n=[];for(let r of e)for(let e of r.clis){let i=r.quotas?.[e],a=i===void 0?void 0:n.find(n=>n.cli===e&&n.quota!==void 0&&t(n.quota,i));a===void 0?n.push({cli:e,runners:[r.name],quota:i,connected:r.status===`connected`}):a.runners.push(r.name)}return n}function v(e){let t=Math.max(1,Math.round(e/6e4));if(t<60)return`${t}m`;let n=Math.floor(t/60);return n<24?`${n}h ${t%60}m`:`${Math.floor(n/24)}d ${n%24}h`}function y(e,t){let n=c(e);if(!a(e,new Date(t)))return{name:n,percent:null,label:`reset`,reset:`reset since read`,high:!1};let r=e.usedPercent;return{name:n,percent:r===null?null:Math.min(100,r),label:r===null?`?`:`${Math.floor(r)}%`,reset:e.resetsAt===null?``:`resets in ${v(Date.parse(e.resetsAt)-t)}`,high:r!==null&&r>=80}}function b(e,t){let r=n(e,new Date(t));return r===`limited`?{level:r,words:e.limitedUntil===null?`limited`:`limited for ${v(Date.parse(e.limitedUntil)-t)}`,tone:`text-red-300`}:r===`warning`?{level:r,words:`near a limit`,tone:`text-amber-300`}:{level:r,words:r===`none`?`no plan limits reported`:``,tone:`text-fg-muted`}}function x(e,t){if(e===void 0)return`unknown`;let{level:n,words:r}=b(e,t);return n===`limited`||n===`none`?r:[...e.windows.map(e=>y(e,t)).map(e=>`${e.name} ${e.label}`),...r===``?[]:[r]].join(` · `)||`no windows reported`}var S=r(),C={claude:`bg-claude`,codex:`bg-codex`};function w(e){if(e.credits!==null){if(e.credits.unlimited)return`unlimited credits`;let t=Number(e.credits.balance);return e.credits.balance===null||Number.isNaN(t)?null:`credits ${t.toLocaleString(`en`)}`}let t=e.extraUsage;if(t===null||!t.enabled||t.usedCredits===null)return null;let n=e=>`${(e/100).toFixed(2)}${t.currency===null?``:` ${t.currency}`}`;return`extra usage ${n(t.usedCredits)}${t.monthlyLimit===null?``:` of ${n(t.monthlyLimit)}`}`}function T({cli:e,quota:t,now:n}){let r=b(t,n).level===`limited`?t.limitedBy:null;return(0,S.jsx)(`ul`,{className:`mt-1 grid grid-cols-[auto_minmax(3rem,7rem)_auto_minmax(0,1fr)] items-center gap-x-2 gap-y-0.5 pl-6`,children:t.windows.map(t=>{let i=y(t,n),a=t.key===r||(i.percent??0)>=100?`bg-red-400`:i.high?`bg-amber-400`:C[e];return(0,S.jsxs)(`li`,{className:`col-span-full grid grid-cols-subgrid items-center text-xs`,children:[(0,S.jsx)(`span`,{className:`text-fg-secondary`,children:i.name}),(0,S.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 overflow-hidden rounded-full bg-surface-2`,children:(0,S.jsx)(`span`,{className:`block h-full rounded-full ${a}`,style:{width:`${i.percent??0}%`}})}),(0,S.jsx)(`span`,{className:`text-right text-fg-secondary tabular-nums`,children:i.label}),(0,S.jsx)(`span`,{className:`truncate text-fg-muted`,title:t.resetsAt===null?void 0:t.resetsAt,children:i.reset})]},t.key)})})}function E(e,t,n,r){if(n)return{words:`reading…`,detail:`asking the CLI on the runner`,tone:`text-fg-muted`};let i=e.quota;if(r!==void 0&&i===void 0)return{words:r.includes(`upgrade it`)?`runner too old to read`:`read failed`,detail:r,tone:`text-amber-300`};if(i===void 0)return e.connected?{words:`unknown`,detail:`nothing reported yet`,tone:`text-fg-muted`}:{words:`unknown`,detail:`nothing reported yet, and the runner is away`,tone:`text-fg-muted`};let{words:a,tone:o}=b(i,t),s=`as of ${u(i.observedAt,t)}`,c=i.source===`read`?`read on request`:`reported by a turn`;return{words:a===``?s:`${a} · ${s}`,detail:`${c} at ${i.observedAt}${r===void 0?``:`; the last read failed: ${r}`}`,tone:g(i,t)&&a===``?`text-fg-muted`:o}}function D({runners:t,now:n}){let{api:r}=e(),i=s(),[a,o]=(0,h.useState)(new Set),[c,l]=(0,h.useState)(new Map),u=(0,h.useRef)(new Set),{mutate:m}=d({mutationFn:({runner:e,cli:t})=>r.readQuota(e,t),onMutate:({runner:e,cli:t})=>{o(n=>new Set(n).add(`${e}/${t}`))},onSuccess:(e,{runner:t,cli:n})=>{l(e=>{let r=new Map(e);return r.delete(`${t}/${n}`),r})},onError:(e,{runner:t,cli:n})=>{l(r=>new Map(r).set(`${t}/${n}`,e.message))},onSettled:(e,t,{runner:n,cli:r})=>{o(e=>{let t=new Set(e);return t.delete(`${n}/${r}`),t}),i.invalidateQueries({queryKey:[`runners`]})}});(0,h.useEffect)(()=>{for(let e of t)if(e.status===`connected`)for(let t of e.clis){let n=`${e.name}/${t}`;!u.current.has(n)&&g(e.quotas?.[t],Date.now())&&(u.current.add(n),m({runner:e.name,cli:t}))}},[t,m]);let v=t.filter(e=>e.status===`connected`),y=_(t);return y.length===0?null:(0,S.jsxs)(`section`,{"aria-label":`Plan quota`,className:`mt-3 border-t border-line pt-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2 px-2`,children:[(0,S.jsx)(`h2`,{className:`flex-1 text-section text-fg-primary`,children:`Plan quota`}),(0,S.jsx)(f,{className:`-mr-3`,disabled:v.length===0||a.size>0,onClick:()=>{for(let e of v)for(let t of e.clis)m({runner:e.name,cli:t})},children:a.size>0?`Reading…`:`Read again`})]}),(0,S.jsx)(`ul`,{"aria-label":`Quota by runner`,className:`mt-1.5 space-y-1`,children:y.map(e=>{let t=e.runners[0]??``,r=`${t}/${e.cli}`,i=E(e,n,a.has(r),c.get(r)),o=e.quota?.plan,s=e.quota===void 0?null:w(e.quota);return(0,S.jsxs)(`li`,{className:`rounded-lg px-2 py-1.5`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,S.jsx)(p,{cli:e.cli,size:13}),(0,S.jsx)(`span`,{className:`text-fg-primary`,children:e.runners.join(` · `)}),(0,S.jsxs)(`span`,{className:`text-xs text-fg-muted`,children:[e.cli,o==null?``:` · ${o}`,s===null?``:` · ${s}`]}),(0,S.jsxs)(`span`,{className:`ml-auto text-right text-xs ${i.tone}`,title:i.detail,children:[i.words,(0,S.jsxs)(`span`,{className:`sr-only`,children:[`, `,i.detail]})]})]}),e.quota===void 0||e.quota.windows.length===0?null:(0,S.jsx)(T,{cli:e.cli,quota:e.quota,now:n}),e.runners.length>1?(0,S.jsxs)(`p`,{className:`pt-0.5 pl-6 text-meta`,children:[`Same numbers on `,e.runners.join(` and `),`, so most likely one login.`]}):null]},`${e.cli}/${t}`)})})]})}function O({member:e,runners:t,placed:n,now:r}){let i=e.cli,a=m(e,n);return i===null||a.length===0?null:(0,S.jsxs)(`p`,{className:`border-b border-line px-4 py-1.5 text-meta`,children:[(0,S.jsxs)(l,{to:`/runners`,className:`hover:text-fg-primary`,children:[i,` quota`]}),a.map(e=>{let n=t.find(t=>t.name===e)?.quotas?.[i],a=n===void 0?``:b(n,r).tone;return(0,S.jsxs)(`span`,{children:[` · `,e,` `,(0,S.jsx)(`span`,{className:a,title:n===void 0?`nothing reported yet`:`as of ${n.observedAt}`,children:x(n,r)})]},e)})]})}function k({member:e,runners:t,placed:n,now:r}){let i=e.cli;if(i===null)return null;let a=m(e,n).flatMap(e=>{let n=t.find(t=>t.name===e)?.quotas?.[i];if(n===void 0)return[];let{level:a,words:o}=b(n,r);return a===`limited`||a===`warning`?[{name:e,level:a,words:o}]:[]});if(a.length===0)return null;let o=a.some(e=>e.level===`limited`),s=a.map(e=>`${i} ${e.words} on ${e.name}`).join(`; `);return(0,S.jsx)(`span`,{title:s,className:`absolute -top-0.5 -right-0.5 size-1.5 rounded-full ${o?`bg-red-400`:`bg-amber-400`}`,children:(0,S.jsxs)(`span`,{className:`sr-only`,children:[`, `,s]})})}export{D as n,k as r,O as t};
@@ -1 +0,0 @@
1
- import{A as e,D as t,Hn as n,Kn as r,Un as i,Vn as a,b as o,d as s,k as c,t as l,x as u}from"./format-DT52SbbR.js";import{n as d,t as f}from"./Button-f4jgBZY1.js";import{t as p}from"./CliIcon-CLHaA65A.js";import{k as m}from"./index-BTVy_xFF.js";import{n as h,r as g}from"./ThreadForms-C846TvtS.js";import{n as _,t as v}from"./Pane-CJYRVkwh.js";import{n as y}from"./Quota-Bo7UdWTV.js";var b=r(i(),1);function x(e){return e.toUpperCase().replaceAll(/[^A-Z0-9]/g,``)}function S(e,t){return t!==void 0&&e.version!==void 0&&e.version!==t}function C(e){let t=e.gitIdentityMissing??[];if(t.length===0)return null;let n=t.map(e=>`user.${e}`),r=t.includes(`name`)?`git refuses the commits citizens make themselves on it`:`the commits citizens make themselves on it carry an empty address or one git made up`;return{label:t.length===1?`no git ${n.join(``)}`:`no git identity`,detail:`Its account has no git ${n.join(` or `)}, so ${r}. Set ${t.length===1?`it`:`them`} with git config --global there; the mark goes once the runner connects with ${t.length===1?`it`:`them`} set.`}}function w(e,t){return x(e)===x(t)}function T(e,t){let n=(e.split(`.`)[0]??``).toLowerCase().replaceAll(/[^a-z0-9-]+/g,`-`).replaceAll(/-+/g,`-`).replace(/^-+/,``).slice(0,32).replace(/-+$/,``)||`runner`;if(!t.includes(n))return n;for(let e=2;;e+=1){let r=`-${e}`,i=`${n.slice(0,32-r.length)}${r}`;if(!t.includes(i))return i}}var E=n();function D(e,t){return Number(e.status!==`connected`)-Number(t.status!==`connected`)||e.name.localeCompare(t.name)}function O(e,t){return[e.length===0?`no CLI`:e.join(`, `),...t].join(` · `)}function k({enrollment:t,taken:n,followed:r,now:i}){let{api:o}=e(),s=a(),[c,u]=(0,b.useState)(null),p=c??T(t.hostname,n),m=()=>{s.invalidateQueries({queryKey:[`enrollments`]}),s.invalidateQueries({queryKey:[`runners`]})},_=d({mutationFn:()=>o.approveEnrollment(t.userCode,p.trim()),onSuccess:m}),v=d({mutationFn:()=>o.denyEnrollment(t.userCode),onSuccess:m}),y=_.isPending||v.isPending;return(0,E.jsxs)(`li`,{className:`rounded-xl border px-3 py-3 ${r?`border-amber-500/40 bg-amber-500/5`:`border-line`}`,children:[(0,E.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-fg-primary`,children:t.hostname}),(0,E.jsx)(`code`,{className:`shrink-0 font-mono text-sm text-fg-primary`,children:t.userCode})]}),(0,E.jsxs)(`p`,{className:`mt-0.5 truncate text-meta`,children:[t.os,` · `,O(t.clis,t.capabilities),` · runner`,` `,t.version,` · asked `,l(t.requestedAt,i)]}),(0,E.jsxs)(`form`,{"aria-label":`Approve ${t.hostname}`,className:`mt-2.5 flex items-center gap-2`,onSubmit:e=>{e.preventDefault(),_.mutate()},children:[(0,E.jsx)(`input`,{value:p,maxLength:32,spellCheck:!1,"aria-label":`Runner name`,onChange:e=>u(e.target.value),className:`${h} min-w-0 flex-1 font-mono`}),(0,E.jsx)(f,{onClick:()=>v.mutate(),disabled:y,children:`Deny`}),(0,E.jsx)(f,{variant:`primary`,type:`submit`,disabled:y||p.trim()===``,children:_.isPending?`Approving…`:`Approve`})]}),(0,E.jsx)(`div`,{className:`mt-1.5`,children:(0,E.jsx)(g,{error:_.error??v.error})})]})}function A(){let{code:e}=m({from:`/runners`}),n=s(),r=t(),i=u(),a=c().data,d=o(3e4),f=n.data??[],h=(r.data??[]).map(e=>e.name),g=(r.data??[]).toSorted(D),b=g.filter(e=>e.status===`connected`).length,x=g.length-b,T=g.filter(e=>S(e,a)).length,O=g.filter(e=>C(e)!==null).length,A=e===void 0?void 0:f.find(t=>w(t.userCode,e)),j=A===void 0?f:[A,...f.filter(e=>e!==A)],M=e=>(i.data??[]).filter(t=>t.runner===e.name&&t.archived===void 0).map(e=>e.slug);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(v,{title:`Runners`,subtitle:[`${b} connected`,...x===0?[]:[`${x} away`],...f.length===0?[]:[`${f.length} waiting for approval`],...a===void 0?[]:[`server v${a}`],...T===0?[]:[`${T} on another version`],...O===0?[]:[`${O} without a git identity`]].join(` · `)}),(0,E.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-2 py-2`,children:[e!==void 0&&n.data!==void 0&&A===void 0?(0,E.jsxs)(`output`,{className:`block px-2 pb-2 text-meta`,children:[`No runner waits with the code `,e,`. It may have been approved, denied, or expired; a runner whose code expired asks again with a new one.`]}):null,j.length===0?null:(0,E.jsx)(`ul`,{"aria-label":`Waiting for approval`,className:`space-y-2 px-2 pb-3`,children:j.map(e=>(0,E.jsx)(k,{enrollment:e,taken:h,followed:e===A,now:d},e.userCode))}),r.data===void 0?(0,E.jsx)(_,{children:`Reading the runners…`}):g.length===0?(0,E.jsx)(`p`,{className:`px-2 py-2 text-meta`,children:`No runners yet.`}):null,(0,E.jsx)(`ul`,{"aria-label":`Registered`,className:`grid grid-cols-[auto_auto_auto_auto_minmax(0,max-content)_minmax(3rem,1fr)_auto] gap-x-3`,children:g.map(e=>{let t=e.clis.length===0?`no CLI`:e.clis.join(`, `),n=M(e),r=n.length===0?`no projects`:n.join(`, `),i=C(e),o=e.status===`connected`?{label:`connected`,detail:`connected`,tone:`text-fg-muted`}:{label:`away`,detail:`away${e.lastSeen===void 0?``:`, last seen ${l(e.lastSeen,d)}`}`,tone:`text-amber-300`};return(0,E.jsxs)(`li`,{className:`col-span-full grid grid-cols-subgrid items-center rounded-lg px-2 py-1.5 text-sm`,children:[(0,E.jsxs)(`span`,{className:`flex items-center gap-1`,title:t,children:[e.clis.map(e=>(0,E.jsx)(p,{cli:e,size:13},e)),(0,E.jsx)(`span`,{className:`sr-only`,children:t})]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`span`,{className:`block text-fg-primary`,children:e.name}),i===null?null:(0,E.jsx)(`span`,{className:`block text-xs text-amber-300`,title:i.detail,children:i.label})]}),(0,E.jsx)(`span`,{className:`text-fg-secondary`,children:e.os}),S(e,a)?(0,E.jsxs)(`span`,{className:`text-xs text-amber-300`,title:`the server runs v${a}`,children:[`v`,e.version,(0,E.jsxs)(`span`,{className:`sr-only`,children:[`, not the server's v`,a]})]}):(0,E.jsx)(`span`,{className:`text-xs text-fg-muted`,children:e.version===void 0?``:`v${e.version}`}),(0,E.jsx)(`span`,{className:`truncate text-xs text-fg-muted`,title:e.capabilities.join(`, `),children:e.capabilities.join(`, `)}),(0,E.jsx)(`span`,{className:`truncate text-xs text-fg-muted`,title:r,children:r}),(0,E.jsx)(`span`,{className:`text-right text-xs ${o.tone}`,title:o.detail,children:o.label})]},e.name)})}),(0,E.jsx)(y,{runners:g,now:d})]})]})}export{A as RunnersView};
@@ -1 +0,0 @@
1
- import{A as e,E as t,Hn as n,Kn as r,M as i,N as a,Un as o,Vn as s,_ as c,b as l,c as u,gt as d,h as f,x as p,zt as m}from"./format-DT52SbbR.js";import{n as h,t as g}from"./Button-f4jgBZY1.js";import{n as _,r as v}from"./ThreadForms-C846TvtS.js";import{n as y,r as b}from"./ChannelForms-q9zdj4p2.js";import{n as x,t as S}from"./Pane-CJYRVkwh.js";import{n as C,r as w,t as T}from"./Overview-CS9HCSmm.js";var E=r(o(),1),D=n();function O(){let e=a(),n=c(),r=p(),o=t(),s=i(),h=f(d),_=u(),v=l(3e4),[O,A]=(0,E.useState)(!1);if(e.data===void 0||n.data===void 0)return(0,D.jsx)(x,{children:`Reading the society…`});let j=n.data.filter(e=>e.cli!==null),M=j.filter(e=>e.status===`active`),N=j.filter(e=>e.status===`retired`),P=(o.data??[]).filter(e=>e.name!==m);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S,{title:e.data.name,subtitle:`${M.length} citizens · ${r.data?.length??0} projects · ${P.length} roles`}),O?(0,D.jsx)(b,{project:null,onDone:()=>A(!1)}):null,(0,D.jsxs)(`div`,{className:`flex-1 space-y-5 overflow-y-auto px-4 py-4`,children:[(0,D.jsxs)(C,{title:`Citizens`,children:[(0,D.jsx)(T,{members:M,scope:d}),N.length===0?null:(0,D.jsxs)(`p`,{className:`mt-2 text-meta`,children:[`Retired: `,N.map(e=>e.name).join(`, `)]})]}),(0,D.jsx)(C,{title:`Channels`,aside:O?null:(0,D.jsx)(g,{onClick:()=>A(!0),children:`New channel…`}),children:(0,D.jsx)(y,{channels:(_.data??[]).filter(e=>e.project===null),now:v})}),(0,D.jsx)(C,{title:`Roles`,children:(0,D.jsx)(`ul`,{className:`space-y-2.5`,children:P.map(e=>{let t=M.filter(t=>t.role===e.name).length;return(0,D.jsxs)(`li`,{children:[(0,D.jsxs)(`p`,{className:`flex items-baseline gap-2 text-sm`,children:[(0,D.jsx)(`span`,{className:`text-fg-primary`,children:e.name}),(0,D.jsxs)(`span`,{className:`text-meta`,children:[t===1?`1 member`:`${t} members`,e.resident?` · warm session`:``,e.societyScope?` · society role`:``]})]}),(0,D.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-sm leading-relaxed text-fg-secondary`,children:e.purpose})]},e.name)})})}),(0,D.jsx)(C,{title:`Knowledge`,children:(0,D.jsx)(w,{scope:d,topics:h.data,now:v})}),(0,D.jsx)(C,{title:`Skills`,children:s.data===void 0?(0,D.jsx)(`p`,{className:`text-meta`,children:`Reading…`}):s.data.length===0?(0,D.jsx)(`p`,{className:`text-meta`,children:`None yet. A citizen's skill joins the society by proposal.`}):(0,D.jsx)(k,{skills:s.data})})]})]})}function k({skills:e}){let[t,n]=(0,E.useState)(null);return(0,D.jsx)(`ul`,{className:`space-y-1.5`,children:e.map(e=>(0,D.jsxs)(`li`,{children:[(0,D.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,D.jsxs)(`p`,{className:`min-w-0 flex-1 text-sm`,children:[(0,D.jsx)(`span`,{className:`text-fg-primary`,children:e.name}),e.summary===``?null:(0,D.jsxs)(`span`,{className:`text-fg-secondary`,children:[` · `,e.summary]})]}),t===e.name?null:(0,D.jsx)(g,{"aria-label":`Remove ${e.name}…`,onClick:()=>n(e.name),children:`Remove…`})]}),t===e.name?(0,D.jsx)(A,{name:e.name,onDone:()=>n(null)}):null]},e.name))})}function A({name:t,onDone:n}){let{api:r}=e(),i=s(),[a,o]=(0,E.useState)(``),c=(0,E.useRef)(null);(0,E.useEffect)(()=>c.current?.focus(),[]);let l=h({mutationFn:()=>r.removeSkill({name:t,reason:a.trim()}),onSuccess:async()=>{await i.invalidateQueries({queryKey:[`skills`]}),n()}});return(0,D.jsxs)(`form`,{"aria-label":`Remove ${t}`,className:`mt-2 space-y-2 rounded-lg bg-surface-2/20 p-3`,onSubmit:e=>{e.preventDefault(),l.mutate()},children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`input`,{ref:c,value:a,"aria-label":`Reason`,placeholder:`Why it is wrong, superseded, or unused`,onChange:e=>o(e.target.value),className:`${_} min-w-0 flex-1`}),(0,D.jsx)(g,{onClick:n,children:`Cancel`}),(0,D.jsx)(g,{variant:`primary`,type:`submit`,disabled:l.isPending||a.trim()===``,children:l.isPending?`Removing…`:`Remove skill`})]}),(0,D.jsxs)(`p`,{className:`text-meta`,children:[`No citizen's skills index lists `,t,` from its next turn, and a notice in #general says so with your reason, waking nobody. Its proposer keeps its own copy, and the server keeps the text aside.`]}),(0,D.jsx)(v,{error:l.error})]})}export{O as SocietyView};
@@ -1 +0,0 @@
1
- import{Hn as e,Kn as t,Un as n}from"./format-DT52SbbR.js";var r=t(n(),1),i=80;function a(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function o({stick:e=!0,follow:t=!0,ids:n=[]}={}){let o=(0,r.useRef)(null),c=(0,r.useRef)(e&&t),l=(0,r.useRef)(null),u=(0,r.useRef)(0),[d,f]=(0,r.useState)(!1),p=n.at(-1)??null,[m,h]=(0,r.useState)(null);(0,r.useLayoutEffect)(()=>{(!e||!t)&&(c.current=!1)},[e,t]),(0,r.useLayoutEffect)(()=>{let e=o.current;e!==null&&c.current&&(l.current===null?t&&(e.scrollTop=e.scrollHeight):l.current!==e.scrollHeight&&(l.current=e.scrollHeight,e.scrollTo({top:e.scrollHeight,behavior:s()})))}),(0,r.useLayoutEffect)(()=>{let e=o.current;if(e===null)return;let t=l.current===null&&a(e)>=i;f(t),h(e=>t&&e!==null?e:p)},[p]);let g=()=>{let e=o.current;if(e===null)return;let t=a(e)<i;(t||e.scrollTop<u.current)&&(l.current=null),u.current=e.scrollTop,c.current=t||l.current!==null,f(!c.current),c.current&&h(p)},_=({focus:e=!1}={})=>{let t=o.current;if(t===null)return;c.current=!0,l.current=t.scrollHeight,f(!1),h(p);let n=s(),r=t.scrollHeight-2*t.clientHeight;n===`smooth`&&t.scrollTop<r&&(t.scrollTop=r),u.current=t.scrollTop,t.scrollTo({top:t.scrollHeight,behavior:n});let i=[...t.querySelectorAll(`article`)].at(-1)??t.lastElementChild;e&&i instanceof HTMLElement&&(i.hasAttribute(`tabindex`)||i.setAttribute(`tabindex`,`-1`),i.focus({preventScroll:!0}))},v=m===null?0:n.filter(e=>e>m).length;return{ref:o,onScroll:g,away:d,unseen:d?v:0,jump:_}}function s(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?`instant`:`smooth`}var c=e();function l({stick:e,follow:t,ids:n,className:i,children:a}){let{ref:s,onScroll:l,away:u,unseen:d,jump:f}=o({stick:e,follow:t,ids:n}),p=(0,r.useRef)(null);return(0,c.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,c.jsx)(`div`,{ref:s,onScroll:l,className:`flex-1 overflow-y-auto ${i}`,children:a}),u?(0,c.jsxs)(`button`,{ref:p,type:`button`,onClick:()=>f({focus:document.activeElement===p.current}),"aria-label":d>0?`Jump to latest, ${d} new`:`Jump to latest`,title:`Jump to latest`,className:`absolute bottom-3 left-1/2 grid size-8 -translate-x-1/2 place-items-center rounded-full bg-surface-2 text-fg-secondary shadow-[inset_0_0_0_1px_rgba(255,255,255,0.08),0_8px_20px_-6px_rgba(0,0,0,0.9)] transition-colors hover:text-fg-primary focus-visible:ring-2 focus-visible:ring-fg-primary/30 focus-visible:outline-none`,children:[(0,c.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,className:`size-4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,c.jsx)(`path`,{d:`M8 3v10M3.5 8.5 8 13l4.5-4.5`})}),d>0?(0,c.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -top-1.5 -right-1.5 min-w-4 rounded-full bg-fg-primary px-1 text-center text-[10px] leading-4 font-medium text-surface-0 tabular-nums`,children:d>99?`99+`:d}):null]}):null]})}export{l as t};
@@ -1 +0,0 @@
1
- import{Hn as e,Kn as t,Un as n,_ as r,t as i,z as a}from"./format-DT52SbbR.js";import{C as o}from"./index-BTVy_xFF.js";import{t as s}from"./Markdown-BhtIFcWc.js";import{t as c}from"./MessageItem-Bk9eBp1U.js";var l=t(n(),1),u=e();function d({thread:e,now:t,task:n,empty:d}){let f=r(),p=a(e.id),m=p.data?.messages??[],h=m.at(-1)?.id??null;if((0,l.useEffect)(()=>o(e.id,h),[e.id,h]),p.data===void 0)return(0,u.jsx)(`p`,{className:`mt-2 text-meta`,children:`Reading the thread…`});let g=p.data.thread;return(0,u.jsxs)(`div`,{className:`-mx-4 mt-1`,children:[m.length===0?(0,u.jsx)(`p`,{className:`mx-4 mt-1 text-meta`,children:d}):m.map(e=>(0,u.jsx)(c,{message:e,members:f.data,now:t,task:n},e.id)),e.state===`closed`?(0,u.jsxs)(`div`,{className:`mx-4 mt-2`,children:[(0,u.jsxs)(`p`,{className:`text-meta`,children:[`Closed`,g.closedAt===void 0?``:` ${i(g.closedAt,t)}`,g.body.trim()===``?`.`:`:`]}),g.body.trim()===``?null:(0,u.jsx)(s,{text:g.body})]}):null]})}export{d as t};
@@ -1,4 +0,0 @@
1
- import{G as e,Hn as t,Kn as n,L as r,P as i,Un as a,b as o,qt as s,rt as c,t as l,x as u}from"./format-DT52SbbR.js";import{A as d,k as f}from"./index-BTVy_xFF.js";import{c as p,d as m,i as h,l as g,m as _,n as v,o as y,p as b,r as x,t as S}from"./Markdown-BhtIFcWc.js";import{n as C,t as w}from"./Pane-CJYRVkwh.js";import{t as T}from"./BackLink-DGYs80bb.js";var E=n(a(),1),D=t(),O=`grid size-7 shrink-0 place-items-center rounded-lg text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`,k=`inline-flex h-7 shrink-0 items-center rounded-md px-3 text-xs text-fg-tertiary transition-colors hover:bg-surface-2/70 hover:text-fg-primary`,A=1e3,j=2e4;function M({taskId:e,path:t}){let n=t===``?[]:t.split(`/`),r=`text-fg-tertiary hover:text-fg-primary`;return(0,D.jsxs)(`nav`,{"aria-label":`Path`,className:`flex flex-wrap items-center gap-x-1 text-meta`,children:[n.length===0?(0,D.jsx)(`span`,{children:`Files`}):(0,D.jsx)(v,{taskId:e,path:``,className:r,children:`Files`}),n.map((t,i)=>(0,D.jsxs)(E.Fragment,{children:[(0,D.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),i===n.length-1?(0,D.jsx)(`span`,{className:`text-fg-secondary`,children:t}):(0,D.jsx)(v,{taskId:e,path:n.slice(0,i+1).join(`/`),className:r,children:t})]},n.slice(0,i+1).join(`/`)))]})}function N({taskId:e,file:t}){let n=t.entries.toSorted((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`dir`?-1:1);return(0,D.jsx)(`ul`,{className:`mt-3 space-y-1`,children:n.map(n=>(0,D.jsxs)(`li`,{className:`flex items-baseline gap-2`,children:[(0,D.jsx)(v,{taskId:e,path:t.path===``?n.name:`${t.path}/${n.name}`,className:`text-sm text-fg-secondary hover:text-fg-primary`,children:n.kind===`dir`?`${n.name}/`:n.name}),n.size===null?null:(0,D.jsx)(`span`,{className:`text-meta`,children:b(n.size)})]},n.name))})}function P({rows:e}){let[t,...n]=e;if(t===void 0)return(0,D.jsx)(`p`,{className:`mt-3 text-meta`,children:`The table is empty.`});let r=n.slice(0,A),i=`border border-line px-2 py-1 text-left align-top whitespace-pre-wrap`;return(0,D.jsxs)(`div`,{className:`mt-3 overflow-x-auto`,children:[(0,D.jsxs)(`table`,{className:`text-xs text-fg-secondary`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsx)(`tr`,{children:t.map((e,t)=>(0,D.jsx)(`th`,{scope:`col`,className:`${i} font-medium text-fg-primary`,children:e},t))})}),(0,D.jsx)(`tbody`,{children:r.map((e,t)=>(0,D.jsx)(`tr`,{children:e.map((e,t)=>(0,D.jsx)(`td`,{className:i,children:e},t))},t))})]}),n.length>r.length?(0,D.jsxs)(`p`,{className:`mt-2 text-meta`,children:[`The first `,A,` of `,n.length,` rows; download the file for the rest.`]}):null]})}function F({text:e,line:t}){let n=e.endsWith(`
2
- `)?e.slice(0,-1).split(`
3
- `):e.split(`
4
- `),r=`mt-3 overflow-x-auto rounded-lg bg-surface-0/80 p-3 font-mono text-[12px] leading-relaxed text-fg-secondary shadow-[inset_0_0_0_1px_rgba(255,255,255,0.05)]`;return n.length>j?(0,D.jsx)(`pre`,{className:r,children:e}):(0,D.jsx)(`pre`,{className:r,children:n.map((e,n)=>(0,D.jsxs)(`span`,{className:`flex ${n+1===t?`line-target`:``}`,children:[(0,D.jsx)(`span`,{"aria-hidden":`true`,className:`w-10 shrink-0 pr-3 text-right text-fg-muted select-none`,children:n+1}),(0,D.jsx)(`span`,{className:`whitespace-pre`,children:e===``?` `:e})]},n))})}function I({taskId:e,file:t,url:n,line:r}){let i=(0,E.useMemo)(()=>t.content===null?null:_(t.path,h(t.content)),[t.path,t.content]),a=t.path.split(`/`).at(-1)??t.path;return i===null?(0,D.jsxs)(`p`,{className:`mt-3 text-sm text-fg-secondary`,children:[a,` is `,b(t.size),`, more than the `,b(c),` the board shows. Its runner still has it on the task's branch.`]}):i.kind===`markdown`?(0,D.jsx)(`div`,{className:`mt-3`,children:(0,D.jsx)(S,{text:i.text,base:{taskId:e,dir:m(t.path)},line:r})}):i.kind===`image`?n===null?null:(0,D.jsx)(`img`,{src:n,alt:a,className:`mt-3 max-w-full rounded-lg`}):i.kind===`table`?(0,D.jsx)(P,{rows:i.rows}):i.kind===`text`?(0,D.jsx)(F,{text:i.text,line:r}):(0,D.jsxs)(`p`,{className:`mt-3 text-sm text-fg-secondary`,children:[a,` is not text (`,b(t.size),`). Download it to open it.`]})}function L(){let{taskId:t,_splat:n}=d({from:`/task/$taskId/files/$`}),a=f({from:`/task/$taskId/files/$`}),c=y(g(n??``)??``),m=c.path,h=a.line??c.line,_=i(t),v=u(),b=r(t,m),S=o(3e4),A=b.data,j=A?.kind===`file`?A.content:null,P=x(j,p(m)??`application/octet-stream`),F=m===``?`Files`:m.split(`/`).at(-1)??m,L=_.data?.title??t,R=(0,E.useRef)(null);(0,E.useEffect)(()=>{h!==void 0&&A!==void 0&&R.current?.querySelector(`.line-target`)?.scrollIntoView({block:`center`})},[h,A]);let z;if(A!==void 0)z=A.kind===`dir`?(0,D.jsx)(N,{taskId:t,file:A}):(0,D.jsx)(I,{taskId:t,file:A,url:P,line:h});else if(b.error instanceof e&&b.error.status===404)z=(0,D.jsxs)(`p`,{className:`mt-3 text-sm text-fg-secondary`,children:[m===``?`Nothing`:m,` is not on task/`,t,` yet. What a turn writes reaches the branch when the turn ends.`]});else if(b.error instanceof e&&b.error.status===503){let e=v.data?.find(e=>e.slug===_.data?.project);z=(0,D.jsxs)(`p`,{className:`mt-3 text-sm text-fg-secondary`,children:[e?.runner===void 0?`The runner`:`${e.runner}, the runner`,` `,e?.name??`the project`,` lives on, is not connected, so the task's files cannot be read now.`]})}else z=b.error===null?(0,D.jsxs)(C,{children:[`Reading `,F,` from the task's runner…`]}):(0,D.jsx)(`p`,{className:`mt-3 text-sm text-fg-secondary`,children:b.error.message});return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(w,{leading:(0,D.jsx)(T,{fallback:(0,D.jsx)(s,{to:`/task/$taskId`,params:{taskId:t},"aria-label":`Back to the task ${L}`,className:O,children:`←`})}),title:F,subtitle:A===void 0?L:`${L}${h===void 0?``:` · line ${h}`} · committed by ${A.commit.author} ${l(A.commit.at,S)} · ${A.commit.id.slice(0,7)}`,trailing:P===null?null:(0,D.jsx)(`a`,{href:P,download:F,className:k,children:`Download`})}),(0,D.jsxs)(`div`,{ref:R,className:`flex-1 overflow-y-auto px-4 py-4`,children:[(0,D.jsx)(M,{taskId:t,path:m}),z]})]})}export{L as TaskFileView};
@@ -1,3 +0,0 @@
1
- import{A as e,B as t,F as n,G as r,Hn as i,I as a,Kn as o,P as s,Un as c,Vn as l,_ as u,b as d,qt as f,t as p,x as m,z as h}from"./format-DT52SbbR.js";import{n as g,t as _}from"./Button-f4jgBZY1.js";import{a as v,c as y,l as b,n as x,o as S,r as C,s as w,t as T}from"./tasks-R3YgpYTe.js";import{u as E}from"./governance-Cr5OlQnw.js";import{A as D,_ as O,i as k,o as A,s as j}from"./index-BTVy_xFF.js";import{a as M,f as N,n as P,s as F,t as I,u as L}from"./Markdown-BhtIFcWc.js";import{n as R,r as z}from"./ThreadForms-C846TvtS.js";import{n as B,t as V}from"./Pane-CJYRVkwh.js";import{t as H}from"./StickyList-MVP34ytV.js";import{t as ee}from"./BackLink-DGYs80bb.js";import{t as U}from"./SubjectThread-BFFnHxIF.js";var W=o(c(),1),G=i(),K={hunk:`text-fg-muted`,note:`text-fg-muted`,added:`bg-emerald-400/10 text-emerald-300`,removed:`bg-red-400/10 text-red-300`,context:`text-fg-tertiary`};function q({last:e,now:t}){return e===void 0?null:(0,G.jsxs)(`span`,{className:`ml-auto shrink-0 pl-2 text-meta`,children:[e.author,` `,p(e.at,t)]})}function J({taskId:e,path:t,patch:n}){let r=(0,W.useMemo)(()=>N(n),[n]);return(0,G.jsx)(`div`,{className:`mt-1 max-h-96 overflow-auto rounded-md bg-surface-0/60 py-1.5 font-mono text-[11px] leading-relaxed`,children:r.map((n,r)=>(0,G.jsxs)(`div`,{className:`flex ${K[n.kind]}`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`w-10 shrink-0 pr-2 text-right text-fg-muted select-none`,children:n.line===void 0?null:(0,G.jsx)(f,{to:`/task/$taskId/files/$`,params:{taskId:e,_splat:t},search:{line:n.line},tabIndex:-1,title:`Open ${t} at line ${n.line}`,className:`hover:text-fg-primary`,children:n.line})}),(0,G.jsx)(`span`,{className:`min-w-0 flex-1 pr-2 break-words whitespace-pre-wrap`,children:n.text===``?` `:n.text})]},r))})}function Y({taskId:e,change:t}){let n=a(e,t.path),i;if(n.data!==void 0){let{patch:r,truncated:a}=n.data;i=r===null?(0,G.jsx)(`p`,{className:`mt-1 text-meta`,children:`A binary file; its contents are not shown here.`}):r===``?(0,G.jsx)(`p`,{className:`mt-1 text-meta`,children:`No lines changed.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(J,{taskId:e,path:t.path,patch:r}),a?(0,G.jsx)(`p`,{className:`mt-1 text-meta`,children:`The rest of this file's change is cut.`}):null]})}else i=n.error instanceof r&&n.error.status===503?(0,G.jsx)(`p`,{className:`mt-1 text-meta`,children:`The task's runner is not connected, so the change cannot be read now.`}):n.error===null?(0,G.jsx)(`p`,{className:`mt-1 text-meta`,children:`Reading the change…`}):(0,G.jsx)(`p`,{className:`mt-1 text-meta`,children:n.error.message});return(0,G.jsxs)(`div`,{className:`mb-2 ml-[18px]`,children:[t.status===`deleted`?null:(0,G.jsx)(P,{taskId:e,path:t.path,className:`text-meta underline decoration-line underline-offset-2 hover:text-fg-primary`,children:`Open the whole file`}),i]})}function X({taskId:e,nodes:t,nested:n,openings:r,now:i}){let{isOpen:a,toggle:o,shown:s,toggleFile:c}=r;return(0,G.jsx)(`ul`,{className:n?`ml-[5px] border-l border-line-strong pl-2`:`mt-2`,children:t.map(t=>{if(t.kind===`dir`){let n=a(t);return(0,G.jsxs)(`li`,{children:[(0,G.jsxs)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>o(t),className:`flex w-full items-baseline gap-2 rounded-md py-0.5 text-left text-sm hover:bg-surface-2/40`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block w-2.5 shrink-0 text-[10px] text-fg-muted transition-transform ${n?`rotate-90`:``}`,children:`▸`}),(0,G.jsxs)(`span`,{className:`min-w-0 truncate text-fg-primary`,children:[t.name,`/`]}),(0,G.jsx)(`span`,{className:`shrink-0 text-meta`,children:t.files===1?`1 file`:`${t.files} files`}),(0,G.jsx)(q,{last:t.lastChange,now:i})]}),n?(0,G.jsx)(X,{taskId:e,nodes:t.children,nested:!0,openings:r,now:i}):null]},`dir:${t.path}`)}let{change:n}=t,l=s.has(n.path),u=n.status===`deleted`?`text-fg-tertiary line-through`:l?`text-fg-primary`:`text-fg-secondary group-hover:text-fg-primary`;return(0,G.jsxs)(`li`,{children:[(0,G.jsxs)(`button`,{type:`button`,"aria-expanded":l,title:n.path,onClick:()=>c(n.path),className:`group flex w-full items-baseline gap-2 rounded-md py-0.5 text-left text-sm hover:bg-surface-2/40 ${l?`bg-surface-2/30`:``}`,children:[(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`w-2.5 shrink-0`}),(0,G.jsx)(`span`,{className:`min-w-0 truncate ${u}`,children:t.name}),(0,G.jsx)(`span`,{className:`shrink-0 text-meta`,children:M(n)}),(0,G.jsx)(q,{last:n.lastChange,now:i})]}),l?(0,G.jsx)(Y,{taskId:e,change:n}):null]},n.path)})})}function Z({taskId:e,changes:t,now:n}){let r=(0,W.useMemo)(()=>F(t),[t]),i=(0,W.useMemo)(()=>L(r),[r]),[a,o]=(0,W.useState)(new Map),s=e=>a.get(e.path)??i.has(e.path),c=e=>{o(t=>new Map(t).set(e.path,!(t.get(e.path)??i.has(e.path))))},[l,u]=(0,W.useState)(new Set);return(0,G.jsx)(X,{taskId:e,nodes:r.children,nested:!1,openings:{isOpen:s,toggle:c,shown:l,toggleFile:e=>{u(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}},now:n})}function Q({task:e,now:t}){let i=n(e.id),a=m(),o=`task/${e.id}`,s;if(i.data!==void 0){let{files:n,total:r,head:a}=i.data;s=n.length===0?(0,G.jsxs)(`p`,{className:`mt-2 text-meta`,children:[`Nothing changed on `,o,` yet. What a turn writes reaches the branch when the turn ends.`]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`p`,{className:`mt-2 text-meta`,children:[r===1?`1 file`:`${r} files`,` changed · newest commit by `,a.author,` `,p(a.at,t)]}),(0,G.jsx)(Z,{taskId:e.id,changes:n,now:t}),r>n.length?(0,G.jsxs)(`p`,{className:`mt-2 text-meta`,children:[`The first `,n.length,` of `,r,`; browse the branch for the rest.`]}):null]})}else if(i.error instanceof r&&i.error.status===404)s=(0,G.jsxs)(`p`,{className:`mt-2 text-meta`,children:[`Nothing on `,o,` yet. What a turn writes reaches the branch when the turn ends.`]});else if(i.error instanceof r&&i.error.status===503){let t=a.data?.find(t=>t.slug===e.project);s=(0,G.jsxs)(`p`,{className:`mt-2 text-meta`,children:[t?.runner===void 0?`The runner`:`${t.runner}, the runner`,` `,t?.name??e.project,` lives on, is not connected, so the task's files cannot be listed now.`]})}else s=i.error===null?(0,G.jsx)(`p`,{className:`mt-2 text-meta`,children:`Reading the task's branch…`}):(0,G.jsx)(`p`,{className:`mt-2 text-meta`,children:i.error.message});return(0,G.jsxs)(`section`,{"aria-label":`Files`,className:`mt-5 border-t border-line pt-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,G.jsx)(`h3`,{className:`text-section`,children:`Files`}),(0,G.jsx)(P,{taskId:e.id,path:``,className:`text-meta underline decoration-line underline-offset-2 hover:text-fg-primary`,children:`Browse the branch`})]}),s]})}function $({stage:e,index:t,task:n,members:r,now:i}){let a=e.completedBy!==void 0,o=S(n,e),s=t===n.stages.length-1,c=o&&n.status===`claimed`?n.claimedBy:void 0,l=e.holders.filter(t=>t!==c&&t!==e.completedBy),u=n.returned?.from===e.id?n.returned:void 0;return(0,G.jsxs)(`li`,{className:`relative flex gap-3 pb-4`,children:[s?null:(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-6 bottom-0 left-2.5 w-px bg-line`}),(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`relative z-10 grid size-5 shrink-0 place-items-center rounded-full text-[10px] ${a?`bg-emerald-400/20 text-emerald-300`:o?`bg-fg-primary text-surface-0`:`bg-surface-2 text-fg-muted`}`,children:a?`✓`:t+1}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`p`,{className:`text-sm ${o?`font-medium text-fg-primary`:`text-fg-secondary`}`,children:[e.name,e.gate?(0,G.jsx)(`span`,{className:`ml-2 rounded-md bg-sky-400/10 px-1.5 py-px text-[11px] text-sky-300`,children:`gate`}):null]}),(0,G.jsxs)(`p`,{className:`mt-0.5 text-meta`,children:[`for `,C(e),c===void 0?null:(0,G.jsxs)(G.Fragment,{children:[` · held by `,(0,G.jsx)(A,{name:c,members:r})]}),e.completedBy!==void 0&&e.completedAt!==void 0?` · done by ${e.completedBy} ${p(e.completedAt,i)}`:o&&n.status===`open`?` · waiting since ${p(n.stageSince,i)}`:``,l.length>0?` · held before by ${l.join(`, `)}`:``,u===void 0?``:` · sent back by ${u.by} ${p(u.at,i)}`]})]})]})}function te(e){return e.onDone===`ghpr`?e.pullRequest===void 0?`It lands through a pull request, and none is linked yet, so the board refuses to finish it.`:`Approving lands it: the board merges pull request #${e.pullRequest.number} on GitHub.`:e.onDone===`merge`?`Approving lands it: the board merges task/${e.id}.`:`Approving finishes the task.`}function ne({task:t,stage:n}){let{api:r}=e(),i=l(),[a,o]=(0,W.useState)(``),s=t.stages.findIndex(e=>e.id===n.id),c=t.stages[s+1],u=g({mutationFn:()=>r.advanceTask({task_id:t.id,...a.trim()===``?{}:{note:a.trim()}}),onSuccess:async()=>{o(``),await i.invalidateQueries({queryKey:[`task`,t.id]}),await i.invalidateQueries({queryKey:[`tasks`]})}});return(0,G.jsxs)(`form`,{"aria-label":`Approve ${n.name}`,className:`mt-1 mb-4 space-y-2 rounded-lg bg-surface-2/40 p-3`,onSubmit:e=>{e.preventDefault(),u.mutate()},children:[(0,G.jsxs)(`p`,{className:`text-sm text-fg-secondary`,children:[n.name,` waits on you.`,` `,c===void 0?te(t):`Approving moves the task on to ${c.name}.`]}),(0,G.jsx)(`textarea`,{value:a,rows:2,"aria-label":`Note for the task's thread`,placeholder:`A note for the thread, if any`,onChange:e=>o(e.target.value),className:R}),(0,G.jsx)(`div`,{className:`flex justify-end`,children:(0,G.jsx)(_,{variant:`primary`,type:`submit`,disabled:u.isPending,children:u.isPending?`Approving…`:`Approve`})}),(0,G.jsx)(z,{error:u.error})]})}function re({task:e,now:t}){let n=e.pullRequest;if(n===void 0)return null;let r=[n.subject??`The pull request's title`,n.body??``].filter(e=>e!==``).join(`
2
-
3
- `);return(0,G.jsxs)(`section`,{"aria-label":`Pull request`,className:`mt-5 border-t border-line pt-4`,children:[(0,G.jsx)(`h3`,{className:`text-section`,children:`Pull request`}),(0,G.jsxs)(`p`,{className:`mt-2 text-sm`,children:[(0,G.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,className:`text-fg-primary underline decoration-line underline-offset-2 hover:decoration-fg-tertiary`,children:[`#`,n.number,` on GitHub`]}),(0,G.jsxs)(`span`,{className:`text-meta`,children:[` `,`· linked by `,n.linkedBy,` `,p(n.linkedAt,t)]})]}),e.status===`abandoned`&&e.onDone===`ghpr`?(0,G.jsxs)(`p`,{className:`mt-2 text-sm text-fg-secondary`,children:[n.closed===void 0?`The task was abandoned, so the board closes the pull request on GitHub.`:n.closed.ok?`The task was abandoned: ${n.closed.detail}.`:`The task was abandoned, and the board could not close the pull request: ${n.closed.detail}.`,n.closed===void 0?null:(0,G.jsxs)(`span`,{className:`text-meta`,children:[` · `,p(n.closed.at,t)]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`p`,{className:`mt-3 text-caps text-fg-muted`,children:`Merges as`}),(0,G.jsx)(`pre`,{className:`mt-1 rounded-lg bg-surface-2/40 p-3 font-mono text-xs whitespace-pre-wrap text-fg-secondary`,children:r})]})]})}function ie({taskId:t}){let{api:n}=e(),r=l(),i=g({mutationFn:()=>n.openThread({task_id:t}),onSuccess:()=>{r.invalidateQueries({queryKey:[`threads`]})}});return(0,G.jsxs)(`div`,{className:`mt-2 flex items-center gap-3`,children:[(0,G.jsx)(_,{variant:`primary`,disabled:i.isPending,onClick:()=>i.mutate(),children:i.isPending?`Opening…`:`Open its thread`}),(0,G.jsx)(`p`,{className:`text-meta`,children:i.error===null?`This task is older than task threads. It closes when the task ends.`:i.error.message})]})}function ae(){let{taskId:e}=D({from:`/task/$taskId`}),n=s(e),i=t(),a=m(),o=u(),c=d(3e4),l=j(),g=h(i.data?.some(t=>t.id===e)===!0?e:null);if(n.data===void 0)return(0,G.jsx)(B,{children:n.error instanceof r&&n.error.status===404?`There is no task ${e}.`:`Reading the task…`});let _=n.data,S=w(_),C=E(_),A=a.data?.find(e=>e.slug===_.project),M=i.data?.find(e=>e.id===_.id);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(V,{leading:(0,G.jsx)(ee,{fallback:(0,G.jsx)(f,{to:`/p/$slug/tasks`,params:{slug:_.project},"aria-label":`Back to the tasks of ${A?.name??_.project}`,className:`grid size-7 shrink-0 place-items-center rounded-lg text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`,children:`←`})}),title:_.title,subtitle:`${A?.name??_.project}${_.channel===`general`?``:` #${_.channel}`} · ${y(_)} · created by ${l(_.createdBy)} ${p(_.createdAt,c)}`,trailing:(0,G.jsx)(`span`,{className:`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium ${x[S]}`,children:T.find(e=>e.phase===S)?.label.toLowerCase()})}),(0,G.jsxs)(H,{stick:!1,follow:!1,ids:g.data?.messages.map(e=>e.id),className:`px-4 py-4`,children:[(0,G.jsx)(`h3`,{className:`text-section`,children:`Plan`}),_.returned===void 0?null:(0,G.jsxs)(`p`,{className:`mt-2 rounded-lg bg-orange-500/10 px-3 py-2 text-xs leading-relaxed text-orange-200`,children:[`Sent back from `,b(_,_.returned.from),` by `,_.returned.by,` `,p(_.returned.at,c),`. The work is redone from`,` `,b(_,_.stage),` until it reaches that stage again.`]}),(0,G.jsx)(`ol`,{className:`mt-3`,children:_.stages.map((e,t)=>(0,G.jsx)($,{stage:e,index:t,task:_,members:o.data,now:c},e.id))}),C===null?null:(0,G.jsx)(ne,{task:_,stage:C}),(0,G.jsxs)(`p`,{className:`text-meta`,children:[`When the last stage is done:`,` `,_.onDone===`merge`?`task/${_.id} merges onto the default branch`:_.onDone===`ghpr`?_.pullRequest===void 0?`its pull request merges on GitHub, once one is linked`:`pull request #${_.pullRequest.number} merges on GitHub`:`nothing more`,_.blockedBy.length>0?(0,G.jsxs)(G.Fragment,{children:[` · blocked by `,(0,G.jsx)(O,{text:_.blockedBy.join(`, `)})]}):null]}),_.body.trim()===``?null:(0,G.jsxs)(`section`,{className:`mt-5 border-t border-line pt-4`,children:[(0,G.jsx)(`h3`,{className:`text-section`,children:`Brief`}),(0,G.jsx)(`div`,{className:`mt-2`,children:(0,G.jsx)(I,{text:_.body})})]}),(0,G.jsx)(re,{task:_,now:c}),(0,G.jsx)(Q,{task:_,now:c}),(0,G.jsxs)(`section`,{"aria-label":`Thread`,className:`mt-5 border-t border-line pt-4`,children:[(0,G.jsx)(`h3`,{className:`text-section`,children:`Thread`}),i.data===void 0?null:M===void 0?v(_)?(0,G.jsx)(ie,{taskId:_.id}):(0,G.jsx)(`p`,{className:`mt-2 text-meta`,children:`No thread on this task.`}):(0,G.jsx)(U,{thread:M,now:c,task:_,empty:`Nothing said yet. Each stage's handover lands here, and so does anything written below.`})]})]},_.id),M?.state===`open`?(0,G.jsx)(k,{target:{threadId:_.id},placeholder:`Write in the task's thread`}):null]})}export{ae as TaskView};
@@ -1 +0,0 @@
1
- import{Hn as e,Kn as t,R as n,Un as r,_ as i,b as a,qt as o,t as s,x as c,yt as l}from"./format-DT52SbbR.js";import{c as u,i as d,l as f,o as p,r as m,s as h,t as g}from"./tasks-R3YgpYTe.js";import{A as _,o as v}from"./index-BTVy_xFF.js";import{n as y,t as b}from"./Pane-CJYRVkwh.js";var x=t(r(),1),S=e();function C({task:e}){let t=h(e);return(0,S.jsx)(`ol`,{className:`flex gap-1`,"aria-hidden":`true`,children:e.stages.map((n,r)=>{let i=n.completedBy!==void 0,a=p(e,n),o=i?`bg-emerald-400/60`:a?e.status===`claimed`?`bg-fg-primary/90`:`bg-amber-300/80`:t===`abandoned`?`bg-surface-2/50`:`bg-surface-2`;return(0,S.jsx)(`li`,{title:`${r+1}. ${n.name} · ${m(n)}${n.gate?` · gate`:``}`,className:`h-1.5 min-w-3 flex-1 rounded-full ${o} ${n.gate?`ring-1 ring-sky-300/70 ring-offset-1 ring-offset-surface-1`:``}`},n.id)})})}var w=5;function T({task:e,members:t,now:n}){let r=h(e),i=l(e);return(0,S.jsx)(`li`,{children:(0,S.jsxs)(o,{to:`/task/$taskId`,params:{taskId:e.id},className:`block rounded-xl px-3 py-2.5 transition-colors hover:bg-surface-2/50`,children:[(0,S.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,S.jsx)(`span`,{className:`text-title min-w-0 flex-1 truncate`,children:e.title}),(0,S.jsx)(`span`,{className:`shrink-0 text-meta`,children:u(e)})]}),(0,S.jsx)(`div`,{className:`mt-2`,children:(0,S.jsx)(C,{task:e})}),e.returned===void 0?null:(0,S.jsxs)(`p`,{className:`mt-1.5 truncate text-xs text-orange-300/90`,children:[`Sent back from `,f(e,e.returned.from),` by `,e.returned.by,` `,s(e.returned.at,n)]}),(0,S.jsx)(`p`,{className:`mt-1.5 truncate text-meta`,children:e.status===`claimed`&&r!==`landing`&&i!==void 0?(0,S.jsxs)(S.Fragment,{children:[i.name,` · held by `,(0,S.jsx)(v,{name:e.claimedBy??``,members:t})]}):e.status===`open`&&r!==`landing`&&i!==void 0?`${i.name} · waiting for ${m(i)} since ${s(e.stageSince,n)}`:r===`landing`?`landing task/${e.id} on the default branch`:`${r} ${s(e.updatedAt,n)}`})]})})}function E(){let{slug:e}=_({from:`/p/$slug/tasks`}),t=n(e),r=c(),o=i(),s=a(3e4),[l,u]=(0,x.useState)(new Set),f=r.data?.find(t=>t.slug===e),p=d(t.data??[]),m=p.filter(e=>e.phase!==`done`&&e.phase!==`abandoned`).reduce((e,t)=>e+t.tasks.length,0);return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(b,{title:`Tasks`,subtitle:`${f?.name??e} · ${m} in play · ${t.data?.length??0} in all`}),(0,S.jsx)(`div`,{className:`flex-1 overflow-y-auto px-2 py-2`,children:t.data===void 0?(0,S.jsx)(y,{children:`Reading the tasks…`}):p.length===0?(0,S.jsx)(y,{children:`No tasks in this project yet.`}):p.map(e=>{let t=e.phase!==`done`&&e.phase!==`abandoned`||l.has(e.phase)?e.tasks:e.tasks.slice(0,w);return(0,S.jsxs)(`section`,{className:`mb-3`,children:[(0,S.jsxs)(`h3`,{className:`px-3 pt-2 pb-1 text-[11px] font-semibold tracking-wider text-fg-muted uppercase`,children:[g.find(t=>t.phase===e.phase)?.label,` · `,e.tasks.length]}),(0,S.jsx)(`ul`,{children:t.map(e=>(0,S.jsx)(T,{task:e,members:o.data,now:s},e.id))}),t.length<e.tasks.length?(0,S.jsxs)(`button`,{type:`button`,onClick:()=>u(new Set([...l,e.phase])),className:`px-3 pt-1 text-xs text-fg-tertiary hover:text-fg-primary`,children:[`Show all `,e.tasks.length]}):null]},e.phase)})})]})}export{E as TasksView};
@@ -1 +0,0 @@
1
- import{Hn as e,n as t,qt as n,t as r}from"./format-DT52SbbR.js";import{_ as i,s as a}from"./index-BTVy_xFF.js";var o=e();function s(e){return e?.kind??`topic`}function c({state:e}){return(0,o.jsx)(`span`,{className:`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium ${e===`open`?`bg-emerald-500/15 text-emerald-300`:`bg-surface-2 text-fg-tertiary`}`,children:e})}function l(){return(0,o.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,className:`size-3.5`,children:(0,o.jsx)(`path`,{d:`M4 2.5v6A2.5 2.5 0 0 0 6.5 11H13m-3-3 3 3-3 3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function u({thread:e,now:c}){let u=a(),d=e.state===`open`,f=d?``:t(e.body,180),p=d?void 0:e.closedAt,m=p??e.openedAt;return(0,o.jsxs)(n,{to:`/thread/$threadId`,params:{threadId:e.id},className:`group flex gap-3 px-4 py-1`,children:[(0,o.jsx)(`span`,{title:e.state,className:`grid h-5 w-7 shrink-0 place-items-center ${d?`text-emerald-400 group-hover:text-emerald-300`:`text-fg-muted group-hover:text-fg-tertiary`}`,children:(0,o.jsx)(l,{})}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsxs)(`div`,{className:`flex items-baseline gap-3`,children:[(0,o.jsxs)(`p`,{className:`min-w-0 flex-1 truncate text-sm text-fg-tertiary`,children:[u(e.openedBy),` opened `,s(e.subject),` thread`,` `,(0,o.jsx)(`span`,{className:`text-fg-secondary group-hover:text-fg-primary`,children:e.title}),(0,o.jsxs)(`span`,{className:`sr-only`,children:[`, `,e.state]})]}),(0,o.jsx)(`time`,{dateTime:m,title:`${p===void 0?`opened`:`closed`} ${m}`,className:`shrink-0 text-meta`,children:r(m,c)})]}),f===``?null:(0,o.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-sm leading-relaxed text-fg-secondary`,children:(0,o.jsx)(i,{text:f,links:!1})})]})]})}export{u as n,s as r,c as t};
@@ -1 +0,0 @@
1
- import{A as e,G as t,Hn as n,Kn as r,P as i,Un as a,_ as o,b as s,qt as c,t as l,xn as u}from"./format-DT52SbbR.js";import{t as d}from"./Button-f4jgBZY1.js";import{A as f,C as p,i as m,k as h,s as g}from"./index-BTVy_xFF.js";import{t as _}from"./Markdown-BhtIFcWc.js";import{t as v}from"./ThreadForms-C846TvtS.js";import{t as y}from"./MessageItem-Bk9eBp1U.js";import{n as b,t as x}from"./Pane-CJYRVkwh.js";import{t as S}from"./StickyList-MVP34ytV.js";import{r as C,t as w}from"./ThreadItem-C8cou6wD.js";import{t as T}from"./BackLink-DGYs80bb.js";var E=r(a(),1),D=n();function O(){let{threadId:e}=f({from:`/thread/$threadId`}),{message:t}=h({from:`/thread/$threadId`});return(0,D.jsx)(k,{id:e,target:t},e)}function k({id:n,target:r}){let{api:a}=e(),f=u({queryKey:[`thread`,n],queryFn:()=>a.thread(n)}),h=o(),O=s(3e4),k=g(),A=f.data?.messages??[],j=A.at(-1)?.id??null;(0,E.useEffect)(()=>p(n,j),[n,j]);let[M,N]=(0,E.useState)(!1),P=f.data?.thread.subject,F=i(P?.kind===`task`?P.id:null);if(f.data===void 0)return(0,D.jsx)(b,{children:f.error instanceof t&&f.error.status===404?`There is no thread ${n}.`:`Reading the thread…`});let{thread:I}=f.data;return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(x,{leading:(0,D.jsx)(T,{fallback:(0,D.jsx)(c,{to:`/c/$`,params:{_splat:I.channel},"aria-label":`Back to #${I.channel}`,className:`grid size-7 shrink-0 place-items-center rounded-lg text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`,children:`←`})}),title:I.title,subtitle:`${C(I.subject)} thread in #${I.channel} · opened by ${k(I.openedBy)} ${l(I.openedAt,O)}`,trailing:(0,D.jsxs)(D.Fragment,{children:[I.subject?.kind===`task`?(0,D.jsx)(c,{to:`/task/$taskId`,params:{taskId:I.subject.id},className:`shrink-0 rounded-md px-2 py-1 text-xs text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`,children:`Task →`}):I.subject?.kind===`proposal`?(0,D.jsx)(c,{to:`/proposal/$proposalId`,params:{proposalId:I.subject.id},className:`shrink-0 rounded-md px-2 py-1 text-xs text-fg-tertiary hover:bg-surface-2/70 hover:text-fg-primary`,children:`Proposal →`}):null,I.state===`open`&&!M&&I.subject?.kind!==`task`?(0,D.jsx)(d,{onClick:()=>N(!0),children:`Close`}):(0,D.jsx)(w,{state:I.state})]})}),M&&I.state===`open`?(0,D.jsx)(v,{threadId:I.id,channel:I.channel,onDone:()=>N(!1)}):null,(0,D.jsxs)(S,{stick:r===void 0,ids:A.map(e=>e.id),className:`py-2`,children:[A.length===0?(0,D.jsx)(b,{children:`No messages in this thread yet.`}):null,A.map(e=>(0,D.jsx)(y,{message:e,members:h.data,now:O,task:F.data,target:e.id===r},e.id)),I.state===`closed`?(0,D.jsxs)(`section`,{className:`mx-4 mt-3 mb-2 rounded-xl bg-surface-2/40 px-3.5 py-3 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]`,children:[(0,D.jsxs)(`p`,{className:`text-caps`,children:[`Closed by `,k(I.closedBy??`board`),I.closedAt===void 0?``:` ${l(I.closedAt,O)}`]}),I.body.trim()===``?(0,D.jsxs)(`p`,{className:`mt-1 text-meta`,children:[`It ended with its `,C(I.subject),`.`]}):(0,D.jsx)(_,{text:I.body})]}):null]}),I.state===`open`?(0,D.jsx)(m,{target:{threadId:I.id},placeholder:`Reply in the thread`}):null]})}export{O as ThreadView};
@@ -1 +0,0 @@
1
- import{gt as e,ot as t}from"./format-DT52SbbR.js";import{l as n}from"./index-BTVy_xFF.js";function r(e){return e===`society`?`the society`:e}function i(t){return[...t.memberships,e]}function a(e){return e.map(e=>({value:e,name:r(e),id:null,description:e===`society`?`outside any project`:`a project`}))}function o(e){return e.startedAt===void 0?null:n(e.startedAt,Date.parse(e.ts))}var s={completed:`completed`,timeout:`timed out`,error:`failed`,interrupted:`interrupted`,blocked:`blocked`,stopped:`stopped by you`};function c(e){return e.exitReason===null?e.outcome===`failed`?`failed`:`completed`:s[e.exitReason]??e.exitReason}function l(e){return e.outcome===`failed`||e.exitReason!==null&&e.exitReason!==`completed`&&e.exitReason!==`stopped`}var u=new Intl.NumberFormat(`en`,{notation:`compact`}),d=new Intl.NumberFormat(`en`);function f(e){return e.inputTokens+e.cacheReadTokens+e.cacheWriteTokens}function p(e){return`${u.format(f(e))} in · ${u.format(e.outputTokens)} out`}function m(e){return[`${d.format(f(e))} input tokens: ${d.format(e.cacheReadTokens)} read from the cache,`,`${d.format(e.cacheWriteTokens)} written to it, ${d.format(e.inputTokens)} neither;`,`${d.format(e.outputTokens)} output tokens`].join(` `)}function h(e){let n=e.flatMap(e=>e.usage===void 0?[]:[e.usage]);return{turns:e.length,failed:e.filter(l).length,usage:n.length===0?null:n.reduce(t),withUsage:n.length}}var g={"24h":`in the last 24 hours`,"7d":`in the last 7 days`,all:`in all`};function _(e){return e===1?`1 finished turn`:`${e} finished turns`}function v(e,t){let n=g[t];if(e===void 0||e.turns===0)return{label:`no turns`,detail:`no finished turn ${n}`,spoken:null};let r=e.turns-e.withUsage,i=`logged before turns counted tokens, or ended without their runner's report`;if(e.usage===null)return{label:`tokens unknown`,detail:`${_(e.turns)} ${n}, none with a token count: ${i}`,spoken:`${_(e.turns)} ${n}, none counted`};if(r===0)return{label:p(e.usage),detail:`${m(e.usage)}; over ${_(e.turns)} ${n}`,spoken:null};let a=`over ${e.withUsage} of ${_(e.turns)} ${n}`;return{label:`≥${u.format(f(e.usage))} in · ≥${u.format(e.usage.outputTokens)} out`,detail:[`${m(e.usage)}; ${a}.`,`The other ${r===1?`one has`:`${r} have`} no count: ${i}.`].join(` `),spoken:a}}function y(e,t){let n=/^\s*#{1,6}\s+(.+?)\s*(?:\n|$)/.exec(e);return n?.[1]?.toLowerCase()===t.toLowerCase()?e.slice(n[0].length).trim():e}function b(e,t){return[...new Set([e.homeRunner,...e.memberships.map(e=>t.get(e))].filter(e=>e!==void 0))]}function x(e,t){let n=[...e.homeRunner===void 0?[]:[{what:`outside projects`,runner:e.homeRunner}],...e.memberships.map(e=>({what:e,runner:t.get(e)}))],r=b(e,t),i=n.map(e=>`${e.what}: ${e.runner??`placed on its first turn`}`).join(`; `),a=r.length===0?[`no runner yet`]:r.map((e,t)=>`${t===0?`on `:``}${e}${t<r.length-1?`,`:``}`);return{label:a.join(` `),parts:a,detail:i===``?`pinned to a runner on its first turn`:i}}export{r as a,p as c,i as d,y as f,a as i,o as l,h as n,v as o,x as r,m as s,c as t,b as u};