@nowline/embed 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.5.0 sha=04bdff9 built=2026-06-01T06:46:51Z */
1
+ /*! @nowline/embed 0.5.1 sha=fc40638 built=2026-06-01T09:54:57Z */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -39819,8 +39819,8 @@ function effectiveTheme(theme, systemTheme) {
39819
39819
  }
39820
39820
 
39821
39821
  // src/index.ts
39822
- var version = true ? "0.5.0" : "0.0.0";
39823
- var sha = true ? "04bdff9" : "unknown";
39822
+ var version = true ? "0.5.1" : "0.0.0";
39823
+ var sha = true ? "fc40638" : "unknown";
39824
39824
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
39825
39825
  var initialConfig = {
39826
39826
  theme: "auto",
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.5.0 sha=04bdff9 built=2026-06-01T06:46:51Z */
1
+ /*! @nowline/embed 0.5.1 sha=fc40638 built=2026-06-01T09:54:57Z */
2
2
  "use strict";var nowline=(()=>{var NC=Object.create;var vc=Object.defineProperty;var PC=Object.getOwnPropertyDescriptor;var CC=Object.getOwnPropertyNames;var OC=Object.getPrototypeOf,LC=Object.prototype.hasOwnProperty;var DC=(t,e,r)=>e in t?vc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ZE=(t,e)=>()=>(t&&(e=t(t=0)),e);var fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sn=(t,e)=>{for(var r in e)vc(t,r,{get:e[r],enumerable:!0})},of=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of CC(e))!LC.call(t,i)&&i!==r&&vc(t,i,{get:()=>e[i],enumerable:!(n=PC(e,i))||n.enumerable});return t},Se=(t,e,r)=>(of(t,e,"default"),r&&of(r,e,"default")),mm=(t,e,r)=>(r=t!=null?NC(OC(t)):{},of(e||!t||!t.__esModule?vc(r,"default",{value:t,enumerable:!0}):r,t)),sf=t=>of(vc({},"__esModule",{value:!0}),t);var de=(t,e,r)=>DC(t,typeof e!="symbol"?e+"":e,r);var Vd={};sn(Vd,{AnnotatedTextEdit:()=>qn,ChangeAnnotation:()=>No,ChangeAnnotationIdentifier:()=>Dt,CodeAction:()=>Ny,CodeActionContext:()=>ky,CodeActionKind:()=>Iy,CodeActionTriggerKind:()=>xl,CodeDescription:()=>oy,CodeLens:()=>Py,Color:()=>Gd,ColorInformation:()=>Qg,ColorPresentation:()=>ey,Command:()=>Po,CompletionItem:()=>gy,CompletionItemKind:()=>uy,CompletionItemLabelDetails:()=>my,CompletionItemTag:()=>dy,CompletionList:()=>yy,CreateFile:()=>ra,DeleteFile:()=>ia,Diagnostic:()=>hl,DiagnosticRelatedInformation:()=>Xd,DiagnosticSeverity:()=>ny,DiagnosticTag:()=>iy,DocumentHighlight:()=>vy,DocumentHighlightKind:()=>Ey,DocumentLink:()=>Oy,DocumentSymbol:()=>Sy,DocumentUri:()=>Kg,EOL:()=>qF,FoldingRange:()=>ry,FoldingRangeKind:()=>ty,FormattingOptions:()=>Cy,Hover:()=>xy,InlayHint:()=>Xy,InlayHintKind:()=>qd,InlayHintLabelPart:()=>Wd,InlineCompletionContext:()=>Vy,InlineCompletionItem:()=>jy,InlineCompletionList:()=>zy,InlineCompletionTriggerKind:()=>qy,InlineValueContext:()=>Gy,InlineValueEvaluatableExpression:()=>By,InlineValueText:()=>Fy,InlineValueVariableLookup:()=>Uy,InsertReplaceEdit:()=>py,InsertTextFormat:()=>fy,InsertTextMode:()=>hy,Location:()=>pl,LocationLink:()=>Jg,MarkedString:()=>yl,MarkupContent:()=>oa,MarkupKind:()=>zd,OptionalVersionedTextDocumentIdentifier:()=>gl,ParameterInformation:()=>Ty,Position:()=>Ie,Range:()=>Ee,RenameFile:()=>na,SelectedCompletionInfo:()=>Wy,SelectionRange:()=>Ly,SemanticTokenModifiers:()=>$y,SemanticTokenTypes:()=>Dy,SemanticTokens:()=>My,SignatureInformation:()=>_y,StringValue:()=>Hy,SymbolInformation:()=>wy,SymbolKind:()=>Ry,SymbolTag:()=>by,TextDocument:()=>Ky,TextDocumentEdit:()=>ml,TextDocumentIdentifier:()=>ay,TextDocumentItem:()=>ly,TextEdit:()=>hn,URI:()=>Bd,VersionedTextDocumentIdentifier:()=>cy,WorkspaceChange:()=>sy,WorkspaceEdit:()=>Hd,WorkspaceFolder:()=>Yy,WorkspaceSymbol:()=>Ay,integer:()=>Zg,uinteger:()=>dl});var Kg,Bd,Zg,dl,Ie,Ee,pl,Jg,Gd,Qg,ey,ty,ry,Xd,ny,iy,oy,hl,Po,hn,No,Dt,qn,ml,ra,na,ia,Hd,ta,jd,sy,ay,cy,gl,ly,zd,oa,uy,fy,dy,py,hy,my,gy,yy,yl,xy,Ty,_y,Ey,vy,Ry,by,wy,Ay,Sy,Iy,xl,ky,Ny,Py,Cy,Oy,Ly,Dy,$y,My,Fy,Uy,By,Gy,qd,Wd,Xy,Hy,jy,zy,qy,Wy,Vy,Yy,qF,Ky,Zy,b,sa=ZE(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}t.is=e})(Kg||(Kg={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(Bd||(Bd={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(Zg||(Zg={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(dl||(dl={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=dl.MAX_VALUE),i===Number.MAX_VALUE&&(i=dl.MAX_VALUE),{line:n,character:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.uinteger(i.line)&&b.uinteger(i.character)}t.is=r})(Ie||(Ie={}));(function(t){function e(n,i,o,s){if(b.uinteger(n)&&b.uinteger(i)&&b.uinteger(o)&&b.uinteger(s))return{start:Ie.create(n,i),end:Ie.create(o,s)};if(Ie.is(n)&&Ie.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${o}, ${s}]`)}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Ie.is(i.start)&&Ie.is(i.end)}t.is=r})(Ee||(Ee={}));(function(t){function e(n,i){return{uri:n,range:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Ee.is(i.range)&&(b.string(i.uri)||b.undefined(i.uri))}t.is=r})(pl||(pl={}));(function(t){function e(n,i,o,s){return{targetUri:n,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Ee.is(i.targetRange)&&b.string(i.targetUri)&&Ee.is(i.targetSelectionRange)&&(Ee.is(i.originSelectionRange)||b.undefined(i.originSelectionRange))}t.is=r})(Jg||(Jg={}));(function(t){function e(n,i,o,s){return{red:n,green:i,blue:o,alpha:s}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.numberRange(i.red,0,1)&&b.numberRange(i.green,0,1)&&b.numberRange(i.blue,0,1)&&b.numberRange(i.alpha,0,1)}t.is=r})(Gd||(Gd={}));(function(t){function e(n,i){return{range:n,color:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Ee.is(i.range)&&Gd.is(i.color)}t.is=r})(Qg||(Qg={}));(function(t){function e(n,i,o){return{label:n,textEdit:i,additionalTextEdits:o}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.string(i.label)&&(b.undefined(i.textEdit)||hn.is(i))&&(b.undefined(i.additionalTextEdits)||b.typedArray(i.additionalTextEdits,hn.is))}t.is=r})(ey||(ey={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(ty||(ty={}));(function(t){function e(n,i,o,s,a,c){let l={startLine:n,endLine:i};return b.defined(o)&&(l.startCharacter=o),b.defined(s)&&(l.endCharacter=s),b.defined(a)&&(l.kind=a),b.defined(c)&&(l.collapsedText=c),l}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.uinteger(i.startLine)&&b.uinteger(i.startLine)&&(b.undefined(i.startCharacter)||b.uinteger(i.startCharacter))&&(b.undefined(i.endCharacter)||b.uinteger(i.endCharacter))&&(b.undefined(i.kind)||b.string(i.kind))}t.is=r})(ry||(ry={}));(function(t){function e(n,i){return{location:n,message:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&pl.is(i.location)&&b.string(i.message)}t.is=r})(Xd||(Xd={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(ny||(ny={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(iy||(iy={}));(function(t){function e(r){let n=r;return b.objectLiteral(n)&&b.string(n.href)}t.is=e})(oy||(oy={}));(function(t){function e(n,i,o,s,a,c){let l={range:n,message:i};return b.defined(o)&&(l.severity=o),b.defined(s)&&(l.code=s),b.defined(a)&&(l.source=a),b.defined(c)&&(l.relatedInformation=c),l}t.create=e;function r(n){var i;let o=n;return b.defined(o)&&Ee.is(o.range)&&b.string(o.message)&&(b.number(o.severity)||b.undefined(o.severity))&&(b.integer(o.code)||b.string(o.code)||b.undefined(o.code))&&(b.undefined(o.codeDescription)||b.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(b.string(o.source)||b.undefined(o.source))&&(b.undefined(o.relatedInformation)||b.typedArray(o.relatedInformation,Xd.is))}t.is=r})(hl||(hl={}));(function(t){function e(n,i,...o){let s={title:n,command:i};return b.defined(o)&&o.length>0&&(s.arguments=o),s}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.title)&&b.string(i.command)}t.is=r})(Po||(Po={}));(function(t){function e(o,s){return{range:o,newText:s}}t.replace=e;function r(o,s){return{range:{start:o,end:o},newText:s}}t.insert=r;function n(o){return{range:o,newText:""}}t.del=n;function i(o){let s=o;return b.objectLiteral(s)&&b.string(s.newText)&&Ee.is(s.range)}t.is=i})(hn||(hn={}));(function(t){function e(n,i,o){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&b.string(i.label)&&(b.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(b.string(i.description)||i.description===void 0)}t.is=r})(No||(No={}));(function(t){function e(r){let n=r;return b.string(n)}t.is=e})(Dt||(Dt={}));(function(t){function e(o,s,a){return{range:o,newText:s,annotationId:a}}t.replace=e;function r(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}t.insert=r;function n(o,s){return{range:o,newText:"",annotationId:s}}t.del=n;function i(o){let s=o;return hn.is(s)&&(No.is(s.annotationId)||Dt.is(s.annotationId))}t.is=i})(qn||(qn={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&gl.is(i.textDocument)&&Array.isArray(i.edits)}t.is=r})(ml||(ml={}));(function(t){function e(n,i,o){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&b.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||b.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||b.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Dt.is(i.annotationId))}t.is=r})(ra||(ra={}));(function(t){function e(n,i,o,s){let a={kind:"rename",oldUri:n,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&b.string(i.oldUri)&&b.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||b.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||b.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Dt.is(i.annotationId))}t.is=r})(na||(na={}));(function(t){function e(n,i,o){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&b.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||b.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||b.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Dt.is(i.annotationId))}t.is=r})(ia||(ia={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>b.string(i.kind)?ra.is(i)||na.is(i)||ia.is(i):ml.is(i)))}t.is=e})(Hd||(Hd={}));ta=class{constructor(e,r){this.edits=e,this.changeAnnotations=r}insert(e,r,n){let i,o;if(n===void 0?i=hn.insert(e,r):Dt.is(n)?(o=n,i=qn.insert(e,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=qn.insert(e,r,o)),this.edits.push(i),o!==void 0)return o}replace(e,r,n){let i,o;if(n===void 0?i=hn.replace(e,r):Dt.is(n)?(o=n,i=qn.replace(e,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=qn.replace(e,r,o)),this.edits.push(i),o!==void 0)return o}delete(e,r){let n,i;if(r===void 0?n=hn.del(e):Dt.is(r)?(i=r,n=qn.del(e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=qn.del(e,i)),this.edits.push(n),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},jd=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,r){let n;if(Dt.is(e)?n=e:(n=this.nextId(),r=e),this._annotations[n]!==void 0)throw new Error(`Id ${n} is already in use.`);if(r===void 0)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=r,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},sy=class{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new jd(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(r=>{if(ml.is(r)){let n=new ta(r.edits,this._changeAnnotations);this._textEditChanges[r.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(r=>{let n=new ta(e.changes[r]);this._textEditChanges[r]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(gl.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let r={uri:e.uri,version:e.version},n=this._textEditChanges[r.uri];if(!n){let i=[],o={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(o),n=new ta(i,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let r=this._textEditChanges[e];if(!r){let n=[];this._workspaceEdit.changes[e]=n,r=new ta(n),this._textEditChanges[e]=r}return r}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new jd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;No.is(r)||Dt.is(r)?i=r:n=r;let o,s;if(i===void 0?o=ra.create(e,n):(s=Dt.is(i)?i:this._changeAnnotations.manage(i),o=ra.create(e,n,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}renameFile(e,r,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;No.is(n)||Dt.is(n)?o=n:i=n;let s,a;if(o===void 0?s=na.create(e,r,i):(a=Dt.is(o)?o:this._changeAnnotations.manage(o),s=na.create(e,r,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(e,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;No.is(r)||Dt.is(r)?i=r:n=r;let o,s;if(i===void 0?o=ia.create(e,n):(s=Dt.is(i)?i:this._changeAnnotations.manage(i),o=ia.create(e,n,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}};(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)}t.is=r})(ay||(ay={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&b.integer(i.version)}t.is=r})(cy||(cy={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&(i.version===null||b.integer(i.version))}t.is=r})(gl||(gl={}));(function(t){function e(n,i,o,s){return{uri:n,languageId:i,version:o,text:s}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.string(i.uri)&&b.string(i.languageId)&&b.integer(i.version)&&b.string(i.text)}t.is=r})(ly||(ly={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(zd||(zd={}));(function(t){function e(r){let n=r;return b.objectLiteral(r)&&zd.is(n.kind)&&b.string(n.value)}t.is=e})(oa||(oa={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(uy||(uy={}));(function(t){t.PlainText=1,t.Snippet=2})(fy||(fy={}));(function(t){t.Deprecated=1})(dy||(dy={}));(function(t){function e(n,i,o){return{newText:n,insert:i,replace:o}}t.create=e;function r(n){let i=n;return i&&b.string(i.newText)&&Ee.is(i.insert)&&Ee.is(i.replace)}t.is=r})(py||(py={}));(function(t){t.asIs=1,t.adjustIndentation=2})(hy||(hy={}));(function(t){function e(r){let n=r;return n&&(b.string(n.detail)||n.detail===void 0)&&(b.string(n.description)||n.description===void 0)}t.is=e})(my||(my={}));(function(t){function e(r){return{label:r}}t.create=e})(gy||(gy={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})(yy||(yy={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(n){let i=n;return b.string(i)||b.objectLiteral(i)&&b.string(i.language)&&b.string(i.value)}t.is=r})(yl||(yl={}));(function(t){function e(r){let n=r;return!!n&&b.objectLiteral(n)&&(oa.is(n.contents)||yl.is(n.contents)||b.typedArray(n.contents,yl.is))&&(r.range===void 0||Ee.is(r.range))}t.is=e})(xy||(xy={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(Ty||(Ty={}));(function(t){function e(r,n,...i){let o={label:r};return b.defined(n)&&(o.documentation=n),b.defined(i)?o.parameters=i:o.parameters=[],o}t.create=e})(_y||(_y={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(Ey||(Ey={}));(function(t){function e(r,n){let i={range:r};return b.number(n)&&(i.kind=n),i}t.create=e})(vy||(vy={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Ry||(Ry={}));(function(t){t.Deprecated=1})(by||(by={}));(function(t){function e(r,n,i,o,s){let a={name:r,kind:n,location:{uri:o,range:i}};return s&&(a.containerName=s),a}t.create=e})(wy||(wy={}));(function(t){function e(r,n,i,o){return o!==void 0?{name:r,kind:n,location:{uri:i,range:o}}:{name:r,kind:n,location:{uri:i}}}t.create=e})(Ay||(Ay={}));(function(t){function e(n,i,o,s,a,c){let l={name:n,detail:i,kind:o,range:s,selectionRange:a};return c!==void 0&&(l.children=c),l}t.create=e;function r(n){let i=n;return i&&b.string(i.name)&&b.number(i.kind)&&Ee.is(i.range)&&Ee.is(i.selectionRange)&&(i.detail===void 0||b.string(i.detail))&&(i.deprecated===void 0||b.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=r})(Sy||(Sy={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Iy||(Iy={}));(function(t){t.Invoked=1,t.Automatic=2})(xl||(xl={}));(function(t){function e(n,i,o){let s={diagnostics:n};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}t.create=e;function r(n){let i=n;return b.defined(i)&&b.typedArray(i.diagnostics,hl.is)&&(i.only===void 0||b.typedArray(i.only,b.string))&&(i.triggerKind===void 0||i.triggerKind===xl.Invoked||i.triggerKind===xl.Automatic)}t.is=r})(ky||(ky={}));(function(t){function e(n,i,o){let s={title:n},a=!0;return typeof i=="string"?(a=!1,s.kind=i):Po.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}t.create=e;function r(n){let i=n;return i&&b.string(i.title)&&(i.diagnostics===void 0||b.typedArray(i.diagnostics,hl.is))&&(i.kind===void 0||b.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Po.is(i.command))&&(i.isPreferred===void 0||b.boolean(i.isPreferred))&&(i.edit===void 0||Hd.is(i.edit))}t.is=r})(Ny||(Ny={}));(function(t){function e(n,i){let o={range:n};return b.defined(i)&&(o.data=i),o}t.create=e;function r(n){let i=n;return b.defined(i)&&Ee.is(i.range)&&(b.undefined(i.command)||Po.is(i.command))}t.is=r})(Py||(Py={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&b.uinteger(i.tabSize)&&b.boolean(i.insertSpaces)}t.is=r})(Cy||(Cy={}));(function(t){function e(n,i,o){return{range:n,target:i,data:o}}t.create=e;function r(n){let i=n;return b.defined(i)&&Ee.is(i.range)&&(b.undefined(i.target)||b.string(i.target))}t.is=r})(Oy||(Oy={}));(function(t){function e(n,i){return{range:n,parent:i}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Ee.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=r})(Ly||(Ly={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(Dy||(Dy={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})($y||($y={}));(function(t){function e(r){let n=r;return b.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(My||(My={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e;function r(n){let i=n;return i!=null&&Ee.is(i.range)&&b.string(i.text)}t.is=r})(Fy||(Fy={}));(function(t){function e(n,i,o){return{range:n,variableName:i,caseSensitiveLookup:o}}t.create=e;function r(n){let i=n;return i!=null&&Ee.is(i.range)&&b.boolean(i.caseSensitiveLookup)&&(b.string(i.variableName)||i.variableName===void 0)}t.is=r})(Uy||(Uy={}));(function(t){function e(n,i){return{range:n,expression:i}}t.create=e;function r(n){let i=n;return i!=null&&Ee.is(i.range)&&(b.string(i.expression)||i.expression===void 0)}t.is=r})(By||(By={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}t.create=e;function r(n){let i=n;return b.defined(i)&&Ee.is(n.stoppedLocation)}t.is=r})(Gy||(Gy={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(qd||(qd={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&(i.tooltip===void 0||b.string(i.tooltip)||oa.is(i.tooltip))&&(i.location===void 0||pl.is(i.location))&&(i.command===void 0||Po.is(i.command))}t.is=r})(Wd||(Wd={}));(function(t){function e(n,i,o){let s={position:n,label:i};return o!==void 0&&(s.kind=o),s}t.create=e;function r(n){let i=n;return b.objectLiteral(i)&&Ie.is(i.position)&&(b.string(i.label)||b.typedArray(i.label,Wd.is))&&(i.kind===void 0||qd.is(i.kind))&&i.textEdits===void 0||b.typedArray(i.textEdits,hn.is)&&(i.tooltip===void 0||b.string(i.tooltip)||oa.is(i.tooltip))&&(i.paddingLeft===void 0||b.boolean(i.paddingLeft))&&(i.paddingRight===void 0||b.boolean(i.paddingRight))}t.is=r})(Xy||(Xy={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(Hy||(Hy={}));(function(t){function e(r,n,i,o){return{insertText:r,filterText:n,range:i,command:o}}t.create=e})(jy||(jy={}));(function(t){function e(r){return{items:r}}t.create=e})(zy||(zy={}));(function(t){t.Invoked=0,t.Automatic=1})(qy||(qy={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(Wy||(Wy={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(Vy||(Vy={}));(function(t){function e(r){let n=r;return b.objectLiteral(n)&&Bd.is(n.uri)&&b.string(n.name)}t.is=e})(Yy||(Yy={}));qF=[`
3
3
  `,`\r
4
4
  `,"\r"];(function(t){function e(o,s,a,c){return new Zy(o,s,a,c)}t.create=e;function r(o){let s=o;return!!(b.defined(s)&&b.string(s.uri)&&(b.undefined(s.languageId)||b.string(s.languageId))&&b.uinteger(s.lineCount)&&b.func(s.getText)&&b.func(s.positionAt)&&b.func(s.offsetAt))}t.is=r;function n(o,s){let a=o.getText(),c=i(s,(u,f)=>{let d=u.range.start.line-f.range.start.line;return d===0?u.range.start.character-f.range.start.character:d}),l=a.length;for(let u=c.length-1;u>=0;u--){let f=c[u],d=o.offsetAt(f.range.start),p=o.offsetAt(f.range.end);if(p<=l)a=a.substring(0,d)+f.newText+a.substring(p,a.length);else throw new Error("Overlapping edit");l=d}return a}t.applyEdits=n;function i(o,s){if(o.length<=1)return o;let a=o.length/2|0,c=o.slice(0,a),l=o.slice(a);i(c,s),i(l,s);let u=0,f=0,d=0;for(;u<c.length&&f<l.length;)s(c[u],l[f])<=0?o[d++]=c[u++]:o[d++]=l[f++];for(;u<c.length;)o[d++]=c[u++];for(;f<l.length;)o[d++]=l[f++];return o}})(Ky||(Ky={}));Zy=class{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(e.push(i),n=!1);let o=r.charAt(i);n=o==="\r"||o===`
@@ -2660,5 +2660,5 @@ ${r}`),this.inline?`{${i}}`:i}};function _U(t,e,r){if(t==="linkplain"||t==="link
2660
2660
  "interfaces": [],
2661
2661
  "types": []
2662
2662
  }`));var wU={languageId:"nowline",fileExtensions:[".nowline"],caseInsensitive:!1,mode:"development"},ek={AstReflection:()=>new gu},tk={Grammar:()=>QI(),LanguageMetaData:()=>wU,parser:{}};var rk={"NL.E0001":()=>"Config section must appear before roadmap.","NL.E0002":()=>"Include declarations must appear before the config section.","NL.E0003":()=>"Include declarations must appear before the roadmap section.","NL.E0004":()=>"At least one swimlane is required.","NL.E0005":t=>`Line ${t.line}: mixed tabs and spaces in indentation. Use either tabs or spaces consistently.`,"NL.E0100":t=>`Invalid version format "${t.version}". Expected format: v1, v2, etc.`,"NL.E0101":t=>`This file requires Nowline ${t.version}, but the parser only supports up to ${t.supported}.`,"NL.E0102":t=>`Unknown directive property "${t.key}". Allowed: ${t.allowed}.`,"NL.E0103":t=>`Duplicate directive property "${t.key}".`,"NL.E0104":t=>`Invalid locale "${t.value}". Use a BCP-47 tag like "en-US", "fr", or "fr-CA".`,"NL.E0200":t=>`Invalid include mode "${t.value}". Must be merge, ignore, or isolate.`,"NL.E0201":t=>`Duplicate "${t.key}" option on include.`,"NL.E0300":t=>`Duplicate identifier "${t.name}". First declared at ${t.location}.`,"NL.E0301":t=>`${t.type} must have an identifier, a title, or both.`,"NL.E0400":t=>`Invalid duration "${t.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q. Use "size:NAME" to reference a declared size.`,"NL.E0401":t=>`Invalid size "${t.value}". Use the id of a declared size (e.g. xs, m, lg).`,"NL.E0402":t=>`Invalid effort "${t.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q.`,"NL.E0403":t=>`Invalid remaining value "${t.value}". Use a percentage like 30% or a duration literal like 1w, 0.5d.`,"NL.E0404":t=>`Remaining must be between 0% and 100%, got ${t.value}.`,"NL.E0405":t=>`Invalid ${t.key} "${t.value}". Use ISO 8601 format: YYYY-MM-DD.`,"NL.E0406":t=>`Invalid scale "${t.value}". Use a raw duration literal like 1w, 2w, 1q (no name lookup).`,"NL.E0407":t=>`Invalid calendar "${t.value}". Must be business, full, or custom.`,"NL.E0408":t=>`Property "${t.key}" requires at least one reference.`,"NL.E0410":t=>`"${t.key}:" accepts at most one inline date per direction; collapse the multiple dates to a single binding date or use a declared anchor.`,"NL.E0411":t=>`Inline date in "${t.key}:" is not allowed on ${t.type}. Allowed only on item, parallel, and group; for a milestone use "date:" instead.`,"NL.E0412":t=>`Inline date "${t.date}" in "${t.key}:" requires the roadmap to declare "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0413":t=>`Inline date "${t.date}" in "${t.key}:" is before roadmap start ${t.start}.`,"NL.E0500":t=>`Anchor "${t.name}" requires a "date:" property.`,"NL.E0501":t=>`Anchor "${t.name}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0502":t=>`Anchor "${t.name}" date ${t.date} is before roadmap start ${t.start}.`,"NL.E0503":t=>`Milestone "${t.name}" requires at least one of "date:" or "after:".`,"NL.E0504":t=>`Milestone "${t.name}" date ${t.date} is before roadmap start ${t.start}.`,"NL.E0505":()=>'Footnote requires an "on:" property referencing one or more entities.',"NL.E0600":t=>`Item "${t.name}" requires a "size:" or "duration:" property.`,"NL.W0700":t=>`Unknown property "${t.key}" on ${t.entity}. The renderer ignores it.${t.suggested?` Did you mean "${t.suggested}"?`:""}`};var nk={"NL.E0001":()=>"La section config doit pr\xE9c\xE9der la section roadmap.","NL.E0002":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section config.","NL.E0003":()=>"Les d\xE9clarations include doivent pr\xE9c\xE9der la section roadmap.","NL.E0004":()=>"Au moins une swimlane est requise.","NL.E0005":t=>`Ligne ${t.line}\xA0: tabulations et espaces m\xE9lang\xE9s dans l'indentation. Utilisez l'un ou l'autre, mais pas les deux.`,"NL.E0100":t=>`Format de version invalide \xAB\xA0${t.version}\xA0\xBB. Format attendu\xA0: v1, v2, etc.`,"NL.E0101":t=>`Ce fichier requiert Nowline ${t.version}, mais l'analyseur ne prend en charge que jusqu'\xE0 ${t.supported}.`,"NL.E0102":t=>`Propri\xE9t\xE9 de directive inconnue \xAB\xA0${t.key}\xA0\xBB. Valeurs admises\xA0: ${t.allowed}.`,"NL.E0103":t=>`Propri\xE9t\xE9 de directive \xAB\xA0${t.key}\xA0\xBB en double.`,"NL.E0104":t=>`Locale invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez une \xE9tiquette BCP-47 telle que \xAB\xA0en-US\xA0\xBB, \xAB\xA0fr\xA0\xBB ou \xAB\xA0fr-CA\xA0\xBB.`,"NL.E0200":t=>`Mode d'include invalide \xAB\xA0${t.value}\xA0\xBB. Doit \xEAtre merge, ignore ou isolate.`,"NL.E0201":t=>`Option \xAB\xA0${t.key}\xA0\xBB en double sur include.`,"NL.E0300":t=>`Identifiant en double \xAB\xA0${t.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${t.location}.`,"NL.E0301":t=>`${t.type} doit comporter un identifiant, un titre, ou les deux.`,"NL.E0400":t=>`Dur\xE9e invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q. Utilisez \xAB\xA0size:NOM\xA0\xBB pour r\xE9f\xE9rencer une taille d\xE9clar\xE9e.`,"NL.E0401":t=>`Taille invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez l'identifiant d'une taille d\xE9clar\xE9e (p.\xA0ex. xs, m, lg).`,"NL.E0402":t=>`Effort invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q.`,"NL.E0403":t=>`Valeur restante invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un pourcentage tel que 30% ou un litt\xE9ral de dur\xE9e comme 1w, 0.5d.`,"NL.E0404":t=>`La valeur restante doit \xEAtre comprise entre 0 % et 100 %, re\xE7u ${t.value}.`,"NL.E0405":t=>`${t.key} invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez le format ISO 8601\xA0: AAAA-MM-JJ.`,"NL.E0406":t=>`\xC9chelle invalide \xAB\xA0${t.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 1w, 2w, 1q (pas de recherche par nom).`,"NL.E0407":t=>`Calendrier invalide \xAB\xA0${t.value}\xA0\xBB. Doit \xEAtre business, full ou custom.`,"NL.E0408":t=>`La propri\xE9t\xE9 \xAB\xA0${t.key}\xA0\xBB exige au moins une r\xE9f\xE9rence.`,"NL.E0410":t=>`\xAB\xA0${t.key}:\xA0\xBB n'accepte qu'une seule date inline par direction\xA0; regroupez les dates en une seule date contraignante ou utilisez une ancre d\xE9clar\xE9e.`,"NL.E0411":t=>`Une date inline dans \xAB\xA0${t.key}:\xA0\xBB n'est pas autoris\xE9e sur ${t.type}. Autoris\xE9e seulement sur item, parallel et group\xA0; pour un milestone utilisez \xAB\xA0date:\xA0\xBB \xE0 la place.`,"NL.E0412":t=>`La date inline \xAB\xA0${t.date}\xA0\xBB dans \xAB\xA0${t.key}:\xA0\xBB exige que la roadmap d\xE9clare \xAB\xA0start:\xA0\xBB. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0413":t=>`La date inline \xAB\xA0${t.date}\xA0\xBB dans \xAB\xA0${t.key}:\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${t.start}).`,"NL.E0500":t=>`L'ancre \xAB\xA0${t.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0date:\xA0\xBB.`,"NL.E0501":t=>`L'ancre \xAB\xA0${t.name}\xA0\xBB a une date, mais \xAB\xA0start:\xA0\xBB manque sur la roadmap. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0502":t=>`La date ${t.date} de l'ancre \xAB\xA0${t.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${t.start}).`,"NL.E0503":t=>`Le jalon \xAB\xA0${t.name}\xA0\xBB exige au moins l'une des propri\xE9t\xE9s \xAB\xA0date:\xA0\xBB ou \xAB\xA0after:\xA0\xBB.`,"NL.E0504":t=>`La date ${t.date} du jalon \xAB\xA0${t.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${t.start}).`,"NL.E0505":()=>"Une note de bas de page exige une propri\xE9t\xE9 \xAB\xA0on:\xA0\xBB r\xE9f\xE9ren\xE7ant au moins une entit\xE9.","NL.E0600":t=>`L'\xE9l\xE9ment \xAB\xA0${t.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0size:\xA0\xBB ou \xAB\xA0duration:\xA0\xBB.`,"NL.W0700":t=>`Propri\xE9t\xE9 inconnue \xAB\xA0${t.key}\xA0\xBB sur ${t.entity}. Le moteur de rendu l'ignore.${t.suggested?` Vouliez-vous dire \xAB\xA0${t.suggested}\xA0\xBB\xA0?`:""}`};var ik={};var ok={};var AU=new Map([["en-US",rk],["fr",nk],["fr-CA",ik],["fr-FR",ok]]);function ak(t,e,...r){for(let n of SU(t)){let o=AU.get(n)?.[e];if(o)return o(...r)}return e}var sk="en-US";function SU(t){let e=[],r=IU(t);for(;r.length>0;){e.includes(r)||e.push(r);let n=r.lastIndexOf("-");if(n<=0)break;r=r.slice(0,n)}return e.includes(sk)||e.push(sk),e}function IU(t){return t.split("-").map((r,n)=>n===0?r.toLowerCase():/^[a-zA-Z]{2}$/.test(r)?r.toUpperCase():r).join("-")}var kU=/[\\/]/;function uk(t){for(let e=t.length-1;e>=0;e--){let r=t.charCodeAt(e);if(r===47||r===92)return e}return-1}function ck(...t){for(let e of t)if(e){if(e.includes("\\")&&!e.includes("/"))return"\\";if(e.includes("/"))return"/"}return"/"}function NU(t){return t?t[0]==="/"||t[0]==="\\"?!0:t.length>=3&&/^[A-Za-z]:[\\/]/.test(t):!1}function fk(t){let e=uk(t);return e<0?".":e===0?t[0]:e===2&&/^[A-Za-z]:[\\/]/.test(t)?t.slice(0,3):t.slice(0,e)}function sh(t){let e=uk(t);return e<0?t:t.slice(e+1)}function u_(t,e){if(NU(e))return lk(e,ck(e));let r=ck(t,e);return lk(`${t}${r}${e}`,r)}function lk(t,e){let r="",n=t,i=/^([A-Za-z]:)([\\/])?/.exec(n);i?(r=i[1]+(i[2]?e:""),n=n.slice(i[0].length)):(n[0]==="/"||n[0]==="\\")&&(r=e,n=n.replace(/^[\\/]+/,""));let o=[];for(let s of n.split(kU))if(!(s===""||s===".")){if(s===".."){o.length>0&&o[o.length-1]!==".."?o.pop():r||o.push("..");continue}o.push(s)}return r+o.join(e)}var CU=/^\d{4}-\d{2}-\d{2}$/;function hk(t){let e=t?.properties.find(r=>r.key==="start");if(e?.value&&CU.test(e.value)&&!Number.isNaN(new Date(e.value).getTime()))return e.value}function OU(t,e,r){return e&&r?`Included "${t}" declares start:${r}, which doesn't match this file's start:${e}. Both files must declare the same start date, or neither should.`:e?`Included "${t}" has no start:, but this file declares start:${e}. Both files must declare the same start date, or neither should.`:`Included "${t}" declares start:${r}, but this file has no start:. Both files must declare the same start date, or neither should.`}function mk(){return{styles:new Map,defaults:new Map,symbols:new Map}}function gk(){return{persons:new Map,teams:new Map,anchors:new Map,labels:new Map,sizes:new Map,statuses:new Map,swimlanes:new Map,milestones:new Map,footnotes:new Map,isolatedRegions:[]}}async function f_(t,e,r){let n=r.readFile??(async c=>{let{nodeReadFile:l}=await Promise.resolve().then(()=>(pk(),dk));return l(c)}),i={services:r.services,diagnostics:[],resolving:[],processed:new Map,readFile:n},o=u_("",e),{config:s,content:a}=await xk(t,o,i);return{config:s,content:a,diagnostics:i.diagnostics,processedFiles:new Set(i.processed.keys())}}async function xk(t,e,r){if(r.processed.has(e))return r.processed.get(e);if(r.resolving.includes(e)){r.diagnostics.push({severity:"error",message:`Circular include detected: ${[...r.resolving,e].join(" \u2192 ")}`,sourcePath:e});let a={config:mk(),content:gk()};return r.processed.set(e,a),a}r.resolving.push(e);let n=mk(),i=gk();MU(n,t),UU(i,t);let o=new Set;for(let a of t.includes){let c=a.path,l=u_(fk(e),c);if(o.has(l)){r.diagnostics.push({severity:"error",message:`Duplicate include "${c}" in ${sh(e)}.`,sourcePath:e,line:a.$cstNode?.range.start.line});continue}o.add(l);let u=yk(a,"config")??"merge",f=yk(a,"roadmap")??"merge",d;try{let g=await r.readFile(l);d=await LU(r.services,g,l)}catch(g){r.diagnostics.push({severity:"error",message:`Could not read include "${c}": ${g.message}`,sourcePath:e,line:a.$cstNode?.range.start.line});continue}let{config:p,content:m}=await xk(d,l,r);if(DU(n,p,u,l,r.diagnostics),$U(i,m,p,f,l,c,r.diagnostics),f==="isolate"&&!m.roadmap&&r.diagnostics.push({severity:"error",message:`Cannot isolate "${c}": it has no roadmap declaration.`,sourcePath:e,line:a.$cstNode?.range.start.line}),f!=="ignore"&&d.roadmapDecl){let g=hk(t.roadmapDecl),v=hk(d.roadmapDecl);g!==v&&r.diagnostics.push({severity:"error",message:OU(c,g,v),sourcePath:e,line:a.$cstNode?.range.start.line})}}r.resolving.pop();let s={config:n,content:i};return r.processed.set(e,s),s}function yk(t,e){let r=t.options.find(n=>n.key===e);if(r&&(r.value==="merge"||r.value==="ignore"||r.value==="isolate"))return r.value}async function LU(t,e,r){let n=ht.file(r),o=t.shared.workspace.LangiumDocumentFactory.fromString(e,n);return await t.shared.workspace.DocumentBuilder.build([o],{validation:!1}),o.parseResult.value}function DU(t,e,r,n,i){if(r==="ignore"||r==="isolate")return;let o=(s,a)=>i.push({severity:"warning",message:`${a} "${s}" from ${sh(n)} is shadowed by the parent's definition.`,sourcePath:n});kr(t.styles,e.styles,s=>o(s,"Style")),kr(t.defaults,e.defaults,s=>o(s,"Default")),kr(t.symbols,e.symbols,s=>o(s,"Symbol")),e.scale&&!t.scale&&(t.scale=e.scale),e.calendar&&!t.calendar&&(t.calendar=e.calendar)}function $U(t,e,r,n,i,o,s){if(n==="ignore")return;if(n==="isolate"){e.roadmap&&t.isolatedRegions.push({sourcePath:o,config:r,content:e});return}let a=(c,l)=>s.push({severity:"warning",message:`${l} "${c}" from ${sh(i)} is shadowed by the parent's definition.`,sourcePath:i});kr(t.persons,e.persons,c=>a(c,"Person")),kr(t.teams,e.teams,c=>a(c,"Team")),kr(t.anchors,e.anchors,c=>a(c,"Anchor")),kr(t.labels,e.labels,c=>a(c,"Label")),kr(t.sizes,e.sizes,c=>a(c,"Size")),kr(t.statuses,e.statuses,c=>a(c,"Status")),kr(t.swimlanes,e.swimlanes,c=>a(c,"Swimlane")),kr(t.milestones,e.milestones,c=>a(c,"Milestone")),kr(t.footnotes,e.footnotes,c=>a(c,"Footnote")),e.roadmap&&!t.roadmap&&(t.roadmap=e.roadmap)}function kr(t,e,r){for(let[n,i]of e){if(t.has(n)){r(n);continue}t.set(n,i)}}function MU(t,e){for(let r of e.configEntries)FU(t,r)}function FU(t,e){ZI(e)?t.scale||(t.scale=e):rh(e)?t.calendar||(t.calendar=e):xu(e)?e.name&&!t.styles.has(e.name)&&t.styles.set(e.name,e):Tu(e)?e.name&&!t.symbols.has(e.name)&&t.symbols.set(e.name,e):Gi(e)&&(t.defaults.has(e.entityType)||t.defaults.set(e.entityType,e))}function UU(t,e){e.roadmapDecl&&!t.roadmap&&(t.roadmap=e.roadmapDecl);for(let r of e.roadmapEntries)BU(t,r)}function BU(t,e){Yr(e)?e.name&&!t.swimlanes.has(e.name)&&t.swimlanes.set(e.name,e):Xi(e)?e.name&&!t.persons.has(e.name)&&t.persons.set(e.name,e):Kr(e)?e.name&&!t.teams.has(e.name)&&t.teams.set(e.name,e):th(e)?e.name&&!t.anchors.has(e.name)&&t.anchors.set(e.name,e):ih(e)?e.name&&!t.labels.has(e.name)&&t.labels.set(e.name,e):Ja(e)?e.name&&!t.sizes.has(e.name)&&t.sizes.set(e.name,e):yu(e)?e.name&&!t.statuses.has(e.name)&&t.statuses.set(e.name,e):oh(e)?e.name&&!t.milestones.has(e.name)&&t.milestones.set(e.name,e):nh(e)&&e.name&&!t.footnotes.has(e.name)&&t.footnotes.set(e.name,e)}var Tk="v1",d_=new Set(["planned","in-progress","active","done","completed","at-risk","blocked"]),ah=new Set(["bg","fg","text","border","icon","shadow","font","weight","italic","text-size","padding","spacing","header-height","corner-radius","bracket","header-position","capacity-icon","timeline-position","minor-grid"]),y_=new Set(["none","multiplier","person","people","points","time"]),ch=new Set([...y_,"shield","warning","lock","calendar"]),kk="none",lh={border:new Set(["solid","dashed","dotted"]),shadow:new Set(["none","subtle","soft","hard"]),font:new Set(["sans","serif","mono"]),weight:new Set(["thin","light","normal","bold"]),italic:new Set(["true","false"]),"text-size":new Set(["none","xs","sm","md","lg","xl"]),padding:new Set(["none","xs","sm","md","lg","xl"]),spacing:new Set(["none","xs","sm","md","lg","xl"]),"header-height":new Set(["none","xs","sm","md","lg","xl"]),"corner-radius":new Set(["none","xs","sm","md","lg","xl","full"]),bracket:new Set(["none","solid","dashed"]),"header-position":new Set(["beside","above"]),"timeline-position":new Set(["top","bottom","both"]),"minor-grid":new Set(["true","false"])},GU=new Set(["red","blue","yellow","green","orange","purple","violet","gray","grey","navy","white","none"]),XU=new Set(["business","full","custom"]),p_=new Set(["days-per-week","days-per-month","days-per-quarter","days-per-year"]),_k=new Set(["name","label-every","label"]),Ek=new Set(["item","label","swimlane","roadmap","milestone","footnote","anchor","parallel","group"]),HU={item:new Set(["size","duration","after","before","remaining","link","description","owner"]),milestone:new Set(["date","after","link","description"]),anchor:new Set(["date","link","description"]),footnote:new Set(["on","link","description"]),label:new Set(["link","description"]),swimlane:new Set(["capacity"]),roadmap:new Set,parallel:new Set,group:new Set},vk=new Set(["labels","link","style","description"]),jU={RoadmapDeclaration:new Set(["author","start","length","scale","calendar","logo","logo-size"]),AnchorDeclaration:new Set(["date"]),SwimlaneDeclaration:new Set(["owner","capacity","utilization-warn-at","utilization-over-at","status","after","before"]),ItemDeclaration:new Set(["size","duration","status","owner","after","before","remaining","capacity","date","start"]),ParallelBlock:new Set(["owner","after","before","status"]),GroupBlock:new Set(["owner","after","before","status"]),MilestoneDeclaration:new Set(["date","after"]),FootnoteDeclaration:new Set(["on"]),PersonDeclaration:new Set,TeamDeclaration:new Set,LabelDeclaration:new Set,SizeDeclaration:new Set(["effort"]),StatusDeclaration:new Set};function zU(t,e,r){if(t===e)return 0;let n=t.length,i=e.length;if(Math.abs(n-i)>r)return r+1;if(n===0)return i;if(i===0)return n;let o=new Array(i+1),s=new Array(i+1);for(let a=0;a<=i;a++)o[a]=a;for(let a=1;a<=n;a++){s[0]=a;let c=a;for(let u=1;u<=i;u++){let f=t.charCodeAt(a-1)===e.charCodeAt(u-1)?0:1;s[u]=Math.min(o[u]+1,s[u-1]+1,o[u-1]+f),s[u]<c&&(c=s[u])}if(c>r)return r+1;let l=o;o=s,s=l}return o[i]}function qU(t,e,r=2){let n,i=r+1;for(let o of e){let s=zU(t,o,r);if(s<i&&(n=o,i=s,s===0))break}return n}function ke(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}var _u=/^\d+(?:\.\d+)?[dwmqy]$/,WU=/^\d+%$/,Hi=/^\d{4}-\d{2}-\d{2}$/,VU=/^#[0-9a-fA-F]{3,8}$/,YU=/^v\d+$/,Rk=/^\d+$/,KU=/^[dwmqy]$/,bk=/^\d+(\.\d+)?$/,x_=/^\d+(\.\d+)?%$/,Nk=/^\d+\.\d+$/,ZU=/^\d+$/,JU=/^[\x20-\x7E]{1,3}$/,QU=/^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/,eB=new Set(["merge","ignore","isolate"]),wk=new Set(["locale"]);function h_(t){let e=t?.roadmapDecl?.properties.find(i=>ke(i)==="start");if(!e)return{kind:"missing"};let r=e.value;if(!r||!Hi.test(r))return{kind:"invalid"};let n=new Date(r);return Number.isNaN(n.getTime())?{kind:"invalid"}:{kind:"valid",iso:r,date:n}}function Zr(t){return t.name??t.title??"<unnamed>"}function tB(t){return t.$type.replace(/Declaration$|Block$/,"").toLowerCase()}function be(t,e,r,n,...i){t(e,ak("en-US",n,...i),{...r,data:{code:n,args:i}})}function Pk(t){let e=t.validation.ValidationRegistry,r=t.validation.NowlineValidator,n={NowlineFile:[r.checkFileStructure,r.checkUniqueIdentifiers,r.checkSwimlaneRequired,r.checkIndentationConsistency,r.checkRoadmapOnlyKeywordsPosition,r.checkForwardReferences,r.checkReferenceResolution,r.checkInlineDatePins,r.checkCircularDependencies,r.checkDuplicateSizeIds,r.checkCalendarBlockConsistency,r.checkPersonDeclarations,r.checkDuplicateSymbolIds,r.checkSymbolReferences],NowlineDirective:[r.checkDirectiveVersion,r.checkDirectiveProperties],IncludeOption:[r.checkIncludeMode],IncludeDeclaration:[r.checkIncludeDuplicateOptions],EntityProperty:[r.checkPropertyValues],RoadmapDeclaration:[r.checkEntityIdOrTitle,r.checkRoadmapProperties,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],AnchorDeclaration:[r.checkEntityIdOrTitle,r.checkAnchorRequiredDate,r.checkAnchorAgainstStart,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],SwimlaneDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkUtilizationOrdering,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],ItemDeclaration:[r.checkEntityIdOrTitle,r.checkItemRequiredDuration,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],ParallelBlock:[r.checkParallelMinChildren,r.checkNoComputedProperties,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],GroupBlock:[r.checkGroupMinChildren,r.checkNoComputedProperties,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],MilestoneDeclaration:[r.checkEntityIdOrTitle,r.checkMilestoneRequirement,r.checkMilestoneAgainstStart,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],FootnoteDeclaration:[r.checkEntityIdOrTitle,r.checkFootnoteOn,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],PersonDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],TeamDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkNoFootnoteProperty,r.checkUnknownEntityProperties],StyleDeclaration:[r.checkEntityIdOrTitle],StyleProperty:[r.checkStylePropertyEnum],SymbolDeclaration:[r.checkEntityIdOrTitle,r.checkSymbolDeclaration],LabelDeclaration:[r.checkEntityIdOrTitle,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],SizeDeclaration:[r.checkEntityIdOrTitle,r.checkSizeDeclaration,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],StatusDeclaration:[r.checkEntityIdOrTitle,r.checkStatusDeclaration,r.checkNoRawStyleProperties,r.checkUnknownEntityProperties],DefaultDeclaration:[r.checkDefaultDeclaration,r.checkUtilizationOrdering],CalendarBlock:[r.checkCalendarBlock],ScaleBlock:[r.checkScaleBlock]};e.register(n,r)}var fh=class{checkFileStructure(e,r){let n=e.hasConfig?ws.findNodeForKeyword(e.$cstNode,"config")?.offset:void 0,i=e.roadmapDecl?.$cstNode?.offset;n!==void 0&&i!==void 0&&n>i&&be(r,"error",{node:e,property:"hasConfig"},"NL.E0001");for(let o of e.includes){let s=o.$cstNode?.offset??0;n!==void 0&&s>n&&be(r,"error",{node:o},"NL.E0002"),i!==void 0&&s>i&&be(r,"error",{node:o},"NL.E0003")}}checkRoadmapOnlyKeywordsPosition(e,r){}checkDirectiveVersion(e,r){if(!YU.test(e.version)){be(r,"error",{node:e,property:"version"},"NL.E0100",{version:e.version});return}let n=parseInt(e.version.slice(1),10),i=parseInt(Tk.slice(1),10);n>i&&be(r,"error",{node:e,property:"version"},"NL.E0101",{version:e.version,supported:Tk})}checkDirectiveProperties(e,r){let n=new Set;for(let i of e.properties){let o=ke(i);if(!wk.has(o)){be(r,"error",{node:i,property:"key"},"NL.E0102",{key:o,allowed:[...wk].join(", ")});continue}if(n.has(o)&&be(r,"error",{node:i,property:"key"},"NL.E0103",{key:o}),n.add(o),o==="locale"){let s=i.value;QU.test(s)||be(r,"error",{node:i,property:"value"},"NL.E0104",{value:s})}}}checkEntityIdOrTitle(e,r){!e.name&&!e.title&&be(r,"error",{node:e},"NL.E0301",{type:e.$type})}checkUniqueIdentifiers(e,r){let n=new Map,i=(o,s)=>{if(!o)return;let a=n.get(o);a?be(r,"error",{node:s},"NL.E0300",{name:o,location:uh(a)}):n.set(o,s)};e.roadmapDecl?.name&&i(e.roadmapDecl.name,e.roadmapDecl);for(let o of e.roadmapEntries)iB(o,i);for(let o of e.configEntries)xu(o)&&o.name&&i(o.name,o)}checkIndentationConsistency(e,r){let n=e.$document?.textDocument.getText()??e.$cstNode?.text;if(!n)return;let i=n.split(/\r?\n/);for(let o=0;o<i.length;o++){let s=i[o];if(s.length===0)continue;let a=s.match(/^([\t ]+)/);if(!a)continue;let c=a[1];if(c.includes(" ")&&c.includes(" ")){be(r,"error",{node:e},"NL.E0005",{line:o+1});return}}}checkSwimlaneRequired(e,r){let n=e.roadmapEntries.some(Yr);e.roadmapDecl&&!n&&be(r,"error",{node:e.roadmapDecl},"NL.E0004")}checkIncludeMode(e,r){eB.has(e.value)||be(r,"error",{node:e,property:"value"},"NL.E0200",{value:e.value})}checkIncludeDuplicateOptions(e,r){let n=new Set;for(let i of e.options){let o=i.key.replace(/:$/,"");n.has(o)&&be(r,"error",{node:i},"NL.E0201",{key:o}),n.add(o)}}checkPropertyValues(e,r){let n=ke(e),i=e.value,o=e.values,s=i?[i]:o;switch(n){case"status":break;case"duration":i&&!_u.test(i)&&be(r,"error",{node:e,property:"value"},"NL.E0400",{value:i});break;case"size":i&&!Ak(i)&&be(r,"error",{node:e,property:"value"},"NL.E0401",{value:i});break;case"effort":i&&!_u.test(i)&&be(r,"error",{node:e,property:"value"},"NL.E0402",{value:i});break;case"remaining":{if(i)if(WU.test(i)){let a=parseFloat(i);(a<0||a>100)&&be(r,"error",{node:e,property:"value"},"NL.E0404",{value:i})}else _u.test(i)||be(r,"error",{node:e,property:"value"},"NL.E0403",{value:i});break}case"date":case"start":i&&(!Hi.test(i)||Number.isNaN(new Date(i).getTime()))&&be(r,"error",{node:e,property:"value"},"NL.E0405",{key:n,value:i});break;case"scale":i&&!_u.test(i)&&be(r,"error",{node:e,property:"value"},"NL.E0406",{value:i});break;case"calendar":i&&!XU.has(i)&&be(r,"error",{node:e,property:"value"},"NL.E0407",{value:i});break;case"on":case"after":case"before":s.length===0&&be(r,"error",{node:e},"NL.E0408",{key:n});break;case"capacity":{if(!i)break;let a=e.$container,c=rB(a);if(c==="invalid")break;c==="lane"?(!bk.test(i)||parseFloat(i)<=0)&&r("error",`Invalid swimlane capacity "${i}". Use a positive integer (e.g. capacity:5) or decimal (e.g. capacity:1.5). Percent literals are not allowed on swimlanes.`,{node:e,property:"value"}):x_.test(i)?parseFloat(i)<=0&&r("error",`Item capacity "${i}" must be positive.`,{node:e,property:"value"}):bk.test(i)?parseFloat(i)<=0&&r("error",`Item capacity "${i}" must be positive.`,{node:e,property:"value"}):r("error",`Invalid item capacity "${i}". Use a positive integer (capacity:2), decimal (capacity:0.5), or percent literal (capacity:50%).`,{node:e,property:"value"});break}case"overcapacity":{r("error",'"overcapacity:" was removed. Use "utilization-over-at:none" (and/or "utilization-warn-at:none") to suppress the lane utilization underline.',{node:e});break}case"utilization-warn-at":case"utilization-over-at":{if(!i)break;if(!nB(e.$container)){r("error",`"${n}:" is only valid on "swimlane" or "default swimlane".`,{node:e});break}if(i===kk)break;if(x_.test(i)){parseFloat(i)<=0&&r("error",`${n} value "${i}" must be positive.`,{node:e,property:"value"});break}if(Nk.test(i)){parseFloat(i)<=0&&r("error",`${n} value "${i}" must be positive.`,{node:e,property:"value"});break}if(ZU.test(i)){r("error",`Ambiguous ${n} value "${i}". Use the percent form ("${i}%") or the decimal-fraction form ("0.${i}") to make the intent explicit.`,{node:e,property:"value"});break}r("error",`Invalid ${n} value "${i}". Use a positive percent (e.g. 80%), a positive decimal fraction (e.g. 0.8), or "none" to opt out.`,{node:e,property:"value"});break}case"capacity-icon":break;case"icon":break;default:if(ah.has(n)){if(n==="bg"||n==="fg"||n==="text")i&&!m_(i)&&r("error",`Invalid color "${i}" for "${n}". Use a named color, hex value, or "none".`,{node:e,property:"value"});else if(n in lh){let a=lh[n];i&&!a.has(i)&&!m_(i)&&r("error",`Invalid value "${i}" for "${n}". Allowed: ${[...a].join(", ")}.`,{node:e,property:"value"})}}break}}checkAnchorRequiredDate(e,r){e.properties.find(i=>ke(i)==="date")||be(r,"error",{node:e},"NL.E0500",{name:Zr(e)})}checkAnchorAgainstStart(e,r){let n=e.properties.find(a=>ke(a)==="date");if(!n?.value)return;let i=n.value;if(!Hi.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=h_(e.$container);switch(s.kind){case"invalid":return;case"missing":be(r,"error",{node:n,property:"value"},"NL.E0501",{name:Zr(e)});return;case"valid":o<s.date&&be(r,"error",{node:n,property:"value"},"NL.E0502",{name:Zr(e),date:i,start:s.iso});return}}checkMilestoneRequirement(e,r){let n=e.properties.some(o=>ke(o)==="date"),i=e.properties.some(o=>ke(o)==="after");!n&&!i&&be(r,"error",{node:e},"NL.E0503",{name:Zr(e)})}checkMilestoneAgainstStart(e,r){let n=e.properties.find(a=>ke(a)==="date");if(!n?.value)return;let i=n.value;if(!Hi.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=h_(e.$container);switch(s.kind){case"invalid":return;case"missing":r("error",`Milestone "${Zr(e)}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,{node:n,property:"value"});return;case"valid":o<s.date&&be(r,"error",{node:n,property:"value"},"NL.E0504",{name:Zr(e),date:i,start:s.iso});return}}checkFootnoteOn(e,r){e.properties.some(i=>ke(i)==="on")||be(r,"error",{node:e},"NL.E0505")}checkNoFootnoteProperty(e,r){for(let n of e.properties)ke(n)==="footnote"&&r("error",`Property "footnote:" is not valid on ${g_(e)}. Footnotes attach via "on:" on the footnote declaration \u2014 declare \`footnote <id> on:<target-id>\` instead.`,{node:n})}checkItemRequiredDuration(e,r){let n=e.properties.some(o=>ke(o)==="duration"),i=e.properties.some(o=>ke(o)==="size");!n&&!i&&be(r,"error",{node:e},"NL.E0600",{name:Zr(e)})}checkNoComputedProperties(e,r){for(let n of e.properties){let i=ke(n);(i==="size"||i==="duration"||i==="remaining"||i==="capacity")&&r("error",`"${i}" is not valid on ${e.$type==="ParallelBlock"?"parallel":"group"} (computed from children).`,{node:n})}}checkParallelMinChildren(e,r){let n=e.content.filter(i=>!l_(i));n.length===0?r("error","Parallel block must contain at least 2 children.",{node:e}):n.length===1&&r("warning","Parallel block has only 1 child. Use at least 2 for parallel execution.",{node:e})}checkGroupMinChildren(e,r){e.content.filter(i=>!l_(i)).length===0&&r("error","Group must contain at least 1 child.",{node:e})}checkNoRawStyleProperties(e,r){for(let n of e.properties){let i=ke(n);ah.has(i)&&r("error",`Raw style property "${i}" is not allowed on ${g_(e)}. Declare a named style in config and reference it via "style:id".`,{node:n})}}checkUnknownEntityProperties(e,r){let n=jU[e.$type];if(!n)return;let i=e.$type==="ParallelBlock"||e.$type==="GroupBlock"?new Set(["size","duration","remaining","capacity"]):null;for(let o of e.properties){let s=ke(o);if(n.has(s)||vk.has(s)||ah.has(s)||s==="footnote"||i?.has(s))continue;let a=[...n,...vk],c=qU(s,a)??"";be(r,"warning",{node:o,property:"key"},"NL.W0700",{key:s,entity:g_(e),suggested:c})}}checkRoadmapProperties(e,r){}checkStylePropertyEnum(e,r){let n=ke(e),i=e.value;if(n==="bg"||n==="fg"||n==="text")m_(i)||r("error",`Invalid color "${i}" for "${n}". Use a named color, hex value, or "none".`,{node:e,property:"value"});else if(n in lh){let o=lh[n];o.has(i)||r("error",`Invalid value "${i}" for "${n}". Allowed: ${[...o].join(", ")}.`,{node:e,property:"value"})}else ah.has(n)||r("error",`Unknown style property "${n}".`,{node:e,property:"key"})}checkSizeDeclaration(e,r){e.properties.find(i=>ke(i)==="effort")||r("error",`Size "${Zr(e)}" requires an "effort:" property.`,{node:e}),e.name&&(_u.test(e.name)||KU.test(e.name))&&r("error",`Size id "${e.name}" collides with the raw duration pattern. Choose a different name (e.g. "xs", "small", "quarter").`,{node:e,property:"name"})}checkStatusDeclaration(e,r){e.name&&d_.has(e.name)&&r("error",`Status id "${e.name}" collides with the built-in status value. Built-ins: ${[...d_].join(", ")}.`,{node:e,property:"name"})}checkDuplicateSizeIds(e,r){let n=new Map;for(let i of e.roadmapEntries)if(Ja(i)&&i.name){let o=n.get(i.name);o?r("error",`Duplicate size id "${i.name}". First declared at ${uh(o)}.`,{node:i,property:"name"}):n.set(i.name,i)}}checkUtilizationOrdering(e,r){if(Gi(e)&&e.entityType!=="swimlane")return;let n=e.properties.find(a=>ke(a)==="utilization-warn-at"),i=e.properties.find(a=>ke(a)==="utilization-over-at");if(!n||!i)return;let o=Sk(n.value),s=Sk(i.value);o===null||s===null||o>s&&r("error",`utilization-warn-at (${n.value}) must be \u2264 utilization-over-at (${i.value}). Warn fires below over; if both fire at the same point, the warn band collapses to zero.`,{node:n,property:"value"})}checkDefaultDeclaration(e,r){if(!Ek.has(e.entityType)){r("error",`"${e.entityType}" is not a supported entity type for default. Allowed: ${[...Ek].join(", ")}.`,{node:e,property:"entityType"});return}let n=e.$container,i=-1;for(let s=0;s<n.configEntries.length;s++){let a=n.configEntries[s];if(Gi(a)&&a.entityType===e.entityType){if(i<0)i=s;else if(a===e){r("error",`Duplicate "default ${e.entityType}" declaration. Only one is allowed per entity type per file.`,{node:e});break}}}let o=HU[e.entityType];if(o)for(let s of e.properties){let a=ke(s);o.has(a)&&r("error",`"${a}" cannot be set on "default ${e.entityType}". Identity-defining, sizing, sequencing, reference, and prose properties must be explicit on each entity.`,{node:s})}}checkCalendarBlockConsistency(e,r){let n=e.configEntries.filter(rh),o=e.roadmapDecl?.properties.find(s=>ke(s)==="calendar")?.value;if(n.length>0&&o!=="custom")for(let s of n)r("error",'A "calendar" config block is only valid when the roadmap declares calendar:custom.',{node:s});if(o==="custom"&&n.length===0&&r("error",'calendar:custom requires a "calendar" config block with days-per-week, days-per-month, days-per-quarter, and days-per-year.',{node:e.roadmapDecl,property:"properties"}),o==="custom"&&n.length>0)for(let s of n){let a=new Set(s.properties.map(c=>ke(c)));for(let c of p_)a.has(c)||r("error",`calendar:custom requires "${c}" in the calendar config block.`,{node:s})}}checkCalendarBlock(e,r){let n=new Set;for(let i of e.properties){let o=ke(i);if(!p_.has(o)){r("error",`Unknown calendar property "${o}". Allowed: ${[...p_].join(", ")}.`,{node:i,property:"key"});continue}n.has(o)&&r("error",`Duplicate calendar property "${o}".`,{node:i,property:"key"}),n.add(o),(!Rk.test(i.value)||parseInt(i.value,10)<=0)&&r("error",`"${o}" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkScaleBlock(e,r){let n=new Set;for(let i of e.properties){let o=ke(i);if(!_k.has(o)){r("error",`Unknown scale property "${o}". Allowed: ${[..._k].join(", ")}.`,{node:i,property:"key"});continue}n.has(o)&&r("error",`Duplicate scale property "${o}".`,{node:i,property:"key"}),n.add(o),o==="label-every"&&(!Rk.test(i.value)||parseInt(i.value,10)<=0)&&r("error",`"label-every" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkForwardReferences(e,r){let n=new Map,i=new Map;for(let o=0;o<e.roadmapEntries.length;o++){let s=e.roadmapEntries[o];Ja(s)&&s.name?n.has(s.name)||n.set(s.name,o):yu(s)&&s.name&&(i.has(s.name)||i.set(s.name,o))}for(let o=0;o<e.roadmapEntries.length;o++){let s=e.roadmapEntries[o];Ik(s,a=>{let c=ke(a);if(c==="size"&&a.value){let l=a.value,u=n.get(l);u===void 0?r("error",`Size "${l}" is not declared. Add "size ${l} effort:<literal>" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&r("error",`Size "${l}" is referenced before its declaration. Move "size ${l}" above this entity.`,{node:a,property:"value"})}else if(c==="status"&&a.value){let l=a.value;if(d_.has(l))return;let u=i.get(l);u===void 0?r("error",`Status "${l}" is not a built-in and has no declaration. Add "status ${l}" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&r("error",`Status "${l}" is referenced before its declaration. Move "status ${l}" above this entity.`,{node:a,property:"value"})}})}}checkReferenceResolution(e,r){let n=oB(e),i=o=>{Ik(o,s=>{let a=ke(s);if(a!=="after"&&a!=="before"&&a!=="on")return;let c=s.value?[s.value]:s.values;for(let l of c)l&&((a==="after"||a==="before")&&Hi.test(l)||n.has(l)||r("error",`${a}: reference "${l}" does not resolve to any declared entity in this file.`,{node:s}))})};for(let o of e.roadmapEntries)i(o)}checkInlineDatePins(e,r){let n=h_(e),i=o=>{let s=o.properties??[],a=yr(o)||Vr(o)||Wr(o);for(let c of s){let l=ke(c);if(l!=="after"&&l!=="before")continue;let f=(c.value?[c.value]:c.values).filter(d=>!!d&&Hi.test(d));if(f.length!==0){if(!a){be(r,"error",{node:c},"NL.E0411",{key:l,type:tB(o)});continue}f.length>1&&be(r,"error",{node:c},"NL.E0410",{key:l});for(let d of f)switch(n.kind){case"invalid":continue;case"missing":be(r,"error",{node:c},"NL.E0412",{key:l,date:d});continue;case"valid":{let p=new Date(d);if(Number.isNaN(p.getTime()))continue;p<n.date&&be(r,"error",{node:c},"NL.E0413",{key:l,date:d,start:n.iso})}}}}if(Yr(o))for(let c of o.content)i(c);else if(Vr(o)||Wr(o))for(let c of o.content)i(c)};for(let o of e.roadmapEntries)i(o)}checkCircularDependencies(e,r){let n=new Map,i=(p,m)=>{n.has(p)||n.set(p,new Set),n.get(p).add(m)},o=(p,m,g)=>{if(p)for(let v of m){let T=ke(v);if(T==="after"){let _=v.value?[v.value]:v.values;for(let E of _)E&&(Hi.test(E)||i(p,E))}else if(T==="before"){let _=v.value?[v.value]:v.values;for(let E of _)E&&(Hi.test(E)||i(E,p))}}},s=p=>{let m=p.name,g=p.properties??[];if(o(m,g,e),Yr(p))for(let v of p.content)s(v);else if(Vr(p)||Wr(p))for(let v of p.content)s(v)};for(let p of e.roadmapEntries)s(p);let a=0,c=1,l=2,u=new Map;for(let p of n.keys())u.set(p,a);let f=new Set,d=(p,m)=>{u.set(p,c),m.push(p);for(let g of n.get(p)??[]){let v=u.get(g)??a;if(v===c){let T=m.indexOf(g),_=m.slice(T).concat(g),E=[..._].sort().join("\u2192");f.has(E)||(f.add(E),r("error",`Circular dependency detected: ${_.join(" \u2192 ")}.`,{node:e.roadmapDecl??e}))}else v===a&&d(g,m)}m.pop(),u.set(p,l)};for(let p of n.keys())(u.get(p)??a)===a&&d(p,[])}checkPersonDeclarations(e,r){let n=new Map,i=a=>!!a.title||a.properties.length>0||a.description!==void 0,o=a=>{if(!a.name)return;let c=i(a);n.has(a.name)||n.set(a.name,[]),n.get(a.name).push({node:a,isDeclaration:c}),!c&&a.$container.$type==="NowlineFile"&&r("warning",`Bare "person ${a.name}" at roadmap top level has no declaration. Either add properties (title, link, etc.) or remove the line.`,{node:a})},s=a=>{for(let c of a.content)Xi(c)?o(c):Kr(c)&&s(c)};for(let a of e.roadmapEntries)Xi(a)?o(a):Kr(a)&&s(a);for(let[a,c]of n){let l=c.filter(u=>u.isDeclaration);if(l.length>1)for(let u=1;u<l.length;u++)r("error",`Person "${a}" is declared more than once. First declaration at ${uh(l[0].node)}.`,{node:l[u].node})}}checkSymbolDeclaration(e,r){e.name&&ch.has(e.name)&&r("error",`Symbol id "${e.name}" collides with a built-in icon name. Reserved built-ins: ${[...ch].sort().join(", ")}.`,{node:e,property:"name"});let n=e.properties.find(o=>ke(o)==="unicode");n?(!n.value||n.value.length===0)&&r("error",`Symbol "${Zr(e)}" unicode: must be a non-empty value.`,{node:n,property:"value"}):r("error",`Symbol "${Zr(e)}" requires a "unicode:" property (e.g. unicode:"\u{1F4B0}" or unicode:"\\u{1F464}").`,{node:e});let i=e.properties.find(o=>ke(o)==="ascii");if(i){let o=i.value??"";JU.test(o)||r("error",`Symbol "${Zr(e)}" ascii: must be 1-3 ASCII characters (got ${o.length} character${o.length===1?"":"s"}).`,{node:i,property:"value"})}for(let o of e.properties){let s=ke(o);s!=="unicode"&&s!=="ascii"&&s!=="link"&&s!=="description"&&r("error",`Unknown symbol property "${s}". Allowed: unicode, ascii, link, description.`,{node:o,property:"key"})}}checkDuplicateSymbolIds(e,r){let n=new Map;for(let i of e.configEntries)if(Tu(i)&&i.name){let o=n.get(i.name);o?r("error",`Duplicate symbol id "${i.name}". First declared at ${uh(o)}.`,{node:i,property:"name"}):n.set(i.name,i)}}checkSymbolReferences(e,r){let n=new Map;for(let o=0;o<e.configEntries.length;o++){let s=e.configEntries[o];Tu(s)&&s.name&&(n.has(s.name)||n.set(s.name,o))}let i=(o,s,a,c)=>{if(s!=="icon"&&s!=="capacity-icon"||!a||!Ak(a)||s==="capacity-icon"&&y_.has(a)||s==="icon"&&ch.has(a))return;let l=n.get(a);if(l===void 0){let u=s==="capacity-icon"?[...y_].sort().join(", "):[...ch].sort().join(", ");r("error",`${s}: "${a}" is neither a built-in (${u}) nor a declared symbol. Add "symbol ${a} unicode:..." earlier in config or use a quoted Unicode literal.`,{node:c,property:"value"})}else l>=o&&r("error",`${s}: symbol "${a}" is referenced before its declaration. Move "symbol ${a}" above this entry.`,{node:c,property:"value"})};for(let o=0;o<e.configEntries.length;o++){let s=e.configEntries[o];if(xu(s))for(let a of s.properties)i(o,ke(a),a.value,a);else if(Gi(s))for(let a of s.properties)i(o,ke(a),a.value,a)}}};function m_(t){return GU.has(t)||VU.test(t)}function Ak(t){return/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(t)}function rB(t){return t?Yr(t)?"lane":yr(t)?"item":Gi(t)?t.entityType==="swimlane"?"lane":"item":"invalid":"invalid"}function nB(t){return t?!!(Yr(t)||Gi(t)&&t.entityType==="swimlane"):!1}function Sk(t){if(!t||t===kk)return null;if(x_.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?e/100:null}if(Nk.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?e:null}return null}function uh(t){let e=t.$cstNode;return e?`line ${e.range.start.line+1}`:"unknown location"}function g_(t){let e=t.$type.replace(/Declaration$|Block$/,"").toLowerCase(),r=t.name??t.title;return r?`${e} "${r}"`:e}function iB(t,e){if(Yr(t)){e(t.name,t);for(let r of t.content)T_(r,e)}else Xi(t)?e(t.name,t):Kr(t)?Ck(t,e):(th(t)||oh(t)||nh(t)||ih(t)||Ja(t)||yu(t))&&e(t.name,t)}function Ck(t,e){e(t.name,t);for(let r of t.content)Kr(r)&&Ck(r,e)}function T_(t,e){if(yr(t))e(t.name,t);else if(Vr(t)){e(t.name,t);for(let r of t.content)T_(r,e)}else if(Wr(t)){e(t.name,t);for(let r of t.content)T_(r,e)}}function Ik(t,e){let r=n=>{let i=n.properties;if(Array.isArray(i))for(let o of i)e(o);if(Yr(n))for(let o of n.content)r(o);else if(Vr(n)||Wr(n))for(let o of n.content)r(o);else if(Kr(n))for(let o of n.content)(Kr(o)||Xi(o))&&r(o)};r(t)}function oB(t){let e=new Set;t.roadmapDecl?.name&&e.add(t.roadmapDecl.name);let r=n=>{let i=n.name;if(i&&e.add(i),Yr(n))for(let o of n.content)r(o);else if(Vr(n)||Wr(n))for(let o of n.content)r(o);else if(Kr(n))for(let o of n.content)Kr(o)||Xi(o)?r(o):KI(o)};for(let n of t.roadmapEntries)r(n);return e}var __=class extends $o{runConverter(e,r,n){return e.name==="PROPERTY_KEY_WITH_COLON"||e.name==="INCLUDE_OPTION_KEY"?r.endsWith(":")?r.slice(0,-1):r:super.runConverter(e,r,n)}},E_=class extends Ma{isStartOfLine(e,r){if(!super.isStartOfLine(e,r))return!1;let n=r-1;for(;n>=0&&(e[n]===" "||e[n]===" ");)n--;for(;n>=0&&(e[n]==="\r"||e[n]===`
2663
- `);)n--;for(;n>=0&&(e[n]===" "||e[n]===" ");)n--;return n<0||e[n]!=="\\"}},Ok={parser:{TokenBuilder:()=>new E_({indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[["[","]"]]}),Lexer:t=>new fu(t),ParserConfig:()=>({maxLookahead:4}),ValueConverter:()=>new __},validation:{NowlineValidator:()=>new fh}};function v_(t={}){let e=t.shared??zo(lu(du),ek),r=zo(cu({shared:e}),tk,Ok);return e.ServiceRegistry.register(r),Pk(r),{shared:e,Nowline:r}}function Lk(t,e){return{severity:t.severity===2?"warning":"error",code:xm(t),message:t.message,suggestion:ym(t.message),file:e,line:(t.range?.start.line??0)+1,column:(t.range?.start.character??0)+1}}function Dk(t,e){return{severity:"error",code:"parse-error",message:t.message,file:e,line:t.token?.startLine??1,column:t.token?.startColumn??1}}function $k(t,e){return{severity:"error",code:"lex-error",message:t.message,file:e,line:t.line??1,column:t.column??1}}function Mk(t){return{severity:t.severity,code:"include",message:t.message,file:t.sourcePath,line:t.line!==void 0?t.line+1:1,column:1}}function Fk(t,e,r="warning"){return{severity:r,code:"render.warning",message:t,file:e,line:1,column:1}}var Uk="__nowline_browser_noop_include__";async function Bk(t){throw new Error(`${Uk}: include "${t}" was skipped \u2014 running in single-file mode.`)}function Gk(t){return t.includes(Uk)}var sB=new Set(["none","multiplier","person","people","points","time"]),aB=/^\d+$/,cB=/^\d+\.\d+$/,lB=/^\d+(?:\.\d+)?%$/;function ji(t){if(!t)return null;if(aB.test(t)){let e=parseInt(t,10);return e>0?e:null}if(cB.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?e:null}if(lB.test(t)){let e=parseFloat(t.slice(0,-1))/100;return Number.isFinite(e)&&e>0?e:null}return null}function Eu(t){if(Number.isInteger(t))return String(t);let e=t.toFixed(6);return e=e.replace(/0+$/,""),e=e.replace(/\.$/,""),e}function uB(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}function fB(t){for(let e of t.properties)if(uB(e)==="unicode"&&e.value)return e.value}function vu(t,e){if(t==="none")return null;if(sB.has(t))return{kind:"builtin",name:t};let r=e.get(t);return r?{kind:"literal",text:fB(r)??t}:{kind:"literal",text:t}}function Vo(t,e,r){return e?e.kind==="builtin"&&e.name==="multiplier"?(t.length+1)*r*.58:t.length*r*.58+(.1+1)*r:t.length*r*.58}function Ru(t,e,r,n=0,i=0){let o=t+10,s=o+12,a=e.length*6.5,c=s+a,l=0,u=0;r&&(l=`owner: ${r}`.length*5,u=c+6,c=u+l);let f=0;n>0&&(f=c+6,c=f+n);let d=0;i>0&&(d=c+6+i,c=d);let p=c-o+12,m=Math.max(56,p);return{titleTextWidth:a,ownerTextWidth:l,capacityBadgeWidth:n,footnoteIndicatorWidth:i,titleX:s,ownerX:u,badgeX:f,footnoteRightX:d,tabX:o,tabW:m,rightX:o+m}}function bu(t,e,r){let n=t+24,i=n+10,o=e.length*6,s=Math.max(60,o+10+10),a=n+s+6,c=a+18,l=0,u=0,f=0,d=0,p=c;return r&&(u=c+6,l=r.length*5.5,f=u-3,d=l+6,p=f+d),{labelTextWidth:o,sourceTextWidth:l,tabX:n,tabWidth:s,tabLabelX:i,badgeX:a,badgeSize:18,sourceHaloX:f,sourceHaloWidth:d,sourceTextX:u,chromeRightX:p}}function R_(t,e){if(t.length===0)return{rows:[[]],expanded:!1};let r=[[]],n=0,i=e,o=!1;for(let s of t){let a=r[r.length-1],c=(a.length===0?0:4)+s.width,l=n+c;if(l<=i){a.push(s),n=l;continue}if(a.length===0){a.push(s),n=s.width;continue}let u=l-i,f=s.width*.25;if(!o&&u<=f){a.push(s),n=l,i=l,o=!0;continue}r.push([s]),n=s.width,i=e}return{rows:r,expanded:o}}function Xk(t){return t.endsWith(":")?t.slice(0,-1):t}function ae(t,e){return t.find(r=>Xk(r.key)===e)?.value}function gt(t,e){let r=t.find(n=>Xk(n.key)===e);return r?r.value!==void 0?[r.value]:[...r.values]:[]}function Rt(t){if(!t)return null;let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);if(!e)return null;let r=new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10)));return Number.isNaN(r.getTime())?null:r}var Qa={mode:"business",daysPerWeek:5,daysPerMonth:22,daysPerQuarter:65,daysPerYear:260},dB={mode:"full",daysPerWeek:7,daysPerMonth:30,daysPerQuarter:91,daysPerYear:365};function Hk(t,e){let n=t.roadmapDecl?.properties.find(i=>b_(i.key)==="calendar")?.value??"business";if(n==="business")return{...Qa};if(n==="full")return{...dB};if(e){let i=(o,s)=>{let a=e.properties.find(l=>b_(l.key)===o),c=a?parseInt(a.value,10):NaN;return Number.isFinite(c)&&c>0?c:s};return{mode:"custom",daysPerWeek:i("days-per-week",Qa.daysPerWeek),daysPerMonth:i("days-per-month",Qa.daysPerMonth),daysPerQuarter:i("days-per-quarter",Qa.daysPerQuarter),daysPerYear:i("days-per-year",Qa.daysPerYear)}}return{...Qa}}var dh=/^(\d+(?:\.\d+)?)([dwmqy])$/;function ph(t,e){let r=dh.exec(t);if(!r)return 0;let n=parseFloat(r[1]);switch(r[2]){case"d":return n;case"w":return n*e.daysPerWeek;case"m":return n*e.daysPerMonth;case"q":return n*e.daysPerQuarter;case"y":return n*e.daysPerYear;default:return 0}}function jk(t,e,r){return t?dh.test(t)?ph(t,r):e.get(t)?.effortDays??0:0}function zi(t,e,r){let n=ae(t,"duration");if(n&&dh.test(n))return ph(n,r);let i=ae(t,"size"),o=i?e.get(i):void 0;if(!o)return 0;let s=ji(ae(t,"capacity"))??1;return o.effortDays/s}function zk(t,e,r){let n=ae(t,"size"),i=n?e.get(n):void 0;if(i)return i.effortDays;let o=ae(t,"duration");if(o&&dh.test(o)){let s=ji(ae(t,"capacity"))??1;return ph(o,r)*s}return 0}function hh(t,e){let r=new Map;for(let[n,i]of t){let s=i.properties.find(c=>b_(c.key)==="effort")?.value;if(!s)continue;let a=ph(s,e);a<=0||r.set(n,{name:n,title:i.title||void 0,effortDays:a,effortLiteral:s})}return r}function b_(t){return t.endsWith(":")?t.slice(0,-1):t}function Nr(t,e){return Math.round((e.getTime()-t.getTime())/864e5)}function Yo(t,e){let r=new Date(t.getTime());return r.setUTCDate(r.getUTCDate()+e),r}var mh=class{constructor(e){de(this,"items");de(this,"brackets");this.items=e.itemBars,this.brackets=e.brackets}hasObstacle(e,r,n){let i=Math.min(r,n),o=Math.max(r,n);for(let s of this.items)if(!(e<=s.x||e>=s.x+s.width)&&!(s.y+s.height<=i||s.y>=o))return!0;return!1}bracketsNear(e,r,n,i){let o=Math.min(r,n),s=Math.max(r,n),a=[];for(let c of this.brackets)Math.abs(c.x-e)>i||c.yBottom<=o||c.yTop>=s||a.push(c);return a}};function qk(t,e){let r=[],n=[],i=s=>{if(s.kind==="item"){r.push(s.box);return}if(s.kind==="parallel"){if(s.style.bracket==="solid"||s.style.bracket==="dashed"){let l=s.box.y-12,u=s.box.y+s.box.height+12,f=s.box.x,d=s.box.x+s.box.width;n.push({x:f,yTop:l,yBottom:u}),n.push({x:d,yTop:l,yBottom:u}),n.push({x:f+4,yTop:l-1,yBottom:l+1}),n.push({x:f+4,yTop:u-1,yBottom:u+1}),n.push({x:d-4,yTop:l-1,yBottom:l+1}),n.push({x:d-4,yTop:u-1,yBottom:u+1})}for(let a of s.children)i(a);return}if(s.kind==="group"){!(s.style.bg!=="none"&&s.style.bg!=="#ffffff")&&s.style.bracket&&s.style.bracket!=="none"&&n.push({x:s.box.x,yTop:s.box.y,yBottom:s.box.y+s.box.height});for(let c of s.children)i(c);return}},o=s=>{for(let a of s.children)i(a);for(let a of s.nested)o(a)};for(let s of t)o(s);for(let s of e)for(let a of s.nestedSwimlanes)o(a);return{itemBars:r,brackets:n}}function pB(t,e){let{from:r,to:n}=t;if(Math.abs(r.y-n.y)<.5)return{x:(r.x+n.x)/2,underBar:!1,range:null};let i=Math.min(r.y,n.y),o=Math.max(r.y,n.y);if(r.x<=n.x){let a=r.x+6,c=n.x-6;if(a>c)return{x:n.x-6,underBar:!0,range:null};let l={minX:a,maxX:c},u=(r.x+n.x)/2,f=Math.max(a,Math.min(c,u));if(!e.hasObstacle(f,i,o))return{x:f,underBar:!1,range:l};let d=c-a;for(let p=1;p<=d;p++){let m=f-p;if(m>=a&&!e.hasObstacle(m,i,o))return{x:m,underBar:!1,range:l};let g=f+p;if(g<=c&&!e.hasObstacle(g,i,o))return{x:g,underBar:!1,range:l}}return{x:f,underBar:!0,range:l}}let s=[r.x+10,n.x-10];for(let a of s)if(a>0&&!e.hasObstacle(a,i,o))return{x:a,underBar:!1,range:null};return{x:r.x+10,underBar:!0,range:null}}function hB(t,e,r,n){let i=Math.min(r.from.y,r.to.y),o=Math.max(r.from.y,r.to.y),s=n.bracketsNear(t,i,o,4);if(s.length===0)return{x:t,forceUnderBar:!1};let a=s[0],c=Math.abs(s[0].x-t);for(let d=1;d<s.length;d++){let p=Math.abs(s[d].x-t);p<c&&(a=s[d],c=p)}let l=[a.x+4,a.x-4],u=4-.01;for(let d of l){if(e&&(d<e.minX||d>e.maxX))continue;let p=e?d:Math.max(Math.min(r.from.x,r.to.x)+1,Math.min(Math.max(r.from.x,r.to.x)-1,d));if(n.bracketsNear(p,i,o,u).length===0)return{x:p,forceUnderBar:!1}}return{x:e?Math.min(Math.max(t,e.minX),e.maxX):t,forceUnderBar:!0}}function mB(t){let e=[...t].sort((i,o)=>Math.abs(i.channelX-o.channelX)>=1?i.channelX-o.channelX:i.orderIndex-o.orderIndex),r=new Map,n=0;for(;n<e.length;){let i=n+1;for(;i<e.length&&Math.abs(e[i].channelX-e[n].channelX)<1;)i++;let s=[...e.slice(n,i)].sort((c,l)=>{let u=Math.min(c.req.from.y,c.req.to.y),f=Math.min(l.req.from.y,l.req.to.y);return Math.abs(u-f)>.5?u-f:c.orderIndex-l.orderIndex}),a=[];for(let c of s){let l=Math.min(c.req.from.y,c.req.to.y),u=Math.max(c.req.from.y,c.req.to.y),f=-1;for(let d=0;d<a.length;d++)if(a[d]<=l){f=d,a[d]=u;break}f===-1&&(f=a.length,a.push(u)),r.set(c.orderIndex,f)}n=i}return r}function gB(t){if(t===0||t>4)return 0;let e=Math.ceil(t/2);return(t%2===1?1:-1)*e*3}function yB(t){let e=t.from.x>=t.to.x?{x:t.to.x-1,y:t.from.y}:t.from;return{fromId:t.fromId,toId:t.toId,waypoints:[e,t.to],underBar:!1}}function Wk(t,e){let r=new Array(t.length),n=[];for(let o=0;o<t.length;o++){let s=t[o];if(s.isMarkerSource){r[o]=yB(s);continue}if(Math.abs(s.from.y-s.to.y)<.5&&s.to.x-s.from.x<20){r[o]={fromId:s.fromId,toId:s.toId,waypoints:[s.from,s.to],underBar:!1};continue}let{x:a,underBar:c,range:l}=pB(s,e),{x:u,forceUnderBar:f}=hB(a,l,s,e),d=c||f;n.push({req:s,channelX:u,underBar:d,orderIndex:o})}let i=mB(n);for(let o of n){let s=gB(i.get(o.orderIndex)??0),a=o.channelX+s;r[o.orderIndex]={fromId:o.req.fromId,toId:o.req.toId,waypoints:xB(o.req.from,o.req.to,a),underBar:o.underBar}}return r}function xB(t,e,r){return Math.abs(t.y-e.y)<.5?[t,e]:[t,{x:r,y:t.y},{x:r,y:e.y},e]}var wu="en-US",TB={"en-US":{nowLabel:"now",quarterPrefix:"Q"},fr:{nowLabel:"maint.",quarterPrefix:"T"}};function Vk(t,e){return e??t??wu}function gh(t){let e={};for(let r of _B(t)){let n=TB[r];if(n)for(let i of Object.keys(n))e[i]===void 0&&n[i]!==void 0&&(e[i]=n[i])}return e}function _B(t){let e=[],r=EB(t);for(;r.length>0;){e.includes(r)||e.push(r);let n=r.lastIndexOf("-");if(n<=0)break;r=r.slice(0,n)}return e.includes(wu)||e.push(wu),e}function EB(t){return t.split("-").map((r,n)=>n===0?r.toLowerCase():/^[a-zA-Z]{2}$/.test(r)?r.toUpperCase():r).join("-")}function Jk(t){let{box:e,afterDate:r,beforeDate:n,hasLinkIcon:i,footnoteCount:o}=t;if(!r&&!n)return[];let s=[],a=12,c=e.y+5,l=e.width<40;if(r){let u=i?e.x+6+14+4:e.x+6,f=l?{x:e.x-6-a,y:c}:{x:u,y:c};s.push({side:"after",isoDate:r,glyphTopLeft:f,glyphSize:a,spilled:l})}if(n){let u=e.x+e.width,f;o>0?f=u-22-(o-1)*8-4:f=u-12-5-4;let d=f-a,p=l?{x:u+6,y:c}:{x:d,y:c};s.push({side:"before",isoDate:n,glyphTopLeft:p,glyphSize:a,spilled:l})}return s}function xh(t){let{box:e,afterDate:r,beforeDate:n}=t;if(!r&&!n)return[];let i=[],o=12,s=e.y+5;return r&&i.push({side:"after",isoDate:r,glyphTopLeft:{x:e.x+6,y:s},glyphSize:o,spilled:!1}),n&&i.push({side:"before",isoDate:n,glyphTopLeft:{x:e.x+e.width-6-o,y:s},glyphSize:o,spilled:!1}),i}function Vn(t){for(let e of t)if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e}function Th(t,e){return{x:t,y:e,height:0,maxX:t}}var rc=class{constructor(e){de(this,"rows");de(this,"opts");this.opts=e,this.rows=[{y:e.originY,height:e.minRowHeight,rightEdge:e.laneLeftX,spillX:e.laneLeftX,placedChildren:[]}]}placeItem(e){for(let n=0;n<this.rows.length;n+=1){let i=this.rows[n];if(!(e.desiredStart<i.rightEdge)&&!(e.desiredStart<i.spillX)&&!this.rowIntersectsCorridor(i,e))return{rowIndex:n,y:i.y}}let r=this.appendRow(Math.max(this.opts.minRowHeight,e.predictedHeight));return{rowIndex:this.rows.length-1,y:r.y}}placeBlock(){let e=this.rows[this.rows.length-1];if(e.rightEdge>this.opts.laneLeftX){let r=this.appendRow(this.opts.minRowHeight);return{rowIndex:this.rows.length-1,y:r.y}}return{rowIndex:this.rows.length-1,y:e.y}}commitItem(e){let r=this.rows[e.rowIndex],n=Math.max(e.placed.box.height,e.rowHeight??0);this.growRowHeight(e.rowIndex,n),r.rightEdge=e.logicalEnd,r.spillX=e.spillReservation??this.opts.laneLeftX,r.placedChildren.push(e.placed)}commitBlock(e){let r=this.rows[e.rowIndex];this.growRowHeight(e.rowIndex,e.blockHeight),r.rightEdge=e.blockEnd,r.spillX=this.opts.laneLeftX,r.placedChildren.push(e.placed)}usedHeight(){let e=this.rows[this.rows.length-1];return e.y+e.height-this.opts.originY}usedRightX(){let e=this.opts.laneLeftX;for(let r of this.rows)r.rightEdge>e&&(e=r.rightEdge),r.spillX>e&&(e=r.spillX);return e}rowIntersectsCorridor(e,r){return this.opts.slackCorridors.some(n=>n.y>=e.y&&n.y<e.y+e.height&&r.desiredStart<n.xEnd&&r.desiredEnd>n.xStart&&n.slackPredId!==r.childId)}appendRow(e){let r=this.rows[this.rows.length-1],n={y:r.y+r.height,height:e,rightEdge:this.opts.laneLeftX,spillX:this.opts.laneLeftX,placedChildren:[]};return this.rows.push(n),n}growRowHeight(e,r){let n=this.rows[e],i=r-n.height;if(!(i<=0)){n.height=r;for(let o=e+1;o<this.rows.length;o+=1){let s=this.rows[o];s.y+=i;for(let a of s.placedChildren)Qk(a,i)}}}};function Qk(t,e){if(t.box.y+=e,t.kind==="item"){for(let r of t.labelChips)r.box.y+=e;t.overflowBox&&(t.overflowBox.y+=e);return}for(let r of t.children)Qk(r,e)}var eN={red:"#f87171",blue:"#60a5fa",yellow:"#facc15",green:"#34d399",orange:"#fb923c",purple:"#a78bfa",gray:"#94a3b8",navy:"#818cf8",white:"#e2e8f0"},Yn={bg:"none",fg:"#e2e8f0",text:"#e2e8f0",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},w_={name:"dark",surface:{page:"#0b1220",chart:"#111827",headerBox:"#1e293b"},entities:{roadmap:{...Yn,headerHeight:"md",padding:"md"},swimlane:{...Yn,fg:"#e2e8f0",text:"#e2e8f0",padding:"sm",spacing:"none",textSize:"sm"},item:{...Yn,bg:"#0f172a",fg:"#94a3b8",text:"#e2e8f0",shadow:"subtle",cornerRadius:"sm"},parallel:{...Yn,bracket:"none",padding:"xs"},group:{...Yn,bracket:"solid",padding:"xs",fg:"#94a3b8"},anchor:{...Yn,bg:"#0b1220",fg:"#cbd5e1",text:"#cbd5e1",cornerRadius:"sm"},milestone:{...Yn,bg:"#e2e8f0",fg:"#e2e8f0",text:"#0b1220",border:"solid"},footnote:{...Yn,bg:"none",fg:"#94a3b8",text:"#e2e8f0",textSize:"sm"},label:{...Yn,bg:"#1e293b",fg:"#94a3b8",text:"#e2e8f0",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#111827",bandOdd:"#0f172a",separator:"#1f2937",frameTabText:"#e2e8f0",frameTabMuted:"#94a3b8",border:"#334155",tabFill:"#1e293b",tabStroke:"#475569",tabText:"#e2e8f0",ownerText:"#94a3b8",footnoteIndicator:"#f87171",rowTintEven:"#0f172a",rowTintOdd:"#1e293b",utilizationOk:"#34d399",utilizationWarn:"#fbbf24",utilizationOver:"#f87171"},timeline:{gridLine:"#475569",minorGridLine:"#334155",tickMark:"#334155",labelText:"#cbd5e1",panelFill:"#0f172a",border:"#334155"},header:{cardBorder:"#475569",author:"#94a3b8"},item:{overflowX:"#f87171",linkIconFg:"#94a3b8",overflowTailFill:"#7f1d1d",overflowTailStroke:"#f87171",overflowCaption:"#fecaca"},parallel:{bracketStroke:"#cbd5e1"},anchorDiamond:{fill:"#0f172a",stroke:"#cbd5e1",label:"#cbd5e1",cutLine:"#94a3b8"},milestoneDiamond:{fill:"#e2e8f0",label:"#e2e8f0",cutLineNormal:"#a5b4fc",cutLineOverrun:"#ef4444",slack:"#cbd5e1"},footnotePanel:{fill:"#0f172a",border:"#334155",header:"#e2e8f0",title:"#e2e8f0",description:"#94a3b8",number:"#f87171"},nowline:{stroke:"#f87171",labelText:"#0b1220",labelBg:"#f87171"},milestone:{dashedInk:"#a5b4fc",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#cbd5e1",overflowStroke:"#ef5350"},footnote:{indicatorText:"#f87171",descriptionMuted:"#94a3b8"},includeRegion:{border:"#475569",label:"#cbd5e1",badge:"#94a3b8",fill:"#0b1220",tabFill:"#111827",tabStroke:"#475569",tabText:"#e2e8f0",badgeFill:"#1e293b",badgeStroke:"#475569",badgeText:"#94a3b8"},arrowhead:{neutral:"#94a3b8",light:"#64748b",dark:"#e2e8f0"},status:{done:"#34d399",inProgress:"#60a5fa",atRisk:"#facc15",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#cbd5e1",link:"#f87171"},diagnostic:{overlayBg:"#7f1d1d",errorText:"#fecaca"}};var tN={red:"#4a4a4a",blue:"#6b6b6b",green:"#8a8a8a",yellow:"#c8c8c8",orange:"#5c5c5c",purple:"#3a3a3a",gray:"#9e9e9e",navy:"#2a2a2a",white:"#ffffff"},Kn={bg:"none",fg:"#1a1a1a",text:"#1a1a1a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},A_={name:"grayscale",surface:{page:"#f5f5f5",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Kn,headerHeight:"md",padding:"md"},swimlane:{...Kn,fg:"#3a3a3a",text:"#3a3a3a",padding:"sm",spacing:"none",textSize:"sm"},item:{...Kn,bg:"#ffffff",fg:"#9e9e9e",text:"#1a1a1a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Kn,bracket:"none",padding:"xs"},group:{...Kn,bracket:"solid",padding:"xs",fg:"#595959"},anchor:{...Kn,bg:"#1a1a1a",fg:"#1a1a1a",text:"#1a1a1a",cornerRadius:"sm"},milestone:{...Kn,bg:"#2a2a2a",fg:"#2a2a2a",text:"#ffffff",border:"solid"},footnote:{...Kn,bg:"none",fg:"#595959",text:"#595959",textSize:"sm"},label:{...Kn,bg:"#e8e8e8",fg:"#595959",text:"#595959",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f5f5f5",separator:"#d4d4d4",frameTabText:"#3a3a3a",frameTabMuted:"#737373",border:"#d4d4d4",tabFill:"#e8e8e8",tabStroke:"#bdbdbd",tabText:"#3a3a3a",ownerText:"#737373",footnoteIndicator:"#4a4a4a",rowTintEven:"#ffffff",rowTintOdd:"#f5f5f5",utilizationOk:"#8a8a8a",utilizationWarn:"#595959",utilizationOver:"#1a1a1a"},timeline:{gridLine:"#bdbdbd",minorGridLine:"#d4d4d4",tickMark:"#bdbdbd",labelText:"#737373",panelFill:"#ffffff",border:"#d4d4d4"},header:{cardBorder:"#d4d4d4",author:"#737373"},item:{overflowX:"#1a1a1a",linkIconFg:"#1a1a1a",overflowTailFill:"#e8e8e8",overflowTailStroke:"#4a4a4a",overflowCaption:"#3a3a3a"},parallel:{bracketStroke:"#3a3a3a"},anchorDiamond:{fill:"#ffffff",stroke:"#3a3a3a",label:"#3a3a3a",cutLine:"#737373"},milestoneDiamond:{fill:"#1a1a1a",label:"#1a1a1a",cutLineNormal:"#2a2a2a",cutLineOverrun:"#4a4a4a",slack:"#1a1a1a"},footnotePanel:{fill:"#ffffff",border:"#d4d4d4",header:"#1a1a1a",title:"#1a1a1a",description:"#737373",number:"#4a4a4a"},nowline:{stroke:"#1a1a1a",labelText:"#ffffff",labelBg:"#1a1a1a"},milestone:{dashedInk:"#9e9e9e",overrun:"#4a4a4a"},anchor:{predecessorLine:"#9e9e9e"},dependency:{edgeStroke:"#595959",overflowStroke:"#1a1a1a"},footnote:{indicatorText:"#4a4a4a",descriptionMuted:"#737373"},includeRegion:{border:"#9e9e9e",label:"#3a3a3a",badge:"#737373",fill:"#f5f5f5",tabFill:"#ffffff",tabStroke:"#bdbdbd",tabText:"#1a1a1a",badgeFill:"#e8e8e8",badgeStroke:"#bdbdbd",badgeText:"#595959"},arrowhead:{neutral:"#595959",light:"#9e9e9e",dark:"#1a1a1a"},status:{done:"#8a8a8a",inProgress:"#595959",atRisk:"#737373",blocked:"#3a3a3a",planned:"#bdbdbd",neutral:"#bdbdbd"},statusDot:{onLight:{done:"#3a3a3a",inProgress:"#2a2a2a",atRisk:"#4a4a4a",blocked:"#1a1a1a",planned:"#595959",neutral:"#595959"},onDark:{done:"#d4d4d4",inProgress:"#e8e8e8",atRisk:"#c8c8c8",blocked:"#f0f0f0",planned:"#d4d4d4",neutral:"#d4d4d4"}},attribution:{mark:"#9e9e9e",link:"#1a1a1a"},diagnostic:{overlayBg:"#e8e8e8",errorText:"#1a1a1a"}};var rN={red:"#e53935",blue:"#1e88e5",yellow:"#fdd835",green:"#43a047",orange:"#fb8c00",purple:"#8e24aa",gray:"#9e9e9e",navy:"#0d47a1",white:"#ffffff"},Zn={bg:"none",fg:"#0f172a",text:"#0f172a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},S_={name:"light",surface:{page:"#f8fafc",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Zn,headerHeight:"md",padding:"md"},swimlane:{...Zn,fg:"#334155",text:"#334155",padding:"sm",spacing:"none",textSize:"sm"},item:{...Zn,bg:"#ffffff",fg:"#94a3b8",text:"#0f172a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Zn,bracket:"none",padding:"xs"},group:{...Zn,bracket:"solid",padding:"xs",fg:"#475569"},anchor:{...Zn,bg:"#0f172a",fg:"#0f172a",text:"#0f172a",cornerRadius:"sm"},milestone:{...Zn,bg:"#312e81",fg:"#312e81",text:"#ffffff",border:"solid"},footnote:{...Zn,bg:"none",fg:"#475569",text:"#475569",textSize:"sm"},label:{...Zn,bg:"#f1f5f9",fg:"#475569",text:"#475569",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f8fafc",separator:"#e2e8f0",frameTabText:"#334155",frameTabMuted:"#64748b",border:"#e2e8f0",tabFill:"#f1f5f9",tabStroke:"#cbd5e1",tabText:"#334155",ownerText:"#64748b",footnoteIndicator:"#dc2626",rowTintEven:"#ffffff",rowTintOdd:"#f8fafc",utilizationOk:"#10b981",utilizationWarn:"#f59e0b",utilizationOver:"#ef4444"},timeline:{gridLine:"#cbd5e1",minorGridLine:"#e2e8f0",tickMark:"#cbd5e1",labelText:"#64748b",panelFill:"#ffffff",border:"#e2e8f0"},header:{cardBorder:"#e2e8f0",author:"#64748b"},item:{overflowX:"#dc2626",linkIconFg:"#0f172a",overflowTailFill:"#fee2e2",overflowTailStroke:"#ef4444",overflowCaption:"#b91c1c"},parallel:{bracketStroke:"#334155"},anchorDiamond:{fill:"#ffffff",stroke:"#334155",label:"#334155",cutLine:"#64748b"},milestoneDiamond:{fill:"#0f172a",label:"#0f172a",cutLineNormal:"#1e1b4b",cutLineOverrun:"#b91c1c",slack:"#0f172a"},footnotePanel:{fill:"#ffffff",border:"#e2e8f0",header:"#0f172a",title:"#0f172a",description:"#64748b",number:"#dc2626"},nowline:{stroke:"#e53e3e",labelText:"#ffffff",labelBg:"#e53e3e"},milestone:{dashedInk:"#94a3b8",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#475569",overflowStroke:"#d32f2f"},footnote:{indicatorText:"#e53e3e",descriptionMuted:"#64748b"},includeRegion:{border:"#94a3b8",label:"#334155",badge:"#64748b",fill:"#f8fafc",tabFill:"#ffffff",tabStroke:"#cbd5e1",tabText:"#0f172a",badgeFill:"#e2e8f0",badgeStroke:"#cbd5e1",badgeText:"#475569"},arrowhead:{neutral:"#475569",light:"#94a3b8",dark:"#0f172a"},status:{done:"#10b981",inProgress:"#3b82f6",atRisk:"#f59e0b",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#94a3b8",link:"#e53e3e"},diagnostic:{overlayBg:"#fee2e2",errorText:"#991b1b"}};var I_={light:S_,dark:w_,grayscale:A_};var wB={greyscale:"grayscale"};function k_(t){let e=t.toLowerCase(),r=wB[e]??e;if(r==="light"||r==="dark"||r==="grayscale")return r}var AB={grey:"gray",violet:"purple"};function Ko(t,e){if(t==="none")return"none";if(t.startsWith("#"))return t;let r=e.name==="dark"?eN:e.name==="grayscale"?tN:rN,n=AB[t]??t,i=r[n];return typeof i=="string"?i:t}function nc(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}function SB(t,e){return{bg:Ko(t.bg,e),fg:Ko(t.fg,e),text:Ko(t.text,e),border:t.border,icon:t.icon,shadow:t.shadow,font:t.font,weight:t.weight,italic:t.italic,textSize:t.textSize,padding:t.padding,spacing:t.spacing,headerHeight:t.headerHeight,cornerRadius:t.cornerRadius,bracket:t.bracket,headerPosition:"beside",capacityIcon:t.capacityIcon,timelinePosition:"top",minorGrid:!1}}function N_(t,e,r,n){switch(e){case"bg":t.bg=Ko(r,n);break;case"fg":t.fg=Ko(r,n);break;case"text":t.text=Ko(r,n);break;case"border":(r==="solid"||r==="dashed"||r==="dotted")&&(t.border=r);break;case"icon":t.icon=r;break;case"shadow":(r==="none"||r==="subtle"||r==="soft"||r==="hard")&&(t.shadow=r);break;case"font":(r==="sans"||r==="serif"||r==="mono")&&(t.font=r);break;case"weight":(r==="thin"||r==="light"||r==="normal"||r==="bold")&&(t.weight=r);break;case"italic":t.italic=r==="true";break;case"text-size":t.textSize=Iu(r,"xl");break;case"padding":t.padding=Iu(r,"xl");break;case"spacing":t.spacing=Iu(r,"xl");break;case"header-height":t.headerHeight=Iu(r,"xl");break;case"corner-radius":t.cornerRadius=Iu(r,"full");break;case"bracket":(r==="none"||r==="solid"||r==="dashed")&&(t.bracket=r);break;case"header-position":(r==="beside"||r==="above")&&(t.headerPosition=r);break;case"capacity-icon":t.capacityIcon=r;break;case"timeline-position":(r==="top"||r==="bottom"||r==="both")&&(t.timelinePosition=r);break;case"minor-grid":t.minorGrid=r==="true";break;default:break}}function Iu(t,e){let r=["none","xs","sm","md","lg","xl","full"],n=r.indexOf(e),i=r.indexOf(t);return i<0?"md":i>n?r[n]:r[i]}function nN(t,e,r){if(e)for(let n of e.properties)N_(t,nc(n),n.value,r)}function IB(t,e,r){for(let n of e){let i=nc(n);n.value!==void 0&&N_(t,i,n.value,r)}}function kB(t,e,r){let n=e.find(o=>nc(o)==="labels");if(!n)return;let i=n.value?[n.value]:n.values;for(let o of i){let s=r.labels.get(o);if(!s)continue;let a=s.properties.find(c=>nc(c)==="style");a?.value&&nN(t,r.styles.get(a.value),r.theme)}}function NB(t,e,r){let n=e.find(i=>nc(i)==="style");n?.value&&nN(t,r.styles.get(n.value),r.theme)}function yt(t,e,r){let n=r.theme.entities[t],i=SB(n,r.theme),o=r.defaults.get(t);if(o)for(let s of o.properties)s.value!==void 0&&N_(i,nc(s),s.value,r.theme);return kB(i,e,r),NB(i,e,r),IB(i,e,r.theme),i}function iN(t,e){return yt("label",t.properties,e)}var oN={none:0,xs:2,sm:4,md:8,lg:16,xl:24},sN={none:0,xs:4,sm:8,md:12,lg:20,xl:32};var ic={none:0,xs:10,sm:12,md:14,lg:18,xl:24},_h={none:0,xs:2,sm:4,md:8,lg:12,xl:20,full:9999};var Pr=8,Rn=4,ku=24,Eh=15,Nu=8,vh=22,Rh=15,Pu=16,bh=6,P_=4,C_=11,O_=9,L_=5.5,D_=4,oc=12,wh="6 4",$_=36,qi=16,M_=qi/2,Cu=10,F_=qi-4,sc=6,Ah=2.25,Jr=6,Qr=2*Jr,aN=5,cN=120,U_=240,Sh=72,Ou=28,en=16,B_=22,Lu=18,Ih="Powered by",G_="https://nowline.io",Du=.22,Wi=40,kh=32,lN=.58,PB=Ih.length*kh*lN,CB=10,$u=PB+CB,X_=$u+74,H_=5,Nh=$u+81,OB=3*Wi*lN,LB=Nh+OB,DB=12+Wi,j_=LB*Du,uN=DB*Du,z_=4;var je={sans:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',serif:'Georgia, "Times New Roman", serif',mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},fN={days:7,weeks:4,months:3,quarters:4,years:5};var Ph=class{constructor(e,r){de(this,"node");de(this,"deps");this.node=e,this.deps=r}get id(){return this.node.name??""}place(e,r){let{node:n}=this,{deps:i}=this,o=yt("group",n.properties,r.styleCtx),s=e.x,a=n.title??n.name,c=r.currentFlowKey;r.currentFlowKey=`${c}/group:${n.name??"g"}`;let l=o.bg!=="none"&&o.bg!=="#ffffff"&&!!a,u=l?Pu+P_:0,f=l?D_:0,d=!l&&a?oc:0,p=e.y+d,m=r.bandScale.step(),g=s,v=new rc({laneLeftX:g,originY:p+u,minRowHeight:m,slackCorridors:r.slackCorridors}),T=g,_=[];for(let z of n.content){if(z.$type==="DescriptionDirective")continue;if(!yr(z)){let te=z.properties??[],De=i.resolveChildStart(te,T,g,r),{rowIndex:Ne,y:Xe}=v.placeBlock(),q=i.newCursor(De,Xe),J=i.sequenceOne(z,q,r);_.push(J);let re=J.box.x+J.box.width,P=Math.max(m,q.height);v.commitBlock({rowIndex:Ne,placed:J,blockHeight:P,blockEnd:re}),T=Math.max(T,re);continue}let le=z.properties,O=i.resolveChildStart(le,T,g,r),R=zi(le,r.sizes,r.cal),L=Math.max(Pr,R*r.timeline.pixelsPerDay),$=O+L,w=z.name??"",A=i.predictItemChipExtraHeight(z,r),S=m+A,{rowIndex:M,y:X}=v.placeItem({childId:w,desiredStart:O,desiredEnd:$,predictedHeight:S}),F=i.newCursor(O,X),W=i.sequenceItem(z,F,r);_.push(W);let Z=W.box.x+W.box.width+Jr;T=Math.max(T,Z);let pe=null;(W.textSpills||W.chipsOutside||W.dotSpills||W.iconSpills||W.footnoteSpills)&&(pe=Math.max(W.decorationsRightX,W.chipsOutside?W.chipsRightX:0)+6),v.commitItem({rowIndex:M,placed:W,logicalEnd:Z,spillReservation:pe,rowHeight:S})}let E=Math.max(m,v.usedHeight()),I=Math.max(T,v.usedRightX()),D={x:s,y:p,width:I-s,height:u+E+f};e.x=T+Nu,e.maxX=Math.max(e.maxX,e.x);let k=r.bandScale.step()-r.bandScale.bandwidth();e.height=Math.max(e.height,d+D.height+k);let B=n.name;B&&(r.entityLeftEdges.set(B,D.x),r.entityRightEdges.set(B,D.x+D.width)),r.currentFlowKey=c;let U=xh({box:D,afterDate:Vn(gt(n.properties,"after")),beforeDate:Vn(gt(n.properties,"before"))});return{kind:"group",id:B,title:a,box:D,children:_,style:o,inlineDatePins:U.length>0?U:void 0}}};var q_=12,$B=4,MB=13,FB=11;function dN(t,e){return t.length*e*.58}var Ch=class{constructor(e){de(this,"input");this.input=e}get id(){return this.input.id}measure(e){return{width:Math.max(Pr,this.input.logicalRightX-this.input.logicalLeftX),height:e.bands.bandwidth()}}place(e,r){let n=this.measure(r),i=Math.max(Pr,n.width-2*Jr),o=e.x+Jr,s={x:o,y:e.y,width:i,height:n.height},a=this.input.hasLinkIcon?20+UB-q_:0,c=q_+Math.max(0,a),l=Math.max(0,i-c-q_),u=this.input.title,f=u?dN(u,MB):0,d=this.input.metaText?dN(this.input.metaText,FB):0,p=this.input.metaTrailingWidth??0,m=d+p,g=this.input.metaText!==void 0||p>0,v=u.length>0&&f>l||g&&m>l,T=v?o+i+$B:o+c;return{id:this.input.id,box:s,textX:T,textSpills:v}}},UB=4;var Oh=class{constructor(e,r){de(this,"node");de(this,"deps");this.node=e,this.deps=r}get id(){return this.node.name??""}place(e,r){let{node:n}=this,{deps:i}=this,o=yt("parallel",n.properties,r.styleCtx),s=e.x,a=e.y,c=[],l=s,u=0,f=r.currentFlowKey,d=n.name??"p",p=0;for(let T of n.content){if(T.$type==="DescriptionDirective")continue;r.currentFlowKey=`${f}/par:${d}#${p}`;let _=i.newCursor(s,a+u),E=i.sequenceOne(T,_,r);c.push(E),u+=Math.max(r.bandScale.step(),_.height),l=Math.max(l,_.maxX),p++}r.currentFlowKey=f;let m={x:s,y:a,width:l-s,height:u};e.x=l+Nu,e.maxX=Math.max(e.maxX,e.x),e.height=Math.max(e.height,u);let g=n.name;g&&(r.entityLeftEdges.set(g,m.x),r.entityRightEdges.set(g,m.x+m.width));let v=xh({box:m,afterDate:Vn(gt(n.properties,"after")),beforeDate:Vn(gt(n.properties,"before"))});return{kind:"parallel",id:g,title:n.title??n.name,box:m,children:c,style:o,inlineDatePins:v.length>0?v:void 0}}};function Zo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function W_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Jo(t){let e,r,n;t.length!==2?(e=Zo,r=(a,c)=>Zo(t(a),c),n=(a,c)=>t(a)-c):(e=t===Zo||t===W_?t:BB,r=t,n=t);function i(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{let f=l+u>>>1;r(a[f],c)<0?l=f+1:u=f}while(l<u)}return l}function o(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{let f=l+u>>>1;r(a[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function s(a,c,l=0,u=a.length){let f=i(a,c,l,u-1);return f>l&&n(a[f-1],c)>-n(a[f],c)?f-1:f}return{left:i,center:s,right:o}}function BB(){return 0}function V_(t){return t===null?NaN:+t}var pN=Jo(Zo),hN=pN.right,GB=pN.left,XB=Jo(V_).center,Y_=hN;var ac=class extends Map{constructor(e,r=zB){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(mN(this,e))}has(e){return super.has(mN(this,e))}set(e,r){return super.set(HB(this,e),r)}delete(e){return super.delete(jB(this,e))}};function mN({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function HB({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function jB({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function zB(t){return t!==null&&typeof t=="object"?t.valueOf():t}var qB=Math.sqrt(50),WB=Math.sqrt(10),VB=Math.sqrt(2);function gN(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),s=o>=qB?10:o>=WB?5:o>=VB?2:1,a,c,l;return i<0?(l=Math.pow(10,-i)/s,a=Math.round(t*l),c=Math.round(e*l),a/l<t&&++a,c/l>e&&--c,l=-l):(l=Math.pow(10,i)*s,a=Math.round(t/l),c=Math.round(e/l),a*l<t&&++a,c*l>e&&--c),c<a&&.5<=r&&r<2?gN(t,e,r*2):[a,c,l]}function K_(t,e,r){return e=+e,t=+t,r=+r,gN(t,e,r)[2]}function Lh(t,e,r){e=+e,t=+t,r=+r;let n=e<t,i=n?K_(e,t,r):K_(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function Dh(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,o=new Array(i);++n<i;)o[n]=t+n*r;return o}function cc(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var yN=Symbol("implicit");function $h(){var t=new ac,e=[],r=[],n=yN;function i(o){let s=t.get(o);if(s===void 0){if(n!==yN)return n;t.set(o,s=e.push(o)-1)}return r[s%r.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new ac;for(let s of o)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return $h(e,r).unknown(n)},cc.apply(i,arguments),i}function Mu(){var t=$h().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete t.unknown;function f(){var d=e().length,p=i<n,m=p?i:n,g=p?n:i;o=(g-m)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),m+=(g-m-o*(d-c))*u,s=o*(1-c),a&&(m=Math.round(m),s=Math.round(s));var v=Dh(d).map(function(T){return m+o*T});return r(p?v.reverse():v)}return t.domain=function(d){return arguments.length?(e(d),f()):e()},t.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},t.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,a=!0,f()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(d){return arguments.length?(a=!!d,f()):a},t.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},t.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},t.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},t.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},t.copy=function(){return Mu(e(),[n,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},cc.apply(f(),arguments)}function Mh(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Z_(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Bu(){}var Fu=.7,Bh=1/Fu,lc="\\s*([+-]?\\d+)\\s*",Uu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",YB=/^#([0-9a-f]{3,8})$/,KB=new RegExp(`^rgb\\(${lc},${lc},${lc}\\)$`),ZB=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),JB=new RegExp(`^rgba\\(${lc},${lc},${lc},${Uu}\\)$`),QB=new RegExp(`^rgba\\(${bn},${bn},${bn},${Uu}\\)$`),e4=new RegExp(`^hsl\\(${Uu},${bn},${bn}\\)$`),t4=new RegExp(`^hsla\\(${Uu},${bn},${bn},${Uu}\\)$`),xN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Mh(Bu,Vi,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:TN,formatHex:TN,formatHex8:r4,formatHsl:n4,formatRgb:_N,toString:_N});function TN(){return this.rgb().formatHex()}function r4(){return this.rgb().formatHex8()}function n4(){return AN(this).formatHsl()}function _N(){return this.rgb().formatRgb()}function Vi(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=YB.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?EN(e):r===3?new cr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Fh(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Fh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=KB.exec(t))?new cr(e[1],e[2],e[3],1):(e=ZB.exec(t))?new cr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=JB.exec(t))?Fh(e[1],e[2],e[3],e[4]):(e=QB.exec(t))?Fh(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=e4.exec(t))?bN(e[1],e[2]/100,e[3]/100,1):(e=t4.exec(t))?bN(e[1],e[2]/100,e[3]/100,e[4]):xN.hasOwnProperty(t)?EN(xN[t]):t==="transparent"?new cr(NaN,NaN,NaN,0):null}function EN(t){return new cr(t>>16&255,t>>8&255,t&255,1)}function Fh(t,e,r,n){return n<=0&&(t=e=r=NaN),new cr(t,e,r,n)}function i4(t){return t instanceof Bu||(t=Vi(t)),t?(t=t.rgb(),new cr(t.r,t.g,t.b,t.opacity)):new cr}function uc(t,e,r,n){return arguments.length===1?i4(t):new cr(t,e,r,n??1)}function cr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Mh(cr,uc,Z_(Bu,{brighter(t){return t=t==null?Bh:Math.pow(Bh,t),new cr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fu:Math.pow(Fu,t),new cr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new cr(es(this.r),es(this.g),es(this.b),Gh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vN,formatHex:vN,formatHex8:o4,formatRgb:RN,toString:RN}));function vN(){return`#${Qo(this.r)}${Qo(this.g)}${Qo(this.b)}`}function o4(){return`#${Qo(this.r)}${Qo(this.g)}${Qo(this.b)}${Qo((isNaN(this.opacity)?1:this.opacity)*255)}`}function RN(){let t=Gh(this.opacity);return`${t===1?"rgb(":"rgba("}${es(this.r)}, ${es(this.g)}, ${es(this.b)}${t===1?")":`, ${t})`}`}function Gh(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function es(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qo(t){return t=es(t),(t<16?"0":"")+t.toString(16)}function bN(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new tn(t,e,r,n)}function AN(t){if(t instanceof tn)return new tn(t.h,t.s,t.l,t.opacity);if(t instanceof Bu||(t=Vi(t)),!t)return new tn;if(t instanceof tn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=NaN,a=o-i,c=(o+i)/2;return a?(e===o?s=(r-n)/a+(r<n)*6:r===o?s=(n-e)/a+2:s=(e-r)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new tn(s,a,c,t.opacity)}function SN(t,e,r,n){return arguments.length===1?AN(t):new tn(t,e,r,n??1)}function tn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Mh(tn,SN,Z_(Bu,{brighter(t){return t=t==null?Bh:Math.pow(Bh,t),new tn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fu:Math.pow(Fu,t),new tn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new cr(J_(t>=240?t-240:t+120,i,n),J_(t,i,n),J_(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new tn(wN(this.h),Uh(this.s),Uh(this.l),Gh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Gh(this.opacity);return`${t===1?"hsl(":"hsla("}${wN(this.h)}, ${Uh(this.s)*100}%, ${Uh(this.l)*100}%${t===1?")":`, ${t})`}`}}));function wN(t){return t=(t||0)%360,t<0?t+360:t}function Uh(t){return Math.max(0,Math.min(1,t||0))}function J_(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function Q_(t,e,r,n,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*r+(1+3*t+3*o-3*s)*n+s*i)/6}function IN(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],o=t[n+1],s=n>0?t[n-1]:2*i-o,a=n<e-1?t[n+2]:2*o-i;return Q_((r-n/e)*e,s,i,o,a)}}function kN(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],o=t[n%e],s=t[(n+1)%e],a=t[(n+2)%e];return Q_((r-n/e)*e,i,o,s,a)}}var Gu=t=>()=>t;function s4(t,e){return function(r){return t+r*e}}function a4(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function NN(t){return(t=+t)==1?Xh:function(e,r){return r-e?a4(e,r,t):Gu(isNaN(e)?r:e)}}function Xh(t,e){var r=e-t;return r?s4(t,r):Gu(isNaN(t)?e:t)}var eE=(function t(e){var r=NN(e);function n(i,o){var s=r((i=uc(i)).r,(o=uc(o)).r),a=r(i.g,o.g),c=r(i.b,o.b),l=Xh(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=c(u),i.opacity=l(u),i+""}}return n.gamma=t,n})(1);function PN(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),o=new Array(r),s,a;for(s=0;s<r;++s)a=uc(e[s]),n[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return n=t(n),i=t(i),o=t(o),a.opacity=1,function(c){return a.r=n(c),a.g=i(c),a.b=o(c),a+""}}}var jre=PN(IN),zre=PN(kN);function CN(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=t[i]*(1-o)+e[i]*o;return n}}function ON(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function LN(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),o=new Array(r),s;for(s=0;s<n;++s)i[s]=ts(t[s],e[s]);for(;s<r;++s)o[s]=e[s];return function(a){for(s=0;s<n;++s)o[s]=i[s](a);return o}}function DN(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Yi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function $N(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=ts(t[i],e[i]):n[i]=e[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var rE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tE=new RegExp(rE.source,"g");function c4(t){return function(){return t}}function l4(t){return function(e){return t(e)+""}}function MN(t,e){var r=rE.lastIndex=tE.lastIndex=0,n,i,o,s=-1,a=[],c=[];for(t=t+"",e=e+"";(n=rE.exec(t))&&(i=tE.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:Yi(n,i)})),r=tE.lastIndex;return r<e.length&&(o=e.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?l4(c[0].x):c4(e):(e=c.length,function(l){for(var u=0,f;u<e;++u)a[(f=c[u]).i]=f.x(l);return a.join("")})}function ts(t,e){var r=typeof e,n;return e==null||r==="boolean"?Gu(e):(r==="number"?Yi:r==="string"?(n=Vi(e))?(e=n,eE):MN:e instanceof Vi?eE:e instanceof Date?DN:ON(e)?CN:Array.isArray(e)?LN:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?$N:Yi)(t,e)}function nE(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function iE(t){return function(){return t}}function oE(t){return+t}var FN=[0,1];function fc(t){return t}function sE(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:iE(isNaN(e)?NaN:.5)}function u4(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function f4(t,e,r){var n=t[0],i=t[1],o=e[0],s=e[1];return i<n?(n=sE(i,n),o=r(s,o)):(n=sE(n,i),o=r(o,s)),function(a){return o(n(a))}}function d4(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),o=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=sE(t[s],t[s+1]),o[s]=r(e[s],e[s+1]);return function(a){var c=Y_(t,a,1,n)-1;return o[c](i[c](a))}}function UN(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function p4(){var t=FN,e=FN,r=ts,n,i,o,s=fc,a,c,l;function u(){var d=Math.min(t.length,e.length);return s!==fc&&(s=u4(t[0],t[d-1])),a=d>2?d4:f4,c=l=null,f}function f(d){return d==null||isNaN(d=+d)?o:(c||(c=a(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(i((l||(l=a(e,t.map(n),Yi)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,oE),u()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),u()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=nE,u()},f.clamp=function(d){return arguments.length?(s=d?!0:fc,u()):s!==fc},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,p){return n=d,i=p,u()}}function aE(){return p4()(fc,fc)}function cE(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],o=t[n],s;return o<i&&(s=r,r=n,n=s,s=i,i=o,o=s),t[r]=e.floor(i),t[n]=e.ceil(o),t}var lE=new Date,uE=new Date;function Ke(t,e,r,n){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{let s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{let c=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return c;let l;do c.push(l=new Date(+o)),e(o,a),t(o);while(l<o&&o<s);return c},i.filter=o=>Ke(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),r&&(i.count=(o,s)=>(lE.setTime(+o),uE.setTime(+s),t(lE),t(uE),Math.floor(r(lE,uE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?s=>n(s)%o===0:s=>i.count(0,s)%o===0):i)),i}var Xu=Ke(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Xu.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ke(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Xu);var Sne=Xu.range;var wn=Ke(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),BN=wn.range;var dc=Ke(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),h4=dc.range,Hh=Ke(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),m4=Hh.range;var pc=Ke(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),g4=pc.range,jh=Ke(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),y4=jh.range;var Jn=Ke(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),x4=Jn.range,ju=Ke(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),T4=ju.range,zh=Ke(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),_4=zh.range;function is(t){return Ke(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var Qn=is(0),hc=is(1),XN=is(2),HN=is(3),Ki=is(4),jN=is(5),zN=is(6),qN=Qn.range,E4=hc.range,v4=XN.range,R4=HN.range,b4=Ki.range,w4=jN.range,A4=zN.range;function os(t){return Ke(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var ss=os(0),mc=os(1),WN=os(2),VN=os(3),Zi=os(4),YN=os(5),KN=os(6),ZN=ss.range,S4=mc.range,I4=WN.range,k4=VN.range,N4=Zi.range,P4=YN.range,C4=KN.range;var gc=Ke(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),O4=gc.range,qh=Ke(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),L4=qh.range;var xr=Ke(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());xr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ke(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var D4=xr.range,rn=Ke(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());rn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ke(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var $4=rn.range;function QN(t,e,r,n,i,o){let s=[[wn,1,1e3],[wn,5,5*1e3],[wn,15,15*1e3],[wn,30,30*1e3],[o,1,6e4],[o,5,5*6e4],[o,15,15*6e4],[o,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function a(l,u,f){let d=u<l;d&&([l,u]=[u,l]);let p=f&&typeof f.range=="function"?f:c(l,u,f),m=p?p.range(l,+u+1):[];return d?m.reverse():m}function c(l,u,f){let d=Math.abs(u-l)/f,p=Jo(([,,v])=>v).right(s,d);if(p===s.length)return t.every(Lh(l/31536e6,u/31536e6,f));if(p===0)return Xu.every(Math.max(Lh(l,u,f),1));let[m,g]=s[d/s[p-1][2]<s[p][2]/d?p-1:p];return m.every(g)}return[a,c]}var[F4,U4]=QN(rn,qh,ss,zh,jh,Hh),[fE,dE]=QN(xr,gc,Qn,Jn,pc,dc);function pE(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function hE(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function zu(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function mE(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,o=t.days,s=t.shortDays,a=t.months,c=t.shortMonths,l=qu(i),u=Wu(i),f=qu(o),d=Wu(o),p=qu(s),m=Wu(s),g=qu(a),v=Wu(a),T=qu(c),_=Wu(c),E={a:S,A:M,b:X,B:F,c:null,d:oP,e:oP,f:c3,g:x3,G:_3,H:o3,I:s3,j:a3,L:uP,m:l3,M:u3,p:W,q:Z,Q:cP,s:lP,S:f3,u:d3,U:p3,V:h3,w:m3,W:g3,x:null,X:null,y:y3,Y:T3,Z:E3,"%":aP},I={a:pe,A:V,b:te,B:De,c:null,d:sP,e:sP,f:w3,g:D3,G:M3,H:v3,I:R3,j:b3,L:dP,m:A3,M:S3,p:Ne,q:Xe,Q:cP,s:lP,S:I3,u:k3,U:N3,V:P3,w:C3,W:O3,x:null,X:null,y:L3,Y:$3,Z:F3,"%":aP},D={a:le,A:O,b:R,B:L,c:$,d:nP,e:nP,f:t3,g:rP,G:tP,H:iP,I:iP,j:Z4,L:e3,m:K4,M:J4,p:z,q:Y4,Q:n3,s:i3,S:Q4,u:j4,U:z4,V:q4,w:H4,W:W4,x:w,X:A,y:rP,Y:tP,Z:V4,"%":r3};E.x=k(r,E),E.X=k(n,E),E.c=k(e,E),I.x=k(r,I),I.X=k(n,I),I.c=k(e,I);function k(q,J){return function(re){var P=[],we=-1,me=0,ve=q.length,_t,H,Cr;for(re instanceof Date||(re=new Date(+re));++we<ve;)q.charCodeAt(we)===37&&(P.push(q.slice(me,we)),(H=eP[_t=q.charAt(++we)])!=null?_t=q.charAt(++we):H=_t==="e"?" ":"0",(Cr=J[_t])&&(_t=Cr(re,H)),P.push(_t),me=we+1);return P.push(q.slice(me,we)),P.join("")}}function B(q,J){return function(re){var P=zu(1900,void 0,1),we=U(P,q,re+="",0),me,ve;if(we!=re.length)return null;if("Q"in P)return new Date(P.Q);if("s"in P)return new Date(P.s*1e3+("L"in P?P.L:0));if(J&&!("Z"in P)&&(P.Z=0),"p"in P&&(P.H=P.H%12+P.p*12),P.m===void 0&&(P.m="q"in P?P.q:0),"V"in P){if(P.V<1||P.V>53)return null;"w"in P||(P.w=1),"Z"in P?(me=hE(zu(P.y,0,1)),ve=me.getUTCDay(),me=ve>4||ve===0?mc.ceil(me):mc(me),me=ju.offset(me,(P.V-1)*7),P.y=me.getUTCFullYear(),P.m=me.getUTCMonth(),P.d=me.getUTCDate()+(P.w+6)%7):(me=pE(zu(P.y,0,1)),ve=me.getDay(),me=ve>4||ve===0?hc.ceil(me):hc(me),me=Jn.offset(me,(P.V-1)*7),P.y=me.getFullYear(),P.m=me.getMonth(),P.d=me.getDate()+(P.w+6)%7)}else("W"in P||"U"in P)&&("w"in P||(P.w="u"in P?P.u%7:"W"in P?1:0),ve="Z"in P?hE(zu(P.y,0,1)).getUTCDay():pE(zu(P.y,0,1)).getDay(),P.m=0,P.d="W"in P?(P.w+6)%7+P.W*7-(ve+5)%7:P.w+P.U*7-(ve+6)%7);return"Z"in P?(P.H+=P.Z/100|0,P.M+=P.Z%100,hE(P)):pE(P)}}function U(q,J,re,P){for(var we=0,me=J.length,ve=re.length,_t,H;we<me;){if(P>=ve)return-1;if(_t=J.charCodeAt(we++),_t===37){if(_t=J.charAt(we++),H=D[_t in eP?J.charAt(we++):_t],!H||(P=H(q,re,P))<0)return-1}else if(_t!=re.charCodeAt(P++))return-1}return P}function z(q,J,re){var P=l.exec(J.slice(re));return P?(q.p=u.get(P[0].toLowerCase()),re+P[0].length):-1}function le(q,J,re){var P=p.exec(J.slice(re));return P?(q.w=m.get(P[0].toLowerCase()),re+P[0].length):-1}function O(q,J,re){var P=f.exec(J.slice(re));return P?(q.w=d.get(P[0].toLowerCase()),re+P[0].length):-1}function R(q,J,re){var P=T.exec(J.slice(re));return P?(q.m=_.get(P[0].toLowerCase()),re+P[0].length):-1}function L(q,J,re){var P=g.exec(J.slice(re));return P?(q.m=v.get(P[0].toLowerCase()),re+P[0].length):-1}function $(q,J,re){return U(q,e,J,re)}function w(q,J,re){return U(q,r,J,re)}function A(q,J,re){return U(q,n,J,re)}function S(q){return s[q.getDay()]}function M(q){return o[q.getDay()]}function X(q){return c[q.getMonth()]}function F(q){return a[q.getMonth()]}function W(q){return i[+(q.getHours()>=12)]}function Z(q){return 1+~~(q.getMonth()/3)}function pe(q){return s[q.getUTCDay()]}function V(q){return o[q.getUTCDay()]}function te(q){return c[q.getUTCMonth()]}function De(q){return a[q.getUTCMonth()]}function Ne(q){return i[+(q.getUTCHours()>=12)]}function Xe(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var J=k(q+="",E);return J.toString=function(){return q},J},parse:function(q){var J=B(q+="",!1);return J.toString=function(){return q},J},utcFormat:function(q){var J=k(q+="",I);return J.toString=function(){return q},J},utcParse:function(q){var J=B(q+="",!0);return J.toString=function(){return q},J}}}var eP={"-":"",_:" ",0:"0"},Lt=/^\s*\d+/,B4=/^%/,G4=/[\\^$*+?|[\]().{}]/g;function Oe(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(e)+i:i)}function X4(t){return t.replace(G4,"\\$&")}function qu(t){return new RegExp("^(?:"+t.map(X4).join("|")+")","i")}function Wu(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function H4(t,e,r){var n=Lt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function j4(t,e,r){var n=Lt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function z4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function q4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function W4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function tP(t,e,r){var n=Lt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function rP(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function V4(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Y4(t,e,r){var n=Lt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function K4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function nP(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Z4(t,e,r){var n=Lt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function iP(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function J4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Q4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function e3(t,e,r){var n=Lt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function t3(t,e,r){var n=Lt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function r3(t,e,r){var n=B4.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function n3(t,e,r){var n=Lt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function i3(t,e,r){var n=Lt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function oP(t,e){return Oe(t.getDate(),e,2)}function o3(t,e){return Oe(t.getHours(),e,2)}function s3(t,e){return Oe(t.getHours()%12||12,e,2)}function a3(t,e){return Oe(1+Jn.count(xr(t),t),e,3)}function uP(t,e){return Oe(t.getMilliseconds(),e,3)}function c3(t,e){return uP(t,e)+"000"}function l3(t,e){return Oe(t.getMonth()+1,e,2)}function u3(t,e){return Oe(t.getMinutes(),e,2)}function f3(t,e){return Oe(t.getSeconds(),e,2)}function d3(t){var e=t.getDay();return e===0?7:e}function p3(t,e){return Oe(Qn.count(xr(t)-1,t),e,2)}function fP(t){var e=t.getDay();return e>=4||e===0?Ki(t):Ki.ceil(t)}function h3(t,e){return t=fP(t),Oe(Ki.count(xr(t),t)+(xr(t).getDay()===4),e,2)}function m3(t){return t.getDay()}function g3(t,e){return Oe(hc.count(xr(t)-1,t),e,2)}function y3(t,e){return Oe(t.getFullYear()%100,e,2)}function x3(t,e){return t=fP(t),Oe(t.getFullYear()%100,e,2)}function T3(t,e){return Oe(t.getFullYear()%1e4,e,4)}function _3(t,e){var r=t.getDay();return t=r>=4||r===0?Ki(t):Ki.ceil(t),Oe(t.getFullYear()%1e4,e,4)}function E3(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Oe(e/60|0,"0",2)+Oe(e%60,"0",2)}function sP(t,e){return Oe(t.getUTCDate(),e,2)}function v3(t,e){return Oe(t.getUTCHours(),e,2)}function R3(t,e){return Oe(t.getUTCHours()%12||12,e,2)}function b3(t,e){return Oe(1+ju.count(rn(t),t),e,3)}function dP(t,e){return Oe(t.getUTCMilliseconds(),e,3)}function w3(t,e){return dP(t,e)+"000"}function A3(t,e){return Oe(t.getUTCMonth()+1,e,2)}function S3(t,e){return Oe(t.getUTCMinutes(),e,2)}function I3(t,e){return Oe(t.getUTCSeconds(),e,2)}function k3(t){var e=t.getUTCDay();return e===0?7:e}function N3(t,e){return Oe(ss.count(rn(t)-1,t),e,2)}function pP(t){var e=t.getUTCDay();return e>=4||e===0?Zi(t):Zi.ceil(t)}function P3(t,e){return t=pP(t),Oe(Zi.count(rn(t),t)+(rn(t).getUTCDay()===4),e,2)}function C3(t){return t.getUTCDay()}function O3(t,e){return Oe(mc.count(rn(t)-1,t),e,2)}function L3(t,e){return Oe(t.getUTCFullYear()%100,e,2)}function D3(t,e){return t=pP(t),Oe(t.getUTCFullYear()%100,e,2)}function $3(t,e){return Oe(t.getUTCFullYear()%1e4,e,4)}function M3(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Zi(t):Zi.ceil(t),Oe(t.getUTCFullYear()%1e4,e,4)}function F3(){return"+0000"}function aP(){return"%"}function cP(t){return+t}function lP(t){return Math.floor(+t/1e3)}var yc,Wh,hP,mP,gP;gE({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gE(t){return yc=mE(t),Wh=yc.format,hP=yc.parse,mP=yc.utcFormat,gP=yc.utcParse,yc}function U3(t){return new Date(t)}function B3(t){return t instanceof Date?+t:+new Date(+t)}function yP(t,e,r,n,i,o,s,a,c,l){var u=aE(),f=u.invert,d=u.domain,p=l(".%L"),m=l(":%S"),g=l("%I:%M"),v=l("%I %p"),T=l("%a %d"),_=l("%b %d"),E=l("%B"),I=l("%Y");function D(k){return(c(k)<k?p:a(k)<k?m:s(k)<k?g:o(k)<k?v:n(k)<k?i(k)<k?T:_:r(k)<k?E:I)(k)}return u.invert=function(k){return new Date(f(k))},u.domain=function(k){return arguments.length?d(Array.from(k,B3)):d().map(U3)},u.ticks=function(k){var B=d();return t(B[0],B[B.length-1],k??10)},u.tickFormat=function(k,B){return B==null?D:l(B)},u.nice=function(k){var B=d();return(!k||typeof k.range!="function")&&(k=e(B[0],B[B.length-1],k??10)),k?d(cE(B,k)):u},u.copy=function(){return UN(u,yP(t,e,r,n,i,o,s,a,c,l))},u}function Vh(){return cc.apply(yP(fE,dE,xr,gc,Qn,Jn,pc,dc,wn,Wh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var yE=class t{constructor(e,r,n){de(this,"bandwidthPx");de(this,"stepPx");de(this,"d3");this.bandwidthPx=e,this.stepPx=r,this.d3=n}static fixedRow(e){return new t(e.bandwidth,e.step)}static forRows(e){let r=Array.from({length:e.count},(i,o)=>String(o)),n=Mu().domain(r).range(e.range).paddingInner(e.paddingInner??0).paddingOuter(e.paddingOuter??0);return new t(n.bandwidth(),n.step(),n)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(e){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let r=this.d3(e);if(r===void 0)throw new Error(`BandScale: unknown band id "${e}"`);return r}},G3={bandwidth:56,step:64};function xP(){return yE.fixedRow(G3)}var Yh=class{constructor(e){de(this,"domain");de(this,"range");de(this,"pixelsPerDay");de(this,"calendar");de(this,"d3");this.domain=e.domain,this.range=e.range,this.calendar=e.calendar;let r=Math.max(1,Nr(e.domain[0],e.domain[1]));this.pixelsPerDay=(e.range[1]-e.range[0])/r,this.d3=Vh().domain(e.domain).range(e.range)}forward(e){let r=Nr(this.domain[0],e);return this.range[0]+r*this.pixelsPerDay}forwardWithinDomain(e){return e<this.domain[0]||e>this.domain[1]?null:this.forward(e)}invert(e){return this.d3.invert(e)}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Kh(t){return t.endsWith(":")?t.slice(0,-1):t}function TP(t,e){let n=t.roadmapDecl?.properties.find(c=>Kh(c.key)==="scale")?.value,i="weeks",o,s;if(n)if(n==="days"||n==="weeks"||n==="months"||n==="quarters"||n==="years")i=n;else{let c=/^(\d+)([dwmqy])$/.exec(n);if(c){let l=Math.max(1,parseInt(c[1],10));switch(c[2]){case"d":i="days";break;case"w":i="weeks";break;case"m":i="months";break;case"q":i="quarters";break;case"y":i="years";break}o=Zh(i)*l,s=1}}let a=s??fN[i]??4;if(e){let l=e.properties.find(m=>Kh(m.key)==="unit")?.value??i,u=e.properties.find(m=>Kh(m.key)==="label-every"),f=e.properties.find(m=>Kh(m.key)==="pixels-per-unit"),d=u?Math.max(1,parseInt(u.value,10)||a):a,p=f?Math.max(1,parseInt(f.value,10)||Zh(l)):o??Zh(l);return{unit:l,labelEvery:d,pixelsPerUnit:p}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Zh(i)}}function Zh(t){switch(t){case"days":return aN;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}function _P(t,e,r,n=wu){let i=r.daysPerUnit(e.unit),o=i*t.pixelsPerDay,s=Math.max(1,Math.round(t.widthPx/t.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=t.originX+u*t.pixelsPerDay,d=l%e.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?X3(e.unit,Yo(t.domain[0],u),l,n):void 0})}return c}function X3(t,e,r,n){switch(t){case"days":return`${e.getUTCMonth()+1}/${e.getUTCDate()}`;case"weeks":{let i=e.toLocaleString(n,{month:"short",timeZone:"UTC"}),o=e.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return e.toLocaleString(n,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(e.getUTCMonth()/3)+1;return`${gh(n).quarterPrefix}${i} ${e.getUTCFullYear()}`}case"years":return`${e.getUTCFullYear()}`}}function EP(t){return{daysPerUnit:e=>xE(e,t),addUnits:(e,r,n)=>Yo(e,r*xE(n,t)),isWorkingDay:()=>!0}}function vP(t,e){return xE(t,e)}function xE(t,e){switch(t){case"days":return 1;case"weeks":return e.daysPerWeek;case"months":return e.daysPerMonth;case"quarters":return e.daysPerQuarter;case"years":return e.daysPerYear}}var TE=class{constructor(e,r){de(this,"id");de(this,"anchor");this.id=e,this.anchor=r}place(e,r){let n=ae(this.anchor.properties,"date"),i=Rt(n);if(!i)return null;let o=e.scale.forwardWithinDomain(i);if(o===null)return null;let s=yt("anchor",this.anchor.properties,e.styleCtx),a=e.markerRowPlacements.get(this.id),c=a?.centerY??e.timeline.markerRow.y,l={x:o,y:c},u=a?.labelBox??{x:o+6+6,y:c-4,width:0,height:12},f=a?.labelSide??"right";return e.entityLeftEdges.set(this.id,o),e.entityRightEdges.set(this.id,o),e.entityMidpoints.set(this.id,l),{id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:e.chartTopY,cutBottomY:e.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f}}};function bP(t,e,r){let n=[];for(let[i,o]of t){let s=new TE(i,o).place(e,r);s&&n.push(s)}return n}function _E(t,e,r){let n=[],i=new Map,o=new Map;return[...t.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,gt(l.properties,"on")),n.push({number:f,title:l.title??c,description:l.description?.text,style:yt("footnote",l.properties,e.styleCtx)})}),{area:{box:{x:en,y:r+en,width:e.chartRightX-2*en,height:n.length===0?0:Ou+n.length*Lu+en},entries:n},index:i,hosts:o}}var H3=.8,j3=1;function z3(t){let e=[];return AP(t,e),e}function AP(t,e){for(let r of t)if(r.kind==="item"){let n=q3(r);n>0&&r.box.width>0&&e.push({startX:r.box.x,endX:r.box.x+r.box.width,load:n})}else(r.kind==="parallel"||r.kind==="group")&&AP(r.children,e)}function q3(t){return t.capacity?t.capacity.value:t.size?1:0}function SP(t){if(t.capacityValue<=0||t.warnFraction===null&&t.overFraction===null)return null;let e=z3(t.children);if(e.length===0)return null;let r=new Set;for(let s of e)r.add(s.startX),r.add(s.endX);let n=Array.from(r).sort((s,a)=>s-a);if(n.length<2)return null;let i=[];for(let s=0;s<n.length-1;s++){let a=n[s],c=n[s+1],l=(a+c)/2,u=0;for(let f of e)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:W3(u,t.capacityValue,t.warnFraction,t.overFraction)})}let o=[];for(let s of i){let a=o[o.length-1];a&&a.classification===s.classification&&a.endX===s.startX?a.endX=s.endX:o.push({...s})}return{segments:o,capacityValue:t.capacityValue,warnFraction:t.warnFraction,overFraction:t.overFraction}}function W3(t,e,r,n){let i=t/e;return n!==null&&i>=n?"red":r!==null&&i>=r?"yellow":"green"}function IP(t,e){let r=e.get("swimlane"),n=wP(ae(t.properties,"utilization-warn-at"),r?ae(r.properties,"utilization-warn-at"):void 0,H3),i=wP(ae(t.properties,"utilization-over-at"),r?ae(r.properties,"utilization-over-at"):void 0,j3);return{warn:n,over:i}}function wP(t,e,r){let i=K3(t??e);return i.kind==="unset"?r:i.kind==="none"?null:i.value}var V3=/^\d+(?:\.\d+)?%$/,Y3=/^\d+\.\d+$/;function K3(t){if(t===void 0)return{kind:"unset"};if(t==="none")return{kind:"none"};if(V3.test(t)){let e=parseFloat(t)/100;return Number.isFinite(e)&&e>0?{kind:"number",value:e}:{kind:"unset"}}if(Y3.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?{kind:"number",value:e}:{kind:"unset"}}return{kind:"unset"}}var kP=10;function Z3(t,e,r){let n=ae(t.properties,"capacity"),i=ji(n);if(i===null)return{capacity:null,badgeWidthPx:0};let o=Eu(i),s=vu(e.capacityIcon,r),a=Vo(o,s,kP);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var J3=10,Q3=38,eG=8;function tG(t,e,r){let n=t.title??t.name??"";if(!n)return 0;let i=ae(t.properties,"owner");return Ru(0,n,i??void 0,e,r).rightX}function rG(t,e){if(!t.name)return[];let r=[];for(let[n,i]of e.footnoteHosts.entries())if(i.includes(t.name)){let o=e.footnoteIndex.get(n);o!==void 0&&r.push(o)}return r.sort((n,i)=>n-i),r}function nG(t,e,r,n){for(let i of t.content){if(i.$type==="DescriptionDirective")continue;let o=yr(i)?i.properties:i.properties??[];return n.resolveChildStart(o,e,e,r)}}var xc=class{constructor(e,r){de(this,"input");de(this,"deps");this.input=e,this.deps=r}get id(){return this.input.lane.name??""}place(e,r){let{lane:n,bandIndex:i}=this.input,{deps:o}=this,s=yt("swimlane",n.properties,r.styleCtx),a=e.x,c=r.bandScale.step(),l=r.currentFlowKey;r.currentFlowKey=`lane:${n.name??i}`;let{capacity:u,badgeWidthPx:f}=Z3(n,s,r.symbols),d=rG(n,r),p=d.length>0?o.estimateTextWidth(d.join(","),kP):0,m=tG(n,f,p),g=nG(n,a,r,o),v=!n.title||g===void 0||g>=m+eG,T=e.y+(v?J3:Q3),_=new rc({laneLeftX:a,originY:T,minRowHeight:c,slackCorridors:r.slackCorridors}),E=a,I=[];for(let R of n.content){if(R.$type==="DescriptionDirective")continue;if(!yr(R)){let Xe=R.properties??[],q=o.resolveChildStart(Xe,E,a,r),{rowIndex:J,y:re}=_.placeBlock(),P=o.newCursor(q,re),we=o.sequenceOne(R,P,r);I.push(we);let me=we.box.x+we.box.width,ve=Math.max(c,P.height);_.commitBlock({rowIndex:J,placed:we,blockHeight:ve,blockEnd:me}),E=Math.max(E,me);continue}let L=R.properties,$=o.resolveChildStart(L,E,a,r),w=zi(L,r.sizes,r.cal),A=Math.max(Pr,w*r.timeline.pixelsPerDay),S=$+A,M=R.name??"",X=o.predictItemChipExtraHeight(R,r),F=c+X,{rowIndex:W,y:Z}=_.placeItem({childId:M,desiredStart:$,desiredEnd:S,predictedHeight:F}),pe=o.newCursor($,Z),V=o.sequenceItem(R,pe,r);I.push(V);let te=V.box.x+V.box.width+Jr;E=Math.max(E,te);let De=null;(V.textSpills||V.chipsOutside||V.dotSpills||V.iconSpills||V.footnoteSpills)&&(De=Math.max(V.decorationsRightX,V.chipsOutside?V.chipsRightX:0)+6),_.commitItem({rowIndex:W,placed:V,logicalEnd:te,spillReservation:De,rowHeight:F})}let D=T-e.y,k=Math.max(c+32,D+_.usedHeight()+16),B=Math.max(_.usedRightX(),m),U={x:0,y:e.y,width:r.chartRightX,height:k},z=ae(n.properties,"owner"),le;if(z){let R=r.teams.get(z),L=r.persons.get(z);le=R?.title??L?.title??z}let O=u?(()=>{let{warn:R,over:L}=IP(n,r.styleCtx.defaults);return SP({children:I,capacityValue:u.value,warnFraction:R,overFraction:L})})():null;return r.currentFlowKey=l,{positioned:{id:n.name,title:n.title??n.name??"",box:U,bandIndex:i,children:I,nested:[],style:s,owner:le,footnoteIndicators:d,capacity:u,utilization:O},usedHeight:k,usedRightX:B}}};var iG=18,oG=14,sG=14,aG=16,cG=32;function NP(t,e,r,n){let i=r+iG,o=[],s=!0;for(let a of t){s||(i+=aG),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+oG,u={cal:e.cal,styleCtx:{theme:e.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:hh(a.content.sizes,e.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:e.timeline,scale:e.scale,calendar:e.calendar,bandScale:e.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,entityVisualLeftX:new Map,entityVisualRightX:new Map,itemArrowSource:new Map,itemFlowKey:new Map,currentFlowKey:"",itemSlackAttachY:new Map,slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:e.chartRightX},f=[],d=l,p=0,m=u.timeline.originX;for(let k of a.content.swimlanes.values()){let{positioned:B,usedHeight:U,usedRightX:z}=new xc({lane:k,bandIndex:p},n).place({x:u.timeline.originX,y:d},u);f.push(B),d+=U,p++,z>m&&(m=z)}let g=d,v=Math.max(e.bandScale.bandwidth(),g-i+sG),T=0,{chromeRightX:_}=bu(T,c,a.sourcePath),E=Math.max(_,m)+cG,I=Math.min(e.chartRightX-T,E-T),D={x:T,y:i,width:I,height:v};for(let k of f)k.box.width=I;o.push({sourcePath:a.sourcePath,label:c,box:D,nestedSwimlanes:f,style:yt("swimlane",[],e.styleCtx)}),i+=v}return{regions:o,endY:i}}function em(t,e){let r=[];for(let n of t){let o=e.entityVisualRightX.get(n)??e.entityRightEdges.get(n);if(o===void 0)continue;let s=e.itemSlackAttachY.get(n)??e.entityMidpoints.get(n)?.y??0,a=e.itemFlowKey.get(n)??`marker:${n}`;r.push({ref:n,x:o,y:s,flowKey:a})}return r}function tm(t){let e=new Map;for(let r of t){let n=e.get(r.flowKey);(!n||r.x>n.x)&&e.set(r.flowKey,r)}return Array.from(e.values())}function PP(t,e,r,n,i,o,s,a){let c=n.length*i*.58*(o?1.05:1),l=t+r+6,u=t-r-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:e-4,width:c,height:12},side:p}}var EE=class{constructor(e,r){de(this,"id");de(this,"milestone");this.id=e,this.milestone=r}place(e){let r=this.milestone,n=yt("milestone",r.properties,e.styleCtx),i=ae(r.properties,"date"),o=gt(r.properties,"after"),s=Rt(i),a=e.timeline.markerRow.y,c=6,l=r.title??this.id,u=null,f=a,d=null,p="right",m=!1,g,v=!1;if(s){let _=e.scale.forwardWithinDomain(s);if(_===null)return null;u=_,m=!0;let E=e.markerRowPlacements.get(this.id);E&&(f=E.centerY,d=E.labelBox,p=E.labelSide);let I=em(o,e),D=tm(I),k=null;for(let B of D)(!k||B.x>k.x)&&(k=B);k&&k.x>_&&(v=!0,g=[{x:k.x,y:k.y>0?k.y:f}])}else if(o.length>0){let _=em(o,e),E=tm(_);E.sort((B,U)=>U.x-B.x);let I=E[0]?.x??e.timeline.originX;u=I,m=!1;let D=PP(u,a,c,l,10,!0,e.timeline.box.x,e.chartRightX);f=a,d=D.box,p=D.side,e.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let k=[];for(let B=1;B<E.length;B++){let U=E[B];U.x<I&&U.y>0&&k.push({x:U.x,y:U.y})}k.length>0&&(g=k)}if(u===null)return null;if(!d){let _=PP(u,f,c,l,10,!0,e.timeline.box.x,e.chartRightX);d=_.box,p=_.side}let T={x:u,y:f};return e.entityLeftEdges.set(this.id,T.x),e.entityRightEdges.set(this.id,T.x),e.entityMidpoints.set(this.id,T),{id:this.id,title:l,center:T,radius:c,fixed:m,slackArrows:g,isOverrun:v,style:n,cutTopY:e.chartTopY,cutBottomY:e.swimlaneBottomY,labelBox:d,labelSide:p}}};function CP(t,e){let r=[];for(let[n,i]of t){let o=new EE(n,i).place(e);o&&r.push(o)}return r}var uG=4;function fG(t,e){e>t.chartRightX&&(t.chartRightX=e)}var nm=class{place(e,r,n,i){let o=n.theme??"light",s=I_[o],a=n.width??1280,c=Vk(n.locale,hG(e)),l=Hk(e,r.config.calendar),u=TP(e,r.config.scale),f=hh(r.content.sizes,l),d={theme:s,styles:r.config.styles,defaults:r.config.defaults,labels:r.content.labels},{startDate:p,endDate:m}=i.computeDateWindow(e,{cal:l,sizes:f},r,n.today,u),g=yt("roadmap",e.roadmapDecl?.properties??[],d),v=g.headerPosition==="beside",T=g.timelinePosition!=="bottom",_=g.timelinePosition==="bottom"||g.timelinePosition==="both",E=e.roadmapDecl?.title??e.roadmapDecl?.name??"",I=ae(e.roadmapDecl?.properties??[],"author"),D=i.sizeBesideHeader(E,I),k=v?{x:0,y:0,width:D.boxWidth,height:0}:{x:0,y:0,width:0,height:Sh},B=v?D.boxWidth:0,U=v?8:Sh+8,z=EP(l),le=u.pixelsPerUnit/z.daysPerUnit(u.unit),R=Math.max(1,Nr(p,m))*le,L=B+Qr,$=R,w=B+Qr+$+Qr,A=Math.min(a,w),S=n.today!==void 0&&n.today>=p&&n.today<=m,M=r.content.anchors.size+r.content.milestones.size>0,X=S?qi:0,F=T?ku:0,W=new Yh({domain:[p,m],range:[L,L+R],calendar:z}),Z=Math.max(A,L+$+Qr),pe=[];for(let[K,ue]of r.content.anchors){let ze=Rt(ae(ue.properties,"date"));if(!ze)continue;let Dr=W.forwardWithinDomain(ze);Dr!==null&&pe.push({id:K,centerX:Dr,radius:6,title:ue.title??K,fontSize:10,bold:!1,date:ze,isMilestone:!1})}for(let[K,ue]of r.content.milestones){let ze=Rt(ae(ue.properties,"date"));if(!ze)continue;let Dr=W.forwardWithinDomain(ze);Dr!==null&&pe.push({id:K,centerX:Dr,radius:6,title:ue.title??K,fontSize:10,bold:!0,date:ze,isMilestone:!0})}let V=LP(pe,B,Z,i.estimateTextWidth),te=M?Math.max(1,V.rowCount):0,De=te*26,Ne=X+F+De,Xe=Ne+8,q=v?D.cardHeight+uG:0,J=Math.max(U,q-Ne),re=J+X,P=re+F,we=P+De,me=_P(W,u,z,c),ve={box:{x:L,y:J,width:R,height:0},ticks:me,pixelsPerDay:le,originX:L,startDate:p,endDate:m,labelStyle:yt("roadmap",[],d),pillRowHeight:X,tickPanelY:re,tickPanelHeight:F,markerRow:{y:P+13,height:De,collisionY:P-8},minorGrid:g.minorGrid},_t=new Map;for(let[K,ue]of V.placements){let ze=P+13+ue.rowIndex*26;_t.set(K,{rowIndex:ue.rowIndex,centerY:ze,labelBox:{...ue.labelBox,y:ze-4},labelSide:ue.labelSide})}let H={cal:l,styleCtx:d,sizes:f,labels:r.content.labels,teams:r.content.teams,persons:r.content.persons,symbols:r.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:ve,scale:W,calendar:z,bandScale:xP(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,entityVisualLeftX:new Map,entityVisualRightX:new Map,itemArrowSource:new Map,itemFlowKey:new Map,currentFlowKey:"",itemSlackAttachY:new Map,slackCorridors:[],markerRowPlacements:_t,chartTopY:J+Xe,chartBottomY:0,swimlaneBottomY:0,chartRightX:Z};for(let K of pe){let ue=_t.get(K.id);ue&&(H.entityLeftEdges.set(K.id,K.centerX),H.entityRightEdges.set(K.id,K.centerX),H.entityMidpoints.set(K.id,{x:K.centerX,y:ue.centerY}))}let Cr=_E(r.content.footnotes,H,0);H.footnoteIndex=Cr.index,H.footnoteHosts=Cr.hosts;let _r=new Map(H.entityLeftEdges),Or=new Map(H.entityRightEdges),cs=new Map(H.entityMidpoints),_e=[...r.content.swimlanes.values()],Lr=yt("swimlane",[],d),Qi=oN[Lr.spacing]??0,In=()=>{let K=[],ue=H.chartTopY,ze=0,Dr=H.timeline.originX;for(let vr of _e){ze>0&&(ue+=Qi);let{positioned:nf,usedHeight:YE,usedRightX:ne}=new xc({lane:vr,bandIndex:ze},i).place({x:H.timeline.originX,y:ue},H);K.push(nf),ue+=YE,ne>Dr&&(Dr=ne),ze++}return{swimlanes:K,nextY:ue,maxRightX:Dr}},Er=In(),jt=Er.swimlanes,At=Er.nextY,x=dG(r.content.milestones,H);x.length>0&&(H.entityLeftEdges=new Map(_r),H.entityRightEdges=new Map(Or),H.entityMidpoints=new Map(cs),H.itemSlackAttachY=new Map,H.entityVisualLeftX=new Map,H.entityVisualRightX=new Map,H.itemArrowSource=new Map,H.itemFlowKey=new Map,H.currentFlowKey="",H.slackCorridors=x,Er=In(),jt=Er.swimlanes,At=Er.nextY),fG(H,Er.maxRightX+Qr);for(let K of jt)K.box.width=H.chartRightX;let C=r.content.isolatedRegions,j=[];if(C.length>0){let K=NP(C,H,At+8,i);j=K.regions,At=K.endY}H.chartBottomY=At,H.swimlaneBottomY=At,ve.box.height=H.chartBottomY-ve.box.y;let Y=CP(r.content.milestones,H),$e=pe.map(K=>({id:K.id,centerX:K.centerX,radius:K.radius,title:K.title,fontSize:K.fontSize,bold:K.bold}));for(let K of Y)K.fixed||$e.push({id:K.id??"",centerX:K.center.x,radius:K.radius,title:K.title,fontSize:10,bold:!0});let Pe=LP($e,B,H.chartRightX,i.estimateTextWidth);H.markerRowPlacements.clear();for(let[K,ue]of Pe.placements){let ze=P+13+ue.rowIndex*26;H.markerRowPlacements.set(K,{rowIndex:ue.rowIndex,centerY:ze,labelBox:{...ue.labelBox,y:ze-4},labelSide:ue.labelSide})}for(let K of Y){let ue=H.markerRowPlacements.get(K.id??"");ue&&(K.center={x:K.center.x,y:ue.centerY},K.labelBox=ue.labelBox,K.labelSide=ue.labelSide)}for(let K of pe){let ue=H.markerRowPlacements.get(K.id);ue&&H.entityMidpoints.set(K.id,{x:K.centerX,y:ue.centerY})}for(let K of Y)K.fixed||H.entityMidpoints.set(K.id??"",{x:K.center.x,y:K.center.y});let qe=M?Math.max(1,Pe.rowCount):0;if(qe>te){let K=(qe-te)*26;H.timeline.markerRow.height=qe*26,H.timeline.box.height+=K,H.chartTopY+=K,H.chartBottomY+=K,H.swimlaneBottomY+=K;for(let ue of jt)vE(ue,K);for(let ue of j)pG(ue,K);for(let[ue,ze]of H.entityMidpoints)H.markerRowPlacements.has(ue)||H.entityMidpoints.set(ue,{x:ze.x,y:ze.y+K});for(let[ue,ze]of H.itemSlackAttachY)H.itemSlackAttachY.set(ue,ze+K);for(let ue of Y)if(ue.cutTopY=H.chartTopY,ue.cutBottomY=H.swimlaneBottomY,ue.slackArrows)for(let ze of ue.slackArrows)ze.y+=K}_&&(H.timeline.bottomTickPanelY=H.chartBottomY+8,H.timeline.bottomTickPanelHeight=ku,H.chartBottomY+=8+ku);let Ze=new Set(Y.map(K=>K.center.x)),ge=bP(r.content.anchors,H,Ze),Ue=i.collectItems(_e),Ae=i.buildDependencies(Ue,jt,j,H),Je=i.buildNowline(n.today,H,c),st=_E(r.content.footnotes,H,H.chartBottomY);H.footnoteIndex=st.index,H.footnoteHosts=st.hosts,k.height=k.height||H.chartBottomY,v||(k.width=H.chartRightX);let Qt=v?{x:6,y:we-D.cardHeight,width:D.cardWidth,height:D.cardHeight}:{x:0,y:0,width:H.chartRightX,height:Sh},ls=st.area.entries.length>0?st.area.box.y+st.area.box.height:H.chartBottomY,tf={x:H.chartRightX-Qr-j_,y:ls+Qr,width:j_,height:uN},er=tf.y+tf.height+Qr,on={box:k,position:g.headerPosition,title:E,author:I,titleLines:D.titleLines,authorLines:D.authorLines,cardBox:Qt,logo:void 0,style:g,attributionBox:tf};return{width:H.chartRightX,height:er,theme:o,palette:s,backgroundColor:s.surface.page,header:on,timeline:ve,nowline:Je,swimlanes:jt,anchors:ge,milestones:Y,edges:Ae,footnotes:st.area,includes:j,chartBox:{x:B,y:H.chartTopY,width:H.chartRightX-B,height:H.chartBottomY-H.chartTopY}}}};function dG(t,e){let r=[];for(let[n,i]of t){let o=ae(i.properties,"date"),s=gt(i.properties,"after"),a=Rt(o),c=em(s,e),l=tm(c);if(a){let f=e.scale.forwardWithinDomain(a);if(f===null)continue;let d=null;for(let p of l)(!d||p.x>d.x)&&(d=p);d&&d.x>f&&d.y>0&&r.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:n});continue}if(l.length===0)continue;l.sort((f,d)=>d.x-f.x);let u=l[0].x;for(let f=1;f<l.length;f++){let d=l[f];d.x<u&&d.y>0&&r.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:n})}}return r}function vE(t,e){t.box.y+=e;for(let r of t.children)DP(r,e);for(let r of t.nested)vE(r,e)}function DP(t,e){if(t.box.y+=e,t.kind==="item"){t.overflowBox&&(t.overflowBox.y+=e);for(let r of t.labelChips)r.box.y+=e;return}for(let r of t.children)DP(r,e)}function pG(t,e){t.box.y+=e;for(let r of t.nestedSwimlanes)vE(r,e)}function LP(t,e,r,n){let i=[...t].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=n(a.title,a.fontSize)*(a.bold?1.05:1),l=a.centerX+a.radius+6,u=a.centerX-a.radius-6-c,f=l+c<=r,d=u>=e,p=a.centerX-a.radius,m=a.centerX+a.radius,g=B=>B==="right"?l:u,v=B=>B==="right"?f:d,T=(B,U)=>{let z=Math.min(p,B),le=Math.max(m,B+c);return s[U].some(O=>O.left<le&&O.right>z)},_=-1,E="right",I=l;e:for(let B=s.length-1;B>=0;B--)for(let U of["right","left"]){if(!v(U))continue;let z=g(U);if(!T(z,B)){_=B,E=U,I=z;break e}}if(_===-1){for(let[B,U]of o)o.set(B,{...U,rowIndex:U.rowIndex+1});s=[[],...s],_=0,E=f?"right":"left",I=g(E)}let D=Math.min(p,I),k=Math.max(m,I+c);s[_].push({left:D,right:k}),o.set(a.id,{rowIndex:_,labelBox:{x:I,y:0,width:c,height:12},labelSide:E})}return{placements:o,rowCount:s.length}}function hG(t){return t.directive?.properties.find(r=>mG(r.key)==="locale")?.value}function mG(t){return t.endsWith(":")?t.slice(0,-1):t}function TG(t){switch(t){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return t;case void 0:return"planned";default:return"neutral"}}function _G(t){if(!t)return 0;let e=/^(\d{1,3})%$/.exec(t);return e?Math.max(0,Math.min(100,parseInt(e[1],10)))/100:0}function EG(t,e){if(t)return/^\d+(?:\.\d+)?[dwmqy]$/.test(t)||/^\d+%$/.test(t)?t:e.sizes.get(t)?.effortLiteral??t}function vG(t,e){if(t)return e.teams.get(t)?.title??e.persons.get(t)?.title??t}function RG(t){if(!t)return{icon:"none"};let e=t.toLowerCase();return e.includes("linear.app")?{icon:"linear",href:t}:e.includes("github.com")?{icon:"github",href:t}:e.includes("atlassian.net")||e.includes("jira.")?{icon:"jira",href:t}:{icon:"generic",href:t}}function im(t,e,r,n,i){let o=iN(t,e),s=t.name??t.title??"",a=o.padding==="none"?"xs":o.padding,c=sN[a],l=Math.max(20,Math.round(s.length*5.5+c*2));return i!==void 0&&(l=Math.min(l,i)),{text:s,style:o,box:{x:r,y:n,width:l,height:13}}}function IE(t,e,r,n){let i=t.properties,o=yt("item",i,r.styleCtx),s=ae(i,"size"),a=s?r.sizes.get(s)??null:null,c=zi(i,r.sizes,r.cal),l=zk(i,r.sizes,r.cal),u=gt(i,"after"),f=gt(i,"before"),d=ae(i,"date"),p=jk(ae(i,"remaining"),r.sizes,r.cal),m=e.x,g=Rt(d);if(g){let ne=r.scale.forwardWithinDomain(g);ne!==null&&(m=ne)}else if(u.length>0){let ne=e.x;for(let We of u){let Et=Rt(We);if(Et){let ni=r.scale.forwardWithinDomain(Et);ni!==null&&(ne=Math.max(ne,ni));continue}let kn=r.entityRightEdges.get(We);kn!==void 0&&(ne=Math.max(ne,kn))}m=Math.max(e.x,ne)}let v=Math.max(Pr,c*r.timeline.pixelsPerDay),T=m,_=m+v,E=ae(i,"link"),I=RG(E),D=I.icon!=="none",k=Math.max(Pr,v-2*Jr),B=gt(i,"labels"),U=[];for(let ne of B){let We=r.labels.get(ne);if(!We)continue;let Et=im(We,r.styleCtx,0,0);U.push({id:We,width:Et.box.width})}let z=0;for(let ne=0;ne<U.length;ne+=1)ne>0&&(z+=4),z+=U[ne].width;let le=Math.max(0,k-24),O=U.length>0&&z>le,R=!1,L,$;if(f.length>0){let ne,We;for(let Et of f){let kn=Rt(Et),ni=kn?r.scale.forwardWithinDomain(kn)??void 0:r.entityLeftEdges.get(Et);ni!==void 0&&(ne===void 0||ni<ne)&&(ne=ni,We=Et)}ne!==void 0&&_>ne&&(R=!0,L={x:ne,y:e.y,width:_-ne,height:r.bandScale.bandwidth()},$=We)}let w=ae(i,"status"),A=TG(w),S=_G(w);S===0&&A==="done"&&(S=1);let M=/^(\d{1,3})%$/.exec(ae(i,"remaining")??"");S===0&&A==="in-progress"&&M&&(S=1-Math.max(0,Math.min(100,parseInt(M[1],10)))/100),S===0&&A==="in-progress"&&p>0&&l>0&&(S=Math.max(0,Math.min(1,1-p/l)));let X={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},F={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},W={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},Z={done:r.styleCtx.theme.status.done,"in-progress":r.styleCtx.theme.status.inProgress,"at-risk":r.styleCtx.theme.status.atRisk,blocked:r.styleCtx.theme.status.blocked,planned:r.styleCtx.theme.status.planned,neutral:r.styleCtx.theme.status.neutral},pe=r.styleCtx.theme.name,V=pe==="dark",te=V?"#0f172a":"#ffffff",De=pe==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===te&&(o.bg=pe==="grayscale"?W[A]:V?F[A]:X[A]),o.fg===De&&(o.fg=Z[A]);let Ne=ae(i,"duration"),Xe=!!Ne&&/^\d+(?:\.\d+)?[dwmqy]$/.test(Ne),q=a?a.title??a.name:"",J=Xe?Ne:q||void 0,re=ae(i,"remaining"),P=EG(re,r),we=vG(n??ae(i,"owner"),r),me=()=>[J,we].filter(Boolean).join(" "),ve;if(A==="in-progress"&&P){let ne=me();ve=ne?`${ne} \u2014 ${P} remaining`:`${P} remaining`}else if(A==="in-progress"&&S>0&&S<1){let ne=Math.round((1-S)*100),We=me();ve=We?`${We} \u2014 ${ne}% remaining`:`${ne}% remaining`}else(we||J)&&(ve=me()||void 0);let _t=ae(i,"capacity"),H=ji(_t),Cr=null,_r=0;if(H!==null){let ne=Eu(H),We=vu(o.capacityIcon,r.symbols);Cr={value:H,text:ne,icon:We};let Et=11;_r=(ve?Sn(" ",Et):0)+Vo(ne,We,Et)}let Or=t.title??t.name??"",cs=new Ch({id:t.name??"",title:Or,logicalLeftX:T,logicalRightX:_,metaText:ve,metaTrailingWidth:_r,hasLinkIcon:D}).place({x:T,y:e.y},{time:r.scale,bands:r.bandScale,style:o}),_e=cs.box,Lr=r.bandScale.bandwidth(),Qi=_e.width<17,In=D&&_e.width<41,Er=_e.width<23,jt=cs.textSpills||In,At=null;O&&(At=R_(U,_e.width));let x=At?At.rows.length:U.length>0?1:0,C=ve!==void 0||Cr!==null,j=BP(O,jt,x,Lr,C);j>0&&(_e.height=Lr+j);let Y=[],$e=_e.y+Lr-Rn-13-3,Pe=_e.y+38+3,Ze=O&&jt||!O&&C&&U.length>0?Math.max($e,Pe):$e,ge=O?_e.x+_e.width+6:_e.x+12,Ue=ge;if(At)for(let ne=0;ne<At.rows.length;ne+=1){let We=Ze+ne*17,Et=ge;for(let ni of At.rows[ne]){let KE=im(ni.id,r.styleCtx,Et,We);Y.push(KE),Et+=KE.box.width+4}let kn=Et-4;kn>Ue&&(Ue=kn)}else{let ne=ge;for(let We of U){let Et=im(We.id,r.styleCtx,ne,Ze);Y.push(Et),ne+=Et.box.width+4}Ue=U.length>0?ne-4:ge}let Ae=new Set;if(t.name){for(let[ne,We]of r.footnoteHosts.entries())if(We.includes(t.name)){let Et=r.footnoteIndex.get(ne);Et!==void 0&&Ae.add(Et)}}let Je=[...Ae].sort((ne,We)=>ne-We),st=we??n??ae(i,"owner"),Qt=t.description?.text,ls=Je.length>0&&Er,er=_e.x+_e.width+6,on=!1,rf=null;In&&(on&&(er+=4),rf=er,er=rf+14,on=!0);let K=0;if(jt){on&&(er+=4);let ne=Sn(Or,13),We=(ve?Sn(ve,11):0)+_r;K=Math.max(ne,We),er+=K,on=!0}let ue=null;ls&&(on&&(er+=4),ue=er,er+=Je.length*8,on=!0);let ze=null;Qi&&(on&&(er+=4),ze=er+5,er=ze+5,on=!0);let Dr=Math.max(_e.x+_e.width,er),vr=t.name;if(vr){r.entityLeftEdges.set(vr,T),r.entityRightEdges.set(vr,_),r.entityMidpoints.set(vr,{x:(T+_)/2,y:_e.y+_e.height/2}),r.entityVisualLeftX.set(vr,_e.x),r.entityVisualRightX.set(vr,_e.x+_e.width);let ne=jt?{x:_e.x+_e.width,y:_e.y+_e.height-Rn/2}:{x:_e.x+_e.width,y:_e.y+_e.height/2};r.itemArrowSource.set(vr,ne),r.itemFlowKey.set(vr,r.currentFlowKey);let We=jt?_e.y+_e.height-Rn/2:_e.y+_e.height/2;r.itemSlackAttachY.set(vr,We)}e.x=_,e.maxX=Math.max(e.maxX,e.x),e.height=Math.max(e.height,r.bandScale.step()+j);let nf=Jk({box:_e,afterDate:Vn(u),beforeDate:Vn(f),hasLinkIcon:D,footnoteCount:Je.length});return{kind:"item",id:vr,title:Or,box:_e,status:A,progressFraction:S,footnoteIndicators:Je,labelChips:Y,chipsOutside:O,chipsRightX:Ue,linkIcon:I.icon,linkHref:I.href,hasOverflow:R,overflowBox:L,overflowAnchorId:$,owner:st,description:Qt,metaText:ve,textSpills:jt,dotSpills:Qi,iconSpills:In,footnoteSpills:ls,dotSpillCx:ze,iconSpillX:rf,footnoteSpillStartX:ue,decorationsRightX:Dr,capacity:Cr,size:a,style:o,inlineDatePins:nf.length>0?nf:void 0}}function bG(t,e,r){return new Oh(t,{sequenceOne:kE,newCursor:Th}).place(e,r)}function wG(t,e,r){return new Ph(t,{sequenceItem:IE,sequenceOne:kE,resolveChildStart:XP,newCursor:Th,estimateTextWidth:Sn,predictItemChipExtraHeight:GP}).place(e,r)}function kE(t,e,r){if(yr(t))return IE(t,e,r);if(Vr(t))return bG(t,e,r);if(Wr(t))return wG(t,e,r);throw new Error(`Unknown swimlane child type: ${t.$type??"unknown"}`)}function Sn(t,e){return t.length*e*.58}function BP(t,e,r,n,i){if(r===0)return 0;let o=n-Rn-13-3,s=41,a;t&&e?a=s:!t&&i?a=Math.max(o,s):a=o;let l=a+(r-1)*17+13+3+Rn;return Math.max(0,l-n)}function GP(t,e){let r=t.properties,n=gt(r,"labels");if(n.length===0)return 0;let i=zi(r,e.sizes,e.cal),o=Math.max(Pr,i*e.timeline.pixelsPerDay),s=Math.max(Pr,o-2*Jr),a=[];for(let T of n){let _=e.labels.get(T);if(!_)continue;let E=im(_,e.styleCtx,0,0);a.push({id:_,width:E.box.width})}if(a.length===0)return 0;let c=0;for(let T=0;T<a.length;T+=1)T>0&&(c+=4),c+=a[T].width;let l=Math.max(0,s-24),u=c>l,f=ae(r,"duration")!==void 0||ae(r,"size")!==void 0||ae(r,"owner")!==void 0||ae(r,"remaining")!==void 0||ae(r,"capacity")!==void 0,d=t.title??t.name??"",m=(d?Sn(d,13):0)>l,g=u?R_(a,s):null,v=g?g.rows.length:a.length>0?1:0;return BP(u,m,v,e.bandScale.bandwidth(),f)}function XP(t,e,r,n){let i=Rt(ae(t,"date"))??Rt(ae(t,"start"));if(i){let s=n.scale.forwardWithinDomain(i);if(s!==null)return s}let o=gt(t,"after");if(o.length>0){let s=r;for(let a of o){let c=Rt(a);if(c){let u=n.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=n.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(r,s)}return e}var RE=6;function $P(t,e,r){if(!t)return[];let n=t.split(/\s+/).filter(s=>s.length>0);if(n.length===0)return[];let i=[],o="";for(let s of n){let a=o?`${o} ${s}`:s;o&&Sn(a,r)>e?(i.push(o),o=s):o=a}return o&&i.push(o),i}function AG(t,e){let r=U_-32,n=$P(t,r,16),i=$P(e??"",r,11),o=0;for(let d of n)o=Math.max(o,Sn(d,16));for(let d of i)o=Math.max(o,Sn(d,11));let s=o+32,a=Math.max(cN-RE,Math.min(U_-RE,s)),c=n.length>0?(n.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+RE;return{titleLines:n,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function SG(t,e,r,n,i){let s=t.roadmapDecl?.properties??[],a=ae(s,"start"),c=Rt(a)??IG(n),l=ae(s,"length");if(l){let p=kG(l,e.cal);if(p>0)return{startDate:c,endDate:Yo(c,p)}}let u=HP(r,e,c,n),f=vP(i.unit,e.cal),d=u>0?Math.ceil(u/f)*f:4*e.cal.daysPerWeek;return{startDate:c,endDate:Yo(c,Math.max(1,d))}}function IG(t){let e=t??new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function kG(t,e){let r=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(t);if(!r)return 0;let n=parseFloat(r[1]);switch(r[2]){case"d":return n;case"w":return n*e.daysPerWeek;case"m":return n*e.daysPerMonth;case"q":return n*e.daysPerQuarter;case"y":return n*e.daysPerYear;default:return 0}}function HP(t,e,r,n){let i=new Map,o=new Map,s=new Map,a=0,c=f=>{let d=Rt(f);return d?Nr(r,d):i.has(f)?i.get(f):o.has(f)?o.get(f):s.has(f)?s.get(f):0};for(let f of t.content.anchors.values()){let d=Rt(ae(f.properties,"date"));if(d&&f.name){let p=Nr(r,d);o.set(f.name,p),a=Math.max(a,p)}}let l=(f,d)=>{let p=d;for(let m of f)m.$type!=="DescriptionDirective"&&(p=u(m,p),a=Math.max(a,p));return p},u=(f,d)=>{if(yr(f)){let p=zi(f.properties,e.sizes,e.cal),m=Rt(ae(f.properties,"date")),g=Rt(ae(f.properties,"start")),v=gt(f.properties,"after"),T=d;m?T=Nr(r,m):g?T=Nr(r,g):v.length>0&&(T=Math.max(d,...v.map(c)));let _=T+p;return f.name&&i.set(f.name,_),_}if(Vr(f)){let p=gt(f.properties,"after"),m=p.length>0?Math.max(d,...p.map(c)):d,g=m;for(let v of f.content){if(v.$type==="DescriptionDirective")continue;let T=u(v,m);g=Math.max(g,T)}return g}if(Wr(f)){let p=gt(f.properties,"after"),m=p.length>0?Math.max(d,...p.map(c)):d;return l(f.content,m)}return d};for(let f of t.content.swimlanes.values())l(f.content,0);for(let f of t.content.milestones.values()){let d=Rt(ae(f.properties,"date"));if(d){let m=Nr(r,d);f.name&&s.set(f.name,m),a=Math.max(a,m);continue}let p=gt(f.properties,"after");if(p.length>0){let m=Math.max(0,...p.map(c));f.name&&s.set(f.name,m),a=Math.max(a,m)}}for(let f of t.content.isolatedRegions){let d=HP({config:f.config,content:f.content,diagnostics:[],processedFiles:new Set},e,r,void 0);a=Math.max(a,d)}if(n){let f=Nr(r,n);f>0&&(a=Math.max(a,f))}return a}function NG(t,e,r,n){let i=new mh(qk(e,r)),o=[],s=[];for(let[l,u]of t){let f=gt(u.properties,"after"),d=n.entityMidpoints.get(l),p=n.entityVisualLeftX.get(l);if(!d||p===void 0)continue;let m={x:p,y:d.y};for(let g of f){let v=n.itemArrowSource.get(g),T,_=v===void 0;if(v)T=v;else{let E=n.entityMidpoints.get(g);if(!E)continue;T={x:E.x,y:d.y}}!_&&Math.abs(T.y-m.y)<.5&&m.x-T.x<20||(o.push({fromId:g,toId:l,from:T,to:m,isMarkerSource:_}),s.push({fromId:g,toId:l}))}}let a=Wk(o,i),c=[];for(let l=0;l<a.length;l++){let u=a[l];c.push({fromId:s[l].fromId,toId:s[l].toId,waypoints:u.waypoints,kind:u.underBar?"underBar":"normal",style:yt("item",[],n.styleCtx)})}return c}function PG(t,e,r){if(!t)return null;let n=e.scale.forwardWithinDomain(t);if(n===null)return null;let i=e.timeline.box.y,o=e.timeline.tickPanelY,s=gh(r).nowLabel,a=Sn(s,Cu),c=Math.max($_,Math.ceil(a+2*sc)),l=e.timeline.originX-Qr,u=c/2,f;n-u<l?f="flag-right":n+u>e.chartRightX?f="flag-left":f="center";let d=e.timeline.bottomTickPanelY,p=e.timeline.bottomTickPanelHeight??0,m=d!==void 0&&p>0?d+p:e.swimlaneBottomY;return{x:n,topY:o,bottomY:m,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:yt("item",[],e.styleCtx)}}function CG(t){let e=new Map,r=n=>{if(yr(n)){n.name&&e.set(n.name,n);return}if(Vr(n)){for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return}if(Wr(n)){for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return}};for(let n of t)for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return e}function NE(t,e,r={}){return new nm().place(t,e,r,{sequenceItem:IE,sequenceOne:kE,resolveChildStart:XP,newCursor:Th,estimateTextWidth:Sn,predictItemChipExtraHeight:GP,computeDateWindow:SG,sizeBesideHeader:AG,collectItems:CG,buildDependencies:NG,buildNowline:PG})}var Ji={person:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 21a8 8 0 0 1 16 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"p"},people:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"P"},points:{viewBox:"0 0 24 24",body:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linejoin="round"/>',ascii:"*"},time:{viewBox:"0 0 24 24",body:'<line x1="10" x2="14" y1="2" y2="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" x2="15" y1="14" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="14" r="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"t"}},OG={calendar:{viewBox:"0 0 24 24",body:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="16" x2="16" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="8" x2="8" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="3" x2="21" y1="10" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"d"}},jP={...Ji,...OG};var xse={none:"",multiplier:"x",person:Ji.person.ascii,people:Ji.people.ascii,points:Ji.points.ascii,time:Ji.time.ascii};var lm=class{constructor(e="nl"){de(this,"prefix");de(this,"counter",0);this.prefix=e}next(e){let r=`${this.prefix}-${this.counter++}`;return e?`${r}-${e}`:r}};var LG=new Set(["svg","g","defs","symbol","use","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","linearGradient","radialGradient","stop","clipPath","mask","pattern","filter","feGaussianBlur","feColorMatrix","feOffset","feMerge","feMergeNode","feFlood","feComposite","feBlend","feDropShadow","image"]),DG=new Set(["d","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","viewBox","preserveAspectRatio","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","opacity","transform","points","id","class","clip-path","mask","filter","font-family","font-size","font-weight","font-style","text-anchor","dx","dy","rotate","letter-spacing","word-spacing","style","xmlns","href","xlink:href","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","maskUnits","maskContentUnits","stdDeviation","values","in","in2","mode","type","result","flood-color","flood-opacity","patternUnits","patternContentUnits","role","aria-label"]);function $G(t){let e=[],r=0,n=t.length;for(;r<n;){if(t[r]!=="<"){let u=r;for(;r<n&&t[r]!=="<";)r++;let f=t.slice(u,r);f.trim().length>0?e.push({kind:"text",text:f}):f.length>0&&e.push({kind:"text",text:f});continue}if(t.startsWith("<!--",r)){let u=t.indexOf("-->",r+4);if(u<0)break;e.push({kind:"comment",text:t.slice(r+4,u)}),r=u+3;continue}if(t.startsWith("<![CDATA[",r)){let u=t.indexOf("]]>",r+9);if(u<0)break;e.push({kind:"cdata",text:t.slice(r+9,u)}),r=u+3;continue}if(t.startsWith("<?",r)){let u=t.indexOf("?>",r+2);if(u<0)break;e.push({kind:"decl",text:t.slice(r+2,u)}),r=u+2;continue}if(t.startsWith("<!",r)){let u=t.indexOf(">",r+2);if(u<0)break;e.push({kind:"decl",text:t.slice(r+2,u)}),r=u+1;continue}if(t[r+1]==="/"){let u=t.indexOf(">",r+2);if(u<0)break;let f=t.slice(r+2,u).trim();e.push({kind:"close",name:f}),r=u+1;continue}let i=MG(t,r);if(i<0)break;let o=t.slice(r+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=FG(a);e.push({kind:s?"self":"open",name:c,attrs:l}),r=i+1}return e}function MG(t,e){let r=e+1,n=null;for(;r<t.length;){let i=t[r];if(n)i===n&&(n=null);else if(i==='"'||i==="'")n=i;else if(i===">")return r;r++}return-1}function FG(t){let e=0;for(;e<t.length&&/\s/.test(t[e]);)e++;let r=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.slice(r,e),i={};for(;e<t.length;){for(;e<t.length&&/\s/.test(t[e]);)e++;if(e>=t.length)break;let o=e;for(;e<t.length&&t[e]!=="="&&!/\s/.test(t[e]);)e++;let s=t.slice(o,e);if(e>=t.length||t[e]!=="="){s&&(i[s]="");continue}if(e++,e>=t.length)break;let a=t[e];if(a!=='"'&&a!=="'"){let l=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;i[s]=t.slice(l,e);continue}e++;let c=e;for(;e<t.length&&t[e]!==a;)e++;i[s]=t.slice(c,e),e<t.length&&e++}return{name:n,attrs:i}}function Ku(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function UG(t,e){if(t.startsWith("#")){let r=e.get(t.slice(1));return r?`#${r}`:null}if(/^url\(#[^)]+\)$/.test(t)){let r=t.slice(5,-1),n=e.get(r);return n?`url(#${n})`:null}return null}function zP(t,e={}){let r=e.idPrefix??"nl-logo",n=e.onWarn??(()=>{}),i=$G(t),o=new Map,s=0;for(let l of i)if((l.kind==="open"||l.kind==="self")&&l.attrs&&"id"in l.attrs){let u=l.attrs.id;u&&!o.has(u)&&o.set(u,`${r}-${s++}`)}let a=[],c=[];for(let l of i)if(l.kind!=="comment"&&l.kind!=="decl"){if(l.kind==="cdata"){c[c.length-1]&&a.push(Ku(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");a.push(u)}continue}if(l.kind==="open"||l.kind==="self"){let u=l.name??"";if(u==="script"||u==="foreignObject"||u==="animate"||u==="animateTransform"||u==="animateMotion"||u==="set"){n(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!LG.has(u)){n(`sanitizer: dropping unknown element <${u}>`),l.kind==="open"&&c.push(!1);continue}let f=[`<${u}`],d=Object.keys(l.attrs??{}).sort();for(let p of d){let m=l.attrs[p];if(/^on/i.test(p)){n(`sanitizer: dropping event handler ${p}`);continue}if(!DG.has(p)){n(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=UG(m,o);if(g===null){n(`sanitizer: dropping external href ${m}`);continue}f.push(` ${p}="${Ku(g)}"`);continue}if(p==="style"){n("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(m);g&&f.push(` id="${Ku(g)}"`);continue}if(/\burl\(#/i.test(m)){let g=m.replace(/url\(#([^)]+)\)/gi,(v,T)=>{let _=o.get(T);return _?`url(#${_})`:"none"});f.push(` ${p}="${Ku(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(m)){n(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${Ku(m)}"`)}f.push(l.kind==="self"?"/>":">"),a.push(f.join("")),l.kind==="open"&&c.push(!0);continue}l.kind==="close"&&c.pop()&&a.push(`</${l.name}>`)}return a.join("")}var qP=/&/g,WP=/</g,VP=/>/g,BG=/"/g,GG=/'/g;function lr(t){return t.replace(qP,"&amp;").replace(WP,"&lt;").replace(VP,"&gt;")}function ei(t){return t.replace(qP,"&amp;").replace(WP,"&lt;").replace(VP,"&gt;").replace(BG,"&quot;").replace(GG,"&#39;")}function Ec(t){let e=Object.keys(t).sort(),r=[];for(let n of e){let i=t[n];i==null||i===!1||(i===!0?r.push(n):r.push(`${n}="${ei(String(i))}"`))}return r.length?` ${r.join(" ")}`:""}function Q(t,e,r){return r===void 0||r===""?`<${t}${Ec(e)}/>`:`<${t}${Ec(e)}>${r}</${t}>`}function Le(t,e){return`<text${Ec(t)}>${lr(e)}</text>`}function h(t){return Number.isFinite(t)?Number.isInteger(t)?t.toString():(Math.round(t*100)/100).toString():"0"}var XG={none:{dx:0,dy:0,stdDeviation:0,opacity:0},subtle:{dx:0,dy:1,stdDeviation:1.5,opacity:.2},soft:{dx:0,dy:3,stdDeviation:5,opacity:.3},hard:{dx:2,dy:2,stdDeviation:0,opacity:.45}};function HG(t,e){let r=`${t}-shadow-${e}`,n=XG[e],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${n.stdDeviation}"/><feOffset dx="${n.dx}" dy="${n.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${n.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return Q("filter",{id:r,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function YP(t,e){return e==="none"?null:`url(#${t}-shadow-${e})`}function KP(t){return["subtle","soft","hard"].map(e=>HG(t,e)).join("")}var VG={thin:100,light:300,normal:400,bold:700};function YG(t){return ic[t]??14}function CE(t,e){return{"font-family":je[t.font],"font-size":e??YG(t.textSize),"font-weight":VG[t.weight]??400,"font-style":t.italic?"italic":"normal",fill:t.text}}function KG(t){if(t.border==="dashed")return"4 3";if(t.border==="dotted")return"1 3"}function ZG(t){if(!t||t==="none"||t==="transparent")return 1;let e=t.startsWith("#")?t.slice(1):t;if(e.length===3&&(e=e.split("").map(s=>s+s).join("")),e.length!==6)return 1;let r=parseInt(e.slice(0,2),16)/255,n=parseInt(e.slice(2,4),16)/255,i=parseInt(e.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(r)+.7152*o(n)+.0722*o(i)}function JG(t,e){return ZG(t)>=.24?e.statusDot.onLight:e.statusDot.onDark}function PE(t,e){return t.length*e*.58}function eC(t,e,r,n,i,o,s){let a=i*.58,c=e?PE(e,i):0,l=e?a:0,u=r+c+l,{text:f,icon:d}=t,p=PE(f,i),m={"font-family":o,"font-size":i,fill:s};if(!d)return Le({x:h(u),y:h(n),...m},f);if(d.kind==="builtin"&&d.name==="multiplier")return Le({x:h(u),y:h(n),...m},`${f}\xD7`);if(d.kind==="builtin"){let v=Ji[d.name],T=Le({x:h(u),y:h(n),...m},f),_=i*.1,E=i,I=u+p+_,D=n-i*.85,k=`<svg x="${h(I)}" y="${h(D)}" width="${h(E)}" height="${h(E)}" viewBox="${v.viewBox}" style="color:${ei(s)}" aria-hidden="true">${v.body}</svg>`;return T+k}let g=h(i*.1);return`<text x="${h(u)}" y="${h(n)}" font-family="${ei(o)}" font-size="${i}" fill="${ei(s)}">${lr(f)}<tspan dx="${g}">${lr(d.text)}</tspan></text>`}var ZP=.6,QG=.5;function eX(t){let{metaText:e,capacity:r,x:n,baselineY:i,fontSize:o,fontFamily:s,color:a}=t;if(!e&&!r)return"";let c={"font-family":s,"font-size":o,fill:a};if(!r)return Le({x:h(n),y:h(i),...c},e);if(!e)return eC(r,void 0,n,i,o,s,a);let l=h(o*ZP),u=`<text x="${h(n)}" y="${h(i)}" font-family="${ei(s)}" font-size="${o}" fill="${ei(a)}">`,{text:f,icon:d}=r;if(!d)return u+lr(e)+`<tspan dx="${l}">${lr(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+lr(e)+`<tspan dx="${l}">${lr(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let k=h(o*.1);return u+lr(e)+`<tspan dx="${l}">${lr(f)}</tspan><tspan dx="${k}">${lr(d.text)}</tspan></text>`}let p=Ji[d.name],m=k=>k.length*o*QG,g=n+m(e)+o*ZP,v=o*.1,T=o,_=g+m(f)+v,E=i-o*.85,I=u+lr(e)+`<tspan dx="${l}">${lr(f)}</tspan></text>`,D=`<svg x="${h(_)}" y="${h(E)}" width="${h(T)}" height="${h(T)}" viewBox="${p.viewBox}" style="color:${ei(a)}" aria-hidden="true">${p.body}</svg>`;return I+D}function tX(t,e){let r=jP.calendar,n=`<svg x="${h(t.glyphTopLeft.x)}" y="${h(t.glyphTopLeft.y)}" width="${h(t.glyphSize)}" height="${h(t.glyphSize)}" viewBox="${r.viewBox}" style="color:${ei(e)}" aria-hidden="true">${r.body}</svg>`,i=`<title>${lr(t.isoDate)}</title>`;return Q("g",{"data-layer":"inline-date-pin","data-side":t.side,"data-date":t.isoDate,"data-spilled":t.spilled?"true":null},i+n)}function OE(t,e){return!t||t.length===0?"":t.map(r=>tX(r,e)).join("")}function rX(t,e,r,n,i,o={}){let s=Math.min(_h[i.cornerRadius]??4,n/2);return Q("rect",{x:h(t),y:h(e),width:h(r),height:h(n),rx:h(s),ry:h(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":KG(i)??null,...o})}function nX(t,e,r){let n=t.box.x+t.cardBox.x,i=t.box.y+t.cardBox.y,o=t.cardBox.width,s=t.cardBox.height,a=t.style.bg==="none"?r.surface.headerBox:t.style.bg,c=r.header.cardBorder,l=Q("rect",{x:h(n),y:h(i),width:h(o),height:h(s),rx:6,ry:6,fill:a,stroke:c,"stroke-width":1,filter:`url(#${e}-shadow-subtle)`}),u=[];t.titleLines.forEach((v,T)=>{u.push(Le({x:h(n+16),y:h(i+26+T*20),"font-family":je[t.style.font],"font-size":16,"font-weight":600,fill:t.style.text},v))});let f=u.join(""),d=i+26+Math.max(0,t.titleLines.length-1)*20,p=r.header.author,m=[];t.authorLines.forEach((v,T)=>{m.push(Le({x:h(n+16),y:h(d+18+T*14),"font-family":je[t.style.font],"font-size":11,fill:p},v))});let g=m.join("");return Q("g",{"data-layer":"header","data-id":`${e}-header`},l+f+g)}function iX(t,e,r){let n=r.timeline.gridLine,i=r.timeline.minorGridLine,o=t.bottomTickPanelHeight??0,s=t.bottomTickPanelY!==void 0&&o>0,a=t.tickPanelY,c=s?t.bottomTickPanelY+o:t.box.y+t.box.height,l=e,u=t.box.y+t.box.height,f=[];for(let d of t.ticks)if(d.major)f.push(Q("line",{x1:h(d.x),y1:h(a),x2:h(d.x),y2:h(c),stroke:n,"stroke-width":1}));else if(t.minorGrid){if(d.labelX===void 0)continue;f.push(Q("line",{x1:h(d.x),y1:h(l),x2:h(d.x),y2:h(u),stroke:i,"stroke-width":1}))}return Q("g",{"data-layer":"grid"},f.join(""))}function oX(t,e){let r=e.timeline.panelFill,n=e.timeline.border,i=e.timeline.labelText,o=[],s=t.tickPanelY,a=t.tickPanelHeight,c=a>0,l=t.markerRow.height>0,u=s+a,f=t.markerRow.height,d=t.bottomTickPanelY,p=t.bottomTickPanelHeight??0,m=d!==void 0&&p>0;c&&o.push(Q("rect",{x:h(t.box.x),y:h(s),width:h(t.box.width),height:h(a),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1})),l&&o.push(Q("rect",{x:h(t.box.x),y:h(u),width:h(t.box.width),height:h(f),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1})),m&&o.push(Q("rect",{x:h(t.box.x),y:h(d),width:h(t.box.width),height:h(p),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1}));for(let g of t.ticks)g.major&&(!g.label||g.labelX===void 0||(c&&o.push(Le({x:h(g.labelX),y:h(s+Eh),"font-family":je.sans,"font-size":10,fill:i,"text-anchor":"middle"},g.label)),m&&o.push(Le({x:h(g.labelX),y:h(d+Eh),"font-family":je.sans,"font-size":10,fill:i,"text-anchor":"middle"},g.label))));return Q("g",{"data-layer":"timeline"},o.join(""))}function sX(t,e){if(!t)return"";let r=e.nowline.stroke,n=e.nowline.labelText,i=Q("line",{x1:h(t.x),y1:h(t.topY),x2:h(t.x),y2:h(t.bottomY),stroke:r,"stroke-width":Ah}),o=aX(t,r),s=cX(t,n);return Q("g",{"data-layer":"nowline"},i+o+s)}function tC(t){let e=Ah/2;return t.pillMode==="flag-right"?t.x-e:t.pillMode==="flag-left"?t.x+e:t.x}function aX(t,e){let r=t.pillTopY,n=t.pillTopY+qi,i=M_,o=t.pillWidth;if(t.pillMode==="center")return Q("rect",{x:h(t.x-o/2),y:h(r),width:h(o),height:h(qi),rx:i,ry:i,fill:e});let s=tC(t);if(t.pillMode==="flag-right"){let l=s+o,u=[`M ${h(s)} ${h(r)}`,`L ${h(l-i)} ${h(r)}`,`A ${i} ${i} 0 0 1 ${h(l)} ${h(r+i)}`,`L ${h(l)} ${h(n-i)}`,`A ${i} ${i} 0 0 1 ${h(l-i)} ${h(n)}`,`L ${h(s)} ${h(n)}`,"Z"].join(" ");return Q("path",{d:u,fill:e})}let a=s-o,c=[`M ${h(s)} ${h(r)}`,`L ${h(a+i)} ${h(r)}`,`A ${i} ${i} 0 0 0 ${h(a)} ${h(r+i)}`,`L ${h(a)} ${h(n-i)}`,`A ${i} ${i} 0 0 0 ${h(a+i)} ${h(n)}`,`L ${h(s)} ${h(n)}`,"Z"].join(" ");return Q("path",{d:c,fill:e})}function cX(t,e){let r=t.pillTopY+F_,n=tC(t),i,o;return t.pillMode==="center"?(i=t.x,o="middle"):t.pillMode==="flag-right"?(i=n+sc,o="start"):(i=n-sc,o="end"),Le({x:h(i),y:h(r),"font-family":je.sans,"font-size":Cu,"font-weight":700,fill:e,"text-anchor":o},t.label)}function lX(t,e,r,n){let i=[],o=YP(r,t.style.shadow);i.push(rX(t.box.x,t.box.y,t.box.width,t.box.height,t.style,{filter:o??null}));let s=JG(t.style.bg,n),a={done:s.done,"in-progress":s.inProgress,"at-risk":s.atRisk,blocked:s.blocked,planned:s.planned,neutral:s.neutral},c=a[t.status]??a.neutral;if(t.progressFraction>0){let g=Math.max(0,Math.min(t.box.width,t.box.width*t.progressFraction));i.push(Q("rect",{x:h(t.box.x),y:h(t.box.y+t.box.height-Rn),width:h(g),height:Rn,fill:t.style.fg,opacity:.55}))}let l=t.dotSpills&&t.dotSpillCx!==null?t.dotSpillCx:t.box.x+t.box.width-12;i.push(Q("circle",{cx:h(l),cy:h(t.box.y+12),r:5,fill:c})),i.push(OE(t.inlineDatePins,t.style.fg));let u;t.textSpills?(u=t.box.x+t.box.width+6,t.iconSpills&&(u+=18)):u=t.box.x+12;let f=t.style.text,d=n.entities.item.text,p=t.textSpills?d:f,m=t.textSpills?d:t.style.fg;if(t.title&&i.push(Le({x:h(u),y:h(t.box.y+20),"font-family":je[t.style.font],"font-size":13,"font-weight":600,fill:p},t.title)),(t.metaText||t.capacity)&&i.push(eX({metaText:t.metaText,capacity:t.capacity,x:u,baselineY:t.box.y+38,fontSize:11,fontFamily:je[t.style.font],color:m})),t.footnoteIndicators.length>0){let g=t.box.y+14;if(t.footnoteSpills&&t.footnoteSpillStartX!==null){let v=t.footnoteSpillStartX;for(let T=0;T<t.footnoteIndicators.length;T++){let _=t.footnoteIndicators[T];i.push(Le({x:h(v),y:h(g),"font-family":je.sans,"font-size":10,"font-weight":700,fill:d},String(_))),v+=8}}else{let v=t.box.x+t.box.width-22;for(let T=t.footnoteIndicators.length-1;T>=0;T--){let _=t.footnoteIndicators[T];i.push(Le({x:h(v),y:h(g),"font-family":je.sans,"font-size":10,"font-weight":700,fill:t.style.text,"text-anchor":"end"},String(_))),v-=8}}}if(!e.noLinks&&t.linkIcon&&t.linkIcon!=="none"){let g={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:n.item.linkIconFg},v=g[t.linkIcon]??g.generic,T=14,_=t.iconSpills&&t.iconSpillX!==null?t.iconSpillX:t.box.x+6,E=t.box.y+6,I=Q("rect",{x:h(_),y:h(E),width:T,height:T,rx:2,ry:2,fill:v}),D=_,k=E,B=Q("path",{d:`M${h(D+4)} ${h(k+10)} L${h(D+10)} ${h(k+4)} M${h(D+6)} ${h(k+4)} H${h(D+10)} V${h(k+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),U=I+B,z=t.linkHref?Q("a",{href:t.linkHref,target:"_blank",rel:"noopener"},U):U;i.push(z)}if(t.hasOverflow&&t.overflowBox){let g=n.item.overflowTailFill,v=n.item.overflowTailStroke,T=n.item.overflowCaption;i.push(Q("rect",{x:h(t.overflowBox.x),y:h(t.overflowBox.y),width:h(t.overflowBox.width),height:h(t.overflowBox.height),fill:g,stroke:v,"stroke-width":1})),t.overflowAnchorId&&t.overflowBox.width>60&&i.push(Le({x:h(t.overflowBox.x+t.overflowBox.width/2),y:h(t.overflowBox.y+t.overflowBox.height/2+3),"font-family":je.sans,"font-size":9,"font-weight":700,fill:T,"text-anchor":"middle"},`past ${t.overflowAnchorId}`))}for(let g of t.labelChips){let v=Math.min(_h[g.style.cornerRadius]??8,g.box.height/2);i.push(Q("rect",{x:h(g.box.x),y:h(g.box.y),width:h(g.box.width),height:h(g.box.height),rx:h(v),ry:h(v),fill:g.style.bg==="none"?"transparent":g.style.bg,stroke:g.style.fg,"stroke-width":.5})),i.push(Le({x:h(g.box.x+g.box.width/2),y:h(g.box.y+g.box.height/2+3),...CE(g.style,ic.xs),"text-anchor":"middle"},g.text))}return Q("g",{"data-layer":"item","data-id":t.id??null},i.join(""))}function uX(t,e,r,n){let i=[];if(t.style.bg!=="none"&&t.style.bg!=="#ffffff"){if(i.push(Q("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),rx:6,ry:6,fill:t.style.bg,stroke:t.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${r}-shadow-subtle)`})),t.title){let s=t.title.length*L_+2*bh,a=t.box.x,c=t.box.y,l=Pu,u=6,f=`M${h(a+u)} ${h(c)}H${h(a+s)}V${h(c+l-u)}A${u} ${u} 0 0 1 ${h(a+s-u)} ${h(c+l)}H${h(a)}V${h(c+u)}A${u} ${u} 0 0 1 ${h(a+u)} ${h(c)}Z`;i.push(Q("path",{d:f,fill:t.style.fg})),i.push(Le({x:h(a+bh),y:h(c+C_),"font-family":je[t.style.font],"font-size":O_,"font-weight":600,fill:"#ffffff"},t.title))}}else{let s=t.style.fg;if(t.style.bracket!=="none"){let c=t.box.y+t.box.height,l=t.style.bracket==="dashed"?"3 2":null,u=t.title?`M${h(t.box.x+4)} ${h(t.box.y-oc)} L${h(t.box.x)} ${h(t.box.y-oc)} L${h(t.box.x)} ${h(c)} L${h(t.box.x+4)} ${h(c)}`:`M${h(t.box.x)} ${h(t.box.y)} L${h(t.box.x)} ${h(c)} L${h(t.box.x+4)} ${h(c)}`;i.push(Q("path",{d:u,fill:"none",stroke:s,"stroke-width":1,"stroke-dasharray":l}))}t.title&&i.push(Le({x:h(t.box.x+6),y:h(t.box.y-2),...CE(t.style,ic.xs),"fill-opacity":.7},t.title))}i.push(OE(t.inlineDatePins,t.style.fg));for(let s of t.children)i.push(LE(s,e,r,n));return Q("g",{"data-layer":"group","data-id":t.id??null},i.join(""))}function fX(t,e,r,n){let i=[];if(t.style.bracket==="solid"||t.style.bracket==="dashed"){let a=t.box.y-12,c=t.box.y+t.box.height+12,l=t.box.x,u=t.box.x+t.box.width,f=n.parallel.bracketStroke;i.push(Q("path",{d:`M${h(l+4)} ${h(a)} H${h(l)} V${h(c)} H${h(l+4)}`,fill:"none",stroke:f,"stroke-width":1.25,"stroke-dasharray":t.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),i.push(Q("path",{d:`M${h(u-4)} ${h(a)} H${h(u)} V${h(c)} H${h(u-4)}`,fill:"none",stroke:f,"stroke-width":1.25,"stroke-dasharray":t.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}t.title&&i.push(Le({x:h(t.box.x+4),y:h(t.box.y-2),...CE(t.style,ic.xs),"fill-opacity":.7},t.title)),i.push(OE(t.inlineDatePins,t.style.fg));for(let o of t.children)i.push(LE(o,e,r,n));return Q("g",{"data-layer":"parallel","data-id":t.id??null},i.join(""))}function LE(t,e,r,n){return t.kind==="item"?lX(t,e,r,n):t.kind==="group"?uX(t,e,r,n):fX(t,e,r,n)}var JP=2;function dX(t,e){switch(t){case"green":return e.swimlane.utilizationOk;case"yellow":return e.swimlane.utilizationWarn;case"red":return e.swimlane.utilizationOver}}function pX(t,e){if(!t.utilization||t.utilization.segments.length===0)return"";let r=t.box.y+t.box.height-JP,n=t.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":Q("rect",{x:h(i.startX),y:h(r),width:h(o),height:JP,fill:dX(i.classification,e),"data-utilization":i.classification,"data-load":h(i.load)})});return Q("g",{"data-layer":"lane-utilization","data-id":t.id??null},n.join(""))}function hX(t,e){let r=t.bandIndex%2===0?e.swimlane.rowTintEven:e.swimlane.rowTintOdd,n=e.swimlane.border;return Q("g",{"data-layer":"swimlane-bg","data-id":t.id??null},Q("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),fill:r,stroke:n,"stroke-width":1}))}function rC(t,e,r,n){let i=n.swimlane.tabFill,o=n.swimlane.tabStroke,s=n.swimlane.tabText,a=n.swimlane.ownerText,c=n.swimlane.footnoteIndicator,l=[];if(t.title){let f=t.capacity?Vo(t.capacity.text,t.capacity.icon,10):0,d=t.footnoteIndicators.length>0?t.footnoteIndicators.join(","):"",p=d?PE(d,10):0,m=Ru(t.box.x,t.title,t.owner,f,p),g=vh,v=t.box.y+10,T=v+Rh;l.push(Q("rect",{x:h(m.tabX),y:h(v),width:h(m.tabW),height:h(g),rx:4,ry:4,fill:i,stroke:o,"stroke-width":1})),l.push(Le({x:h(m.titleX),y:h(T),"font-family":je[t.style.font],"font-size":12,"font-weight":600,fill:s},t.title)),t.owner&&l.push(Le({x:h(m.ownerX),y:h(T),"font-family":je[t.style.font],"font-size":10,fill:a},`owner: ${t.owner}`)),t.capacity&&l.push(eC(t.capacity,void 0,m.badgeX,T,10,je[t.style.font],a)),d&&l.push(Le({x:h(m.footnoteRightX),y:h(v+14),"font-family":je.sans,"font-size":10,"font-weight":700,fill:c,"text-anchor":"end"},d))}for(let u of t.children)l.push(LE(u,e,r,n));return l.push(pX(t,n)),Q("g",{"data-layer":"swimlane","data-id":t.id??null},l.join(""))}function mX(t,e){let r=t.radius,n=t.center.x,i=t.center.y,o=e.anchorDiamond.fill,s=e.anchorDiamond.stroke,a=Q("path",{d:`M${h(n)} ${h(i-r)} L${h(n+r)} ${h(i)} L${h(n)} ${h(i+r)} L${h(n-r)} ${h(i)} Z`,fill:o,stroke:s,"stroke-width":1.25}),c=e.anchorDiamond.label,l=t.labelSide==="left"?t.labelBox.x+t.labelBox.width:t.labelBox.x,u={x:h(l),y:h(i+4),"font-family":je.sans,"font-size":10,fill:c};t.labelSide==="left"&&(u["text-anchor"]="end");let f=t.title?Le(u,t.title):"";return Q("g",{"data-layer":"anchor","data-id":t.id??null},a+f)}function gX(t,e){let r=e.anchorDiamond.cutLine;return Q("line",{x1:h(t.center.x),y1:h(t.center.y+t.radius+1),x2:h(t.center.x),y2:h(t.cutBottomY),stroke:r,"stroke-width":1,"stroke-dasharray":"1 3"})}function yX(t,e){let r=t.center.x,n=t.center.y,i=t.radius,o=e.milestoneDiamond.fill,s=Q("path",{d:`M${h(r)} ${h(n-i)} L${h(r+i)} ${h(n)} L${h(r)} ${h(n+i)} L${h(r-i)} ${h(n)} Z`,fill:o,stroke:o,"stroke-width":1}),a=e.milestoneDiamond.label,c=t.labelSide==="left"?t.labelBox.x+t.labelBox.width:t.labelBox.x,l={x:h(c),y:h(n+4),"font-family":je.sans,"font-size":10,"font-weight":600,fill:a};t.labelSide==="left"&&(l["text-anchor"]="end");let u=t.title?Le(l,t.title):"";return Q("g",{"data-layer":"milestone","data-id":t.id??null},s+u)}function xX(t,e){let r=t.isOverrun?e.milestoneDiamond.cutLineOverrun:e.milestoneDiamond.cutLineNormal,n=[];if(n.push(Q("line",{x1:h(t.center.x),y1:h(t.center.y+t.radius+1),x2:h(t.center.x),y2:h(t.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":wh,"stroke-linecap":"round"})),t.slackArrows&&t.slackArrows.length>0){let i=e.milestoneDiamond.slack;for(let o of t.slackArrows)n.push(Q("path",{d:`M${h(o.x)} ${h(o.y)} H${h(t.center.x-6)}`,fill:"none",stroke:i,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":"url(#nl-arrow-dark)"}))}return n.join("")}function QP(t,e){let r=t.kind==="overflow"?e.dependency.overflowStroke:e.dependency.edgeStroke,n=t.waypoints;if(n.length<2)return"";let i=t.kind==="underBar"?.8:1.1;return Q("path",{d:TX(n,z_),fill:"none",stroke:r,"stroke-width":i,"stroke-dasharray":t.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":"url(#nl-arrow)"})}function TX(t,e){if(t.length<2)return"";let r=[`M${h(t[0].x)} ${h(t[0].y)}`];for(let n=1;n<t.length;n++){let i=t[n-1],o=t[n];if(n===t.length-1){r.push(`L${h(o.x)} ${h(o.y)}`);continue}let s=t[n+1],a=Math.sign(o.x-i.x),c=Math.sign(o.y-i.y),l=Math.sign(s.x-o.x),u=Math.sign(s.y-o.y),f=Math.hypot(o.x-i.x,o.y-i.y),d=Math.hypot(s.x-o.x,s.y-o.y),p=Math.min(e,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){r.push(`L${h(o.x)} ${h(o.y)}`);continue}let m={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};r.push(`L${h(m.x)} ${h(m.y)}`),r.push(`Q${h(o.x)} ${h(o.y)} ${h(g.x)} ${h(g.y)}`)}return r.join(" ")}function _X(t,e,r){if(t.entries.length===0)return"";let n=r.footnotePanel.fill,i=r.footnotePanel.border,o=r.footnotePanel.header,s=r.footnotePanel.title,a=r.footnotePanel.description,c=r.footnotePanel.number,l=[];l.push(Q("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),rx:6,ry:6,fill:n,stroke:i,"stroke-width":1,filter:`url(#${e}-shadow-subtle)`})),l.push(Le({x:h(t.box.x+en),y:h(t.box.y+B_),"font-family":je.sans,"font-size":12,"font-weight":700,fill:o},"Footnotes"));let u=t.box.y+Ou+en,f=t.box.x+en,d=f+en;return t.entries.forEach((p,m)=>{let g=u+m*Lu;l.push(Le({x:h(f),y:h(g),"font-family":je.sans,"font-size":10,"font-weight":700,fill:c},String(p.number))),l.push(Le({x:h(d),y:h(g),"font-family":je.sans,"font-size":11,"font-weight":600,fill:s},p.title)),p.description&&l.push(Le({x:h(d+Math.max(120,p.title.length*6)),y:h(g),"font-family":je.sans,"font-size":11,fill:a},`\u2014 ${p.description}`))}),Q("g",{"data-layer":"footnotes"},l.join(""))}function EX(t,e,r,n){let i=n.includeRegion.border,o=n.includeRegion.fill,s=n.includeRegion.tabFill,a=n.includeRegion.tabStroke,c=n.includeRegion.tabText,l=n.includeRegion.badgeFill,u=n.includeRegion.badgeStroke,f=n.includeRegion.badgeText,d=t.box.x+8,p=t.box.y,m=t.box.width-16,g=t.box.height,v=Q("rect",{x:h(d),y:h(p),width:h(m),height:h(g),rx:8,ry:8,fill:o,stroke:i,"stroke-width":1,"stroke-dasharray":wh}),T=vh,_=bu(t.box.x,t.label,t.sourcePath),E=p-T/2,I=Q("rect",{x:h(_.tabX),y:h(E),width:h(_.tabWidth),height:T,rx:4,ry:4,fill:s,stroke:a,"stroke-width":1}),D=Le({x:h(_.tabLabelX),y:h(E+Rh),"font-family":je.sans,"font-size":11,"font-weight":600,fill:c},t.label),k=_.badgeX,B=_.badgeSize,U=p-B/2,z=Q("rect",{x:h(k),y:h(U),width:B,height:B,rx:4,ry:4,fill:l,stroke:u,"stroke-width":1}),le=Q("path",{d:`M${h(k+7)} ${h(U+4)} H${h(k+14)} V${h(U+11)} M${h(k+4)} ${h(U+7)} H${h(k+11)} V${h(U+14)} H${h(k+4)} Z`,stroke:f,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),O=9,R=p+4,L=Q("rect",{x:h(_.sourceHaloX),y:h(R-O),width:h(_.sourceHaloWidth),height:O+6,fill:o}),$=Le({x:h(_.sourceTextX),y:h(R),"font-family":je.mono,"font-size":O,fill:f},t.sourcePath),w=t.nestedSwimlanes.map(A=>rC(A,e,r,n)).join("");return Q("g",{"data-layer":"include"},v+w+I+D+z+le+L+$)}function vX(t){let e=t.palette.attribution.mark,r=t.palette.attribution.link;if(t.swimlanes.length===0)return"";let n=t.header.attributionBox.x,i=t.header.attributionBox.y,o=Wi,s=Le({x:"0",y:o,"font-family":je.sans,"font-size":kh,"font-weight":400,fill:e},Ih)+Le({x:$u,y:o,"font-family":je.sans,"font-size":Wi,"font-weight":700,fill:e},"now")+Q("rect",{x:X_,y:12,width:H_,height:Wi,fill:r})+Le({x:Nh,y:o,"font-family":je.sans,"font-size":Wi,"font-weight":400,fill:e},"ine"),a=Q("g",{transform:`translate(${h(n)} ${h(i)}) scale(${h(Du)})`},s);return Q("a",{href:G_,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},Q("g",{"data-layer":"attribution"},a))}async function RX(t,e,r,n,i,o,s){if(!e)return"";let a;try{a=await e(t)}catch(u){let f=`logo: failed to load ${t}: ${u instanceof Error?u.message:String(u)}`;if(n.strict)throw u;return n.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=zP(u,{idPrefix:`${r}-logo`,onWarn:n.warn});return Q("g",{transform:`translate(${h(i)} ${h(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=bX(a.bytes);return Q("image",{href:`data:${c};base64,${u}`,x:h(i),y:h(o),width:h(s),height:h(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${t}`;if(n.strict)throw new Error(l);return n.warn?.(l),""}function bX(t){if(typeof btoa<"u"){let r="";for(let n=0;n<t.length;n++)r+=String.fromCharCode(t[n]);return btoa(r)}let e=globalThis;if(e.Buffer)return e.Buffer.from(t).toString("base64");throw new Error("renderer: no base64 encoder available")}async function DE(t,e={}){let n=new lm(e.idPrefix??"nl").next("root"),i=t.palette,o=[],s=i.arrowhead.neutral,a=i.arrowhead.light,c=i.arrowhead.dark,l=(d,p)=>`<marker id="${d}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${p}"/></marker>`,u=`<defs>${KP(n)}`+l("nl-arrow",s)+l("nl-arrow-light",a)+l("nl-arrow-dark",c)+"</defs>";o.push(u),o.push(Q("rect",{x:0,y:0,width:h(t.width),height:h(t.height),fill:t.backgroundColor})),o.push(oX(t.timeline,i));for(let d of t.swimlanes)o.push(hX(d,i));o.push(iX(t.timeline,t.chartBox.y,i));for(let d of t.edges)d.kind==="underBar"&&o.push(QP(d,i));for(let d of t.swimlanes)o.push(rC(d,e,n,i));for(let d of t.includes)o.push(EX(d,e,n,i));for(let d of t.edges)d.kind!=="underBar"&&o.push(QP(d,i));for(let d of t.anchors)o.push(gX(d,i));for(let d of t.milestones)o.push(xX(d,i));for(let d of t.anchors)o.push(mX(d,i));for(let d of t.milestones)o.push(yX(d,i));if(o.push(sX(t.nowline,i)),o.push(_X(t.footnotes,n,i)),o.push(nX(t.header,n,i)),o.push(vX(t)),t.header.logo&&e.assetResolver){let d=await RX(t.header.logo.assetRef??"",e.assetResolver,n,e,t.header.logo.box.x,t.header.logo.box.y,Math.max(t.header.logo.box.width,t.header.logo.box.height));d&&o.push(d)}return`<svg${Ec({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${h(t.width)} ${h(t.height)}`,width:h(t.width),height:h(t.height),"data-theme":t.theme,"data-generator":"nowline"})}>${o.join("")}</svg>`}var $E="/browser-source.nowline",um,nC=0;function iC(){return um||(um=v_()),um}function wX(){return ht.parse(`memory:///nowline-browser-${++nC}.nowline`)}async function fm(t,e={}){let r=e.filePath??$E,n=iC(),o=n.shared.workspace.LangiumDocumentFactory.fromString(t,wX());await n.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of gm(o))a.origin==="lexer"?s.push($k(a.error,r)):a.origin==="parser"?s.push(Dk(a.error,r)):s.push(Lk(a.diagnostic,r));return{ast:o.parseResult.value,diagnostics:s}}async function ME(t,e={}){let r=e.filePath??$E,n=await fm(t,{filePath:r});if(n.diagnostics.some(g=>g.severity==="error"))return{kind:"diagnostics",diagnostics:n.diagnostics};let i=iC(),o=e.readFile??Bk,s=await f_(n.ast,r,{services:i.Nowline,readFile:o}),a=[...n.diagnostics];for(let g of s.diagnostics){if(g.severity==="error"&&Gk(g.message)){e.onSkippedInclude?.({sourcePath:g.sourcePath,message:g.message});continue}a.push(Mk(g))}if(a.some(g=>g.severity==="error"))return{kind:"diagnostics",diagnostics:a};let c=e.today===null?void 0:e.today,l=NE(n.ast,s,{theme:e.theme,today:c,locale:e.locale,width:e.width}),u=e.showLinks!==!1,f=e.strict===!0,d=[],p=await DE(l,{idPrefix:e.idPrefix,assetResolver:e.assetResolver,noLinks:!u,strict:f,warn:g=>d.push(g)}),m=d.map(g=>Fk(g,r,f?"error":"warning"));return f&&m.length>0?{kind:"diagnostics",diagnostics:[...a,...m]}:{kind:"svg",svg:p,warnings:m}}function FE(){um=void 0,nC=0}var oC="/embed.nowline",UE=!1;async function sC(t){let{ast:e,diagnostics:r}=await fm(t,{filePath:oC});return{ast:e,errors:r.filter(n=>n.severity==="error").map(n=>n.message)}}async function dm(t,e={}){let r={filePath:oC,theme:e.theme,today:e.today,locale:e.locale,width:e.width,idPrefix:e.idPrefix,onSkippedInclude:()=>{UE||(UE=!0,console.warn("nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."))}},n=await ME(t,r);if(n.kind==="svg")return n.svg;let i=n.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new Zu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var Zu=class extends Error{constructor(r,n){super(r);de(this,"details",n);this.name="EmbedRenderError"}};function aC(){UE=!1,FE()}var nn=Uint8Array,Tr=Uint16Array,jE=Int32Array,zE=new nn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),qE=new nn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),cC=new nn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dC=function(t,e){for(var r=new Tr(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var i=new jE(r[30]),n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return{b:r,r:i}},pC=dC(zE,2),AX=pC.b,GE=pC.r;AX[28]=258,GE[258]=28;var hC=dC(qE,0),Wse=hC.b,lC=hC.r,XE=new Tr(32768);for(Fe=0;Fe<32768;++Fe)ti=(Fe&43690)>>1|(Fe&21845)<<1,ti=(ti&52428)>>2|(ti&13107)<<2,ti=(ti&61680)>>4|(ti&3855)<<4,XE[Fe]=((ti&65280)>>8|(ti&255)<<8)>>1;var ti,Fe,ef=(function(t,e,r){for(var n=t.length,i=0,o=new Tr(e);i<n;++i)t[i]&&++o[t[i]-1];var s=new Tr(e);for(i=1;i<e;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(r){a=new Tr(1<<e);var c=15-e;for(i=0;i<n;++i)if(t[i])for(var l=i<<4|t[i],u=e-t[i],f=s[t[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[XE[f]>>c]=l}else for(a=new Tr(n),i=0;i<n;++i)t[i]&&(a[i]=XE[s[t[i]-1]++]>>15-t[i]);return a}),as=new nn(288);for(Fe=0;Fe<144;++Fe)as[Fe]=8;var Fe;for(Fe=144;Fe<256;++Fe)as[Fe]=9;var Fe;for(Fe=256;Fe<280;++Fe)as[Fe]=7;var Fe;for(Fe=280;Fe<288;++Fe)as[Fe]=8;var Fe,pm=new nn(32);for(Fe=0;Fe<32;++Fe)pm[Fe]=5;var Fe,SX=ef(as,9,0);var IX=ef(pm,5,0);var mC=function(t){return(t+7)/8|0},kX=function(t,e,r){return(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length),new nn(t.subarray(e,r))};var ri=function(t,e,r){r<<=e&7;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8},Ju=function(t,e,r){r<<=e&7;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8,t[n+2]|=r>>16},BE=function(t,e){for(var r=[],n=0;n<t.length;++n)t[n]&&r.push({s:n,f:t[n]});var i=r.length,o=r.slice();if(!i)return{t:yC,l:0};if(i==1){var s=new nn(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(D,k){return D.f-k.f}),r.push({s:-1,f:25001});var a=r[0],c=r[1],l=0,u=1,f=2;for(r[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=r[r[l].f<r[f].f?l++:f++],c=r[l!=u&&r[l].f<r[f].f?l++:f++],r[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,n=1;n<i;++n)o[n].s>d&&(d=o[n].s);var p=new Tr(d+1),m=HE(r[u-1],p,0);if(m>e){var n=0,g=0,v=m-e,T=1<<v;for(o.sort(function(k,B){return p[B.s]-p[k.s]||k.f-B.f});n<i;++n){var _=o[n].s;if(p[_]>e)g+=T-(1<<m-p[_]),p[_]=e;else break}for(g>>=v;g>0;){var E=o[n].s;p[E]<e?g-=1<<e-p[E]++-1:++n}for(;n>=0&&g;--n){var I=o[n].s;p[I]==e&&(--p[I],++g)}m=e}return{t:new nn(p),l:m}},HE=function(t,e,r){return t.s==-1?Math.max(HE(t.l,e,r+1),HE(t.r,e,r+1)):e[t.s]=r},uC=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Tr(++e),n=0,i=t[0],o=1,s=function(c){r[n++]=c},a=1;a<=e;++a)if(t[a]==i&&a!=e)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=t[a]}return{c:r.subarray(0,n),n:e}},Qu=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},gC=function(t,e,r){var n=r.length,i=mC(e+2);t[i]=n&255,t[i+1]=n>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var o=0;o<n;++o)t[i+o+4]=r[o];return(i+4+n)*8},fC=function(t,e,r,n,i,o,s,a,c,l,u){ri(e,u++,r),++i[256];for(var f=BE(i,15),d=f.t,p=f.l,m=BE(o,15),g=m.t,v=m.l,T=uC(d),_=T.c,E=T.n,I=uC(g),D=I.c,k=I.n,B=new Tr(19),U=0;U<_.length;++U)++B[_[U]&31];for(var U=0;U<D.length;++U)++B[D[U]&31];for(var z=BE(B,7),le=z.t,O=z.l,R=19;R>4&&!le[cC[R-1]];--R);var L=l+5<<3,$=Qu(i,as)+Qu(o,pm)+s,w=Qu(i,d)+Qu(o,g)+s+14+3*R+Qu(B,le)+2*B[16]+3*B[17]+7*B[18];if(c>=0&&L<=$&&L<=w)return gC(e,u,t.subarray(c,c+l));var A,S,M,X;if(ri(e,u,1+(w<$)),u+=2,w<$){A=ef(d,p,0),S=d,M=ef(g,v,0),X=g;var F=ef(le,O,0);ri(e,u,E-257),ri(e,u+5,k-1),ri(e,u+10,R-4),u+=14;for(var U=0;U<R;++U)ri(e,u+3*U,le[cC[U]]);u+=3*R;for(var W=[_,D],Z=0;Z<2;++Z)for(var pe=W[Z],U=0;U<pe.length;++U){var V=pe[U]&31;ri(e,u,F[V]),u+=le[V],V>15&&(ri(e,u,pe[U]>>5&127),u+=pe[U]>>12)}}else A=SX,S=as,M=IX,X=pm;for(var U=0;U<a;++U){var te=n[U];if(te>255){var V=te>>18&31;Ju(e,u,A[V+257]),u+=S[V+257],V>7&&(ri(e,u,te>>23&31),u+=zE[V]);var De=te&31;Ju(e,u,M[De]),u+=X[De],De>3&&(Ju(e,u,te>>5&8191),u+=qE[De])}else Ju(e,u,A[te]),u+=S[te]}return Ju(e,u,A[256]),u+S[256]},NX=new jE([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),yC=new nn(0),PX=function(t,e,r,n,i,o){var s=o.z||t.length,a=new nn(n+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(n,a.length-i),l=o.l,u=(o.r||0)&7;if(e){u&&(c[0]=o.r>>3);for(var f=NX[e-1],d=f>>13,p=f&8191,m=(1<<r)-1,g=o.p||new Tr(32768),v=o.h||new Tr(m+1),T=Math.ceil(r/3),_=2*T,E=function(me){return(t[me]^t[me+1]<<T^t[me+2]<<_)&m},I=new jE(25e3),D=new Tr(288),k=new Tr(32),B=0,U=0,z=o.i||0,le=0,O=o.w||0,R=0;z+2<s;++z){var L=E(z),$=z&32767,w=v[L];if(g[$]=w,v[L]=$,O<=z){var A=s-z;if((B>7e3||le>24576)&&(A>423||!l)){u=fC(t,c,0,I,D,k,U,le,R,z-R,u),le=B=U=0,R=z;for(var S=0;S<286;++S)D[S]=0;for(var S=0;S<30;++S)k[S]=0}var M=2,X=0,F=p,W=$-w&32767;if(A>2&&L==E(z-W))for(var Z=Math.min(d,A)-1,pe=Math.min(32767,z),V=Math.min(258,A);W<=pe&&--F&&$!=w;){if(t[z+M]==t[z+M-W]){for(var te=0;te<V&&t[z+te]==t[z+te-W];++te);if(te>M){if(M=te,X=W,te>Z)break;for(var De=Math.min(W,te-2),Ne=0,S=0;S<De;++S){var Xe=z-W+S&32767,q=g[Xe],J=Xe-q&32767;J>Ne&&(Ne=J,w=Xe)}}}$=w,w=g[$],W+=$-w&32767}if(X){I[le++]=268435456|GE[M]<<18|lC[X];var re=GE[M]&31,P=lC[X]&31;U+=zE[re]+qE[P],++D[257+re],++k[P],O=z+M,++B}else I[le++]=t[z],++D[t[z]]}}for(z=Math.max(z,O);z<s;++z)I[le++]=t[z],++D[t[z]];u=fC(t,c,l,I,D,k,U,le,R,z-R,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=v,o.p=g,o.i=z,o.w=O)}else{for(var z=o.w||0;z<s+l;z+=65535){var we=z+65535;we>=s&&(c[u/8|0]=l,we=s),u=gC(c,u+1,t.subarray(z,we))}o.i=s}return kX(a,0,n+mC(u)+i)};var xC=function(){var t=1,e=0;return{p:function(r){for(var n=t,i=e,o=r.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=n+=r[s];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}t=n,e=i},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},CX=function(t,e,r,n,i){if(!i&&(i={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),s=new nn(o.length+t.length);s.set(o),s.set(t,o.length),t=s,i.w=o.length}return PX(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,r,n,i)};var TC=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8};var OX=function(t,e){var r=e.level,n=r==0?0:r<6?1:r==9?3:2;if(t[0]=120,t[1]=n<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var i=xC();i.p(e.dictionary),TC(t,2,i.d())}};function _C(t,e){e||(e={});var r=xC();r.p(t);var n=CX(t,e,e.dictionary?6:2,4);return OX(n,e),TC(n,n.length-4,r.d()),n}var LX=typeof TextDecoder<"u"&&new TextDecoder,DX=0;try{LX.decode(yC,{stream:!0}),DX=1}catch{}var $X="https://free.nowline.io/open";function EC(t){let e=new TextEncoder().encode(t),r=_C(e),n=32768,i="";for(let o=0;o<r.length;o+=n)i+=String.fromCharCode(...r.subarray(o,o+n));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function RC({source:t,sourceUrl:e,share:r}){if(r===!1||r==="none")return null;if(typeof r=="object")return e!==void 0&&vC(e)?r.remoteUrl.replace("{url}",encodeURIComponent(e)):r.textUrl.replace("{text}",EC(t));let n=r===!0?$X:r,i=new URL(n);return e!==void 0&&vC(e)?i.hash=`url=${encodeURIComponent(e)}`:i.hash=`text=${EC(t)}`,i.toString()}function vC(t){try{return new URL(t).protocol==="https:"}catch{return!1}}var bC=0;async function wC(t){let e=t.document??globalThis.document;if(!e)return{rendered:0,failed:0};let r=e.querySelectorAll(t.selector),n=0,i=0,o=++bC,s=t.share??!0,a=[],c=0;for(let l of Array.from(r)){let u=MX(l);if(!u)continue;let f=FX(l),d=`nl-r${o}-${c++}`,p={theme:t.theme,locale:t.locale,width:t.width,today:t.today,idPrefix:d},m=u.parentElement,g=u.nextSibling,T=l.getAttribute("data-nowline-source-url")??void 0??t.sourceUrl;a.push(dm(f,p).then(_=>{if(UX(u,_),n++,m!==null){let E=RC({source:f,sourceUrl:T,share:s});if(E!==null){let I=e.createElement("a");I.className="nowline-share",I.href=E,I.target="_blank",I.rel="noopener noreferrer",I.textContent="Share on Nowline",m.insertBefore(I,g)}}},_=>{i++,console.error("nowline: render failed",_)}))}return await Promise.all(a),{rendered:n,failed:i}}function MX(t){let e=t.parentElement;return e&&e.tagName.toUpperCase()==="PRE"?e:t}function FX(t){return t.textContent??""}function UX(t,e){t.outerHTML=e}function AC(){bC=0}function hm(){if(typeof globalThis>"u")return"light";let t=globalThis.matchMedia;if(typeof t!="function")return"light";try{return t("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function SC(t,e){return t&&t!=="auto"?k_(t)??e:e}var BX="0.5.0",GX="04bdff9",XX="pre code.language-nowline, code.language-nowline",IC={theme:"auto",startOnLoad:!0,selector:XX,systemTheme:hm(),share:!0},Tt={...IC},WE=!1;function HX(t={}){Tt={theme:t.theme??Tt.theme,startOnLoad:t.startOnLoad??Tt.startOnLoad,selector:t.selector??Tt.selector,locale:t.locale??Tt.locale,width:t.width??Tt.width,today:t.today??Tt.today,share:t.share??Tt.share,sourceUrl:t.sourceUrl??Tt.sourceUrl,systemTheme:hm()}}function kC(){return{theme:SC(Tt.theme,Tt.systemTheme),locale:Tt.locale,width:Tt.width,today:Tt.today}}async function jX(t,e={}){let r={...kC(),...e};return dm(t,r)}async function zX(t){return sC(t)}async function VE(t){let e={selector:t?.selector??Tt.selector,theme:t?.theme??kC().theme,locale:t?.locale??Tt.locale,width:t?.width??Tt.width,today:t?.today??Tt.today,share:t?.share??Tt.share,sourceUrl:t?.sourceUrl??Tt.sourceUrl,document:t?.document};return wC(e)}var qX=VE;if(typeof document<"u"&&!WE){WE=!0;let t=()=>{Tt.startOnLoad&&VE()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):queueMicrotask(t)}function WX(){Tt={...IC,systemTheme:hm()},WE=!1,aC(),AC()}return sf(VX);})();
2663
+ `);)n--;for(;n>=0&&(e[n]===" "||e[n]===" ");)n--;return n<0||e[n]!=="\\"}},Ok={parser:{TokenBuilder:()=>new E_({indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[["[","]"]]}),Lexer:t=>new fu(t),ParserConfig:()=>({maxLookahead:4}),ValueConverter:()=>new __},validation:{NowlineValidator:()=>new fh}};function v_(t={}){let e=t.shared??zo(lu(du),ek),r=zo(cu({shared:e}),tk,Ok);return e.ServiceRegistry.register(r),Pk(r),{shared:e,Nowline:r}}function Lk(t,e){return{severity:t.severity===2?"warning":"error",code:xm(t),message:t.message,suggestion:ym(t.message),file:e,line:(t.range?.start.line??0)+1,column:(t.range?.start.character??0)+1}}function Dk(t,e){return{severity:"error",code:"parse-error",message:t.message,file:e,line:t.token?.startLine??1,column:t.token?.startColumn??1}}function $k(t,e){return{severity:"error",code:"lex-error",message:t.message,file:e,line:t.line??1,column:t.column??1}}function Mk(t){return{severity:t.severity,code:"include",message:t.message,file:t.sourcePath,line:t.line!==void 0?t.line+1:1,column:1}}function Fk(t,e,r="warning"){return{severity:r,code:"render.warning",message:t,file:e,line:1,column:1}}var Uk="__nowline_browser_noop_include__";async function Bk(t){throw new Error(`${Uk}: include "${t}" was skipped \u2014 running in single-file mode.`)}function Gk(t){return t.includes(Uk)}var sB=new Set(["none","multiplier","person","people","points","time"]),aB=/^\d+$/,cB=/^\d+\.\d+$/,lB=/^\d+(?:\.\d+)?%$/;function ji(t){if(!t)return null;if(aB.test(t)){let e=parseInt(t,10);return e>0?e:null}if(cB.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?e:null}if(lB.test(t)){let e=parseFloat(t.slice(0,-1))/100;return Number.isFinite(e)&&e>0?e:null}return null}function Eu(t){if(Number.isInteger(t))return String(t);let e=t.toFixed(6);return e=e.replace(/0+$/,""),e=e.replace(/\.$/,""),e}function uB(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}function fB(t){for(let e of t.properties)if(uB(e)==="unicode"&&e.value)return e.value}function vu(t,e){if(t==="none")return null;if(sB.has(t))return{kind:"builtin",name:t};let r=e.get(t);return r?{kind:"literal",text:fB(r)??t}:{kind:"literal",text:t}}function Vo(t,e,r){return e?e.kind==="builtin"&&e.name==="multiplier"?(t.length+1)*r*.58:t.length*r*.58+(.1+1)*r:t.length*r*.58}function Ru(t,e,r,n=0,i=0){let o=t+10,s=o+12,a=e.length*6.5,c=s+a,l=0,u=0;r&&(l=`owner: ${r}`.length*5,u=c+6,c=u+l);let f=0;n>0&&(f=c+6,c=f+n);let d=0;i>0&&(d=c+6+i,c=d);let p=c-o+12,m=Math.max(56,p);return{titleTextWidth:a,ownerTextWidth:l,capacityBadgeWidth:n,footnoteIndicatorWidth:i,titleX:s,ownerX:u,badgeX:f,footnoteRightX:d,tabX:o,tabW:m,rightX:o+m}}function bu(t,e,r){let n=t+24,i=n+10,o=e.length*6,s=Math.max(60,o+10+10),a=n+s+6,c=a+18,l=0,u=0,f=0,d=0,p=c;return r&&(u=c+6,l=r.length*5.5,f=u-3,d=l+6,p=f+d),{labelTextWidth:o,sourceTextWidth:l,tabX:n,tabWidth:s,tabLabelX:i,badgeX:a,badgeSize:18,sourceHaloX:f,sourceHaloWidth:d,sourceTextX:u,chromeRightX:p}}function R_(t,e){if(t.length===0)return{rows:[[]],expanded:!1};let r=[[]],n=0,i=e,o=!1;for(let s of t){let a=r[r.length-1],c=(a.length===0?0:4)+s.width,l=n+c;if(l<=i){a.push(s),n=l;continue}if(a.length===0){a.push(s),n=s.width;continue}let u=l-i,f=s.width*.25;if(!o&&u<=f){a.push(s),n=l,i=l,o=!0;continue}r.push([s]),n=s.width,i=e}return{rows:r,expanded:o}}function Xk(t){return t.endsWith(":")?t.slice(0,-1):t}function ae(t,e){return t.find(r=>Xk(r.key)===e)?.value}function gt(t,e){let r=t.find(n=>Xk(n.key)===e);return r?r.value!==void 0?[r.value]:[...r.values]:[]}function Rt(t){if(!t)return null;let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);if(!e)return null;let r=new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10)));return Number.isNaN(r.getTime())?null:r}var Qa={mode:"business",daysPerWeek:5,daysPerMonth:22,daysPerQuarter:65,daysPerYear:260},dB={mode:"full",daysPerWeek:7,daysPerMonth:30,daysPerQuarter:91,daysPerYear:365};function Hk(t,e){let n=t.roadmapDecl?.properties.find(i=>b_(i.key)==="calendar")?.value??"business";if(n==="business")return{...Qa};if(n==="full")return{...dB};if(e){let i=(o,s)=>{let a=e.properties.find(l=>b_(l.key)===o),c=a?parseInt(a.value,10):NaN;return Number.isFinite(c)&&c>0?c:s};return{mode:"custom",daysPerWeek:i("days-per-week",Qa.daysPerWeek),daysPerMonth:i("days-per-month",Qa.daysPerMonth),daysPerQuarter:i("days-per-quarter",Qa.daysPerQuarter),daysPerYear:i("days-per-year",Qa.daysPerYear)}}return{...Qa}}var dh=/^(\d+(?:\.\d+)?)([dwmqy])$/;function ph(t,e){let r=dh.exec(t);if(!r)return 0;let n=parseFloat(r[1]);switch(r[2]){case"d":return n;case"w":return n*e.daysPerWeek;case"m":return n*e.daysPerMonth;case"q":return n*e.daysPerQuarter;case"y":return n*e.daysPerYear;default:return 0}}function jk(t,e,r){return t?dh.test(t)?ph(t,r):e.get(t)?.effortDays??0:0}function zi(t,e,r){let n=ae(t,"duration");if(n&&dh.test(n))return ph(n,r);let i=ae(t,"size"),o=i?e.get(i):void 0;if(!o)return 0;let s=ji(ae(t,"capacity"))??1;return o.effortDays/s}function zk(t,e,r){let n=ae(t,"size"),i=n?e.get(n):void 0;if(i)return i.effortDays;let o=ae(t,"duration");if(o&&dh.test(o)){let s=ji(ae(t,"capacity"))??1;return ph(o,r)*s}return 0}function hh(t,e){let r=new Map;for(let[n,i]of t){let s=i.properties.find(c=>b_(c.key)==="effort")?.value;if(!s)continue;let a=ph(s,e);a<=0||r.set(n,{name:n,title:i.title||void 0,effortDays:a,effortLiteral:s})}return r}function b_(t){return t.endsWith(":")?t.slice(0,-1):t}function Nr(t,e){return Math.round((e.getTime()-t.getTime())/864e5)}function Yo(t,e){let r=new Date(t.getTime());return r.setUTCDate(r.getUTCDate()+e),r}var mh=class{constructor(e){de(this,"items");de(this,"brackets");this.items=e.itemBars,this.brackets=e.brackets}hasObstacle(e,r,n){let i=Math.min(r,n),o=Math.max(r,n);for(let s of this.items)if(!(e<=s.x||e>=s.x+s.width)&&!(s.y+s.height<=i||s.y>=o))return!0;return!1}bracketsNear(e,r,n,i){let o=Math.min(r,n),s=Math.max(r,n),a=[];for(let c of this.brackets)Math.abs(c.x-e)>i||c.yBottom<=o||c.yTop>=s||a.push(c);return a}};function qk(t,e){let r=[],n=[],i=s=>{if(s.kind==="item"){r.push(s.box);return}if(s.kind==="parallel"){if(s.style.bracket==="solid"||s.style.bracket==="dashed"){let l=s.box.y-12,u=s.box.y+s.box.height+12,f=s.box.x,d=s.box.x+s.box.width;n.push({x:f,yTop:l,yBottom:u}),n.push({x:d,yTop:l,yBottom:u}),n.push({x:f+4,yTop:l-1,yBottom:l+1}),n.push({x:f+4,yTop:u-1,yBottom:u+1}),n.push({x:d-4,yTop:l-1,yBottom:l+1}),n.push({x:d-4,yTop:u-1,yBottom:u+1})}for(let a of s.children)i(a);return}if(s.kind==="group"){!(s.style.bg!=="none"&&s.style.bg!=="#ffffff")&&s.style.bracket&&s.style.bracket!=="none"&&n.push({x:s.box.x,yTop:s.box.y,yBottom:s.box.y+s.box.height});for(let c of s.children)i(c);return}},o=s=>{for(let a of s.children)i(a);for(let a of s.nested)o(a)};for(let s of t)o(s);for(let s of e)for(let a of s.nestedSwimlanes)o(a);return{itemBars:r,brackets:n}}function pB(t,e){let{from:r,to:n}=t;if(Math.abs(r.y-n.y)<.5)return{x:(r.x+n.x)/2,underBar:!1,range:null};let i=Math.min(r.y,n.y),o=Math.max(r.y,n.y);if(r.x<=n.x){let a=r.x+6,c=n.x-6;if(a>c)return{x:n.x-6,underBar:!0,range:null};let l={minX:a,maxX:c},u=(r.x+n.x)/2,f=Math.max(a,Math.min(c,u));if(!e.hasObstacle(f,i,o))return{x:f,underBar:!1,range:l};let d=c-a;for(let p=1;p<=d;p++){let m=f-p;if(m>=a&&!e.hasObstacle(m,i,o))return{x:m,underBar:!1,range:l};let g=f+p;if(g<=c&&!e.hasObstacle(g,i,o))return{x:g,underBar:!1,range:l}}return{x:f,underBar:!0,range:l}}let s=[r.x+10,n.x-10];for(let a of s)if(a>0&&!e.hasObstacle(a,i,o))return{x:a,underBar:!1,range:null};return{x:r.x+10,underBar:!0,range:null}}function hB(t,e,r,n){let i=Math.min(r.from.y,r.to.y),o=Math.max(r.from.y,r.to.y),s=n.bracketsNear(t,i,o,4);if(s.length===0)return{x:t,forceUnderBar:!1};let a=s[0],c=Math.abs(s[0].x-t);for(let d=1;d<s.length;d++){let p=Math.abs(s[d].x-t);p<c&&(a=s[d],c=p)}let l=[a.x+4,a.x-4],u=4-.01;for(let d of l){if(e&&(d<e.minX||d>e.maxX))continue;let p=e?d:Math.max(Math.min(r.from.x,r.to.x)+1,Math.min(Math.max(r.from.x,r.to.x)-1,d));if(n.bracketsNear(p,i,o,u).length===0)return{x:p,forceUnderBar:!1}}return{x:e?Math.min(Math.max(t,e.minX),e.maxX):t,forceUnderBar:!0}}function mB(t){let e=[...t].sort((i,o)=>Math.abs(i.channelX-o.channelX)>=1?i.channelX-o.channelX:i.orderIndex-o.orderIndex),r=new Map,n=0;for(;n<e.length;){let i=n+1;for(;i<e.length&&Math.abs(e[i].channelX-e[n].channelX)<1;)i++;let s=[...e.slice(n,i)].sort((c,l)=>{let u=Math.min(c.req.from.y,c.req.to.y),f=Math.min(l.req.from.y,l.req.to.y);return Math.abs(u-f)>.5?u-f:c.orderIndex-l.orderIndex}),a=[];for(let c of s){let l=Math.min(c.req.from.y,c.req.to.y),u=Math.max(c.req.from.y,c.req.to.y),f=-1;for(let d=0;d<a.length;d++)if(a[d]<=l){f=d,a[d]=u;break}f===-1&&(f=a.length,a.push(u)),r.set(c.orderIndex,f)}n=i}return r}function gB(t){if(t===0||t>4)return 0;let e=Math.ceil(t/2);return(t%2===1?1:-1)*e*3}function yB(t){let e=t.from.x>=t.to.x?{x:t.to.x-1,y:t.from.y}:t.from;return{fromId:t.fromId,toId:t.toId,waypoints:[e,t.to],underBar:!1}}function Wk(t,e){let r=new Array(t.length),n=[];for(let o=0;o<t.length;o++){let s=t[o];if(s.isMarkerSource){r[o]=yB(s);continue}if(Math.abs(s.from.y-s.to.y)<.5&&s.to.x-s.from.x<20){r[o]={fromId:s.fromId,toId:s.toId,waypoints:[s.from,s.to],underBar:!1};continue}let{x:a,underBar:c,range:l}=pB(s,e),{x:u,forceUnderBar:f}=hB(a,l,s,e),d=c||f;n.push({req:s,channelX:u,underBar:d,orderIndex:o})}let i=mB(n);for(let o of n){let s=gB(i.get(o.orderIndex)??0),a=o.channelX+s;r[o.orderIndex]={fromId:o.req.fromId,toId:o.req.toId,waypoints:xB(o.req.from,o.req.to,a),underBar:o.underBar}}return r}function xB(t,e,r){return Math.abs(t.y-e.y)<.5?[t,e]:[t,{x:r,y:t.y},{x:r,y:e.y},e]}var wu="en-US",TB={"en-US":{nowLabel:"now",quarterPrefix:"Q"},fr:{nowLabel:"maint.",quarterPrefix:"T"}};function Vk(t,e){return e??t??wu}function gh(t){let e={};for(let r of _B(t)){let n=TB[r];if(n)for(let i of Object.keys(n))e[i]===void 0&&n[i]!==void 0&&(e[i]=n[i])}return e}function _B(t){let e=[],r=EB(t);for(;r.length>0;){e.includes(r)||e.push(r);let n=r.lastIndexOf("-");if(n<=0)break;r=r.slice(0,n)}return e.includes(wu)||e.push(wu),e}function EB(t){return t.split("-").map((r,n)=>n===0?r.toLowerCase():/^[a-zA-Z]{2}$/.test(r)?r.toUpperCase():r).join("-")}function Jk(t){let{box:e,afterDate:r,beforeDate:n,hasLinkIcon:i,footnoteCount:o}=t;if(!r&&!n)return[];let s=[],a=12,c=e.y+5,l=e.width<40;if(r){let u=i?e.x+6+14+4:e.x+6,f=l?{x:e.x-6-a,y:c}:{x:u,y:c};s.push({side:"after",isoDate:r,glyphTopLeft:f,glyphSize:a,spilled:l})}if(n){let u=e.x+e.width,f;o>0?f=u-22-(o-1)*8-4:f=u-12-5-4;let d=f-a,p=l?{x:u+6,y:c}:{x:d,y:c};s.push({side:"before",isoDate:n,glyphTopLeft:p,glyphSize:a,spilled:l})}return s}function xh(t){let{box:e,afterDate:r,beforeDate:n}=t;if(!r&&!n)return[];let i=[],o=12,s=e.y+5;return r&&i.push({side:"after",isoDate:r,glyphTopLeft:{x:e.x+6,y:s},glyphSize:o,spilled:!1}),n&&i.push({side:"before",isoDate:n,glyphTopLeft:{x:e.x+e.width-6-o,y:s},glyphSize:o,spilled:!1}),i}function Vn(t){for(let e of t)if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e}function Th(t,e){return{x:t,y:e,height:0,maxX:t}}var rc=class{constructor(e){de(this,"rows");de(this,"opts");this.opts=e,this.rows=[{y:e.originY,height:e.minRowHeight,rightEdge:e.laneLeftX,spillX:e.laneLeftX,placedChildren:[]}]}placeItem(e){for(let n=0;n<this.rows.length;n+=1){let i=this.rows[n];if(!(e.desiredStart<i.rightEdge)&&!(e.desiredStart<i.spillX)&&!this.rowIntersectsCorridor(i,e))return{rowIndex:n,y:i.y}}let r=this.appendRow(Math.max(this.opts.minRowHeight,e.predictedHeight));return{rowIndex:this.rows.length-1,y:r.y}}placeBlock(){let e=this.rows[this.rows.length-1];if(e.rightEdge>this.opts.laneLeftX){let r=this.appendRow(this.opts.minRowHeight);return{rowIndex:this.rows.length-1,y:r.y}}return{rowIndex:this.rows.length-1,y:e.y}}commitItem(e){let r=this.rows[e.rowIndex],n=Math.max(e.placed.box.height,e.rowHeight??0);this.growRowHeight(e.rowIndex,n),r.rightEdge=e.logicalEnd,r.spillX=e.spillReservation??this.opts.laneLeftX,r.placedChildren.push(e.placed)}commitBlock(e){let r=this.rows[e.rowIndex];this.growRowHeight(e.rowIndex,e.blockHeight),r.rightEdge=e.blockEnd,r.spillX=this.opts.laneLeftX,r.placedChildren.push(e.placed)}usedHeight(){let e=this.rows[this.rows.length-1];return e.y+e.height-this.opts.originY}usedRightX(){let e=this.opts.laneLeftX;for(let r of this.rows)r.rightEdge>e&&(e=r.rightEdge),r.spillX>e&&(e=r.spillX);return e}rowIntersectsCorridor(e,r){return this.opts.slackCorridors.some(n=>n.y>=e.y&&n.y<e.y+e.height&&r.desiredStart<n.xEnd&&r.desiredEnd>n.xStart&&n.slackPredId!==r.childId)}appendRow(e){let r=this.rows[this.rows.length-1],n={y:r.y+r.height,height:e,rightEdge:this.opts.laneLeftX,spillX:this.opts.laneLeftX,placedChildren:[]};return this.rows.push(n),n}growRowHeight(e,r){let n=this.rows[e],i=r-n.height;if(!(i<=0)){n.height=r;for(let o=e+1;o<this.rows.length;o+=1){let s=this.rows[o];s.y+=i;for(let a of s.placedChildren)Qk(a,i)}}}};function Qk(t,e){if(t.box.y+=e,t.kind==="item"){for(let r of t.labelChips)r.box.y+=e;t.overflowBox&&(t.overflowBox.y+=e);return}for(let r of t.children)Qk(r,e)}var eN={red:"#f87171",blue:"#60a5fa",yellow:"#facc15",green:"#34d399",orange:"#fb923c",purple:"#a78bfa",gray:"#94a3b8",navy:"#818cf8",white:"#e2e8f0"},Yn={bg:"none",fg:"#e2e8f0",text:"#e2e8f0",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},w_={name:"dark",surface:{page:"#0b1220",chart:"#111827",headerBox:"#1e293b"},entities:{roadmap:{...Yn,headerHeight:"md",padding:"md"},swimlane:{...Yn,fg:"#e2e8f0",text:"#e2e8f0",padding:"sm",spacing:"none",textSize:"sm"},item:{...Yn,bg:"#0f172a",fg:"#94a3b8",text:"#e2e8f0",shadow:"subtle",cornerRadius:"sm"},parallel:{...Yn,bracket:"none",padding:"xs"},group:{...Yn,bracket:"solid",padding:"xs",fg:"#94a3b8"},anchor:{...Yn,bg:"#0b1220",fg:"#cbd5e1",text:"#cbd5e1",cornerRadius:"sm"},milestone:{...Yn,bg:"#e2e8f0",fg:"#e2e8f0",text:"#0b1220",border:"solid"},footnote:{...Yn,bg:"none",fg:"#94a3b8",text:"#e2e8f0",textSize:"sm"},label:{...Yn,bg:"#1e293b",fg:"#94a3b8",text:"#e2e8f0",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#111827",bandOdd:"#0f172a",separator:"#1f2937",frameTabText:"#e2e8f0",frameTabMuted:"#94a3b8",border:"#334155",tabFill:"#1e293b",tabStroke:"#475569",tabText:"#e2e8f0",ownerText:"#94a3b8",footnoteIndicator:"#f87171",rowTintEven:"#0f172a",rowTintOdd:"#1e293b",utilizationOk:"#34d399",utilizationWarn:"#fbbf24",utilizationOver:"#f87171"},timeline:{gridLine:"#475569",minorGridLine:"#334155",tickMark:"#334155",labelText:"#cbd5e1",panelFill:"#0f172a",border:"#334155"},header:{cardBorder:"#475569",author:"#94a3b8"},item:{overflowX:"#f87171",linkIconFg:"#94a3b8",overflowTailFill:"#7f1d1d",overflowTailStroke:"#f87171",overflowCaption:"#fecaca"},parallel:{bracketStroke:"#cbd5e1"},anchorDiamond:{fill:"#0f172a",stroke:"#cbd5e1",label:"#cbd5e1",cutLine:"#94a3b8"},milestoneDiamond:{fill:"#e2e8f0",label:"#e2e8f0",cutLineNormal:"#a5b4fc",cutLineOverrun:"#ef4444",slack:"#cbd5e1"},footnotePanel:{fill:"#0f172a",border:"#334155",header:"#e2e8f0",title:"#e2e8f0",description:"#94a3b8",number:"#f87171"},nowline:{stroke:"#f87171",labelText:"#0b1220",labelBg:"#f87171"},milestone:{dashedInk:"#a5b4fc",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#cbd5e1",overflowStroke:"#ef5350"},footnote:{indicatorText:"#f87171",descriptionMuted:"#94a3b8"},includeRegion:{border:"#475569",label:"#cbd5e1",badge:"#94a3b8",fill:"#0b1220",tabFill:"#111827",tabStroke:"#475569",tabText:"#e2e8f0",badgeFill:"#1e293b",badgeStroke:"#475569",badgeText:"#94a3b8"},arrowhead:{neutral:"#94a3b8",light:"#64748b",dark:"#e2e8f0"},status:{done:"#34d399",inProgress:"#60a5fa",atRisk:"#facc15",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#cbd5e1",link:"#f87171"},diagnostic:{overlayBg:"#7f1d1d",errorText:"#fecaca"}};var tN={red:"#4a4a4a",blue:"#6b6b6b",green:"#8a8a8a",yellow:"#c8c8c8",orange:"#5c5c5c",purple:"#3a3a3a",gray:"#9e9e9e",navy:"#2a2a2a",white:"#ffffff"},Kn={bg:"none",fg:"#1a1a1a",text:"#1a1a1a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},A_={name:"grayscale",surface:{page:"#f5f5f5",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Kn,headerHeight:"md",padding:"md"},swimlane:{...Kn,fg:"#3a3a3a",text:"#3a3a3a",padding:"sm",spacing:"none",textSize:"sm"},item:{...Kn,bg:"#ffffff",fg:"#9e9e9e",text:"#1a1a1a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Kn,bracket:"none",padding:"xs"},group:{...Kn,bracket:"solid",padding:"xs",fg:"#595959"},anchor:{...Kn,bg:"#1a1a1a",fg:"#1a1a1a",text:"#1a1a1a",cornerRadius:"sm"},milestone:{...Kn,bg:"#2a2a2a",fg:"#2a2a2a",text:"#ffffff",border:"solid"},footnote:{...Kn,bg:"none",fg:"#595959",text:"#595959",textSize:"sm"},label:{...Kn,bg:"#e8e8e8",fg:"#595959",text:"#595959",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f5f5f5",separator:"#d4d4d4",frameTabText:"#3a3a3a",frameTabMuted:"#737373",border:"#d4d4d4",tabFill:"#e8e8e8",tabStroke:"#bdbdbd",tabText:"#3a3a3a",ownerText:"#737373",footnoteIndicator:"#4a4a4a",rowTintEven:"#ffffff",rowTintOdd:"#f5f5f5",utilizationOk:"#8a8a8a",utilizationWarn:"#595959",utilizationOver:"#1a1a1a"},timeline:{gridLine:"#bdbdbd",minorGridLine:"#d4d4d4",tickMark:"#bdbdbd",labelText:"#737373",panelFill:"#ffffff",border:"#d4d4d4"},header:{cardBorder:"#d4d4d4",author:"#737373"},item:{overflowX:"#1a1a1a",linkIconFg:"#1a1a1a",overflowTailFill:"#e8e8e8",overflowTailStroke:"#4a4a4a",overflowCaption:"#3a3a3a"},parallel:{bracketStroke:"#3a3a3a"},anchorDiamond:{fill:"#ffffff",stroke:"#3a3a3a",label:"#3a3a3a",cutLine:"#737373"},milestoneDiamond:{fill:"#1a1a1a",label:"#1a1a1a",cutLineNormal:"#2a2a2a",cutLineOverrun:"#4a4a4a",slack:"#1a1a1a"},footnotePanel:{fill:"#ffffff",border:"#d4d4d4",header:"#1a1a1a",title:"#1a1a1a",description:"#737373",number:"#4a4a4a"},nowline:{stroke:"#1a1a1a",labelText:"#ffffff",labelBg:"#1a1a1a"},milestone:{dashedInk:"#9e9e9e",overrun:"#4a4a4a"},anchor:{predecessorLine:"#9e9e9e"},dependency:{edgeStroke:"#595959",overflowStroke:"#1a1a1a"},footnote:{indicatorText:"#4a4a4a",descriptionMuted:"#737373"},includeRegion:{border:"#9e9e9e",label:"#3a3a3a",badge:"#737373",fill:"#f5f5f5",tabFill:"#ffffff",tabStroke:"#bdbdbd",tabText:"#1a1a1a",badgeFill:"#e8e8e8",badgeStroke:"#bdbdbd",badgeText:"#595959"},arrowhead:{neutral:"#595959",light:"#9e9e9e",dark:"#1a1a1a"},status:{done:"#8a8a8a",inProgress:"#595959",atRisk:"#737373",blocked:"#3a3a3a",planned:"#bdbdbd",neutral:"#bdbdbd"},statusDot:{onLight:{done:"#3a3a3a",inProgress:"#2a2a2a",atRisk:"#4a4a4a",blocked:"#1a1a1a",planned:"#595959",neutral:"#595959"},onDark:{done:"#d4d4d4",inProgress:"#e8e8e8",atRisk:"#c8c8c8",blocked:"#f0f0f0",planned:"#d4d4d4",neutral:"#d4d4d4"}},attribution:{mark:"#9e9e9e",link:"#1a1a1a"},diagnostic:{overlayBg:"#e8e8e8",errorText:"#1a1a1a"}};var rN={red:"#e53935",blue:"#1e88e5",yellow:"#fdd835",green:"#43a047",orange:"#fb8c00",purple:"#8e24aa",gray:"#9e9e9e",navy:"#0d47a1",white:"#ffffff"},Zn={bg:"none",fg:"#0f172a",text:"#0f172a",border:"solid",icon:"none",shadow:"none",font:"sans",weight:"normal",italic:!1,textSize:"md",padding:"sm",spacing:"sm",headerHeight:"sm",cornerRadius:"sm",bracket:"none",capacityIcon:"multiplier"},S_={name:"light",surface:{page:"#f8fafc",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Zn,headerHeight:"md",padding:"md"},swimlane:{...Zn,fg:"#334155",text:"#334155",padding:"sm",spacing:"none",textSize:"sm"},item:{...Zn,bg:"#ffffff",fg:"#94a3b8",text:"#0f172a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Zn,bracket:"none",padding:"xs"},group:{...Zn,bracket:"solid",padding:"xs",fg:"#475569"},anchor:{...Zn,bg:"#0f172a",fg:"#0f172a",text:"#0f172a",cornerRadius:"sm"},milestone:{...Zn,bg:"#312e81",fg:"#312e81",text:"#ffffff",border:"solid"},footnote:{...Zn,bg:"none",fg:"#475569",text:"#475569",textSize:"sm"},label:{...Zn,bg:"#f1f5f9",fg:"#475569",text:"#475569",textSize:"xs",padding:"xs",cornerRadius:"full"}},swimlane:{bandEven:"#ffffff",bandOdd:"#f8fafc",separator:"#e2e8f0",frameTabText:"#334155",frameTabMuted:"#64748b",border:"#e2e8f0",tabFill:"#f1f5f9",tabStroke:"#cbd5e1",tabText:"#334155",ownerText:"#64748b",footnoteIndicator:"#dc2626",rowTintEven:"#ffffff",rowTintOdd:"#f8fafc",utilizationOk:"#10b981",utilizationWarn:"#f59e0b",utilizationOver:"#ef4444"},timeline:{gridLine:"#cbd5e1",minorGridLine:"#e2e8f0",tickMark:"#cbd5e1",labelText:"#64748b",panelFill:"#ffffff",border:"#e2e8f0"},header:{cardBorder:"#e2e8f0",author:"#64748b"},item:{overflowX:"#dc2626",linkIconFg:"#0f172a",overflowTailFill:"#fee2e2",overflowTailStroke:"#ef4444",overflowCaption:"#b91c1c"},parallel:{bracketStroke:"#334155"},anchorDiamond:{fill:"#ffffff",stroke:"#334155",label:"#334155",cutLine:"#64748b"},milestoneDiamond:{fill:"#0f172a",label:"#0f172a",cutLineNormal:"#1e1b4b",cutLineOverrun:"#b91c1c",slack:"#0f172a"},footnotePanel:{fill:"#ffffff",border:"#e2e8f0",header:"#0f172a",title:"#0f172a",description:"#64748b",number:"#dc2626"},nowline:{stroke:"#e53e3e",labelText:"#ffffff",labelBg:"#e53e3e"},milestone:{dashedInk:"#94a3b8",overrun:"#ef4444"},anchor:{predecessorLine:"#94a3b8"},dependency:{edgeStroke:"#475569",overflowStroke:"#d32f2f"},footnote:{indicatorText:"#e53e3e",descriptionMuted:"#64748b"},includeRegion:{border:"#94a3b8",label:"#334155",badge:"#64748b",fill:"#f8fafc",tabFill:"#ffffff",tabStroke:"#cbd5e1",tabText:"#0f172a",badgeFill:"#e2e8f0",badgeStroke:"#cbd5e1",badgeText:"#475569"},arrowhead:{neutral:"#475569",light:"#94a3b8",dark:"#0f172a"},status:{done:"#10b981",inProgress:"#3b82f6",atRisk:"#f59e0b",blocked:"#ef4444",planned:"#94a3b8",neutral:"#94a3b8"},statusDot:{onLight:{done:"#065f46",inProgress:"#1e3a8a",atRisk:"#92400e",blocked:"#991b1b",planned:"#334155",neutral:"#334155"},onDark:{done:"#d1fae5",inProgress:"#dbeafe",atRisk:"#fef3c7",blocked:"#fee2e2",planned:"#e2e8f0",neutral:"#e2e8f0"}},attribution:{mark:"#94a3b8",link:"#e53e3e"},diagnostic:{overlayBg:"#fee2e2",errorText:"#991b1b"}};var I_={light:S_,dark:w_,grayscale:A_};var wB={greyscale:"grayscale"};function k_(t){let e=t.toLowerCase(),r=wB[e]??e;if(r==="light"||r==="dark"||r==="grayscale")return r}var AB={grey:"gray",violet:"purple"};function Ko(t,e){if(t==="none")return"none";if(t.startsWith("#"))return t;let r=e.name==="dark"?eN:e.name==="grayscale"?tN:rN,n=AB[t]??t,i=r[n];return typeof i=="string"?i:t}function nc(t){return t.key.endsWith(":")?t.key.slice(0,-1):t.key}function SB(t,e){return{bg:Ko(t.bg,e),fg:Ko(t.fg,e),text:Ko(t.text,e),border:t.border,icon:t.icon,shadow:t.shadow,font:t.font,weight:t.weight,italic:t.italic,textSize:t.textSize,padding:t.padding,spacing:t.spacing,headerHeight:t.headerHeight,cornerRadius:t.cornerRadius,bracket:t.bracket,headerPosition:"beside",capacityIcon:t.capacityIcon,timelinePosition:"top",minorGrid:!1}}function N_(t,e,r,n){switch(e){case"bg":t.bg=Ko(r,n);break;case"fg":t.fg=Ko(r,n);break;case"text":t.text=Ko(r,n);break;case"border":(r==="solid"||r==="dashed"||r==="dotted")&&(t.border=r);break;case"icon":t.icon=r;break;case"shadow":(r==="none"||r==="subtle"||r==="soft"||r==="hard")&&(t.shadow=r);break;case"font":(r==="sans"||r==="serif"||r==="mono")&&(t.font=r);break;case"weight":(r==="thin"||r==="light"||r==="normal"||r==="bold")&&(t.weight=r);break;case"italic":t.italic=r==="true";break;case"text-size":t.textSize=Iu(r,"xl");break;case"padding":t.padding=Iu(r,"xl");break;case"spacing":t.spacing=Iu(r,"xl");break;case"header-height":t.headerHeight=Iu(r,"xl");break;case"corner-radius":t.cornerRadius=Iu(r,"full");break;case"bracket":(r==="none"||r==="solid"||r==="dashed")&&(t.bracket=r);break;case"header-position":(r==="beside"||r==="above")&&(t.headerPosition=r);break;case"capacity-icon":t.capacityIcon=r;break;case"timeline-position":(r==="top"||r==="bottom"||r==="both")&&(t.timelinePosition=r);break;case"minor-grid":t.minorGrid=r==="true";break;default:break}}function Iu(t,e){let r=["none","xs","sm","md","lg","xl","full"],n=r.indexOf(e),i=r.indexOf(t);return i<0?"md":i>n?r[n]:r[i]}function nN(t,e,r){if(e)for(let n of e.properties)N_(t,nc(n),n.value,r)}function IB(t,e,r){for(let n of e){let i=nc(n);n.value!==void 0&&N_(t,i,n.value,r)}}function kB(t,e,r){let n=e.find(o=>nc(o)==="labels");if(!n)return;let i=n.value?[n.value]:n.values;for(let o of i){let s=r.labels.get(o);if(!s)continue;let a=s.properties.find(c=>nc(c)==="style");a?.value&&nN(t,r.styles.get(a.value),r.theme)}}function NB(t,e,r){let n=e.find(i=>nc(i)==="style");n?.value&&nN(t,r.styles.get(n.value),r.theme)}function yt(t,e,r){let n=r.theme.entities[t],i=SB(n,r.theme),o=r.defaults.get(t);if(o)for(let s of o.properties)s.value!==void 0&&N_(i,nc(s),s.value,r.theme);return kB(i,e,r),NB(i,e,r),IB(i,e,r.theme),i}function iN(t,e){return yt("label",t.properties,e)}var oN={none:0,xs:2,sm:4,md:8,lg:16,xl:24},sN={none:0,xs:4,sm:8,md:12,lg:20,xl:32};var ic={none:0,xs:10,sm:12,md:14,lg:18,xl:24},_h={none:0,xs:2,sm:4,md:8,lg:12,xl:20,full:9999};var Pr=8,Rn=4,ku=24,Eh=15,Nu=8,vh=22,Rh=15,Pu=16,bh=6,P_=4,C_=11,O_=9,L_=5.5,D_=4,oc=12,wh="6 4",$_=36,qi=16,M_=qi/2,Cu=10,F_=qi-4,sc=6,Ah=2.25,Jr=6,Qr=2*Jr,aN=5,cN=120,U_=240,Sh=72,Ou=28,en=16,B_=22,Lu=18,Ih="Powered by",G_="https://nowline.io",Du=.22,Wi=40,kh=32,lN=.58,PB=Ih.length*kh*lN,CB=10,$u=PB+CB,X_=$u+74,H_=5,Nh=$u+81,OB=3*Wi*lN,LB=Nh+OB,DB=12+Wi,j_=LB*Du,uN=DB*Du,z_=4;var je={sans:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',serif:'Georgia, "Times New Roman", serif',mono:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"},fN={days:7,weeks:4,months:3,quarters:4,years:5};var Ph=class{constructor(e,r){de(this,"node");de(this,"deps");this.node=e,this.deps=r}get id(){return this.node.name??""}place(e,r){let{node:n}=this,{deps:i}=this,o=yt("group",n.properties,r.styleCtx),s=e.x,a=n.title??n.name,c=r.currentFlowKey;r.currentFlowKey=`${c}/group:${n.name??"g"}`;let l=o.bg!=="none"&&o.bg!=="#ffffff"&&!!a,u=l?Pu+P_:0,f=l?D_:0,d=!l&&a?oc:0,p=e.y+d,m=r.bandScale.step(),g=s,v=new rc({laneLeftX:g,originY:p+u,minRowHeight:m,slackCorridors:r.slackCorridors}),T=g,_=[];for(let z of n.content){if(z.$type==="DescriptionDirective")continue;if(!yr(z)){let te=z.properties??[],De=i.resolveChildStart(te,T,g,r),{rowIndex:Ne,y:Xe}=v.placeBlock(),q=i.newCursor(De,Xe),J=i.sequenceOne(z,q,r);_.push(J);let re=J.box.x+J.box.width,P=Math.max(m,q.height);v.commitBlock({rowIndex:Ne,placed:J,blockHeight:P,blockEnd:re}),T=Math.max(T,re);continue}let le=z.properties,O=i.resolveChildStart(le,T,g,r),R=zi(le,r.sizes,r.cal),L=Math.max(Pr,R*r.timeline.pixelsPerDay),$=O+L,w=z.name??"",A=i.predictItemChipExtraHeight(z,r),S=m+A,{rowIndex:M,y:X}=v.placeItem({childId:w,desiredStart:O,desiredEnd:$,predictedHeight:S}),F=i.newCursor(O,X),W=i.sequenceItem(z,F,r);_.push(W);let Z=W.box.x+W.box.width+Jr;T=Math.max(T,Z);let pe=null;(W.textSpills||W.chipsOutside||W.dotSpills||W.iconSpills||W.footnoteSpills)&&(pe=Math.max(W.decorationsRightX,W.chipsOutside?W.chipsRightX:0)+6),v.commitItem({rowIndex:M,placed:W,logicalEnd:Z,spillReservation:pe,rowHeight:S})}let E=Math.max(m,v.usedHeight()),I=Math.max(T,v.usedRightX()),D={x:s,y:p,width:I-s,height:u+E+f};e.x=T+Nu,e.maxX=Math.max(e.maxX,e.x);let k=r.bandScale.step()-r.bandScale.bandwidth();e.height=Math.max(e.height,d+D.height+k);let B=n.name;B&&(r.entityLeftEdges.set(B,D.x),r.entityRightEdges.set(B,D.x+D.width)),r.currentFlowKey=c;let U=xh({box:D,afterDate:Vn(gt(n.properties,"after")),beforeDate:Vn(gt(n.properties,"before"))});return{kind:"group",id:B,title:a,box:D,children:_,style:o,inlineDatePins:U.length>0?U:void 0}}};var q_=12,$B=4,MB=13,FB=11;function dN(t,e){return t.length*e*.58}var Ch=class{constructor(e){de(this,"input");this.input=e}get id(){return this.input.id}measure(e){return{width:Math.max(Pr,this.input.logicalRightX-this.input.logicalLeftX),height:e.bands.bandwidth()}}place(e,r){let n=this.measure(r),i=Math.max(Pr,n.width-2*Jr),o=e.x+Jr,s={x:o,y:e.y,width:i,height:n.height},a=this.input.hasLinkIcon?20+UB-q_:0,c=q_+Math.max(0,a),l=Math.max(0,i-c-q_),u=this.input.title,f=u?dN(u,MB):0,d=this.input.metaText?dN(this.input.metaText,FB):0,p=this.input.metaTrailingWidth??0,m=d+p,g=this.input.metaText!==void 0||p>0,v=u.length>0&&f>l||g&&m>l,T=v?o+i+$B:o+c;return{id:this.input.id,box:s,textX:T,textSpills:v}}},UB=4;var Oh=class{constructor(e,r){de(this,"node");de(this,"deps");this.node=e,this.deps=r}get id(){return this.node.name??""}place(e,r){let{node:n}=this,{deps:i}=this,o=yt("parallel",n.properties,r.styleCtx),s=e.x,a=e.y,c=[],l=s,u=0,f=r.currentFlowKey,d=n.name??"p",p=0;for(let T of n.content){if(T.$type==="DescriptionDirective")continue;r.currentFlowKey=`${f}/par:${d}#${p}`;let _=i.newCursor(s,a+u),E=i.sequenceOne(T,_,r);c.push(E),u+=Math.max(r.bandScale.step(),_.height),l=Math.max(l,_.maxX),p++}r.currentFlowKey=f;let m={x:s,y:a,width:l-s,height:u};e.x=l+Nu,e.maxX=Math.max(e.maxX,e.x),e.height=Math.max(e.height,u);let g=n.name;g&&(r.entityLeftEdges.set(g,m.x),r.entityRightEdges.set(g,m.x+m.width));let v=xh({box:m,afterDate:Vn(gt(n.properties,"after")),beforeDate:Vn(gt(n.properties,"before"))});return{kind:"parallel",id:g,title:n.title??n.name,box:m,children:c,style:o,inlineDatePins:v.length>0?v:void 0}}};function Zo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function W_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Jo(t){let e,r,n;t.length!==2?(e=Zo,r=(a,c)=>Zo(t(a),c),n=(a,c)=>t(a)-c):(e=t===Zo||t===W_?t:BB,r=t,n=t);function i(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{let f=l+u>>>1;r(a[f],c)<0?l=f+1:u=f}while(l<u)}return l}function o(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{let f=l+u>>>1;r(a[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function s(a,c,l=0,u=a.length){let f=i(a,c,l,u-1);return f>l&&n(a[f-1],c)>-n(a[f],c)?f-1:f}return{left:i,center:s,right:o}}function BB(){return 0}function V_(t){return t===null?NaN:+t}var pN=Jo(Zo),hN=pN.right,GB=pN.left,XB=Jo(V_).center,Y_=hN;var ac=class extends Map{constructor(e,r=zB){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(mN(this,e))}has(e){return super.has(mN(this,e))}set(e,r){return super.set(HB(this,e),r)}delete(e){return super.delete(jB(this,e))}};function mN({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function HB({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function jB({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function zB(t){return t!==null&&typeof t=="object"?t.valueOf():t}var qB=Math.sqrt(50),WB=Math.sqrt(10),VB=Math.sqrt(2);function gN(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),s=o>=qB?10:o>=WB?5:o>=VB?2:1,a,c,l;return i<0?(l=Math.pow(10,-i)/s,a=Math.round(t*l),c=Math.round(e*l),a/l<t&&++a,c/l>e&&--c,l=-l):(l=Math.pow(10,i)*s,a=Math.round(t/l),c=Math.round(e/l),a*l<t&&++a,c*l>e&&--c),c<a&&.5<=r&&r<2?gN(t,e,r*2):[a,c,l]}function K_(t,e,r){return e=+e,t=+t,r=+r,gN(t,e,r)[2]}function Lh(t,e,r){e=+e,t=+t,r=+r;let n=e<t,i=n?K_(e,t,r):K_(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function Dh(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,o=new Array(i);++n<i;)o[n]=t+n*r;return o}function cc(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var yN=Symbol("implicit");function $h(){var t=new ac,e=[],r=[],n=yN;function i(o){let s=t.get(o);if(s===void 0){if(n!==yN)return n;t.set(o,s=e.push(o)-1)}return r[s%r.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new ac;for(let s of o)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return $h(e,r).unknown(n)},cc.apply(i,arguments),i}function Mu(){var t=$h().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete t.unknown;function f(){var d=e().length,p=i<n,m=p?i:n,g=p?n:i;o=(g-m)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),m+=(g-m-o*(d-c))*u,s=o*(1-c),a&&(m=Math.round(m),s=Math.round(s));var v=Dh(d).map(function(T){return m+o*T});return r(p?v.reverse():v)}return t.domain=function(d){return arguments.length?(e(d),f()):e()},t.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},t.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,a=!0,f()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(d){return arguments.length?(a=!!d,f()):a},t.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},t.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},t.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},t.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},t.copy=function(){return Mu(e(),[n,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},cc.apply(f(),arguments)}function Mh(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Z_(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Bu(){}var Fu=.7,Bh=1/Fu,lc="\\s*([+-]?\\d+)\\s*",Uu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",YB=/^#([0-9a-f]{3,8})$/,KB=new RegExp(`^rgb\\(${lc},${lc},${lc}\\)$`),ZB=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),JB=new RegExp(`^rgba\\(${lc},${lc},${lc},${Uu}\\)$`),QB=new RegExp(`^rgba\\(${bn},${bn},${bn},${Uu}\\)$`),e4=new RegExp(`^hsl\\(${Uu},${bn},${bn}\\)$`),t4=new RegExp(`^hsla\\(${Uu},${bn},${bn},${Uu}\\)$`),xN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Mh(Bu,Vi,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:TN,formatHex:TN,formatHex8:r4,formatHsl:n4,formatRgb:_N,toString:_N});function TN(){return this.rgb().formatHex()}function r4(){return this.rgb().formatHex8()}function n4(){return AN(this).formatHsl()}function _N(){return this.rgb().formatRgb()}function Vi(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=YB.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?EN(e):r===3?new cr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Fh(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Fh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=KB.exec(t))?new cr(e[1],e[2],e[3],1):(e=ZB.exec(t))?new cr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=JB.exec(t))?Fh(e[1],e[2],e[3],e[4]):(e=QB.exec(t))?Fh(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=e4.exec(t))?bN(e[1],e[2]/100,e[3]/100,1):(e=t4.exec(t))?bN(e[1],e[2]/100,e[3]/100,e[4]):xN.hasOwnProperty(t)?EN(xN[t]):t==="transparent"?new cr(NaN,NaN,NaN,0):null}function EN(t){return new cr(t>>16&255,t>>8&255,t&255,1)}function Fh(t,e,r,n){return n<=0&&(t=e=r=NaN),new cr(t,e,r,n)}function i4(t){return t instanceof Bu||(t=Vi(t)),t?(t=t.rgb(),new cr(t.r,t.g,t.b,t.opacity)):new cr}function uc(t,e,r,n){return arguments.length===1?i4(t):new cr(t,e,r,n??1)}function cr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Mh(cr,uc,Z_(Bu,{brighter(t){return t=t==null?Bh:Math.pow(Bh,t),new cr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fu:Math.pow(Fu,t),new cr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new cr(es(this.r),es(this.g),es(this.b),Gh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vN,formatHex:vN,formatHex8:o4,formatRgb:RN,toString:RN}));function vN(){return`#${Qo(this.r)}${Qo(this.g)}${Qo(this.b)}`}function o4(){return`#${Qo(this.r)}${Qo(this.g)}${Qo(this.b)}${Qo((isNaN(this.opacity)?1:this.opacity)*255)}`}function RN(){let t=Gh(this.opacity);return`${t===1?"rgb(":"rgba("}${es(this.r)}, ${es(this.g)}, ${es(this.b)}${t===1?")":`, ${t})`}`}function Gh(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function es(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qo(t){return t=es(t),(t<16?"0":"")+t.toString(16)}function bN(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new tn(t,e,r,n)}function AN(t){if(t instanceof tn)return new tn(t.h,t.s,t.l,t.opacity);if(t instanceof Bu||(t=Vi(t)),!t)return new tn;if(t instanceof tn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=NaN,a=o-i,c=(o+i)/2;return a?(e===o?s=(r-n)/a+(r<n)*6:r===o?s=(n-e)/a+2:s=(e-r)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new tn(s,a,c,t.opacity)}function SN(t,e,r,n){return arguments.length===1?AN(t):new tn(t,e,r,n??1)}function tn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Mh(tn,SN,Z_(Bu,{brighter(t){return t=t==null?Bh:Math.pow(Bh,t),new tn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fu:Math.pow(Fu,t),new tn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new cr(J_(t>=240?t-240:t+120,i,n),J_(t,i,n),J_(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new tn(wN(this.h),Uh(this.s),Uh(this.l),Gh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Gh(this.opacity);return`${t===1?"hsl(":"hsla("}${wN(this.h)}, ${Uh(this.s)*100}%, ${Uh(this.l)*100}%${t===1?")":`, ${t})`}`}}));function wN(t){return t=(t||0)%360,t<0?t+360:t}function Uh(t){return Math.max(0,Math.min(1,t||0))}function J_(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function Q_(t,e,r,n,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*r+(1+3*t+3*o-3*s)*n+s*i)/6}function IN(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],o=t[n+1],s=n>0?t[n-1]:2*i-o,a=n<e-1?t[n+2]:2*o-i;return Q_((r-n/e)*e,s,i,o,a)}}function kN(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],o=t[n%e],s=t[(n+1)%e],a=t[(n+2)%e];return Q_((r-n/e)*e,i,o,s,a)}}var Gu=t=>()=>t;function s4(t,e){return function(r){return t+r*e}}function a4(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function NN(t){return(t=+t)==1?Xh:function(e,r){return r-e?a4(e,r,t):Gu(isNaN(e)?r:e)}}function Xh(t,e){var r=e-t;return r?s4(t,r):Gu(isNaN(t)?e:t)}var eE=(function t(e){var r=NN(e);function n(i,o){var s=r((i=uc(i)).r,(o=uc(o)).r),a=r(i.g,o.g),c=r(i.b,o.b),l=Xh(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=c(u),i.opacity=l(u),i+""}}return n.gamma=t,n})(1);function PN(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),o=new Array(r),s,a;for(s=0;s<r;++s)a=uc(e[s]),n[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return n=t(n),i=t(i),o=t(o),a.opacity=1,function(c){return a.r=n(c),a.g=i(c),a.b=o(c),a+""}}}var jre=PN(IN),zre=PN(kN);function CN(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=t[i]*(1-o)+e[i]*o;return n}}function ON(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function LN(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),o=new Array(r),s;for(s=0;s<n;++s)i[s]=ts(t[s],e[s]);for(;s<r;++s)o[s]=e[s];return function(a){for(s=0;s<n;++s)o[s]=i[s](a);return o}}function DN(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Yi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function $N(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=ts(t[i],e[i]):n[i]=e[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var rE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tE=new RegExp(rE.source,"g");function c4(t){return function(){return t}}function l4(t){return function(e){return t(e)+""}}function MN(t,e){var r=rE.lastIndex=tE.lastIndex=0,n,i,o,s=-1,a=[],c=[];for(t=t+"",e=e+"";(n=rE.exec(t))&&(i=tE.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:Yi(n,i)})),r=tE.lastIndex;return r<e.length&&(o=e.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?l4(c[0].x):c4(e):(e=c.length,function(l){for(var u=0,f;u<e;++u)a[(f=c[u]).i]=f.x(l);return a.join("")})}function ts(t,e){var r=typeof e,n;return e==null||r==="boolean"?Gu(e):(r==="number"?Yi:r==="string"?(n=Vi(e))?(e=n,eE):MN:e instanceof Vi?eE:e instanceof Date?DN:ON(e)?CN:Array.isArray(e)?LN:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?$N:Yi)(t,e)}function nE(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function iE(t){return function(){return t}}function oE(t){return+t}var FN=[0,1];function fc(t){return t}function sE(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:iE(isNaN(e)?NaN:.5)}function u4(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function f4(t,e,r){var n=t[0],i=t[1],o=e[0],s=e[1];return i<n?(n=sE(i,n),o=r(s,o)):(n=sE(n,i),o=r(o,s)),function(a){return o(n(a))}}function d4(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),o=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=sE(t[s],t[s+1]),o[s]=r(e[s],e[s+1]);return function(a){var c=Y_(t,a,1,n)-1;return o[c](i[c](a))}}function UN(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function p4(){var t=FN,e=FN,r=ts,n,i,o,s=fc,a,c,l;function u(){var d=Math.min(t.length,e.length);return s!==fc&&(s=u4(t[0],t[d-1])),a=d>2?d4:f4,c=l=null,f}function f(d){return d==null||isNaN(d=+d)?o:(c||(c=a(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(i((l||(l=a(e,t.map(n),Yi)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,oE),u()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),u()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=nE,u()},f.clamp=function(d){return arguments.length?(s=d?!0:fc,u()):s!==fc},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,p){return n=d,i=p,u()}}function aE(){return p4()(fc,fc)}function cE(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],o=t[n],s;return o<i&&(s=r,r=n,n=s,s=i,i=o,o=s),t[r]=e.floor(i),t[n]=e.ceil(o),t}var lE=new Date,uE=new Date;function Ke(t,e,r,n){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{let s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{let c=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return c;let l;do c.push(l=new Date(+o)),e(o,a),t(o);while(l<o&&o<s);return c},i.filter=o=>Ke(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),r&&(i.count=(o,s)=>(lE.setTime(+o),uE.setTime(+s),t(lE),t(uE),Math.floor(r(lE,uE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?s=>n(s)%o===0:s=>i.count(0,s)%o===0):i)),i}var Xu=Ke(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Xu.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ke(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Xu);var Sne=Xu.range;var wn=Ke(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),BN=wn.range;var dc=Ke(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),h4=dc.range,Hh=Ke(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),m4=Hh.range;var pc=Ke(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),g4=pc.range,jh=Ke(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),y4=jh.range;var Jn=Ke(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),x4=Jn.range,ju=Ke(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),T4=ju.range,zh=Ke(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),_4=zh.range;function is(t){return Ke(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var Qn=is(0),hc=is(1),XN=is(2),HN=is(3),Ki=is(4),jN=is(5),zN=is(6),qN=Qn.range,E4=hc.range,v4=XN.range,R4=HN.range,b4=Ki.range,w4=jN.range,A4=zN.range;function os(t){return Ke(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var ss=os(0),mc=os(1),WN=os(2),VN=os(3),Zi=os(4),YN=os(5),KN=os(6),ZN=ss.range,S4=mc.range,I4=WN.range,k4=VN.range,N4=Zi.range,P4=YN.range,C4=KN.range;var gc=Ke(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),O4=gc.range,qh=Ke(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),L4=qh.range;var xr=Ke(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());xr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ke(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var D4=xr.range,rn=Ke(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());rn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ke(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var $4=rn.range;function QN(t,e,r,n,i,o){let s=[[wn,1,1e3],[wn,5,5*1e3],[wn,15,15*1e3],[wn,30,30*1e3],[o,1,6e4],[o,5,5*6e4],[o,15,15*6e4],[o,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function a(l,u,f){let d=u<l;d&&([l,u]=[u,l]);let p=f&&typeof f.range=="function"?f:c(l,u,f),m=p?p.range(l,+u+1):[];return d?m.reverse():m}function c(l,u,f){let d=Math.abs(u-l)/f,p=Jo(([,,v])=>v).right(s,d);if(p===s.length)return t.every(Lh(l/31536e6,u/31536e6,f));if(p===0)return Xu.every(Math.max(Lh(l,u,f),1));let[m,g]=s[d/s[p-1][2]<s[p][2]/d?p-1:p];return m.every(g)}return[a,c]}var[F4,U4]=QN(rn,qh,ss,zh,jh,Hh),[fE,dE]=QN(xr,gc,Qn,Jn,pc,dc);function pE(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function hE(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function zu(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function mE(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,o=t.days,s=t.shortDays,a=t.months,c=t.shortMonths,l=qu(i),u=Wu(i),f=qu(o),d=Wu(o),p=qu(s),m=Wu(s),g=qu(a),v=Wu(a),T=qu(c),_=Wu(c),E={a:S,A:M,b:X,B:F,c:null,d:oP,e:oP,f:c3,g:x3,G:_3,H:o3,I:s3,j:a3,L:uP,m:l3,M:u3,p:W,q:Z,Q:cP,s:lP,S:f3,u:d3,U:p3,V:h3,w:m3,W:g3,x:null,X:null,y:y3,Y:T3,Z:E3,"%":aP},I={a:pe,A:V,b:te,B:De,c:null,d:sP,e:sP,f:w3,g:D3,G:M3,H:v3,I:R3,j:b3,L:dP,m:A3,M:S3,p:Ne,q:Xe,Q:cP,s:lP,S:I3,u:k3,U:N3,V:P3,w:C3,W:O3,x:null,X:null,y:L3,Y:$3,Z:F3,"%":aP},D={a:le,A:O,b:R,B:L,c:$,d:nP,e:nP,f:t3,g:rP,G:tP,H:iP,I:iP,j:Z4,L:e3,m:K4,M:J4,p:z,q:Y4,Q:n3,s:i3,S:Q4,u:j4,U:z4,V:q4,w:H4,W:W4,x:w,X:A,y:rP,Y:tP,Z:V4,"%":r3};E.x=k(r,E),E.X=k(n,E),E.c=k(e,E),I.x=k(r,I),I.X=k(n,I),I.c=k(e,I);function k(q,J){return function(re){var P=[],we=-1,me=0,ve=q.length,_t,H,Cr;for(re instanceof Date||(re=new Date(+re));++we<ve;)q.charCodeAt(we)===37&&(P.push(q.slice(me,we)),(H=eP[_t=q.charAt(++we)])!=null?_t=q.charAt(++we):H=_t==="e"?" ":"0",(Cr=J[_t])&&(_t=Cr(re,H)),P.push(_t),me=we+1);return P.push(q.slice(me,we)),P.join("")}}function B(q,J){return function(re){var P=zu(1900,void 0,1),we=U(P,q,re+="",0),me,ve;if(we!=re.length)return null;if("Q"in P)return new Date(P.Q);if("s"in P)return new Date(P.s*1e3+("L"in P?P.L:0));if(J&&!("Z"in P)&&(P.Z=0),"p"in P&&(P.H=P.H%12+P.p*12),P.m===void 0&&(P.m="q"in P?P.q:0),"V"in P){if(P.V<1||P.V>53)return null;"w"in P||(P.w=1),"Z"in P?(me=hE(zu(P.y,0,1)),ve=me.getUTCDay(),me=ve>4||ve===0?mc.ceil(me):mc(me),me=ju.offset(me,(P.V-1)*7),P.y=me.getUTCFullYear(),P.m=me.getUTCMonth(),P.d=me.getUTCDate()+(P.w+6)%7):(me=pE(zu(P.y,0,1)),ve=me.getDay(),me=ve>4||ve===0?hc.ceil(me):hc(me),me=Jn.offset(me,(P.V-1)*7),P.y=me.getFullYear(),P.m=me.getMonth(),P.d=me.getDate()+(P.w+6)%7)}else("W"in P||"U"in P)&&("w"in P||(P.w="u"in P?P.u%7:"W"in P?1:0),ve="Z"in P?hE(zu(P.y,0,1)).getUTCDay():pE(zu(P.y,0,1)).getDay(),P.m=0,P.d="W"in P?(P.w+6)%7+P.W*7-(ve+5)%7:P.w+P.U*7-(ve+6)%7);return"Z"in P?(P.H+=P.Z/100|0,P.M+=P.Z%100,hE(P)):pE(P)}}function U(q,J,re,P){for(var we=0,me=J.length,ve=re.length,_t,H;we<me;){if(P>=ve)return-1;if(_t=J.charCodeAt(we++),_t===37){if(_t=J.charAt(we++),H=D[_t in eP?J.charAt(we++):_t],!H||(P=H(q,re,P))<0)return-1}else if(_t!=re.charCodeAt(P++))return-1}return P}function z(q,J,re){var P=l.exec(J.slice(re));return P?(q.p=u.get(P[0].toLowerCase()),re+P[0].length):-1}function le(q,J,re){var P=p.exec(J.slice(re));return P?(q.w=m.get(P[0].toLowerCase()),re+P[0].length):-1}function O(q,J,re){var P=f.exec(J.slice(re));return P?(q.w=d.get(P[0].toLowerCase()),re+P[0].length):-1}function R(q,J,re){var P=T.exec(J.slice(re));return P?(q.m=_.get(P[0].toLowerCase()),re+P[0].length):-1}function L(q,J,re){var P=g.exec(J.slice(re));return P?(q.m=v.get(P[0].toLowerCase()),re+P[0].length):-1}function $(q,J,re){return U(q,e,J,re)}function w(q,J,re){return U(q,r,J,re)}function A(q,J,re){return U(q,n,J,re)}function S(q){return s[q.getDay()]}function M(q){return o[q.getDay()]}function X(q){return c[q.getMonth()]}function F(q){return a[q.getMonth()]}function W(q){return i[+(q.getHours()>=12)]}function Z(q){return 1+~~(q.getMonth()/3)}function pe(q){return s[q.getUTCDay()]}function V(q){return o[q.getUTCDay()]}function te(q){return c[q.getUTCMonth()]}function De(q){return a[q.getUTCMonth()]}function Ne(q){return i[+(q.getUTCHours()>=12)]}function Xe(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var J=k(q+="",E);return J.toString=function(){return q},J},parse:function(q){var J=B(q+="",!1);return J.toString=function(){return q},J},utcFormat:function(q){var J=k(q+="",I);return J.toString=function(){return q},J},utcParse:function(q){var J=B(q+="",!0);return J.toString=function(){return q},J}}}var eP={"-":"",_:" ",0:"0"},Lt=/^\s*\d+/,B4=/^%/,G4=/[\\^$*+?|[\]().{}]/g;function Oe(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(e)+i:i)}function X4(t){return t.replace(G4,"\\$&")}function qu(t){return new RegExp("^(?:"+t.map(X4).join("|")+")","i")}function Wu(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function H4(t,e,r){var n=Lt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function j4(t,e,r){var n=Lt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function z4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function q4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function W4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function tP(t,e,r){var n=Lt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function rP(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function V4(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Y4(t,e,r){var n=Lt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function K4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function nP(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Z4(t,e,r){var n=Lt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function iP(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function J4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Q4(t,e,r){var n=Lt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function e3(t,e,r){var n=Lt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function t3(t,e,r){var n=Lt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function r3(t,e,r){var n=B4.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function n3(t,e,r){var n=Lt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function i3(t,e,r){var n=Lt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function oP(t,e){return Oe(t.getDate(),e,2)}function o3(t,e){return Oe(t.getHours(),e,2)}function s3(t,e){return Oe(t.getHours()%12||12,e,2)}function a3(t,e){return Oe(1+Jn.count(xr(t),t),e,3)}function uP(t,e){return Oe(t.getMilliseconds(),e,3)}function c3(t,e){return uP(t,e)+"000"}function l3(t,e){return Oe(t.getMonth()+1,e,2)}function u3(t,e){return Oe(t.getMinutes(),e,2)}function f3(t,e){return Oe(t.getSeconds(),e,2)}function d3(t){var e=t.getDay();return e===0?7:e}function p3(t,e){return Oe(Qn.count(xr(t)-1,t),e,2)}function fP(t){var e=t.getDay();return e>=4||e===0?Ki(t):Ki.ceil(t)}function h3(t,e){return t=fP(t),Oe(Ki.count(xr(t),t)+(xr(t).getDay()===4),e,2)}function m3(t){return t.getDay()}function g3(t,e){return Oe(hc.count(xr(t)-1,t),e,2)}function y3(t,e){return Oe(t.getFullYear()%100,e,2)}function x3(t,e){return t=fP(t),Oe(t.getFullYear()%100,e,2)}function T3(t,e){return Oe(t.getFullYear()%1e4,e,4)}function _3(t,e){var r=t.getDay();return t=r>=4||r===0?Ki(t):Ki.ceil(t),Oe(t.getFullYear()%1e4,e,4)}function E3(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Oe(e/60|0,"0",2)+Oe(e%60,"0",2)}function sP(t,e){return Oe(t.getUTCDate(),e,2)}function v3(t,e){return Oe(t.getUTCHours(),e,2)}function R3(t,e){return Oe(t.getUTCHours()%12||12,e,2)}function b3(t,e){return Oe(1+ju.count(rn(t),t),e,3)}function dP(t,e){return Oe(t.getUTCMilliseconds(),e,3)}function w3(t,e){return dP(t,e)+"000"}function A3(t,e){return Oe(t.getUTCMonth()+1,e,2)}function S3(t,e){return Oe(t.getUTCMinutes(),e,2)}function I3(t,e){return Oe(t.getUTCSeconds(),e,2)}function k3(t){var e=t.getUTCDay();return e===0?7:e}function N3(t,e){return Oe(ss.count(rn(t)-1,t),e,2)}function pP(t){var e=t.getUTCDay();return e>=4||e===0?Zi(t):Zi.ceil(t)}function P3(t,e){return t=pP(t),Oe(Zi.count(rn(t),t)+(rn(t).getUTCDay()===4),e,2)}function C3(t){return t.getUTCDay()}function O3(t,e){return Oe(mc.count(rn(t)-1,t),e,2)}function L3(t,e){return Oe(t.getUTCFullYear()%100,e,2)}function D3(t,e){return t=pP(t),Oe(t.getUTCFullYear()%100,e,2)}function $3(t,e){return Oe(t.getUTCFullYear()%1e4,e,4)}function M3(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Zi(t):Zi.ceil(t),Oe(t.getUTCFullYear()%1e4,e,4)}function F3(){return"+0000"}function aP(){return"%"}function cP(t){return+t}function lP(t){return Math.floor(+t/1e3)}var yc,Wh,hP,mP,gP;gE({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gE(t){return yc=mE(t),Wh=yc.format,hP=yc.parse,mP=yc.utcFormat,gP=yc.utcParse,yc}function U3(t){return new Date(t)}function B3(t){return t instanceof Date?+t:+new Date(+t)}function yP(t,e,r,n,i,o,s,a,c,l){var u=aE(),f=u.invert,d=u.domain,p=l(".%L"),m=l(":%S"),g=l("%I:%M"),v=l("%I %p"),T=l("%a %d"),_=l("%b %d"),E=l("%B"),I=l("%Y");function D(k){return(c(k)<k?p:a(k)<k?m:s(k)<k?g:o(k)<k?v:n(k)<k?i(k)<k?T:_:r(k)<k?E:I)(k)}return u.invert=function(k){return new Date(f(k))},u.domain=function(k){return arguments.length?d(Array.from(k,B3)):d().map(U3)},u.ticks=function(k){var B=d();return t(B[0],B[B.length-1],k??10)},u.tickFormat=function(k,B){return B==null?D:l(B)},u.nice=function(k){var B=d();return(!k||typeof k.range!="function")&&(k=e(B[0],B[B.length-1],k??10)),k?d(cE(B,k)):u},u.copy=function(){return UN(u,yP(t,e,r,n,i,o,s,a,c,l))},u}function Vh(){return cc.apply(yP(fE,dE,xr,gc,Qn,Jn,pc,dc,wn,Wh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var yE=class t{constructor(e,r,n){de(this,"bandwidthPx");de(this,"stepPx");de(this,"d3");this.bandwidthPx=e,this.stepPx=r,this.d3=n}static fixedRow(e){return new t(e.bandwidth,e.step)}static forRows(e){let r=Array.from({length:e.count},(i,o)=>String(o)),n=Mu().domain(r).range(e.range).paddingInner(e.paddingInner??0).paddingOuter(e.paddingOuter??0);return new t(n.bandwidth(),n.step(),n)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(e){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let r=this.d3(e);if(r===void 0)throw new Error(`BandScale: unknown band id "${e}"`);return r}},G3={bandwidth:56,step:64};function xP(){return yE.fixedRow(G3)}var Yh=class{constructor(e){de(this,"domain");de(this,"range");de(this,"pixelsPerDay");de(this,"calendar");de(this,"d3");this.domain=e.domain,this.range=e.range,this.calendar=e.calendar;let r=Math.max(1,Nr(e.domain[0],e.domain[1]));this.pixelsPerDay=(e.range[1]-e.range[0])/r,this.d3=Vh().domain(e.domain).range(e.range)}forward(e){let r=Nr(this.domain[0],e);return this.range[0]+r*this.pixelsPerDay}forwardWithinDomain(e){return e<this.domain[0]||e>this.domain[1]?null:this.forward(e)}invert(e){return this.d3.invert(e)}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Kh(t){return t.endsWith(":")?t.slice(0,-1):t}function TP(t,e){let n=t.roadmapDecl?.properties.find(c=>Kh(c.key)==="scale")?.value,i="weeks",o,s;if(n)if(n==="days"||n==="weeks"||n==="months"||n==="quarters"||n==="years")i=n;else{let c=/^(\d+)([dwmqy])$/.exec(n);if(c){let l=Math.max(1,parseInt(c[1],10));switch(c[2]){case"d":i="days";break;case"w":i="weeks";break;case"m":i="months";break;case"q":i="quarters";break;case"y":i="years";break}o=Zh(i)*l,s=1}}let a=s??fN[i]??4;if(e){let l=e.properties.find(m=>Kh(m.key)==="unit")?.value??i,u=e.properties.find(m=>Kh(m.key)==="label-every"),f=e.properties.find(m=>Kh(m.key)==="pixels-per-unit"),d=u?Math.max(1,parseInt(u.value,10)||a):a,p=f?Math.max(1,parseInt(f.value,10)||Zh(l)):o??Zh(l);return{unit:l,labelEvery:d,pixelsPerUnit:p}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Zh(i)}}function Zh(t){switch(t){case"days":return aN;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}function _P(t,e,r,n=wu){let i=r.daysPerUnit(e.unit),o=i*t.pixelsPerDay,s=Math.max(1,Math.round(t.widthPx/t.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=t.originX+u*t.pixelsPerDay,d=l%e.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?X3(e.unit,Yo(t.domain[0],u),l,n):void 0})}return c}function X3(t,e,r,n){switch(t){case"days":return`${e.getUTCMonth()+1}/${e.getUTCDate()}`;case"weeks":{let i=e.toLocaleString(n,{month:"short",timeZone:"UTC"}),o=e.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return e.toLocaleString(n,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(e.getUTCMonth()/3)+1;return`${gh(n).quarterPrefix}${i} ${e.getUTCFullYear()}`}case"years":return`${e.getUTCFullYear()}`}}function EP(t){return{daysPerUnit:e=>xE(e,t),addUnits:(e,r,n)=>Yo(e,r*xE(n,t)),isWorkingDay:()=>!0}}function vP(t,e){return xE(t,e)}function xE(t,e){switch(t){case"days":return 1;case"weeks":return e.daysPerWeek;case"months":return e.daysPerMonth;case"quarters":return e.daysPerQuarter;case"years":return e.daysPerYear}}var TE=class{constructor(e,r){de(this,"id");de(this,"anchor");this.id=e,this.anchor=r}place(e,r){let n=ae(this.anchor.properties,"date"),i=Rt(n);if(!i)return null;let o=e.scale.forwardWithinDomain(i);if(o===null)return null;let s=yt("anchor",this.anchor.properties,e.styleCtx),a=e.markerRowPlacements.get(this.id),c=a?.centerY??e.timeline.markerRow.y,l={x:o,y:c},u=a?.labelBox??{x:o+6+6,y:c-4,width:0,height:12},f=a?.labelSide??"right";return e.entityLeftEdges.set(this.id,o),e.entityRightEdges.set(this.id,o),e.entityMidpoints.set(this.id,l),{id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:e.chartTopY,cutBottomY:e.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f}}};function bP(t,e,r){let n=[];for(let[i,o]of t){let s=new TE(i,o).place(e,r);s&&n.push(s)}return n}function _E(t,e,r){let n=[],i=new Map,o=new Map;return[...t.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,gt(l.properties,"on")),n.push({number:f,title:l.title??c,description:l.description?.text,style:yt("footnote",l.properties,e.styleCtx)})}),{area:{box:{x:en,y:r+en,width:e.chartRightX-2*en,height:n.length===0?0:Ou+n.length*Lu+en},entries:n},index:i,hosts:o}}var H3=.8,j3=1;function z3(t){let e=[];return AP(t,e),e}function AP(t,e){for(let r of t)if(r.kind==="item"){let n=q3(r);n>0&&r.box.width>0&&e.push({startX:r.box.x,endX:r.box.x+r.box.width,load:n})}else(r.kind==="parallel"||r.kind==="group")&&AP(r.children,e)}function q3(t){return t.capacity?t.capacity.value:t.size?1:0}function SP(t){if(t.capacityValue<=0||t.warnFraction===null&&t.overFraction===null)return null;let e=z3(t.children);if(e.length===0)return null;let r=new Set;for(let s of e)r.add(s.startX),r.add(s.endX);let n=Array.from(r).sort((s,a)=>s-a);if(n.length<2)return null;let i=[];for(let s=0;s<n.length-1;s++){let a=n[s],c=n[s+1],l=(a+c)/2,u=0;for(let f of e)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:W3(u,t.capacityValue,t.warnFraction,t.overFraction)})}let o=[];for(let s of i){let a=o[o.length-1];a&&a.classification===s.classification&&a.endX===s.startX?a.endX=s.endX:o.push({...s})}return{segments:o,capacityValue:t.capacityValue,warnFraction:t.warnFraction,overFraction:t.overFraction}}function W3(t,e,r,n){let i=t/e;return n!==null&&i>=n?"red":r!==null&&i>=r?"yellow":"green"}function IP(t,e){let r=e.get("swimlane"),n=wP(ae(t.properties,"utilization-warn-at"),r?ae(r.properties,"utilization-warn-at"):void 0,H3),i=wP(ae(t.properties,"utilization-over-at"),r?ae(r.properties,"utilization-over-at"):void 0,j3);return{warn:n,over:i}}function wP(t,e,r){let i=K3(t??e);return i.kind==="unset"?r:i.kind==="none"?null:i.value}var V3=/^\d+(?:\.\d+)?%$/,Y3=/^\d+\.\d+$/;function K3(t){if(t===void 0)return{kind:"unset"};if(t==="none")return{kind:"none"};if(V3.test(t)){let e=parseFloat(t)/100;return Number.isFinite(e)&&e>0?{kind:"number",value:e}:{kind:"unset"}}if(Y3.test(t)){let e=parseFloat(t);return Number.isFinite(e)&&e>0?{kind:"number",value:e}:{kind:"unset"}}return{kind:"unset"}}var kP=10;function Z3(t,e,r){let n=ae(t.properties,"capacity"),i=ji(n);if(i===null)return{capacity:null,badgeWidthPx:0};let o=Eu(i),s=vu(e.capacityIcon,r),a=Vo(o,s,kP);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var J3=10,Q3=38,eG=8;function tG(t,e,r){let n=t.title??t.name??"";if(!n)return 0;let i=ae(t.properties,"owner");return Ru(0,n,i??void 0,e,r).rightX}function rG(t,e){if(!t.name)return[];let r=[];for(let[n,i]of e.footnoteHosts.entries())if(i.includes(t.name)){let o=e.footnoteIndex.get(n);o!==void 0&&r.push(o)}return r.sort((n,i)=>n-i),r}function nG(t,e,r,n){for(let i of t.content){if(i.$type==="DescriptionDirective")continue;let o=yr(i)?i.properties:i.properties??[];return n.resolveChildStart(o,e,e,r)}}var xc=class{constructor(e,r){de(this,"input");de(this,"deps");this.input=e,this.deps=r}get id(){return this.input.lane.name??""}place(e,r){let{lane:n,bandIndex:i}=this.input,{deps:o}=this,s=yt("swimlane",n.properties,r.styleCtx),a=e.x,c=r.bandScale.step(),l=r.currentFlowKey;r.currentFlowKey=`lane:${n.name??i}`;let{capacity:u,badgeWidthPx:f}=Z3(n,s,r.symbols),d=rG(n,r),p=d.length>0?o.estimateTextWidth(d.join(","),kP):0,m=tG(n,f,p),g=nG(n,a,r,o),v=!n.title||g===void 0||g>=m+eG,T=e.y+(v?J3:Q3),_=new rc({laneLeftX:a,originY:T,minRowHeight:c,slackCorridors:r.slackCorridors}),E=a,I=[];for(let R of n.content){if(R.$type==="DescriptionDirective")continue;if(!yr(R)){let Xe=R.properties??[],q=o.resolveChildStart(Xe,E,a,r),{rowIndex:J,y:re}=_.placeBlock(),P=o.newCursor(q,re),we=o.sequenceOne(R,P,r);I.push(we);let me=we.box.x+we.box.width,ve=Math.max(c,P.height);_.commitBlock({rowIndex:J,placed:we,blockHeight:ve,blockEnd:me}),E=Math.max(E,me);continue}let L=R.properties,$=o.resolveChildStart(L,E,a,r),w=zi(L,r.sizes,r.cal),A=Math.max(Pr,w*r.timeline.pixelsPerDay),S=$+A,M=R.name??"",X=o.predictItemChipExtraHeight(R,r),F=c+X,{rowIndex:W,y:Z}=_.placeItem({childId:M,desiredStart:$,desiredEnd:S,predictedHeight:F}),pe=o.newCursor($,Z),V=o.sequenceItem(R,pe,r);I.push(V);let te=V.box.x+V.box.width+Jr;E=Math.max(E,te);let De=null;(V.textSpills||V.chipsOutside||V.dotSpills||V.iconSpills||V.footnoteSpills)&&(De=Math.max(V.decorationsRightX,V.chipsOutside?V.chipsRightX:0)+6),_.commitItem({rowIndex:W,placed:V,logicalEnd:te,spillReservation:De,rowHeight:F})}let D=T-e.y,k=Math.max(c+32,D+_.usedHeight()+16),B=Math.max(_.usedRightX(),m),U={x:0,y:e.y,width:r.chartRightX,height:k},z=ae(n.properties,"owner"),le;if(z){let R=r.teams.get(z),L=r.persons.get(z);le=R?.title??L?.title??z}let O=u?(()=>{let{warn:R,over:L}=IP(n,r.styleCtx.defaults);return SP({children:I,capacityValue:u.value,warnFraction:R,overFraction:L})})():null;return r.currentFlowKey=l,{positioned:{id:n.name,title:n.title??n.name??"",box:U,bandIndex:i,children:I,nested:[],style:s,owner:le,footnoteIndicators:d,capacity:u,utilization:O},usedHeight:k,usedRightX:B}}};var iG=18,oG=14,sG=14,aG=16,cG=32;function NP(t,e,r,n){let i=r+iG,o=[],s=!0;for(let a of t){s||(i+=aG),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+oG,u={cal:e.cal,styleCtx:{theme:e.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:hh(a.content.sizes,e.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:e.timeline,scale:e.scale,calendar:e.calendar,bandScale:e.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,entityVisualLeftX:new Map,entityVisualRightX:new Map,itemArrowSource:new Map,itemFlowKey:new Map,currentFlowKey:"",itemSlackAttachY:new Map,slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:e.chartRightX},f=[],d=l,p=0,m=u.timeline.originX;for(let k of a.content.swimlanes.values()){let{positioned:B,usedHeight:U,usedRightX:z}=new xc({lane:k,bandIndex:p},n).place({x:u.timeline.originX,y:d},u);f.push(B),d+=U,p++,z>m&&(m=z)}let g=d,v=Math.max(e.bandScale.bandwidth(),g-i+sG),T=0,{chromeRightX:_}=bu(T,c,a.sourcePath),E=Math.max(_,m)+cG,I=Math.min(e.chartRightX-T,E-T),D={x:T,y:i,width:I,height:v};for(let k of f)k.box.width=I;o.push({sourcePath:a.sourcePath,label:c,box:D,nestedSwimlanes:f,style:yt("swimlane",[],e.styleCtx)}),i+=v}return{regions:o,endY:i}}function em(t,e){let r=[];for(let n of t){let o=e.entityVisualRightX.get(n)??e.entityRightEdges.get(n);if(o===void 0)continue;let s=e.itemSlackAttachY.get(n)??e.entityMidpoints.get(n)?.y??0,a=e.itemFlowKey.get(n)??`marker:${n}`;r.push({ref:n,x:o,y:s,flowKey:a})}return r}function tm(t){let e=new Map;for(let r of t){let n=e.get(r.flowKey);(!n||r.x>n.x)&&e.set(r.flowKey,r)}return Array.from(e.values())}function PP(t,e,r,n,i,o,s,a){let c=n.length*i*.58*(o?1.05:1),l=t+r+6,u=t-r-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:e-4,width:c,height:12},side:p}}var EE=class{constructor(e,r){de(this,"id");de(this,"milestone");this.id=e,this.milestone=r}place(e){let r=this.milestone,n=yt("milestone",r.properties,e.styleCtx),i=ae(r.properties,"date"),o=gt(r.properties,"after"),s=Rt(i),a=e.timeline.markerRow.y,c=6,l=r.title??this.id,u=null,f=a,d=null,p="right",m=!1,g,v=!1;if(s){let _=e.scale.forwardWithinDomain(s);if(_===null)return null;u=_,m=!0;let E=e.markerRowPlacements.get(this.id);E&&(f=E.centerY,d=E.labelBox,p=E.labelSide);let I=em(o,e),D=tm(I),k=null;for(let B of D)(!k||B.x>k.x)&&(k=B);k&&k.x>_&&(v=!0,g=[{x:k.x,y:k.y>0?k.y:f}])}else if(o.length>0){let _=em(o,e),E=tm(_);E.sort((B,U)=>U.x-B.x);let I=E[0]?.x??e.timeline.originX;u=I,m=!1;let D=PP(u,a,c,l,10,!0,e.timeline.box.x,e.chartRightX);f=a,d=D.box,p=D.side,e.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let k=[];for(let B=1;B<E.length;B++){let U=E[B];U.x<I&&U.y>0&&k.push({x:U.x,y:U.y})}k.length>0&&(g=k)}if(u===null)return null;if(!d){let _=PP(u,f,c,l,10,!0,e.timeline.box.x,e.chartRightX);d=_.box,p=_.side}let T={x:u,y:f};return e.entityLeftEdges.set(this.id,T.x),e.entityRightEdges.set(this.id,T.x),e.entityMidpoints.set(this.id,T),{id:this.id,title:l,center:T,radius:c,fixed:m,slackArrows:g,isOverrun:v,style:n,cutTopY:e.chartTopY,cutBottomY:e.swimlaneBottomY,labelBox:d,labelSide:p}}};function CP(t,e){let r=[];for(let[n,i]of t){let o=new EE(n,i).place(e);o&&r.push(o)}return r}var uG=4;function fG(t,e){e>t.chartRightX&&(t.chartRightX=e)}var nm=class{place(e,r,n,i){let o=n.theme??"light",s=I_[o],a=n.width??1280,c=Vk(n.locale,hG(e)),l=Hk(e,r.config.calendar),u=TP(e,r.config.scale),f=hh(r.content.sizes,l),d={theme:s,styles:r.config.styles,defaults:r.config.defaults,labels:r.content.labels},{startDate:p,endDate:m}=i.computeDateWindow(e,{cal:l,sizes:f},r,n.today,u),g=yt("roadmap",e.roadmapDecl?.properties??[],d),v=g.headerPosition==="beside",T=g.timelinePosition!=="bottom",_=g.timelinePosition==="bottom"||g.timelinePosition==="both",E=e.roadmapDecl?.title??e.roadmapDecl?.name??"",I=ae(e.roadmapDecl?.properties??[],"author"),D=i.sizeBesideHeader(E,I),k=v?{x:0,y:0,width:D.boxWidth,height:0}:{x:0,y:0,width:0,height:Sh},B=v?D.boxWidth:0,U=v?8:Sh+8,z=EP(l),le=u.pixelsPerUnit/z.daysPerUnit(u.unit),R=Math.max(1,Nr(p,m))*le,L=B+Qr,$=R,w=B+Qr+$+Qr,A=Math.min(a,w),S=n.today!==void 0&&n.today>=p&&n.today<=m,M=r.content.anchors.size+r.content.milestones.size>0,X=S?qi:0,F=T?ku:0,W=new Yh({domain:[p,m],range:[L,L+R],calendar:z}),Z=Math.max(A,L+$+Qr),pe=[];for(let[K,ue]of r.content.anchors){let ze=Rt(ae(ue.properties,"date"));if(!ze)continue;let Dr=W.forwardWithinDomain(ze);Dr!==null&&pe.push({id:K,centerX:Dr,radius:6,title:ue.title??K,fontSize:10,bold:!1,date:ze,isMilestone:!1})}for(let[K,ue]of r.content.milestones){let ze=Rt(ae(ue.properties,"date"));if(!ze)continue;let Dr=W.forwardWithinDomain(ze);Dr!==null&&pe.push({id:K,centerX:Dr,radius:6,title:ue.title??K,fontSize:10,bold:!0,date:ze,isMilestone:!0})}let V=LP(pe,B,Z,i.estimateTextWidth),te=M?Math.max(1,V.rowCount):0,De=te*26,Ne=X+F+De,Xe=Ne+8,q=v?D.cardHeight+uG:0,J=Math.max(U,q-Ne),re=J+X,P=re+F,we=P+De,me=_P(W,u,z,c),ve={box:{x:L,y:J,width:R,height:0},ticks:me,pixelsPerDay:le,originX:L,startDate:p,endDate:m,labelStyle:yt("roadmap",[],d),pillRowHeight:X,tickPanelY:re,tickPanelHeight:F,markerRow:{y:P+13,height:De,collisionY:P-8},minorGrid:g.minorGrid},_t=new Map;for(let[K,ue]of V.placements){let ze=P+13+ue.rowIndex*26;_t.set(K,{rowIndex:ue.rowIndex,centerY:ze,labelBox:{...ue.labelBox,y:ze-4},labelSide:ue.labelSide})}let H={cal:l,styleCtx:d,sizes:f,labels:r.content.labels,teams:r.content.teams,persons:r.content.persons,symbols:r.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:ve,scale:W,calendar:z,bandScale:xP(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,entityVisualLeftX:new Map,entityVisualRightX:new Map,itemArrowSource:new Map,itemFlowKey:new Map,currentFlowKey:"",itemSlackAttachY:new Map,slackCorridors:[],markerRowPlacements:_t,chartTopY:J+Xe,chartBottomY:0,swimlaneBottomY:0,chartRightX:Z};for(let K of pe){let ue=_t.get(K.id);ue&&(H.entityLeftEdges.set(K.id,K.centerX),H.entityRightEdges.set(K.id,K.centerX),H.entityMidpoints.set(K.id,{x:K.centerX,y:ue.centerY}))}let Cr=_E(r.content.footnotes,H,0);H.footnoteIndex=Cr.index,H.footnoteHosts=Cr.hosts;let _r=new Map(H.entityLeftEdges),Or=new Map(H.entityRightEdges),cs=new Map(H.entityMidpoints),_e=[...r.content.swimlanes.values()],Lr=yt("swimlane",[],d),Qi=oN[Lr.spacing]??0,In=()=>{let K=[],ue=H.chartTopY,ze=0,Dr=H.timeline.originX;for(let vr of _e){ze>0&&(ue+=Qi);let{positioned:nf,usedHeight:YE,usedRightX:ne}=new xc({lane:vr,bandIndex:ze},i).place({x:H.timeline.originX,y:ue},H);K.push(nf),ue+=YE,ne>Dr&&(Dr=ne),ze++}return{swimlanes:K,nextY:ue,maxRightX:Dr}},Er=In(),jt=Er.swimlanes,At=Er.nextY,x=dG(r.content.milestones,H);x.length>0&&(H.entityLeftEdges=new Map(_r),H.entityRightEdges=new Map(Or),H.entityMidpoints=new Map(cs),H.itemSlackAttachY=new Map,H.entityVisualLeftX=new Map,H.entityVisualRightX=new Map,H.itemArrowSource=new Map,H.itemFlowKey=new Map,H.currentFlowKey="",H.slackCorridors=x,Er=In(),jt=Er.swimlanes,At=Er.nextY),fG(H,Er.maxRightX+Qr);for(let K of jt)K.box.width=H.chartRightX;let C=r.content.isolatedRegions,j=[];if(C.length>0){let K=NP(C,H,At+8,i);j=K.regions,At=K.endY}H.chartBottomY=At,H.swimlaneBottomY=At,ve.box.height=H.chartBottomY-ve.box.y;let Y=CP(r.content.milestones,H),$e=pe.map(K=>({id:K.id,centerX:K.centerX,radius:K.radius,title:K.title,fontSize:K.fontSize,bold:K.bold}));for(let K of Y)K.fixed||$e.push({id:K.id??"",centerX:K.center.x,radius:K.radius,title:K.title,fontSize:10,bold:!0});let Pe=LP($e,B,H.chartRightX,i.estimateTextWidth);H.markerRowPlacements.clear();for(let[K,ue]of Pe.placements){let ze=P+13+ue.rowIndex*26;H.markerRowPlacements.set(K,{rowIndex:ue.rowIndex,centerY:ze,labelBox:{...ue.labelBox,y:ze-4},labelSide:ue.labelSide})}for(let K of Y){let ue=H.markerRowPlacements.get(K.id??"");ue&&(K.center={x:K.center.x,y:ue.centerY},K.labelBox=ue.labelBox,K.labelSide=ue.labelSide)}for(let K of pe){let ue=H.markerRowPlacements.get(K.id);ue&&H.entityMidpoints.set(K.id,{x:K.centerX,y:ue.centerY})}for(let K of Y)K.fixed||H.entityMidpoints.set(K.id??"",{x:K.center.x,y:K.center.y});let qe=M?Math.max(1,Pe.rowCount):0;if(qe>te){let K=(qe-te)*26;H.timeline.markerRow.height=qe*26,H.timeline.box.height+=K,H.chartTopY+=K,H.chartBottomY+=K,H.swimlaneBottomY+=K;for(let ue of jt)vE(ue,K);for(let ue of j)pG(ue,K);for(let[ue,ze]of H.entityMidpoints)H.markerRowPlacements.has(ue)||H.entityMidpoints.set(ue,{x:ze.x,y:ze.y+K});for(let[ue,ze]of H.itemSlackAttachY)H.itemSlackAttachY.set(ue,ze+K);for(let ue of Y)if(ue.cutTopY=H.chartTopY,ue.cutBottomY=H.swimlaneBottomY,ue.slackArrows)for(let ze of ue.slackArrows)ze.y+=K}_&&(H.timeline.bottomTickPanelY=H.chartBottomY+8,H.timeline.bottomTickPanelHeight=ku,H.chartBottomY+=8+ku);let Ze=new Set(Y.map(K=>K.center.x)),ge=bP(r.content.anchors,H,Ze),Ue=i.collectItems(_e),Ae=i.buildDependencies(Ue,jt,j,H),Je=i.buildNowline(n.today,H,c),st=_E(r.content.footnotes,H,H.chartBottomY);H.footnoteIndex=st.index,H.footnoteHosts=st.hosts,k.height=k.height||H.chartBottomY,v||(k.width=H.chartRightX);let Qt=v?{x:6,y:we-D.cardHeight,width:D.cardWidth,height:D.cardHeight}:{x:0,y:0,width:H.chartRightX,height:Sh},ls=st.area.entries.length>0?st.area.box.y+st.area.box.height:H.chartBottomY,tf={x:H.chartRightX-Qr-j_,y:ls+Qr,width:j_,height:uN},er=tf.y+tf.height+Qr,on={box:k,position:g.headerPosition,title:E,author:I,titleLines:D.titleLines,authorLines:D.authorLines,cardBox:Qt,logo:void 0,style:g,attributionBox:tf};return{width:H.chartRightX,height:er,theme:o,palette:s,backgroundColor:s.surface.page,header:on,timeline:ve,nowline:Je,swimlanes:jt,anchors:ge,milestones:Y,edges:Ae,footnotes:st.area,includes:j,chartBox:{x:B,y:H.chartTopY,width:H.chartRightX-B,height:H.chartBottomY-H.chartTopY}}}};function dG(t,e){let r=[];for(let[n,i]of t){let o=ae(i.properties,"date"),s=gt(i.properties,"after"),a=Rt(o),c=em(s,e),l=tm(c);if(a){let f=e.scale.forwardWithinDomain(a);if(f===null)continue;let d=null;for(let p of l)(!d||p.x>d.x)&&(d=p);d&&d.x>f&&d.y>0&&r.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:n});continue}if(l.length===0)continue;l.sort((f,d)=>d.x-f.x);let u=l[0].x;for(let f=1;f<l.length;f++){let d=l[f];d.x<u&&d.y>0&&r.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:n})}}return r}function vE(t,e){t.box.y+=e;for(let r of t.children)DP(r,e);for(let r of t.nested)vE(r,e)}function DP(t,e){if(t.box.y+=e,t.kind==="item"){t.overflowBox&&(t.overflowBox.y+=e);for(let r of t.labelChips)r.box.y+=e;return}for(let r of t.children)DP(r,e)}function pG(t,e){t.box.y+=e;for(let r of t.nestedSwimlanes)vE(r,e)}function LP(t,e,r,n){let i=[...t].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=n(a.title,a.fontSize)*(a.bold?1.05:1),l=a.centerX+a.radius+6,u=a.centerX-a.radius-6-c,f=l+c<=r,d=u>=e,p=a.centerX-a.radius,m=a.centerX+a.radius,g=B=>B==="right"?l:u,v=B=>B==="right"?f:d,T=(B,U)=>{let z=Math.min(p,B),le=Math.max(m,B+c);return s[U].some(O=>O.left<le&&O.right>z)},_=-1,E="right",I=l;e:for(let B=s.length-1;B>=0;B--)for(let U of["right","left"]){if(!v(U))continue;let z=g(U);if(!T(z,B)){_=B,E=U,I=z;break e}}if(_===-1){for(let[B,U]of o)o.set(B,{...U,rowIndex:U.rowIndex+1});s=[[],...s],_=0,E=f?"right":"left",I=g(E)}let D=Math.min(p,I),k=Math.max(m,I+c);s[_].push({left:D,right:k}),o.set(a.id,{rowIndex:_,labelBox:{x:I,y:0,width:c,height:12},labelSide:E})}return{placements:o,rowCount:s.length}}function hG(t){return t.directive?.properties.find(r=>mG(r.key)==="locale")?.value}function mG(t){return t.endsWith(":")?t.slice(0,-1):t}function TG(t){switch(t){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return t;case void 0:return"planned";default:return"neutral"}}function _G(t){if(!t)return 0;let e=/^(\d{1,3})%$/.exec(t);return e?Math.max(0,Math.min(100,parseInt(e[1],10)))/100:0}function EG(t,e){if(t)return/^\d+(?:\.\d+)?[dwmqy]$/.test(t)||/^\d+%$/.test(t)?t:e.sizes.get(t)?.effortLiteral??t}function vG(t,e){if(t)return e.teams.get(t)?.title??e.persons.get(t)?.title??t}function RG(t){if(!t)return{icon:"none"};let e=t.toLowerCase();return e.includes("linear.app")?{icon:"linear",href:t}:e.includes("github.com")?{icon:"github",href:t}:e.includes("atlassian.net")||e.includes("jira.")?{icon:"jira",href:t}:{icon:"generic",href:t}}function im(t,e,r,n,i){let o=iN(t,e),s=t.name??t.title??"",a=o.padding==="none"?"xs":o.padding,c=sN[a],l=Math.max(20,Math.round(s.length*5.5+c*2));return i!==void 0&&(l=Math.min(l,i)),{text:s,style:o,box:{x:r,y:n,width:l,height:13}}}function IE(t,e,r,n){let i=t.properties,o=yt("item",i,r.styleCtx),s=ae(i,"size"),a=s?r.sizes.get(s)??null:null,c=zi(i,r.sizes,r.cal),l=zk(i,r.sizes,r.cal),u=gt(i,"after"),f=gt(i,"before"),d=ae(i,"date"),p=jk(ae(i,"remaining"),r.sizes,r.cal),m=e.x,g=Rt(d);if(g){let ne=r.scale.forwardWithinDomain(g);ne!==null&&(m=ne)}else if(u.length>0){let ne=e.x;for(let We of u){let Et=Rt(We);if(Et){let ni=r.scale.forwardWithinDomain(Et);ni!==null&&(ne=Math.max(ne,ni));continue}let kn=r.entityRightEdges.get(We);kn!==void 0&&(ne=Math.max(ne,kn))}m=Math.max(e.x,ne)}let v=Math.max(Pr,c*r.timeline.pixelsPerDay),T=m,_=m+v,E=ae(i,"link"),I=RG(E),D=I.icon!=="none",k=Math.max(Pr,v-2*Jr),B=gt(i,"labels"),U=[];for(let ne of B){let We=r.labels.get(ne);if(!We)continue;let Et=im(We,r.styleCtx,0,0);U.push({id:We,width:Et.box.width})}let z=0;for(let ne=0;ne<U.length;ne+=1)ne>0&&(z+=4),z+=U[ne].width;let le=Math.max(0,k-24),O=U.length>0&&z>le,R=!1,L,$;if(f.length>0){let ne,We;for(let Et of f){let kn=Rt(Et),ni=kn?r.scale.forwardWithinDomain(kn)??void 0:r.entityLeftEdges.get(Et);ni!==void 0&&(ne===void 0||ni<ne)&&(ne=ni,We=Et)}ne!==void 0&&_>ne&&(R=!0,L={x:ne,y:e.y,width:_-ne,height:r.bandScale.bandwidth()},$=We)}let w=ae(i,"status"),A=TG(w),S=_G(w);S===0&&A==="done"&&(S=1);let M=/^(\d{1,3})%$/.exec(ae(i,"remaining")??"");S===0&&A==="in-progress"&&M&&(S=1-Math.max(0,Math.min(100,parseInt(M[1],10)))/100),S===0&&A==="in-progress"&&p>0&&l>0&&(S=Math.max(0,Math.min(1,1-p/l)));let X={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},F={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},W={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},Z={done:r.styleCtx.theme.status.done,"in-progress":r.styleCtx.theme.status.inProgress,"at-risk":r.styleCtx.theme.status.atRisk,blocked:r.styleCtx.theme.status.blocked,planned:r.styleCtx.theme.status.planned,neutral:r.styleCtx.theme.status.neutral},pe=r.styleCtx.theme.name,V=pe==="dark",te=V?"#0f172a":"#ffffff",De=pe==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===te&&(o.bg=pe==="grayscale"?W[A]:V?F[A]:X[A]),o.fg===De&&(o.fg=Z[A]);let Ne=ae(i,"duration"),Xe=!!Ne&&/^\d+(?:\.\d+)?[dwmqy]$/.test(Ne),q=a?a.title??a.name:"",J=Xe?Ne:q||void 0,re=ae(i,"remaining"),P=EG(re,r),we=vG(n??ae(i,"owner"),r),me=()=>[J,we].filter(Boolean).join(" "),ve;if(A==="in-progress"&&P){let ne=me();ve=ne?`${ne} \u2014 ${P} remaining`:`${P} remaining`}else if(A==="in-progress"&&S>0&&S<1){let ne=Math.round((1-S)*100),We=me();ve=We?`${We} \u2014 ${ne}% remaining`:`${ne}% remaining`}else(we||J)&&(ve=me()||void 0);let _t=ae(i,"capacity"),H=ji(_t),Cr=null,_r=0;if(H!==null){let ne=Eu(H),We=vu(o.capacityIcon,r.symbols);Cr={value:H,text:ne,icon:We};let Et=11;_r=(ve?Sn(" ",Et):0)+Vo(ne,We,Et)}let Or=t.title??t.name??"",cs=new Ch({id:t.name??"",title:Or,logicalLeftX:T,logicalRightX:_,metaText:ve,metaTrailingWidth:_r,hasLinkIcon:D}).place({x:T,y:e.y},{time:r.scale,bands:r.bandScale,style:o}),_e=cs.box,Lr=r.bandScale.bandwidth(),Qi=_e.width<17,In=D&&_e.width<41,Er=_e.width<23,jt=cs.textSpills||In,At=null;O&&(At=R_(U,_e.width));let x=At?At.rows.length:U.length>0?1:0,C=ve!==void 0||Cr!==null,j=BP(O,jt,x,Lr,C);j>0&&(_e.height=Lr+j);let Y=[],$e=_e.y+Lr-Rn-13-3,Pe=_e.y+38+3,Ze=O&&jt||!O&&C&&U.length>0?Math.max($e,Pe):$e,ge=O?_e.x+_e.width+6:_e.x+12,Ue=ge;if(At)for(let ne=0;ne<At.rows.length;ne+=1){let We=Ze+ne*17,Et=ge;for(let ni of At.rows[ne]){let KE=im(ni.id,r.styleCtx,Et,We);Y.push(KE),Et+=KE.box.width+4}let kn=Et-4;kn>Ue&&(Ue=kn)}else{let ne=ge;for(let We of U){let Et=im(We.id,r.styleCtx,ne,Ze);Y.push(Et),ne+=Et.box.width+4}Ue=U.length>0?ne-4:ge}let Ae=new Set;if(t.name){for(let[ne,We]of r.footnoteHosts.entries())if(We.includes(t.name)){let Et=r.footnoteIndex.get(ne);Et!==void 0&&Ae.add(Et)}}let Je=[...Ae].sort((ne,We)=>ne-We),st=we??n??ae(i,"owner"),Qt=t.description?.text,ls=Je.length>0&&Er,er=_e.x+_e.width+6,on=!1,rf=null;In&&(on&&(er+=4),rf=er,er=rf+14,on=!0);let K=0;if(jt){on&&(er+=4);let ne=Sn(Or,13),We=(ve?Sn(ve,11):0)+_r;K=Math.max(ne,We),er+=K,on=!0}let ue=null;ls&&(on&&(er+=4),ue=er,er+=Je.length*8,on=!0);let ze=null;Qi&&(on&&(er+=4),ze=er+5,er=ze+5,on=!0);let Dr=Math.max(_e.x+_e.width,er),vr=t.name;if(vr){r.entityLeftEdges.set(vr,T),r.entityRightEdges.set(vr,_),r.entityMidpoints.set(vr,{x:(T+_)/2,y:_e.y+_e.height/2}),r.entityVisualLeftX.set(vr,_e.x),r.entityVisualRightX.set(vr,_e.x+_e.width);let ne=jt?{x:_e.x+_e.width,y:_e.y+_e.height-Rn/2}:{x:_e.x+_e.width,y:_e.y+_e.height/2};r.itemArrowSource.set(vr,ne),r.itemFlowKey.set(vr,r.currentFlowKey);let We=jt?_e.y+_e.height-Rn/2:_e.y+_e.height/2;r.itemSlackAttachY.set(vr,We)}e.x=_,e.maxX=Math.max(e.maxX,e.x),e.height=Math.max(e.height,r.bandScale.step()+j);let nf=Jk({box:_e,afterDate:Vn(u),beforeDate:Vn(f),hasLinkIcon:D,footnoteCount:Je.length});return{kind:"item",id:vr,title:Or,box:_e,status:A,progressFraction:S,footnoteIndicators:Je,labelChips:Y,chipsOutside:O,chipsRightX:Ue,linkIcon:I.icon,linkHref:I.href,hasOverflow:R,overflowBox:L,overflowAnchorId:$,owner:st,description:Qt,metaText:ve,textSpills:jt,dotSpills:Qi,iconSpills:In,footnoteSpills:ls,dotSpillCx:ze,iconSpillX:rf,footnoteSpillStartX:ue,decorationsRightX:Dr,capacity:Cr,size:a,style:o,inlineDatePins:nf.length>0?nf:void 0}}function bG(t,e,r){return new Oh(t,{sequenceOne:kE,newCursor:Th}).place(e,r)}function wG(t,e,r){return new Ph(t,{sequenceItem:IE,sequenceOne:kE,resolveChildStart:XP,newCursor:Th,estimateTextWidth:Sn,predictItemChipExtraHeight:GP}).place(e,r)}function kE(t,e,r){if(yr(t))return IE(t,e,r);if(Vr(t))return bG(t,e,r);if(Wr(t))return wG(t,e,r);throw new Error(`Unknown swimlane child type: ${t.$type??"unknown"}`)}function Sn(t,e){return t.length*e*.58}function BP(t,e,r,n,i){if(r===0)return 0;let o=n-Rn-13-3,s=41,a;t&&e?a=s:!t&&i?a=Math.max(o,s):a=o;let l=a+(r-1)*17+13+3+Rn;return Math.max(0,l-n)}function GP(t,e){let r=t.properties,n=gt(r,"labels");if(n.length===0)return 0;let i=zi(r,e.sizes,e.cal),o=Math.max(Pr,i*e.timeline.pixelsPerDay),s=Math.max(Pr,o-2*Jr),a=[];for(let T of n){let _=e.labels.get(T);if(!_)continue;let E=im(_,e.styleCtx,0,0);a.push({id:_,width:E.box.width})}if(a.length===0)return 0;let c=0;for(let T=0;T<a.length;T+=1)T>0&&(c+=4),c+=a[T].width;let l=Math.max(0,s-24),u=c>l,f=ae(r,"duration")!==void 0||ae(r,"size")!==void 0||ae(r,"owner")!==void 0||ae(r,"remaining")!==void 0||ae(r,"capacity")!==void 0,d=t.title??t.name??"",m=(d?Sn(d,13):0)>l,g=u?R_(a,s):null,v=g?g.rows.length:a.length>0?1:0;return BP(u,m,v,e.bandScale.bandwidth(),f)}function XP(t,e,r,n){let i=Rt(ae(t,"date"))??Rt(ae(t,"start"));if(i){let s=n.scale.forwardWithinDomain(i);if(s!==null)return s}let o=gt(t,"after");if(o.length>0){let s=r;for(let a of o){let c=Rt(a);if(c){let u=n.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=n.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(r,s)}return e}var RE=6;function $P(t,e,r){if(!t)return[];let n=t.split(/\s+/).filter(s=>s.length>0);if(n.length===0)return[];let i=[],o="";for(let s of n){let a=o?`${o} ${s}`:s;o&&Sn(a,r)>e?(i.push(o),o=s):o=a}return o&&i.push(o),i}function AG(t,e){let r=U_-32,n=$P(t,r,16),i=$P(e??"",r,11),o=0;for(let d of n)o=Math.max(o,Sn(d,16));for(let d of i)o=Math.max(o,Sn(d,11));let s=o+32,a=Math.max(cN-RE,Math.min(U_-RE,s)),c=n.length>0?(n.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+RE;return{titleLines:n,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function SG(t,e,r,n,i){let s=t.roadmapDecl?.properties??[],a=ae(s,"start"),c=Rt(a)??IG(n),l=ae(s,"length");if(l){let p=kG(l,e.cal);if(p>0)return{startDate:c,endDate:Yo(c,p)}}let u=HP(r,e,c,n),f=vP(i.unit,e.cal),d=u>0?Math.ceil(u/f)*f:4*e.cal.daysPerWeek;return{startDate:c,endDate:Yo(c,Math.max(1,d))}}function IG(t){let e=t??new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function kG(t,e){let r=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(t);if(!r)return 0;let n=parseFloat(r[1]);switch(r[2]){case"d":return n;case"w":return n*e.daysPerWeek;case"m":return n*e.daysPerMonth;case"q":return n*e.daysPerQuarter;case"y":return n*e.daysPerYear;default:return 0}}function HP(t,e,r,n){let i=new Map,o=new Map,s=new Map,a=0,c=f=>{let d=Rt(f);return d?Nr(r,d):i.has(f)?i.get(f):o.has(f)?o.get(f):s.has(f)?s.get(f):0};for(let f of t.content.anchors.values()){let d=Rt(ae(f.properties,"date"));if(d&&f.name){let p=Nr(r,d);o.set(f.name,p),a=Math.max(a,p)}}let l=(f,d)=>{let p=d;for(let m of f)m.$type!=="DescriptionDirective"&&(p=u(m,p),a=Math.max(a,p));return p},u=(f,d)=>{if(yr(f)){let p=zi(f.properties,e.sizes,e.cal),m=Rt(ae(f.properties,"date")),g=Rt(ae(f.properties,"start")),v=gt(f.properties,"after"),T=d;m?T=Nr(r,m):g?T=Nr(r,g):v.length>0&&(T=Math.max(d,...v.map(c)));let _=T+p;return f.name&&i.set(f.name,_),_}if(Vr(f)){let p=gt(f.properties,"after"),m=p.length>0?Math.max(d,...p.map(c)):d,g=m;for(let v of f.content){if(v.$type==="DescriptionDirective")continue;let T=u(v,m);g=Math.max(g,T)}return g}if(Wr(f)){let p=gt(f.properties,"after"),m=p.length>0?Math.max(d,...p.map(c)):d;return l(f.content,m)}return d};for(let f of t.content.swimlanes.values())l(f.content,0);for(let f of t.content.milestones.values()){let d=Rt(ae(f.properties,"date"));if(d){let m=Nr(r,d);f.name&&s.set(f.name,m),a=Math.max(a,m);continue}let p=gt(f.properties,"after");if(p.length>0){let m=Math.max(0,...p.map(c));f.name&&s.set(f.name,m),a=Math.max(a,m)}}for(let f of t.content.isolatedRegions){let d=HP({config:f.config,content:f.content,diagnostics:[],processedFiles:new Set},e,r,void 0);a=Math.max(a,d)}if(n){let f=Nr(r,n);f>0&&(a=Math.max(a,f))}return a}function NG(t,e,r,n){let i=new mh(qk(e,r)),o=[],s=[];for(let[l,u]of t){let f=gt(u.properties,"after"),d=n.entityMidpoints.get(l),p=n.entityVisualLeftX.get(l);if(!d||p===void 0)continue;let m={x:p,y:d.y};for(let g of f){let v=n.itemArrowSource.get(g),T,_=v===void 0;if(v)T=v;else{let E=n.entityMidpoints.get(g);if(!E)continue;T={x:E.x,y:d.y}}!_&&Math.abs(T.y-m.y)<.5&&m.x-T.x<20||(o.push({fromId:g,toId:l,from:T,to:m,isMarkerSource:_}),s.push({fromId:g,toId:l}))}}let a=Wk(o,i),c=[];for(let l=0;l<a.length;l++){let u=a[l];c.push({fromId:s[l].fromId,toId:s[l].toId,waypoints:u.waypoints,kind:u.underBar?"underBar":"normal",style:yt("item",[],n.styleCtx)})}return c}function PG(t,e,r){if(!t)return null;let n=e.scale.forwardWithinDomain(t);if(n===null)return null;let i=e.timeline.box.y,o=e.timeline.tickPanelY,s=gh(r).nowLabel,a=Sn(s,Cu),c=Math.max($_,Math.ceil(a+2*sc)),l=e.timeline.originX-Qr,u=c/2,f;n-u<l?f="flag-right":n+u>e.chartRightX?f="flag-left":f="center";let d=e.timeline.bottomTickPanelY,p=e.timeline.bottomTickPanelHeight??0,m=d!==void 0&&p>0?d+p:e.swimlaneBottomY;return{x:n,topY:o,bottomY:m,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:yt("item",[],e.styleCtx)}}function CG(t){let e=new Map,r=n=>{if(yr(n)){n.name&&e.set(n.name,n);return}if(Vr(n)){for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return}if(Wr(n)){for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return}};for(let n of t)for(let i of n.content)i.$type!=="DescriptionDirective"&&r(i);return e}function NE(t,e,r={}){return new nm().place(t,e,r,{sequenceItem:IE,sequenceOne:kE,resolveChildStart:XP,newCursor:Th,estimateTextWidth:Sn,predictItemChipExtraHeight:GP,computeDateWindow:SG,sizeBesideHeader:AG,collectItems:CG,buildDependencies:NG,buildNowline:PG})}var Ji={person:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 21a8 8 0 0 1 16 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"p"},people:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M22 21v-2a4 4 0 0 0-3-3.87" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 3.13a4 4 0 0 1 0 7.75" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"P"},points:{viewBox:"0 0 24 24",body:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linejoin="round"/>',ascii:"*"},time:{viewBox:"0 0 24 24",body:'<line x1="10" x2="14" y1="2" y2="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="12" x2="15" y1="14" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="14" r="8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"t"}},OG={calendar:{viewBox:"0 0 24 24",body:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="16" x2="16" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="8" x2="8" y1="2" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="3" x2="21" y1="10" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',ascii:"d"}},jP={...Ji,...OG};var xse={none:"",multiplier:"x",person:Ji.person.ascii,people:Ji.people.ascii,points:Ji.points.ascii,time:Ji.time.ascii};var lm=class{constructor(e="nl"){de(this,"prefix");de(this,"counter",0);this.prefix=e}next(e){let r=`${this.prefix}-${this.counter++}`;return e?`${r}-${e}`:r}};var LG=new Set(["svg","g","defs","symbol","use","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","linearGradient","radialGradient","stop","clipPath","mask","pattern","filter","feGaussianBlur","feColorMatrix","feOffset","feMerge","feMergeNode","feFlood","feComposite","feBlend","feDropShadow","image"]),DG=new Set(["d","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","viewBox","preserveAspectRatio","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","opacity","transform","points","id","class","clip-path","mask","filter","font-family","font-size","font-weight","font-style","text-anchor","dx","dy","rotate","letter-spacing","word-spacing","style","xmlns","href","xlink:href","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","maskUnits","maskContentUnits","stdDeviation","values","in","in2","mode","type","result","flood-color","flood-opacity","patternUnits","patternContentUnits","role","aria-label"]);function $G(t){let e=[],r=0,n=t.length;for(;r<n;){if(t[r]!=="<"){let u=r;for(;r<n&&t[r]!=="<";)r++;let f=t.slice(u,r);f.trim().length>0?e.push({kind:"text",text:f}):f.length>0&&e.push({kind:"text",text:f});continue}if(t.startsWith("<!--",r)){let u=t.indexOf("-->",r+4);if(u<0)break;e.push({kind:"comment",text:t.slice(r+4,u)}),r=u+3;continue}if(t.startsWith("<![CDATA[",r)){let u=t.indexOf("]]>",r+9);if(u<0)break;e.push({kind:"cdata",text:t.slice(r+9,u)}),r=u+3;continue}if(t.startsWith("<?",r)){let u=t.indexOf("?>",r+2);if(u<0)break;e.push({kind:"decl",text:t.slice(r+2,u)}),r=u+2;continue}if(t.startsWith("<!",r)){let u=t.indexOf(">",r+2);if(u<0)break;e.push({kind:"decl",text:t.slice(r+2,u)}),r=u+1;continue}if(t[r+1]==="/"){let u=t.indexOf(">",r+2);if(u<0)break;let f=t.slice(r+2,u).trim();e.push({kind:"close",name:f}),r=u+1;continue}let i=MG(t,r);if(i<0)break;let o=t.slice(r+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=FG(a);e.push({kind:s?"self":"open",name:c,attrs:l}),r=i+1}return e}function MG(t,e){let r=e+1,n=null;for(;r<t.length;){let i=t[r];if(n)i===n&&(n=null);else if(i==='"'||i==="'")n=i;else if(i===">")return r;r++}return-1}function FG(t){let e=0;for(;e<t.length&&/\s/.test(t[e]);)e++;let r=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.slice(r,e),i={};for(;e<t.length;){for(;e<t.length&&/\s/.test(t[e]);)e++;if(e>=t.length)break;let o=e;for(;e<t.length&&t[e]!=="="&&!/\s/.test(t[e]);)e++;let s=t.slice(o,e);if(e>=t.length||t[e]!=="="){s&&(i[s]="");continue}if(e++,e>=t.length)break;let a=t[e];if(a!=='"'&&a!=="'"){let l=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;i[s]=t.slice(l,e);continue}e++;let c=e;for(;e<t.length&&t[e]!==a;)e++;i[s]=t.slice(c,e),e<t.length&&e++}return{name:n,attrs:i}}function Ku(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function UG(t,e){if(t.startsWith("#")){let r=e.get(t.slice(1));return r?`#${r}`:null}if(/^url\(#[^)]+\)$/.test(t)){let r=t.slice(5,-1),n=e.get(r);return n?`url(#${n})`:null}return null}function zP(t,e={}){let r=e.idPrefix??"nl-logo",n=e.onWarn??(()=>{}),i=$G(t),o=new Map,s=0;for(let l of i)if((l.kind==="open"||l.kind==="self")&&l.attrs&&"id"in l.attrs){let u=l.attrs.id;u&&!o.has(u)&&o.set(u,`${r}-${s++}`)}let a=[],c=[];for(let l of i)if(l.kind!=="comment"&&l.kind!=="decl"){if(l.kind==="cdata"){c[c.length-1]&&a.push(Ku(l.text??""));continue}if(l.kind==="text"){if(c.length===0||c[c.length-1]){let u=(l.text??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");a.push(u)}continue}if(l.kind==="open"||l.kind==="self"){let u=l.name??"";if(u==="script"||u==="foreignObject"||u==="animate"||u==="animateTransform"||u==="animateMotion"||u==="set"){n(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!LG.has(u)){n(`sanitizer: dropping unknown element <${u}>`),l.kind==="open"&&c.push(!1);continue}let f=[`<${u}`],d=Object.keys(l.attrs??{}).sort();for(let p of d){let m=l.attrs[p];if(/^on/i.test(p)){n(`sanitizer: dropping event handler ${p}`);continue}if(!DG.has(p)){n(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=UG(m,o);if(g===null){n(`sanitizer: dropping external href ${m}`);continue}f.push(` ${p}="${Ku(g)}"`);continue}if(p==="style"){n("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(m);g&&f.push(` id="${Ku(g)}"`);continue}if(/\burl\(#/i.test(m)){let g=m.replace(/url\(#([^)]+)\)/gi,(v,T)=>{let _=o.get(T);return _?`url(#${_})`:"none"});f.push(` ${p}="${Ku(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(m)){n(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${Ku(m)}"`)}f.push(l.kind==="self"?"/>":">"),a.push(f.join("")),l.kind==="open"&&c.push(!0);continue}l.kind==="close"&&c.pop()&&a.push(`</${l.name}>`)}return a.join("")}var qP=/&/g,WP=/</g,VP=/>/g,BG=/"/g,GG=/'/g;function lr(t){return t.replace(qP,"&amp;").replace(WP,"&lt;").replace(VP,"&gt;")}function ei(t){return t.replace(qP,"&amp;").replace(WP,"&lt;").replace(VP,"&gt;").replace(BG,"&quot;").replace(GG,"&#39;")}function Ec(t){let e=Object.keys(t).sort(),r=[];for(let n of e){let i=t[n];i==null||i===!1||(i===!0?r.push(n):r.push(`${n}="${ei(String(i))}"`))}return r.length?` ${r.join(" ")}`:""}function Q(t,e,r){return r===void 0||r===""?`<${t}${Ec(e)}/>`:`<${t}${Ec(e)}>${r}</${t}>`}function Le(t,e){return`<text${Ec(t)}>${lr(e)}</text>`}function h(t){return Number.isFinite(t)?Number.isInteger(t)?t.toString():(Math.round(t*100)/100).toString():"0"}var XG={none:{dx:0,dy:0,stdDeviation:0,opacity:0},subtle:{dx:0,dy:1,stdDeviation:1.5,opacity:.2},soft:{dx:0,dy:3,stdDeviation:5,opacity:.3},hard:{dx:2,dy:2,stdDeviation:0,opacity:.45}};function HG(t,e){let r=`${t}-shadow-${e}`,n=XG[e],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${n.stdDeviation}"/><feOffset dx="${n.dx}" dy="${n.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${n.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return Q("filter",{id:r,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function YP(t,e){return e==="none"?null:`url(#${t}-shadow-${e})`}function KP(t){return["subtle","soft","hard"].map(e=>HG(t,e)).join("")}var VG={thin:100,light:300,normal:400,bold:700};function YG(t){return ic[t]??14}function CE(t,e){return{"font-family":je[t.font],"font-size":e??YG(t.textSize),"font-weight":VG[t.weight]??400,"font-style":t.italic?"italic":"normal",fill:t.text}}function KG(t){if(t.border==="dashed")return"4 3";if(t.border==="dotted")return"1 3"}function ZG(t){if(!t||t==="none"||t==="transparent")return 1;let e=t.startsWith("#")?t.slice(1):t;if(e.length===3&&(e=e.split("").map(s=>s+s).join("")),e.length!==6)return 1;let r=parseInt(e.slice(0,2),16)/255,n=parseInt(e.slice(2,4),16)/255,i=parseInt(e.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(r)+.7152*o(n)+.0722*o(i)}function JG(t,e){return ZG(t)>=.24?e.statusDot.onLight:e.statusDot.onDark}function PE(t,e){return t.length*e*.58}function eC(t,e,r,n,i,o,s){let a=i*.58,c=e?PE(e,i):0,l=e?a:0,u=r+c+l,{text:f,icon:d}=t,p=PE(f,i),m={"font-family":o,"font-size":i,fill:s};if(!d)return Le({x:h(u),y:h(n),...m},f);if(d.kind==="builtin"&&d.name==="multiplier")return Le({x:h(u),y:h(n),...m},`${f}\xD7`);if(d.kind==="builtin"){let v=Ji[d.name],T=Le({x:h(u),y:h(n),...m},f),_=i*.1,E=i,I=u+p+_,D=n-i*.85,k=`<svg x="${h(I)}" y="${h(D)}" width="${h(E)}" height="${h(E)}" viewBox="${v.viewBox}" style="color:${ei(s)}" aria-hidden="true">${v.body}</svg>`;return T+k}let g=h(i*.1);return`<text x="${h(u)}" y="${h(n)}" font-family="${ei(o)}" font-size="${i}" fill="${ei(s)}">${lr(f)}<tspan dx="${g}">${lr(d.text)}</tspan></text>`}var ZP=.6,QG=.5;function eX(t){let{metaText:e,capacity:r,x:n,baselineY:i,fontSize:o,fontFamily:s,color:a}=t;if(!e&&!r)return"";let c={"font-family":s,"font-size":o,fill:a};if(!r)return Le({x:h(n),y:h(i),...c},e);if(!e)return eC(r,void 0,n,i,o,s,a);let l=h(o*ZP),u=`<text x="${h(n)}" y="${h(i)}" font-family="${ei(s)}" font-size="${o}" fill="${ei(a)}">`,{text:f,icon:d}=r;if(!d)return u+lr(e)+`<tspan dx="${l}">${lr(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+lr(e)+`<tspan dx="${l}">${lr(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let k=h(o*.1);return u+lr(e)+`<tspan dx="${l}">${lr(f)}</tspan><tspan dx="${k}">${lr(d.text)}</tspan></text>`}let p=Ji[d.name],m=k=>k.length*o*QG,g=n+m(e)+o*ZP,v=o*.1,T=o,_=g+m(f)+v,E=i-o*.85,I=u+lr(e)+`<tspan dx="${l}">${lr(f)}</tspan></text>`,D=`<svg x="${h(_)}" y="${h(E)}" width="${h(T)}" height="${h(T)}" viewBox="${p.viewBox}" style="color:${ei(a)}" aria-hidden="true">${p.body}</svg>`;return I+D}function tX(t,e){let r=jP.calendar,n=`<svg x="${h(t.glyphTopLeft.x)}" y="${h(t.glyphTopLeft.y)}" width="${h(t.glyphSize)}" height="${h(t.glyphSize)}" viewBox="${r.viewBox}" style="color:${ei(e)}" aria-hidden="true">${r.body}</svg>`,i=`<title>${lr(t.isoDate)}</title>`;return Q("g",{"data-layer":"inline-date-pin","data-side":t.side,"data-date":t.isoDate,"data-spilled":t.spilled?"true":null},i+n)}function OE(t,e){return!t||t.length===0?"":t.map(r=>tX(r,e)).join("")}function rX(t,e,r,n,i,o={}){let s=Math.min(_h[i.cornerRadius]??4,n/2);return Q("rect",{x:h(t),y:h(e),width:h(r),height:h(n),rx:h(s),ry:h(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":KG(i)??null,...o})}function nX(t,e,r){let n=t.box.x+t.cardBox.x,i=t.box.y+t.cardBox.y,o=t.cardBox.width,s=t.cardBox.height,a=t.style.bg==="none"?r.surface.headerBox:t.style.bg,c=r.header.cardBorder,l=Q("rect",{x:h(n),y:h(i),width:h(o),height:h(s),rx:6,ry:6,fill:a,stroke:c,"stroke-width":1,filter:`url(#${e}-shadow-subtle)`}),u=[];t.titleLines.forEach((v,T)=>{u.push(Le({x:h(n+16),y:h(i+26+T*20),"font-family":je[t.style.font],"font-size":16,"font-weight":600,fill:t.style.text},v))});let f=u.join(""),d=i+26+Math.max(0,t.titleLines.length-1)*20,p=r.header.author,m=[];t.authorLines.forEach((v,T)=>{m.push(Le({x:h(n+16),y:h(d+18+T*14),"font-family":je[t.style.font],"font-size":11,fill:p},v))});let g=m.join("");return Q("g",{"data-layer":"header","data-id":`${e}-header`},l+f+g)}function iX(t,e,r){let n=r.timeline.gridLine,i=r.timeline.minorGridLine,o=t.bottomTickPanelHeight??0,s=t.bottomTickPanelY!==void 0&&o>0,a=t.tickPanelY,c=s?t.bottomTickPanelY+o:t.box.y+t.box.height,l=e,u=t.box.y+t.box.height,f=[];for(let d of t.ticks)if(d.major)f.push(Q("line",{x1:h(d.x),y1:h(a),x2:h(d.x),y2:h(c),stroke:n,"stroke-width":1}));else if(t.minorGrid){if(d.labelX===void 0)continue;f.push(Q("line",{x1:h(d.x),y1:h(l),x2:h(d.x),y2:h(u),stroke:i,"stroke-width":1}))}return Q("g",{"data-layer":"grid"},f.join(""))}function oX(t,e){let r=e.timeline.panelFill,n=e.timeline.border,i=e.timeline.labelText,o=[],s=t.tickPanelY,a=t.tickPanelHeight,c=a>0,l=t.markerRow.height>0,u=s+a,f=t.markerRow.height,d=t.bottomTickPanelY,p=t.bottomTickPanelHeight??0,m=d!==void 0&&p>0;c&&o.push(Q("rect",{x:h(t.box.x),y:h(s),width:h(t.box.width),height:h(a),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1})),l&&o.push(Q("rect",{x:h(t.box.x),y:h(u),width:h(t.box.width),height:h(f),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1})),m&&o.push(Q("rect",{x:h(t.box.x),y:h(d),width:h(t.box.width),height:h(p),rx:4,ry:4,fill:r,stroke:n,"stroke-width":1}));for(let g of t.ticks)g.major&&(!g.label||g.labelX===void 0||(c&&o.push(Le({x:h(g.labelX),y:h(s+Eh),"font-family":je.sans,"font-size":10,fill:i,"text-anchor":"middle"},g.label)),m&&o.push(Le({x:h(g.labelX),y:h(d+Eh),"font-family":je.sans,"font-size":10,fill:i,"text-anchor":"middle"},g.label))));return Q("g",{"data-layer":"timeline"},o.join(""))}function sX(t,e){if(!t)return"";let r=e.nowline.stroke,n=e.nowline.labelText,i=Q("line",{x1:h(t.x),y1:h(t.topY),x2:h(t.x),y2:h(t.bottomY),stroke:r,"stroke-width":Ah}),o=aX(t,r),s=cX(t,n);return Q("g",{"data-layer":"nowline"},i+o+s)}function tC(t){let e=Ah/2;return t.pillMode==="flag-right"?t.x-e:t.pillMode==="flag-left"?t.x+e:t.x}function aX(t,e){let r=t.pillTopY,n=t.pillTopY+qi,i=M_,o=t.pillWidth;if(t.pillMode==="center")return Q("rect",{x:h(t.x-o/2),y:h(r),width:h(o),height:h(qi),rx:i,ry:i,fill:e});let s=tC(t);if(t.pillMode==="flag-right"){let l=s+o,u=[`M ${h(s)} ${h(r)}`,`L ${h(l-i)} ${h(r)}`,`A ${i} ${i} 0 0 1 ${h(l)} ${h(r+i)}`,`L ${h(l)} ${h(n-i)}`,`A ${i} ${i} 0 0 1 ${h(l-i)} ${h(n)}`,`L ${h(s)} ${h(n)}`,"Z"].join(" ");return Q("path",{d:u,fill:e})}let a=s-o,c=[`M ${h(s)} ${h(r)}`,`L ${h(a+i)} ${h(r)}`,`A ${i} ${i} 0 0 0 ${h(a)} ${h(r+i)}`,`L ${h(a)} ${h(n-i)}`,`A ${i} ${i} 0 0 0 ${h(a+i)} ${h(n)}`,`L ${h(s)} ${h(n)}`,"Z"].join(" ");return Q("path",{d:c,fill:e})}function cX(t,e){let r=t.pillTopY+F_,n=tC(t),i,o;return t.pillMode==="center"?(i=t.x,o="middle"):t.pillMode==="flag-right"?(i=n+sc,o="start"):(i=n-sc,o="end"),Le({x:h(i),y:h(r),"font-family":je.sans,"font-size":Cu,"font-weight":700,fill:e,"text-anchor":o},t.label)}function lX(t,e,r,n){let i=[],o=YP(r,t.style.shadow);i.push(rX(t.box.x,t.box.y,t.box.width,t.box.height,t.style,{filter:o??null}));let s=JG(t.style.bg,n),a={done:s.done,"in-progress":s.inProgress,"at-risk":s.atRisk,blocked:s.blocked,planned:s.planned,neutral:s.neutral},c=a[t.status]??a.neutral;if(t.progressFraction>0){let g=Math.max(0,Math.min(t.box.width,t.box.width*t.progressFraction));i.push(Q("rect",{x:h(t.box.x),y:h(t.box.y+t.box.height-Rn),width:h(g),height:Rn,fill:t.style.fg,opacity:.55}))}let l=t.dotSpills&&t.dotSpillCx!==null?t.dotSpillCx:t.box.x+t.box.width-12;i.push(Q("circle",{cx:h(l),cy:h(t.box.y+12),r:5,fill:c})),i.push(OE(t.inlineDatePins,t.style.fg));let u;t.textSpills?(u=t.box.x+t.box.width+6,t.iconSpills&&(u+=18)):u=t.box.x+12;let f=t.style.text,d=n.entities.item.text,p=t.textSpills?d:f,m=t.textSpills?d:t.style.fg;if(t.title&&i.push(Le({x:h(u),y:h(t.box.y+20),"font-family":je[t.style.font],"font-size":13,"font-weight":600,fill:p},t.title)),(t.metaText||t.capacity)&&i.push(eX({metaText:t.metaText,capacity:t.capacity,x:u,baselineY:t.box.y+38,fontSize:11,fontFamily:je[t.style.font],color:m})),t.footnoteIndicators.length>0){let g=t.box.y+14;if(t.footnoteSpills&&t.footnoteSpillStartX!==null){let v=t.footnoteSpillStartX;for(let T=0;T<t.footnoteIndicators.length;T++){let _=t.footnoteIndicators[T];i.push(Le({x:h(v),y:h(g),"font-family":je.sans,"font-size":10,"font-weight":700,fill:d},String(_))),v+=8}}else{let v=t.box.x+t.box.width-22;for(let T=t.footnoteIndicators.length-1;T>=0;T--){let _=t.footnoteIndicators[T];i.push(Le({x:h(v),y:h(g),"font-family":je.sans,"font-size":10,"font-weight":700,fill:t.style.text,"text-anchor":"end"},String(_))),v-=8}}}if(!e.noLinks&&t.linkIcon&&t.linkIcon!=="none"){let g={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:n.item.linkIconFg},v=g[t.linkIcon]??g.generic,T=14,_=t.iconSpills&&t.iconSpillX!==null?t.iconSpillX:t.box.x+6,E=t.box.y+6,I=Q("rect",{x:h(_),y:h(E),width:T,height:T,rx:2,ry:2,fill:v}),D=_,k=E,B=Q("path",{d:`M${h(D+4)} ${h(k+10)} L${h(D+10)} ${h(k+4)} M${h(D+6)} ${h(k+4)} H${h(D+10)} V${h(k+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),U=I+B,z=t.linkHref?Q("a",{href:t.linkHref,target:"_blank",rel:"noopener"},U):U;i.push(z)}if(t.hasOverflow&&t.overflowBox){let g=n.item.overflowTailFill,v=n.item.overflowTailStroke,T=n.item.overflowCaption;i.push(Q("rect",{x:h(t.overflowBox.x),y:h(t.overflowBox.y),width:h(t.overflowBox.width),height:h(t.overflowBox.height),fill:g,stroke:v,"stroke-width":1})),t.overflowAnchorId&&t.overflowBox.width>60&&i.push(Le({x:h(t.overflowBox.x+t.overflowBox.width/2),y:h(t.overflowBox.y+t.overflowBox.height/2+3),"font-family":je.sans,"font-size":9,"font-weight":700,fill:T,"text-anchor":"middle"},`past ${t.overflowAnchorId}`))}for(let g of t.labelChips){let v=Math.min(_h[g.style.cornerRadius]??8,g.box.height/2);i.push(Q("rect",{x:h(g.box.x),y:h(g.box.y),width:h(g.box.width),height:h(g.box.height),rx:h(v),ry:h(v),fill:g.style.bg==="none"?"transparent":g.style.bg,stroke:g.style.fg,"stroke-width":.5})),i.push(Le({x:h(g.box.x+g.box.width/2),y:h(g.box.y+g.box.height/2+3),...CE(g.style,ic.xs),"text-anchor":"middle"},g.text))}return Q("g",{"data-layer":"item","data-id":t.id??null},i.join(""))}function uX(t,e,r,n){let i=[];if(t.style.bg!=="none"&&t.style.bg!=="#ffffff"){if(i.push(Q("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),rx:6,ry:6,fill:t.style.bg,stroke:t.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${r}-shadow-subtle)`})),t.title){let s=t.title.length*L_+2*bh,a=t.box.x,c=t.box.y,l=Pu,u=6,f=`M${h(a+u)} ${h(c)}H${h(a+s)}V${h(c+l-u)}A${u} ${u} 0 0 1 ${h(a+s-u)} ${h(c+l)}H${h(a)}V${h(c+u)}A${u} ${u} 0 0 1 ${h(a+u)} ${h(c)}Z`;i.push(Q("path",{d:f,fill:t.style.fg})),i.push(Le({x:h(a+bh),y:h(c+C_),"font-family":je[t.style.font],"font-size":O_,"font-weight":600,fill:"#ffffff"},t.title))}}else{let s=t.style.fg;if(t.style.bracket!=="none"){let c=t.box.y+t.box.height,l=t.style.bracket==="dashed"?"3 2":null,u=t.title?`M${h(t.box.x+4)} ${h(t.box.y-oc)} L${h(t.box.x)} ${h(t.box.y-oc)} L${h(t.box.x)} ${h(c)} L${h(t.box.x+4)} ${h(c)}`:`M${h(t.box.x)} ${h(t.box.y)} L${h(t.box.x)} ${h(c)} L${h(t.box.x+4)} ${h(c)}`;i.push(Q("path",{d:u,fill:"none",stroke:s,"stroke-width":1,"stroke-dasharray":l}))}t.title&&i.push(Le({x:h(t.box.x+6),y:h(t.box.y-2),...CE(t.style,ic.xs),"fill-opacity":.7},t.title))}i.push(OE(t.inlineDatePins,t.style.fg));for(let s of t.children)i.push(LE(s,e,r,n));return Q("g",{"data-layer":"group","data-id":t.id??null},i.join(""))}function fX(t,e,r,n){let i=[];if(t.style.bracket==="solid"||t.style.bracket==="dashed"){let a=t.box.y-12,c=t.box.y+t.box.height+12,l=t.box.x,u=t.box.x+t.box.width,f=n.parallel.bracketStroke;i.push(Q("path",{d:`M${h(l+4)} ${h(a)} H${h(l)} V${h(c)} H${h(l+4)}`,fill:"none",stroke:f,"stroke-width":1.25,"stroke-dasharray":t.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),i.push(Q("path",{d:`M${h(u-4)} ${h(a)} H${h(u)} V${h(c)} H${h(u-4)}`,fill:"none",stroke:f,"stroke-width":1.25,"stroke-dasharray":t.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}t.title&&i.push(Le({x:h(t.box.x+4),y:h(t.box.y-2),...CE(t.style,ic.xs),"fill-opacity":.7},t.title)),i.push(OE(t.inlineDatePins,t.style.fg));for(let o of t.children)i.push(LE(o,e,r,n));return Q("g",{"data-layer":"parallel","data-id":t.id??null},i.join(""))}function LE(t,e,r,n){return t.kind==="item"?lX(t,e,r,n):t.kind==="group"?uX(t,e,r,n):fX(t,e,r,n)}var JP=2;function dX(t,e){switch(t){case"green":return e.swimlane.utilizationOk;case"yellow":return e.swimlane.utilizationWarn;case"red":return e.swimlane.utilizationOver}}function pX(t,e){if(!t.utilization||t.utilization.segments.length===0)return"";let r=t.box.y+t.box.height-JP,n=t.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":Q("rect",{x:h(i.startX),y:h(r),width:h(o),height:JP,fill:dX(i.classification,e),"data-utilization":i.classification,"data-load":h(i.load)})});return Q("g",{"data-layer":"lane-utilization","data-id":t.id??null},n.join(""))}function hX(t,e){let r=t.bandIndex%2===0?e.swimlane.rowTintEven:e.swimlane.rowTintOdd,n=e.swimlane.border;return Q("g",{"data-layer":"swimlane-bg","data-id":t.id??null},Q("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),fill:r,stroke:n,"stroke-width":1}))}function rC(t,e,r,n){let i=n.swimlane.tabFill,o=n.swimlane.tabStroke,s=n.swimlane.tabText,a=n.swimlane.ownerText,c=n.swimlane.footnoteIndicator,l=[];if(t.title){let f=t.capacity?Vo(t.capacity.text,t.capacity.icon,10):0,d=t.footnoteIndicators.length>0?t.footnoteIndicators.join(","):"",p=d?PE(d,10):0,m=Ru(t.box.x,t.title,t.owner,f,p),g=vh,v=t.box.y+10,T=v+Rh;l.push(Q("rect",{x:h(m.tabX),y:h(v),width:h(m.tabW),height:h(g),rx:4,ry:4,fill:i,stroke:o,"stroke-width":1})),l.push(Le({x:h(m.titleX),y:h(T),"font-family":je[t.style.font],"font-size":12,"font-weight":600,fill:s},t.title)),t.owner&&l.push(Le({x:h(m.ownerX),y:h(T),"font-family":je[t.style.font],"font-size":10,fill:a},`owner: ${t.owner}`)),t.capacity&&l.push(eC(t.capacity,void 0,m.badgeX,T,10,je[t.style.font],a)),d&&l.push(Le({x:h(m.footnoteRightX),y:h(v+14),"font-family":je.sans,"font-size":10,"font-weight":700,fill:c,"text-anchor":"end"},d))}for(let u of t.children)l.push(LE(u,e,r,n));return l.push(pX(t,n)),Q("g",{"data-layer":"swimlane","data-id":t.id??null},l.join(""))}function mX(t,e){let r=t.radius,n=t.center.x,i=t.center.y,o=e.anchorDiamond.fill,s=e.anchorDiamond.stroke,a=Q("path",{d:`M${h(n)} ${h(i-r)} L${h(n+r)} ${h(i)} L${h(n)} ${h(i+r)} L${h(n-r)} ${h(i)} Z`,fill:o,stroke:s,"stroke-width":1.25}),c=e.anchorDiamond.label,l=t.labelSide==="left"?t.labelBox.x+t.labelBox.width:t.labelBox.x,u={x:h(l),y:h(i+4),"font-family":je.sans,"font-size":10,fill:c};t.labelSide==="left"&&(u["text-anchor"]="end");let f=t.title?Le(u,t.title):"";return Q("g",{"data-layer":"anchor","data-id":t.id??null},a+f)}function gX(t,e){let r=e.anchorDiamond.cutLine;return Q("line",{x1:h(t.center.x),y1:h(t.center.y+t.radius+1),x2:h(t.center.x),y2:h(t.cutBottomY),stroke:r,"stroke-width":1,"stroke-dasharray":"1 3"})}function yX(t,e){let r=t.center.x,n=t.center.y,i=t.radius,o=e.milestoneDiamond.fill,s=Q("path",{d:`M${h(r)} ${h(n-i)} L${h(r+i)} ${h(n)} L${h(r)} ${h(n+i)} L${h(r-i)} ${h(n)} Z`,fill:o,stroke:o,"stroke-width":1}),a=e.milestoneDiamond.label,c=t.labelSide==="left"?t.labelBox.x+t.labelBox.width:t.labelBox.x,l={x:h(c),y:h(n+4),"font-family":je.sans,"font-size":10,"font-weight":600,fill:a};t.labelSide==="left"&&(l["text-anchor"]="end");let u=t.title?Le(l,t.title):"";return Q("g",{"data-layer":"milestone","data-id":t.id??null},s+u)}function xX(t,e){let r=t.isOverrun?e.milestoneDiamond.cutLineOverrun:e.milestoneDiamond.cutLineNormal,n=[];if(n.push(Q("line",{x1:h(t.center.x),y1:h(t.center.y+t.radius+1),x2:h(t.center.x),y2:h(t.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":wh,"stroke-linecap":"round"})),t.slackArrows&&t.slackArrows.length>0){let i=e.milestoneDiamond.slack;for(let o of t.slackArrows)n.push(Q("path",{d:`M${h(o.x)} ${h(o.y)} H${h(t.center.x-6)}`,fill:"none",stroke:i,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":"url(#nl-arrow-dark)"}))}return n.join("")}function QP(t,e){let r=t.kind==="overflow"?e.dependency.overflowStroke:e.dependency.edgeStroke,n=t.waypoints;if(n.length<2)return"";let i=t.kind==="underBar"?.8:1.1;return Q("path",{d:TX(n,z_),fill:"none",stroke:r,"stroke-width":i,"stroke-dasharray":t.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":"url(#nl-arrow)"})}function TX(t,e){if(t.length<2)return"";let r=[`M${h(t[0].x)} ${h(t[0].y)}`];for(let n=1;n<t.length;n++){let i=t[n-1],o=t[n];if(n===t.length-1){r.push(`L${h(o.x)} ${h(o.y)}`);continue}let s=t[n+1],a=Math.sign(o.x-i.x),c=Math.sign(o.y-i.y),l=Math.sign(s.x-o.x),u=Math.sign(s.y-o.y),f=Math.hypot(o.x-i.x,o.y-i.y),d=Math.hypot(s.x-o.x,s.y-o.y),p=Math.min(e,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){r.push(`L${h(o.x)} ${h(o.y)}`);continue}let m={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};r.push(`L${h(m.x)} ${h(m.y)}`),r.push(`Q${h(o.x)} ${h(o.y)} ${h(g.x)} ${h(g.y)}`)}return r.join(" ")}function _X(t,e,r){if(t.entries.length===0)return"";let n=r.footnotePanel.fill,i=r.footnotePanel.border,o=r.footnotePanel.header,s=r.footnotePanel.title,a=r.footnotePanel.description,c=r.footnotePanel.number,l=[];l.push(Q("rect",{x:h(t.box.x),y:h(t.box.y),width:h(t.box.width),height:h(t.box.height),rx:6,ry:6,fill:n,stroke:i,"stroke-width":1,filter:`url(#${e}-shadow-subtle)`})),l.push(Le({x:h(t.box.x+en),y:h(t.box.y+B_),"font-family":je.sans,"font-size":12,"font-weight":700,fill:o},"Footnotes"));let u=t.box.y+Ou+en,f=t.box.x+en,d=f+en;return t.entries.forEach((p,m)=>{let g=u+m*Lu;l.push(Le({x:h(f),y:h(g),"font-family":je.sans,"font-size":10,"font-weight":700,fill:c},String(p.number))),l.push(Le({x:h(d),y:h(g),"font-family":je.sans,"font-size":11,"font-weight":600,fill:s},p.title)),p.description&&l.push(Le({x:h(d+Math.max(120,p.title.length*6)),y:h(g),"font-family":je.sans,"font-size":11,fill:a},`\u2014 ${p.description}`))}),Q("g",{"data-layer":"footnotes"},l.join(""))}function EX(t,e,r,n){let i=n.includeRegion.border,o=n.includeRegion.fill,s=n.includeRegion.tabFill,a=n.includeRegion.tabStroke,c=n.includeRegion.tabText,l=n.includeRegion.badgeFill,u=n.includeRegion.badgeStroke,f=n.includeRegion.badgeText,d=t.box.x+8,p=t.box.y,m=t.box.width-16,g=t.box.height,v=Q("rect",{x:h(d),y:h(p),width:h(m),height:h(g),rx:8,ry:8,fill:o,stroke:i,"stroke-width":1,"stroke-dasharray":wh}),T=vh,_=bu(t.box.x,t.label,t.sourcePath),E=p-T/2,I=Q("rect",{x:h(_.tabX),y:h(E),width:h(_.tabWidth),height:T,rx:4,ry:4,fill:s,stroke:a,"stroke-width":1}),D=Le({x:h(_.tabLabelX),y:h(E+Rh),"font-family":je.sans,"font-size":11,"font-weight":600,fill:c},t.label),k=_.badgeX,B=_.badgeSize,U=p-B/2,z=Q("rect",{x:h(k),y:h(U),width:B,height:B,rx:4,ry:4,fill:l,stroke:u,"stroke-width":1}),le=Q("path",{d:`M${h(k+7)} ${h(U+4)} H${h(k+14)} V${h(U+11)} M${h(k+4)} ${h(U+7)} H${h(k+11)} V${h(U+14)} H${h(k+4)} Z`,stroke:f,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),O=9,R=p+4,L=Q("rect",{x:h(_.sourceHaloX),y:h(R-O),width:h(_.sourceHaloWidth),height:O+6,fill:o}),$=Le({x:h(_.sourceTextX),y:h(R),"font-family":je.mono,"font-size":O,fill:f},t.sourcePath),w=t.nestedSwimlanes.map(A=>rC(A,e,r,n)).join("");return Q("g",{"data-layer":"include"},v+w+I+D+z+le+L+$)}function vX(t){let e=t.palette.attribution.mark,r=t.palette.attribution.link;if(t.swimlanes.length===0)return"";let n=t.header.attributionBox.x,i=t.header.attributionBox.y,o=Wi,s=Le({x:"0",y:o,"font-family":je.sans,"font-size":kh,"font-weight":400,fill:e},Ih)+Le({x:$u,y:o,"font-family":je.sans,"font-size":Wi,"font-weight":700,fill:e},"now")+Q("rect",{x:X_,y:12,width:H_,height:Wi,fill:r})+Le({x:Nh,y:o,"font-family":je.sans,"font-size":Wi,"font-weight":400,fill:e},"ine"),a=Q("g",{transform:`translate(${h(n)} ${h(i)}) scale(${h(Du)})`},s);return Q("a",{href:G_,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},Q("g",{"data-layer":"attribution"},a))}async function RX(t,e,r,n,i,o,s){if(!e)return"";let a;try{a=await e(t)}catch(u){let f=`logo: failed to load ${t}: ${u instanceof Error?u.message:String(u)}`;if(n.strict)throw u;return n.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=zP(u,{idPrefix:`${r}-logo`,onWarn:n.warn});return Q("g",{transform:`translate(${h(i)} ${h(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=bX(a.bytes);return Q("image",{href:`data:${c};base64,${u}`,x:h(i),y:h(o),width:h(s),height:h(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${t}`;if(n.strict)throw new Error(l);return n.warn?.(l),""}function bX(t){if(typeof btoa<"u"){let r="";for(let n=0;n<t.length;n++)r+=String.fromCharCode(t[n]);return btoa(r)}let e=globalThis;if(e.Buffer)return e.Buffer.from(t).toString("base64");throw new Error("renderer: no base64 encoder available")}async function DE(t,e={}){let n=new lm(e.idPrefix??"nl").next("root"),i=t.palette,o=[],s=i.arrowhead.neutral,a=i.arrowhead.light,c=i.arrowhead.dark,l=(d,p)=>`<marker id="${d}" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${p}"/></marker>`,u=`<defs>${KP(n)}`+l("nl-arrow",s)+l("nl-arrow-light",a)+l("nl-arrow-dark",c)+"</defs>";o.push(u),o.push(Q("rect",{x:0,y:0,width:h(t.width),height:h(t.height),fill:t.backgroundColor})),o.push(oX(t.timeline,i));for(let d of t.swimlanes)o.push(hX(d,i));o.push(iX(t.timeline,t.chartBox.y,i));for(let d of t.edges)d.kind==="underBar"&&o.push(QP(d,i));for(let d of t.swimlanes)o.push(rC(d,e,n,i));for(let d of t.includes)o.push(EX(d,e,n,i));for(let d of t.edges)d.kind!=="underBar"&&o.push(QP(d,i));for(let d of t.anchors)o.push(gX(d,i));for(let d of t.milestones)o.push(xX(d,i));for(let d of t.anchors)o.push(mX(d,i));for(let d of t.milestones)o.push(yX(d,i));if(o.push(sX(t.nowline,i)),o.push(_X(t.footnotes,n,i)),o.push(nX(t.header,n,i)),o.push(vX(t)),t.header.logo&&e.assetResolver){let d=await RX(t.header.logo.assetRef??"",e.assetResolver,n,e,t.header.logo.box.x,t.header.logo.box.y,Math.max(t.header.logo.box.width,t.header.logo.box.height));d&&o.push(d)}return`<svg${Ec({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${h(t.width)} ${h(t.height)}`,width:h(t.width),height:h(t.height),"data-theme":t.theme,"data-generator":"nowline"})}>${o.join("")}</svg>`}var $E="/browser-source.nowline",um,nC=0;function iC(){return um||(um=v_()),um}function wX(){return ht.parse(`memory:///nowline-browser-${++nC}.nowline`)}async function fm(t,e={}){let r=e.filePath??$E,n=iC(),o=n.shared.workspace.LangiumDocumentFactory.fromString(t,wX());await n.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of gm(o))a.origin==="lexer"?s.push($k(a.error,r)):a.origin==="parser"?s.push(Dk(a.error,r)):s.push(Lk(a.diagnostic,r));return{ast:o.parseResult.value,diagnostics:s}}async function ME(t,e={}){let r=e.filePath??$E,n=await fm(t,{filePath:r});if(n.diagnostics.some(g=>g.severity==="error"))return{kind:"diagnostics",diagnostics:n.diagnostics};let i=iC(),o=e.readFile??Bk,s=await f_(n.ast,r,{services:i.Nowline,readFile:o}),a=[...n.diagnostics];for(let g of s.diagnostics){if(g.severity==="error"&&Gk(g.message)){e.onSkippedInclude?.({sourcePath:g.sourcePath,message:g.message});continue}a.push(Mk(g))}if(a.some(g=>g.severity==="error"))return{kind:"diagnostics",diagnostics:a};let c=e.today===null?void 0:e.today,l=NE(n.ast,s,{theme:e.theme,today:c,locale:e.locale,width:e.width}),u=e.showLinks!==!1,f=e.strict===!0,d=[],p=await DE(l,{idPrefix:e.idPrefix,assetResolver:e.assetResolver,noLinks:!u,strict:f,warn:g=>d.push(g)}),m=d.map(g=>Fk(g,r,f?"error":"warning"));return f&&m.length>0?{kind:"diagnostics",diagnostics:[...a,...m]}:{kind:"svg",svg:p,warnings:m}}function FE(){um=void 0,nC=0}var oC="/embed.nowline",UE=!1;async function sC(t){let{ast:e,diagnostics:r}=await fm(t,{filePath:oC});return{ast:e,errors:r.filter(n=>n.severity==="error").map(n=>n.message)}}async function dm(t,e={}){let r={filePath:oC,theme:e.theme,today:e.today,locale:e.locale,width:e.width,idPrefix:e.idPrefix,onSkippedInclude:()=>{UE||(UE=!0,console.warn("nowline: `include` directives are skipped in the browser embed (single-file mode). Render multi-file roadmaps with the CLI or the GitHub Action."))}},n=await ME(t,r);if(n.kind==="svg")return n.svg;let i=n.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new Zu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var Zu=class extends Error{constructor(r,n){super(r);de(this,"details",n);this.name="EmbedRenderError"}};function aC(){UE=!1,FE()}var nn=Uint8Array,Tr=Uint16Array,jE=Int32Array,zE=new nn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),qE=new nn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),cC=new nn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dC=function(t,e){for(var r=new Tr(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var i=new jE(r[30]),n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return{b:r,r:i}},pC=dC(zE,2),AX=pC.b,GE=pC.r;AX[28]=258,GE[258]=28;var hC=dC(qE,0),Wse=hC.b,lC=hC.r,XE=new Tr(32768);for(Fe=0;Fe<32768;++Fe)ti=(Fe&43690)>>1|(Fe&21845)<<1,ti=(ti&52428)>>2|(ti&13107)<<2,ti=(ti&61680)>>4|(ti&3855)<<4,XE[Fe]=((ti&65280)>>8|(ti&255)<<8)>>1;var ti,Fe,ef=(function(t,e,r){for(var n=t.length,i=0,o=new Tr(e);i<n;++i)t[i]&&++o[t[i]-1];var s=new Tr(e);for(i=1;i<e;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(r){a=new Tr(1<<e);var c=15-e;for(i=0;i<n;++i)if(t[i])for(var l=i<<4|t[i],u=e-t[i],f=s[t[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[XE[f]>>c]=l}else for(a=new Tr(n),i=0;i<n;++i)t[i]&&(a[i]=XE[s[t[i]-1]++]>>15-t[i]);return a}),as=new nn(288);for(Fe=0;Fe<144;++Fe)as[Fe]=8;var Fe;for(Fe=144;Fe<256;++Fe)as[Fe]=9;var Fe;for(Fe=256;Fe<280;++Fe)as[Fe]=7;var Fe;for(Fe=280;Fe<288;++Fe)as[Fe]=8;var Fe,pm=new nn(32);for(Fe=0;Fe<32;++Fe)pm[Fe]=5;var Fe,SX=ef(as,9,0);var IX=ef(pm,5,0);var mC=function(t){return(t+7)/8|0},kX=function(t,e,r){return(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length),new nn(t.subarray(e,r))};var ri=function(t,e,r){r<<=e&7;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8},Ju=function(t,e,r){r<<=e&7;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8,t[n+2]|=r>>16},BE=function(t,e){for(var r=[],n=0;n<t.length;++n)t[n]&&r.push({s:n,f:t[n]});var i=r.length,o=r.slice();if(!i)return{t:yC,l:0};if(i==1){var s=new nn(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(D,k){return D.f-k.f}),r.push({s:-1,f:25001});var a=r[0],c=r[1],l=0,u=1,f=2;for(r[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=r[r[l].f<r[f].f?l++:f++],c=r[l!=u&&r[l].f<r[f].f?l++:f++],r[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,n=1;n<i;++n)o[n].s>d&&(d=o[n].s);var p=new Tr(d+1),m=HE(r[u-1],p,0);if(m>e){var n=0,g=0,v=m-e,T=1<<v;for(o.sort(function(k,B){return p[B.s]-p[k.s]||k.f-B.f});n<i;++n){var _=o[n].s;if(p[_]>e)g+=T-(1<<m-p[_]),p[_]=e;else break}for(g>>=v;g>0;){var E=o[n].s;p[E]<e?g-=1<<e-p[E]++-1:++n}for(;n>=0&&g;--n){var I=o[n].s;p[I]==e&&(--p[I],++g)}m=e}return{t:new nn(p),l:m}},HE=function(t,e,r){return t.s==-1?Math.max(HE(t.l,e,r+1),HE(t.r,e,r+1)):e[t.s]=r},uC=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Tr(++e),n=0,i=t[0],o=1,s=function(c){r[n++]=c},a=1;a<=e;++a)if(t[a]==i&&a!=e)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=t[a]}return{c:r.subarray(0,n),n:e}},Qu=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},gC=function(t,e,r){var n=r.length,i=mC(e+2);t[i]=n&255,t[i+1]=n>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var o=0;o<n;++o)t[i+o+4]=r[o];return(i+4+n)*8},fC=function(t,e,r,n,i,o,s,a,c,l,u){ri(e,u++,r),++i[256];for(var f=BE(i,15),d=f.t,p=f.l,m=BE(o,15),g=m.t,v=m.l,T=uC(d),_=T.c,E=T.n,I=uC(g),D=I.c,k=I.n,B=new Tr(19),U=0;U<_.length;++U)++B[_[U]&31];for(var U=0;U<D.length;++U)++B[D[U]&31];for(var z=BE(B,7),le=z.t,O=z.l,R=19;R>4&&!le[cC[R-1]];--R);var L=l+5<<3,$=Qu(i,as)+Qu(o,pm)+s,w=Qu(i,d)+Qu(o,g)+s+14+3*R+Qu(B,le)+2*B[16]+3*B[17]+7*B[18];if(c>=0&&L<=$&&L<=w)return gC(e,u,t.subarray(c,c+l));var A,S,M,X;if(ri(e,u,1+(w<$)),u+=2,w<$){A=ef(d,p,0),S=d,M=ef(g,v,0),X=g;var F=ef(le,O,0);ri(e,u,E-257),ri(e,u+5,k-1),ri(e,u+10,R-4),u+=14;for(var U=0;U<R;++U)ri(e,u+3*U,le[cC[U]]);u+=3*R;for(var W=[_,D],Z=0;Z<2;++Z)for(var pe=W[Z],U=0;U<pe.length;++U){var V=pe[U]&31;ri(e,u,F[V]),u+=le[V],V>15&&(ri(e,u,pe[U]>>5&127),u+=pe[U]>>12)}}else A=SX,S=as,M=IX,X=pm;for(var U=0;U<a;++U){var te=n[U];if(te>255){var V=te>>18&31;Ju(e,u,A[V+257]),u+=S[V+257],V>7&&(ri(e,u,te>>23&31),u+=zE[V]);var De=te&31;Ju(e,u,M[De]),u+=X[De],De>3&&(Ju(e,u,te>>5&8191),u+=qE[De])}else Ju(e,u,A[te]),u+=S[te]}return Ju(e,u,A[256]),u+S[256]},NX=new jE([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),yC=new nn(0),PX=function(t,e,r,n,i,o){var s=o.z||t.length,a=new nn(n+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(n,a.length-i),l=o.l,u=(o.r||0)&7;if(e){u&&(c[0]=o.r>>3);for(var f=NX[e-1],d=f>>13,p=f&8191,m=(1<<r)-1,g=o.p||new Tr(32768),v=o.h||new Tr(m+1),T=Math.ceil(r/3),_=2*T,E=function(me){return(t[me]^t[me+1]<<T^t[me+2]<<_)&m},I=new jE(25e3),D=new Tr(288),k=new Tr(32),B=0,U=0,z=o.i||0,le=0,O=o.w||0,R=0;z+2<s;++z){var L=E(z),$=z&32767,w=v[L];if(g[$]=w,v[L]=$,O<=z){var A=s-z;if((B>7e3||le>24576)&&(A>423||!l)){u=fC(t,c,0,I,D,k,U,le,R,z-R,u),le=B=U=0,R=z;for(var S=0;S<286;++S)D[S]=0;for(var S=0;S<30;++S)k[S]=0}var M=2,X=0,F=p,W=$-w&32767;if(A>2&&L==E(z-W))for(var Z=Math.min(d,A)-1,pe=Math.min(32767,z),V=Math.min(258,A);W<=pe&&--F&&$!=w;){if(t[z+M]==t[z+M-W]){for(var te=0;te<V&&t[z+te]==t[z+te-W];++te);if(te>M){if(M=te,X=W,te>Z)break;for(var De=Math.min(W,te-2),Ne=0,S=0;S<De;++S){var Xe=z-W+S&32767,q=g[Xe],J=Xe-q&32767;J>Ne&&(Ne=J,w=Xe)}}}$=w,w=g[$],W+=$-w&32767}if(X){I[le++]=268435456|GE[M]<<18|lC[X];var re=GE[M]&31,P=lC[X]&31;U+=zE[re]+qE[P],++D[257+re],++k[P],O=z+M,++B}else I[le++]=t[z],++D[t[z]]}}for(z=Math.max(z,O);z<s;++z)I[le++]=t[z],++D[t[z]];u=fC(t,c,l,I,D,k,U,le,R,z-R,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=v,o.p=g,o.i=z,o.w=O)}else{for(var z=o.w||0;z<s+l;z+=65535){var we=z+65535;we>=s&&(c[u/8|0]=l,we=s),u=gC(c,u+1,t.subarray(z,we))}o.i=s}return kX(a,0,n+mC(u)+i)};var xC=function(){var t=1,e=0;return{p:function(r){for(var n=t,i=e,o=r.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=n+=r[s];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}t=n,e=i},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},CX=function(t,e,r,n,i){if(!i&&(i={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),s=new nn(o.length+t.length);s.set(o),s.set(t,o.length),t=s,i.w=o.length}return PX(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,r,n,i)};var TC=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8};var OX=function(t,e){var r=e.level,n=r==0?0:r<6?1:r==9?3:2;if(t[0]=120,t[1]=n<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var i=xC();i.p(e.dictionary),TC(t,2,i.d())}};function _C(t,e){e||(e={});var r=xC();r.p(t);var n=CX(t,e,e.dictionary?6:2,4);return OX(n,e),TC(n,n.length-4,r.d()),n}var LX=typeof TextDecoder<"u"&&new TextDecoder,DX=0;try{LX.decode(yC,{stream:!0}),DX=1}catch{}var $X="https://free.nowline.io/open";function EC(t){let e=new TextEncoder().encode(t),r=_C(e),n=32768,i="";for(let o=0;o<r.length;o+=n)i+=String.fromCharCode(...r.subarray(o,o+n));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function RC({source:t,sourceUrl:e,share:r}){if(r===!1||r==="none")return null;if(typeof r=="object")return e!==void 0&&vC(e)?r.remoteUrl.replace("{url}",encodeURIComponent(e)):r.textUrl.replace("{text}",EC(t));let n=r===!0?$X:r,i=new URL(n);return e!==void 0&&vC(e)?i.hash=`url=${encodeURIComponent(e)}`:i.hash=`text=${EC(t)}`,i.toString()}function vC(t){try{return new URL(t).protocol==="https:"}catch{return!1}}var bC=0;async function wC(t){let e=t.document??globalThis.document;if(!e)return{rendered:0,failed:0};let r=e.querySelectorAll(t.selector),n=0,i=0,o=++bC,s=t.share??!0,a=[],c=0;for(let l of Array.from(r)){let u=MX(l);if(!u)continue;let f=FX(l),d=`nl-r${o}-${c++}`,p={theme:t.theme,locale:t.locale,width:t.width,today:t.today,idPrefix:d},m=u.parentElement,g=u.nextSibling,T=l.getAttribute("data-nowline-source-url")??void 0??t.sourceUrl;a.push(dm(f,p).then(_=>{if(UX(u,_),n++,m!==null){let E=RC({source:f,sourceUrl:T,share:s});if(E!==null){let I=e.createElement("a");I.className="nowline-share",I.href=E,I.target="_blank",I.rel="noopener noreferrer",I.textContent="Share on Nowline",m.insertBefore(I,g)}}},_=>{i++,console.error("nowline: render failed",_)}))}return await Promise.all(a),{rendered:n,failed:i}}function MX(t){let e=t.parentElement;return e&&e.tagName.toUpperCase()==="PRE"?e:t}function FX(t){return t.textContent??""}function UX(t,e){t.outerHTML=e}function AC(){bC=0}function hm(){if(typeof globalThis>"u")return"light";let t=globalThis.matchMedia;if(typeof t!="function")return"light";try{return t("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function SC(t,e){return t&&t!=="auto"?k_(t)??e:e}var BX="0.5.1",GX="fc40638",XX="pre code.language-nowline, code.language-nowline",IC={theme:"auto",startOnLoad:!0,selector:XX,systemTheme:hm(),share:!0},Tt={...IC},WE=!1;function HX(t={}){Tt={theme:t.theme??Tt.theme,startOnLoad:t.startOnLoad??Tt.startOnLoad,selector:t.selector??Tt.selector,locale:t.locale??Tt.locale,width:t.width??Tt.width,today:t.today??Tt.today,share:t.share??Tt.share,sourceUrl:t.sourceUrl??Tt.sourceUrl,systemTheme:hm()}}function kC(){return{theme:SC(Tt.theme,Tt.systemTheme),locale:Tt.locale,width:Tt.width,today:Tt.today}}async function jX(t,e={}){let r={...kC(),...e};return dm(t,r)}async function zX(t){return sC(t)}async function VE(t){let e={selector:t?.selector??Tt.selector,theme:t?.theme??kC().theme,locale:t?.locale??Tt.locale,width:t?.width??Tt.width,today:t?.today??Tt.today,share:t?.share??Tt.share,sourceUrl:t?.sourceUrl??Tt.sourceUrl,document:t?.document};return wC(e)}var qX=VE;if(typeof document<"u"&&!WE){WE=!0;let t=()=>{Tt.startOnLoad&&VE()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):queueMicrotask(t)}function WX(){Tt={...IC,systemTheme:hm()},WE=!1,aC(),AC()}return sf(VX);})();
2664
2664
  //# sourceMappingURL=nowline.min.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowline/embed",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Browser embed bundle for Nowline. Drop a <script> tag and ```nowline``` blocks render in place.",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -41,10 +41,10 @@
41
41
  "dependencies": {
42
42
  "fflate": "^0.8.3",
43
43
  "langium": "~4.2.4",
44
- "@nowline/browser": "0.5.0",
45
- "@nowline/core": "0.5.0",
46
- "@nowline/layout": "0.5.0",
47
- "@nowline/renderer": "0.5.0"
44
+ "@nowline/core": "0.5.1",
45
+ "@nowline/layout": "0.5.1",
46
+ "@nowline/browser": "0.5.1",
47
+ "@nowline/renderer": "0.5.1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "^25.9.1",