@nowline/embed 0.0.0-dev.20261008053748.g6e34cc1 → 0.0.0-dev.20261009042000.g52d5946

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.0.0-dev.20261008053748.g6e34cc1 sha=6e34cc1 built=2026-10-07T22:37:24-07:00 */
1
+ /*! @nowline/embed 0.0.0-dev.20261009042000.g52d5946 sha=52d5946 built=2026-10-08T21:19:33-07:00 */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -42933,8 +42933,8 @@ function effectiveTheme(theme, systemTheme) {
42933
42933
  }
42934
42934
 
42935
42935
  // src/index.ts
42936
- var version = true ? "0.0.0-dev.20261008053748.g6e34cc1" : "0.0.0";
42937
- var sha = true ? "6e34cc1" : "unknown";
42936
+ var version = true ? "0.0.0-dev.20261009042000.g52d5946" : "0.0.0";
42937
+ var sha = true ? "52d5946" : "unknown";
42938
42938
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
42939
42939
  var initialConfig = {
42940
42940
  theme: "auto",
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261008053748.g6e34cc1 sha=6e34cc1 built=2026-10-07T22:37:24-07:00 */
1
+ /*! @nowline/embed 0.0.0-dev.20261009042000.g52d5946 sha=52d5946 built=2026-10-08T21:19:33-07:00 */
2
2
  "use strict";var nowline=(()=>{var zO=Object.create;var dl=Object.defineProperty;var qO=Object.getOwnPropertyDescriptor;var VO=Object.getOwnPropertyNames;var YO=Object.getPrototypeOf,KO=Object.prototype.hasOwnProperty;var ZO=(e,t,n)=>t in e?dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var l_=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var _e=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},bu=(e,t)=>{for(var n in t)dl(e,n,{get:t[n],enumerable:!0})},c_=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of VO(t))!KO.call(e,i)&&i!==n&&dl(e,i,{get:()=>t[i],enumerable:!(r=qO(t,i))||r.enumerable});return e};var gm=(e,t,n)=>(n=e!=null?zO(YO(e)):{},c_(t||!e||!e.__esModule?dl(n,"default",{value:e,enumerable:!0}):n,e)),Au=e=>c_(dl({},"__esModule",{value:!0}),e);var S=(e,t,n)=>ZO(e,typeof t!="symbol"?t+"":t,n);var ia=_e(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.boolean=OB;Xr.string=fR;Xr.number=LB;Xr.error=$B;Xr.func=DB;Xr.array=dR;Xr.stringArray=MB;function OB(e){return e===!0||e===!1}function fR(e){return typeof e=="string"||e instanceof String}function LB(e){return typeof e=="number"||e instanceof Number}function $B(e){return e instanceof Error}function DB(e){return typeof e=="function"}function dR(e){return Array.isArray(e)}function MB(e){return dR(e)&&e.every(t=>fR(t))}});var Qy=_e(ce=>{"use strict";var FB=ce&&ce.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),BB=ce&&ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),UB=ce&&ce.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&FB(n,t,r[i]);return BB(n,t),n}})();Object.defineProperty(ce,"__esModule",{value:!0});ce.Message=ce.NotificationType9=ce.NotificationType8=ce.NotificationType7=ce.NotificationType6=ce.NotificationType5=ce.NotificationType4=ce.NotificationType3=ce.NotificationType2=ce.NotificationType1=ce.NotificationType0=ce.NotificationType=ce.RequestType9=ce.RequestType8=ce.RequestType7=ce.RequestType6=ce.RequestType5=ce.RequestType4=ce.RequestType3=ce.RequestType2=ce.RequestType1=ce.RequestType=ce.RequestType0=ce.AbstractMessageSignature=ce.ParameterStructures=ce.ResponseError=ce.ErrorCodes=void 0;var Fo=UB(ia()),Sy;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(Sy||(ce.ErrorCodes=Sy={}));var Ny=class e extends Error{constructor(n,r,i){super(r);S(this,"code");S(this,"data");this.code=Fo.number(n)?n:Sy.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,e.prototype)}toJson(){let n={code:this.code,message:this.message};return this.data!==void 0&&(n.data=this.data),n}};ce.ResponseError=Ny;var jn=class jn{constructor(t){S(this,"kind");this.kind=t}static is(t){return t===jn.auto||t===jn.byName||t===jn.byPosition}toString(){return this.kind}};S(jn,"auto",new jn("auto")),S(jn,"byPosition",new jn("byPosition")),S(jn,"byName",new jn("byName"));var Di=jn;ce.ParameterStructures=Di;var lt=class{constructor(t,n){S(this,"method");S(this,"numberOfParams");this.method=t,this.numberOfParams=n}get parameterStructures(){return Di.auto}};ce.AbstractMessageSignature=lt;var Py=class extends lt{constructor(n){super(n,0);S(this,"_")}};ce.RequestType0=Py;var Cy=class extends lt{constructor(n,r=Di.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.RequestType=Cy;var Oy=class extends lt{constructor(n,r=Di.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.RequestType1=Oy;var Ly=class extends lt{constructor(n){super(n,2);S(this,"_")}};ce.RequestType2=Ly;var $y=class extends lt{constructor(n){super(n,3);S(this,"_")}};ce.RequestType3=$y;var Dy=class extends lt{constructor(n){super(n,4);S(this,"_")}};ce.RequestType4=Dy;var My=class extends lt{constructor(n){super(n,5);S(this,"_")}};ce.RequestType5=My;var Fy=class extends lt{constructor(n){super(n,6);S(this,"_")}};ce.RequestType6=Fy;var By=class extends lt{constructor(n){super(n,7);S(this,"_")}};ce.RequestType7=By;var Uy=class extends lt{constructor(n){super(n,8);S(this,"_")}};ce.RequestType8=Uy;var Wy=class extends lt{constructor(n){super(n,9);S(this,"_")}};ce.RequestType9=Wy;var Xy=class extends lt{constructor(n,r=Di.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.NotificationType=Xy;var Gy=class extends lt{constructor(n){super(n,0);S(this,"_")}};ce.NotificationType0=Gy;var jy=class extends lt{constructor(n,r=Di.auto){super(n,1);S(this,"_parameterStructures");S(this,"_");this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};ce.NotificationType1=jy;var Hy=class extends lt{constructor(n){super(n,2);S(this,"_")}};ce.NotificationType2=Hy;var zy=class extends lt{constructor(n){super(n,3);S(this,"_")}};ce.NotificationType3=zy;var qy=class extends lt{constructor(n){super(n,4);S(this,"_")}};ce.NotificationType4=qy;var Vy=class extends lt{constructor(n){super(n,5);S(this,"_")}};ce.NotificationType5=Vy;var Yy=class extends lt{constructor(n){super(n,6);S(this,"_")}};ce.NotificationType6=Yy;var Ky=class extends lt{constructor(n){super(n,7);S(this,"_")}};ce.NotificationType7=Ky;var Zy=class extends lt{constructor(n){super(n,8);S(this,"_")}};ce.NotificationType8=Zy;var Jy=class extends lt{constructor(n){super(n,9);S(this,"_")}};ce.NotificationType9=Jy;var pR;(function(e){function t(i){let o=i;return o&&Fo.string(o.method)&&(Fo.string(o.id)||Fo.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&Fo.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(Fo.string(o.id)||Fo.number(o.id)||o.id===null)}e.isResponse=r})(pR||(ce.Message=pR={}))});var tx=_e(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.LRUCache=Mi.LinkedMap=Mi.Touch=void 0;var Ht;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Ht||(Mi.Touch=Ht={}));var hR,Fd=class{constructor(){S(this,hR,"LinkedMap");S(this,"_map");S(this,"_head");S(this,"_tail");S(this,"_size");S(this,"_state");this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=Ht.None){let r=this._map.get(t);if(r)return n!==Ht.None&&this.touch(r,n),r.value}set(t,n,r=Ht.None){let i=this._map.get(t);if(i)i.value=n,r!==Ht.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case Ht.None:this.addItemLast(i);break;case Ht.First:this.addItemFirst(i);break;case Ht.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(hR=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Ht.First&&n!==Ht.Last)){if(n===Ht.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===Ht.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};Mi.LinkedMap=Fd;var ex=class extends Fd{constructor(n,r=1){super();S(this,"_limit");S(this,"_ratio");this._limit=n,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(n){this._limit=n,this.checkTrim()}get ratio(){return this._ratio}set ratio(n){this._ratio=Math.min(Math.max(0,n),1),this.checkTrim()}get(n,r=Ht.AsNew){return super.get(n,r)}peek(n){return super.get(n,Ht.None)}set(n,r){return super.set(n,r,Ht.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Mi.LRUCache=ex});var gR=_e(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.Disposable=void 0;var mR;(function(e){function t(n){return{dispose:n}}e.create=t})(mR||(Bd.Disposable=mR={}))});var Fi=_e(ix=>{"use strict";Object.defineProperty(ix,"__esModule",{value:!0});var nx;function rx(){if(nx===void 0)throw new Error("No runtime abstraction layer installed");return nx}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");nx=n}e.install=t})(rx||(rx={}));ix.default=rx});var oa=_e(Bi=>{"use strict";var WB=Bi&&Bi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.Emitter=Bi.Event=void 0;var XB=WB(Fi()),yR;(function(e){let t={dispose(){}};e.None=function(){return t}})(yR||(Bi.Event=yR={}));var ox=class{constructor(){S(this,"_callbacks");S(this,"_contexts")}add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(a){(0,XB.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ud=class Ud{constructor(t){S(this,"_options");S(this,"_event");S(this,"_callbacks");this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new ox),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=Ud._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};S(Ud,"_noop",function(){});var sx=Ud;Bi.Emitter=sx});var Gd=_e(pn=>{"use strict";var GB=pn&&pn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),jB=pn&&pn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),HB=pn&&pn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&GB(n,t,r[i]);return jB(n,t),n}})(),zB=pn&&pn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pn,"__esModule",{value:!0});pn.CancellationTokenSource=pn.CancellationToken=void 0;var qB=zB(Fi()),VB=HB(ia()),ax=oa(),Wd;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ax.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ax.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||VB.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Wd||(pn.CancellationToken=Wd={}));var YB=Object.freeze(function(e,t){let n=(0,qB.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),Xd=class{constructor(){S(this,"_isCancelled",!1);S(this,"_emitter")}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?YB:(this._emitter||(this._emitter=new ax.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},lx=class{constructor(){S(this,"_token")}get token(){return this._token||(this._token=new Xd),this._token}cancel(){this._token?this._token.cancel():this._token=Wd.Cancelled}dispose(){this._token?this._token instanceof Xd&&this._token.dispose():this._token=Wd.None}};pn.CancellationTokenSource=lx});var xR=_e(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.SharedArrayReceiverStrategy=sa.SharedArraySenderStrategy=void 0;var KB=Gd(),Sc;(function(e){e.Continue=0,e.Cancelled=1})(Sc||(Sc={}));var cx=class{constructor(){S(this,"buffers");this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Sc.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Sc.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};sa.SharedArraySenderStrategy=cx;var ux=class{constructor(t){S(this,"data");this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Sc.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},fx=class{constructor(t){S(this,"token");this.token=new ux(t)}cancel(){}dispose(){}},dx=class{constructor(){S(this,"kind","request")}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new KB.CancellationTokenSource:new fx(n)}};sa.SharedArrayReceiverStrategy=dx});var hx=_e(aa=>{"use strict";var ZB=aa&&aa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aa,"__esModule",{value:!0});aa.Semaphore=void 0;var JB=ZB(Fi()),px=class{constructor(t=1){S(this,"_capacity");S(this,"_active");S(this,"_waiting");if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,JB.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};aa.Semaphore=px});var vR=_e(zt=>{"use strict";var QB=zt&&zt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eU=zt&&zt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tU=zt&&zt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&QB(n,t,r[i]);return eU(n,t),n}})(),nU=zt&&zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zt,"__esModule",{value:!0});zt.ReadableStreamMessageReader=zt.AbstractMessageReader=zt.MessageReader=void 0;var gx=nU(Fi()),la=tU(ia()),mx=oa(),rU=hx(),TR;(function(e){function t(n){let r=n;return r&&la.func(r.listen)&&la.func(r.dispose)&&la.func(r.onError)&&la.func(r.onClose)&&la.func(r.onPartialMessage)}e.is=t})(TR||(zt.MessageReader=TR={}));var jd=class{constructor(){S(this,"errorEmitter");S(this,"closeEmitter");S(this,"partialMessageEmitter");this.errorEmitter=new mx.Emitter,this.closeEmitter=new mx.Emitter,this.partialMessageEmitter=new mx.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${la.string(t.message)?t.message:"unknown"}`)}};zt.AbstractMessageReader=jd;var yx;(function(e){function t(n){let r,i,o,s=new Map,a,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let l of n.contentDecoders)s.set(l.name,l);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let l of n.contentTypeDecoders)c.set(l.name,l)}return a===void 0&&(a=(0,gx.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}e.fromOptions=t})(yx||(yx={}));var xx=class extends jd{constructor(n,r){super();S(this,"readable");S(this,"options");S(this,"callback");S(this,"nextMessageLength");S(this,"messageToken");S(this,"buffer");S(this,"partialMessageTimer");S(this,"_partialMessageTimeout");S(this,"readSemaphore");this.readable=n,this.options=yx.fromOptions(r),this.buffer=(0,gx.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new rU.Semaphore(1)}set partialMessageTimeout(n){this._partialMessageTimeout=n}get partialMessageTimeout(){return this._partialMessageTimeout}listen(n){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=n;let r=this.readable.onData(i=>{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),r}onData(n){try{for(this.buffer.append(n);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders(!0);if(!i)return;let o=i.get("content-length");if(!o){this.fireError(new Error(`Header must provide a Content-Length property.
3
3
  ${JSON.stringify(Object.fromEntries(i))}`));return}let s=parseInt(o);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${o}`));return}this.nextMessageLength=s}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let i=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,o=await this.options.contentTypeDecoder.decode(i,this.options);this.callback(o)}).catch(i=>{this.fireError(i)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,gx.default)().timer.setTimeout((n,r)=>{this.partialMessageTimer=void 0,n===this.messageToken&&(this.firePartialMessage({messageToken:n,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};zt.ReadableStreamMessageReader=xx});var AR=_e(qt=>{"use strict";var iU=qt&&qt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oU=qt&&qt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sU=qt&&qt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&iU(n,t,r[i]);return oU(n,t),n}})(),aU=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qt,"__esModule",{value:!0});qt.WriteableStreamMessageWriter=qt.AbstractMessageWriter=qt.MessageWriter=void 0;var wR=aU(Fi()),Nc=sU(ia()),lU=hx(),_R=oa(),cU="Content-Length: ",ER=`\r
4
4
  `,bR;(function(e){function t(n){let r=n;return r&&Nc.func(r.dispose)&&Nc.func(r.onClose)&&Nc.func(r.onError)&&Nc.func(r.write)}e.is=t})(bR||(qt.MessageWriter=bR={}));var Hd=class{constructor(){S(this,"errorEmitter");S(this,"closeEmitter");this.errorEmitter=new _R.Emitter,this.closeEmitter=new _R.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,n,r){this.errorEmitter.fire([this.asError(t),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${Nc.string(t.message)?t.message:"unknown"}`)}};qt.AbstractMessageWriter=Hd;var Tx;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,wR.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,wR.default)().applicationJson.encoder}}e.fromOptions=t})(Tx||(Tx={}));var vx=class extends Hd{constructor(n,r){super();S(this,"writable");S(this,"options");S(this,"errorCount");S(this,"writeSemaphore");this.writable=n,this.options=Tx.fromOptions(r),this.errorCount=0,this.writeSemaphore=new lU.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(n){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(n,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let o=[];return o.push(cU,i.byteLength.toString(),ER),o.push(ER),this.doWrite(n,o,i)},i=>{throw this.fireError(i),i}))}async doWrite(n,r,i){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(i)}catch(o){return this.handleError(o,n),Promise.reject(o)}}handleError(n,r){this.errorCount++,this.fireError(n,r,this.errorCount)}end(){this.writable.end()}};qt.WriteableStreamMessageWriter=vx});var RR=_e(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.AbstractMessageBuffer=void 0;var uU=13,fU=10,dU=`\r
@@ -2768,5 +2768,5 @@ ${n}`),this.inline?`{${i}}`:i}};function mW(e,t,n){if(e==="linkplain"||e==="link
2768
2768
  }`));var wW={languageId:"nowline",fileExtensions:[".nowline"],caseInsensitive:!1,mode:"development"},QS={AstReflection:()=>new iu},eN={Grammar:()=>JS(),LanguageMetaData:()=>wW,parser:{}};var tN={item:"an item",group:"a group",parallel:"a parallel block",swimlane:"a swimlane",anchor:"an anchor",milestone:"a milestone","floating-milestone":"a milestone without a date",wave:"a wave",label:"a label",size:"a size",status:"a status",person:"a person",team:"a team",footnote:"a footnote",roadmap:"the roadmap",style:"a style",symbol:"a symbol"},_W={item:"item",group:"group",parallel:"parallel block",swimlane:"swimlane",anchor:"anchor",milestone:"milestone","floating-milestone":"milestone",wave:"wave",label:"label",size:"size",status:"status",person:"person",team:"team",footnote:"footnote",roadmap:"roadmap",style:"style",symbol:"symbol"},Ov=e=>e.charAt(0).toUpperCase()+e.slice(1);function Qa(e){return e.kind==="parallel-block"?`the parallel block on line ${e.line}`:e.kind==="group-block"?`the group on line ${e.line}`:`${e.kind} "${e.name}"`}function nN(e){return e.name||e.line===void 0?`"${e.name}"`:Qa({kind:e.kind==="parallel"?"parallel-block":"group-block",line:e.line})}function Lv(e,t=!0){if(e.name)return`${e.kind} "${e.name}"`;let n=e.kind==="parallel"?"parallel block":e.kind,r=t?"the ":"";return e.line===void 0?`${r}${n}`:`${r}${n} on line ${e.line}`}function rN(e){return e.name?`${Ov(e.kind)} "${e.name}"`:Ov(Lv(e))}function iN(e){return e===null?"has no start floor":`opens no earlier than ${e}`}function oN(e){return e?e.title===void 0?` Did you mean wave:${e.id}?`:` Did you mean wave:${e.id} ("${e.title}")?`:""}function sN(e){let t=e.slice(0,5).map(r=>`"${r}"`),n=e.length-t.length;return n>0?`${t.join(", ")} and ${n} more`:t.join(", ")}function dh(e){return`[${e.join(", ")}]`}var aN={"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":e=>`Line ${e.line}: mixed tabs and spaces in indentation. Use either tabs or spaces consistently.`,"NL.E0100":e=>`Invalid version format "${e.version}". Expected format: v1, v2, etc.`,"NL.E0101":e=>`This file requires Nowline ${e.version}, but the parser only supports up to ${e.supported}.`,"NL.E0102":e=>`Unknown directive property "${e.key}". Allowed: ${e.allowed}.`,"NL.E0103":e=>`Duplicate directive property "${e.key}".`,"NL.E0104":e=>`Invalid locale "${e.value}". Use a BCP-47 tag like "en-US", "fr", or "fr-CA".`,"NL.E0200":e=>`Invalid include mode "${e.value}". Must be merge, ignore, or isolate.`,"NL.E0201":e=>`Duplicate "${e.key}" option on include.`,"NL.E0202":e=>{switch(e.reason){case"mismatch":return`Included "${e.path}" declares waves ${dh(e.child)}, but this file's waves are ${dh(e.parent)}. Every included roadmap must declare the same waves in the same order: copy this file's wave lines into "${e.path}".`;case"child-none":return`Included "${e.path}" declares no waves, but this file's waves are ${dh(e.parent)}. Copy this file's wave lines into "${e.path}" so its work joins the waves.`;case"parent-none":return`Included "${e.path}" declares waves ${dh(e.child)}, but this file declares none. Declare the same waves here so the barriers apply to the whole roadmap.`;case"floor":return`Wave "${e.id}" in "${e.path}" ${iN(e.childFloor)}, but this file's wave "${e.id}" ${iN(e.parentFloor)}. A wave must have the same start floor in every included roadmap.`}},"NL.E0300":e=>`Duplicate identifier "${e.name}". First declared at ${e.location}.`,"NL.E0301":e=>`${e.type} must have an identifier, a title, or both.`,"NL.E0400":e=>`Invalid duration "${e.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q. Use "size:NAME" to reference a declared size.`,"NL.E0401":e=>`Invalid size "${e.value}". Use the id of a declared size (e.g. xs, m, lg).`,"NL.E0402":e=>`Invalid effort "${e.value}". Use a raw duration literal like 0.5d, 2w, 1m, 2q.`,"NL.E0403":e=>`Invalid remaining value "${e.value}". Use a percentage like 30% or a duration literal like 1w, 0.5d.`,"NL.E0404":e=>`Remaining must be between 0% and 100%, got ${e.value}.`,"NL.E0405":e=>`Invalid ${e.key} "${e.value}". Use ISO 8601 format: YYYY-MM-DD.`,"NL.E0406":e=>`Invalid scale "${e.value}". Use a raw duration literal like 1w, 2w, 1q (no name lookup).`,"NL.E0407":e=>`Invalid calendar "${e.value}". Must be business, full, or custom.`,"NL.E0408":e=>`Property "${e.key}" requires at least one reference.`,"NL.E0410":e=>`"${e.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":e=>`Inline date in "${e.key}:" is not allowed on ${e.type}. Allowed only on item, parallel, and group, and on a wave's after:; for a milestone use "date:" instead.`,"NL.E0412":e=>`Inline date "${e.date}" in "${e.key}:" requires the roadmap to declare "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0413":e=>`Inline date "${e.date}" in "${e.key}:" is before roadmap start ${e.start}.`,"NL.E0500":e=>`Anchor "${e.name}" requires a "date:" property.`,"NL.E0501":e=>`Anchor "${e.name}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,"NL.E0502":e=>`Anchor "${e.name}" date ${e.date} is before roadmap start ${e.start}.`,"NL.E0503":e=>`Milestone "${e.name}" requires at least one of "date:" or "after:".`,"NL.E0504":e=>`Milestone "${e.name}" date ${e.date} is before roadmap start ${e.start}.`,"NL.E0505":()=>'Footnote requires an "on:" property referencing one or more entities.',"NL.E0600":e=>`Item "${e.name}" requires a "size:" or "duration:" property.`,"NL.E0800":e=>`Invalid non-working value "${e.value}". Use hide or show.`,"NL.E0801":e=>`Invalid color "${e.value}" for "${e.key}". Use a named color, hex value, or "none".`,"NL.E0802":e=>`Invalid value "${e.value}" for "${e.key}". Allowed: ${e.allowed}.`,"NL.E0803":e=>`Unknown style property "${e.key}".`,"NL.E0804":e=>`Raw style property "${e.key}" is not allowed on ${e.entity}. Declare a named style in config and reference it via "style:id".`,"NL.E0805":e=>`Symbol id "${e.name}" collides with a built-in icon name. Reserved built-ins: ${e.builtins}.`,"NL.E0806":e=>`Symbol "${e.name}" requires a "unicode:" property (e.g. unicode:"\u{1F4B0}" or unicode:"\\u{1F464}").`,"NL.E0807":e=>`Symbol "${e.name}" unicode: must be a non-empty value.`,"NL.E0808":e=>`Symbol "${e.name}" ascii: must be 1-3 ASCII characters (got ${e.length} character${e.length===1?"":"s"}).`,"NL.E0809":e=>`Unknown symbol property "${e.key}". Allowed: unicode, ascii, link, description.`,"NL.E0810":e=>`Duplicate symbol id "${e.name}". First declared at ${e.location}.`,"NL.E0811":e=>`${e.key}: "${e.value}" is neither a built-in (${e.builtins}) nor a declared symbol. Add "symbol ${e.value} unicode:..." earlier in config or use a quoted Unicode literal.`,"NL.E0812":e=>`${e.key}: symbol "${e.value}" is referenced before its declaration. Move "symbol ${e.value}" above this entry.`,"NL.W0700":e=>`Unknown property "${e.key}" on ${e.entity}. The renderer ignores it.${e.suggested?` Did you mean "${e.suggested}"?`:""}`,"NL.W0701":e=>`Wave "${e.id}" in "${e.path}" differs from this file's definition (${e.fields.map(t=>`${t.field} ${t.there===""?"none":`"${t.there}"`} there, ${t.here===""?"none":`"${t.here}"`} here`).join("; ")}); this file's definition is used.`,"NL.W0702":e=>`"wave:" on ${e.target.kind==="default"?`"default ${e.target.entityType}"`:!e.target.name&&e.target.line!==void 0?`the ${e.target.kind==="parallel"?"parallel block":e.target.kind} on line ${e.target.line}`:`${e.target.kind} "${e.target.name}"`} is ignored: this roadmap declares no waves. Declare waves with "wave <id>" to use it, or remove the property.`,"NL.W0703":e=>`"${e.key}" on "default ${e.entityType}" is ignored: it is a roadmap-only style key. Set it on "default roadmap" instead.`,"NL.W0704":e=>`"timeline-position:${e.position}" draws no dates: "header-height:none" removes every timeline date strip. Set header-height to xs, sm, md, lg or xl to show them.`,"NL.E1100":e=>`Wave ${e.title===void 0?`on line ${e.line}`:`"${e.title}"`} needs an explicit identifier so work can reference it with wave:<id>, e.g. wave build "Build".`,"NL.E1101":e=>{switch(e.reason){case"list":return`"wave:" takes exactly one wave id; an item belongs to at most one wave. Got "${e.value}".`;case"unknown":return`Wave "${e.value}" is not declared. Declared waves: ${e.declared.length>0?e.declared.join(", "):"none"}. Add "wave ${e.value}" above the first swimlane that uses it.${oN(e.suggestion)}`;case"forward":return`Wave "${e.value}" is used before its declaration on line ${e.line}. Declare waves above the swimlanes that use them.`;case"not-a-wave":return`"wave:" must name a wave, but "${e.value}" is ${tN[e.kind]}.${oN(e.suggestion)}`}},"NL.E1102":e=>`${Ov(Lv(e.entity))} has wave:${e.wave}, but its enclosing ${Lv(e.container,!1)} has wave:${e.containerWave}. A container's wave applies to everything inside it; remove one of the two wave: properties.`,"NL.E1103":e=>{switch(e.reason){case"sequence":{let t=e.items.length>1,n=`${t?"Items":"Item"} ${e.items.map(i=>`"${i}"`).join(", ")} (wave "${e.itemWave}")`,r=typeof e.ref=="string"?`"${e.ref}"`:Qa(e.ref);return`${n} ${t?"come":"comes"} after ${r} (wave "${e.refWave}") in ${Qa(e.flow)}. Work in a lane or group runs in order, so it must also be ordered by wave: move ${r} below "${e.last}", or change their waves.`}case"join":return`Item "${e.name}" (wave "${e.wave}") comes after ${Qa(e.block)} in ${Qa(e.flow)}, and that block cannot end before its track "${e.track}" (wave "${e.trackWave}") does. Move "${e.name}" above the block or into a track of its own, or change one of their waves.`;case"after-item":return e.container?`${rN(e.container)} has after:${e.refId}, but "${e.ref}" is in later wave "${e.refWave}". Wave "${e.refWave}" cannot start until wave "${e.wave}" ends, so "${e.name}" (wave "${e.wave}") inside it could never start: move "${e.name}" to wave "${e.refWave}" or later, or remove the after:.`:`Item "${e.name}" (wave "${e.wave}") has after:${e.refId}, but "${e.ref}" is in later wave "${e.refWave}". Wave "${e.refWave}" cannot start until wave "${e.wave}" ends, so "${e.name}" could never start: move it to wave "${e.refWave}" or later, or remove the after:.`;case"after-wave":return e.container?`${rN(e.container)} (wave "${e.wave}") has after:${e.refId}, but work cannot wait for the end of its own wave or a later one. Use an earlier wave, or move the ${e.container.kind} to a later wave.`:`Item "${e.name}" (wave "${e.wave}") has after:${e.refId}, but work cannot wait for the end of its own wave or a later one. Use an earlier wave, or move "${e.name}" to a later wave.`;case"chain":return`Item "${e.name}" (wave "${e.wave}") could never start: through ${e.chain.join(" \u2192 ")}, it waits for work that cannot start until wave "${e.wave}" has ended. Move "${e.name}" to a later wave, or break the chain.`}},"NL.E1104":e=>{switch(e.reason){case"swimlane":return`"wave:" is not allowed on swimlane "${e.name}": a swimlane spans every wave. Put wave: on its items, or wrap them in "group wave:${e.value}".`;case"milestone":return`"wave:" is not allowed on milestone "${e.name}". To place a milestone at the end of a wave, use after:${e.value}.`;case"other":return`"wave:" is not allowed on ${_W[e.type]} "${e.name}"; only item, group, and parallel can belong to a wave.`}},"NL.E1105":e=>e.reason==="before"?`"before:" is not allowed on wave "${e.name}". A wave's end comes from its items; to give a wave a deadline, add a dated milestone: milestone ${e.name}-due date:<YYYY-MM-DD> after:${e.name}.`:`"${e.key}:" is not allowed on wave "${e.name}". A wave's span comes from its items; only after: (an anchor, a dated milestone, or one ISO date) can hold back a wave's start.`,"NL.E1106":e=>`Wave "${e.name}" has after:${e.ref}, but "${e.ref}" is ${tN[e.kind]}. A wave's after: accepts only anchors, dated milestones, or one ISO date; to make a wave wait for work, put that work in an earlier wave.`,"NL.W1000":e=>`Now-line date ${e.date} is outside the roadmap window (${e.start} \u2013 ${e.end}); it will not be drawn.`,"NL.W1001":e=>`Item "${e.name}" is pinned to ${e.pin} (${e.key}:), but wave "${e.wave}" cannot start until ${e.start}; the item starts at the wave start.`,"NL.W1002":e=>`Wave barriers did not settle after ${e.passes} layout passes, so the drawn schedule may not respect the wave order. The roadmap probably has an ordering conflict that validation did not catch.`,"NL.W1100":e=>{let t=nN(e);return e.reason==="item"?`before:${e.ref} on ${t} can never be met: ${t} is in wave "${e.wave}", which cannot start until "${e.ref}" (wave "${e.refWave}") has finished. The overrun will be painted.`:`before:${e.ref} on ${t} can never be met: ${t} is in wave "${e.wave}", which cannot finish before wave "${e.ref}" starts. The overrun will be painted.`},"NL.W1101":e=>{let t=nN(e);switch(e.reason){case"forward-lane":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which is in a later swimlane ("${e.lane}"). Layout places swimlanes in order and ignores references to work it has not placed yet, so it ignores this ${e.key}:. Move swimlane "${e.lane}" above swimlane "${e.ownLane}", or remove the ${e.key}:.`;case"forward-flow":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which comes later in ${Qa(e.flow)}. Layout ignores references to work it has not placed yet, so it ignores this ${e.key}:. Move "${e.ref}" above ${t}, or remove the ${e.key}:.`;case"ancestor":return`${e.key}:${e.ref} on ${t} refers to "${e.ref}", which contains it. Layout ignores references to an enclosing group or parallel, so it ignores this ${e.key}:. Remove the ${e.key}:.`;case"floating-milestone":return`${e.key}:${e.ref} on ${t} refers to milestone "${e.ref}", which has no date. Floating milestones are placed after all work, so layout ignores this ${e.key}:. Reference the milestone's predecessors or a wave instead.`}},"NL.I1000":e=>`Title on item "${e.name}" is wider than its bar at this scale; it rendered to the right of the bar.`,"NL.I1001":e=>`Label chips on item "${e.name}" did not fit inside the bar; they rendered in a spill column to the right.`,"NL.I1002":e=>`Item "${e.name}" is too narrow to show its marker at this scale; decorations spilled beside the bar.`,"NL.I1003":e=>e.anchor?`Item "${e.name}" extends past its "before:" anchor "${e.anchor}".`:`Item "${e.name}" extends past its "before:" anchor.`,"NL.I1004":e=>`Swimlane "${e.lane}" packed into ${e.rows} rows to avoid overlap.`,"NL.I1005":e=>`Swimlane "${e.lane}" is over capacity in one or more periods (red utilization band).`,"NL.I1006":e=>{switch(e.reason){case"one":return`Wave "${e.name}" has no items, so it spans no time; it is drawn as a marker in the wave strip and listed in the wave legend.`;case"many":return`Waves ${sN(e.names)} have no items, so they span no time; they are drawn as markers in the wave strip and listed in the wave legend.`;case"all":return`None of the declared waves (${sN(e.names)}) has items yet. The wave strip shows a placeholder until work is assigned with wave:<id>.`}},"NL.I1007":e=>`Milestone "${e.name}" (${e.date}) is overrun: wave "${e.wave}" ends ${e.end}.`,"NL.I1008":e=>`Item "${e.name}" is pinned to ${e.pin} (${e.key}:), a non-working day; it starts on ${e.start}.`};var J=e=>`\xAB\xA0${e}\xA0\xBB`,lN={item:"un \xE9l\xE9ment",group:"un groupe",parallel:"un bloc parall\xE8le",swimlane:"une swimlane",anchor:"une ancre",milestone:"un jalon","floating-milestone":"un jalon sans date",wave:"une vague",label:"une \xE9tiquette",size:"une taille",status:"un statut",person:"une personne",team:"une \xE9quipe",footnote:"une note de bas de page",roadmap:"la roadmap",style:"un style",symbol:"un symbole"},EW={item:"l'\xE9l\xE9ment",group:"le groupe",parallel:"le bloc parall\xE8le",swimlane:"la swimlane",anchor:"l'ancre",milestone:"le jalon","floating-milestone":"le jalon",wave:"la vague",label:"l'\xE9tiquette",size:"la taille",status:"le statut",person:"la personne",team:"l'\xE9quipe",footnote:"la note de bas de page",roadmap:"la roadmap",style:"le style",symbol:"le symbole"},$v=e=>e.charAt(0).toUpperCase()+e.slice(1);function el(e){return e.kind==="parallel-block"?`le bloc parall\xE8le \xE0 la ligne ${e.line}`:e.kind==="group-block"?`le groupe \xE0 la ligne ${e.line}`:`${e.kind==="group"?"le groupe":e.kind==="parallel"?"le bloc parall\xE8le":"la swimlane"} ${J(e.name)}`}function Dv(e,t=!1){if(e.name||e.line===void 0)return t?`de ${J(e.name)}`:J(e.name);let n=el({kind:e.kind==="parallel"?"parallel-block":"group-block",line:e.line});return t?`du ${n.slice(3)}`:n}function Mv(e){let t=e.kind==="item"?"\xE9l\xE9ment":e.kind==="group"?"groupe":"bloc parall\xE8le",n=e.kind==="item"?"l'":"le ";return e.name?`${n}${t} ${J(e.name)}`:e.line===void 0?`${n}${t}`:`${n}${t} \xE0 la ligne ${e.line}`}function cN(e){let t=e.kind==="parallel"?"le bloc parall\xE8le":"le groupe";return e.name?`${t} ${J(e.name)}`:e.line===void 0?t:`${t} \xE0 la ligne ${e.line}`}function uN(e){return e?e.title===void 0?` Vouliez-vous dire wave:${e.id}\xA0?`:` Vouliez-vous dire wave:${e.id} (${J(e.title)})\xA0?`:""}function fN(e){let t=e.slice(0,5).map(J),n=e.length-t.length;return n>0?`${t.join(", ")} et ${n} autre${n>1?"s":""}`:t.join(", ")}function ph(e){return`[${e.join(", ")}]`}function dN(e){return e===null?"n'a pas de borne de d\xE9part":`ne s'ouvre pas avant ${e}`}function pN(e){return e===""?"aucun":J(e)}var bW={title:"titre",style:"style",labels:"\xE9tiquettes",link:"lien",description:"description"},hN={"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":e=>`Ligne ${e.line}\xA0: tabulations et espaces m\xE9lang\xE9s dans l'indentation. Utilisez l'un ou l'autre, mais pas les deux.`,"NL.E0100":e=>`Format de version invalide \xAB\xA0${e.version}\xA0\xBB. Format attendu\xA0: v1, v2, etc.`,"NL.E0101":e=>`Ce fichier requiert Nowline ${e.version}, mais l'analyseur ne prend en charge que jusqu'\xE0 ${e.supported}.`,"NL.E0102":e=>`Propri\xE9t\xE9 de directive inconnue \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: ${e.allowed}.`,"NL.E0103":e=>`Propri\xE9t\xE9 de directive \xAB\xA0${e.key}\xA0\xBB en double.`,"NL.E0104":e=>`Locale invalide \xAB\xA0${e.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":e=>`Mode d'include invalide \xAB\xA0${e.value}\xA0\xBB. Doit \xEAtre merge, ignore ou isolate.`,"NL.E0201":e=>`Option \xAB\xA0${e.key}\xA0\xBB en double sur include.`,"NL.E0202":e=>{switch(e.reason){case"mismatch":return`L'include ${J(e.path)} d\xE9clare les vagues ${ph(e.child)}, mais celles de ce fichier sont ${ph(e.parent)}. Chaque roadmap incluse doit d\xE9clarer les m\xEAmes vagues dans le m\xEAme ordre\xA0: copiez les lignes wave de ce fichier dans ${J(e.path)}.`;case"child-none":return`L'include ${J(e.path)} ne d\xE9clare aucune vague, mais celles de ce fichier sont ${ph(e.parent)}. Copiez les lignes wave de ce fichier dans ${J(e.path)} pour que son travail rejoigne les vagues.`;case"parent-none":return`L'include ${J(e.path)} d\xE9clare les vagues ${ph(e.child)}, mais ce fichier n'en d\xE9clare aucune. D\xE9clarez les m\xEAmes vagues ici pour que les barri\xE8res s'appliquent \xE0 toute la roadmap.`;case"floor":return`La vague ${J(e.id)} dans ${J(e.path)} ${dN(e.childFloor)}, mais la vague ${J(e.id)} de ce fichier ${dN(e.parentFloor)}. Une vague doit avoir la m\xEAme borne de d\xE9part dans chaque roadmap incluse.`}},"NL.E0300":e=>`Identifiant en double \xAB\xA0${e.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${e.location}.`,"NL.E0301":e=>`${e.type} doit comporter un identifiant, un titre, ou les deux.`,"NL.E0400":e=>`Dur\xE9e invalide \xAB\xA0${e.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":e=>`Taille invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez l'identifiant d'une taille d\xE9clar\xE9e (p.\xA0ex. xs, m, lg).`,"NL.E0402":e=>`Effort invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 0.5d, 2w, 1m, 2q.`,"NL.E0403":e=>`Valeur restante invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un pourcentage tel que 30% ou un litt\xE9ral de dur\xE9e comme 1w, 0.5d.`,"NL.E0404":e=>`La valeur restante doit \xEAtre comprise entre 0 % et 100 %, re\xE7u ${e.value}.`,"NL.E0405":e=>`${e.key} invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez le format ISO 8601\xA0: AAAA-MM-JJ.`,"NL.E0406":e=>`\xC9chelle invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez un litt\xE9ral de dur\xE9e brut comme 1w, 2w, 1q (pas de recherche par nom).`,"NL.E0407":e=>`Calendrier invalide \xAB\xA0${e.value}\xA0\xBB. Doit \xEAtre business, full ou custom.`,"NL.E0408":e=>`La propri\xE9t\xE9 \xAB\xA0${e.key}\xA0\xBB exige au moins une r\xE9f\xE9rence.`,"NL.E0410":e=>`\xAB\xA0${e.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":e=>`Une date inline dans \xAB\xA0${e.key}:\xA0\xBB n'est pas autoris\xE9e sur ${e.type}. Autoris\xE9e seulement sur item, parallel et group, et sur le \xAB\xA0after:\xA0\xBB d'une vague\xA0; pour un milestone utilisez \xAB\xA0date:\xA0\xBB \xE0 la place.`,"NL.E0412":e=>`La date inline \xAB\xA0${e.date}\xA0\xBB dans \xAB\xA0${e.key}:\xA0\xBB exige que la roadmap d\xE9clare \xAB\xA0start:\xA0\xBB. Ajoutez start:AAAA-MM-JJ \xE0 la roadmap.`,"NL.E0413":e=>`La date inline \xAB\xA0${e.date}\xA0\xBB dans \xAB\xA0${e.key}:\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0500":e=>`L'ancre \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0date:\xA0\xBB.`,"NL.E0501":e=>`L'ancre \xAB\xA0${e.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":e=>`La date ${e.date} de l'ancre \xAB\xA0${e.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.start}).`,"NL.E0503":e=>`Le jalon \xAB\xA0${e.name}\xA0\xBB exige au moins l'une des propri\xE9t\xE9s \xAB\xA0date:\xA0\xBB ou \xAB\xA0after:\xA0\xBB.`,"NL.E0504":e=>`La date ${e.date} du jalon \xAB\xA0${e.name}\xA0\xBB pr\xE9c\xE8de le d\xE9but de la roadmap (${e.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":e=>`L'\xE9l\xE9ment \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0size:\xA0\xBB ou \xAB\xA0duration:\xA0\xBB.`,"NL.E0800":e=>`Valeur non-working invalide \xAB\xA0${e.value}\xA0\xBB. Utilisez hide ou show.`,"NL.E0801":e=>`Couleur invalide \xAB\xA0${e.value}\xA0\xBB pour \xAB\xA0${e.key}\xA0\xBB. Utilisez une couleur nomm\xE9e, une valeur hexad\xE9cimale ou \xAB\xA0none\xA0\xBB.`,"NL.E0802":e=>`Valeur invalide \xAB\xA0${e.value}\xA0\xBB pour \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: ${e.allowed}.`,"NL.E0803":e=>`Propri\xE9t\xE9 de style inconnue \xAB\xA0${e.key}\xA0\xBB.`,"NL.E0804":e=>`La propri\xE9t\xE9 de style brute \xAB\xA0${e.key}\xA0\xBB n'est pas permise sur ${e.entity}. D\xE9clarez un style nomm\xE9 dans la config et r\xE9f\xE9rencez-le avec \xAB\xA0style:id\xA0\xBB.`,"NL.E0805":e=>`L'identifiant de symbole \xAB\xA0${e.name}\xA0\xBB entre en conflit avec le nom d'une ic\xF4ne int\xE9gr\xE9e. Noms r\xE9serv\xE9s\xA0: ${e.builtins}.`,"NL.E0806":e=>`Le symbole \xAB\xA0${e.name}\xA0\xBB exige une propri\xE9t\xE9 \xAB\xA0unicode:\xA0\xBB (p.\xA0ex. unicode:"\u{1F4B0}" ou unicode:"\\u{1F464}").`,"NL.E0807":e=>`La propri\xE9t\xE9 \xAB\xA0unicode:\xA0\xBB du symbole \xAB\xA0${e.name}\xA0\xBB doit avoir une valeur non vide.`,"NL.E0808":e=>`La propri\xE9t\xE9 \xAB\xA0ascii:\xA0\xBB du symbole \xAB\xA0${e.name}\xA0\xBB doit compter de 1 \xE0 3 caract\xE8res ASCII (re\xE7u\xA0: ${e.length} caract\xE8re${e.length>1?"s":""}).`,"NL.E0809":e=>`Propri\xE9t\xE9 de symbole inconnue \xAB\xA0${e.key}\xA0\xBB. Valeurs admises\xA0: unicode, ascii, link, description.`,"NL.E0810":e=>`Identifiant de symbole en double \xAB\xA0${e.name}\xA0\xBB. Premi\xE8re d\xE9claration \xE0 ${e.location}.`,"NL.E0811":e=>`${e.key}: \xAB\xA0${e.value}\xA0\xBB n'est ni une ic\xF4ne int\xE9gr\xE9e (${e.builtins}) ni un symbole d\xE9clar\xE9. Ajoutez \xAB\xA0symbol ${e.value} unicode:...\xA0\xBB plus haut dans la config ou utilisez un litt\xE9ral Unicode entre guillemets.`,"NL.E0812":e=>`${e.key}: le symbole \xAB\xA0${e.value}\xA0\xBB est r\xE9f\xE9renc\xE9 avant sa d\xE9claration. D\xE9placez \xAB\xA0symbol ${e.value}\xA0\xBB au-dessus de cette entr\xE9e.`,"NL.W0700":e=>`Propri\xE9t\xE9 inconnue \xAB\xA0${e.key}\xA0\xBB sur ${e.entity}. Le moteur de rendu l'ignore.${e.suggested?` Vouliez-vous dire \xAB\xA0${e.suggested}\xA0\xBB\xA0?`:""}`,"NL.W0701":e=>`La vague ${J(e.id)} dans ${J(e.path)} diff\xE8re de la d\xE9finition de ce fichier (${e.fields.map(t=>`${bW[t.field]} ${pN(t.there)} l\xE0-bas, ${pN(t.here)} ici`).join("\xA0; ")})\xA0; la d\xE9finition de ce fichier est utilis\xE9e.`,"NL.W0702":e=>`\xAB\xA0wave:\xA0\xBB sur ${e.target.kind==="default"?J(`default ${e.target.entityType}`):!e.target.name&&e.target.line!==void 0?e.target.kind==="item"||e.target.kind==="group"||e.target.kind==="parallel"?Mv({kind:e.target.kind,name:"",line:e.target.line}):`${e.target.kind} \xE0 la ligne ${e.target.line}`:`${e.target.kind} ${J(e.target.name)}`} est ignor\xE9\xA0: cette roadmap ne d\xE9clare aucune vague. D\xE9clarez des vagues avec \xAB\xA0wave <id>\xA0\xBB pour l'utiliser, ou retirez la propri\xE9t\xE9.`,"NL.W0703":e=>`${J(e.key)} sur ${J(`default ${e.entityType}`)} est ignor\xE9\xA0: c'est une cl\xE9 de style propre \xE0 la roadmap. D\xE9finissez-la plut\xF4t sur \xAB\xA0default roadmap\xA0\xBB.`,"NL.W0704":e=>`${J(`timeline-position:${e.position}`)} n'affiche aucune date\xA0: ${J("header-height:none")} retire tous les bandeaux de dates de la frise. Donnez \xE0 header-height la valeur xs, sm, md, lg ou xl pour les afficher.`,"NL.E1100":e=>`La vague ${e.title===void 0?`\xE0 la ligne ${e.line}`:J(e.title)} exige un identifiant explicite pour que le travail puisse la r\xE9f\xE9rencer avec wave:<id>, p.\xA0ex. wave build "Build".`,"NL.E1101":e=>{switch(e.reason){case"list":return`\xAB\xA0wave:\xA0\xBB accepte exactement un identifiant de vague\xA0; un \xE9l\xE9ment appartient \xE0 une seule vague au plus. Re\xE7u ${J(e.value)}.`;case"unknown":return`La vague ${J(e.value)} n'est pas d\xE9clar\xE9e. Vagues d\xE9clar\xE9es\xA0: ${e.declared.length>0?e.declared.join(", "):"aucune"}. Ajoutez \xAB\xA0wave ${e.value}\xA0\xBB au-dessus de la premi\xE8re swimlane qui l'utilise.${uN(e.suggestion)}`;case"forward":return`La vague ${J(e.value)} est utilis\xE9e avant sa d\xE9claration \xE0 la ligne ${e.line}. D\xE9clarez les vagues au-dessus des swimlanes qui les utilisent.`;case"not-a-wave":return`\xAB\xA0wave:\xA0\xBB doit nommer une vague, mais ${J(e.value)} est ${lN[e.kind]}.${uN(e.suggestion)}`}},"NL.E1102":e=>`${$v(Mv(e.entity))} a wave:${e.wave}, mais ${Mv(e.container)} qui le contient a wave:${e.containerWave}. La vague d'un conteneur s'applique \xE0 tout ce qu'il contient\xA0; retirez l'une des deux propri\xE9t\xE9s wave:.`,"NL.E1103":e=>{switch(e.reason){case"sequence":{let t=e.items.length>1,n=`${t?"Les \xE9l\xE9ments":"L'\xE9l\xE9ment"} ${e.items.map(J).join(", ")} (vague ${J(e.itemWave)})`,r=typeof e.ref=="string"?J(e.ref):el(e.ref);return`${n} ${t?"viennent":"vient"} apr\xE8s ${r} (vague ${J(e.refWave)}) dans ${el(e.flow)}. Le travail d'une swimlane ou d'un groupe s'ex\xE9cute dans l'ordre, il doit donc aussi \xEAtre ordonn\xE9 par vague\xA0: d\xE9placez ${r} sous ${J(e.last)}, ou changez leurs vagues.`}case"join":return`L'\xE9l\xE9ment ${J(e.name)} (vague ${J(e.wave)}) vient apr\xE8s ${el(e.block)} dans ${el(e.flow)}, et ce bloc ne peut pas se terminer avant sa piste ${J(e.track)} (vague ${J(e.trackWave)}). D\xE9placez ${J(e.name)} au-dessus du bloc ou dans une piste distincte, ou changez l'une de leurs vagues.`;case"after-item":return e.container?`${$v(cN(e.container))} a after:${e.refId}, mais ${J(e.ref)} est dans la vague ult\xE9rieure ${J(e.refWave)}. La vague ${J(e.refWave)} ne peut pas d\xE9marrer avant la fin de la vague ${J(e.wave)}, donc ${J(e.name)} (vague ${J(e.wave)}) \xE0 l'int\xE9rieur ne pourrait jamais d\xE9marrer\xA0: d\xE9placez ${J(e.name)} dans la vague ${J(e.refWave)} ou une vague ult\xE9rieure, ou retirez le after:.`:`L'\xE9l\xE9ment ${J(e.name)} (vague ${J(e.wave)}) a after:${e.refId}, mais ${J(e.ref)} est dans la vague ult\xE9rieure ${J(e.refWave)}. La vague ${J(e.refWave)} ne peut pas d\xE9marrer avant la fin de la vague ${J(e.wave)}, donc ${J(e.name)} ne pourrait jamais d\xE9marrer\xA0: d\xE9placez-le dans la vague ${J(e.refWave)} ou une vague ult\xE9rieure, ou retirez le after:.`;case"after-wave":{let t=e.container?.kind==="parallel"?"bloc parall\xE8le":"groupe";return e.container?`${$v(cN(e.container))} (vague ${J(e.wave)}) a after:${e.refId}, mais le travail ne peut pas attendre la fin de sa propre vague ni d'une vague ult\xE9rieure. Utilisez une vague ant\xE9rieure, ou d\xE9placez le ${t} dans une vague ult\xE9rieure.`:`L'\xE9l\xE9ment ${J(e.name)} (vague ${J(e.wave)}) a after:${e.refId}, mais le travail ne peut pas attendre la fin de sa propre vague ni d'une vague ult\xE9rieure. Utilisez une vague ant\xE9rieure, ou d\xE9placez ${J(e.name)} dans une vague ult\xE9rieure.`}case"chain":return`L'\xE9l\xE9ment ${J(e.name)} (vague ${J(e.wave)}) ne pourrait jamais d\xE9marrer\xA0: via ${e.chain.join(" \u2192 ")}, il attend du travail qui ne peut pas d\xE9marrer avant la fin de la vague ${J(e.wave)}. D\xE9placez ${J(e.name)} dans une vague ult\xE9rieure, ou rompez la cha\xEEne.`}},"NL.E1104":e=>{switch(e.reason){case"swimlane":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur la swimlane ${J(e.name)}\xA0: une swimlane couvre toutes les vagues. Placez wave: sur ses \xE9l\xE9ments, ou regroupez-les dans \xAB\xA0group wave:${e.value}\xA0\xBB.`;case"milestone":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur le jalon ${J(e.name)}. Pour placer un jalon \xE0 la fin d'une vague, utilisez after:${e.value}.`;case"other":return`\xAB\xA0wave:\xA0\xBB n'est pas autoris\xE9 sur ${EW[e.type]} ${J(e.name)}\xA0; seuls item, group et parallel peuvent appartenir \xE0 une vague.`}},"NL.E1105":e=>e.reason==="before"?`\xAB\xA0before:\xA0\xBB n'est pas autoris\xE9 sur la vague ${J(e.name)}. La fin d'une vague d\xE9coule de ses \xE9l\xE9ments\xA0; pour donner une \xE9ch\xE9ance \xE0 une vague, ajoutez un jalon dat\xE9\xA0: milestone ${e.name}-due date:<AAAA-MM-JJ> after:${e.name}.`:`\xAB\xA0${e.key}:\xA0\xBB n'est pas autoris\xE9 sur la vague ${J(e.name)}. L'\xE9tendue d'une vague d\xE9coule de ses \xE9l\xE9ments\xA0; seul after: (une ancre, un jalon dat\xE9 ou une date ISO) peut retarder le d\xE9but d'une vague.`,"NL.E1106":e=>`La vague ${J(e.name)} a after:${e.ref}, mais ${J(e.ref)} est ${lN[e.kind]}. Le after: d'une vague accepte seulement des ancres, des jalons dat\xE9s ou une date ISO\xA0; pour qu'une vague attende du travail, placez ce travail dans une vague ant\xE9rieure.`,"NL.W1001":e=>`L'\xE9l\xE9ment ${J(e.name)} est \xE9pingl\xE9 \xE0 ${e.pin} (${e.key}:), mais la vague ${J(e.wave)} ne peut pas d\xE9marrer avant le ${e.start}\xA0; l'\xE9l\xE9ment d\xE9marre au d\xE9but de la vague.`,"NL.W1002":e=>`Les barri\xE8res de vagues ne se sont pas stabilis\xE9es apr\xE8s ${e.passes} passes de mise en page\xA0; le calendrier dessin\xE9 pourrait donc ne pas respecter l'ordre des vagues. La roadmap comporte probablement un conflit d'ordre que la validation n'a pas d\xE9tect\xE9.`,"NL.W1100":e=>{let t=Dv(e);return e.reason==="item"?`before:${e.ref} sur ${t} ne peut jamais \xEAtre respect\xE9\xA0: ${t} est dans la vague ${J(e.wave)}, qui ne peut pas d\xE9marrer avant la fin de ${J(e.ref)} (vague ${J(e.refWave)}). Le d\xE9passement sera peint.`:`before:${e.ref} sur ${t} ne peut jamais \xEAtre respect\xE9\xA0: ${t} est dans la vague ${J(e.wave)}, qui ne peut pas se terminer avant le d\xE9but de la vague ${J(e.ref)}. Le d\xE9passement sera peint.`},"NL.W1101":e=>{let t=Dv(e);switch(e.reason){case"forward-lane":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${J(e.ref)}, qui se trouve dans une swimlane ult\xE9rieure (${J(e.lane)}). La mise en page place les swimlanes dans l'ordre et ignore les r\xE9f\xE9rences \xE0 du travail qu'elle n'a pas encore plac\xE9, elle ignore donc ce ${e.key}:. D\xE9placez la swimlane ${J(e.lane)} au-dessus de la swimlane ${J(e.ownLane)}, ou retirez le ${e.key}:.`;case"forward-flow":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${J(e.ref)}, qui vient plus tard dans ${el(e.flow)}. La mise en page ignore les r\xE9f\xE9rences \xE0 du travail qu'elle n'a pas encore plac\xE9, elle ignore donc ce ${e.key}:. D\xE9placez ${J(e.ref)} au-dessus ${Dv(e,!0)}, ou retirez le ${e.key}:.`;case"ancestor":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence ${J(e.ref)}, qui le contient. La mise en page ignore les r\xE9f\xE9rences \xE0 un groupe ou un bloc parall\xE8le englobant, elle ignore donc ce ${e.key}:. Retirez le ${e.key}:.`;case"floating-milestone":return`${e.key}:${e.ref} sur ${t} r\xE9f\xE9rence le jalon ${J(e.ref)}, qui n'a pas de date. Les jalons sans date sont plac\xE9s apr\xE8s tout le travail, la mise en page ignore donc ce ${e.key}:. R\xE9f\xE9rencez plut\xF4t les pr\xE9d\xE9cesseurs du jalon ou une vague.`}},"NL.I1006":e=>{switch(e.reason){case"one":return`La vague ${J(e.name)} n'a aucun \xE9l\xE9ment, elle ne couvre donc aucune dur\xE9e\xA0; elle est dessin\xE9e comme un rep\xE8re dans la bande des vagues et list\xE9e dans la l\xE9gende des vagues.`;case"many":return`Les vagues ${fN(e.names)} n'ont aucun \xE9l\xE9ment, elles ne couvrent donc aucune dur\xE9e\xA0; elles sont dessin\xE9es comme des rep\xE8res dans la bande des vagues et list\xE9es dans la l\xE9gende des vagues.`;case"all":return`Aucune des vagues d\xE9clar\xE9es (${fN(e.names)}) n'a encore d'\xE9l\xE9ment. La bande des vagues affiche un espace r\xE9serv\xE9 jusqu'\xE0 ce que du travail soit affect\xE9 avec wave:<id>.`}},"NL.I1007":e=>`Le jalon ${J(e.name)} (${e.date}) est d\xE9pass\xE9\xA0: la vague ${J(e.wave)} se termine le ${e.end}.`,"NL.I1008":e=>`L'\xE9l\xE9ment ${J(e.name)} est \xE9pingl\xE9 \xE0 ${e.pin} (${e.key}:), un jour non ouvr\xE9\xA0; il d\xE9marre le ${e.start}.`};var mN={};var gN={};var AW=new Map([["en-US",aN],["fr",hN],["fr-CA",mN],["fr-FR",gN]]);function qr(e,t,...n){for(let r of RW(e)){let o=AW.get(r)?.[t];if(o)return o(...n)}return t}var yN="en-US";function RW(e){let t=[],n=kW(e);for(;n.length>0;){t.includes(n)||t.push(n);let r=n.lastIndexOf("-");if(r<=0)break;n=n.slice(0,r)}return t.includes(yN)||t.push(yN),t}function kW(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}var IW=/[\\/]/;function vN(e){for(let t=e.length-1;t>=0;t--){let n=e.charCodeAt(t);if(n===47||n===92)return t}return-1}function xN(...e){for(let t of e)if(t){if(t.includes("\\")&&!t.includes("/"))return"\\";if(t.includes("/"))return"/"}return"/"}function SW(e){return e?e[0]==="/"||e[0]==="\\"?!0:e.length>=3&&/^[A-Za-z]:[\\/]/.test(e):!1}function wN(e){let t=vN(e);return t<0?".":t===0?e[0]:t===2&&/^[A-Za-z]:[\\/]/.test(e)?e.slice(0,3):e.slice(0,t)}function tl(e){let t=vN(e);return t<0?e:e.slice(t+1)}function Fv(e,t){if(SW(t))return TN(t,xN(t));let n=xN(e,t);return TN(`${e}${n}${t}`,n)}function TN(e,t){let n="",r=e,i=/^([A-Za-z]:)([\\/])?/.exec(r);i?(n=i[1]+(i[2]?t:""),r=r.slice(i[0].length)):(r[0]==="/"||r[0]==="\\")&&(n=t,r=r.replace(/^[\\/]+/,""));let o=[];for(let s of r.split(IW))if(!(s===""||s===".")){if(s===".."){o.length>0&&o[o.length-1]!==".."?o.pop():n||o.push("..");continue}o.push(s)}return n+o.join(t)}function yn(e){return/[\r\n]/.test(e)?e.replace(/\s*[\r\n]+\s*/g," ").trim():e}var Ft=/^\d{4}-\d{2}-\d{2}$/;function fe(e){return e.key.endsWith(":")?e.key.slice(0,-1):e.key}function _N(e,t,n){if(e===t)return 0;let r=e.length,i=t.length;if(Math.abs(r-i)>n)return n+1;if(r===0)return i;if(i===0)return r;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<=r;a++){s[0]=a;let c=a;for(let u=1;u<=i;u++){let f=e.charCodeAt(a-1)===t.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>n)return n+1;let l=o;o=s,s=l}return o[i]}function EN(e,t,n=2){let r,i=n+1;for(let o of t){let s=_N(e,o,n);if(s<i&&(r=o,i=s,s===0))break}return r}function bN(e,t,n=2){let r,i=n+1,o=!1;for(let s of t){let a=_N(e,s,n);a<i?(r=s,i=a,o=!1):a===i&&a<=n&&s!==r&&(o=!0)}return o?void 0:r}function it(e){return e.name??(e.title===void 0?"<unnamed>":yn(e.title))}function su(e){return e.$type.replace(/Declaration$|Block$/,"").toLowerCase()}function hh(e){let t=su(e),n=e.name??(e.title===void 0?void 0:yn(e.title));return n?`${t} "${n}"`:t}function xr(e){let t=e.$cstNode;return t?t.range.start.line+1:0}function mh(e,t){return`"${e}" cannot be set on "default ${t}". Identity-defining, sizing, sequencing, reference, and prose properties must be explicit on each entity.`}function Zn(e){let t=new Set,n=[];for(let r of e.roadmapEntries)!on(r)||!r.name||t.has(r.name)||(t.add(r.name),n.push(r));return n}function NW(e){let t=new Map;return Zn(e).forEach((n,r)=>{t.set(n.name,r+1)}),t}function RN(e){return(e.properties??[]).filter(n=>fe(n)==="wave")}function kN(e){return RN(e)[0]}function Bv(e){return e.value!==void 0?e.value:e.values.length===1?e.values[0]:`[${e.values.join(", ")}]`}function PW(e){let t=e;for(;t?.$container&&!Za(t.$container);)t=t.$container;let n=t?.$container;if(!(!t||!n||!Za(n)))return{file:n,index:n.roadmapEntries.indexOf(t),waveDecls:IN(n)}}function IN(e){let t=new Map;return e.roadmapEntries.forEach((n,r)=>{on(n)&&n.name&&!t.has(n.name)&&t.set(n.name,r)}),t}function Uv(e,t,n,r=PW(t)){let i=Bv(e);if(e.value===void 0&&e.values.length!==1)return{status:"list",value:i};let o=n.get(i);if(o===void 0)return{status:"missing",value:i};if(r){let s=r.waveDecls.get(i);if(s!==void 0&&(r.index<0||s>r.index))return{status:"forward",value:i,line:xr(r.file.roadmapEntries[s])}}return{status:"valid",id:i,index:o}}function CW(e){return je(e)||vt(e)}function OW(e,t,n,r){let i=kN(e);if(!i)return t;let o=Uv(i,e,n,r);if(o.status==="valid")return t??o.index}function gh(e,t){let n=new Map,r=new Map,i=new Map,o=(s,a,c)=>{let l=OW(s,a,t,c);l!==void 0&&n.set(s,l);let u=l;if(je(s)||vt(s)){let f=[];for(let d of s.content)gr(d)||f.push(o(d,l,c));l===void 0&&(je(s)?u=f[0]:f.length>0&&!f.includes(void 0)&&(u=Math.min(...f)))}return u!==void 0&&r.set(s,u),u};for(let s of e){let a,c=s.$container;if(Za(c)){let l=i.get(c);l||(l=IN(c),i.set(c,l)),a={file:c,index:c.roadmapEntries.indexOf(s),waveDecls:l}}for(let l of s.content)gr(l)||o(l,void 0,a)}return{waveOf:n,leadOf:r}}function LW(e){return Ft.test(e)&&!Number.isNaN(new Date(e).getTime())}function SN(e){return(e.properties??[]).find(n=>fe(n)==="date")?.value}function $W(e){let t=new Map,n=r=>{let i=r.name;if(i&&!t.has(i)&&t.set(i,r),wt(r)||vt(r)||je(r))for(let o of r.content)n(o);else if(Ut(r))for(let o of r.content)(Ut(o)||Cn(o))&&n(o)};e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function nl(e){let t=$W(e);return n=>t.get(n)}function lu(e,t){let n=null;for(let r of e.properties){if(fe(r)!=="after")continue;let i=r.value!==void 0?[r.value]:r.values;for(let o of i){if(!o)continue;let s;if(Ft.test(o))s=o;else{let a=t(o);(Ki(a)||Pn(a))&&(s=SN(a))}s===void 0||!LW(s)||(n===null||s>n.date)&&(n={date:s,ref:o})}}return n}var NN=new Set(["before","date","start","length","duration","size","capacity","remaining","wave"]);function cu(e){return on(e.$container)&&NN.has(fe(e))}var DW={ItemDeclaration:"item",GroupBlock:"group",ParallelBlock:"parallel",SwimlaneDeclaration:"swimlane",AnchorDeclaration:"anchor",MilestoneDeclaration:"milestone",WaveDeclaration:"wave",LabelDeclaration:"label",SizeDeclaration:"size",StatusDeclaration:"status",PersonDeclaration:"person",TeamDeclaration:"team",FootnoteDeclaration:"footnote",RoadmapDeclaration:"roadmap",StyleDeclaration:"style",SymbolDeclaration:"symbol"};function au(e){return DW[e.$type]??su(e)}function MW(e,t){let n=[],r=it(e),i=!e.name&&e.title===void 0;if(e.name||n.push({severity:"error",code:"NL.E1100",args:{...e.title===void 0?{}:{title:yn(e.title)},line:xr(e)},node:e}),i)return n;for(let o of e.properties){let s=fe(o);if(NN.has(s)){n.push({severity:"error",code:"NL.E1105",args:s==="before"?{reason:"before",name:r}:{reason:"other",key:s,name:r},node:o,property:"key"});continue}if(s!=="after")continue;let a=o.value!==void 0?[o.value]:o.values;for(let c of a){if(!c||Ft.test(c))continue;let l=t(c);if(!(!l||Ki(l))){if(Pn(l)){if(SN(l)!==void 0)continue;n.push({severity:"error",code:"NL.E1106",args:{name:r,ref:c,kind:"floating-milestone"},node:o});continue}n.push({severity:"error",code:"NL.E1106",args:{name:r,ref:c,kind:au(l)},node:o})}}}return n}function yh(e){let t=nl(e);return e.roadmapEntries.filter(on).flatMap(n=>MW(n,t))}function FW(e){let t=[],n=r=>{if(!on(r)){if(t.push(r),wt(r)||vt(r)||je(r))for(let i of r.content)gr(i)||n(i);else if(Ut(r))for(let i of r.content)(Ut(i)||Cn(i))&&n(i)}};for(let r of e.configEntries)gn(r)&&t.push(r);e.roadmapDecl&&n(e.roadmapDecl);for(let r of e.roadmapEntries)n(r);return t}function BW(e,t){let n=e.toLowerCase(),r=t.filter(o=>o.title!==void 0&&yn(o.title).toLowerCase()===n),i;if(r.length===1)i=r[0];else{let o=bN(e,t.map(s=>s.name));i=o===void 0?void 0:t.find(s=>s.name===o)}if(i)return i.title===void 0?{id:i.name}:{id:i.name,title:yn(i.title)}}function UW(e,t,n){let r=n(t);if(r)return au(r);for(let i of e.configEntries)if((yr(i)||jo(i))&&i.name===t)return au(i)}function WW(e,t){let n=e.$container;for(;CW(n);){let r=kN(n);if(r)return Uv(r,n,t).status==="valid"?{container:n,prop:r}:void 0;n=n?.$container}}function AN(e,t){let n=t.name??(t.title===void 0?"":yn(t.title));return n?{kind:e,name:n}:{kind:e,name:n,line:xr(t)}}function XW(e){if(gn(e))return{kind:"default",entityType:e.entityType};let t=e,n=t.name??(t.title===void 0?"":yn(t.title)),r=au(e);return n?{kind:r,name:n}:{kind:r,name:n,line:xr(e)}}function GW(e,t,n,r,i,o){let s=Uv(n,t,i);switch(s.status){case"list":return{severity:"error",code:"NL.E1101",args:{reason:"list",value:s.value},node:n};case"forward":return{severity:"error",code:"NL.E1101",args:{reason:"forward",value:s.value,line:s.line},node:n};case"missing":{let u=UW(e,s.value,o),f=BW(s.value,r);return{severity:"error",code:"NL.E1101",args:u===void 0?{reason:"unknown",value:s.value,declared:r.map(d=>d.name),...f?{suggestion:f}:{}}:{reason:"not-a-wave",value:s.value,kind:u,...f?{suggestion:f}:{}},node:n}}case"valid":break}let a=WW(t,i);if(!a)return;let c=Bv(a.prop);if(c===s.id)return;let l=Mt(t)?"item":je(t)?"group":"parallel";return{severity:"error",code:"NL.E1102",args:{entity:AN(l,t),wave:s.id,container:AN(je(a.container)?"group":"parallel",a.container),containerWave:c},node:n}}function xh(e){let t=Zn(e),n=t.length>0,r=NW(e),i=nl(e),o=[];for(let s of FW(e)){let a=RN(s);if(a.length===0)continue;if(!n){for(let h of a)o.push({severity:"warning",code:"NL.W0702",args:{target:XW(s)},node:h,property:"key"});continue}if(gn(s)){for(let h of a)o.push({severity:"error",message:mh("wave",s.entityType),node:h});continue}let c=s,l=it(c);if(!c.name&&c.title===void 0&&!Mt(s)&&!je(s)&&!vt(s))continue;if(wt(s)||Pn(s)){for(let h of a)o.push({severity:"error",code:"NL.E1104",args:{reason:wt(s)?"swimlane":"milestone",name:l,value:Bv(h)},node:h});continue}if(!Mt(s)&&!je(s)&&!vt(s)){for(let h of a)o.push({severity:"error",code:"NL.E1104",args:{reason:"other",type:au(s),name:l},node:h});continue}let[f,...d]=a,p=GW(e,s,f,t,r,i);if(p&&o.push(p),d.length>0){let h=a.flatMap(g=>g.value!==void 0?[g.value]:g.values);for(let g of d)o.push({severity:"error",code:"NL.E1101",args:{reason:"list",value:`[${h.join(", ")}]`},node:g})}}return o}var jW=["after-wave","after-item","sequence","join"];function Ho(e){return e.name??(e.title===void 0?void 0:yn(e.title))}function Th(e){let t=Ho(e);if(wt(e))return{kind:"swimlane",name:it(e)};let n=je(e);return t?{kind:n?"group":"parallel",name:t}:{kind:n?"group-block":"parallel-block",line:xr(e)}}function PN(e){let t=Ho(e);return t!==void 0||e.$type==="ItemDeclaration"?t:{kind:je(e)?"group-block":"parallel-block",line:xr(e)}}function CN(e){return e.$type==="ItemDeclaration"||Ho(e)!==void 0?{name:it(e)}:{name:"",kind:je(e)?"group":"parallel",line:xr(e)}}function HW(e){let t=je(e)?"group":"parallel",n=Ho(e);return n?{kind:t,name:n}:{kind:t,name:"",line:xr(e)}}function Wv(e){return(e.value!==void 0?[e.value]:e.values).filter(t=>!!t)}function zW(e){return Pn(e)&&!e.properties.some(t=>fe(t)==="date")}function qW(e){return e.$type!=="ItemDeclaration"?!1:e.properties.some(t=>{let n=fe(t);return(n==="date"||n==="start")&&!!t.value&&Ft.test(t.value)})}function rl(e,t,n={}){if(t.length===0)return[];let r=new Map;t.forEach((A,$)=>{A.name&&r.set(A.name,$+1)});let i=A=>t[A-1]?.name??"",{lanes:o,lookup:s}=e,{waveOf:a,leadOf:c}=gh(o,r),l=[],u=new Map,f=0,d=(A,$,M,H)=>{let Z=l.length,Y={node:A,lane:$,parent:M,children:[],prev:H,start:f++,reg:-1,ew:a.get(A),lw:c.get(A),pinned:qW(A),after:[],afterWaves:[]};if(l.push(Y),je(A)||vt(A)){let ie=-1;for(let le of A.content)gr(le)||(ie=d(le,$,Z,je(A)?ie:-1),Y.children.push(ie));Y.reg=f++}else Y.reg=Y.start;if(A.name){let ie=u.get(A.name)??[];ie.push(Z),u.set(A.name,ie)}return Z};o.forEach((A,$)=>{let M=-1;for(let H of A.content)gr(H)||(M=d(H,$,-1,M))});let p=(A,$)=>{let M=u.get(A);if(M){for(let H=M.length-1;H>=0;H--)if(l[M[H]].reg<l[$].start)return M[H]}},h=[],g=n.suppressCycleRefs??!0?YW(l,o,s):()=>!1;for(let A=0;A<l.length;A++){let $=l[A],M=CN($.node);for(let H of $.node.properties){let Z=fe(H);if(!(Z!=="after"&&Z!=="before"))for(let Y of Wv(H)){if(Ft.test(Y))continue;let ie=p(Y,A),le=ie===void 0?r.get(Y):void 0;if(Z==="after"&&!$.pinned&&(ie!==void 0?$.after.push({from:ie,prop:H,ref:Y}):le!==void 0&&$.afterWaves.push({prop:H,ref:Y,j:le})),ie!==void 0||le!==void 0)continue;let xe=u.get(Y)?.[0];if(xe===void 0&&!zW(s(Y))||g($.node.name,Z,Y))continue;let Te=!1;for(let he=$.parent;he>=0&&!Te;he=l[he].parent)Te=l[he].node.name===Y;h.push({severity:"warning",code:"NL.W1101",args:xe===void 0?{reason:"floating-milestone",key:Z,ref:Y,...M}:Te?{reason:"ancestor",key:Z,ref:Y,...M}:l[xe].lane!==$.lane?{reason:"forward-lane",key:Z,ref:Y,...M,lane:it(o[l[xe].lane]),ownLane:it(o[$.lane])}:{reason:"forward-flow",key:Z,ref:Y,...M,flow:Th(VW(l,o,A,xe))},node:H})}}}let _=new Array(l.length),x=new Array(l.length);for(let A=l.length-1;A>=0;A--){let $=l[A];if($.node.$type==="ItemDeclaration"){_[A]=$.ew,x[A]=$.ew;continue}for(let M of $.children){let H=_[M],Z=x[M];H!==void 0&&(_[A]=Math.max(_[A]??H,H)),Z!==void 0&&(x[A]=Math.min(x[A]??Z,Z))}}for(let A=0;A<l.length;A++){let $=_[A];if($===void 0)continue;let M=CN(l[A].node);for(let H of l[A].node.properties)if(fe(H)==="before")for(let Z of Wv(H)){if(Ft.test(Z))continue;let Y=p(Z,A);if(Y!==void 0){let le=x[Y];if(le===void 0||$<=le)continue;h.push({severity:"warning",code:"NL.W1100",args:{reason:"item",ref:Z,...M,wave:i($),refWave:i(le)},node:H});continue}let ie=r.get(Z);ie===void 0||$<ie||h.push({severity:"warning",code:"NL.W1100",args:{reason:"wave",ref:Z,...M,wave:i($)},node:H})}}let y=A=>l[A].node.$type!=="ItemDeclaration",w=A=>{let{parent:$,pinned:M}=l[A];return M||$<0?!1:vt(l[$].node)||l[$].children[0]===A},v=new Array(l.length).fill(0),b=new Array(l.length).fill(0),L=A=>{let $=l[A],M=[];$.lw!==void 0&&M.push({term:{kind:$.ew!==void 0?"wave":"lead"},value:$.lw-1});for(let H of $.afterWaves)M.push({term:{kind:"after-wave",prop:H.prop,ref:H.ref},value:H.j});w(A)&&M.push({term:{kind:"parent",from:$.parent},value:v[$.parent]}),!$.pinned&&$.prev>=0&&M.push({term:{kind:"seq",from:$.prev},value:b[$.prev]});for(let H of $.after)M.push({term:{kind:"after",from:H.from,prop:H.prop,ref:H.ref},value:b[H.from]});return M},P=A=>{let $=v[A];for(let M of l[A].children)$=Math.max($,b[M]);return $},O=l.map((A,$)=>[2*$+1]),j=l.map(()=>[]);for(let A=0;A<l.length;A++){let $=l[A];w(A)&&O[$.parent].push(2*A),$.prev>=0&&j[$.prev].push(2*A);for(let M of $.after)j[M.from].push(2*A);$.parent>=0&&j[A].push(2*$.parent+1)}let z=[],F=new Array(2*l.length).fill(!0);for(let A=0;A<l.length;A++)z.push(2*A,2*A+1);for(let A=0;A<z.length;A++){let $=z[A];F[$]=!1;let M=$>>1,H=($&1)===1,Z=H?P(M):Math.max(0,...L(M).map(Y=>Y.value));if(!(Z<=(H?b[M]:v[M]))){H?b[M]=Z:v[M]=Z;for(let Y of H?j[M]:O[M])F[Y]||(F[Y]=!0,z.push(Y))}}let k=(A,$)=>L(A).filter(M=>M.value===$).map(M=>M.term),W=(A,$)=>{if(!y(A))return[{kind:"start"}];let M=l[A].children.filter(H=>b[H]===$).map(H=>({kind:"child",from:H}));return M.length>0?je(l[A].node)?M.reverse():M:v[A]===$?[{kind:"start"}]:[]},X=(A,$)=>{let M=[{i:A,via:A}];for(;M.length>0;){let{i:H,via:Z}=M.pop(),Y=W(H,$);for(let ie=Y.length-1;ie>=0;ie--){let le=Y[ie];if(le.kind==="start"){let xe=l[H].ew;if(xe!==void 0&&xe-1===$)return{origin:H,via:Z}}else le.kind==="child"&&M.push({i:le.from,via:H===A?le.from:Z})}}},R=(A,$)=>{let M=l[A].ew;return M!==void 0&&M-1===$},C=(A,$)=>{for(let M=A;!l[M].pinned;){let H=l[M].prev;if(H<0){if(!w(M))return;M=l[M].parent;continue}let Z=l[H].ew;if(Z!==void 0&&Z>$)return H;M=H}},N=new Map,G=[],q=new Map,V=(A,$,M)=>`${A}:${l[A].node.properties.indexOf($)}:${M}`,re=(A,$)=>{let M=[],H=A;for(;;){let Z=k(H,$);for(let ie of Z)if(ie.kind==="after-wave")M.push({variant:"after-wave",owner:H,prop:ie.prop,ref:ie.ref});else if(ie.kind==="after")R(ie.from,$)&&M.push({variant:"after-item",owner:H,prop:ie.prop,ref:ie.ref});else if(ie.kind==="seq"){let le=ie.from,xe=l[le].node;if(vt(xe)&&l[le].ew===void 0){let Te=X(le,$),he=Te&&(Ho(l[Te.via].node)??Ho(l[Te.origin].node));he&&M.push({variant:"join",owner:H,block:le,track:he})}else if(R(le,$)){let Te=PN(xe);Te&&M.push({variant:"sequence",owner:H,pred:le,ref:Te})}}let Y=Z.find(ie=>ie.kind==="parent");if(!Y)break;H=Y.from}for(let Z of jW){let Y=M.find(ie=>ie.variant===Z);if(Y)return Y}},oe=(A,$)=>{let M=[{key:2*A,from:-1}],H=new Set([2*A]),Z,Y=(ie,le)=>{H.has(ie)||(H.add(ie),M.push({key:ie,from:le}))};for(let ie=0;ie<M.length;ie++){let le=M[ie].key>>1;if(le!==A&&N.has(le)){Z??(Z=le);continue}if((M[ie].key&1)===1){for(let he of W(le,$))he.kind==="start"?Y(2*le,ie):he.kind==="child"&&Y(2*he.from+1,ie);continue}let xe=k(le,$),Te=xe.find(he=>he.kind==="wave"||he.kind==="lead")??xe.find(he=>he.kind==="after-wave");if(Te){let he=[];for(let Me=ie;Me>=0;Me=M[Me].from){let ot=M[Me].key>>1;he[he.length-1]!==ot&&he.push(ot)}let He=it(l[le].node);return{path:he,origin:Te.kind==="after-wave"?`${He} (after:${Te.ref})`:`${He} (wave "${i($+1)}")`}}for(let he of xe)he.kind==="parent"?Y(2*he.from,ie):(he.kind==="seq"||he.kind==="after")&&Y(2*he.from+1,ie)}return{hit:Z}},ye=(A,$,M,H)=>{let Z=it(l[$].node),Y=i(M),ie=i(H+1),le=l[A.owner].node,xe=A.owner===$?void 0:HW(le);switch(A.variant){case"after-wave":{let Te=l[A.owner].ew===void 0?void 0:xe;return{node:A.prop,run:[$],build:()=>({reason:"after-wave",name:Z,wave:Y,refId:A.ref,...Te?{container:Te}:{}})}}case"after-item":return{node:A.prop,run:[$],build:()=>({reason:"after-item",name:Z,wave:Y,refId:A.ref,ref:A.ref,refWave:ie,...xe?{container:xe}:{}})};case"join":{let Te=l[A.block];return{node:l[$].node,run:[$],build:()=>({reason:"join",name:Z,wave:Y,block:Th(Te.node),flow:Th(ON(l,o,A.block)),track:A.track,trackWave:ie})}}case"sequence":{let Te=A.pred,he=l[Te].parent,He=Me=>{if(he<0)return l[Me].lane===l[Te].lane;for(let ot=l[Me].parent;ot>=0;ot=l[ot].parent)if(ot===he)return!0;return!1};return{node:l[$].node,run:[$],build:Me=>{let ot=Me.filter(He);return{reason:"sequence",items:ot.map(sn=>it(l[sn].node)),itemWave:Y,ref:A.ref,refWave:i(l[Te].ew??H+1),flow:Th(ON(l,o,Te)),last:it(l[ot[ot.length-1]].node)}},seq:{pred:Te,ref:A.ref,inFlow:He}}}}},ne=(A,$)=>(G.push($),A!==void 0&&q.set(A,$),$),ae=(A,$,M,H)=>{let Z=A.variant==="sequence"?`sequence:${A.pred}:${M}`:A.variant==="join"?`join:${A.block}:${M}`:`${A.variant}:${V(A.owner,A.prop,A.ref)}`,Y=q.get(Z);return Y?(Y.run.push($),Y):ne(Z,ye(A,$,M,H))};for(let A=0;A<l.length;A++){let $=l[A],M=$.ew;if($.node.$type!=="ItemDeclaration"||M===void 0||v[A]<M)continue;let H=v[A],Z=re(A,H),Y;if(Z)Y=ae(Z,A,M,H);else{let ie=oe(A,H);if("path"in ie){let le=ie.path.slice(1).filter(He=>!y(He)||Ho(l[He].node)!==void 0).map(He=>it(l[He].node)),xe=[ie.origin,...le.filter((He,Me)=>le[Me-1]!==He)],Te=it($.node),he=i(M);Y=ne(void 0,{node:$.node,run:[A],build:()=>({reason:"chain",name:Te,wave:he,chain:xe})})}else{let le=ie.hit===void 0?void 0:N.get(ie.hit),xe=le?.seq;if(xe?.inFlow(A)){let Te=C(A,M),he=Te===void 0?void 0:PN(l[Te].node),He=Te!==void 0&&he!==void 0?{variant:"sequence",owner:A,pred:Te,ref:he}:{variant:"sequence",owner:A,pred:xe.pred,ref:xe.ref};Y=ae(He,A,M,H)}else Y=le,Y?.run.push(A)}}Y&&N.set(A,Y)}for(let A of G)h.push({severity:"error",code:"NL.E1103",args:A.build(A.run),node:A.node});return h}function ON(e,t,n){let r=e[n].parent;return r<0?t[e[n].lane]:e[r].node}function VW(e,t,n,r){let i=new Set;for(let o=e[r].parent;o>=0;o=e[o].parent)i.add(o);for(let o=e[n].parent;o>=0;o=e[o].parent)if(i.has(o))return e[o].node;return t[e[n].lane]}function YW(e,t,n){let r=new Map,i=(l,u)=>{let f=r.get(l)??new Set;f.add(u),r.set(l,f)},o=[],s=(l,u)=>{if(l)for(let f of u){let d=fe(f);if(!(d!=="after"&&d!=="before"))for(let p of Wv(f))Ft.test(p)||(d==="after"?i(l,p):i(p,l),o.push(p))}};for(let l of t)s(l.name,l.properties);for(let l of e)s(l.node.name,l.node.properties);let a=new Set;for(;o.length>0;){let l=o.pop();if(a.has(l))continue;a.add(l);let u=n(l);Pn(u)&&s(u.name,u.properties)}let c=(l,u)=>{let f=new Set([l]),d=[l];for(;d.length>0;){let p=d.pop();if(p===u)return!0;for(let h of r.get(p)??[])f.has(h)||(f.add(h),d.push(h))}return!1};return(l,u,f)=>l?u==="after"?c(f,l):c(l,f):!1}var LN="v1",Xv=new Set(["planned","in-progress","active","done","completed","at-risk","blocked"]),vh=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","non-working"]),KW=new Set(["hide","show"]),ZW=new Set(["header-height","timeline-position","minor-grid","non-working"]),zv=new Set(["none","multiplier","person","people","points","time"]),wh=new Set([...zv,"shield","warning","lock","calendar"]),zN="none",_h={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"])},JW=new Set(["red","blue","yellow","green","orange","purple","violet","gray","grey","navy","white","none"]),QW=new Set(["business","full","custom"]),Gv=new Set(["days-per-week","days-per-month","days-per-quarter","days-per-year"]),$N=new Set(["name","label-every","label"]),DN=new Set(["item","label","swimlane","roadmap","milestone","footnote","anchor","parallel","group"]),eX={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},MN=new Set(["labels","link","style","description"]),tX={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,WaveDeclaration:new Set(["after"])},nX=[{keys:new Set(["progress","percent","percentage","pct","complete","completion"]),requires:"remaining",suggest:"status: + remaining:"}];function rX(e,t){let n=e.toLowerCase();for(let r of nX)if(r.keys.has(n)&&t.has(r.requires))return r.suggest}var uu=/^\d+(?:\.\d+)?[dwmqy]$/,iX=/^\d+%$/,oX=/^#[0-9a-fA-F]{3,8}$/,sX=/^v\d+$/,FN=/^\d+$/,aX=/^[dwmqy]$/,BN=/^\d+(\.\d+)?$/,qv=/^\d+(\.\d+)?%$/,qN=/^\d+\.\d+$/,lX=/^\d+$/,cX=/^[\x20-\x7E]{1,3}$/,uX=/^[a-zA-Z]{2,3}(-[a-zA-Z]{2}|-\d{3})?$/,fX=new Set(["merge","ignore","isolate"]),UN=new Set(["locale"]);function jv(e){let t=e?.roadmapDecl?.properties.find(i=>fe(i)==="start");if(!t)return{kind:"missing"};let n=t.value;if(!n||!Ft.test(n))return{kind:"invalid"};let r=new Date(n);return Number.isNaN(r.getTime())?{kind:"invalid"}:{kind:"valid",iso:n,date:r}}function de(e,t,n,r,...i){e(t,qr("en-US",r,...i),{...n,data:{code:r,args:i}})}function Hv(e,t){let n={node:t.node,...t.property===void 0?{}:{property:t.property}};if("message"in t){e(t.severity,t.message,n);return}de(e,t.severity,n,t.code,t.args)}function VN(e){let t=e.validation.ValidationRegistry,n=e.validation.NowlineValidator,r={NowlineFile:[n.checkFileStructure,n.checkUniqueIdentifiers,n.checkSwimlaneRequired,n.checkIndentationConsistency,n.checkRoadmapOnlyKeywordsPosition,n.checkForwardReferences,n.checkReferenceResolution,n.checkInlineDatePins,n.checkCircularDependencies,n.checkWaves,n.checkDuplicateSizeIds,n.checkCalendarBlockConsistency,n.checkHiddenTimelineStrip,n.checkPersonDeclarations,n.checkDuplicateSymbolIds,n.checkSymbolReferences],NowlineDirective:[n.checkDirectiveVersion,n.checkDirectiveProperties],IncludeOption:[n.checkIncludeMode],IncludeDeclaration:[n.checkIncludeDuplicateOptions],EntityProperty:[n.checkPropertyValues],RoadmapDeclaration:[n.checkEntityIdOrTitle,n.checkRoadmapProperties,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],AnchorDeclaration:[n.checkEntityIdOrTitle,n.checkAnchorRequiredDate,n.checkAnchorAgainstStart,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],SwimlaneDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkUtilizationOrdering,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],ItemDeclaration:[n.checkEntityIdOrTitle,n.checkItemRequiredDuration,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],ParallelBlock:[n.checkParallelMinChildren,n.checkNoComputedProperties,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],GroupBlock:[n.checkGroupMinChildren,n.checkNoComputedProperties,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],MilestoneDeclaration:[n.checkEntityIdOrTitle,n.checkMilestoneRequirement,n.checkMilestoneAgainstStart,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],FootnoteDeclaration:[n.checkEntityIdOrTitle,n.checkFootnoteOn,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],PersonDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],TeamDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],StyleDeclaration:[n.checkEntityIdOrTitle],StyleProperty:[n.checkStylePropertyEnum],SymbolDeclaration:[n.checkEntityIdOrTitle,n.checkSymbolDeclaration],LabelDeclaration:[n.checkEntityIdOrTitle,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],SizeDeclaration:[n.checkEntityIdOrTitle,n.checkSizeDeclaration,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],StatusDeclaration:[n.checkEntityIdOrTitle,n.checkStatusDeclaration,n.checkNoRawStyleProperties,n.checkUnknownEntityProperties],WaveDeclaration:[n.checkNoRawStyleProperties,n.checkNoFootnoteProperty,n.checkUnknownEntityProperties],DefaultDeclaration:[n.checkDefaultDeclaration,n.checkUtilizationOrdering],CalendarBlock:[n.checkCalendarBlock],ScaleBlock:[n.checkScaleBlock]};t.register(r,n)}var bh=class{checkFileStructure(t,n){let r=t.hasConfig?Ef.findNodeForKeyword(t.$cstNode,"config")?.offset:void 0,i=t.roadmapDecl?.$cstNode?.offset;r!==void 0&&i!==void 0&&r>i&&de(n,"error",{node:t,property:"hasConfig"},"NL.E0001");for(let o of t.includes){let s=o.$cstNode?.offset??0;r!==void 0&&s>r&&de(n,"error",{node:o},"NL.E0002"),i!==void 0&&s>i&&de(n,"error",{node:o},"NL.E0003")}}checkRoadmapOnlyKeywordsPosition(t,n){}checkDirectiveVersion(t,n){if(!sX.test(t.version)){de(n,"error",{node:t,property:"version"},"NL.E0100",{version:t.version});return}let r=parseInt(t.version.slice(1),10),i=parseInt(LN.slice(1),10);r>i&&de(n,"error",{node:t,property:"version"},"NL.E0101",{version:t.version,supported:LN})}checkDirectiveProperties(t,n){let r=new Set;for(let i of t.properties){let o=fe(i);if(!UN.has(o)){de(n,"error",{node:i,property:"key"},"NL.E0102",{key:o,allowed:[...UN].join(", ")});continue}if(r.has(o)&&de(n,"error",{node:i,property:"key"},"NL.E0103",{key:o}),r.add(o),o==="locale"){let s=i.value;uX.test(s)||de(n,"error",{node:i,property:"value"},"NL.E0104",{value:s})}}}checkEntityIdOrTitle(t,n){!t.name&&!t.title&&de(n,"error",{node:t},"NL.E0301",{type:t.$type})}checkUniqueIdentifiers(t,n){let r=new Map,i=(o,s)=>{if(!o)return;let a=r.get(o);a?de(n,"error",{node:s},"NL.E0300",{name:o,location:Eh(a)}):r.set(o,s)};t.roadmapDecl?.name&&i(t.roadmapDecl.name,t.roadmapDecl);for(let o of t.roadmapEntries)Yv(o,i);for(let o of t.configEntries)yr(o)&&o.name&&i(o.name,o)}checkIndentationConsistency(t,n){let r=t.$document?.textDocument.getText()??t.$cstNode?.text;if(!r)return;let i=r.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(" ")){de(n,"error",{node:t},"NL.E0005",{line:o+1});return}}}checkSwimlaneRequired(t,n){let r=t.roadmapEntries.some(wt);t.roadmapDecl&&!r&&de(n,"error",{node:t.roadmapDecl},"NL.E0004")}checkIncludeMode(t,n){fX.has(t.value)||de(n,"error",{node:t,property:"value"},"NL.E0200",{value:t.value})}checkIncludeDuplicateOptions(t,n){let r=new Set;for(let i of t.options){let o=i.key.replace(/:$/,"");r.has(o)&&de(n,"error",{node:i},"NL.E0201",{key:o}),r.add(o)}}checkPropertyValues(t,n){if(cu(t))return;let r=fe(t),i=t.value,o=t.values,s=i?[i]:o;switch(r){case"status":break;case"duration":i&&!uu.test(i)&&de(n,"error",{node:t,property:"value"},"NL.E0400",{value:i});break;case"size":i&&!GN(i)&&de(n,"error",{node:t,property:"value"},"NL.E0401",{value:i});break;case"effort":i&&!uu.test(i)&&de(n,"error",{node:t,property:"value"},"NL.E0402",{value:i});break;case"remaining":{if(i)if(iX.test(i)){let a=parseFloat(i);(a<0||a>100)&&de(n,"error",{node:t,property:"value"},"NL.E0404",{value:i})}else uu.test(i)||de(n,"error",{node:t,property:"value"},"NL.E0403",{value:i});break}case"date":case"start":i&&(!Ft.test(i)||Number.isNaN(new Date(i).getTime()))&&de(n,"error",{node:t,property:"value"},"NL.E0405",{key:r,value:i});break;case"scale":i&&!uu.test(i)&&de(n,"error",{node:t,property:"value"},"NL.E0406",{value:i});break;case"calendar":i&&!QW.has(i)&&de(n,"error",{node:t,property:"value"},"NL.E0407",{value:i});break;case"on":case"after":case"before":s.length===0&&de(n,"error",{node:t},"NL.E0408",{key:r});break;case"capacity":{if(!i)break;let a=t.$container,c=dX(a);if(c==="invalid")break;c==="lane"?(!BN.test(i)||parseFloat(i)<=0)&&n("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:t,property:"value"}):qv.test(i)?parseFloat(i)<=0&&n("error",`Item capacity "${i}" must be positive.`,{node:t,property:"value"}):BN.test(i)?parseFloat(i)<=0&&n("error",`Item capacity "${i}" must be positive.`,{node:t,property:"value"}):n("error",`Invalid item capacity "${i}". Use a positive integer (capacity:2), decimal (capacity:0.5), or percent literal (capacity:50%).`,{node:t,property:"value"});break}case"overcapacity":{n("error",'"overcapacity:" was removed. Use "utilization-over-at:none" (and/or "utilization-warn-at:none") to suppress the lane utilization underline.',{node:t});break}case"utilization-warn-at":case"utilization-over-at":{if(!i)break;if(!pX(t.$container)){n("error",`"${r}:" is only valid on "swimlane" or "default swimlane".`,{node:t});break}if(i===zN)break;if(qv.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(qN.test(i)){parseFloat(i)<=0&&n("error",`${r} value "${i}" must be positive.`,{node:t,property:"value"});break}if(lX.test(i)){n("error",`Ambiguous ${r} value "${i}". Use the percent form ("${i}%") or the decimal-fraction form ("0.${i}") to make the intent explicit.`,{node:t,property:"value"});break}n("error",`Invalid ${r} value "${i}". Use a positive percent (e.g. 80%), a positive decimal fraction (e.g. 0.8), or "none" to opt out.`,{node:t,property:"value"});break}case"capacity-icon":break;case"icon":break;case"non-working":gn(t.$container)&&XN(i,t,n);break;default:if(vh.has(r)){if(r==="bg"||r==="fg"||r==="text")i&&!WN(i)&&de(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r in _h){let a=_h[r];i&&!a.has(i)&&de(n,"error",{node:t,property:"value"},"NL.E0802",{value:i,key:r,allowed:[...a].join(", ")})}}break}}checkAnchorRequiredDate(t,n){t.properties.find(i=>fe(i)==="date")||de(n,"error",{node:t},"NL.E0500",{name:it(t)})}checkAnchorAgainstStart(t,n){let r=t.properties.find(a=>fe(a)==="date");if(!r?.value)return;let i=r.value;if(!Ft.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=jv(t.$container);switch(s.kind){case"invalid":return;case"missing":de(n,"error",{node:r,property:"value"},"NL.E0501",{name:it(t)});return;case"valid":o<s.date&&de(n,"error",{node:r,property:"value"},"NL.E0502",{name:it(t),date:i,start:s.iso});return}}checkMilestoneRequirement(t,n){let r=t.properties.some(o=>fe(o)==="date"),i=t.properties.some(o=>fe(o)==="after");!r&&!i&&de(n,"error",{node:t},"NL.E0503",{name:it(t)})}checkMilestoneAgainstStart(t,n){let r=t.properties.find(a=>fe(a)==="date");if(!r?.value)return;let i=r.value;if(!Ft.test(i))return;let o=new Date(i);if(Number.isNaN(o.getTime()))return;let s=jv(t.$container);switch(s.kind){case"invalid":return;case"missing":n("error",`Milestone "${it(t)}" has a date but the roadmap is missing "start:". Add start:YYYY-MM-DD to the roadmap.`,{node:r,property:"value"});return;case"valid":o<s.date&&de(n,"error",{node:r,property:"value"},"NL.E0504",{name:it(t),date:i,start:s.iso});return}}checkFootnoteOn(t,n){t.properties.some(i=>fe(i)==="on")||de(n,"error",{node:t},"NL.E0505")}checkNoFootnoteProperty(t,n){for(let r of t.properties)fe(r)==="footnote"&&n("error",`Property "footnote:" is not valid on ${hh(t)}. Footnotes attach via "on:" on the footnote declaration \u2014 declare \`footnote <id> on:<target-id>\` instead.`,{node:r})}checkItemRequiredDuration(t,n){let r=t.properties.some(o=>fe(o)==="duration"),i=t.properties.some(o=>fe(o)==="size");!r&&!i&&de(n,"error",{node:t},"NL.E0600",{name:it(t)})}checkNoComputedProperties(t,n){for(let r of t.properties){let i=fe(r);(i==="size"||i==="duration"||i==="remaining"||i==="capacity")&&n("error",`"${i}" is not valid on ${t.$type==="ParallelBlock"?"parallel":"group"} (computed from children).`,{node:r})}}checkParallelMinChildren(t,n){let r=t.content.filter(i=>!gr(i));r.length===0?n("error","Parallel block must contain at least 2 children.",{node:t}):r.length===1&&n("warning","Parallel block has only 1 child. Use at least 2 for parallel execution.",{node:t})}checkGroupMinChildren(t,n){t.content.filter(i=>!gr(i)).length===0&&n("error","Group must contain at least 1 child.",{node:t})}checkNoRawStyleProperties(t,n){for(let r of t.properties){let i=fe(r);vh.has(i)&&de(n,"error",{node:r},"NL.E0804",{key:i,entity:hh(t)})}}checkUnknownEntityProperties(t,n){let r=tX[t.$type];if(!r)return;let i=t.$type==="ParallelBlock"||t.$type==="GroupBlock"?new Set(["size","duration","remaining","capacity"]):null;for(let o of t.properties){let s=fe(o);if(r.has(s)||MN.has(s)||vh.has(s)||s==="footnote"||i?.has(s)||s==="wave"||cu(o))continue;let a=[...r,...MN],c=rX(s,r)??EN(s,a)??"";de(n,"warning",{node:o,property:"key"},"NL.W0700",{key:s,entity:hh(t),suggested:c})}}checkRoadmapProperties(t,n){}checkStylePropertyEnum(t,n){let r=fe(t),i=t.value;if(r==="bg"||r==="fg"||r==="text")WN(i)||de(n,"error",{node:t,property:"value"},"NL.E0801",{value:i,key:r});else if(r==="non-working")XN(i,t,n);else if(r in _h){let o=_h[r];o.has(i)||de(n,"error",{node:t,property:"value"},"NL.E0802",{value:i,key:r,allowed:[...o].join(", ")})}else vh.has(r)||de(n,"error",{node:t,property:"key"},"NL.E0803",{key:r})}checkSizeDeclaration(t,n){t.properties.find(i=>fe(i)==="effort")||n("error",`Size "${it(t)}" requires an "effort:" property.`,{node:t}),t.name&&(uu.test(t.name)||aX.test(t.name))&&n("error",`Size id "${t.name}" collides with the raw duration pattern. Choose a different name (e.g. "xs", "small", "quarter").`,{node:t,property:"name"})}checkStatusDeclaration(t,n){t.name&&Xv.has(t.name)&&n("error",`Status id "${t.name}" collides with the built-in status value. Built-ins: ${[...Xv].join(", ")}.`,{node:t,property:"name"})}checkWaves(t,n){for(let o of yh(t))Hv(n,o);for(let o of xh(t))Hv(n,o);let r=Zn(t);if(r.length===0)return;let i={lanes:t.roadmapEntries.filter(wt),lookup:nl(t)};for(let o of rl(i,r))Hv(n,o)}checkDuplicateSizeIds(t,n){let r=new Map;for(let i of t.roadmapEntries)if(Go(i)&&i.name){let o=r.get(i.name);o?n("error",`Duplicate size id "${i.name}". First declared at ${Eh(o)}.`,{node:i,property:"name"}):r.set(i.name,i)}}checkUtilizationOrdering(t,n){if(gn(t)&&t.entityType!=="swimlane")return;let r=t.properties.find(a=>fe(a)==="utilization-warn-at"),i=t.properties.find(a=>fe(a)==="utilization-over-at");if(!r||!i)return;let o=jN(r.value),s=jN(i.value);o===null||s===null||o>s&&n("error",`utilization-warn-at (${r.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:r,property:"value"})}checkDefaultDeclaration(t,n){if(!DN.has(t.entityType)){n("error",`"${t.entityType}" is not a supported entity type for default. Allowed: ${[...DN].join(", ")}.`,{node:t,property:"entityType"});return}let r=t.$container,i=-1;for(let s=0;s<r.configEntries.length;s++){let a=r.configEntries[s];if(gn(a)&&a.entityType===t.entityType){if(i<0)i=s;else if(a===t){n("error",`Duplicate "default ${t.entityType}" declaration. Only one is allowed per entity type per file.`,{node:t});break}}}let o=eX[t.entityType];if(o)for(let s of t.properties){let a=fe(s);o.has(a)&&n("error",mh(a,t.entityType),{node:s})}if(t.entityType!=="roadmap")for(let s of t.properties){let a=fe(s);ZW.has(a)&&de(n,"warning",{node:s,property:"key"},"NL.W0703",{key:a,entityType:t.entityType})}}checkHiddenTimelineStrip(t,n){let r=t.roadmapDecl;if(!r)return;let i=new Map,o;for(let h of t.configEntries)yr(h)&&h.name&&!i.has(h.name)?i.set(h.name,h):gn(h)&&h.entityType==="roadmap"&&(o??(o=h));let s=new Map;for(let h of t.roadmapEntries)if(Ka(h)&&h.name&&!s.has(h.name)){let g=h.properties.find(_=>fe(_)==="style");s.set(h.name,g?.value)}let a,c,l=h=>{for(let g of h){let _=fe(g);_==="header-height"?a=g:_==="timeline-position"&&(c=g)}},u=h=>{if(!h)return!0;let g=i.get(h);return g&&l(g.properties),g!==void 0};if(o){let h=o.properties.find(g=>fe(g)==="style");if(!u(h?.value))return;l(o.properties)}let f=r.properties.find(h=>fe(h)==="labels"),d=f?.value?[f.value]:f?.values??[];for(let h of[...d].reverse())if(!s.has(h)||!u(s.get(h)))return;let p=r.properties.find(h=>fe(h)==="style");u(p?.value)&&a?.value==="none"&&(c?.value!=="bottom"&&c?.value!=="both"||de(n,"warning",{node:c,property:"value"},"NL.W0704",{position:c.value}))}checkCalendarBlockConsistency(t,n){let r=t.configEntries.filter(fh),o=t.roadmapDecl?.properties.find(s=>fe(s)==="calendar")?.value;if(r.length>0&&o!=="custom")for(let s of r)n("error",'A "calendar" config block is only valid when the roadmap declares calendar:custom.',{node:s});if(o==="custom"&&r.length===0&&n("error",'calendar:custom requires a "calendar" config block with days-per-week, days-per-month, days-per-quarter, and days-per-year.',{node:t.roadmapDecl,property:"properties"}),o==="custom"&&r.length>0)for(let s of r){let a=new Set(s.properties.map(c=>fe(c)));for(let c of Gv)a.has(c)||n("error",`calendar:custom requires "${c}" in the calendar config block.`,{node:s})}}checkCalendarBlock(t,n){let r=new Set;for(let i of t.properties){let o=fe(i);if(!Gv.has(o)){n("error",`Unknown calendar property "${o}". Allowed: ${[...Gv].join(", ")}.`,{node:i,property:"key"});continue}r.has(o)&&n("error",`Duplicate calendar property "${o}".`,{node:i,property:"key"}),r.add(o),(!FN.test(i.value)||parseInt(i.value,10)<=0)&&n("error",`"${o}" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkScaleBlock(t,n){let r=new Set;for(let i of t.properties){let o=fe(i);if(!$N.has(o)){n("error",`Unknown scale property "${o}". Allowed: ${[...$N].join(", ")}.`,{node:i,property:"key"});continue}r.has(o)&&n("error",`Duplicate scale property "${o}".`,{node:i,property:"key"}),r.add(o),o==="label-every"&&(!FN.test(i.value)||parseInt(i.value,10)<=0)&&n("error",`"label-every" must be a positive integer, got "${i.value}".`,{node:i,property:"value"})}}checkForwardReferences(t,n){let r=new Map,i=new Map;for(let o=0;o<t.roadmapEntries.length;o++){let s=t.roadmapEntries[o];Go(s)&&s.name?r.has(s.name)||r.set(s.name,o):Ja(s)&&s.name&&(i.has(s.name)||i.set(s.name,o))}for(let o=0;o<t.roadmapEntries.length;o++){let s=t.roadmapEntries[o];HN(s,a=>{if(cu(a))return;let c=fe(a);if(c==="size"&&a.value){let l=a.value,u=r.get(l);u===void 0?n("error",`Size "${l}" is not declared. Add "size ${l} effort:<literal>" earlier in the roadmap section.`,{node:a,property:"value"}):u>=o&&n("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(Xv.has(l))return;let u=i.get(l);u===void 0?n("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&&n("error",`Status "${l}" is referenced before its declaration. Move "status ${l}" above this entity.`,{node:a,property:"value"})}})}}checkReferenceResolution(t,n){let r=hX(t),i=o=>{HN(o,s=>{let a=fe(s);if(a!=="after"&&a!=="before"&&a!=="on"||cu(s))return;let c=s.value?[s.value]:s.values;for(let l of c)l&&((a==="after"||a==="before")&&Ft.test(l)||r.has(l)||n("error",`${a}: reference "${l}" does not resolve to any declared entity in this file.`,{node:s}))})};for(let o of t.roadmapEntries)i(o)}checkInlineDatePins(t,n){let r=jv(t),i=o=>{let s=o.properties??[],a=on(o),c=Mt(o)||vt(o)||je(o)||a;for(let l of s){let u=fe(l);if(u!=="after"&&u!=="before"||a&&u==="before")continue;let d=(l.value?[l.value]:l.values).filter(p=>!!p&&Ft.test(p));if(d.length!==0){if(!c){de(n,"error",{node:l},"NL.E0411",{key:u,type:su(o)});continue}d.length>1&&de(n,"error",{node:l},"NL.E0410",{key:u});for(let p of d)switch(r.kind){case"invalid":continue;case"missing":de(n,"error",{node:l},"NL.E0412",{key:u,date:p});continue;case"valid":{let h=new Date(p);if(Number.isNaN(h.getTime()))continue;h<r.date&&de(n,"error",{node:l},"NL.E0413",{key:u,date:p,start:r.iso})}}}}if(wt(o))for(let l of o.content)i(l);else if(vt(o)||je(o))for(let l of o.content)i(l)};for(let o of t.roadmapEntries)i(o)}checkCircularDependencies(t,n){let r=new Map,i=(p,h)=>{r.has(p)||r.set(p,new Set),r.get(p).add(h)},o=(p,h,g)=>{if(p)for(let _ of h){let x=fe(_);if(x==="after"){let y=_.value?[_.value]:_.values;for(let w of y)w&&(Ft.test(w)||i(p,w))}else if(x==="before"){let y=_.value?[_.value]:_.values;for(let w of y)w&&(Ft.test(w)||i(w,p))}}},s=p=>{if(on(p))return;let h=p.name,g=p.properties??[];if(o(h,g,t),wt(p))for(let _ of p.content)s(_);else if(vt(p)||je(p))for(let _ of p.content)s(_)};for(let p of t.roadmapEntries)s(p);let a=0,c=1,l=2,u=new Map;for(let p of r.keys())u.set(p,a);let f=new Set,d=(p,h)=>{u.set(p,c),h.push(p);for(let g of r.get(p)??[]){let _=u.get(g)??a;if(_===c){let x=h.indexOf(g),y=h.slice(x).concat(g),w=[...y].sort().join("\u2192");f.has(w)||(f.add(w),n("error",`Circular dependency detected: ${y.join(" \u2192 ")}.`,{node:t.roadmapDecl??t}))}else _===a&&d(g,h)}h.pop(),u.set(p,l)};for(let p of r.keys())(u.get(p)??a)===a&&d(p,[])}checkPersonDeclarations(t,n){let r=new Map,i=a=>!!a.title||a.properties.length>0||a.description!==void 0,o=a=>{if(!a.name)return;let c=i(a);r.has(a.name)||r.set(a.name,[]),r.get(a.name).push({node:a,isDeclaration:c}),!c&&a.$container.$type==="NowlineFile"&&n("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)Cn(c)?o(c):Ut(c)&&s(c)};for(let a of t.roadmapEntries)Cn(a)?o(a):Ut(a)&&s(a);for(let[a,c]of r){let l=c.filter(u=>u.isDeclaration);if(l.length>1)for(let u=1;u<l.length;u++)n("error",`Person "${a}" is declared more than once. First declaration at ${Eh(l[0].node)}.`,{node:l[u].node})}}checkSymbolDeclaration(t,n){t.name&&wh.has(t.name)&&de(n,"error",{node:t,property:"name"},"NL.E0805",{name:t.name,builtins:[...wh].sort().join(", ")});let r=t.properties.find(o=>fe(o)==="unicode");r?(!r.value||r.value.length===0)&&de(n,"error",{node:r,property:"value"},"NL.E0807",{name:it(t)}):de(n,"error",{node:t},"NL.E0806",{name:it(t)});let i=t.properties.find(o=>fe(o)==="ascii");if(i){let o=i.value??"";cX.test(o)||de(n,"error",{node:i,property:"value"},"NL.E0808",{name:it(t),length:o.length})}for(let o of t.properties){let s=fe(o);s!=="unicode"&&s!=="ascii"&&s!=="link"&&s!=="description"&&de(n,"error",{node:o,property:"key"},"NL.E0809",{key:s})}}checkDuplicateSymbolIds(t,n){let r=new Map;for(let i of t.configEntries)if(jo(i)&&i.name){let o=r.get(i.name);o?de(n,"error",{node:i,property:"name"},"NL.E0810",{name:i.name,location:Eh(o)}):r.set(i.name,i)}}checkSymbolReferences(t,n){let r=new Map;for(let o=0;o<t.configEntries.length;o++){let s=t.configEntries[o];jo(s)&&s.name&&(r.has(s.name)||r.set(s.name,o))}let i=(o,s,a,c)=>{if(s!=="icon"&&s!=="capacity-icon"||!a||!GN(a)||s==="capacity-icon"&&zv.has(a)||s==="icon"&&wh.has(a))return;let l=r.get(a);if(l===void 0){let u=s==="capacity-icon"?[...zv].sort().join(", "):[...wh].sort().join(", ");de(n,"error",{node:c,property:"value"},"NL.E0811",{key:s,value:a,builtins:u})}else l>=o&&de(n,"error",{node:c,property:"value"},"NL.E0812",{key:s,value:a})};for(let o=0;o<t.configEntries.length;o++){let s=t.configEntries[o];if(yr(s))for(let a of s.properties)i(o,fe(a),a.value,a);else if(gn(s))for(let a of s.properties)i(o,fe(a),a.value,a)}}};function WN(e){return JW.has(e)||oX.test(e)}function XN(e,t,n){e===void 0||KW.has(e)||de(n,"error",{node:t,property:"value"},"NL.E0800",{value:e})}function GN(e){return/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e)}function dX(e){return e?wt(e)?"lane":Mt(e)?"item":gn(e)?e.entityType==="swimlane"?"lane":"item":"invalid":"invalid"}function pX(e){return e?!!(wt(e)||gn(e)&&e.entityType==="swimlane"):!1}function jN(e){if(!e||e===zN)return null;if(qv.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t/100:null}if(qN.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?t:null}return null}function Eh(e){let t=e.$cstNode;return t?`line ${t.range.start.line+1}`:"unknown location"}function Yv(e,t){if(wt(e)){t(e.name,e);for(let n of e.content)Vv(n,t)}else Cn(e)?t(e.name,e):Ut(e)?YN(e,t):(Ki(e)||Pn(e)||ou(e)||Ka(e)||Go(e)||Ja(e)||on(e))&&t(e.name,e)}function YN(e,t){t(e.name,e);for(let n of e.content)Ut(n)&&YN(n,t)}function Vv(e,t){if(Mt(e))t(e.name,e);else if(vt(e)){t(e.name,e);for(let n of e.content)Vv(n,t)}else if(je(e)){t(e.name,e);for(let n of e.content)Vv(n,t)}}function HN(e,t){let n=r=>{let i=r.properties;if(Array.isArray(i))for(let o of i)t(o);if(wt(r))for(let o of r.content)n(o);else if(vt(r)||je(r))for(let o of r.content)n(o);else if(Ut(r))for(let o of r.content)(Ut(o)||Cn(o))&&n(o)};n(e)}function hX(e){let t=new Set;e.roadmapDecl?.name&&t.add(e.roadmapDecl.name);let n=r=>{let i=r.name;if(i&&t.add(i),wt(r))for(let o of r.content)n(o);else if(vt(r)||je(r))for(let o of r.content)n(o);else if(Ut(r))for(let o of r.content)Ut(o)||Cn(o)?n(o):YS(o)};for(let r of e.roadmapEntries)n(r);return t}function il(e){return t=>e.anchors.get(t)??e.milestones.get(t)??e.waves?.get(t)}function mX(e){let t=e.$document?.parseResult;return!!t&&(t.lexerErrors.length>0||t.parserErrors.length>0)}function ZN(e,t,n){return n||mX(e)?!1:!!e.roadmapDecl||t.swimlanes.size>0||Zn(e).length>0}function zo(e,t,n,r,...i){return{severity:e,message:qr("en-US",r,...i),sourcePath:t,...n===void 0?{}:{line:n},code:r,args:i,rule:"wave"}}function Ah(e){return e.map(t=>t.name)}function KN(e){let t=n=>{let r=e.properties.find(i=>fe(i)===n);return r?r.value??r.values.join(", "):""};return{title:e.title===void 0?"":yn(e.title),style:t("style"),labels:t("labels"),link:t("link"),description:e.description?yn(e.description.text):""}}var gX=["title","style","labels","link","description"];function JN(e,t,n){let r={diagnostics:[],failed:!1};if(n.mode==="ignore"||!n.participates||n.childFile.roadmapEntries.some(p=>on(p)&&!p.name))return r;let i=n.parentAbs,o=n.inc.$cstNode?.range.start.line,s=n.childRelPath,a=Zn(e),c=Zn(n.childFile),l=p=>({diagnostics:[p],failed:!0});if(a.length===0&&c.length===0)return r;if(c.length===0)return l(zo("error",i,o,"NL.E0202",{reason:"child-none",path:s,parent:Ah(a)}));if(a.length===0)return l(zo("error",i,o,"NL.E0202",{reason:"parent-none",path:s,child:Ah(c)}));if(a.length!==c.length||a.some((p,h)=>p.name!==c[h].name))return l(zo("error",i,o,"NL.E0202",{reason:"mismatch",path:s,child:Ah(c),parent:Ah(a)}));let u=il(t),f=il(n.childContent);for(let p=0;p<a.length;p++){let h=lu(a[p],u)?.date??null,g=lu(c[p],f)?.date??null;if(h!==g)return l(zo("error",i,o,"NL.E0202",{reason:"floor",id:a[p].name,path:s,childFloor:g,parentFloor:h}))}let d=[];for(let p=0;p<a.length;p++){let h=KN(a[p]),g=KN(c[p]),_=gX.filter(x=>h[x]!==g[x]).map(x=>({field:x,there:g[x],here:h[x]}));_.length!==0&&d.push(zo("warning",i,o,"NL.W0701",{id:a[p].name,path:s,fields:_}))}return{diagnostics:d,failed:!1}}function yX(e){let t=e;for(;t&&!Za(t);)t=t.$container;return t}function QN(e){let{rootFile:t,rootAbs:n,rootContent:r,files:i,edges:o,failed:s}=e,a=[],c=new Set,l=b=>{let L=JSON.stringify([b.sourcePath,b.line,b.code,b.args,b.message]);c.has(L)||(c.add(L),a.push(b))},u=b=>{let L=yX(b);return L?i.get(L):void 0},f=(b,L)=>{let P=b.node.$cstNode?.range.start.line;return"message"in b?{severity:b.severity,message:b.message,sourcePath:L,...P===void 0?{}:{line:P},rule:"wave"}:zo(b.severity,L,P,b.code,b.args)},d=[],p=new Set([n]),h=b=>{for(let L of o.get(b)??[])L.mode==="ignore"||!L.participates||p.has(L.childAbs)||(p.add(L.childAbs),s.has(L.childAbs)||d.push({file:L.childFile,abs:L.childAbs}),h(L.childAbs))};h(n);let g=Zn(t),_=new Map(g.map(b=>[b.name,b]));for(let{file:b,abs:L}of d){for(let O of yh(b))l(f(O,L));for(let O of xh(b))l(f(O,L));if(_.size===0)continue;let P=(O,j)=>{let z=O===void 0?void 0:_.get(O);if(!z||on(j))return;let F=z.$cstNode?z.$cstNode.range.start.line+1:0;l(zo("error",L,j.$cstNode?.range.start.line,"NL.E0300",{name:O,location:`${tl(n)}:${F}`}))};b.roadmapDecl&&P(b.roadmapDecl.name,b.roadmapDecl);for(let O of b.roadmapEntries)Yv(O,P);for(let O of b.configEntries)yr(O)&&P(O.name,O)}if(g.length===0)return a;let x=b=>"message"in b?b.message:`${b.code}\0${JSON.stringify(b.args)}`,y=new Map,w={lanes:t.roadmapEntries.filter(wt),lookup:nl(t)};for(let b of rl(w,g,{suppressCycleRefs:!1})){let L=y.get(b.node)??new Set;L.add(x(b)),y.set(b.node,L)}let v=b=>{for(let L of b){if(y.get(L.node)?.has(x(L)))continue;let P=u(L.node);P===void 0||s.has(P)||l(f(L,P))}};v(rl({lanes:[...r.swimlanes.values()],lookup:il(r)},g,{suppressCycleRefs:!1}));for(let b of r.isolatedRegions){let L=b.content.roadmap?u(b.content.roadmap):void 0;if(L!==void 0&&s.has(L))continue;let P=[...b.content.waves?.values()??[]];P.length!==0&&v(rl({lanes:[...b.content.swimlanes.values()],lookup:il(b.content)},P,{suppressCycleRefs:!1}))}return a}var TX=/^\d{4}-\d{2}-\d{2}$/;function nP(e){let t=e?.properties.find(n=>n.key==="start");if(t?.value&&TX.test(t.value)&&!Number.isNaN(new Date(t.value).getTime()))return t.value}function vX(e,t,n){return t&&n?`Included "${e}" declares start:${n}, which doesn't match this file's start:${t}. Both files must declare the same start date, or neither should.`:t?`Included "${e}" has no start:, but this file declares start:${t}. Both files must declare the same start date, or neither should.`:`Included "${e}" declares start:${n}, but this file has no start:. Both files must declare the same start date, or neither should.`}function ol(e){return e.code!==void 0||e.rule==="wave"}function rP(){return{styles:new Map,defaults:new Map,symbols:new Map}}function iP(){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 Zv(e,t,n){let r=n.readFile??(async c=>{let{nodeReadFile:l}=await Promise.resolve().then(()=>(tP(),eP));return l(c)}),i={services:n.services,diagnostics:[],resolving:[],processed:new Map,readFile:r,files:new Map,edges:new Map,stubs:new Set,failedWaves:new Set},o=Fv("",t),{config:s,content:a}=await sP(e,o,i);return i.diagnostics.push(...QN({rootFile:e,rootAbs:o,rootContent:a,files:i.files,edges:i.edges,failed:i.failedWaves})),{config:s,content:a,diagnostics:i.diagnostics,processedFiles:new Set(i.processed.keys())}}async function sP(e,t,n){if(n.processed.has(t))return n.processed.get(t);if(n.resolving.includes(t)){n.diagnostics.push({severity:"error",message:`Circular include detected: ${[...n.resolving,t].join(" \u2192 ")}`,sourcePath:t});let l={config:rP(),content:iP()};return n.stubs.add(l.content),n.processed.set(t,l),l}n.resolving.push(t),n.files.set(e,t);let r=rP(),i=iP();bX(r,e),IX(i,e);let o=Zn(e);o.length>0&&(i.waves=new Map(o.map(l=>[l.name,l])));let s=[];n.edges.set(t,s);let a=new Set;for(let l of e.includes){let u=l.path,f=Fv(wN(t),u);if(a.has(f)){n.diagnostics.push({severity:"error",message:`Duplicate include "${u}" in ${tl(t)}.`,sourcePath:t,line:l.$cstNode?.range.start.line});continue}a.add(f);let d=oP(l,"config")??"merge",p=oP(l,"roadmap")??"merge",h;try{let x=await n.readFile(f);h=await wX(n.services,x,f)}catch(x){n.diagnostics.push({severity:"error",message:`Could not read include "${u}": ${x.message}`,sourcePath:t,line:l.$cstNode?.range.start.line});continue}let{config:g,content:_}=await sP(h,f,n);if(s.push({parentAbs:t,inc:l,childRelPath:u,childAbs:f,mode:p,childFile:h,childContent:_,participates:ZN(h,_,n.stubs.has(_))}),_X(r,g,d,f,n.diagnostics),EX(i,_,g,p,f,u,n.diagnostics),p==="isolate"&&!_.roadmap&&n.diagnostics.push({severity:"error",message:`Cannot isolate "${u}": it has no roadmap declaration.`,sourcePath:t,line:l.$cstNode?.range.start.line}),p!=="ignore"&&h.roadmapDecl){let x=nP(e.roadmapDecl),y=nP(h.roadmapDecl);x!==y&&n.diagnostics.push({severity:"error",message:vX(u,x,y),sourcePath:t,line:l.$cstNode?.range.start.line})}}i.waves&&kX(i,i.waves);for(let l of s){let{diagnostics:u,failed:f}=JN(e,i,l);n.diagnostics.push(...u),f&&n.failedWaves.add(l.childAbs)}n.resolving.pop();let c={config:r,content:i};return n.processed.set(t,c),c}function oP(e,t){let n=e.options.find(r=>r.key===t);if(n&&(n.value==="merge"||n.value==="ignore"||n.value==="isolate"))return n.value}async function wX(e,t,n){let r=gt.file(n),o=e.shared.workspace.LangiumDocumentFactory.fromString(t,r);return await e.shared.workspace.DocumentBuilder.build([o],{validation:!1}),o.parseResult.value}function _X(e,t,n,r,i){if(n==="ignore"||n==="isolate")return;let o=(s,a)=>i.push({severity:"warning",message:`${a} "${s}" from ${tl(r)} is shadowed by the parent's definition.`,sourcePath:r});Kv(e.styles,t.styles,s=>o(s,"Style")),Kv(e.defaults,t.defaults,s=>o(s,"Default")),Kv(e.symbols,t.symbols,s=>o(s,"Symbol")),t.scale&&!e.scale&&(e.scale=t.scale),t.calendar&&!e.calendar&&(e.calendar=t.calendar)}function EX(e,t,n,r,i,o,s){if(r==="ignore")return;if(r==="isolate"){t.roadmap&&e.isolatedRegions.push({sourcePath:o,config:n,content:t});return}let a=(c,l)=>s.push({severity:"warning",message:`${l} "${c}" from ${tl(i)} is shadowed by the parent's definition.`,sourcePath:i});Vr(e.persons,t.persons,c=>a(c,"Person")),Vr(e.teams,t.teams,c=>a(c,"Team")),Vr(e.anchors,t.anchors,c=>a(c,"Anchor")),Vr(e.labels,t.labels,c=>a(c,"Label")),Vr(e.sizes,t.sizes,c=>a(c,"Size")),Vr(e.statuses,t.statuses,c=>a(c,"Status")),Vr(e.swimlanes,t.swimlanes,c=>a(c,"Swimlane")),Vr(e.milestones,t.milestones,c=>a(c,"Milestone")),Vr(e.footnotes,t.footnotes,c=>a(c,"Footnote")),t.roadmap&&!e.roadmap&&(e.roadmap=t.roadmap)}function Kv(e,t,n){for(let[r,i]of t){if(e.has(r)){e.get(r)!==i&&n(r);continue}e.set(r,i)}}function Vr(e,t,n){let r=new Set(e.values());for(let[i,o]of t)if(!r.has(o)){if(!o.name&&o.title){e.set(Jv(e,aP(o.title)),o);continue}if(e.has(i)){n(i);continue}e.set(i,o)}}function bX(e,t){for(let n of t.configEntries)AX(e,n)}function AX(e,t){KS(t)?e.scale||(e.scale=t):fh(t)?e.calendar||(e.calendar=t):yr(t)?t.name&&!e.styles.has(t.name)&&e.styles.set(t.name,t):jo(t)?t.name&&!e.symbols.has(t.name)&&e.symbols.set(t.name,t):gn(t)&&(e.defaults.has(t.entityType)||e.defaults.set(t.entityType,t))}function RX(e){let t={swimlanes:new Set,persons:new Set,teams:new Set,anchors:new Set,labels:new Set,sizes:new Set,statuses:new Set,milestones:new Set,footnotes:new Set};for(let n of e){let r=n.name;if(r){if(wt(n))t.swimlanes.add(r);else if(Cn(n))t.persons.add(r);else if(Ut(n))t.teams.add(r);else if(Ki(n))t.anchors.add(r);else if(Ka(n))t.labels.add(r);else if(Go(n))t.sizes.add(r);else if(Ja(n))t.statuses.add(r);else if(Pn(n))t.milestones.add(r);else if(ou(n))t.footnotes.add(r);else if(on(n))for(let i of Object.values(t))i.add(r)}}return t}function kX(e,t){let n=[e.persons,e.teams,e.anchors,e.labels,e.sizes,e.statuses,e.swimlanes,e.milestones,e.footnotes],r=(i,o)=>t.has(i)&&!o.name&&!!o.title;for(let i of n){let o=[...i];if(!o.some(([a,c])=>r(a,c)))continue;let s=new Set([...i.keys(),...t.keys()]);i.clear();for(let[a,c]of o){let l=r(a,c)?Jv(i,a,s):a;s.add(l),i.set(l,c)}}}function IX(e,t){t.roadmapDecl&&!e.roadmap&&(e.roadmap=t.roadmapDecl);let n=RX(t.roadmapEntries);for(let r of t.roadmapEntries)SX(e,r,n)}function aP(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"entity"}function Jv(e,t,n){let r=o=>e.has(o)||(n?.has(o)??!1);if(!r(t))return t;let i=2;for(;r(`${t}-${i}`);)i++;return`${t}-${i}`}function Yr(e,t,n){t.name?e.has(t.name)||e.set(t.name,t):t.title&&e.set(Jv(e,aP(t.title),n),t)}function SX(e,t,n){wt(t)?Yr(e.swimlanes,t,n.swimlanes):Cn(t)?Yr(e.persons,t,n.persons):Ut(t)?Yr(e.teams,t,n.teams):Ki(t)?Yr(e.anchors,t,n.anchors):Ka(t)?Yr(e.labels,t,n.labels):Go(t)?Yr(e.sizes,t,n.sizes):Ja(t)?Yr(e.statuses,t,n.statuses):Pn(t)?Yr(e.milestones,t,n.milestones):ou(t)&&Yr(e.footnotes,t,n.footnotes)}var Qv=class extends ra{runConverter(t,n,r){return t.name==="PROPERTY_KEY_WITH_COLON"||t.name==="INCLUDE_OPTION_KEY"?n.endsWith(":")?n.slice(0,-1):n:super.runConverter(t,n,r)}},ew=class extends eu{isStartOfLine(t,n){if(!super.isStartOfLine(t,n))return!1;let r=n-1;for(;r>=0&&(t[r]===" "||t[r]===" ");)r--;for(;r>=0&&(t[r]==="\r"||t[r]===`
2769
2769
  `);)r--;for(;r>=0&&(t[r]===" "||t[r]===" ");)r--;return r<0||t[r]!=="\\"}},lP={parser:{TokenBuilder:()=>new ew({indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[["[","]"]]}),Lexer:e=>new ih(e),ParserConfig:()=>({maxLookahead:4}),ValueConverter:()=>new Qv},validation:{NowlineValidator:()=>new bh}};function tw(e={}){let t=e.shared??Oa(rh(oh),QS),n=Oa(nh({shared:t}),eN,lP);return t.ServiceRegistry.register(n),VN(n),{shared:t,Nowline:n}}function nw(e,t){return t.code===void 0?t.message:qr(e,t.code,...t.args??[])}function rw(e){let{content:t}=e,n=[...t.waves?.values()??[]];if(n.length===0)return;let r=new Map;n.forEach((u,f)=>{r.set(u.name,f+1)});let i=il(t),o=n.map(u=>lu(u,i)),s=new WeakMap,a=new WeakMap,c=u=>{let f=gh(u,r);for(let[d,p]of f.waveOf)s.set(d,p);for(let[d,p]of f.leadOf)a.set(d,p)};c([...t.swimlanes.values()]);for(let u of t.isolatedRegions)c([...u.content.swimlanes.values()]);let l=u=>Mt(u)?s.get(u):void 0;return{waves:n,index:r,floors:o,waveOf:s,leadOf:a,memberWave:l,isMember:(u,f)=>{let d=l(u);return d!==void 0&&(f===void 0||d===f)}}}var Rh=class{constructor(t){S(this,"items");S(this,"brackets");this.items=t.itemBars,this.brackets=t.brackets}hasObstacle(t,n,r){let i=Math.min(n,r),o=Math.max(n,r);for(let s of this.items)if(!(t<=s.x||t>=s.x+s.width)&&!(s.y+s.height<=i||s.y>=o))return!0;return!1}bracketsNear(t,n,r,i){let o=Math.min(n,r),s=Math.max(n,r),a=[];for(let c of this.brackets)Math.abs(c.x-t)>i||c.yBottom<=o||c.yTop>=s||a.push(c);return a}};function cP(e,t){let n=[],r=[],i=s=>{if(s.kind==="item"){n.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;r.push({x:f,yTop:l,yBottom:u}),r.push({x:d,yTop:l,yBottom:u}),r.push({x:f+4,yTop:l-1,yBottom:l+1}),r.push({x:f+4,yTop:u-1,yBottom:u+1}),r.push({x:d-4,yTop:l-1,yBottom:l+1}),r.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"&&r.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 e)o(s);for(let s of t)for(let a of s.nestedSwimlanes)o(a);return{itemBars:n,brackets:r}}function NX(e,t){let{from:n,to:r}=e;if(Math.abs(n.y-r.y)<.5)return{x:(n.x+r.x)/2,underBar:!1,range:null};let i=Math.min(n.y,r.y),o=Math.max(n.y,r.y);if(n.x<=r.x){let a=n.x+6,c=r.x-6;if(a>c)return{x:r.x-6,underBar:!0,range:null};let l={minX:a,maxX:c},u=(n.x+r.x)/2,f=Math.max(a,Math.min(c,u));if(!t.hasObstacle(f,i,o))return{x:f,underBar:!1,range:l};let d=c-a;for(let p=1;p<=d;p++){let h=f-p;if(h>=a&&!t.hasObstacle(h,i,o))return{x:h,underBar:!1,range:l};let g=f+p;if(g<=c&&!t.hasObstacle(g,i,o))return{x:g,underBar:!1,range:l}}return{x:f,underBar:!0,range:l}}let s=[n.x+10,r.x-10];for(let a of s)if(a>0&&!t.hasObstacle(a,i,o))return{x:a,underBar:!1,range:null};return{x:n.x+10,underBar:!0,range:null}}function PX(e,t,n,r){let i=Math.min(n.from.y,n.to.y),o=Math.max(n.from.y,n.to.y),s=r.bracketsNear(e,i,o,4);if(s.length===0)return{x:e,forceUnderBar:!1};let a=s[0],c=Math.abs(s[0].x-e);for(let d=1;d<s.length;d++){let p=Math.abs(s[d].x-e);p<c&&(a=s[d],c=p)}let l=[a.x+4,a.x-4],u=4-.01;for(let d of l){if(t&&(d<t.minX||d>t.maxX))continue;let p=t?d:Math.max(Math.min(n.from.x,n.to.x)+1,Math.min(Math.max(n.from.x,n.to.x)-1,d));if(r.bracketsNear(p,i,o,u).length===0)return{x:p,forceUnderBar:!1}}return{x:t?Math.min(Math.max(e,t.minX),t.maxX):e,forceUnderBar:!0}}function CX(e){let t=[...e].sort((i,o)=>Math.abs(i.channelX-o.channelX)>=1?i.channelX-o.channelX:i.orderIndex-o.orderIndex),n=new Map,r=0;for(;r<t.length;){let i=r+1;for(;i<t.length&&Math.abs(t[i].channelX-t[r].channelX)<1;)i++;let s=[...t.slice(r,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)),n.set(c.orderIndex,f)}r=i}return n}function OX(e){if(e===0||e>4)return 0;let t=Math.ceil(e/2);return(e%2===1?1:-1)*t*3}function LX(e){let t=e.from.x>=e.to.x?{x:e.to.x-1,y:e.from.y}:e.from;return{fromId:e.fromId,toId:e.toId,waypoints:[t,e.to],underBar:!1}}function uP(e,t){let n=new Array(e.length),r=[];for(let o=0;o<e.length;o++){let s=e[o];if(s.isMarkerSource){n[o]=LX(s);continue}if(Math.abs(s.from.y-s.to.y)<.5&&s.to.x-s.from.x<20){n[o]={fromId:s.fromId,toId:s.toId,waypoints:[s.from,s.to],underBar:!1};continue}let{x:a,underBar:c,range:l}=NX(s,t),{x:u,forceUnderBar:f}=PX(a,l,s,t),d=c||f;r.push({req:s,channelX:u,underBar:d,orderIndex:o})}let i=CX(r);for(let o of r){let s=OX(i.get(o.orderIndex)??0),a=o.channelX+s;n[o.orderIndex]={fromId:o.req.fromId,toId:o.req.toId,waypoints:$X(o.req.from,o.req.to,a),underBar:o.underBar}}return n}function $X(e,t,n){return Math.abs(e.y-t.y)<.5?[e,t]:[e,{x:n,y:e.y},{x:n,y:t.y},t]}var fu="en-US",DX={"en-US":{nowLabel:"now",quarterPrefix:"Q",waveHeldBy:"held by",waveNoItems:"no items",waveBackgroundItem:"Background (no wave)",waveLegendBackground:"Background work (not in a wave)",waveLegendBoundary:"Wave boundary",waveLegendPrefix:"Waves:",wavesDeclaredPlaceholder:"Waves declared: {names} \u2014 no items assigned yet"},fr:{nowLabel:"maint.",quarterPrefix:"T",waveHeldBy:"retenue par",waveNoItems:"aucun \xE9l\xE9ment",waveBackgroundItem:"Travail de fond (hors vague)",waveLegendBackground:"Travail de fond (dans aucune vague)",waveLegendBoundary:"Limite de vague",waveLegendPrefix:"Vagues\xA0:",wavesDeclaredPlaceholder:"Vagues d\xE9clar\xE9es\xA0: {names} \u2014 aucun \xE9l\xE9ment affect\xE9 pour l\u2019instant"}};function fP(e,t){return t??e??fu}function sl(e){let t={};for(let n of MX(e)){let r=DX[n];if(r)for(let i of Object.keys(r))t[i]===void 0&&r[i]!==void 0&&(t[i]=r[i])}return t}function dP(e,t){return e.wavesDeclaredPlaceholder.replace("{names}",()=>t.join(", "))}function MX(e){let t=[],n=FX(e);for(;n.length>0;){t.includes(n)||t.push(n);let r=n.lastIndexOf("-");if(r<=0)break;n=n.slice(0,r)}return t.includes(fu)||t.push(fu),t}function FX(e){return e.split("-").map((n,r)=>r===0?n.toLowerCase():/^[a-zA-Z]{2}$/.test(n)?n.toUpperCase():n).join("-")}function pP(e){let{box:t,afterDate:n,beforeDate:r,hasLinkIcon:i,footnoteCount:o}=e;if(!n&&!r)return[];let s=[],a=Er,c=t.y+$_,l=Qm(t.width);if(n){let u=eg(t.x,i),f=l?{x:t.x-Ar-a,y:c}:{x:u,y:c};s.push({side:"after",isoDate:n,glyphTopLeft:f,glyphSize:a,spilled:l})}if(r){let u=t.x+t.width,f=tg(u,o),d=l?{x:u+Ar,y:c}:{x:f,y:c};s.push({side:"before",isoDate:r,glyphTopLeft:d,glyphSize:a,spilled:l})}return s}function kh(e){let{box:t,afterDate:n,beforeDate:r,row:i}=e;if(!n&&!r)return[];let o=[],s=Er,a,c,l;if(i.kind==="title-tab-row"){a=t.y+(oo-s)/2;let u=i.titleTabWidth!==void 0?t.x+i.titleTabWidth:void 0;c=u!==void 0?u+br:t.x+uo,l=u??t.x}else a=t.y-ls+(ls-s)/2,c=t.x+uo,l=i.title?po(t.x,i.titleInsetX,!!n)+ig(i.title):t.x;if(n&&(l=Math.max(l,c+s),o.push({side:"after",isoDate:n,glyphTopLeft:{x:c,y:a},glyphSize:s,spilled:!1})),r){let u=t.x+t.width-Jm-s;o.push({side:"before",isoDate:r,glyphTopLeft:{x:Math.max(u,l+br),y:a},glyphSize:s,spilled:!1})}return o}function On(e){for(let t of e)if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t}function hP(e){return e.box.y+e.box.height-er/2}function mP(e,t){let{box:n}=e;return{x:n.x,y:n.y+t/2}}function gP(e,t){let{box:n}=e;return{x:n.x+n.width,y:e.textSpills?hP(e):n.y+t/2}}function yP(e,t){return e.textSpills?hP(e):e.box.y+t/2}function Ih(e,t){return{x:e,y:t,height:0,maxX:e}}function Sh(e,t){e.box.y+=t;for(let n of e.inlineDatePins??[])n.glyphTopLeft.y+=t;if(e.kind==="item"){for(let n of e.labelChips)n.box.y+=t;e.overflowBox&&(e.overflowBox.y+=t);return}for(let n of e.children)Sh(n,t)}function Nh(e,t){e.box.y+=t;for(let n of e.children)Sh(n,t);for(let n of e.nested)Nh(n,t)}function xP(e,t){e.box.y+=t;for(let n of e.nestedSwimlanes)Nh(n,t)}var al=class{constructor(t){S(this,"rows");S(this,"opts");this.opts=t,this.rows=[{y:t.originY,height:t.minRowHeight,rightEdge:t.laneLeftX,spillX:t.laneLeftX,placedChildren:[]}]}placeItem(t){for(let r=0;r<this.rows.length;r+=1){let i=this.rows[r];if(!(t.desiredStart<i.rightEdge)&&!(t.desiredStart<i.spillX)&&!this.rowIntersectsCorridor(i,t))return{rowIndex:r,y:i.y}}let n=this.appendRow(Math.max(this.opts.minRowHeight,t.predictedHeight));return{rowIndex:this.rows.length-1,y:n.y}}placeBlock(){let t=this.rows[this.rows.length-1];if(t.rightEdge>this.opts.laneLeftX){let n=this.appendRow(this.opts.minRowHeight);return{rowIndex:this.rows.length-1,y:n.y}}return{rowIndex:this.rows.length-1,y:t.y}}commitItem(t){let n=this.rows[t.rowIndex],r=Math.max(t.placed.box.height,t.rowHeight??0);this.growRowHeight(t.rowIndex,r),n.rightEdge=t.logicalEnd,n.spillX=t.spillReservation??this.opts.laneLeftX,n.placedChildren.push(t.placed)}commitBlock(t){let n=this.rows[t.rowIndex];this.growRowHeight(t.rowIndex,t.blockHeight),n.rightEdge=t.blockEnd,n.spillX=t.spillReservation??this.opts.laneLeftX,n.placedChildren.push(t.placed)}usedHeight(){let t=this.rows[this.rows.length-1];return t.y+t.height-this.opts.originY}usedRightX(){let t=this.opts.laneLeftX;for(let n of this.rows)n.rightEdge>t&&(t=n.rightEdge),n.spillX>t&&(t=n.spillX);return t}rowIntersectsCorridor(t,n){return this.opts.slackCorridors.some(r=>r.y>=t.y&&r.y<t.y+t.height&&n.desiredStart<r.xEnd&&n.desiredEnd>r.xStart&&r.slackPredId!==n.childId)}appendRow(t){let n=this.rows[this.rows.length-1],r={y:n.y+n.height,height:t,rightEdge:this.opts.laneLeftX,spillX:this.opts.laneLeftX,placedChildren:[]};return this.rows.push(r),r}growRowHeight(t,n){let r=this.rows[t],i=n-r.height;if(!(i<=0)){r.height=n;for(let o=t+1;o<this.rows.length;o+=1){let s=this.rows[o];s.y+=i;for(let a of s.placedChildren)Sh(a,i)}}}};function Ph(e){return e==="hide"||e==="show"}var TP={red:"#f87171",blue:"#60a5fa",yellow:"#facc15",green:"#34d399",orange:"#fb923c",purple:"#a78bfa",gray:"#94a3b8",navy:"#818cf8",white:"#e2e8f0"},Kr={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"},iw={name:"dark",surface:{page:"#0b1220",chart:"#111827",headerBox:"#1e293b"},entities:{roadmap:{...Kr,headerHeight:"md",padding:"md"},swimlane:{...Kr,fg:"#e2e8f0",text:"#e2e8f0",padding:"sm",spacing:"none",textSize:"sm"},item:{...Kr,bg:"#0f172a",fg:"#94a3b8",text:"#e2e8f0",shadow:"subtle",cornerRadius:"sm"},parallel:{...Kr,bracket:"none",padding:"xs"},group:{...Kr,bracket:"solid",padding:"xs",fg:"#94a3b8"},anchor:{...Kr,bg:"#0b1220",fg:"#cbd5e1",text:"#cbd5e1",cornerRadius:"sm"},milestone:{...Kr,bg:"#e2e8f0",fg:"#e2e8f0",text:"#0b1220",border:"solid"},footnote:{...Kr,bg:"none",fg:"#94a3b8",text:"#e2e8f0",textSize:"sm"},label:{...Kr,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",nonWorkingSeam:"#6b7a90",nonWorkingFill:"#94a3b8",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"},wave:{stripFill:"#042f2e",stripFillAlt:"#134e4a",labelText:"#99f6e4",labelMuted:"#5eead4",boundary:"#2dd4bf",hatch:"#0f172a",hatchOnDark:"#ffffff"},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 vP={red:"#4a4a4a",blue:"#6b6b6b",green:"#8a8a8a",yellow:"#c8c8c8",orange:"#5c5c5c",purple:"#3a3a3a",gray:"#9e9e9e",navy:"#2a2a2a",white:"#ffffff"},Zr={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"},ow={name:"grayscale",surface:{page:"#f5f5f5",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Zr,headerHeight:"md",padding:"md"},swimlane:{...Zr,fg:"#3a3a3a",text:"#3a3a3a",padding:"sm",spacing:"none",textSize:"sm"},item:{...Zr,bg:"#ffffff",fg:"#9e9e9e",text:"#1a1a1a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Zr,bracket:"none",padding:"xs"},group:{...Zr,bracket:"solid",padding:"xs",fg:"#595959"},anchor:{...Zr,bg:"#1a1a1a",fg:"#1a1a1a",text:"#1a1a1a",cornerRadius:"sm"},milestone:{...Zr,bg:"#2a2a2a",fg:"#2a2a2a",text:"#ffffff",border:"solid"},footnote:{...Zr,bg:"none",fg:"#595959",text:"#595959",textSize:"sm"},label:{...Zr,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",nonWorkingSeam:"#9a9a9a",nonWorkingFill:"#737373",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"},wave:{stripFill:"#fafafa",stripFillAlt:"#e0e0e0",labelText:"#212121",labelMuted:"#616161",boundary:"#616161",hatch:"#000000",hatchOnDark:"#ffffff"},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 wP={red:"#e53935",blue:"#1e88e5",yellow:"#fdd835",green:"#43a047",orange:"#fb8c00",purple:"#8e24aa",gray:"#9e9e9e",navy:"#0d47a1",white:"#ffffff"},Jr={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"},sw={name:"light",surface:{page:"#f8fafc",chart:"#ffffff",headerBox:"#ffffff"},entities:{roadmap:{...Jr,headerHeight:"md",padding:"md"},swimlane:{...Jr,fg:"#334155",text:"#334155",padding:"sm",spacing:"none",textSize:"sm"},item:{...Jr,bg:"#ffffff",fg:"#94a3b8",text:"#0f172a",shadow:"subtle",cornerRadius:"sm"},parallel:{...Jr,bracket:"none",padding:"xs"},group:{...Jr,bracket:"solid",padding:"xs",fg:"#475569"},anchor:{...Jr,bg:"#0f172a",fg:"#0f172a",text:"#0f172a",cornerRadius:"sm"},milestone:{...Jr,bg:"#312e81",fg:"#312e81",text:"#ffffff",border:"solid"},footnote:{...Jr,bg:"none",fg:"#475569",text:"#475569",textSize:"sm"},label:{...Jr,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",nonWorkingSeam:"#a0aec0",nonWorkingFill:"#64748b",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"},wave:{stripFill:"#f0fdfa",stripFillAlt:"#ccfbf1",labelText:"#134e4a",labelMuted:"#0f766e",boundary:"#0d9488",hatch:"#0f172a",hatchOnDark:"#ffffff"},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 _P=["light","dark","grayscale"],aw={light:sw,dark:iw,grayscale:ow};var BX={greyscale:"grayscale"};function lw(e){let t=e.toLowerCase(),n=BX[t]??t;return _P.find(r=>r===n)}var UX={grey:"gray",violet:"purple"};function Qr(e,t){if(e==="none")return"none";if(e.startsWith("#"))return e;let n=t.name==="dark"?TP:t.name==="grayscale"?vP:wP,r=UX[e]??e,i=n[r];return typeof i=="string"?i:e}function pu(e){return e.key.endsWith(":")?e.key.slice(0,-1):e.key}function WX(e,t){return{bg:Qr(e.bg,t),fg:Qr(e.fg,t),text:Qr(e.text,t),border:e.border,icon:e.icon,shadow:e.shadow,font:e.font,weight:e.weight,italic:e.italic,textSize:e.textSize,padding:e.padding,spacing:e.spacing,headerHeight:e.headerHeight,cornerRadius:e.cornerRadius,bracket:e.bracket,headerPosition:"beside",capacityIcon:e.capacityIcon,timelinePosition:"top",minorGrid:!1,nonWorking:"hide"}}function AP(e,t,n,r){switch(t){case"bg":e.bg=Qr(n,r);break;case"fg":e.fg=Qr(n,r);break;case"text":e.text=Qr(n,r);break;case"border":(n==="solid"||n==="dashed"||n==="dotted")&&(e.border=n);break;case"icon":e.icon=n;break;case"shadow":(n==="none"||n==="subtle"||n==="soft"||n==="hard")&&(e.shadow=n);break;case"font":(n==="sans"||n==="serif"||n==="mono")&&(e.font=n);break;case"weight":(n==="thin"||n==="light"||n==="normal"||n==="bold")&&(e.weight=n);break;case"italic":e.italic=n==="true";break;case"text-size":e.textSize=du(n,"xl");break;case"padding":e.padding=du(n,"xl");break;case"spacing":e.spacing=du(n,"xl");break;case"header-height":e.headerHeight=du(n,"xl");break;case"corner-radius":e.cornerRadius=du(n,"full");break;case"bracket":(n==="none"||n==="solid"||n==="dashed")&&(e.bracket=n);break;case"header-position":(n==="beside"||n==="above")&&(e.headerPosition=n);break;case"capacity-icon":e.capacityIcon=n;break;case"timeline-position":(n==="top"||n==="bottom"||n==="both")&&(e.timelinePosition=n);break;case"minor-grid":e.minorGrid=n==="true";break;case"non-working":Ph(n)&&(e.nonWorking=n);break;default:break}}function du(e,t){let n=["none","xs","sm","md","lg","xl","full"],r=n.indexOf(t),i=n.indexOf(e);return i<0?"md":i>r?n[r]:n[i]}function RP(e,t,n){if(t)for(let r of t.properties)AP(e,pu(r),r.value,n)}function EP(e,t,n){for(let r of t){let i=pu(r);r.value!==void 0&&AP(e,i,r.value,n)}}function XX(e,t,n){let r=t.find(o=>pu(o)==="labels");if(!r)return;let i=r.value?[r.value]:r.values;for(let o of[...i].reverse()){let s=n.labels.get(o);if(!s)continue;let a=s.properties.find(c=>pu(c)==="style");a?.value&&RP(e,n.styles.get(a.value),n.theme)}}function bP(e,t,n){let r=t.find(i=>pu(i)==="style");r?.value&&RP(e,n.styles.get(r.value),n.theme)}function ht(e,t,n){let r=n.theme.entities[e],i=WX(r,n.theme),o=n.defaults.get(e);return o&&(bP(i,o.properties,n),EP(i,o.properties,n.theme)),XX(i,t,n),bP(i,t,n),EP(i,t,n.theme),i}function kP(e,t){return ht("label",e.properties,t)}function Ch(e,t,n,r,i=0){let o=n.map(c=>c??-1/0),s=[];for(let c=0;c<e;c++)s.push(IP(c===0?t:s[c-1],o[c],i));let a=[...s];for(let c=1;c<=e+1;c++){let l=r(s,a).memberEnd,u=[],f=[];for(let d=0;d<e;d++)u.push(d===0?s[0]:IP(f[d-1],o[d],i)),f.push(Math.max(u[d],l[d]??-1/0));if(SP(s,u)&&SP(a,f))return{S:s,E:a,passes:c,capped:!1};s=u,a=f}return r(s,a),{S:s,E:a,passes:e+1,capped:!0}}function IP(e,t,n){return t-e>n?t:e}function SP(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function NP(e,t,n){return e.floors.map(r=>{let i=r?Ze(r.date):null;return i?n.workingIndexOf(t,i):null})}var qo=class{constructor(t,n){S(this,"plan");S(this,"S");S(this,"memberEnd");S(this,"binding");S(this,"memberCount");this.plan=t,this.S=n;let r=t.waves.length;this.memberEnd=new Array(r).fill(-1/0),this.binding=new Array(r).fill(void 0),this.memberCount=new Array(r).fill(0)}floor(t){let n=this.plan.waveOf.get(t),r=t.$type==="ItemDeclaration"?void 0:this.plan.leadOf.get(t),i;return n!==void 0&&(i=this.S[n-1]),r!==void 0&&(i=Math.max(i??-1/0,this.S[r-1])),i}apply(t,n){let r=this.floor(t);return r===void 0?n:Math.max(n,r)}accumulate(t,n){let r=this.plan.memberWave(t);r!==void 0&&(this.memberCount[r-1]++,n>this.memberEnd[r-1]&&(this.memberEnd[r-1]=n,this.binding[r-1]=t))}};function PP(e,t,n,r,i,o=0){return e.waves.map((s,a)=>{let c={id:s.name,index:a+1,start:t.S[a],end:t.E[a],memberCount:n.memberCount[a]},l=n.binding[a];if(l!==void 0&&n.memberEnd[a]===t.E[a]&&t.E[a]>t.S[a]){let p=l.name??l.title;p!==void 0&&(c.heldBy=p)}let u=i[a],f=e.floors[a]?.ref,d=a===0?r:t.E[a-1];return u!=null&&f!==void 0&&u-d>o&&(c.floorRef=f),c})}var Kt=.5;function CP(e,t,n){let r=e.waves.map(()=>n);return{plan:e,ids:e.waves.map(i=>i.name),origin:n,floors:e.floors.map(i=>{let o=i?Ze(i.date):null;return o?t.forward(o):null}),S:r,E:r,pass:new qo(e,r),frozen:!1}}function OP(e,t,n){e.S=t,e.E=n,e.pass=new qo(e.plan,t)}function LP(e,t){e.S=t.S,e.E=t.E,e.frozen=!0,e.solve=t}function Oh(e,t,n){e.ids.forEach((r,i)=>{t.set(r,e.S[i]),n.set(r,e.E[i])})}function Vo(e,t,n){return n.waves?n.waves.pass.apply(e,t):t}function $P(e,t,n){n.waves&&!n.waves.frozen&&n.waves.pass.accumulate(e,t)}function DP(e,t){if(t.waves)return t.waves.plan.memberWave(e)!==void 0?"member":"background"}function MP(e,t,n){let r=n.waves?.plan.waveOf.get(e);if(!n.waves||r===void 0)return;let i=ue(e.properties,"date"),o=Ze(i)?"date":"start",s=o==="date"?i:ue(e.properties,"start"),a=Ze(s);if(s===void 0||!a)return;let c=n.scale.forwardWithinDomain(a),l=n.waves.pass.floor(e);if(!(c===null||l===void 0||l-c<Kt)&&!(t-l>Kt))return{wave:n.waves.ids[r-1],key:o,pin:s,start:hu(l,n).toISOString().slice(0,10)}}function FP(e,t){for(let n of[...e.S,...e.E])if(!(Math.abs(n-e.origin)<Kt)&&Math.abs(t-n)<Kt)return!0;return!1}function cw(e,t){let n=Math.round((e-t.timeline.originX)/t.timeline.pixelsPerDay);if(!t.scale.showsNonWorking)return n;let r=t.timeline.startDate;return t.calendar.workingIndexOf(r,_t(r,n))}function hu(e,t){return t.calendar.dateAtWorkingIndex(t.timeline.startDate,cw(e,t))}function BP(e,t,n){return y_(n.calendar,n.timeline.startDate,cw(e,n),cw(t,n))}function Yo(e,t,n){return e.scale.showsNonWorking?e.scale.advanceX(t,n)-t:n*e.timeline.pixelsPerDay}var Lh=class{constructor(t,n){S(this,"node");S(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=ht("group",r.properties,n.styleCtx),s=Vo(r,t.x,n),a=n.waves!==void 0&&r.title===void 0&&ue(r.properties,"wave")!==void 0&&ue(r.properties,"style")===void 0&&Ke(r.properties,"labels").length===0,c=a?void 0:r.title??r.name,l=n.currentFlowKey;n.nextGroupId+=1,n.currentFlowKey=`${l}/group:${r.name??`group-${n.nextGroupId}`}`;let u=On(Ke(r.properties,"after")),f=On(Ke(r.properties,"before")),d=!!(u||f),p=so(o.bg),g=p&&!!c||p&&d,_=g?oo+wm:0,x=g?Am:0,y=$l(p,!!c,d),w=t.y+y,v=n.bandScale.step(),b=s,L=new al({laneLeftX:b,originY:w+_,minRowHeight:v,slackCorridors:n.slackCorridors}),P=b,O=[];for(let N of r.content){if(N.$type==="DescriptionDirective")continue;if(!Mt(N)){let xe=i.resolveChildStart(N,P,b,n),{rowIndex:Te,y:he}=L.placeBlock(),He=i.newCursor(xe,he),Me=i.sequenceOne(N,He,n);O.push(Me);let ot=Me.box.x+Me.box.width,sn=Math.max(v,He.height);L.commitBlock({rowIndex:Te,placed:Me,blockHeight:sn,blockEnd:ot,spillReservation:Yu(Me)}),P=Math.max(P,ot);continue}let G=N.properties,q=i.resolveChildStart(N,P,b,n),V=li(G,n.sizes,n.cal),re=n.scale.startX(q),oe=Math.max(An,Yo(n,re,V)),ye=re+oe,ne=N.name??"",ae=i.predictItemBarExtraHeight(N,re,n),A=v+ae,{rowIndex:$,y:M}=L.placeItem({childId:ne,desiredStart:re,desiredEnd:ye,predictedHeight:A}),H=i.newCursor(q,M),Z=i.sequenceItem(N,H,n);O.push(Z);let Y=Z.box.x+Z.box.width+an;P=Math.max(P,Y);let ie=null;(Z.textSpills||Z.chipsOutside||Z.dotSpills||Z.iconSpills||Z.footnoteSpills)&&(ie=Math.max(Z.decorationsRightX,Z.chipsOutside?Z.chipsRightX:0)+6),L.commitItem({rowIndex:$,placed:Z,logicalEnd:Y,spillReservation:ie,rowHeight:Math.max(A,v+(Z.box.height-n.bandScale.bandwidth()))})}let j=Math.max(v,L.usedHeight()),z=Math.max(P,L.usedRightX()),F=n.scale.showsNonWorking?n.scale.startX(s):s,k=n.scale.showsNonWorking?Math.max(F,z):z,W={x:F,y:w,width:k-F,height:_+j+x};t.x=P+Tl,t.maxX=Math.max(t.maxX,t.x);let X=n.bandScale.step()-n.bandScale.bandwidth();t.height=Math.max(t.height,y+W.height+X);let R=r.name;R&&(n.entityLeftEdges.set(R,W.x),n.entityRightEdges.set(R,W.x+W.width)),n.currentFlowKey=l;let C=kh({box:W,afterDate:u,beforeDate:f,row:p?{kind:"title-tab-row",titleTabWidth:c?ao(c):void 0}:{kind:"header-band",title:c,titleInsetX:cs}});return{kind:"group",id:R,title:c,box:W,children:O,style:o,inlineDatePins:C.length>0?C:void 0,...a?{waveOnly:!0}:{}}}};var GX=12,jX=4,$h=13,HX=11;function uw(e,t){return(e?ut(e,HX):0)+t}function UP(e){if(!/[\r\n]/.test(e))return;let t=e.replace(/\r\n?/g,`
2770
2770
  `).split(`
2771
- `).map(i=>i.trim()),n=0,r=t.length;for(;n<r&&t[n]==="";)n+=1;for(;r>n&&t[r-1]==="";)r-=1;return t.slice(n,r)}function fw(e,t,n,r=t){let i=e,o=UP(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ut(l,$h)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ut(i,$h)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=Il(i,t,$h,r);if(c.length>=2&&c.length<=Ym&&c.every((l,u)=>ut(l,$h)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function dw(e,t,n){let r=UP(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var Dh=class{constructor(t){S(this,"input");this.input=t}get id(){return this.input.id}measure(t){return{width:Math.max(An,this.input.logicalRightX-this.input.logicalLeftX),height:t.bands.bandwidth()}}place(t,n){let r=this.measure(n),i=Math.max(An,r.width-2*an),o=t.x+an,s={x:o,y:t.y,width:i,height:r.height},a=fi(!!this.input.hasLinkIcon,this.input.hasAfterGlyph?{barWidth:i}:void 0),c=Math.max(0,i-a-GX),l=this.input.title,u=uw(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Ol({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=fw(l,c,u,f),h=d?o+i+jX:o+a;return{id:this.input.id,box:s,textX:h,textSpills:d,titleLines:p}}};var Mh=class{constructor(t,n){S(this,"node");S(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=ht("parallel",r.properties,n.styleCtx),s=Vo(r,t.x,n),a=On(Ke(r.properties,"after")),c=On(Ke(r.properties,"before")),l=r.title??r.name,u=M_(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],h=d,g=0,_=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let L of r.content){if(L.$type==="DescriptionDirective")continue;n.currentFlowKey=`${_}/par:${x}#${y}`;let P=i.newCursor(s,f+g),O=i.sequenceOne(L,P,n);p.push(O),g+=Math.max(n.bandScale.step(),P.height),h=Math.max(h,P.maxX),y++}n.currentFlowKey=_;let w={x:d,y:f,width:h-d,height:g};t.x=h+Tl,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,u+g);let v=r.name;v&&(n.entityLeftEdges.set(v,w.x),n.entityRightEdges.set(v,w.x+w.width));let b=kh({box:w,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:us}});return{kind:"parallel",id:v,title:l,box:w,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var ll=class extends Map{constructor(t,n=VX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[r,i]of t)this.set(r,i)}get(t){return super.get(WP(this,t))}has(t){return super.has(WP(this,t))}set(t,n){return super.set(zX(this,t),n)}delete(t){return super.delete(qX(this,t))}};function WP({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function zX({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function qX({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function VX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Fh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Bh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var XP=Symbol("implicit");function Uh(){var e=new ll,t=[],n=[],r=XP;function i(o){let s=e.get(o);if(s===void 0){if(r!==XP)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new ll;for(let s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uh(t,n).unknown(r)},Bh.apply(i,arguments),i}function mu(){var e=Uh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,p=i<r,h=p?i:r,g=p?r:i;o=(g-h)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),h+=(g-h-o*(d-c))*u,s=o*(1-c),a&&(h=Math.round(h),s=Math.round(s));var _=Fh(d).map(function(x){return h+o*x});return n(p?_.reverse():_)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(d){return arguments.length?(a=!!d,f()):a},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return mu(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Bh.apply(f(),arguments)}var pw=class e{constructor(t,n,r){S(this,"bandwidthPx");S(this,"stepPx");S(this,"d3");this.bandwidthPx=t,this.stepPx=n,this.d3=r}static fixedRow(t){return new e(t.bandwidth,t.step)}static forRows(t){let n=Array.from({length:t.count},(i,o)=>String(o)),r=mu().domain(n).range(t.range).paddingInner(t.paddingInner??0).paddingOuter(t.paddingOuter??0);return new e(r.bandwidth(),r.step(),r)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(t){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let n=this.d3(t);if(n===void 0)throw new Error(`BandScale: unknown band id "${t}"`);return n}},YX={bandwidth:56,step:64};function GP(){return pw.fixedRow(YX)}var jP=1e-6,gu=class{constructor(t){S(this,"domain");S(this,"range");S(this,"pixelsPerDay");S(this,"calendar");S(this,"nonWorking");this.domain=t.domain,this.range=t.range,this.calendar=t.calendar,this.nonWorking=t.nonWorking??"hide";let n=Math.max(1,this.showsNonWorking?bn(t.domain[0],t.domain[1]):this.indexOf(t.domain[1]));this.pixelsPerDay=(t.range[1]-t.range[0])/n}get showsNonWorking(){return this.nonWorking==="show"&&this.calendar?.hasNonWorkingDays===!0}indexOf(t){return this.calendar?this.calendar.workingIndexOf(this.domain[0],t):bn(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+jP)}}forward(t){return this.showsNonWorking?this.range[0]+bn(this.domain[0],t)*this.pixelsPerDay:this.range[0]+this.indexOf(t)*this.pixelsPerDay}forwardWithinDomain(t){return t<this.domain[0]||t>this.domain[1]?null:this.forward(t)}invert(t){let n=Math.round((t-this.range[0])/this.pixelsPerDay);return this.showsNonWorking?_t(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):_t(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=_t(this.domain[0],r),o=this.calendar.workingIndexOf(this.domain[0],i);return this.calendar.isWorkingDay(i)?o+Math.max(0,n-r):o}startX(t){if(!this.showsNonWorking||!this.calendar)return t;let n=_t(this.domain[0],this.dayAt(t).day);if(this.calendar.isWorkingDay(n))return t;let r=this.calendar.workingIndexOf(this.domain[0],n);return this.forward(this.calendar.dateAtWorkingIndex(this.domain[0],r))}advanceX(t,n){if(!this.showsNonWorking||!this.calendar)return t+n*this.pixelsPerDay;let r=this.startX(t);if(n<=0)return r;let i=this.indexAtX(r)+n,o=Math.ceil(i-jP)-1,s=i-o,a=this.calendar.dateAtWorkingIndex(this.domain[0],o);return this.forward(a)+s*this.pixelsPerDay}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Wh(e){return e.endsWith(":")?e.slice(0,-1):e}function zP(e,t){let r=e.roadmapDecl?.properties.find(l=>Wh(l.key)==="scale")?.value,i="weeks",o,s;if(r)if(r==="days"||r==="weeks"||r==="months"||r==="quarters"||r==="years")i=r;else{let l=/^(\d+)([dwmqy])$/.exec(r);if(l){let u=Math.max(1,parseInt(l[1],10));switch(l[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=Xh(i)*u,s=1}}let a=s??O_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(_=>Wh(_.key)==="unit")?.value??i,f=t.properties.find(_=>Wh(_.key)==="label-every"),d=t.properties.find(_=>Wh(_.key)==="pixels-per-unit"),p=f&&parseInt(f.value,10)||0,h=p!==0?Math.max(1,p):a,g=d?Math.max(1,parseInt(d.value,10)||Xh(u)):o??Xh(u);return{unit:u,labelEvery:h,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Xh(i),...c(!1)}}function Xh(e){switch(e){case"days":return S_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var KX=.5,hw=.5,mw=7;function Ko(e){return e==="months"||e==="quarters"||e==="years"}function Gh(e,t){let n=e.getUTCFullYear(),r=e.getUTCMonth();switch(t){case"months":return new Date(Date.UTC(n,r+1,1));case"quarters":return new Date(Date.UTC(n,r-r%3+3,1));case"years":return new Date(Date.UTC(n+1,0,1))}}function ZX(e,t){if(e.getUTCDate()!==1)return!1;let n=e.getUTCMonth();switch(t){case"months":return!0;case"quarters":return n%3===0;case"years":return n===0}}function jh(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Ko(n)&&o<=0)return 0;let a=o<=0?e:_t(i.dateAtWorkingIndex(e,o-1),1),c=Ko(n)?HP(a,n):n==="weeks"?qP(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Ko(n))return Math.ceil(t/r)*r;let s=_t(e,o);return bn(e,HP(s,n))}function HP(e,t){return ZX(e,t)?e:Gh(e,t)}function qP(e,t,n){let r=n===void 0?-bn(t,e):n-e.getUTCDay();return _t(e,(r%mw+mw)%mw)}function JX(e,t,n){return qP(_t(e,1),t,n)}function gw(e,t,n,r=fu){if(e.calendar?.hasNonWorkingDays)return QX(e,t,e.calendar,r);if(Ko(t.unit))return nG(e,t,t.unit,r);let i=n.daysPerUnit(t.unit),o=i*e.pixelsPerDay,s=Math.max(1,Math.round(e.widthPx/e.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=e.originX+u*e.pixelsPerDay,d=l%t.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?yw(t.unit,_t(e.domain[0],u),l,r):void 0})}return c}function QX(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=_=>Ko(i)?Gh(_,i):i==="weeks"?JX(_,o,n.weekStart):_t(_,1),c=[o];for(let _=a(o);_<s;_=a(_))c.push(_);let l=e.forward(s),u=[];c.forEach((_,x)=>{let y=e.forward(_);(x+1<c.length?e.forward(c[x+1]):l)>y&&!eG(e,i,c,x)&&u.push({date:_,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(_,x)=>f?_.getUTCDay()===n.weekStart:x%t.labelEvery===0,h=(e.showsNonWorking?v_(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:_,x},y)=>{let w=(y+1<u.length?u[y+1].x:l)-x,v=d(_,y),b=v?yw(i,_,y,r):void 0;if(b!==void 0){let L=ut(b,io)>w,P=Ko(i)?y===0||y===u.length-1:w<h-KX;L&&P&&(b=void 0)}return{x,labelX:x+w/2,major:v,label:b}});return s>o&&g.push({x:l,labelX:void 0,major:d(s,u.length),label:void 0}),g}function eG(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Ko(t)||r===0||r!==n.length-1)return!1;let[o,s]=e.domain;return i.workingIndexOf(o,n[r])>=i.workingIndexOf(o,s)}function VP(e,t,n,r){let i=e.calendar;if(!i?.hasNonWorkingDays)return;let o=i.nonWorkingRuns(e.domain[0],e.domain[1]);if(o.length===0)return;let[s,a]=e.range;if(e.showsNonWorking)return o.map(l=>tG(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<hw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(_t(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles);let d=u-s>hw&&a-u>hw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}function tG(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(_t(t.through,1))),a={x:o,width:s-o,from:t.from,through:t.through};return t.titles.length>0&&(a.titles=t.titles),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function nG(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=Gh(i,n);l<o;l=Gh(l,n))s.push(l);o>i&&s.push(o);let a=s.map(l=>e.forward(l)),c=s.length-1;return s.map((l,u)=>{let f=a[u],d=u%t.labelEvery===0;if(u===c)return{x:f,labelX:void 0,major:d,label:void 0};let p=a[u+1]-f,h=d?yw(n,l,u,r):void 0,g=u===0||u===c-1;return h!==void 0&&g&&ut(h,io)>p&&(h=void 0),{x:f,labelX:f+p/2,major:d,label:h}})}function yw(e,t,n,r){switch(e){case"days":return`${t.getUTCMonth()+1}/${t.getUTCDate()}`;case"weeks":{let i=t.toLocaleString(r,{month:"short",timeZone:"UTC"}),o=t.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return t.toLocaleString(r,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(t.getUTCMonth()/3)+1;return`${sl(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var xw=class{constructor(t,n){S(this,"id");S(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=ue(this.anchor.properties,"date"),i=Ze(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=ht("anchor",this.anchor.properties,t.styleCtx),a=t.markerRowPlacements.get(this.id),c=a?.centerY??t.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";t.entityLeftEdges.set(this.id,o),t.entityRightEdges.set(this.id,o),t.entityMidpoints.set(this.id,l);let d={id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f};return!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(i)&&(d.hiddenDate=ro(i)),d}};function KP(e,t,n){let r=[];for(let[i,o]of e){let s=new xw(i,o).place(t,n);s&&r.push(s)}return r}function cl(e){let t=0;for(let n of e)t=Math.max(t,ZP(n.children)),n.nested.length>0&&(t=Math.max(t,cl(n.nested)));return t}function ZP(e){let t=0;for(let n of e)n.kind==="item"?t=Math.max(t,n.box.x+n.box.width):t=Math.max(t,ZP(n.children));return t}function Tw(e,t,n){let r=[],i=new Map,o=new Map;return[...e.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,Ke(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:ht("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Mn,y:n+Mn,width:t.chartRightX-2*Mn,height:r.length===0?0:_l+r.length*El+Mn},entries:r},index:i,hosts:o}}var rG=.8,iG=1;function oG(e){let t=[];return QP(e,t),t}function QP(e,t){for(let n of e)if(n.kind==="item"){let r=sG(n);r>0&&n.box.width>0&&t.push({startX:n.box.x,endX:n.box.x+n.box.width,load:r})}else(n.kind==="parallel"||n.kind==="group")&&QP(n.children,t)}function sG(e){return e.capacity?e.capacity.value:e.size?1:0}function eC(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=oG(e.children);if(t.length===0)return null;let n=new Set;for(let s of t)n.add(s.startX),n.add(s.endX);let r=Array.from(n).sort((s,a)=>s-a);if(r.length<2)return null;let i=[];for(let s=0;s<r.length-1;s++){let a=r[s],c=r[s+1],l=(a+c)/2,u=0;for(let f of t)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:aG(u,e.capacityValue,e.warnFraction,e.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:e.capacityValue,warnFraction:e.warnFraction,overFraction:e.overFraction}}function aG(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function tC(e,t){let n=t.get("swimlane"),r=JP(ue(e.properties,"utilization-warn-at"),n?ue(n.properties,"utilization-warn-at"):void 0,rG),i=JP(ue(e.properties,"utilization-over-at"),n?ue(n.properties,"utilization-over-at"):void 0,iG);return{warn:r,over:i}}function JP(e,t,n){let i=uG(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var lG=/^\d+(?:\.\d+)?%$/,cG=/^\d+\.\d+$/;function uG(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(lG.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(cG.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var nC=10;function fG(e,t,n){let r=ue(e.properties,"capacity"),i=ai(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=pl(i),s=hl(t.capacityIcon,n),a=no(o,s,nC);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var dG=10,pG=38,hG=8;function mG(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=ue(e.properties,"owner");return Dl(0,r,i??void 0,t,n).rightX}function gG(e,t){if(!e.name)return[];let n=[];for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e.name)){let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i),n}function yG(e,t,n,r){for(let i of e.content)if(i.$type!=="DescriptionDirective")return n.scale.startX(r.resolveChildStart(i,t,t,n))}var ul=class{constructor(t,n){S(this,"input");S(this,"deps");this.input=t,this.deps=n}get id(){return this.input.lane.name??""}place(t,n){let{lane:r,bandIndex:i}=this.input,{deps:o}=this,s=ht("swimlane",r.properties,n.styleCtx),a=t.x,c=n.bandScale.step(),l=n.currentFlowKey;n.currentFlowKey=`lane:${r.name??i}`;let{capacity:u,badgeWidthPx:f}=fG(r,s,n.symbols),d=gG(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),nC):0,h=mG(r,f,p),g=yG(r,a,n,o),_=!r.title||g===void 0||g>=h+hG,x=t.y+(_?dG:pG),y=new al({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),w=a,v=[];for(let k of r.content){if(k.$type==="DescriptionDirective")continue;if(!Mt(k)){let H=o.resolveChildStart(k,w,a,n),{rowIndex:Z,y:Y}=y.placeBlock(),ie=o.newCursor(H,Y),le=o.sequenceOne(k,ie,n);v.push(le);let xe=le.box.x+le.box.width,Te=Math.max(c,ie.height);y.commitBlock({rowIndex:Z,placed:le,blockHeight:Te,blockEnd:xe,spillReservation:Yu(le)}),w=Math.max(w,xe);continue}let W=k.properties,X=o.resolveChildStart(k,w,a,n),R=li(W,n.sizes,n.cal),C=n.scale.startX(X),N=Math.max(An,Yo(n,C,R)),G=C+N,q=k.name??"",V=o.predictItemBarExtraHeight(k,C,n),re=c+V,{rowIndex:oe,y:ye}=y.placeItem({childId:q,desiredStart:C,desiredEnd:G,predictedHeight:re}),ne=o.newCursor(X,ye),ae=o.sequenceItem(k,ne,n);v.push(ae);let A=ae.box.x+ae.box.width+an;w=Math.max(w,A);let $=null;(ae.textSpills||ae.chipsOutside||ae.dotSpills||ae.iconSpills||ae.footnoteSpills)&&($=Math.max(ae.decorationsRightX,ae.chipsOutside?ae.chipsRightX:0)+6),y.commitItem({rowIndex:oe,placed:ae,logicalEnd:A,spillReservation:$,rowHeight:Math.max(re,c+(ae.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,L=Math.max(c+32,b+y.usedHeight()+16),P=Math.max(y.usedRightX(),h),O={x:0,y:t.y,width:n.chartRightX,height:L},j=ue(r.properties,"owner"),z;if(j){let k=n.teams.get(j),W=n.persons.get(j);z=k?.title??W?.title??j}let F=u?(()=>{let{warn:k,over:W}=tC(r,n.styleCtx.defaults);return eC({children:v,capacityValue:u.value,warnFraction:k,overFraction:W})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:O,bandIndex:i,children:v,nested:[],style:s,owner:z,footnoteIndicators:d,capacity:u,utilization:F},usedHeight:L,usedRightX:P}}};var xG=18,TG=14,vG=14,wG=16,_G=32;function vw(e,t,n,r){let i=n+xG,o=[],s=!0;for(let a of e){s||(i+=wG),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+TG,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:ns(a.content.sizes,t.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:t.timeline,scale:t.scale,calendar:t.calendar,bandScale:t.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:t.chartRightX,nextParallelId:0,nextGroupId:0,...t.waves?{waves:t.waves}:{}};t.waves&&Oh(t.waves,u.entityLeftEdges,u.entityRightEdges);let f=[],d=l,p=0;for(let y of a.content.swimlanes.values()){u.nextParallelId=0,u.nextGroupId=0;let{positioned:w,usedHeight:v}=new ul({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(w),d+=v,p++}let h=d,g=Math.max(t.bandScale.bandwidth(),h-i+vG),_={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:_,nestedSwimlanes:f,style:ht("swimlane",[],t.styleCtx)};ww(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function ww(e,t){let n=e.box.x,{chromeRightX:r}=Ml(n,e.label,e.sourcePath),i=cl(e.nestedSwimlanes),o=Math.max(r,i)+_G,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function qh(e,t){let n=[];for(let r of e){let i=t.placedItems.get(r),o=i?i.box.x+i.box.width:t.entityRightEdges.get(r);if(o===void 0)continue;let s=i?yP(i,t.bandScale.bandwidth()):t.entityMidpoints.get(r)?.y??0;if(!i&&t.waves?.plan.index.has(r)){n.push({ref:r,x:o,y:s,flowKey:`wave:${r}`,wave:r});continue}let a=t.itemFlowKey.get(r)??`marker:${r}`;n.push({ref:r,x:o,y:s,flowKey:a})}return n}function Vh(e){let t=new Map;for(let n of e){let r=t.get(n.flowKey);(!r||n.x>r.x)&&t.set(n.flowKey,n)}return Array.from(t.values())}function Ew(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function EG(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<Kt||(!n||r.x>n.x)&&(n=r);return n?.wave}function rC(e,t,n,r,i,o,s,a){let c=r.length*i*.58*(o?1.05:1),l=e+n+6,u=e-n-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:t-4,width:c,height:12},side:p}}var _w=class{constructor(t,n){S(this,"id");S(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=ht("milestone",n.properties,t.styleCtx),i=ue(n.properties,"date"),o=Ke(n.properties,"after"),s=Ze(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",h=!1,g,_=!1,x;if(s){let v=t.scale.forwardWithinDomain(s);if(v===null)return null;u=v,h=!0;let b=t.markerRowPlacements.get(this.id);b&&(f=b.centerY,d=b.labelBox,p=b.labelSide);let L=qh(o,t),P=Vh(L),O=Ew(P);O&&O.x>v&&(_=!0,g=[{x:O.x,y:O.y>0?O.y:f}]),x=EG(P,v),x!==void 0&&(_=!0)}else if(o.length>0){let v=qh(o,t),b=Vh(v);b.sort((j,z)=>z.x-j.x);let L=b[0]?.x??t.timeline.originX;u=L,h=!1;let P=rC(u,a,c,l,10,!0,t.timeline.box.x,t.chartRightX);f=a,d=P.box,p=P.side,t.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let O=[];for(let j=1;j<b.length;j++){let z=b[j];z.x<L&&z.y>0&&z.wave===void 0&&O.push({x:z.x,y:z.y})}O.length>0&&(g=O)}if(u===null)return null;if(!d){let v=rC(u,f,c,l,10,!0,t.timeline.box.x,t.chartRightX);d=v.box,p=v.side}let y={x:u,y:f};t.entityLeftEdges.set(this.id,y.x),t.entityRightEdges.set(this.id,y.x),t.entityMidpoints.set(this.id,y);let w={id:this.id,title:l,center:y,radius:c,fixed:h,slackArrows:g,isOverrun:_,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!_&&FP(t.waves,y.x)&&(w.onWaveBoundary=!0),x!==void 0&&s&&(w.overrunByWave=x,w.overrunDate=ro(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(w.hiddenDate=ro(s)),w}};function iC(e,t){let n=[];for(let[r,i]of e){let o=new _w(r,i).place(t);o&&n.push(o)}return n}function Kh(e){let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(n=>n+n).join("")),!/^[0-9a-fA-F]{6}$/.test(t))throw new Error(`Unsupported hex colour: ${e}`);return[Number.parseInt(t.slice(0,2),16),Number.parseInt(t.slice(2,4),16),Number.parseInt(t.slice(4,6),16)]}function oC(e){let[t,n,r]=Kh(e).map(i=>{let o=i/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r}function Zh(e,t){let n=oC(e),r=oC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var bG=4.5;function lC(e,t,n,r,i){if(!e.frozen||!e.solve)throw new Error("buildWaves: the wave barrier has not settled");let o=t.timeline.waveStrip;if(!o)throw new Error("buildWaves: the timeline has no wave strip");let s=PP(e.plan,e.solve,e.pass,e.origin,e.floors,Kt),a=s.every(y=>y.memberCount===0),c=t.timeline.box.x,l=c+t.timeline.box.width,u=o.y+o.height/2,f=[],d=0,p=s.map((y,w)=>{let v=e.plan.waves[w],b=v.title??y.id,L=y.memberCount===0,P=hu(y.start,t),O=BP(y.start,y.end,t),j=L?void 0:d++,z=AG(y.id,t),F=RG(v.properties,j,t),k=Math.max(y.start,c),W=Math.min(y.end,l),X=Math.max(0,W-k),R,C=!1;if(!L){if(z.length>0){let ye=z.length*Rn;R=sC(b,y.id,w+1,X,ye),C=R!==void 0}R??(R=sC(b,y.id,w+1,X,0))}let N=(k+W)/2,G;if(L&&(N=y.start,!a)){let ye=f.filter(ne=>Math.abs(ne-y.start)<Kt).length;f.push(y.start),N=y.start+ye*zm,G={x:N,y:u}}let q=L?bw(P):`${bw(P)} \u2013 ${bw(O)}`,V=[b,q];L?V.push(n.waveNoItems):y.heldBy!==void 0&&V.push(`${n.waveHeldBy} ${y.heldBy}`);let re,oe=s[w-1];if(!a&&oe!==void 0&&y.floorRef!==void 0&&y.start-oe.end>Kt){let ye=Math.max(oe.end,c),ne=Math.min(y.start,l);ut(y.floorRef,tr)+2*_r<=ne-ye&&(re={text:y.floorRef,x:(ye+ne)/2})}return{id:y.id,title:b,index:w,...j!==void 0?{visibleOrdinal:j}:{},startX:y.start,endX:y.end,startDate:P,endDate:O,memberCount:y.memberCount,empty:L,...y.heldBy!==void 0?{heldBy:y.heldBy}:{},...y.floorRef!==void 0?{floorRef:y.floorRef}:{},columnBox:{x:y.start,y:t.chartTopY,width:y.end-y.start,height:t.swimlaneBottomY-t.chartTopY},strip:{box:{x:y.start,y:o.y,width:y.end-y.start,height:o.height},...R?{label:R.label}:{},labelKind:R?.kind??"none",labelX:N,tooltip:V.join(" \xB7 "),footnotesShown:C,...G?{marker:G}:{},...re?{gapLabel:re}:{}},style:F,footnoteIndicators:z}}),h=a?[]:SG(p,e.origin,o.y,t),g=Aw(r),_=i.map(y=>Aw(y.nestedSwimlanes));for(let y of[...g,..._.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:h,crossings:aC(g,h),regionCrossings:_.map(y=>aC(y,h)),hasBackground:g.length+_.flat().length>0};return a&&(x.placeholder=dP(n,p.map(y=>y.title))),x}function sC(e,t,n,r,i){let o=a=>ut(a,tr)*1.05+i+2*_r<=r;if(o(e))return{kind:"title",label:e};if(t!==e&&o(t))return{kind:"id",label:t};for(let a=e.length-1;a>=3;a--){let c=e.slice(0,a).trimEnd();if(c.length<3)break;let l=`${c}\u2026`;if(o(l))return{kind:"ellipsis",label:l}}let s=`#${n}`;if(o(s))return{kind:"ordinal",label:s}}function AG(e,t){let n=[];for(let[r,i]of t.footnoteHosts.entries()){if(!i.includes(e))continue;let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i)}function RG(e,t,n){let r=n.styleCtx.theme,i=new Map,o=ue(e,"style"),s=o?n.styleCtx.styles.get(o):void 0;for(let d of s?.properties??[]){let p=d.key.endsWith(":")?d.key.slice(0,-1):d.key;i.set(p,d.value)}let a=d=>{let p=i.get(d);if(p===void 0)return;let h=Qr(p,r);return h==="none"?void 0:h},c=a("bg"),l=t!==void 0&&t%2===1?r.wave.stripFillAlt:r.wave.stripFill,u=c?kG(l,c,Rl)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??IG(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var Jh=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function kG(e,t,n){if(!Jh.test(e)||!Jh.test(t))return;let r=Kh(e),i=Kh(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function IG(e,t){let n=e.labelText;return!Jh.test(n)||!Jh.test(t)||Zh(n,t)>=bG?n:Zh(e.hatch,t)>=Zh(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function SG(e,t,n,r){let i=[];for(let a of e)a.empty||(i.push({x:a.startX,wave:a,opening:!0}),i.push({x:a.endX,wave:a,opening:!1}));i.sort((a,c)=>a.x-c.x);let o=[],s=0;for(;s<i.length;){let a=s;for(;a<i.length&&i[a].x-i[s].x<Kt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<Kt)continue;let u=(c.find(f=>f.opening)??c[0]).wave;o.push({x:l,topY:n,bottomY:r.swimlaneBottomY,stroke:u.style.boundary,dash:u.style.boundaryDash})}return o}function Aw(e){let t=[],n=r=>{for(let i of r)i.kind==="item"?i.waveRole==="background"&&t.push(i):n(i.children)};for(let r of e)n(r.children),t.push(...Aw(r.nested));return t}function aC(e,t){let n=[];for(let r of e){let i=r.box.x,o=r.box.x+r.box.width;for(let s of t)i<s.x&&s.x<o&&n.push({x:s.x,topY:r.box.y,bottomY:r.box.y+r.box.height,stroke:s.stroke})}return n}var NG="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function PG(e){return String(e).replace(/[0-9]/g,t=>NG[Number(t)])}function cC(e,t,n,r){let{waves:i}=e,o=i.some(v=>!v.empty&&v.strip.labelKind!=="title"),s=i.some(v=>v.empty),a=i.some(v=>v.footnoteIndicators.length>0&&!v.strip.footnotesShown);if(!e.hasBackground&&!o&&!s&&!a)return;let c=tr,l=v=>ut(v,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-ln),d=0,p=u,h=!1,g=0,_=v=>r+v*kl+Xu,x=v=>{h&&p+Wu+v>f&&(d++,p=u,h=!1);let b=h?p+Wu:p;return p=b+v,h=!0,g=Math.max(g,p-u),b},y=[],w=(v,b)=>{let L=Bu+qm,P=x(L+l(b)),O=_(d);y.push({kind:v,text:b,swatch:{x:P,y:O-Xu+(kl-Uu)/2,width:Bu,height:Uu},runs:[{text:b,x:P+L,y:O}]})};if(e.hasBackground&&w("background",n.waveLegendBackground),e.boundaries.length>0&&w("boundary",n.waveLegendBoundary),o||s||a){let v=i.map(O=>{let j=`#${O.index+1} ${O.title}`;return O.footnoteIndicators.length>0&&!O.strip.footnotesShown&&(j+=` ${O.footnoteIndicators.map(PG).join(",")}`),O.empty&&(j+=` (${n.waveNoItems})`),j}),b=" \xB7 ",L=`${n.waveLegendPrefix} ${v[0]}`,P=[{text:L,x:x(l(L)),y:_(d)}];for(let O of v.slice(1)){let j=P[P.length-1];p+l(b+O)<=f?(j.text+=b+O,p+=l(b+O),g=Math.max(g,p-u)):(d++,p=u,h=!1,P.push({text:O,x:x(l(O)),y:_(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${v.join(b)}`,runs:P})}return{box:{x:u,y:r,width:g,height:(d+1)*kl},entries:y}}function bw(e){return e.toISOString().slice(0,10)}var CG=4;function fC(e,t){t>e.chartRightX&&(e.chartRightX=t)}function dC(e,t,n){let r=VP(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r)}var em=class{place(t,n,r,i,o){let s=r.theme??"light",a=aw[s],c=r.width??1280,l=fP(r.locale,LG(t)),{config:u,working:f}=A_(t,n),d=zP(t,n.config.scale),p=ns(n.content.sizes,u),h={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:g,endDate:_}=o.computeDateWindow(t,{cal:u,sizes:p,calendar:f},n,r.today,d,i),x=ht("roadmap",t.roadmapDecl?.properties??[],h),y=x.headerPosition==="beside",w=yl[x.headerHeight]??yl.md,v=w>0&&x.timelinePosition!=="bottom",b=w>0&&(x.timelinePosition==="bottom"||x.timelinePosition==="both"),L=Ph(r.nonWorking)?r.nonWorking:x.nonWorking,P=L==="show"&&f.hasNonWorkingDays,O=t.roadmapDecl?.title??t.roadmapDecl?.name??"",j=ue(t.roadmapDecl?.properties??[],"author"),z=o.sizeBesideHeader(O,j),F=y?{x:0,y:0,width:z.boxWidth,height:0}:{x:0,y:0,width:0,height:Ou},k=y?z.boxWidth:0,W=y?8:Ou+8,X=d.pixelsPerUnit/f.daysPerUnit(d.unit),R=Math.max(1,f.workingIndexOf(g,_)),C=P?Math.max(1,bn(g,_))*X:R*X,N=k+ln,G=C,q=k+ln+G+ln,V=Math.min(c,q),re=r.today!==void 0&&r.today>=g&&r.today<=_,oe=n.content.anchors.size+n.content.milestones.size>0,ye=re?ci:0,ne=v?w:0,ae=i?Bm:0,A=new gu({domain:[g,_],range:[N,N+C],calendar:f,nonWorking:L}),$=Math.max(V,N+G+ln),M=[];for(let[te,me]of n.content.anchors){let st=Ze(ue(me.properties,"date"));if(!st)continue;let Dn=A.forwardWithinDomain(st);Dn!==null&&M.push({id:te,centerX:Dn,radius:6,title:me.title??te,fontSize:10,bold:!1,date:st,isMilestone:!1})}for(let[te,me]of n.content.milestones){let st=Ze(ue(me.properties,"date"));if(!st)continue;let Dn=A.forwardWithinDomain(st);Dn!==null&&M.push({id:te,centerX:Dn,radius:6,title:me.title??te,fontSize:10,bold:!0,date:st,isMilestone:!0})}let H=pC(M,k,$,o.estimateTextWidth),Z=oe?Math.max(1,H.rowCount):0,Y=Z*26,ie=ye+ne+ae+Y,le=ie+8,xe=y?z.cardHeight+CG:0,Te=Math.max(W,xe-ie),he=Te+ye,He=he+ne,Me=He+ae,ot=Me+Y,sn=gw(A,d,f,l),Rt={box:{x:N,y:Te,width:C,height:0},ticks:sn,pixelsPerDay:X,originX:N,startDate:g,endDate:_,labelStyle:ht("roadmap",[],h),pillRowHeight:ye,tickPanelY:he,tickPanelHeight:ne,markerRow:{y:Me+13,height:Y,collisionY:Me-8},minorGrid:x.minorGrid,...i?{waveStrip:{y:He,height:ae}}:{}};dC(Rt,A,d.unit);let Tr=new Map;for(let[te,me]of H.placements){let st=Me+13+me.rowIndex*26;Tr.set(te,{rowIndex:me.rowIndex,centerY:st,labelBox:{...me.labelBox,y:st-4},labelSide:me.labelSide})}let Q={cal:u,styleCtx:h,sizes:p,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:Rt,scale:A,calendar:f,bandScale:GP(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:Tr,chartTopY:Te+le,chartBottomY:0,swimlaneBottomY:0,chartRightX:$,nextParallelId:0,nextGroupId:0,...i?{waves:CP(i,A,N)}:{}};for(let te of M){let me=Tr.get(te.id);me&&(Q.entityLeftEdges.set(te.id,te.centerX),Q.entityRightEdges.set(te.id,te.centerX),Q.entityMidpoints.set(te.id,{x:te.centerX,y:me.centerY}))}let Qn=Tw(n.content.footnotes,Q,0);Q.footnoteIndex=Qn.index,Q.footnoteHosts=Qn.hosts;let ri=new Map(Q.entityLeftEdges),ii=new Map(Q.entityRightEdges),oi=new Map(Q.entityMidpoints),Ji=()=>{Q.entityLeftEdges=new Map(ri),Q.entityRightEdges=new Map(ii),Q.entityMidpoints=new Map(oi),Q.placedItems=new Map,Q.itemFlowKey=new Map,Q.currentFlowKey="",Q.waves&&Oh(Q.waves,Q.entityLeftEdges,Q.entityRightEdges)},$n=[...n.content.swimlanes.values()],E=ht("swimlane",[],h),B=R_[E.spacing]??0,K=()=>{Q.nextParallelId=0,Q.nextGroupId=0;let te=[],me=Q.chartTopY,st=0,Dn=Q.timeline.originX;for(let GO of $n){st>0&&(me+=B);let{positioned:jO,usedHeight:HO,usedRightX:a_}=new ul({lane:GO,bandIndex:st},o).place({x:Q.timeline.originX,y:me},Q);te.push(jO),me+=HO,a_>Dn&&(Dn=a_),st++}return{swimlanes:te,nextY:me,maxRightX:Dn}},se=n.content.isolatedRegions,ve,Fe,Re=Q.waves;if(Re){let te,me=Ch(Re.ids.length,Re.origin,Re.floors,(st,Dn)=>(OP(Re,st,Dn),Ji(),te=K(),se.length>0&&vw(se,Q,te.nextY+8,o),Re.pass),Kt);LP(Re,me),Fe={passes:me.passes,capped:me.capped},ve=te}else ve=K();let Ee=ve.swimlanes,Le=ve.nextY,Xe=OG(n.content.milestones,Q);Xe.length>0&&(Ji(),Q.slackCorridors=Xe,ve=K(),Ee=ve.swimlanes,Le=ve.nextY),fC(Q,ve.maxRightX+ln);let Ce=[];if(se.length>0){let te=vw(se,Q,Le+8,o);Ce=te.regions,Le=te.endY}Q.chartBottomY=Le,Q.swimlaneBottomY=Le,Rt.box.height=Q.chartBottomY-Rt.box.y;let yt=iC(n.content.milestones,Q),xt=cl(Ee);for(let te of Ce)xt=Math.max(xt,cl(te.nestedSwimlanes));for(let te of M)xt=Math.max(xt,te.centerX+te.radius);for(let te of yt)xt=Math.max(xt,te.center.x+te.radius);let vr=f.daysPerUnit(d.unit),Wt=Q.scale.showsNonWorking?Q.scale.indexAtX(xt):(xt-N)/X,Xt=Wt>0?jh(g,Wt,d.unit,vr,f):0;if(Xt>R){let te=f.dateAtWorkingIndex(g,Xt),me=Q.scale.showsNonWorking?bn(g,te)*X:Xt*X,st=new gu({domain:[g,te],range:[N,N+me],calendar:f,nonWorking:L});Q.scale=st,Rt.endDate=te,Rt.box.width=me,Rt.ticks=gw(st,d,f,l),dC(Rt,st,d.unit),fC(Q,N+me+ln)}for(let te of Ee)te.box.width=Q.chartRightX;for(let te of Ce)ww(te,Q.chartRightX);let Qi=M.map(te=>({id:te.id,centerX:te.centerX,radius:te.radius,title:te.title,fontSize:te.fontSize,bold:te.bold}));for(let te of yt)te.fixed||Qi.push({id:te.id??"",centerX:te.center.x,radius:te.radius,title:te.title,fontSize:10,bold:!0});let si=pC(Qi,k,Q.chartRightX,o.estimateTextWidth);Q.markerRowPlacements.clear();for(let[te,me]of si.placements){let st=Me+13+me.rowIndex*26;Q.markerRowPlacements.set(te,{rowIndex:me.rowIndex,centerY:st,labelBox:{...me.labelBox,y:st-4},labelSide:me.labelSide})}for(let te of yt){let me=Q.markerRowPlacements.get(te.id??"");me&&(te.center={x:te.center.x,y:me.centerY},te.labelBox=me.labelBox,te.labelSide=me.labelSide)}for(let te of M){let me=Q.markerRowPlacements.get(te.id);me&&Q.entityMidpoints.set(te.id,{x:te.centerX,y:me.centerY})}for(let te of yt)te.fixed||Q.entityMidpoints.set(te.id??"",{x:te.center.x,y:te.center.y});let Qo=oe?Math.max(1,si.rowCount):0;if(Qo>Z){let te=(Qo-Z)*26;Q.timeline.markerRow.height=Qo*26,Q.timeline.box.height+=te,Q.chartTopY+=te,Q.chartBottomY+=te,Q.swimlaneBottomY+=te;for(let me of Ee)Nh(me,te);for(let me of Ce)xP(me,te);for(let me of yt)if(me.cutTopY=Q.chartTopY,me.cutBottomY=Q.swimlaneBottomY,me.slackArrows)for(let st of me.slackArrows)st.y+=te}b&&(Q.timeline.bottomTickPanelY=Q.chartBottomY+8,Q.timeline.bottomTickPanelHeight=w,Q.chartBottomY+=8+w);let ze=sl(l),Ye=Q.waves?lC(Q.waves,Q,ze,Ee,Ce):void 0;Ye&&(Ye.regionCrossings.forEach((te,me)=>{te.length>0&&(Ce[me].waveCrossings=te)}),Ye.placeholder!==void 0&&Rt.waveStrip&&(Rt.waveStrip.placeholder=Ye.placeholder));let Gt=new Set(yt.map(te=>te.center.x)),eo=KP(n.content.anchors,Q,Gt),to=o.collectItems($n),_u=o.buildDependencies(to,Ee,Ce,Q),FO=o.buildNowline(r.today,Q,l),Eu=Ye?cC(Ye,Q,ze,Q.chartBottomY+Fu):void 0;Eu&&(Q.chartBottomY+=Fu+Eu.box.height);let es=Tw(n.content.footnotes,Q,Q.chartBottomY);Q.footnoteIndex=es.index,Q.footnoteHosts=es.hosts,F.height=F.height||Q.chartBottomY,y||(F.width=Q.chartRightX);let BO=y?{x:6,y:ot-z.cardHeight,width:z.cardWidth,height:z.cardHeight}:{x:0,y:0,width:Q.chartRightX,height:Ou},UO=es.area.entries.length>0?es.area.box.y+es.area.box.height:Q.chartBottomY,mm={x:Q.chartRightX-ln-$m,y:UO+ln,width:$m,height:C_},WO=mm.y+mm.height+ln,XO={box:F,position:x.headerPosition,title:O,author:j,titleLines:z.titleLines,authorLines:z.authorLines,cardBox:BO,logo:void 0,style:x,attributionBox:mm};return{width:Q.chartRightX,height:WO,theme:s,palette:a,backgroundColor:a.surface.page,header:XO,timeline:Rt,nowline:FO,swimlanes:Ee,anchors:eo,milestones:yt,edges:_u,footnotes:es.area,includes:Ce,chartBox:{x:k,y:Q.chartTopY,width:Q.chartRightX-k,height:Q.chartBottomY-Q.chartTopY},...Fe?{waveSolve:Fe}:{},...Ye?{waves:Ye.waves}:{},...Ye&&Ye.boundaries.length>0?{waveBoundaries:Ye.boundaries}:{},...Ye&&Ye.crossings.length>0?{waveCrossings:Ye.crossings}:{},...Eu?{waveLegend:Eu}:{}}}};function OG(e,t){let n=[];for(let[r,i]of e){let o=ue(i.properties,"date"),s=Ke(i.properties,"after"),a=Ze(o),c=qh(s,t),l=Vh(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=Ew(l);d&&d.x>f&&d.y>0&&n.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:r});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&&d.wave===void 0&&n.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:r})}}return n}function pC(e,t,n,r){let i=[...e].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=r(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<=n,d=u>=t,p=a.centerX-a.radius,h=a.centerX+a.radius,g=P=>P==="right"?l:u,_=P=>P==="right"?f:d,x=(P,O)=>{let j=Math.min(p,P),z=Math.max(h,P+c);return s[O].some(F=>F.left<z&&F.right>j)},y=-1,w="right",v=l;e:for(let P=s.length-1;P>=0;P--)for(let O of["right","left"]){if(!_(O))continue;let j=g(O);if(!x(j,P)){y=P,w=O,v=j;break e}}if(y===-1){for(let[P,O]of o)o.set(P,{...O,rowIndex:O.rowIndex+1});s=[[],...s],y=0,w=f?"right":"left",v=g(w)}let b=Math.min(p,v),L=Math.max(h,v+c);s[y].push({left:b,right:L}),o.set(a.id,{rowIndex:y,labelBox:{x:v,y:0,width:c,height:12},labelSide:w})}return{placements:o,rowCount:s.length}}function LG(e){return e.directive?.properties.find(n=>$G(n.key)==="locale")?.value}function $G(e){return e.endsWith(":")?e.slice(0,-1):e}function DG(e){switch(e){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return e;case void 0:return"planned";default:return"neutral"}}function MG(e){if(!e)return 0;let t=/^(\d{1,3})%$/.exec(e);return t?Math.max(0,Math.min(100,parseInt(t[1],10)))/100:0}function FG(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function BG(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function UG(e){if(!e)return{icon:"none"};let t=e.toLowerCase();return t.includes("linear.app")?{icon:"linear",href:e}:t.includes("github.com")?{icon:"github",href:e}:t.includes("atlassian.net")||t.includes("jira.")?{icon:"jira",href:e}:{icon:"generic",href:e}}function tm(e,t,n,r,i){let o=kP(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=k_[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:n,y:r,width:l,height:fo}}}function gC(e,t){let n=p_(e,t.sizes,t.cal),r=d_(ue(e,"remaining"),t.sizes,t.cal),i=ue(e,"status"),o=DG(i),s=MG(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(ue(e,"remaining")??"");return s===0&&o==="in-progress"&&a&&(s=1-Math.max(0,Math.min(100,parseInt(a[1],10)))/100),s===0&&o==="in-progress"&&r>0&&n>0&&(s=Math.max(0,Math.min(1,1-r/n))),{status:o,progress:s}}function yC(e,t,n,r,i,o,s){let a=ue(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=ue(e,"remaining"),d=FG(f,t),p=BG(n??ue(e,"owner"),t),h=()=>[u,p].filter(Boolean).join(" "),g;if(i==="in-progress"&&d){let v=h();g=v?`${v} \u2014 ${d} remaining`:`${d} remaining`}else if(i==="in-progress"&&o>0&&o<1){let v=Math.round((1-o)*100),b=h();g=b?`${b} \u2014 ${v}% remaining`:`${v}% remaining`}else(p||u)&&(g=h()||void 0);let _=ue(e,"capacity"),x=ai(_),y=null,w=0;if(x!==null){let v=pl(x),b=hl(s,t.symbols);y={value:x,text:v,icon:b};let L=11;w=(g?ut(" ",L):0)+no(v,b,L)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:w}}function xC(e,t){let n=new Set;if(e){for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e)){let o=t.footnoteIndex.get(r);o!==void 0&&n.add(o)}}return[...n].sort((r,i)=>r-i)}function TC(e,t,n){return Ol({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:On(n)!==void 0})}function Pw(e,t,n,r){let i=e.properties,o=ht("item",i,n.styleCtx),s=ue(i,"size"),a=s?n.sizes.get(s)??null:null,c=li(i,n.sizes,n.cal),l=Ke(i,"after"),u=Ke(i,"before"),f=bC(i,t.x,t.x,n),d;n.waves&&(f=Vo(e,f,n),d=MP(e,f,n));let p=d===void 0?GG(i,f,n):void 0,h=n.scale.startX(f),g=Math.max(An,Yo(n,h,c)),_=h,x=h+g,y=ue(i,"link"),w=UG(y),v=w.icon!=="none",b=Math.max(An,g-2*an),L=Ke(i,"labels"),P=[];for(let ze of L){let Ye=n.labels.get(ze);if(!Ye)continue;let Gt=tm(Ye,n.styleCtx,0,0);P.push({id:Ye,width:Gt.box.width})}let O=0;for(let ze=0;ze<P.length;ze+=1)ze>0&&(O+=kr),O+=P[ze].width;let j=Math.max(0,b-2*nr),z=P.length>0&&O>j,F=!1,k,W;if(u.length>0){let ze,Ye;for(let Gt of u){let eo=Ze(Gt),to=eo?n.scale.forwardWithinDomain(eo)??void 0:n.entityLeftEdges.get(Gt);to!==void 0&&(ze===void 0||to<ze)&&(ze=to,Ye=Gt)}ze!==void 0&&x>ze&&(F=!0,k={x:ze,y:t.y,width:x-ze,height:n.bandScale.bandwidth()},W=Ye)}let{status:X,progress:R}=gC(i,n),C={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},N={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},G={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},q={done:n.styleCtx.theme.status.done,"in-progress":n.styleCtx.theme.status.inProgress,"at-risk":n.styleCtx.theme.status.atRisk,blocked:n.styleCtx.theme.status.blocked,planned:n.styleCtx.theme.status.planned,neutral:n.styleCtx.theme.status.neutral},V=n.styleCtx.theme.name,re=V==="dark",oe=re?"#0f172a":"#ffffff",ye=V==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===oe&&(o.bg=V==="grayscale"?G[X]:re?N[X]:C[X]),o.fg===ye&&(o.fg=q[X]);let{metaText:ne,ownerDisplay:ae,capacity:A,capacityTrailingWidth:$}=yC(i,n,r,a,X,R,o.capacityIcon),M=e.title??e.name??"",H=xC(e.name,n),Z=new Dh({id:e.name??"",title:M,logicalLeftX:_,logicalRightX:x,metaText:ne,metaTrailingWidth:$,hasLinkIcon:v,hasAfterGlyph:On(l)!==void 0,titleFirstLineRightReservePx:TC(b,H,u)}).place({x:_,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),Y=Z.box,ie=n.bandScale.bandwidth(),le=Y.width<as,xe=v&&Y.width<zu,Te=Y.width<qu,he=Z.textSpills||xe,He=dw(M,Z,xe),Me=He.length,ot=null;z&&(ot=rg(P,Y.width));let sn=ot?ot.rows.length:P.length>0?1:0,Rt=ne!==void 0||A!==null,Tr=Pl(Me,Rt),Q=Hu(Me,Rt),Qn=wC(z,he,sn,ie,Tr),ri=Math.max(Q,Qn);ri>0&&(Y.height=ie+ri);let ii=[],oi=Y.y+ie-er-fo-di,Ji=Y.y+(z&&he?Math.max(os,Tr):Tr)+di,E=z&&he||!z&&P.length>0?Math.max(oi,Ji):oi,B=z?Y.x+Y.width+Ar:Y.x+nr,K=B;if(ot)for(let ze=0;ze<ot.rows.length;ze+=1){let Ye=E+ze*ng,Gt=B;for(let to of ot.rows[ze]){let _u=tm(to.id,n.styleCtx,Gt,Ye);ii.push(_u),Gt+=_u.box.width+kr}let eo=Gt-kr;eo>K&&(K=eo)}else{let ze=B;for(let Ye of P){let Gt=tm(Ye.id,n.styleCtx,ze,E);ii.push(Gt),ze+=Gt.box.width+kr}K=P.length>0?ze-kr:B}let se=ae??r??ue(i,"owner"),ve=e.description?.text,Fe=H.length>0&&Te,Ee=Y.x+Y.width+Ar,Le=!1,Xe=null;xe&&(Le&&(Ee+=kn),Xe=Ee,Ee=Xe+Rr,Le=!0);let Ce=0;if(he){Le&&(Ee+=kn);let ze=Math.max(...He.map(Gt=>ut(Gt,Sl))),Ye=(ne?ut(ne,11):0)+$;Ce=Math.max(ze,Ye),Ee+=Ce,Le=!0}let yt=null;Fe&&(Le&&(Ee+=kn),yt=Ee,Ee+=H.length*Rn,Le=!0);let xt=null;le&&(Le&&(Ee+=kn),xt=Ee+rr,Ee=xt+rr,Le=!0);let vr=Math.max(Y.x+Y.width,Ee),Wt=e.name;Wt&&(n.entityLeftEdges.set(Wt,_),n.entityRightEdges.set(Wt,x)),$P(e,Y.x+Y.width+an,n);let Xt=Wt??vC(e);n.itemFlowKey.set(Xt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+ri);let Qi=pP({box:Y,afterDate:On(l),beforeDate:On(u),hasLinkIcon:v,footnoteCount:H.length}),si={kind:"item",id:Wt,title:M,...He.length>=2||He[0]!==M?{titleLines:He}:{},box:Y,status:X,progressFraction:R,footnoteIndicators:H,labelChips:ii,chipsOutside:z,chipsRightX:K,linkIcon:w.icon,linkHref:w.href,hasOverflow:F,overflowBox:k,overflowAnchorId:W,owner:se,description:ve,metaText:ne,textSpills:he,dotSpills:le,iconSpills:xe,footnoteSpills:Fe,dotSpillCx:xt,iconSpillX:Xe,footnoteSpillStartX:yt,decorationsRightX:vr,capacity:A,size:a,style:o,inlineDatePins:Qi.length>0?Qi:void 0},Qo=DP(e,n);return Qo!==void 0&&(si.waveRole=Qo),d!==void 0&&(si.wavePinOverride=d),p!==void 0&&(si.nonWorkingPin=p),n.placedItems.set(Xt,si),si}function WG(e,t,n){return new Mh(e,{sequenceOne:Cw,newCursor:Ih}).place(t,n)}function XG(e,t,n){return new Lh(e,{sequenceItem:Pw,sequenceOne:Cw,resolveChildStart:EC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:_C}).place(t,n)}function Cw(e,t,n){if(Mt(e))return Pw(e,t,n);if(vt(e))return WG(e,t,n);if(je(e))return XG(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function vC(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function wC(e,t,n,r,i){if(n===0)return 0;let o=r-er-fo-di,s;e&&t?s=Math.max(os,i)+di:e?s=o:s=Math.max(o,i+di);let c=s+(n-1)*ng+fo+di+er;return Math.max(0,c-r)}function _C(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=li(r,n.sizes,n.cal),s=Math.max(An,Yo(n,t,o)),a=Math.max(An,s-2*an),c=ue(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=gC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:h}=yC(r,n,void 0,l,u,f,ht("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,_=!!ue(r,"link"),x=e.title??e.name??"",y=On(Ke(r,"after"))!==void 0,w=fi(_,y?{barWidth:a}:void 0),v=Math.max(0,a-w-nr),b=Math.max(0,a-w-TC(a,xC(e.name,n),Ke(r,"before"))),L=fw(x,v,uw(d,h),b),P=_&&a<zu,O=L.textSpills||P,j=dw(x,L,P).length,z=Hu(j,g),F=Ke(r,"labels"),k=[];for(let q of F){let V=n.labels.get(q);if(!V)continue;let re=tm(V,n.styleCtx,0,0);k.push({id:V,width:re.box.width})}if(k.length===0)return z;let W=0;for(let q=0;q<k.length;q+=1)q>0&&(W+=kr),W+=k[q].width;let X=Math.max(0,a-2*nr),R=W>X,C=R?rg(k,a):null,N=C?C.rows.length:1,G=wC(R,O,N,i,Pl(j,g));return Math.max(z,G)}function EC(e,t,n,r){return Vo(e,bC(e.properties,t,n,r),r)}function bC(e,t,n,r){let i=Ze(ue(e,"date"))??Ze(ue(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=Ke(e,"after");if(o.length>0){let s=n;for(let a of o){let c=Ze(a);if(c){let u=r.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=r.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(n,s)}return t}function GG(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=jG(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=Kt))return{key:r.key,pin:r.raw,start:ro(hu(t,n))}}function jG(e){for(let t of["date","start"]){let n=ue(e,t),r=Ze(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of Ke(e,"after")){let n=Ze(t);if(n)return{key:"after",raw:t,date:n}}}var Rw=6;function HG(e,t){let n=Nm-32,r=Il(e,n,16),i=Il(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ut(d,16));for(let d of i)o=Math.max(o,ut(d,11));let s=o+32,a=Math.max(N_-Rw,Math.min(Nm-Rw,s)),c=r.length>0?(r.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+Rw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function zG(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=ue(a,"start"),l=Ze(c)??qG(r),u=ue(a,"length"),f=0;if(u){let x=VG(u,t.cal);x>0&&(f=x)}let d=t.calendar??Iu(t.cal),p=AC(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),h=x_(i.unit,t.cal),g=jh(l,p>0?p:4*t.cal.daysPerWeek,i.unit,h,d),_=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,_))}}function qG(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function VG(e,t){let n=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(e);if(!n)return 0;let r=parseFloat(n[1]);switch(n[2]){case"d":return r;case"w":return r*t.daysPerWeek;case"m":return r*t.daysPerMonth;case"q":return r*t.daysPerQuarter;case"y":return r*t.daysPerYear;default:return 0}}function AC(e,t,n,r,i){let o=h=>t.calendar.workingIndexOf(n,h),s=new Map,a=new Map,c=new Map,l=0;for(let h of e.content.anchors.values()){let g=Ze(ue(h.properties,"date"));if(g&&h.name){let _=o(g);a.set(h.name,_),l=Math.max(l,_)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(h,g,_)=>{let x=v=>{let b=Ze(v);return b?o(b):h.itemEnd.has(v)?h.itemEnd.get(v):h.anchorEnd.has(v)?h.anchorEnd.get(v):h.milestoneEnd.has(v)?h.milestoneEnd.get(v):0},y=(v,b)=>{let L=b;for(let P of v)P.$type!=="DescriptionDirective"&&(L=w(P,L),_(L));return L},w=(v,b)=>{if(Mt(v)){let L=li(v.properties,h.sizes,t.cal),P=Ze(ue(v.properties,"date")),O=Ze(ue(v.properties,"start")),j=Ke(v.properties,"after"),z=b;P?z=o(P):O?z=o(O):j.length>0&&(z=Math.max(b,...j.map(x))),g&&(z=g.apply(v,z));let F=z+L;return v.name&&h.itemEnd.set(v.name,F),g?.accumulate(v,F),F}if(vt(v)){let L=Ke(v.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;g&&(P=g.apply(v,P));let O=P;for(let j of v.content){if(j.$type==="DescriptionDirective")continue;let z=w(j,P);O=Math.max(O,z)}return O}if(je(v)){let L=Ke(v.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;return g&&(P=g.apply(v,P)),y(v.content,P)}return b};return{walkLane:y,resolveAfterDay:x}},d=h=>{l=Math.max(l,h)};if(i){let h=i.waves.map(y=>y.name),g=0,_=y=>{g=Math.max(g,y)},x=Ch(h.length,0,NP(i,n,t.calendar),(y,w)=>{let v=h.map((P,O)=>[P,w[O]]);s=new Map(v),g=0;let b=new qo(i,y),{walkLane:L}=f(u(),b,_);for(let P of e.content.swimlanes.values())L(P.content,0);for(let P of e.content.isolatedRegions){let O=f({itemEnd:new Map(v),anchorEnd:new Map,milestoneEnd:new Map,sizes:ns(P.content.sizes,t.cal)},b,_);for(let j of P.content.swimlanes.values())O.walkLane(j.content,0)}return b});l=Math.max(l,g,...x.S,...x.E.slice(-1))}else{let{walkLane:h}=f(u(),void 0,d);for(let g of e.content.swimlanes.values())h(g.content,0)}let{resolveAfterDay:p}=f(u(),void 0,d);for(let h of e.content.milestones.values()){let g=Ze(ue(h.properties,"date"));if(g){let x=o(g);h.name&&c.set(h.name,x),l=Math.max(l,x);continue}let _=Ke(h.properties,"after");if(_.length>0){let x=Math.max(0,..._.map(p));h.name&&c.set(h.name,x),l=Math.max(l,x)}}if(!i)for(let h of e.content.isolatedRegions){let g=AC({config:h.config,content:h.content,diagnostics:[],processedFiles:new Set},t,n,void 0);l=Math.max(l,g)}if(r){let h=o(r);h>0&&(l=Math.max(l,h))}return l}function YG(e,t,n,r){let i=new Rh(cP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=Ke(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let h=mP(p,a);for(let g of d){let _=r.placedItems.get(g),x,y=_===void 0;if(_)x=gP(_,a);else{let w=r.entityMidpoints.get(g);if(!w)continue;x={x:w.x,y:h.y}}!y&&Math.abs(x.y-h.y)<.5&&h.x-x.x<20||(o.push({fromId:g,toId:u,from:x,to:h,isMarkerSource:y}),s.push({fromId:g,toId:u}))}}let c=uP(o,i),l=[];for(let u=0;u<c.length;u++){let f=c[u];l.push({fromId:s[u].fromId,toId:s[u].toId,waypoints:f.waypoints,kind:f.underBar?"underBar":"normal",style:ht("item",[],r.styleCtx)})}return l}function KG(e,t,n){if(!e)return null;let r=t.scale.forwardWithinDomain(e);if(r===null)return null;let i=t.timeline.box.y,o=t.timeline.tickPanelY,s=sl(n).nowLabel,a=ut(s,wl),c=Math.max(km,Math.ceil(a+2*is)),l=t.timeline.originX-ln,u=c/2,f;r-u<l?f="flag-right":r+u>t.chartRightX?f="flag-left":f="center";let d=t.timeline.bottomTickPanelY,p=t.timeline.bottomTickPanelHeight??0,h=d!==void 0&&p>0?d+p:t.swimlaneBottomY;return{x:r,topY:o,bottomY:h,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:ht("item",[],t.styleCtx)}}function ZG(e){let t=new Map,n=r=>{if(Mt(r)){t.set(r.name??vC(r),r);return}if(vt(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(je(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}};for(let r of e)for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return t}function Ow(e,t,n={}){let r=rw(t);return new em().place(e,t,n,r,{sequenceItem:Pw,sequenceOne:Cw,resolveChildStart:EC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:_C,computeDateWindow:zG,sizeBesideHeader:HG,collectItems:ZG,buildDependencies:YG,buildNowline:KG})}function rm(e){return e.toISOString().slice(0,10)}function Lw(e){return e.id!==void 0?e.id:/[\r\n]/.test(e.title)?e.title.replace(/\s*[\r\n]+\s*/g," ").trim():e.title}function $w(e,t){for(let n of e)n.kind==="item"?t(n):$w(n.children,t)}function JG(e,t,n){let r=Lw(e);e.textSpills&&n.push(Ln(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Ln(t,"NL.I1001","info",{name:r},r)),(e.box.width<as||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Ln(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Ln(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),RC(e,t,n),kC(e,t,n)}function RC(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=Lw(e);n.push(Ln(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function kC(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=Lw(e);n.push(Ln(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Ln(e,t,n,r,i){return{message:qr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function IC(e,t,n){let r=e.id??e.title,i=[];$w(e.children,a=>i.push(a));for(let a of i)JG(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Ln(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Ln(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)IC(a,t,n)}function SC(e,t,n){$w(e.children,r=>{RC(r,t,n),kC(r,t,n)});for(let r of e.nested)SC(r,t,n)}function QG(e,t,n){e.waveSolve?.capped&&n.push(Ln(t,"NL.W1002","warning",{passes:e.waveSolve.passes}));let r=e.waves??[],i=r.filter(o=>o.empty).map(o=>o.id);if(i.length>0){let o=i.length===r.length?{reason:"all",names:i}:i.length===1?{reason:"one",name:i[0]}:{reason:"many",names:i};n.push(Ln(t,"NL.I1006","info",o,o.reason==="one"?o.name:void 0))}for(let o of e.milestones){if(o.overrunByWave===void 0||o.overrunDate===void 0)continue;let s=r.find(c=>c.id===o.overrunByWave);if(!s)continue;let a=o.id??o.title;n.push(Ln(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:rm(s.endDate)},a))}}function Dw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)IC(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)SC(o,n,r);if(QG(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Ln(n,"NL.W1000","warning",{date:rm(i),start:rm(o),end:rm(s)}))}return r}var Zo=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Mw(e){if(!e||e.toLowerCase()==="local")return{kind:"local"};if(e.toUpperCase()==="UTC")return{kind:"utc"};if(e==="Z")return{kind:"offset",ms:0};let t=/^([+-])(\d{2})(?::?(\d{2}))?$/.exec(e);if(t){let n=t[1]==="+"?1:-1,r=parseInt(t[2],10),i=t[3]!==void 0?parseInt(t[3],10):0;if(r>23||i>59)throw new Zo(`nowline: invalid timezone offset "${e}". Hours must be 0\u201323 and minutes 0\u201359.`);return{kind:"offset",ms:n*(r*60+i)*6e4}}try{return{kind:"iana",name:Intl.DateTimeFormat(void 0,{timeZone:e}).resolvedOptions().timeZone}}catch{throw new Zo(`nowline: unrecognised timezone "${e}". Use "local", "UTC", an ISO 8601 offset (e.g. "+05:30", "-07:00", "Z"), or an IANA timezone name (e.g. "America/Los_Angeles", "Asia/Kolkata").`)}}function im(e,t){switch(t.kind){case"local":return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));case"utc":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));case"offset":{let n=new Date(e.getTime()+t.ms);return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}case"iana":{let n=new Intl.DateTimeFormat("en-CA",{timeZone:t.name,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),r=0,i=0,o=0;for(let s of n)s.type==="year"?r=parseInt(s.value,10):s.type==="month"?i=parseInt(s.value,10)-1:s.type==="day"&&(o=parseInt(s.value,10));return new Date(Date.UTC(r,i,o))}}}var e4=/^(\d{4})-(\d{2})-(\d{2})$/,t4=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,n4=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function Fw(e={}){let t=e.zone??{kind:"local"},n=e.clock??(()=>new Date),r=e.now;if(!(r==="-"||r===null)){if(r instanceof Date)return r;if(r!==void 0){let i=e4.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=t4.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return im(a,{kind:"utc"});let l=o[3]==="+"?1:-1,u=parseInt(o[4],10),f=o[5]!==void 0?parseInt(o[5],10):0,d=l*(u*60+f)*6e4;return im(a,{kind:"offset",ms:d})}}let s=n4.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return im(n(),t)}}function r4(e){return e===2?"warning":e===3?"info":"error"}function NC(e,t){return{severity:r4(e.severity),code:sg(e),message:e.message,suggestion:Ku(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function PC(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function CC(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function OC(e,t){let n=e.line!==void 0?e.line+1:1;if(!ol(e))return{severity:e.severity,code:"include",message:e.message,file:e.sourcePath,line:n,column:1};let r=t?nw(t,e):e.message,i=Ku(r);return{severity:e.severity,code:e.code??Zu(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function LC(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function $C(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var DC="__nowline_browser_noop_include__";async function MC(e){throw new Error(`${DC}: include "${e}" was skipped \u2014 running in single-file mode.`)}function Bw(e){return e.includes(DC)}var Zi={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"}},i4={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"}},FC={...Zi,...i4};var Mse={none:"",multiplier:"x",person:Zi.person.ascii,people:Zi.people.ascii,points:Zi.points.ascii,time:Zi.time.ascii};var om=class{constructor(t="nl"){S(this,"prefix");S(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var o4=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"]),s4=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 a4(e){let t=[],n=0,r=e.length;for(;n<r;){if(e[n]!=="<"){let u=n;for(;n<r&&e[n]!=="<";)n++;let f=e.slice(u,n);f.trim().length>0?t.push({kind:"text",text:f}):f.length>0&&t.push({kind:"text",text:f});continue}if(e.startsWith("<!--",n)){let u=e.indexOf("-->",n+4);if(u<0)break;t.push({kind:"comment",text:e.slice(n+4,u)}),n=u+3;continue}if(e.startsWith("<![CDATA[",n)){let u=e.indexOf("]]>",n+9);if(u<0)break;t.push({kind:"cdata",text:e.slice(n+9,u)}),n=u+3;continue}if(e.startsWith("<?",n)){let u=e.indexOf("?>",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+2;continue}if(e.startsWith("<!",n)){let u=e.indexOf(">",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+1;continue}if(e[n+1]==="/"){let u=e.indexOf(">",n+2);if(u<0)break;let f=e.slice(n+2,u).trim();t.push({kind:"close",name:f}),n=u+1;continue}let i=l4(e,n);if(i<0)break;let o=e.slice(n+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=c4(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function l4(e,t){let n=t+1,r=null;for(;n<e.length;){let i=e[n];if(r)i===r&&(r=null);else if(i==='"'||i==="'")r=i;else if(i===">")return n;n++}return-1}function c4(e){let t=0;for(;t<e.length&&/\s/.test(e[t]);)t++;let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.slice(n,t),i={};for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let o=t;for(;t<e.length&&e[t]!=="="&&!/\s/.test(e[t]);)t++;let s=e.slice(o,t);if(t>=e.length||e[t]!=="="){s&&(i[s]="");continue}if(t++,t>=e.length)break;let a=e[t];if(a!=='"'&&a!=="'"){let l=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i[s]=e.slice(l,t);continue}t++;let c=t;for(;t<e.length&&e[t]!==a;)t++;i[s]=e.slice(c,t),t<e.length&&t++}return{name:r,attrs:i}}function yu(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u4(e,t){if(e.startsWith("#")){let n=t.get(e.slice(1));return n?`#${n}`:null}if(/^url\(#[^)]+\)$/.test(e)){let n=e.slice(5,-1),r=t.get(n);return r?`url(#${r})`:null}return null}function BC(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=a4(e),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,`${n}-${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(yu(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"){r(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!o4.has(u)){r(`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 h=l.attrs[p];if(/^on/i.test(p)){r(`sanitizer: dropping event handler ${p}`);continue}if(!s4.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=u4(h,o);if(g===null){r(`sanitizer: dropping external href ${h}`);continue}f.push(` ${p}="${yu(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(h);g&&f.push(` id="${yu(g)}"`);continue}if(/\burl\(#/i.test(h)){let g=h.replace(/url\(#([^)]+)\)/gi,(_,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${yu(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(h)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${yu(h)}"`)}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 UC=/&/g,WC=/</g,XC=/>/g,f4=/"/g,d4=/'/g;function Bt(e){return e.replace(UC,"&amp;").replace(WC,"&lt;").replace(XC,"&gt;")}function ei(e){return e.replace(UC,"&amp;").replace(WC,"&lt;").replace(XC,"&gt;").replace(f4,"&quot;").replace(d4,"&#39;")}function fl(e){let t=Object.keys(e).sort(),n=[];for(let r of t){let i=e[r];i==null||i===!1||(i===!0?n.push(r):n.push(`${r}="${ei(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function ee(e,t,n){return n===void 0||n===""?`<${e}${fl(t)}/>`:`<${e}${fl(t)}>${n}</${e}>`}function Se(e,t){return`<text${fl(e)}>${Bt(t)}</text>`}function m(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var p4={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 h4(e,t){let n=`${e}-shadow-${t}`,r=p4[t],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${r.stdDeviation}"/><feOffset dx="${r.dx}" dy="${r.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${r.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return ee("filter",{id:n,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function GC(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function jC(e){return["subtle","soft","hard"].map(t=>h4(e,t)).join("")}var m4={thin:100,light:300,normal:400,bold:700};function g4(e){return rs[e]??14}function Xw(e,t,n){return{"font-family":t[e.font],"font-size":n??g4(e.textSize),"font-weight":m4[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function y4(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function KC(e){if(!e||e==="none"||e==="transparent")return 1;let t=e.startsWith("#")?e.slice(1):e;if(t.length===3&&(t=t.split("").map(s=>s+s).join("")),t.length!==6)return 1;let n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(r)+.0722*o(i)}function x4(e,t){return KC(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function lm(e,t){return e.length*t*.58}function ZC(e,t,n,r,i,o,s){let a=i*.58,c=t?lm(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=lm(f,i),h={"font-family":o,"font-size":i,fill:s};if(!d)return Se({x:m(u),y:m(r),...h},f);if(d.kind==="builtin"&&d.name==="multiplier")return Se({x:m(u),y:m(r),...h},`${f}\xD7`);if(d.kind==="builtin"){let _=Zi[d.name],x=Se({x:m(u),y:m(r),...h},f),y=i*.1,w=i,v=u+p+y,b=r-i*.85,L=`<svg x="${m(v)}" y="${m(b)}" width="${m(w)}" height="${m(w)}" viewBox="${_.viewBox}" style="color:${ei(s)}" aria-hidden="true">${_.body}</svg>`;return x+L}let g=m(i*.1);return`<text x="${m(u)}" y="${m(r)}" font-family="${ei(o)}" font-size="${i}" fill="${ei(s)}">${Bt(f)}<tspan dx="${g}">${Bt(d.text)}</tspan></text>`}var HC=.6,T4=.5;function v4(e){let{metaText:t,capacity:n,x:r,baselineY:i,fontSize:o,fontFamily:s,color:a}=e;if(!t&&!n)return"";let c={"font-family":s,"font-size":o,fill:a};if(!n)return Se({x:m(r),y:m(i),...c},t);if(!t)return ZC(n,void 0,r,i,o,s,a);let l=m(o*HC),u=`<text x="${m(r)}" y="${m(i)}" font-family="${ei(s)}" font-size="${o}" fill="${ei(a)}">`,{text:f,icon:d}=n;if(!d)return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let L=m(o*.1);return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan><tspan dx="${L}">${Bt(d.text)}</tspan></text>`}let p=Zi[d.name],h=L=>L.length*o*T4,g=r+h(t)+o*HC,_=o*.1,x=o,y=g+h(f)+_,w=i-o*.85,v=u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`,b=`<svg x="${m(y)}" y="${m(w)}" width="${m(x)}" height="${m(x)}" viewBox="${p.viewBox}" style="color:${ei(a)}" aria-hidden="true">${p.body}</svg>`;return v+b}function w4(e,t){let n=FC.calendar,r=`<svg x="${m(e.glyphTopLeft.x)}" y="${m(e.glyphTopLeft.y)}" width="${m(e.glyphSize)}" height="${m(e.glyphSize)}" viewBox="${n.viewBox}" style="color:${ei(t)}" aria-hidden="true">${n.body}</svg>`,i=`<title>${Bt(e.isoDate)}</title>`;return ee("g",{"data-layer":"inline-date-pin","data-side":e.side,"data-date":e.isoDate,"data-spilled":e.spilled?"true":null},i+r)}function Gw(e,t){return!e||e.length===0?"":e.map(n=>w4(n,t)).join("")}function _4(e){return(e?.length??0)>0}function JC(e){return e?.some(t=>t.side==="after")??!1}function E4(e,t,n,r,i,o={}){let s=Math.min(gl[i.cornerRadius]??4,r/2);return ee("rect",{x:m(e),y:m(t),width:m(n),height:m(r),rx:m(s),ry:m(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":y4(i)??null,...o})}function b4(e,t,n,r){let i=e.box.x+e.cardBox.x,o=e.box.y+e.cardBox.y,s=e.cardBox.width,a=e.cardBox.height,c=e.style.bg==="none"?n.surface.headerBox:e.style.bg,l=n.header.cardBorder,u=ee("rect",{x:m(i),y:m(o),width:m(s),height:m(a),rx:6,ry:6,fill:c,stroke:l,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`}),f=[];e.titleLines.forEach((x,y)=>{f.push(Se({x:m(i+16),y:m(o+26+y*20),"font-family":r[e.style.font],"font-size":16,"font-weight":600,fill:e.style.text},x))});let d=f.join(""),p=o+26+Math.max(0,e.titleLines.length-1)*20,h=n.header.author,g=[];e.authorLines.forEach((x,y)=>{g.push(Se({x:m(i+16),y:m(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:h},x))});let _=g.join("");return ee("g",{"data-layer":"header","data-id":`${t}-header`},u+d+_)}function A4(e,t,n){let r=n.timeline.gridLine,i=n.timeline.minorGridLine,o=e.bottomTickPanelHeight??0,s=e.bottomTickPanelY!==void 0&&o>0,a=e.tickPanelY,c=s?e.bottomTickPanelY+o:e.box.y+e.box.height,l=t,u=e.box.y+e.box.height,f=[];for(let d of e.ticks)if(d.major)f.push(ee("line",{x1:m(d.x),y1:m(a),x2:m(d.x),y2:m(c),stroke:r,"stroke-width":1}));else if(e.minorGrid){if(d.labelX===void 0)continue;f.push(ee("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:i,"stroke-width":1}))}for(let d of e.nonWorking??[])d.seam&&f.push(ee("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:n.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));return ee("g",{"data-layer":"grid"},f.join(""))}function QC(e,t,n,r){let i=e.box.y+e.box.height,o=[];for(let s of e.nonWorking??[]){if(!s.band)continue;let a={x:s.x,y:t,width:s.width,height:i-t},c=r?Hw(a,r):a;!c||c.width<=0||c.height<=0||o.push(ee("rect",{x:m(c.x),y:m(c.y),width:m(c.width),height:m(c.height),fill:n.timeline.nonWorkingFill,"fill-opacity":Fm}))}return o.length===0?"":ee("g",{"data-layer":"non-working"},o.join(""))}function R4(e,t,n){let r=t.timeline.panelFill,i=t.timeline.border,o=t.timeline.labelText,s=[],a=e.tickPanelY,c=e.tickPanelHeight,l=c>0,u=e.markerRow.height>0,f=e.waveStrip?e.waveStrip.y+e.waveStrip.height:a+c,d=e.markerRow.height,p=e.bottomTickPanelY,h=e.bottomTickPanelHeight??0,g=p!==void 0&&h>0;l&&s.push(ee("rect",{x:m(e.box.x),y:m(a),width:m(e.box.width),height:m(c),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),u&&s.push(ee("rect",{x:m(e.box.x),y:m(f),width:m(e.box.width),height:m(d),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),g&&s.push(ee("rect",{x:m(e.box.x),y:m(p),width:m(e.box.width),height:m(h),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1}));for(let _ of e.ticks)_.major&&(!_.label||_.labelX===void 0||(l&&s.push(Se({x:m(_.labelX),y:m(a+xl(c)),"font-family":n.sans,"font-size":io,fill:o,"text-anchor":"middle"},_.label)),g&&s.push(Se({x:m(_.labelX),y:m(p+xl(h)),"font-family":n.sans,"font-size":io,fill:o,"text-anchor":"middle"},_.label))));return ee("g",{"data-layer":"timeline"},s.join(""))}function k4(e,t,n){if(!e)return"";let r=t.nowline.stroke,i=t.nowline.labelText,o=ee("line",{x1:m(e.x),y1:m(e.topY),x2:m(e.x),y2:m(e.bottomY),stroke:r,"stroke-width":Cu}),s=I4(e,r),a=S4(e,i,n);return ee("g",{"data-layer":"nowline"},o+s+a)}function eO(e){let t=Cu/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function I4(e,t){let n=e.pillTopY,r=e.pillTopY+ci,i=Im,o=e.pillWidth;if(e.pillMode==="center")return ee("rect",{x:m(e.x-o/2),y:m(n),width:m(o),height:m(ci),rx:i,ry:i,fill:t});let s=eO(e);if(e.pillMode==="flag-right"){let l=s+o,u=[`M ${m(s)} ${m(n)}`,`L ${m(l-i)} ${m(n)}`,`A ${i} ${i} 0 0 1 ${m(l)} ${m(n+i)}`,`L ${m(l)} ${m(r-i)}`,`A ${i} ${i} 0 0 1 ${m(l-i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return ee("path",{d:u,fill:t})}let a=s-o,c=[`M ${m(s)} ${m(n)}`,`L ${m(a+i)} ${m(n)}`,`A ${i} ${i} 0 0 0 ${m(a)} ${m(n+i)}`,`L ${m(a)} ${m(r-i)}`,`A ${i} ${i} 0 0 0 ${m(a+i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return ee("path",{d:c,fill:t})}function S4(e,t,n){let r=e.pillTopY+Sm,i=eO(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+is,s="start"):(o=i-is,s="end"),Se({x:m(o),y:m(r),"font-family":n.sans,"font-size":wl,"font-weight":700,fill:t,"text-anchor":s},e.label)}function N4(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Bt(e.waveTooltip)}</title>`);let s=GC(n,e.style.shadow);o.push(E4(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(J4(e.box,e.style,n));let a=x4(e.style.bg,r),c={done:a.done,"in-progress":a.inProgress,"at-risk":a.atRisk,blocked:a.blocked,planned:a.planned,neutral:a.neutral},l=c[e.status]??c.neutral;if(e.progressFraction>0){let x=Math.max(0,Math.min(e.box.width,e.box.width*e.progressFraction));o.push(ee("rect",{x:m(e.box.x),y:m(e.box.y+e.box.height-er),width:m(x),height:er,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-lo;o.push(ee("circle",{cx:m(u),cy:m(e.box.y+Km),r:rr,fill:l})),o.push(Gw(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ar,e.iconSpills&&(f+=Rr+kn);else{let x=!!e.linkIcon&&e.linkIcon!=="none",w=e.inlineDatePins?.find(v=>v.side==="after"&&!v.spilled)?fi(x,{barWidth:e.box.width}):fi(!t.noLinks&&x&&!e.iconSpills);f=e.box.x+w}let d=e.style.text,p=r.entities.item.text,h=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,_=e.titleLines??(e.title?[e.title]:[]);if(_.forEach((x,y)=>{x!==""&&o.push(Se({x:m(f),y:m(e.box.y+Gu+y*Nl),"font-family":i[e.style.font],"font-size":Sl,"font-weight":600,fill:h},x))}),(e.metaText||e.capacity)&&o.push(v4({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+ju(_.length),fontSize:Vm,fontFamily:i[e.style.font],color:g})),e.footnoteIndicators.length>0){let x=e.box.y+Zm;if(e.footnoteSpills&&e.footnoteSpillStartX!==null){let y=e.footnoteSpillStartX;for(let w=0;w<e.footnoteIndicators.length;w++){let v=e.footnoteIndicators[w];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Cl,"font-weight":700,fill:p},String(v))),y+=Rn}}else{let y=e.box.x+e.box.width-ss;for(let w=e.footnoteIndicators.length-1;w>=0;w--){let v=e.footnoteIndicators[w];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Cl,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(v))),y-=Rn}}}if(!t.noLinks&&e.linkIcon&&e.linkIcon!=="none"){let x={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:r.item.linkIconFg},y=x[e.linkIcon]??x.generic,w=Rr,v=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+co,b=e.box.y+co,L=ee("rect",{x:m(v),y:m(b),width:w,height:w,rx:2,ry:2,fill:y}),P=v,O=b,j=ee("path",{d:`M${m(P+4)} ${m(O+10)} L${m(P+10)} ${m(O+4)} M${m(P+6)} ${m(O+4)} H${m(P+10)} V${m(O+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),z=L+j,F=e.linkHref?ee("a",{href:e.linkHref,target:"_blank",rel:"noopener"},z):z;o.push(F)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,w=r.item.overflowCaption;o.push(ee("rect",{x:m(e.overflowBox.x),y:m(e.overflowBox.y),width:m(e.overflowBox.width),height:m(e.overflowBox.height),fill:x,stroke:y,"stroke-width":1})),e.overflowAnchorId&&e.overflowBox.width>60&&o.push(Se({x:m(e.overflowBox.x+e.overflowBox.width/2),y:m(e.overflowBox.y+e.overflowBox.height/2+3),"font-family":i.sans,"font-size":9,"font-weight":700,fill:w,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(gl[x.style.cornerRadius]??8,x.box.height/2);o.push(ee("rect",{x:m(x.box.x),y:m(x.box.y),width:m(x.box.width),height:m(x.box.height),rx:m(y),ry:m(y),fill:x.style.bg==="none"?"transparent":x.style.bg,stroke:x.style.fg,"stroke-width":.5})),o.push(Se({x:m(x.box.x+x.box.width/2),y:m(x.box.y+x.box.height/2+3),...Xw(x.style,i,rs.xs),"text-anchor":"middle"},x.text))}return ee("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function P4(e,t,n,r,i){let o=[],s=so(e.style.bg);if(s){if(o.push(ee("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:e.style.bg,stroke:e.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${n}-shadow-subtle)`})),e.title){let a=ao(e.title),c=e.box.x,l=e.box.y,u=oo,f=6,d=`M${m(c+f)} ${m(l)}H${m(c+a)}V${m(l+u-f)}A${f} ${f} 0 0 1 ${m(c+a-f)} ${m(l+u)}H${m(c)}V${m(l+f)}A${f} ${f} 0 0 1 ${m(c+f)} ${m(l)}Z`;o.push(ee("path",{d,fill:e.style.fg})),o.push(Se({x:m(c+vl),y:m(l+_m),"font-family":i[e.style.font],"font-size":Em,"font-weight":600,fill:"#ffffff"},e.title))}}else{let a=e.style.fg,c=$l(s,!!e.title,_4(e.inlineDatePins));if(e.style.bracket!=="none"&&!e.waveOnly){let u=e.box.y+e.box.height,f=e.style.bracket==="dashed"?"3 2":null,d=c>0?`M${m(e.box.x+4)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`:`M${m(e.box.x)} ${m(e.box.y)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`;o.push(ee("path",{d,fill:"none",stroke:a,"stroke-width":1,"stroke-dasharray":f}))}e.title&&o.push(Se({x:m(po(e.box.x,cs,JC(e.inlineDatePins))),y:m(e.box.y-Vu),...Xw(e.style,i,Ll),"fill-opacity":.7},e.title))}o.push(Gw(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(jw(a,t,n,r,i));return ee("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function C4(e,t,n,r,i){let o=[];if(e.style.bracket==="solid"||e.style.bracket==="dashed"){let c=e.box.y-12,l=e.box.y+e.box.height+12,u=e.box.x,f=e.box.x+e.box.width,d=r.parallel.bracketStroke;o.push(ee("path",{d:`M${m(u+4)} ${m(c)} H${m(u)} V${m(l)} H${m(u+4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),o.push(ee("path",{d:`M${m(f-4)} ${m(c)} H${m(f)} V${m(l)} H${m(f-4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}e.title&&o.push(Se({x:m(po(e.box.x,us,JC(e.inlineDatePins))),y:m(e.box.y-Vu),...Xw(e.style,i,Ll),"fill-opacity":.7},e.title)),o.push(Gw(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(jw(s,t,n,r,i));return ee("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function jw(e,t,n,r,i){return e.kind==="item"?N4(e,t,n,r,i):e.kind==="group"?P4(e,t,n,r,i):C4(e,t,n,r,i)}var zC=2;function O4(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function L4(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-zC,r=e.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":ee("rect",{x:m(i.startX),y:m(n),width:m(o),height:zC,fill:O4(i.classification,t),"data-utilization":i.classification,"data-load":m(i.load)})});return ee("g",{"data-layer":"lane-utilization","data-id":e.id??null},r.join(""))}function $4(e,t){let n=e.bandIndex%2===0?t.swimlane.rowTintEven:t.swimlane.rowTintOdd,r=t.swimlane.border;return ee("g",{"data-layer":"swimlane-bg","data-id":e.id??null},ee("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),fill:n,stroke:r,"stroke-width":1}))}function tO(e,t,n,r,i){let o=r.swimlane.tabFill,s=r.swimlane.tabStroke,a=r.swimlane.tabText,c=r.swimlane.ownerText,l=r.swimlane.footnoteIndicator,u=[];if(e.title){let d=e.capacity?no(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",h=p?lm(p,10):0,g=Dl(e.box.x,e.title,e.owner,d,h),_=Su,x=e.box.y+10,y=x+Nu;u.push(ee("rect",{x:m(g.tabX),y:m(x),width:m(g.tabW),height:m(_),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Se({x:m(g.titleX),y:m(y),"font-family":i[e.style.font],"font-size":12,"font-weight":600,fill:a},e.title)),e.owner&&u.push(Se({x:m(g.ownerX),y:m(y),"font-family":i[e.style.font],"font-size":10,fill:c},`owner: ${e.owner}`)),e.capacity&&u.push(ZC(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Se({x:m(g.footnoteRightX),y:m(x+14),"font-family":i.sans,"font-size":10,"font-weight":700,fill:l,"text-anchor":"end"},p))}for(let f of e.children)u.push(jw(f,t,n,r,i));return u.push(L4(e,r)),ee("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function D4(e,t,n){let r=e.radius,i=e.center.x,o=e.center.y,s=t.anchorDiamond.fill,a=t.anchorDiamond.stroke,c=ee("path",{d:`M${m(i)} ${m(o-r)} L${m(i+r)} ${m(o)} L${m(i)} ${m(o+r)} L${m(i-r)} ${m(o)} Z`,fill:s,stroke:a,"stroke-width":1.25}),l=t.anchorDiamond.label,u=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,f={x:m(u),y:m(o+4),"font-family":n.sans,"font-size":10,fill:l};e.labelSide==="left"&&(f["text-anchor"]="end");let d=e.title?Se(f,e.title):"";return ee("g",{"data-layer":"anchor","data-id":e.id??null},nO(e.hiddenDate)+c+d)}function M4(e,t){let n=t.anchorDiamond.cutLine;return ee("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:n,"stroke-width":1,"stroke-dasharray":"1 3"})}function F4(e,t,n){let r=e.center.x,i=e.center.y,o=e.radius,s=t.milestoneDiamond.fill,a=ee("path",{d:`M${m(r)} ${m(i-o)} L${m(r+o)} ${m(i)} L${m(r)} ${m(i+o)} L${m(r-o)} ${m(i)} Z`,fill:s,stroke:s,"stroke-width":1}),c=t.milestoneDiamond.label,l=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,u={x:m(l),y:m(i+4),"font-family":n.sans,"font-size":10,"font-weight":600,fill:c};e.labelSide==="left"&&(u["text-anchor"]="end");let f=e.title?Se(u,e.title):"";return ee("g",{"data-layer":"milestone","data-id":e.id??null},nO(e.hiddenDate)+a+f)}function nO(e){return e===void 0?"":`<title>${Bt(e)}</title>`}function B4(e,t,n){let r=e.isOverrun?n.milestoneDiamond.cutLineOverrun:n.milestoneDiamond.cutLineNormal,i=[];if(e.onWaveBoundary||i.push(ee("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":Pu,"stroke-linecap":"round"})),e.slackArrows&&e.slackArrows.length>0){let o=n.milestoneDiamond.slack;for(let s of e.slackArrows)i.push(ee("path",{d:`M${m(s.x)} ${m(s.y)} H${m(e.center.x-6)}`,fill:"none",stroke:o,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":`url(#${t}-arrow-dark)`}))}return i.join("")}function qC(e,t,n){let r=e.kind==="overflow"?n.dependency.overflowStroke:n.dependency.edgeStroke,i=e.waypoints;if(i.length<2)return"";let o=e.kind==="underBar"?.8:1.1;return ee("path",{d:U4(i,Dm),fill:"none",stroke:r,"stroke-width":o,"stroke-dasharray":e.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":`url(#${t}-arrow)`})}function U4(e,t){if(e.length<2)return"";let n=[`M${m(e[0].x)} ${m(e[0].y)}`];for(let r=1;r<e.length;r++){let i=e[r-1],o=e[r];if(r===e.length-1){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let s=e[r+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(t,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let h={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};n.push(`L${m(h.x)} ${m(h.y)}`),n.push(`Q${m(o.x)} ${m(o.y)} ${m(g.x)} ${m(g.y)}`)}return n.join(" ")}function W4(e,t,n,r){if(e.entries.length===0)return"";let i=n.footnotePanel.fill,o=n.footnotePanel.border,s=n.footnotePanel.header,a=n.footnotePanel.title,c=n.footnotePanel.description,l=n.footnotePanel.number,u=[];u.push(ee("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:i,stroke:o,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`})),u.push(Se({x:m(e.box.x+Mn),y:m(e.box.y+Pm),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+_l+Mn,d=e.box.x+Mn,p=d+Mn;return e.entries.forEach((h,g)=>{let _=f+g*El;u.push(Se({x:m(d),y:m(_),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(h.number))),u.push(Se({x:m(p),y:m(_),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},h.title)),h.description&&u.push(Se({x:m(p+Math.max(120,h.title.length*6)),y:m(_),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${h.description}`))}),ee("g",{"data-layer":"footnotes"},u.join(""))}function X4(e,t,n,r,i,o){let s=r.includeRegion.border,a=r.includeRegion.fill,c=r.includeRegion.tabFill,l=r.includeRegion.tabStroke,u=r.includeRegion.tabText,f=r.includeRegion.badgeFill,d=r.includeRegion.badgeStroke,p=r.includeRegion.badgeText,h=e.box.x+8,g=e.box.y,_=e.box.width-16,x=e.box.height,y=ee("rect",{x:m(h),y:m(g),width:m(_),height:m(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Pu}),w=Su,v=Ml(e.box.x,e.label,e.sourcePath),b=g-w/2,L=ee("rect",{x:m(v.tabX),y:m(b),width:m(v.tabWidth),height:w,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),P=Se({x:m(v.tabLabelX),y:m(b+Nu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),O=v.badgeX,j=v.badgeSize,z=g-j/2,F=ee("rect",{x:m(O),y:m(z),width:j,height:j,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),k=ee("path",{d:`M${m(O+7)} ${m(z+4)} H${m(O+14)} V${m(z+11)} M${m(O+4)} ${m(z+7)} H${m(O+11)} V${m(z+14)} H${m(O+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),W=9,X=g+4,R=ee("rect",{x:m(v.sourceHaloX),y:m(X-W),width:m(v.sourceHaloWidth),height:W+6,fill:a}),C=Se({x:m(v.sourceTextX),y:m(X),"font-family":i.mono,"font-size":W,fill:p},e.sourcePath),N={x:h,y:g,width:_,height:x},G=o?QC(o.timeline,o.chartBox.y,r,N):"",q=o?.waves?sO(o.waves,N)+aO(o.waveBoundaries,N):"",V=o?.waves?lO(e.waveCrossings):"",re=e.nestedSwimlanes.map(oe=>tO(oe,t,n,r,i)).join("");return ee("g",{"data-layer":"include"},y+G+q+re+V+L+P+F+k+R+C)}function G4(e,t){let n=e.palette.attribution.mark,r=e.palette.attribution.link;if(e.swimlanes.length===0)return"";let i=e.header.attributionBox.x,o=e.header.attributionBox.y,s=ui,a=Se({x:"0",y:s,"font-family":t.sans,"font-size":$u,"font-weight":400,fill:n},Lu)+Se({x:Al,y:s,"font-family":t.sans,"font-size":ui,"font-weight":700,fill:n},"now")+ee("rect",{x:Om,y:12,width:Lm,height:ui,fill:r})+Se({x:Du,y:s,"font-family":t.sans,"font-size":ui,"font-weight":400,fill:n},"ine"),c=ee("g",{transform:`translate(${m(i)} ${m(o)}) scale(${m(bl)})`},a);return ee("a",{href:Cm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},ee("g",{"data-layer":"attribution"},c))}async function j4(e,t,n,r,i,o,s){if(!t)return"";let a;try{a=await t(e)}catch(u){let f=`logo: failed to load ${e}: ${u instanceof Error?u.message:String(u)}`;if(r.strict)throw u;return r.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=BC(u,{idPrefix:`${n}-logo`,onWarn:r.warn});return ee("g",{transform:`translate(${m(i)} ${m(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=H4(a.bytes);return ee("image",{href:`data:${c};base64,${u}`,x:m(i),y:m(o),width:m(s),height:m(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${e}`;if(r.strict)throw new Error(l);return r.warn?.(l),""}function H4(e){if(typeof btoa<"u"){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}let t=globalThis;if(t.Buffer)return t.Buffer.from(e).toString("base64");throw new Error("renderer: no base64 encoder available")}var z4=.24,sm=2,VC=3,q4=4,V4=8,Y4=10;function rO(e){return e.bg==="none"?"transparent":e.bg}function cm(e){return KC(e)>=z4?"dark":"light"}function iO(e,t){return`url(#${e}-wave-hatch-${t})`}function K4(e,t,n){let r=Xm;return ee("pattern",{id:`${e}-wave-hatch-${t}`,width:r,height:r,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"},ee("line",{x1:m(r/2),y1:0,x2:m(r/2),y2:r,stroke:t==="dark"?n.wave.hatch:n.wave.hatchOnDark,"stroke-width":Gm,opacity:Wm}))}function Z4(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(cm(rO(o.style))):n(o.children)},r=i=>{for(let o of i)n(o.children),r(o.nested)};r(e.swimlanes);for(let i of e.includes)r(i.nestedSwimlanes);return e.waveLegend?.entries.some(i=>i.kind==="background")&&t.add(cm(cO(e.palette))),["dark","light"].filter(i=>t.has(i))}function J4(e,t,n){let i=Math.min(gl[t.cornerRadius]??4,e.height/2);return ee("rect",{x:m(e.x+.5),y:m(e.y+.5),width:m(Math.max(0,e.width-2*.5)),height:m(Math.max(0,e.height-2*.5)),rx:m(i),ry:m(i),fill:iO(n,cm(rO(t)))})}function Hw(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.width,t.x+t.width),o=Math.min(e.y+e.height,t.y+t.height);if(!(i<=n||o<=r))return{x:n,y:r,width:i-n,height:o-r}}var Uw=4,am=.5;function oO(e,t){if(e.empty)return;let n=am;return Hw({x:e.strip.box.x,y:e.strip.box.y+n,width:e.strip.box.width,height:e.strip.box.height-2*n},{x:t.box.x+n,y:e.strip.box.y,width:t.box.width-2*n,height:e.strip.box.height})}function Q4(e,t){let n=Math.min(Uw-am,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+am+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-am-r?n:0}}function ej(e,t){let{x:n,y:r,width:i,height:o}=e,s=(a,c,l)=>a>0?` A${m(a)} ${m(a)} 0 0 1 ${m(c)} ${m(l)}`:"";return`M${m(n+t.left)} ${m(r)} H${m(n+i-t.right)}`+s(t.right,n+i,r+t.right)+` V${m(r+o-t.right)}`+s(t.right,n+i-t.right,r+o)+` H${m(n+t.left)}`+s(t.left,n,r+o-t.left)+` V${m(r+t.left)}`+s(t.left,n+t.left,r)+" Z"}function Ww(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?ee("path",{d:ej(t,n),...o}):ee("rect",{x:m(t.x),y:m(t.y),width:m(t.width),height:m(t.height),...o}),i=r({fill:e.style.stripFill});return e.style.tint?i+r({fill:e.style.tint,"fill-opacity":Rl}):i}function tj(e,t){let n=e.timeline,r=n.waveStrip;if(!e.waves||!r)return"";let i=[ee("rect",{x:m(n.box.x),y:m(r.y),width:m(n.box.width),height:m(r.height),rx:Uw,ry:Uw,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=oO(o,n);s&&i.push(ee("g",{"data-id":o.id},`<title>${Bt(o.strip.tooltip)}</title>${Ww(o,s,Q4(s,n))}`))}return ee("g",{"data-layer":"wave-strip"},i.join(""))}function sO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?Hw(r.columnBox,t):r.columnBox;!i||i.width<=0||i.height<=0||n.push(ee("rect",{x:m(i.x),y:m(i.y),width:m(i.width),height:m(i.height),fill:r.style.tint,"fill-opacity":jm}))}return n.length===0?"":ee("g",{"data-layer":"wave-bg"},n.join(""))}function aO(e,t){let n=[];for(let r of e??[]){let i=r.topY,o=r.bottomY;t&&(r.x<=t.x||r.x>=t.x+t.width||(i=Math.max(i,t.y),o=Math.min(o,t.y+t.height),o<=i))||n.push(ee("line",{x1:m(r.x),y1:m(i),x2:m(r.x),y2:m(o),stroke:r.stroke,"stroke-width":Mu,"stroke-dasharray":r.dash}))}return n.length===0?"":ee("g",{"data-layer":"wave-boundary"},n.join(""))}function YC(e,t){let n=lm(e,tr);return t?n*1.05:n}function nj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+q4,s=i.y+VC,a=i.height-2*VC,c=[],l=(u,f)=>{let d=YC(f,!1)+2*sm;return ee("rect",{x:m(u-d/2),y:m(s),width:m(d),height:m(a),fill:t.timeline.panelFill})+Se({x:m(u),y:m(o),"font-family":n.sans,"font-size":tr,"font-style":"italic",fill:t.wave.labelMuted,"text-anchor":"middle"},f)};i.placeholder!==void 0&&c.push(l(r.box.x+r.box.width/2,i.placeholder));for(let u of e.waves){if(u.strip.gapLabel){let{text:h,x:g}=u.strip.gapLabel;c.push(l(g,h))}if(u.strip.marker){let{x:h,y:g}=u.strip.marker,_=Hm/2;c.push(ee("path",{d:`M${m(h)} ${m(g-_)} L${m(h+_)} ${m(g)} L${m(h)} ${m(g+_)} L${m(h-_)} ${m(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Bt(u.strip.tooltip)}</title>`))}let f=oO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*Rn:0;if(p){let h=d-_r+sm,g=d-_r-p-sm;c.push(Ww(u,{x:g,y:s,width:h-g,height:a}))}if(u.strip.label!==void 0){let h=YC(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-_r-p-h/2):u.strip.labelX,_=h+2*sm;c.push(Ww(u,{x:g-_/2,y:s,width:_,height:a})),c.push(Se({x:m(g),y:m(o),"font-family":n.sans,"font-size":tr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let h=d-_r;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Se({x:m(h),y:m(i.y+Y4),"font-family":n.sans,"font-size":V4,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),h-=Rn}}return c.length===0?"":ee("g",{"data-layer":"wave-labels"},c.join(""))}function lO(e){if(!e||e.length===0)return"";let t=e.map(n=>ee("line",{x1:m(n.x),y1:m(n.topY),x2:m(n.x),y2:m(n.bottomY),stroke:n.stroke,"stroke-width":1,"stroke-dasharray":Um}));return ee("g",{"data-layer":"wave-cross"},t.join(""))}function cO(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function rj(e,t,n,r){if(!e)return"";let i=[];for(let o of e.entries){let s=o.swatch;if(s&&o.kind==="background"){let a=cO(n),c={x:m(s.x),y:m(s.y),width:m(s.width),height:m(s.height)};i.push(ee("rect",{...c,rx:2,ry:2,fill:a,stroke:n.entities.item.fg,"stroke-width":1})),i.push(ee("rect",{x:m(s.x+.5),y:m(s.y+.5),width:m(s.width-1),height:m(s.height-1),rx:2,ry:2,fill:iO(t,cm(a))}))}else if(s&&o.kind==="boundary"){let a=s.x+s.width/2;i.push(ee("line",{x1:m(a),y1:m(s.y),x2:m(a),y2:m(s.y+s.height),stroke:n.wave.boundary,"stroke-width":Mu}))}for(let a of o.runs)i.push(Se({x:m(a.x),y:m(a.y),"font-family":r.sans,"font-size":tr,fill:n.wave.labelText},a.text))}return ee("g",{"data-layer":"wave-legend"},i.join(""))}async function zw(e,t={}){let r=new om(t.idPrefix??"nl").next("root"),i=e.palette,o=t.fontFamilies??Mm,s=[],a=i.arrowhead.neutral,c=i.arrowhead.light,l=i.arrowhead.dark,u=(p,h)=>`<marker id="${p}" 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="${h}"/></marker>`,f=`<defs>${jC(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Z4(e).map(p=>K4(r,p,i)).join("")+"</defs>";s.push(f),s.push(ee("rect",{x:0,y:0,width:m(e.width),height:m(e.height),fill:e.backgroundColor})),s.push(R4(e.timeline,i,o)),s.push(tj(e,i));for(let p of e.swimlanes)s.push($4(p,i));s.push(QC(e.timeline,e.chartBox.y,i)),e.waves&&s.push(sO(e.waves)),s.push(A4(e.timeline,e.chartBox.y,i)),s.push(aO(e.waveBoundaries)),s.push(nj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(qC(p,r,i));for(let p of e.swimlanes)s.push(tO(p,t,r,i,o));for(let p of e.includes)s.push(X4(p,t,r,i,o,e));s.push(lO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(qC(p,r,i));for(let p of e.anchors)s.push(M4(p,i));for(let p of e.milestones)s.push(B4(p,r,i));for(let p of e.anchors)s.push(D4(p,i,o));for(let p of e.milestones)s.push(F4(p,i,o));if(s.push(k4(e.nowline,i,o)),s.push(W4(e.footnotes,r,i,o)),s.push(rj(e.waveLegend,r,i,o)),s.push(b4(e.header,r,i,o)),s.push(G4(e,o)),e.header.logo&&t.assetResolver){let p=await j4(e.header.logo.assetRef??"",t.assetResolver,r,t,e.header.logo.box.x,e.header.logo.box.y,Math.max(e.header.logo.box.width,e.header.logo.box.height));p&&s.push(p)}return`<svg${fl({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${m(e.width)} ${m(e.height)}`,width:m(e.width),height:m(e.height),"data-theme":e.theme,"data-generator":"nowline"})}>${s.join("")}</svg>`}var qw="/browser-source.nowline",ij={error:3,warning:2,info:1},oj={error:3,warning:2,info:1};function uO(e,t){return ij[e]>=oj[t]}var um,fO=0;function dO(){return um||(um=tw()),um}function sj(){return gt.parse(`memory:///nowline-browser-${++fO}.nowline`)}async function fm(e,t={}){let n=t.filePath??qw,r=dO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,sj());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of og(o))a.origin==="lexer"?s.push(CC(a.error,n)):a.origin==="parser"?s.push(PC(a.error,n)):s.push(NC(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function Vw(e,t={}){let n=t.filePath??qw,r=await fm(e,{filePath:n});if(r.diagnostics.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=dO(),o=t.readFile??MC,s=await Zv(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(w=>w.severity==="error"&&!ol(w)&&!Bw(w.message)),c=[...r.diagnostics];for(let w of s.diagnostics){if(w.severity==="error"&&Bw(w.message)){t.onSkippedInclude?.({sourcePath:w.sourcePath,message:w.message});continue}a&&ol(w)||c.push(OC(w))}if(c.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Mw(t.timezone)}catch(w){if(w instanceof Zo)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:w.message,file:n,line:1,column:1}]};throw w}let u=Fw({now:t.today,zone:l}),f=Ow(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Dw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(w=>$C(w,n)),h=t.showLinks!==!1,g=t.strict===!0,_=[],x=await zw(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!h,strict:g,warn:w=>_.push(w),fontFamilies:t.fontFamilies}),y=[...p,..._.map(w=>LC(w,n,g?"error":"warning"))].filter(w=>uO(w.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function Yw(){um=void 0,fO=0}var pO="/embed.nowline",Kw=!1;async function hO(e){let{ast:t,diagnostics:n}=await fm(e,{filePath:pO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function dm(e,t={}){let n={filePath:pO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{Kw||(Kw=!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."))}},r=await Vw(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new xu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var xu=class extends Error{constructor(n,r){super(n);S(this,"details",r);this.name="EmbedRenderError"}};function mO(){Kw=!1,Yw()}var Jn=Uint8Array,En=Uint16Array,t_=Int32Array,n_=new Jn([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]),r_=new Jn([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]),gO=new Jn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vO=function(e,t){for(var n=new En(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new t_(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},wO=vO(n_,2),aj=wO.b,Jw=wO.r;aj[28]=258,Jw[258]=28;var _O=vO(r_,0),dae=_O.b,yO=_O.r,Qw=new En(32768);for(De=0;De<32768;++De)ti=(De&43690)>>1|(De&21845)<<1,ti=(ti&52428)>>2|(ti&13107)<<2,ti=(ti&61680)>>4|(ti&3855)<<4,Qw[De]=((ti&65280)>>8|(ti&255)<<8)>>1;var ti,De,wu=(function(e,t,n){for(var r=e.length,i=0,o=new En(t);i<r;++i)e[i]&&++o[e[i]-1];var s=new En(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(n){a=new En(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],f=s[e[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[Qw[f]>>c]=l}else for(a=new En(r),i=0;i<r;++i)e[i]&&(a[i]=Qw[s[e[i]-1]++]>>15-e[i]);return a}),Jo=new Jn(288);for(De=0;De<144;++De)Jo[De]=8;var De;for(De=144;De<256;++De)Jo[De]=9;var De;for(De=256;De<280;++De)Jo[De]=7;var De;for(De=280;De<288;++De)Jo[De]=8;var De,pm=new Jn(32);for(De=0;De<32;++De)pm[De]=5;var De,lj=wu(Jo,9,0);var cj=wu(pm,5,0);var EO=function(e){return(e+7)/8|0},uj=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Jn(e.subarray(t,n))};var ni=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Tu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},Zw=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:AO,l:0};if(i==1){var s=new Jn(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,L){return b.f-L.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,f=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=n[n[l].f<n[f].f?l++:f++],c=n[l!=u&&n[l].f<n[f].f?l++:f++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new En(d+1),h=e_(n[u-1],p,0);if(h>t){var r=0,g=0,_=h-t,x=1<<_;for(o.sort(function(L,P){return p[P.s]-p[L.s]||L.f-P.f});r<i;++r){var y=o[r].s;if(p[y]>t)g+=x-(1<<h-p[y]),p[y]=t;else break}for(g>>=_;g>0;){var w=o[r].s;p[w]<t?g-=1<<t-p[w]++-1:++r}for(;r>=0&&g;--r){var v=o[r].s;p[v]==t&&(--p[v],++g)}h=t}return{t:new Jn(p),l:h}},e_=function(e,t,n){return e.s==-1?Math.max(e_(e.l,t,n+1),e_(e.r,t,n+1)):t[e.s]=n},xO=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new En(++t),r=0,i=e[0],o=1,s=function(c){n[r++]=c},a=1;a<=t;++a)if(e[a]==i&&a!=t)++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=e[a]}return{c:n.subarray(0,r),n:t}},vu=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},bO=function(e,t,n){var r=n.length,i=EO(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},TO=function(e,t,n,r,i,o,s,a,c,l,u){ni(t,u++,n),++i[256];for(var f=Zw(i,15),d=f.t,p=f.l,h=Zw(o,15),g=h.t,_=h.l,x=xO(d),y=x.c,w=x.n,v=xO(g),b=v.c,L=v.n,P=new En(19),O=0;O<y.length;++O)++P[y[O]&31];for(var O=0;O<b.length;++O)++P[b[O]&31];for(var j=Zw(P,7),z=j.t,F=j.l,k=19;k>4&&!z[gO[k-1]];--k);var W=l+5<<3,X=vu(i,Jo)+vu(o,pm)+s,R=vu(i,d)+vu(o,g)+s+14+3*k+vu(P,z)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&W<=X&&W<=R)return bO(t,u,e.subarray(c,c+l));var C,N,G,q;if(ni(t,u,1+(R<X)),u+=2,R<X){C=wu(d,p,0),N=d,G=wu(g,_,0),q=g;var V=wu(z,F,0);ni(t,u,w-257),ni(t,u+5,L-1),ni(t,u+10,k-4),u+=14;for(var O=0;O<k;++O)ni(t,u+3*O,z[gO[O]]);u+=3*k;for(var re=[y,b],oe=0;oe<2;++oe)for(var ye=re[oe],O=0;O<ye.length;++O){var ne=ye[O]&31;ni(t,u,V[ne]),u+=z[ne],ne>15&&(ni(t,u,ye[O]>>5&127),u+=ye[O]>>12)}}else C=lj,N=Jo,G=cj,q=pm;for(var O=0;O<a;++O){var ae=r[O];if(ae>255){var ne=ae>>18&31;Tu(t,u,C[ne+257]),u+=N[ne+257],ne>7&&(ni(t,u,ae>>23&31),u+=n_[ne]);var A=ae&31;Tu(t,u,G[A]),u+=q[A],A>3&&(Tu(t,u,ae>>5&8191),u+=r_[A])}else Tu(t,u,C[ae]),u+=N[ae]}return Tu(t,u,C[256]),u+N[256]},fj=new t_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),AO=new Jn(0),dj=function(e,t,n,r,i,o){var s=o.z||e.length,a=new Jn(r+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(r,a.length-i),l=o.l,u=(o.r||0)&7;if(t){u&&(c[0]=o.r>>3);for(var f=fj[t-1],d=f>>13,p=f&8191,h=(1<<n)-1,g=o.p||new En(32768),_=o.h||new En(h+1),x=Math.ceil(n/3),y=2*x,w=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&h},v=new t_(25e3),b=new En(288),L=new En(32),P=0,O=0,j=o.i||0,z=0,F=o.w||0,k=0;j+2<s;++j){var W=w(j),X=j&32767,R=_[W];if(g[X]=R,_[W]=X,F<=j){var C=s-j;if((P>7e3||z>24576)&&(C>423||!l)){u=TO(e,c,0,v,b,L,O,z,k,j-k,u),z=P=O=0,k=j;for(var N=0;N<286;++N)b[N]=0;for(var N=0;N<30;++N)L[N]=0}var G=2,q=0,V=p,re=X-R&32767;if(C>2&&W==w(j-re))for(var oe=Math.min(d,C)-1,ye=Math.min(32767,j),ne=Math.min(258,C);re<=ye&&--V&&X!=R;){if(e[j+G]==e[j+G-re]){for(var ae=0;ae<ne&&e[j+ae]==e[j+ae-re];++ae);if(ae>G){if(G=ae,q=re,ae>oe)break;for(var A=Math.min(re,ae-2),$=0,N=0;N<A;++N){var M=j-re+N&32767,H=g[M],Z=M-H&32767;Z>$&&($=Z,R=M)}}}X=R,R=g[X],re+=X-R&32767}if(q){v[z++]=268435456|Jw[G]<<18|yO[q];var Y=Jw[G]&31,ie=yO[q]&31;O+=n_[Y]+r_[ie],++b[257+Y],++L[ie],F=j+G,++P}else v[z++]=e[j],++b[e[j]]}}for(j=Math.max(j,F);j<s;++j)v[z++]=e[j],++b[e[j]];u=TO(e,c,l,v,b,L,O,z,k,j-k,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=_,o.p=g,o.i=j,o.w=F)}else{for(var j=o.w||0;j<s+l;j+=65535){var le=j+65535;le>=s&&(c[u/8|0]=l,le=s),u=bO(c,u+1,e.subarray(j,le))}o.i=s}return uj(a,0,r+EO(u)+i)};var RO=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},pj=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new Jn(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return dj(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)};var kO=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var hj=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=RO();i.p(t.dictionary),kO(e,2,i.d())}};function IO(e,t){t||(t={});var n=RO();n.p(e);var r=pj(e,t,t.dictionary?6:2,4);return hj(r,t),kO(r,r.length-4,n.d()),r}var mj=typeof TextDecoder<"u"&&new TextDecoder,gj=0;try{mj.decode(AO,{stream:!0}),gj=1}catch{}var PO="https://free.nowline.io/open";function SO(e){let t=new TextEncoder().encode(e),n=IO(t),r=32768,i="";for(let o=0;o<n.length;o+=r)i+=String.fromCharCode(...n.subarray(o,o+r));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function i_({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&NO(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",SO(e));let r=n===!0?PO:n,i=new URL(r);return t!==void 0&&NO(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${SO(e)}`,i.toString()}function NO(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var CO=0;async function OO(e){let t=e.document??globalThis.document;if(!t)return{rendered:0,failed:0};let n=t.querySelectorAll(e.selector),r=0,i=0,o=++CO,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=yj(l);if(!u)continue;let f=xj(l),d=`nl-r${o}-${c++}`,p={theme:e.theme,locale:e.locale,width:e.width,nonWorking:e.nonWorking,today:e.today,timezone:e.timezone,idPrefix:d},h=u.parentElement,g=u.nextSibling,x=l.getAttribute("data-nowline-source-url")??void 0??e.sourceUrl;a.push(dm(f,p).then(y=>{if(Tj(u,y),r++,h!==null){let w=i_({source:f,sourceUrl:x,share:s});if(w!==null){let v=t.createElement("a");v.className="nowline-share",v.href=w,v.target="_blank",v.rel="noopener noreferrer",v.textContent="Share on Nowline",h.insertBefore(v,g)}}},y=>{i++,console.error("nowline: render failed",y)}))}return await Promise.all(a),{rendered:r,failed:i}}function yj(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function xj(e){return e.textContent??""}function Tj(e,t){e.outerHTML=t}function LO(){CO=0}function hm(){if(typeof globalThis>"u")return"light";let e=globalThis.matchMedia;if(typeof e!="function")return"light";try{return e("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function $O(e,t){return e&&e!=="auto"?lw(e)??t:t}var vj="0.0.0-dev.20261008053748.g6e34cc1",wj="6e34cc1",_j="pre code.language-nowline, code.language-nowline",DO={theme:"auto",startOnLoad:!0,selector:_j,systemTheme:hm(),share:!0},Ve={...DO},o_=!1;function Ej(e={}){Ve={theme:e.theme??Ve.theme,startOnLoad:e.startOnLoad??Ve.startOnLoad,selector:e.selector??Ve.selector,locale:e.locale??Ve.locale,width:e.width??Ve.width,nonWorking:e.nonWorking??Ve.nonWorking,today:e.today!==void 0?e.today:Ve.today,timezone:e.timezone??Ve.timezone,share:e.share??Ve.share,sourceUrl:e.sourceUrl??Ve.sourceUrl,systemTheme:hm()}}function MO(){return{theme:$O(Ve.theme,Ve.systemTheme),locale:Ve.locale,width:Ve.width,nonWorking:Ve.nonWorking,today:Ve.today,timezone:Ve.timezone}}async function bj(e,t={}){let n={...MO(),...t};return dm(e,n)}async function Aj(e){return hO(e)}async function s_(e){let t={selector:e?.selector??Ve.selector,theme:e?.theme??MO().theme,locale:e?.locale??Ve.locale,width:e?.width??Ve.width,nonWorking:e?.nonWorking??Ve.nonWorking,today:e?.today!==void 0?e.today:Ve.today,timezone:e?.timezone??Ve.timezone,share:e?.share??Ve.share,sourceUrl:e?.sourceUrl??Ve.sourceUrl,document:e?.document};return OO(t)}var Rj=s_;if(typeof document<"u"&&!o_){o_=!0;let e=()=>{Ve.startOnLoad&&s_()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function kj(){Ve={...DO,systemTheme:hm()},o_=!1,mO(),LO()}return Au(Ij);})();
2771
+ `).map(i=>i.trim()),n=0,r=t.length;for(;n<r&&t[n]==="";)n+=1;for(;r>n&&t[r-1]==="";)r-=1;return t.slice(n,r)}function fw(e,t,n,r=t){let i=e,o=UP(e);if(o){if(o.length>=2)return{textSpills:!(n<=t&&o.every((l,u)=>ut(l,$h)<=(u===0?r:t))),titleLines:o};i=o[0]??""}let s=i.length>0&&ut(i,$h)>r,a=n>t;if(!s&&!a)return{textSpills:!1,titleLines:[i]};if(s&&!a){let c=Il(i,t,$h,r);if(c.length>=2&&c.length<=Ym&&c.every((l,u)=>ut(l,$h)<=(u===0?r:t)))return{textSpills:!1,titleLines:c}}return{textSpills:!0,titleLines:[i]}}function dw(e,t,n){let r=UP(e);return r&&r.length>=2?r:!t.textSpills&&!n&&t.titleLines.length>=2?t.titleLines:[r?r[0]??"":e]}var Dh=class{constructor(t){S(this,"input");this.input=t}get id(){return this.input.id}measure(t){return{width:Math.max(An,this.input.logicalRightX-this.input.logicalLeftX),height:t.bands.bandwidth()}}place(t,n){let r=this.measure(n),i=Math.max(An,r.width-2*an),o=t.x+an,s={x:o,y:t.y,width:i,height:r.height},a=fi(!!this.input.hasLinkIcon,this.input.hasAfterGlyph?{barWidth:i}:void 0),c=Math.max(0,i-a-GX),l=this.input.title,u=uw(this.input.metaText,this.input.metaTrailingWidth??0),f=Math.max(0,i-a-(this.input.titleFirstLineRightReservePx??Ol({barWidth:i,footnoteLabels:[],hasBeforeGlyph:!1}))),{textSpills:d,titleLines:p}=fw(l,c,u,f),h=d?o+i+jX:o+a;return{id:this.input.id,box:s,textX:h,textSpills:d,titleLines:p}}};var Mh=class{constructor(t,n){S(this,"node");S(this,"deps");this.node=t,this.deps=n}get id(){return this.node.name??""}place(t,n){let{node:r}=this,{deps:i}=this,o=ht("parallel",r.properties,n.styleCtx),s=Vo(r,t.x,n),a=On(Ke(r.properties,"after")),c=On(Ke(r.properties,"before")),l=r.title??r.name,u=M_(!!(a||c)),f=t.y+u,d=n.scale.showsNonWorking?n.scale.startX(s):s,p=[],h=d,g=0,_=n.currentFlowKey;n.nextParallelId+=1;let x=r.name??`parallel-${n.nextParallelId}`,y=0;for(let L of r.content){if(L.$type==="DescriptionDirective")continue;n.currentFlowKey=`${_}/par:${x}#${y}`;let P=i.newCursor(s,f+g),O=i.sequenceOne(L,P,n);p.push(O),g+=Math.max(n.bandScale.step(),P.height),h=Math.max(h,P.maxX),y++}n.currentFlowKey=_;let w={x:d,y:f,width:h-d,height:g};t.x=h+Tl,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,u+g);let v=r.name;v&&(n.entityLeftEdges.set(v,w.x),n.entityRightEdges.set(v,w.x+w.width));let b=kh({box:w,afterDate:a,beforeDate:c,row:{kind:"header-band",title:l,titleInsetX:us}});return{kind:"parallel",id:v,title:l,box:w,children:p,style:o,inlineDatePins:b.length>0?b:void 0}}};var ll=class extends Map{constructor(t,n=VX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(let[r,i]of t)this.set(r,i)}get(t){return super.get(WP(this,t))}has(t){return super.has(WP(this,t))}set(t,n){return super.set(zX(this,t),n)}delete(t){return super.delete(qX(this,t))}};function WP({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function zX({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function qX({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function VX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Fh(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Bh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var XP=Symbol("implicit");function Uh(){var e=new ll,t=[],n=[],r=XP;function i(o){let s=e.get(o);if(s===void 0){if(r!==XP)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new ll;for(let s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uh(t,n).unknown(r)},Bh.apply(i,arguments),i}function mu(){var e=Uh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,p=i<r,h=p?i:r,g=p?r:i;o=(g-h)/Math.max(1,d-c+l*2),a&&(o=Math.floor(o)),h+=(g-h-o*(d-c))*u,s=o*(1-c),a&&(h=Math.round(h),s=Math.round(s));var _=Fh(d).map(function(x){return h+o*x});return n(p?_.reverse():_)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(d){return arguments.length?(a=!!d,f()):a},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return mu(t(),[r,i]).round(a).paddingInner(c).paddingOuter(l).align(u)},Bh.apply(f(),arguments)}var pw=class e{constructor(t,n,r){S(this,"bandwidthPx");S(this,"stepPx");S(this,"d3");this.bandwidthPx=t,this.stepPx=n,this.d3=r}static fixedRow(t){return new e(t.bandwidth,t.step)}static forRows(t){let n=Array.from({length:t.count},(i,o)=>String(o)),r=mu().domain(n).range(t.range).paddingInner(t.paddingInner??0).paddingOuter(t.paddingOuter??0);return new e(r.bandwidth(),r.step(),r)}bandwidth(){return this.bandwidthPx}step(){return this.stepPx}forward(t){if(!this.d3)throw new Error("BandScale.forward is only available on closed-domain bands (BandScale.forRows)");let n=this.d3(t);if(n===void 0)throw new Error(`BandScale: unknown band id "${t}"`);return n}},YX={bandwidth:56,step:64};function GP(){return pw.fixedRow(YX)}var jP=1e-6,gu=class{constructor(t){S(this,"domain");S(this,"range");S(this,"pixelsPerDay");S(this,"calendar");S(this,"nonWorking");this.domain=t.domain,this.range=t.range,this.calendar=t.calendar,this.nonWorking=t.nonWorking??"hide";let n=Math.max(1,this.showsNonWorking?bn(t.domain[0],t.domain[1]):this.indexOf(t.domain[1]));this.pixelsPerDay=(t.range[1]-t.range[0])/n}get showsNonWorking(){return this.nonWorking==="show"&&this.calendar?.hasNonWorkingDays===!0}indexOf(t){return this.calendar?this.calendar.workingIndexOf(this.domain[0],t):bn(this.domain[0],t)}dayAt(t){let n=(t-this.range[0])/this.pixelsPerDay;return{days:n,day:Math.floor(n+jP)}}forward(t){return this.showsNonWorking?this.range[0]+bn(this.domain[0],t)*this.pixelsPerDay:this.range[0]+this.indexOf(t)*this.pixelsPerDay}forwardWithinDomain(t){return t<this.domain[0]||t>this.domain[1]?null:this.forward(t)}invert(t){let n=Math.round((t-this.range[0])/this.pixelsPerDay);return this.showsNonWorking?_t(this.domain[0],n):this.calendar?this.calendar.dateAtWorkingIndex(this.domain[0],n):_t(this.domain[0],n)}indexAtX(t){let{days:n,day:r}=this.dayAt(t);if(!this.showsNonWorking||!this.calendar)return n;let i=_t(this.domain[0],r),o=this.calendar.workingIndexOf(this.domain[0],i);return this.calendar.isWorkingDay(i)?o+Math.max(0,n-r):o}startX(t){if(!this.showsNonWorking||!this.calendar)return t;let n=_t(this.domain[0],this.dayAt(t).day);if(this.calendar.isWorkingDay(n))return t;let r=this.calendar.workingIndexOf(this.domain[0],n);return this.forward(this.calendar.dateAtWorkingIndex(this.domain[0],r))}advanceX(t,n){if(!this.showsNonWorking||!this.calendar)return t+n*this.pixelsPerDay;let r=this.startX(t);if(n<=0)return r;let i=this.indexAtX(r)+n,o=Math.ceil(i-jP)-1,s=i-o,a=this.calendar.dateAtWorkingIndex(this.domain[0],o);return this.forward(a)+s*this.pixelsPerDay}get originX(){return this.range[0]}get widthPx(){return this.range[1]-this.range[0]}};function Wh(e){return e.endsWith(":")?e.slice(0,-1):e}function zP(e,t){let r=e.roadmapDecl?.properties.find(l=>Wh(l.key)==="scale")?.value,i="weeks",o,s;if(r)if(r==="days"||r==="weeks"||r==="months"||r==="quarters"||r==="years")i=r;else{let l=/^(\d+)([dwmqy])$/.exec(r);if(l){let u=Math.max(1,parseInt(l[1],10));switch(l[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=Xh(i)*u,s=1}}let a=s??O_[i]??4,c=l=>s===void 0&&!l?{labelEveryDefault:!0}:{};if(t){let u=t.properties.find(_=>Wh(_.key)==="unit")?.value??i,f=t.properties.find(_=>Wh(_.key)==="label-every"),d=t.properties.find(_=>Wh(_.key)==="pixels-per-unit"),p=f&&parseInt(f.value,10)||0,h=p!==0?Math.max(1,p):a,g=d?Math.max(1,parseInt(d.value,10)||Xh(u)):o??Xh(u);return{unit:u,labelEvery:h,pixelsPerUnit:g,...c(p!==0)}}return{unit:i,labelEvery:a,pixelsPerUnit:o??Xh(i),...c(!1)}}function Xh(e){switch(e){case"days":return S_;case"weeks":return 40;case"months":return 80;case"quarters":return 160;case"years":return 320}}var KX=.5,hw=.5,mw=7;function Ko(e){return e==="months"||e==="quarters"||e==="years"}function Gh(e,t){let n=e.getUTCFullYear(),r=e.getUTCMonth();switch(t){case"months":return new Date(Date.UTC(n,r+1,1));case"quarters":return new Date(Date.UTC(n,r-r%3+3,1));case"years":return new Date(Date.UTC(n+1,0,1))}}function ZX(e,t){if(e.getUTCDate()!==1)return!1;let n=e.getUTCMonth();switch(t){case"months":return!0;case"quarters":return n%3===0;case"years":return n===0}}function jh(e,t,n,r,i){let o=Math.ceil(t-1e-6);if(i?.hasNonWorkingDays){if(!Ko(n)&&o<=0)return 0;let a=o<=0?e:_t(i.dateAtWorkingIndex(e,o-1),1),c=Ko(n)?HP(a,n):n==="weeks"?qP(a,e,i.weekStart):a;return i.workingIndexOf(e,c)}if(!Ko(n))return Math.ceil(t/r)*r;let s=_t(e,o);return bn(e,HP(s,n))}function HP(e,t){return ZX(e,t)?e:Gh(e,t)}function qP(e,t,n){let r=n===void 0?-bn(t,e):n-e.getUTCDay();return _t(e,(r%mw+mw)%mw)}function JX(e,t,n){return qP(_t(e,1),t,n)}function gw(e,t,n,r=fu){if(e.calendar?.hasNonWorkingDays)return QX(e,t,e.calendar,r);if(Ko(t.unit))return nG(e,t,t.unit,r);let i=n.daysPerUnit(t.unit),o=i*e.pixelsPerDay,s=Math.max(1,Math.round(e.widthPx/e.pixelsPerDay)),a=Math.floor(s/i)+1,c=[];for(let l=0;l<a;l++){let u=l*i,f=e.originX+u*e.pixelsPerDay,d=l%t.labelEvery===0,p=l===a-1;c.push({x:f,labelX:p?void 0:f+o/2,major:d,label:d&&!p?yw(t.unit,_t(e.domain[0],u),l,r):void 0})}return c}function QX(e,t,n,r){let{unit:i}=t,[o,s]=e.domain,a=_=>Ko(i)?Gh(_,i):i==="weeks"?JX(_,o,n.weekStart):_t(_,1),c=[o];for(let _=a(o);_<s;_=a(_))c.push(_);let l=e.forward(s),u=[];c.forEach((_,x)=>{let y=e.forward(_);(x+1<c.length?e.forward(c[x+1]):l)>y&&!eG(e,i,c,x)&&u.push({date:_,x:y})});let f=i==="days"&&t.labelEveryDefault===!0&&n.weekStart!==void 0,d=(_,x)=>f?_.getUTCDay()===n.weekStart:x%t.labelEvery===0,h=(e.showsNonWorking?v_(i):n.daysPerUnit(i))*e.pixelsPerDay,g=u.map(({date:_,x},y)=>{let w=(y+1<u.length?u[y+1].x:l)-x,v=d(_,y),b=v?yw(i,_,y,r):void 0;if(b!==void 0){let L=ut(b,io)>w,P=Ko(i)?y===0||y===u.length-1:w<h-KX;L&&P&&(b=void 0)}return{x,labelX:x+w/2,major:v,label:b}});return s>o&&g.push({x:l,labelX:void 0,major:d(s,u.length),label:void 0}),g}function eG(e,t,n,r){let i=e.calendar;if(!e.showsNonWorking||!i||!Ko(t)||r===0||r!==n.length-1)return!1;let[o,s]=e.domain;return i.workingIndexOf(o,n[r])>=i.workingIndexOf(o,s)}function VP(e,t,n,r){let i=e.calendar;if(!i?.hasNonWorkingDays)return;let o=i.nonWorkingRuns(e.domain[0],e.domain[1]);if(o.length===0)return;let[s,a]=e.range;if(e.showsNonWorking)return o.map(l=>tG(e,l,n));let c=l=>t.some(u=>Math.abs(u.x-l)<hw&&(u.major||r));return o.map(l=>{let u=e.forward(l.from),f={x:u,width:e.forward(_t(l.through,1))-u,from:l.from,through:l.through};l.titles.length>0&&(f.titles=l.titles);let d=u-s>hw&&a-u>hw;return n==="days"&&d&&!c(u)&&(f.seam=!0),f})}function tG(e,t,n){let[r,i]=e.range,o=Math.max(r,e.forward(t.from)),s=Math.min(i,e.forward(_t(t.through,1))),a={x:o,width:s-o,from:t.from,through:t.through};return t.titles.length>0&&(a.titles=t.titles),(n==="days"||n==="weeks"||t.titles.length>0)&&(a.band=!0),a}function nG(e,t,n,r){let[i,o]=e.domain,s=[i];for(let l=Gh(i,n);l<o;l=Gh(l,n))s.push(l);o>i&&s.push(o);let a=s.map(l=>e.forward(l)),c=s.length-1;return s.map((l,u)=>{let f=a[u],d=u%t.labelEvery===0;if(u===c)return{x:f,labelX:void 0,major:d,label:void 0};let p=a[u+1]-f,h=d?yw(n,l,u,r):void 0,g=u===0||u===c-1;return h!==void 0&&g&&ut(h,io)>p&&(h=void 0),{x:f,labelX:f+p/2,major:d,label:h}})}function yw(e,t,n,r){switch(e){case"days":return`${t.getUTCMonth()+1}/${t.getUTCDate()}`;case"weeks":{let i=t.toLocaleString(r,{month:"short",timeZone:"UTC"}),o=t.getUTCDate().toString().padStart(2,"0");return`${i} ${o}`}case"months":return t.toLocaleString(r,{month:"short",timeZone:"UTC"});case"quarters":{let i=Math.floor(t.getUTCMonth()/3)+1;return`${sl(r).quarterPrefix}${i} ${t.getUTCFullYear()}`}case"years":return`${t.getUTCFullYear()}`}}var xw=class{constructor(t,n){S(this,"id");S(this,"anchor");this.id=t,this.anchor=n}place(t,n){let r=ue(this.anchor.properties,"date"),i=Ze(r);if(!i)return null;let o=t.scale.forwardWithinDomain(i);if(o===null)return null;let s=ht("anchor",this.anchor.properties,t.styleCtx),a=t.markerRowPlacements.get(this.id),c=a?.centerY??t.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";t.entityLeftEdges.set(this.id,o),t.entityRightEdges.set(this.id,o),t.entityMidpoints.set(this.id,l);let d={id:this.id,title:this.anchor.title??this.id,center:l,radius:6,style:s,predecessorPoints:[],cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,bumpedUp:(a?.rowIndex??0)>0,labelBox:u,labelSide:f};return!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(i)&&(d.hiddenDate=ro(i)),d}};function KP(e,t,n){let r=[];for(let[i,o]of e){let s=new xw(i,o).place(t,n);s&&r.push(s)}return r}function cl(e){let t=0;for(let n of e)t=Math.max(t,ZP(n.children)),n.nested.length>0&&(t=Math.max(t,cl(n.nested)));return t}function ZP(e){let t=0;for(let n of e)n.kind==="item"?t=Math.max(t,n.box.x+n.box.width):t=Math.max(t,ZP(n.children));return t}function Tw(e,t,n){let r=[],i=new Map,o=new Map;return[...e.entries()].sort(([c],[l])=>c.localeCompare(l)).forEach(([c,l],u)=>{let f=u+1;i.set(c,f),o.set(c,Ke(l.properties,"on")),r.push({number:f,title:l.title??c,description:l.description?.text,style:ht("footnote",l.properties,t.styleCtx)})}),{area:{box:{x:Mn,y:n+Mn,width:t.chartRightX-2*Mn,height:r.length===0?0:_l+r.length*El+Mn},entries:r},index:i,hosts:o}}var rG=.8,iG=1;function oG(e){let t=[];return QP(e,t),t}function QP(e,t){for(let n of e)if(n.kind==="item"){let r=sG(n);r>0&&n.box.width>0&&t.push({startX:n.box.x,endX:n.box.x+n.box.width,load:r})}else(n.kind==="parallel"||n.kind==="group")&&QP(n.children,t)}function sG(e){return e.capacity?e.capacity.value:e.size?1:0}function eC(e){if(e.capacityValue<=0||e.warnFraction===null&&e.overFraction===null)return null;let t=oG(e.children);if(t.length===0)return null;let n=new Set;for(let s of t)n.add(s.startX),n.add(s.endX);let r=Array.from(n).sort((s,a)=>s-a);if(r.length<2)return null;let i=[];for(let s=0;s<r.length-1;s++){let a=r[s],c=r[s+1],l=(a+c)/2,u=0;for(let f of t)f.startX<=l&&l<f.endX&&(u+=f.load);i.push({startX:a,endX:c,load:u,classification:aG(u,e.capacityValue,e.warnFraction,e.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:e.capacityValue,warnFraction:e.warnFraction,overFraction:e.overFraction}}function aG(e,t,n,r){let i=e/t;return r!==null&&i>=r?"red":n!==null&&i>=n?"yellow":"green"}function tC(e,t){let n=t.get("swimlane"),r=JP(ue(e.properties,"utilization-warn-at"),n?ue(n.properties,"utilization-warn-at"):void 0,rG),i=JP(ue(e.properties,"utilization-over-at"),n?ue(n.properties,"utilization-over-at"):void 0,iG);return{warn:r,over:i}}function JP(e,t,n){let i=uG(e??t);return i.kind==="unset"?n:i.kind==="none"?null:i.value}var lG=/^\d+(?:\.\d+)?%$/,cG=/^\d+\.\d+$/;function uG(e){if(e===void 0)return{kind:"unset"};if(e==="none")return{kind:"none"};if(lG.test(e)){let t=parseFloat(e)/100;return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}if(cG.test(e)){let t=parseFloat(e);return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"unset"}}return{kind:"unset"}}var nC=10;function fG(e,t,n){let r=ue(e.properties,"capacity"),i=ai(r);if(i===null)return{capacity:null,badgeWidthPx:0};let o=pl(i),s=hl(t.capacityIcon,n),a=no(o,s,nC);return{capacity:{value:i,text:o,icon:s},badgeWidthPx:a}}var dG=10,pG=38,hG=8;function mG(e,t,n){let r=e.title??e.name??"";if(!r)return 0;let i=ue(e.properties,"owner");return Dl(0,r,i??void 0,t,n).rightX}function gG(e,t){if(!e.name)return[];let n=[];for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e.name)){let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i),n}function yG(e,t,n,r){for(let i of e.content)if(i.$type!=="DescriptionDirective")return n.scale.startX(r.resolveChildStart(i,t,t,n))}var ul=class{constructor(t,n){S(this,"input");S(this,"deps");this.input=t,this.deps=n}get id(){return this.input.lane.name??""}place(t,n){let{lane:r,bandIndex:i}=this.input,{deps:o}=this,s=ht("swimlane",r.properties,n.styleCtx),a=t.x,c=n.bandScale.step(),l=n.currentFlowKey;n.currentFlowKey=`lane:${r.name??i}`;let{capacity:u,badgeWidthPx:f}=fG(r,s,n.symbols),d=gG(r,n),p=d.length>0?o.estimateTextWidth(d.join(","),nC):0,h=mG(r,f,p),g=yG(r,a,n,o),_=!r.title||g===void 0||g>=h+hG,x=t.y+(_?dG:pG),y=new al({laneLeftX:a,originY:x,minRowHeight:c,slackCorridors:n.slackCorridors}),w=a,v=[];for(let k of r.content){if(k.$type==="DescriptionDirective")continue;if(!Mt(k)){let H=o.resolveChildStart(k,w,a,n),{rowIndex:Z,y:Y}=y.placeBlock(),ie=o.newCursor(H,Y),le=o.sequenceOne(k,ie,n);v.push(le);let xe=le.box.x+le.box.width,Te=Math.max(c,ie.height);y.commitBlock({rowIndex:Z,placed:le,blockHeight:Te,blockEnd:xe,spillReservation:Yu(le)}),w=Math.max(w,xe);continue}let W=k.properties,X=o.resolveChildStart(k,w,a,n),R=li(W,n.sizes,n.cal),C=n.scale.startX(X),N=Math.max(An,Yo(n,C,R)),G=C+N,q=k.name??"",V=o.predictItemBarExtraHeight(k,C,n),re=c+V,{rowIndex:oe,y:ye}=y.placeItem({childId:q,desiredStart:C,desiredEnd:G,predictedHeight:re}),ne=o.newCursor(X,ye),ae=o.sequenceItem(k,ne,n);v.push(ae);let A=ae.box.x+ae.box.width+an;w=Math.max(w,A);let $=null;(ae.textSpills||ae.chipsOutside||ae.dotSpills||ae.iconSpills||ae.footnoteSpills)&&($=Math.max(ae.decorationsRightX,ae.chipsOutside?ae.chipsRightX:0)+6),y.commitItem({rowIndex:oe,placed:ae,logicalEnd:A,spillReservation:$,rowHeight:Math.max(re,c+(ae.box.height-n.bandScale.bandwidth()))})}let b=x-t.y,L=Math.max(c+32,b+y.usedHeight()+16),P=Math.max(y.usedRightX(),h),O={x:0,y:t.y,width:n.chartRightX,height:L},j=ue(r.properties,"owner"),z;if(j){let k=n.teams.get(j),W=n.persons.get(j);z=k?.title??W?.title??j}let F=u?(()=>{let{warn:k,over:W}=tC(r,n.styleCtx.defaults);return eC({children:v,capacityValue:u.value,warnFraction:k,overFraction:W})})():null;return n.currentFlowKey=l,{positioned:{id:r.name,title:r.title??r.name??"",box:O,bandIndex:i,children:v,nested:[],style:s,owner:z,footnoteIndicators:d,capacity:u,utilization:F},usedHeight:L,usedRightX:P}}};var xG=18,TG=14,vG=14,wG=16,_G=32;function vw(e,t,n,r){let i=n+xG,o=[],s=!0;for(let a of e){s||(i+=wG),s=!1;let c=a.content.roadmap?.title??a.sourcePath,l=i+TG,u={cal:t.cal,styleCtx:{theme:t.styleCtx.theme,styles:a.config.styles,defaults:a.config.defaults,labels:a.content.labels},sizes:ns(a.content.sizes,t.cal),labels:a.content.labels,teams:a.content.teams,persons:a.content.persons,symbols:a.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:t.timeline,scale:t.scale,calendar:t.calendar,bandScale:t.bandScale,entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:new Map,chartTopY:l,chartBottomY:l,swimlaneBottomY:l,chartRightX:t.chartRightX,nextParallelId:0,nextGroupId:0,...t.waves?{waves:t.waves}:{}};t.waves&&Oh(t.waves,u.entityLeftEdges,u.entityRightEdges);let f=[],d=l,p=0;for(let y of a.content.swimlanes.values()){u.nextParallelId=0,u.nextGroupId=0;let{positioned:w,usedHeight:v}=new ul({lane:y,bandIndex:p},r).place({x:u.timeline.originX,y:d},u);f.push(w),d+=v,p++}let h=d,g=Math.max(t.bandScale.bandwidth(),h-i+vG),_={x:0,y:i,width:0,height:g},x={sourcePath:a.sourcePath,label:c,box:_,nestedSwimlanes:f,style:ht("swimlane",[],t.styleCtx)};ww(x,t.chartRightX),o.push(x),i+=g}return{regions:o,endY:i}}function ww(e,t){let n=e.box.x,{chromeRightX:r}=Ml(n,e.label,e.sourcePath),i=cl(e.nestedSwimlanes),o=Math.max(r,i)+_G,s=Math.min(t-n,o-n);e.box.width=s;for(let a of e.nestedSwimlanes)a.box.width=s}function qh(e,t){let n=[];for(let r of e){let i=t.placedItems.get(r),o=i?i.box.x+i.box.width:t.entityRightEdges.get(r);if(o===void 0)continue;let s=i?yP(i,t.bandScale.bandwidth()):t.entityMidpoints.get(r)?.y??0;if(!i&&t.waves?.plan.index.has(r)){n.push({ref:r,x:o,y:s,flowKey:`wave:${r}`,wave:r});continue}let a=t.itemFlowKey.get(r)??`marker:${r}`;n.push({ref:r,x:o,y:s,flowKey:a})}return n}function Vh(e){let t=new Map;for(let n of e){let r=t.get(n.flowKey);(!r||n.x>r.x)&&t.set(n.flowKey,n)}return Array.from(t.values())}function Ew(e){let t=null;for(let n of e)n.wave===void 0&&(!t||n.x>t.x)&&(t=n);return t}function EG(e,t){let n;for(let r of e)r.wave===void 0||r.x-t<Kt||(!n||r.x>n.x)&&(n=r);return n?.wave}function rC(e,t,n,r,i,o,s,a){let c=r.length*i*.58*(o?1.05:1),l=e+n+6,u=e-n-6-c,f=l+c<=a,d=u>=s,p=f?"right":d?"left":"right";return{box:{x:p==="right"?l:u,y:t-4,width:c,height:12},side:p}}var _w=class{constructor(t,n){S(this,"id");S(this,"milestone");this.id=t,this.milestone=n}place(t){let n=this.milestone,r=ht("milestone",n.properties,t.styleCtx),i=ue(n.properties,"date"),o=Ke(n.properties,"after"),s=Ze(i),a=t.timeline.markerRow.y,c=6,l=n.title??this.id,u=null,f=a,d=null,p="right",h=!1,g,_=!1,x;if(s){let v=t.scale.forwardWithinDomain(s);if(v===null)return null;u=v,h=!0;let b=t.markerRowPlacements.get(this.id);b&&(f=b.centerY,d=b.labelBox,p=b.labelSide);let L=qh(o,t),P=Vh(L),O=Ew(P);O&&O.x>v&&(_=!0,g=[{x:O.x,y:O.y>0?O.y:f}]),x=EG(P,v),x!==void 0&&(_=!0)}else if(o.length>0){let v=qh(o,t),b=Vh(v);b.sort((j,z)=>z.x-j.x);let L=b[0]?.x??t.timeline.originX;u=L,h=!1;let P=rC(u,a,c,l,10,!0,t.timeline.box.x,t.chartRightX);f=a,d=P.box,p=P.side,t.markerRowPlacements.set(this.id,{rowIndex:0,centerY:f,labelBox:d,labelSide:p});let O=[];for(let j=1;j<b.length;j++){let z=b[j];z.x<L&&z.y>0&&z.wave===void 0&&O.push({x:z.x,y:z.y})}O.length>0&&(g=O)}if(u===null)return null;if(!d){let v=rC(u,f,c,l,10,!0,t.timeline.box.x,t.chartRightX);d=v.box,p=v.side}let y={x:u,y:f};t.entityLeftEdges.set(this.id,y.x),t.entityRightEdges.set(this.id,y.x),t.entityMidpoints.set(this.id,y);let w={id:this.id,title:l,center:y,radius:c,fixed:h,slackArrows:g,isOverrun:_,style:r,cutTopY:t.chartTopY,cutBottomY:t.swimlaneBottomY,labelBox:d,labelSide:p};return t.waves&&!_&&FP(t.waves,y.x)&&(w.onWaveBoundary=!0),x!==void 0&&s&&(w.overrunByWave=x,w.overrunDate=ro(s)),s&&!t.scale.showsNonWorking&&!t.calendar.isWorkingDay(s)&&(w.hiddenDate=ro(s)),w}};function iC(e,t){let n=[];for(let[r,i]of e){let o=new _w(r,i).place(t);o&&n.push(o)}return n}function Kh(e){let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(n=>n+n).join("")),!/^[0-9a-fA-F]{6}$/.test(t))throw new Error(`Unsupported hex colour: ${e}`);return[Number.parseInt(t.slice(0,2),16),Number.parseInt(t.slice(2,4),16),Number.parseInt(t.slice(4,6),16)]}function oC(e){let[t,n,r]=Kh(e).map(i=>{let o=i/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r}function Zh(e,t){let n=oC(e),r=oC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}var bG=4.5;function lC(e,t,n,r,i){if(!e.frozen||!e.solve)throw new Error("buildWaves: the wave barrier has not settled");let o=t.timeline.waveStrip;if(!o)throw new Error("buildWaves: the timeline has no wave strip");let s=PP(e.plan,e.solve,e.pass,e.origin,e.floors,Kt),a=s.every(y=>y.memberCount===0),c=t.timeline.box.x,l=c+t.timeline.box.width,u=o.y+o.height/2,f=[],d=0,p=s.map((y,w)=>{let v=e.plan.waves[w],b=v.title??y.id,L=y.memberCount===0,P=hu(y.start,t),O=BP(y.start,y.end,t),j=L?void 0:d++,z=AG(y.id,t),F=RG(v.properties,j,t),k=Math.max(y.start,c),W=Math.min(y.end,l),X=Math.max(0,W-k),R,C=!1;if(!L){if(z.length>0){let ye=z.length*Rn;R=sC(b,y.id,w+1,X,ye),C=R!==void 0}R??(R=sC(b,y.id,w+1,X,0))}let N=(k+W)/2,G;if(L&&(N=y.start,!a)){let ye=f.filter(ne=>Math.abs(ne-y.start)<Kt).length;f.push(y.start),N=y.start+ye*zm,G={x:N,y:u}}let q=L?bw(P):`${bw(P)} \u2013 ${bw(O)}`,V=[b,q];L?V.push(n.waveNoItems):y.heldBy!==void 0&&V.push(`${n.waveHeldBy} ${y.heldBy}`);let re,oe=s[w-1];if(!a&&oe!==void 0&&y.floorRef!==void 0&&y.start-oe.end>Kt){let ye=Math.max(oe.end,c),ne=Math.min(y.start,l);ut(y.floorRef,tr)+2*_r<=ne-ye&&(re={text:y.floorRef,x:(ye+ne)/2})}return{id:y.id,title:b,index:w,...j!==void 0?{visibleOrdinal:j}:{},startX:y.start,endX:y.end,startDate:P,endDate:O,memberCount:y.memberCount,empty:L,...y.heldBy!==void 0?{heldBy:y.heldBy}:{},...y.floorRef!==void 0?{floorRef:y.floorRef}:{},columnBox:{x:y.start,y:t.chartTopY,width:y.end-y.start,height:t.swimlaneBottomY-t.chartTopY},strip:{box:{x:y.start,y:o.y,width:y.end-y.start,height:o.height},...R?{label:R.label}:{},labelKind:R?.kind??"none",labelX:N,tooltip:V.join(" \xB7 "),footnotesShown:C,...G?{marker:G}:{},...re?{gapLabel:re}:{}},style:F,footnoteIndicators:z}}),h=a?[]:SG(p,e.origin,o.y,t),g=Aw(r),_=i.map(y=>Aw(y.nestedSwimlanes));for(let y of[...g,..._.flat()])y.waveTooltip=n.waveBackgroundItem;let x={waves:p,boundaries:h,crossings:aC(g,h),regionCrossings:_.map(y=>aC(y,h)),hasBackground:g.length+_.flat().length>0};return a&&(x.placeholder=dP(n,p.map(y=>y.title))),x}function sC(e,t,n,r,i){let o=a=>ut(a,tr)*1.05+i+2*_r<=r;if(o(e))return{kind:"title",label:e};if(t!==e&&o(t))return{kind:"id",label:t};for(let a=e.length-1;a>=3;a--){let c=e.slice(0,a).trimEnd();if(c.length<3)break;let l=`${c}\u2026`;if(o(l))return{kind:"ellipsis",label:l}}let s=`#${n}`;if(o(s))return{kind:"ordinal",label:s}}function AG(e,t){let n=[];for(let[r,i]of t.footnoteHosts.entries()){if(!i.includes(e))continue;let o=t.footnoteIndex.get(r);o!==void 0&&n.push(o)}return n.sort((r,i)=>r-i)}function RG(e,t,n){let r=n.styleCtx.theme,i=new Map,o=ue(e,"style"),s=o?n.styleCtx.styles.get(o):void 0;for(let d of s?.properties??[]){let p=d.key.endsWith(":")?d.key.slice(0,-1):d.key;i.set(p,d.value)}let a=d=>{let p=i.get(d);if(p===void 0)return;let h=Qr(p,r);return h==="none"?void 0:h},c=a("bg"),l=t!==void 0&&t%2===1?r.wave.stripFillAlt:r.wave.stripFill,u=c?kG(l,c,Rl)??l:l,f=i.get("border");return{...c?{tint:c}:{},stripFill:l,text:a("text")??IG(r.wave,u),boundary:a("fg")??r.wave.boundary,boundaryDash:f==="dashed"?"4 2":f==="dotted"?"1 2":null}}var Jh=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function kG(e,t,n){if(!Jh.test(e)||!Jh.test(t))return;let r=Kh(e),i=Kh(t);return`#${r.map((o,s)=>Math.round(o*(1-n)+i[s]*n).toString(16).padStart(2,"0")).join("")}`}function IG(e,t){let n=e.labelText;return!Jh.test(n)||!Jh.test(t)||Zh(n,t)>=bG?n:Zh(e.hatch,t)>=Zh(e.hatchOnDark,t)?e.hatch:e.hatchOnDark}function SG(e,t,n,r){let i=[];for(let a of e)a.empty||(i.push({x:a.startX,wave:a,opening:!0}),i.push({x:a.endX,wave:a,opening:!1}));i.sort((a,c)=>a.x-c.x);let o=[],s=0;for(;s<i.length;){let a=s;for(;a<i.length&&i[a].x-i[s].x<Kt;)a++;let c=i.slice(s,a);s=a;let l=c[0].x;if(Math.abs(l-t)<Kt)continue;let u=(c.find(f=>f.opening)??c[0]).wave;o.push({x:l,topY:n,bottomY:r.swimlaneBottomY,stroke:u.style.boundary,dash:u.style.boundaryDash})}return o}function Aw(e){let t=[],n=r=>{for(let i of r)i.kind==="item"?i.waveRole==="background"&&t.push(i):n(i.children)};for(let r of e)n(r.children),t.push(...Aw(r.nested));return t}function aC(e,t){let n=[];for(let r of e){let i=r.box.x,o=r.box.x+r.box.width;for(let s of t)i<s.x&&s.x<o&&n.push({x:s.x,topY:r.box.y,bottomY:r.box.y+r.box.height,stroke:s.stroke})}return n}var NG="\u2070\xB9\xB2\xB3\u2074\u2075\u2076\u2077\u2078\u2079";function PG(e){return String(e).replace(/[0-9]/g,t=>NG[Number(t)])}function cC(e,t,n,r){let{waves:i}=e,o=i.some(v=>!v.empty&&v.strip.labelKind!=="title"),s=i.some(v=>v.empty),a=i.some(v=>v.footnoteIndicators.length>0&&!v.strip.footnotesShown);if(!e.hasBackground&&!o&&!s&&!a)return;let c=tr,l=v=>ut(v,c),u=t.timeline.originX,f=Math.max(u,t.chartRightX-ln),d=0,p=u,h=!1,g=0,_=v=>r+v*kl+Xu,x=v=>{h&&p+Wu+v>f&&(d++,p=u,h=!1);let b=h?p+Wu:p;return p=b+v,h=!0,g=Math.max(g,p-u),b},y=[],w=(v,b)=>{let L=Bu+qm,P=x(L+l(b)),O=_(d);y.push({kind:v,text:b,swatch:{x:P,y:O-Xu+(kl-Uu)/2,width:Bu,height:Uu},runs:[{text:b,x:P+L,y:O}]})};if(e.hasBackground&&w("background",n.waveLegendBackground),e.boundaries.length>0&&w("boundary",n.waveLegendBoundary),o||s||a){let v=i.map(O=>{let j=`#${O.index+1} ${O.title}`;return O.footnoteIndicators.length>0&&!O.strip.footnotesShown&&(j+=` ${O.footnoteIndicators.map(PG).join(",")}`),O.empty&&(j+=` (${n.waveNoItems})`),j}),b=" \xB7 ",L=`${n.waveLegendPrefix} ${v[0]}`,P=[{text:L,x:x(l(L)),y:_(d)}];for(let O of v.slice(1)){let j=P[P.length-1];p+l(b+O)<=f?(j.text+=b+O,p+=l(b+O),g=Math.max(g,p-u)):(d++,p=u,h=!1,P.push({text:O,x:x(l(O)),y:_(d)}))}y.push({kind:"waves",text:`${n.waveLegendPrefix} ${v.join(b)}`,runs:P})}return{box:{x:u,y:r,width:g,height:(d+1)*kl},entries:y}}function bw(e){return e.toISOString().slice(0,10)}var CG=4;function fC(e,t){t>e.chartRightX&&(e.chartRightX=t)}function dC(e,t,n){let r=VP(t,e.ticks,n,e.minorGrid);r&&(e.nonWorkingDisplay=t.showsNonWorking?"show":"hide",e.nonWorking=r)}var em=class{place(t,n,r,i,o){let s=r.theme??"light",a=aw[s],c=r.width??1280,l=fP(r.locale,LG(t)),{config:u,working:f}=A_(t,n),d=zP(t,n.config.scale),p=ns(n.content.sizes,u),h={theme:a,styles:n.config.styles,defaults:n.config.defaults,labels:n.content.labels},{startDate:g,endDate:_}=o.computeDateWindow(t,{cal:u,sizes:p,calendar:f},n,r.today,d,i),x=ht("roadmap",t.roadmapDecl?.properties??[],h),y=x.headerPosition==="beside",w=yl[x.headerHeight]??yl.md,v=w>0&&x.timelinePosition!=="bottom",b=w>0&&(x.timelinePosition==="bottom"||x.timelinePosition==="both"),L=Ph(r.nonWorking)?r.nonWorking:x.nonWorking,P=L==="show"&&f.hasNonWorkingDays,O=t.roadmapDecl?.title??t.roadmapDecl?.name??"",j=ue(t.roadmapDecl?.properties??[],"author"),z=o.sizeBesideHeader(O,j),F=y?{x:0,y:0,width:z.boxWidth,height:0}:{x:0,y:0,width:0,height:Ou},k=y?z.boxWidth:0,W=y?8:Ou+8,X=d.pixelsPerUnit/f.daysPerUnit(d.unit),R=Math.max(1,f.workingIndexOf(g,_)),C=P?Math.max(1,bn(g,_))*X:R*X,N=k+ln,G=C,q=k+ln+G+ln,V=Math.min(c,q),re=r.today!==void 0&&r.today>=g&&r.today<=_,oe=n.content.anchors.size+n.content.milestones.size>0,ye=re?ci:0,ne=v?w:0,ae=i?Bm:0,A=new gu({domain:[g,_],range:[N,N+C],calendar:f,nonWorking:L}),$=Math.max(V,N+G+ln),M=[];for(let[te,me]of n.content.anchors){let st=Ze(ue(me.properties,"date"));if(!st)continue;let Dn=A.forwardWithinDomain(st);Dn!==null&&M.push({id:te,centerX:Dn,radius:6,title:me.title??te,fontSize:10,bold:!1,date:st,isMilestone:!1})}for(let[te,me]of n.content.milestones){let st=Ze(ue(me.properties,"date"));if(!st)continue;let Dn=A.forwardWithinDomain(st);Dn!==null&&M.push({id:te,centerX:Dn,radius:6,title:me.title??te,fontSize:10,bold:!0,date:st,isMilestone:!0})}let H=pC(M,k,$,o.estimateTextWidth),Z=oe?Math.max(1,H.rowCount):0,Y=Z*26,ie=ye+ne+ae+Y,le=ie+8,xe=y?z.cardHeight+CG:0,Te=Math.max(W,xe-ie),he=Te+ye,He=he+ne,Me=He+ae,ot=Me+Y,sn=gw(A,d,f,l),Rt={box:{x:N,y:Te,width:C,height:0},ticks:sn,pixelsPerDay:X,originX:N,startDate:g,endDate:_,labelStyle:ht("roadmap",[],h),pillRowHeight:ye,tickPanelY:he,tickPanelHeight:ne,markerRow:{y:Me+13,height:Y,collisionY:Me-8},minorGrid:x.minorGrid,...i?{waveStrip:{y:He,height:ae}}:{}};dC(Rt,A,d.unit);let Tr=new Map;for(let[te,me]of H.placements){let st=Me+13+me.rowIndex*26;Tr.set(te,{rowIndex:me.rowIndex,centerY:st,labelBox:{...me.labelBox,y:st-4},labelSide:me.labelSide})}let Q={cal:u,styleCtx:h,sizes:p,labels:n.content.labels,teams:n.content.teams,persons:n.content.persons,symbols:n.config.symbols,footnoteIndex:new Map,footnoteHosts:new Map,timeline:Rt,scale:A,calendar:f,bandScale:GP(),entityLeftEdges:new Map,entityRightEdges:new Map,entityMidpoints:new Map,placedItems:new Map,itemFlowKey:new Map,currentFlowKey:"",slackCorridors:[],markerRowPlacements:Tr,chartTopY:Te+le,chartBottomY:0,swimlaneBottomY:0,chartRightX:$,nextParallelId:0,nextGroupId:0,...i?{waves:CP(i,A,N)}:{}};for(let te of M){let me=Tr.get(te.id);me&&(Q.entityLeftEdges.set(te.id,te.centerX),Q.entityRightEdges.set(te.id,te.centerX),Q.entityMidpoints.set(te.id,{x:te.centerX,y:me.centerY}))}let Qn=Tw(n.content.footnotes,Q,0);Q.footnoteIndex=Qn.index,Q.footnoteHosts=Qn.hosts;let ri=new Map(Q.entityLeftEdges),ii=new Map(Q.entityRightEdges),oi=new Map(Q.entityMidpoints),Ji=()=>{Q.entityLeftEdges=new Map(ri),Q.entityRightEdges=new Map(ii),Q.entityMidpoints=new Map(oi),Q.placedItems=new Map,Q.itemFlowKey=new Map,Q.currentFlowKey="",Q.waves&&Oh(Q.waves,Q.entityLeftEdges,Q.entityRightEdges)},$n=[...n.content.swimlanes.values()],E=ht("swimlane",[],h),B=R_[E.spacing]??0,K=()=>{Q.nextParallelId=0,Q.nextGroupId=0;let te=[],me=Q.chartTopY,st=0,Dn=Q.timeline.originX;for(let GO of $n){st>0&&(me+=B);let{positioned:jO,usedHeight:HO,usedRightX:a_}=new ul({lane:GO,bandIndex:st},o).place({x:Q.timeline.originX,y:me},Q);te.push(jO),me+=HO,a_>Dn&&(Dn=a_),st++}return{swimlanes:te,nextY:me,maxRightX:Dn}},se=n.content.isolatedRegions,ve,Fe,Re=Q.waves;if(Re){let te,me=Ch(Re.ids.length,Re.origin,Re.floors,(st,Dn)=>(OP(Re,st,Dn),Ji(),te=K(),se.length>0&&vw(se,Q,te.nextY+8,o),Re.pass),Kt);LP(Re,me),Fe={passes:me.passes,capped:me.capped},ve=te}else ve=K();let Ee=ve.swimlanes,Le=ve.nextY,Xe=OG(n.content.milestones,Q);Xe.length>0&&(Ji(),Q.slackCorridors=Xe,ve=K(),Ee=ve.swimlanes,Le=ve.nextY),fC(Q,ve.maxRightX+ln);let Ce=[];if(se.length>0){let te=vw(se,Q,Le+8,o);Ce=te.regions,Le=te.endY}Q.chartBottomY=Le,Q.swimlaneBottomY=Le,Rt.box.height=Q.chartBottomY-Rt.box.y;let yt=iC(n.content.milestones,Q),xt=cl(Ee);for(let te of Ce)xt=Math.max(xt,cl(te.nestedSwimlanes));for(let te of M)xt=Math.max(xt,te.centerX+te.radius);for(let te of yt)xt=Math.max(xt,te.center.x+te.radius);let vr=f.daysPerUnit(d.unit),Wt=Q.scale.showsNonWorking?Q.scale.indexAtX(xt):(xt-N)/X,Xt=Wt>0?jh(g,Wt,d.unit,vr,f):0;if(Xt>R){let te=f.dateAtWorkingIndex(g,Xt),me=Q.scale.showsNonWorking?bn(g,te)*X:Xt*X,st=new gu({domain:[g,te],range:[N,N+me],calendar:f,nonWorking:L});Q.scale=st,Rt.endDate=te,Rt.box.width=me,Rt.ticks=gw(st,d,f,l),dC(Rt,st,d.unit),fC(Q,N+me+ln)}for(let te of Ee)te.box.width=Q.chartRightX;for(let te of Ce)ww(te,Q.chartRightX);let Qi=M.map(te=>({id:te.id,centerX:te.centerX,radius:te.radius,title:te.title,fontSize:te.fontSize,bold:te.bold}));for(let te of yt)te.fixed||Qi.push({id:te.id??"",centerX:te.center.x,radius:te.radius,title:te.title,fontSize:10,bold:!0});let si=pC(Qi,k,Q.chartRightX,o.estimateTextWidth);Q.markerRowPlacements.clear();for(let[te,me]of si.placements){let st=Me+13+me.rowIndex*26;Q.markerRowPlacements.set(te,{rowIndex:me.rowIndex,centerY:st,labelBox:{...me.labelBox,y:st-4},labelSide:me.labelSide})}for(let te of yt){let me=Q.markerRowPlacements.get(te.id??"");me&&(te.center={x:te.center.x,y:me.centerY},te.labelBox=me.labelBox,te.labelSide=me.labelSide)}for(let te of M){let me=Q.markerRowPlacements.get(te.id);me&&Q.entityMidpoints.set(te.id,{x:te.centerX,y:me.centerY})}for(let te of yt)te.fixed||Q.entityMidpoints.set(te.id??"",{x:te.center.x,y:te.center.y});let Qo=oe?Math.max(1,si.rowCount):0;if(Qo>Z){let te=(Qo-Z)*26;Q.timeline.markerRow.height=Qo*26,Q.timeline.box.height+=te,Q.chartTopY+=te,Q.chartBottomY+=te,Q.swimlaneBottomY+=te;for(let me of Ee)Nh(me,te);for(let me of Ce)xP(me,te);for(let me of yt)if(me.cutTopY=Q.chartTopY,me.cutBottomY=Q.swimlaneBottomY,me.slackArrows)for(let st of me.slackArrows)st.y+=te}b&&(Q.timeline.bottomTickPanelY=Q.chartBottomY+8,Q.timeline.bottomTickPanelHeight=w,Q.chartBottomY+=8+w);let ze=sl(l),Ye=Q.waves?lC(Q.waves,Q,ze,Ee,Ce):void 0;Ye&&(Ye.regionCrossings.forEach((te,me)=>{te.length>0&&(Ce[me].waveCrossings=te)}),Ye.placeholder!==void 0&&Rt.waveStrip&&(Rt.waveStrip.placeholder=Ye.placeholder));let Gt=new Set(yt.map(te=>te.center.x)),eo=KP(n.content.anchors,Q,Gt),to=o.collectItems($n),_u=o.buildDependencies(to,Ee,Ce,Q),FO=o.buildNowline(r.today,Q,l),Eu=Ye?cC(Ye,Q,ze,Q.chartBottomY+Fu):void 0;Eu&&(Q.chartBottomY+=Fu+Eu.box.height);let es=Tw(n.content.footnotes,Q,Q.chartBottomY);Q.footnoteIndex=es.index,Q.footnoteHosts=es.hosts,F.height=F.height||Q.chartBottomY,y||(F.width=Q.chartRightX);let BO=y?{x:6,y:ot-z.cardHeight,width:z.cardWidth,height:z.cardHeight}:{x:0,y:0,width:Q.chartRightX,height:Ou},UO=es.area.entries.length>0?es.area.box.y+es.area.box.height:Q.chartBottomY,mm={x:Q.chartRightX-ln-$m,y:UO+ln,width:$m,height:C_},WO=mm.y+mm.height+ln,XO={box:F,position:x.headerPosition,title:O,author:j,titleLines:z.titleLines,authorLines:z.authorLines,cardBox:BO,logo:void 0,style:x,attributionBox:mm};return{width:Q.chartRightX,height:WO,theme:s,palette:a,backgroundColor:a.surface.page,header:XO,timeline:Rt,nowline:FO,swimlanes:Ee,anchors:eo,milestones:yt,edges:_u,footnotes:es.area,includes:Ce,chartBox:{x:k,y:Q.chartTopY,width:Q.chartRightX-k,height:Q.chartBottomY-Q.chartTopY},...Fe?{waveSolve:Fe}:{},...Ye?{waves:Ye.waves}:{},...Ye&&Ye.boundaries.length>0?{waveBoundaries:Ye.boundaries}:{},...Ye&&Ye.crossings.length>0?{waveCrossings:Ye.crossings}:{},...Eu?{waveLegend:Eu}:{}}}};function OG(e,t){let n=[];for(let[r,i]of e){let o=ue(i.properties,"date"),s=Ke(i.properties,"after"),a=Ze(o),c=qh(s,t),l=Vh(c);if(a){let f=t.scale.forwardWithinDomain(a);if(f===null)continue;let d=Ew(l);d&&d.x>f&&d.y>0&&n.push({xStart:Math.min(d.x,f),xEnd:Math.max(d.x,f),y:d.y,slackPredId:d.ref,milestoneId:r});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&&d.wave===void 0&&n.push({xStart:d.x,xEnd:u,y:d.y,slackPredId:d.ref,milestoneId:r})}}return n}function pC(e,t,n,r){let i=[...e].sort((a,c)=>a.centerX-c.centerX),o=new Map,s=[];for(let a of i){let c=r(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<=n,d=u>=t,p=a.centerX-a.radius,h=a.centerX+a.radius,g=P=>P==="right"?l:u,_=P=>P==="right"?f:d,x=(P,O)=>{let j=Math.min(p,P),z=Math.max(h,P+c);return s[O].some(F=>F.left<z&&F.right>j)},y=-1,w="right",v=l;e:for(let P=s.length-1;P>=0;P--)for(let O of["right","left"]){if(!_(O))continue;let j=g(O);if(!x(j,P)){y=P,w=O,v=j;break e}}if(y===-1){for(let[P,O]of o)o.set(P,{...O,rowIndex:O.rowIndex+1});s=[[],...s],y=0,w=f?"right":"left",v=g(w)}let b=Math.min(p,v),L=Math.max(h,v+c);s[y].push({left:b,right:L}),o.set(a.id,{rowIndex:y,labelBox:{x:v,y:0,width:c,height:12},labelSide:w})}return{placements:o,rowCount:s.length}}function LG(e){return e.directive?.properties.find(n=>$G(n.key)==="locale")?.value}function $G(e){return e.endsWith(":")?e.slice(0,-1):e}function DG(e){switch(e){case"done":case"completed":return"done";case"in-progress":case"active":return"in-progress";case"at-risk":case"blocked":case"planned":return e;case void 0:return"planned";default:return"neutral"}}function MG(e){if(!e)return 0;let t=/^(\d{1,3})%$/.exec(e);return t?Math.max(0,Math.min(100,parseInt(t[1],10)))/100:0}function FG(e,t){if(e)return/^\d+(?:\.\d+)?[dwmqy]$/.test(e)||/^\d+%$/.test(e)?e:t.sizes.get(e)?.effortLiteral??e}function BG(e,t){if(e)return t.teams.get(e)?.title??t.persons.get(e)?.title??e}function UG(e){if(!e)return{icon:"none"};let t=e.toLowerCase();return t.includes("linear.app")?{icon:"linear",href:e}:t.includes("github.com")?{icon:"github",href:e}:t.includes("atlassian.net")||t.includes("jira.")?{icon:"jira",href:e}:{icon:"generic",href:e}}function tm(e,t,n,r,i){let o=kP(e,t),s=e.name??e.title??"",a=o.padding==="none"?"xs":o.padding,c=k_[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:n,y:r,width:l,height:fo}}}function gC(e,t){let n=p_(e,t.sizes,t.cal),r=d_(ue(e,"remaining"),t.sizes,t.cal),i=ue(e,"status"),o=DG(i),s=MG(i);s===0&&o==="done"&&(s=1);let a=/^(\d{1,3})%$/.exec(ue(e,"remaining")??"");return s===0&&o==="in-progress"&&a&&(s=1-Math.max(0,Math.min(100,parseInt(a[1],10)))/100),s===0&&o==="in-progress"&&r>0&&n>0&&(s=Math.max(0,Math.min(1,1-r/n))),{status:o,progress:s}}function yC(e,t,n,r,i,o,s){let a=ue(e,"duration"),c=!!a&&/^\d+(?:\.\d+)?[dwmqy]$/.test(a),l=r?r.title??r.name:"",u=c?a:l||void 0,f=ue(e,"remaining"),d=FG(f,t),p=BG(n??ue(e,"owner"),t),h=()=>[u,p].filter(Boolean).join(" "),g;if(i==="in-progress"&&d){let v=h();g=v?`${v} \u2014 ${d} remaining`:`${d} remaining`}else if(i==="in-progress"&&o>0&&o<1){let v=Math.round((1-o)*100),b=h();g=b?`${b} \u2014 ${v}% remaining`:`${v}% remaining`}else(p||u)&&(g=h()||void 0);let _=ue(e,"capacity"),x=ai(_),y=null,w=0;if(x!==null){let v=pl(x),b=hl(s,t.symbols);y={value:x,text:v,icon:b};let L=11;w=(g?ut(" ",L):0)+no(v,b,L)}return{metaText:g,ownerDisplay:p,capacity:y,capacityTrailingWidth:w}}function xC(e,t){let n=new Set;if(e){for(let[r,i]of t.footnoteHosts.entries())if(i.includes(e)){let o=t.footnoteIndex.get(r);o!==void 0&&n.add(o)}}return[...n].sort((r,i)=>r-i)}function TC(e,t,n){return Ol({barWidth:e,footnoteLabels:t.map(String),hasBeforeGlyph:On(n)!==void 0})}function Pw(e,t,n,r){let i=e.properties,o=ht("item",i,n.styleCtx),s=ue(i,"size"),a=s?n.sizes.get(s)??null:null,c=li(i,n.sizes,n.cal),l=Ke(i,"after"),u=Ke(i,"before"),f=bC(i,t.x,t.x,n),d;n.waves&&(f=Vo(e,f,n),d=MP(e,f,n));let p=d===void 0?GG(i,f,n):void 0,h=n.scale.startX(f),g=Math.max(An,Yo(n,h,c)),_=h,x=h+g,y=ue(i,"link"),w=UG(y),v=w.icon!=="none",b=Math.max(An,g-2*an),L=Ke(i,"labels"),P=[];for(let ze of L){let Ye=n.labels.get(ze);if(!Ye)continue;let Gt=tm(Ye,n.styleCtx,0,0);P.push({id:Ye,width:Gt.box.width})}let O=0;for(let ze=0;ze<P.length;ze+=1)ze>0&&(O+=kr),O+=P[ze].width;let j=Math.max(0,b-2*nr),z=P.length>0&&O>j,F=!1,k,W;if(u.length>0){let ze,Ye;for(let Gt of u){let eo=Ze(Gt),to=eo?n.scale.forwardWithinDomain(eo)??void 0:n.entityLeftEdges.get(Gt);to!==void 0&&(ze===void 0||to<ze)&&(ze=to,Ye=Gt)}ze!==void 0&&x>ze&&(F=!0,k={x:ze,y:t.y,width:x-ze,height:n.bandScale.bandwidth()},W=Ye)}let{status:X,progress:R}=gC(i,n),C={done:"#ecfdf5","in-progress":"#eff6ff","at-risk":"#fffbeb",blocked:"#fee2e2",planned:"#f8fafc",neutral:"#f8fafc"},N={done:"#052e16","in-progress":"#172554","at-risk":"#422006",blocked:"#7f1d1d",planned:"#1e293b",neutral:"#1e293b"},G={done:"#ebebeb","in-progress":"#e4e4e4","at-risk":"#eeeeee",blocked:"#dcdcdc",planned:"#f5f5f5",neutral:"#f5f5f5"},q={done:n.styleCtx.theme.status.done,"in-progress":n.styleCtx.theme.status.inProgress,"at-risk":n.styleCtx.theme.status.atRisk,blocked:n.styleCtx.theme.status.blocked,planned:n.styleCtx.theme.status.planned,neutral:n.styleCtx.theme.status.neutral},V=n.styleCtx.theme.name,re=V==="dark",oe=re?"#0f172a":"#ffffff",ye=V==="grayscale"?"#9e9e9e":"#94a3b8";o.bg===oe&&(o.bg=V==="grayscale"?G[X]:re?N[X]:C[X]),o.fg===ye&&(o.fg=q[X]);let{metaText:ne,ownerDisplay:ae,capacity:A,capacityTrailingWidth:$}=yC(i,n,r,a,X,R,o.capacityIcon),M=e.title??e.name??"",H=xC(e.name,n),Z=new Dh({id:e.name??"",title:M,logicalLeftX:_,logicalRightX:x,metaText:ne,metaTrailingWidth:$,hasLinkIcon:v,hasAfterGlyph:On(l)!==void 0,titleFirstLineRightReservePx:TC(b,H,u)}).place({x:_,y:t.y},{time:n.scale,bands:n.bandScale,style:o}),Y=Z.box,ie=n.bandScale.bandwidth(),le=Y.width<as,xe=v&&Y.width<zu,Te=Y.width<qu,he=Z.textSpills||xe,He=dw(M,Z,xe),Me=He.length,ot=null;z&&(ot=rg(P,Y.width));let sn=ot?ot.rows.length:P.length>0?1:0,Rt=ne!==void 0||A!==null,Tr=Pl(Me,Rt),Q=Hu(Me,Rt),Qn=wC(z,he,sn,ie,Tr),ri=Math.max(Q,Qn);ri>0&&(Y.height=ie+ri);let ii=[],oi=Y.y+ie-er-fo-di,Ji=Y.y+(z&&he?Math.max(os,Tr):Tr)+di,E=z&&he||!z&&P.length>0?Math.max(oi,Ji):oi,B=z?Y.x+Y.width+Ar:Y.x+nr,K=B;if(ot)for(let ze=0;ze<ot.rows.length;ze+=1){let Ye=E+ze*ng,Gt=B;for(let to of ot.rows[ze]){let _u=tm(to.id,n.styleCtx,Gt,Ye);ii.push(_u),Gt+=_u.box.width+kr}let eo=Gt-kr;eo>K&&(K=eo)}else{let ze=B;for(let Ye of P){let Gt=tm(Ye.id,n.styleCtx,ze,E);ii.push(Gt),ze+=Gt.box.width+kr}K=P.length>0?ze-kr:B}let se=ae??r??ue(i,"owner"),ve=e.description?.text,Fe=H.length>0&&Te,Ee=Y.x+Y.width+Ar,Le=!1,Xe=null;xe&&(Le&&(Ee+=kn),Xe=Ee,Ee=Xe+Rr,Le=!0);let Ce=0;if(he){Le&&(Ee+=kn);let ze=Math.max(...He.map(Gt=>ut(Gt,Sl))),Ye=(ne?ut(ne,11):0)+$;Ce=Math.max(ze,Ye),Ee+=Ce,Le=!0}let yt=null;Fe&&(Le&&(Ee+=kn),yt=Ee,Ee+=H.length*Rn,Le=!0);let xt=null;le&&(Le&&(Ee+=kn),xt=Ee+rr,Ee=xt+rr,Le=!0);let vr=Math.max(Y.x+Y.width,Ee),Wt=e.name;Wt&&(n.entityLeftEdges.set(Wt,_),n.entityRightEdges.set(Wt,x)),$P(e,Y.x+Y.width+an,n);let Xt=Wt??vC(e);n.itemFlowKey.set(Xt,n.currentFlowKey),t.x=x,t.maxX=Math.max(t.maxX,t.x),t.height=Math.max(t.height,n.bandScale.step()+ri);let Qi=pP({box:Y,afterDate:On(l),beforeDate:On(u),hasLinkIcon:v,footnoteCount:H.length}),si={kind:"item",id:Wt,title:M,...He.length>=2||He[0]!==M?{titleLines:He}:{},box:Y,status:X,progressFraction:R,footnoteIndicators:H,labelChips:ii,chipsOutside:z,chipsRightX:K,linkIcon:w.icon,linkHref:w.href,hasOverflow:F,overflowBox:k,overflowAnchorId:W,owner:se,description:ve,metaText:ne,textSpills:he,dotSpills:le,iconSpills:xe,footnoteSpills:Fe,dotSpillCx:xt,iconSpillX:Xe,footnoteSpillStartX:yt,decorationsRightX:vr,capacity:A,size:a,style:o,inlineDatePins:Qi.length>0?Qi:void 0},Qo=DP(e,n);return Qo!==void 0&&(si.waveRole=Qo),d!==void 0&&(si.wavePinOverride=d),p!==void 0&&(si.nonWorkingPin=p),n.placedItems.set(Xt,si),si}function WG(e,t,n){return new Mh(e,{sequenceOne:Cw,newCursor:Ih}).place(t,n)}function XG(e,t,n){return new Lh(e,{sequenceItem:Pw,sequenceOne:Cw,resolveChildStart:EC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:_C}).place(t,n)}function Cw(e,t,n){if(Mt(e))return Pw(e,t,n);if(vt(e))return WG(e,t,n);if(je(e))return XG(e,t,n);throw new Error(`Unknown swimlane child type: ${e.$type??"unknown"}`)}function vC(e){let t=e.$cstNode?.range.start;return`#item@${t?t.line+1:0}:${t?t.character+1:0}`}function wC(e,t,n,r,i){if(n===0)return 0;let o=r-er-fo-di,s;e&&t?s=Math.max(os,i)+di:e?s=o:s=Math.max(o,i+di);let c=s+(n-1)*ng+fo+di+er;return Math.max(0,c-r)}function _C(e,t,n){let r=e.properties,i=n.bandScale.bandwidth(),o=li(r,n.sizes,n.cal),s=Math.max(An,Yo(n,t,o)),a=Math.max(An,s-2*an),c=ue(r,"size"),l=c?n.sizes.get(c)??null:null,{status:u,progress:f}=gC(r,n),{metaText:d,capacity:p,capacityTrailingWidth:h}=yC(r,n,void 0,l,u,f,ht("item",r,n.styleCtx).capacityIcon),g=d!==void 0||p!==null,_=!!ue(r,"link"),x=e.title??e.name??"",y=On(Ke(r,"after"))!==void 0,w=fi(_,y?{barWidth:a}:void 0),v=Math.max(0,a-w-nr),b=Math.max(0,a-w-TC(a,xC(e.name,n),Ke(r,"before"))),L=fw(x,v,uw(d,h),b),P=_&&a<zu,O=L.textSpills||P,j=dw(x,L,P).length,z=Hu(j,g),F=Ke(r,"labels"),k=[];for(let q of F){let V=n.labels.get(q);if(!V)continue;let re=tm(V,n.styleCtx,0,0);k.push({id:V,width:re.box.width})}if(k.length===0)return z;let W=0;for(let q=0;q<k.length;q+=1)q>0&&(W+=kr),W+=k[q].width;let X=Math.max(0,a-2*nr),R=W>X,C=R?rg(k,a):null,N=C?C.rows.length:1,G=wC(R,O,N,i,Pl(j,g));return Math.max(z,G)}function EC(e,t,n,r){return Vo(e,bC(e.properties,t,n,r),r)}function bC(e,t,n,r){let i=Ze(ue(e,"date"))??Ze(ue(e,"start"));if(i){let s=r.scale.forwardWithinDomain(i);if(s!==null)return s}let o=Ke(e,"after");if(o.length>0){let s=n;for(let a of o){let c=Ze(a);if(c){let u=r.scale.forwardWithinDomain(c);u!==null&&(s=Math.max(s,u));continue}let l=r.entityRightEdges.get(a);l!==void 0&&(s=Math.max(s,l))}return Math.max(n,s)}return t}function GG(e,t,n){if(!n.calendar.hasNonWorkingDays)return;let r=jG(e);if(!r||n.calendar.isWorkingDay(r.date))return;let i=n.scale.forwardWithinDomain(r.date);if(!(i===null||Math.abs(t-i)>=Kt))return{key:r.key,pin:r.raw,start:ro(hu(t,n))}}function jG(e){for(let t of["date","start"]){let n=ue(e,t),r=Ze(n);if(n!==void 0&&r)return{key:t,raw:n,date:r}}for(let t of Ke(e,"after")){let n=Ze(t);if(n)return{key:"after",raw:t,date:n}}}var Rw=6;function HG(e,t){let n=Nm-32,r=Il(e,n,16),i=Il(t??"",n,11),o=0;for(let d of r)o=Math.max(o,ut(d,16));for(let d of i)o=Math.max(o,ut(d,11));let s=o+32,a=Math.max(N_-Rw,Math.min(Nm-Rw,s)),c=r.length>0?(r.length-1)*20:0,l=i.length>0?18+(i.length-1)*14:0,u=26+c+l+14,f=a+Rw;return{titleLines:r,authorLines:i,cardWidth:a,cardHeight:u,boxWidth:f}}function zG(e,t,n,r,i,o){let a=e.roadmapDecl?.properties??[],c=ue(a,"start"),l=Ze(c)??qG(r),u=ue(a,"length"),f=0;if(u){let x=VG(u,t.cal);x>0&&(f=x)}let d=t.calendar??Iu(t.cal),p=AC(n,{cal:t.cal,sizes:t.sizes,calendar:d},l,f>0?void 0:r,o),h=x_(i.unit,t.cal),g=jh(l,p>0?p:4*t.cal.daysPerWeek,i.unit,h,d),_=Math.max(f,g);return{startDate:l,endDate:d.dateAtWorkingIndex(l,Math.max(1,_))}}function qG(e){let t=e??new Date;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}function VG(e,t){let n=/^(\d+(?:\.\d+)?)([dwmqy])$/.exec(e);if(!n)return 0;let r=parseFloat(n[1]);switch(n[2]){case"d":return r;case"w":return r*t.daysPerWeek;case"m":return r*t.daysPerMonth;case"q":return r*t.daysPerQuarter;case"y":return r*t.daysPerYear;default:return 0}}function AC(e,t,n,r,i){let o=h=>t.calendar.workingIndexOf(n,h),s=new Map,a=new Map,c=new Map,l=0;for(let h of e.content.anchors.values()){let g=Ze(ue(h.properties,"date"));if(g&&h.name){let _=o(g);a.set(h.name,_),l=Math.max(l,_)}}let u=()=>({itemEnd:s,anchorEnd:a,milestoneEnd:c,sizes:t.sizes}),f=(h,g,_)=>{let x=v=>{let b=Ze(v);return b?o(b):h.itemEnd.has(v)?h.itemEnd.get(v):h.anchorEnd.has(v)?h.anchorEnd.get(v):h.milestoneEnd.has(v)?h.milestoneEnd.get(v):0},y=(v,b)=>{let L=b;for(let P of v)P.$type!=="DescriptionDirective"&&(L=w(P,L),_(L));return L},w=(v,b)=>{if(Mt(v)){let L=li(v.properties,h.sizes,t.cal),P=Ze(ue(v.properties,"date")),O=Ze(ue(v.properties,"start")),j=Ke(v.properties,"after"),z=b;P?z=o(P):O?z=o(O):j.length>0&&(z=Math.max(b,...j.map(x))),g&&(z=g.apply(v,z));let F=z+L;return v.name&&h.itemEnd.set(v.name,F),g?.accumulate(v,F),F}if(vt(v)){let L=Ke(v.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;g&&(P=g.apply(v,P));let O=P;for(let j of v.content){if(j.$type==="DescriptionDirective")continue;let z=w(j,P);O=Math.max(O,z)}return O}if(je(v)){let L=Ke(v.properties,"after"),P=L.length>0?Math.max(b,...L.map(x)):b;return g&&(P=g.apply(v,P)),y(v.content,P)}return b};return{walkLane:y,resolveAfterDay:x}},d=h=>{l=Math.max(l,h)};if(i){let h=i.waves.map(y=>y.name),g=0,_=y=>{g=Math.max(g,y)},x=Ch(h.length,0,NP(i,n,t.calendar),(y,w)=>{let v=h.map((P,O)=>[P,w[O]]);s=new Map(v),g=0;let b=new qo(i,y),{walkLane:L}=f(u(),b,_);for(let P of e.content.swimlanes.values())L(P.content,0);for(let P of e.content.isolatedRegions){let O=f({itemEnd:new Map(v),anchorEnd:new Map,milestoneEnd:new Map,sizes:ns(P.content.sizes,t.cal)},b,_);for(let j of P.content.swimlanes.values())O.walkLane(j.content,0)}return b});l=Math.max(l,g,...x.S,...x.E.slice(-1))}else{let{walkLane:h}=f(u(),void 0,d);for(let g of e.content.swimlanes.values())h(g.content,0)}let{resolveAfterDay:p}=f(u(),void 0,d);for(let h of e.content.milestones.values()){let g=Ze(ue(h.properties,"date"));if(g){let x=o(g);h.name&&c.set(h.name,x),l=Math.max(l,x);continue}let _=Ke(h.properties,"after");if(_.length>0){let x=Math.max(0,..._.map(p));h.name&&c.set(h.name,x),l=Math.max(l,x)}}if(!i)for(let h of e.content.isolatedRegions){let g=AC({config:h.config,content:h.content,diagnostics:[],processedFiles:new Set},t,n,void 0);l=Math.max(l,g)}if(r){let h=o(r);h>0&&(l=Math.max(l,h))}return l}function YG(e,t,n,r){let i=new Rh(cP(t,n)),o=[],s=[],a=r.bandScale.bandwidth();for(let[u,f]of e){let d=Ke(f.properties,"after"),p=r.placedItems.get(u);if(!p)continue;let h=mP(p,a);for(let g of d){let _=r.placedItems.get(g),x,y=_===void 0;if(_)x=gP(_,a);else{let w=r.entityMidpoints.get(g);if(!w)continue;x={x:w.x,y:h.y}}!y&&Math.abs(x.y-h.y)<.5&&h.x-x.x<20||(o.push({fromId:g,toId:u,from:x,to:h,isMarkerSource:y}),s.push({fromId:g,toId:u}))}}let c=uP(o,i),l=[];for(let u=0;u<c.length;u++){let f=c[u];l.push({fromId:s[u].fromId,toId:s[u].toId,waypoints:f.waypoints,kind:f.underBar?"underBar":"normal",style:ht("item",[],r.styleCtx)})}return l}function KG(e,t,n){if(!e)return null;let r=t.scale.forwardWithinDomain(e);if(r===null)return null;let i=t.timeline.box.y,o=t.timeline.tickPanelY,s=sl(n).nowLabel,a=ut(s,wl),c=Math.max(km,Math.ceil(a+2*is)),l=t.timeline.originX-ln,u=c/2,f;r-u<l?f="flag-right":r+u>t.chartRightX?f="flag-left":f="center";let d=t.timeline.bottomTickPanelY,p=t.timeline.bottomTickPanelHeight??0,h=d!==void 0&&p>0?d+p:t.swimlaneBottomY;return{x:r,topY:o,bottomY:h,pillTopY:i,pillMode:f,label:s,pillWidth:c,style:ht("item",[],t.styleCtx)}}function ZG(e){let t=new Map,n=r=>{if(Mt(r)){t.set(r.name??vC(r),r);return}if(vt(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}if(je(r)){for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return}};for(let r of e)for(let i of r.content)i.$type!=="DescriptionDirective"&&n(i);return t}function Ow(e,t,n={}){let r=rw(t);return new em().place(e,t,n,r,{sequenceItem:Pw,sequenceOne:Cw,resolveChildStart:EC,newCursor:Ih,estimateTextWidth:ut,predictItemBarExtraHeight:_C,computeDateWindow:zG,sizeBesideHeader:HG,collectItems:ZG,buildDependencies:YG,buildNowline:KG})}function rm(e){return e.toISOString().slice(0,10)}function Lw(e){return e.id!==void 0?e.id:/[\r\n]/.test(e.title)?e.title.replace(/\s*[\r\n]+\s*/g," ").trim():e.title}function $w(e,t){for(let n of e)n.kind==="item"?t(n):$w(n.children,t)}function JG(e,t,n){let r=Lw(e);e.textSpills&&n.push(Ln(t,"NL.I1000","info",{name:r},r)),e.chipsOutside&&n.push(Ln(t,"NL.I1001","info",{name:r},r)),(e.box.width<as||e.dotSpills||e.iconSpills||e.footnoteSpills)&&n.push(Ln(t,"NL.I1002","info",{name:r},r)),e.hasOverflow&&n.push(Ln(t,"NL.I1003","info",{name:r,anchor:e.overflowAnchorId},r)),RC(e,t,n),kC(e,t,n)}function RC(e,t,n){let r=e.wavePinOverride;if(!r)return;let i=Lw(e);n.push(Ln(t,"NL.W1001","warning",{name:i,pin:r.pin,key:r.key,wave:r.wave,start:r.start},i))}function kC(e,t,n){let r=e.nonWorkingPin;if(!r)return;let i=Lw(e);n.push(Ln(t,"NL.I1008","info",{name:i,pin:r.pin,key:r.key,start:r.start},i))}function Ln(e,t,n,r,i){return{message:qr(e,t,r),severity:n,code:t,entityId:i,lspSeverity:n==="warning"?2:3,data:{code:t,args:r}}}function IC(e,t,n){let r=e.id??e.title,i=[];$w(e.children,a=>i.push(a));for(let a of i)JG(a,t,n);let o=new Set(i.map(a=>a.box.y));o.size>1&&n.push(Ln(t,"NL.I1004","info",{lane:r,rows:o.size},r)),(e.utilization?.segments.some(a=>a.classification==="red")??!1)&&n.push(Ln(t,"NL.I1005","info",{lane:r},r));for(let a of e.nested)IC(a,t,n)}function SC(e,t,n){$w(e.children,r=>{RC(r,t,n),kC(r,t,n)});for(let r of e.nested)SC(r,t,n)}function QG(e,t,n){e.waveSolve?.capped&&n.push(Ln(t,"NL.W1002","warning",{passes:e.waveSolve.passes}));let r=e.waves??[],i=r.filter(o=>o.empty).map(o=>o.id);if(i.length>0){let o=i.length===r.length?{reason:"all",names:i}:i.length===1?{reason:"one",name:i[0]}:{reason:"many",names:i};n.push(Ln(t,"NL.I1006","info",o,o.reason==="one"?o.name:void 0))}for(let o of e.milestones){if(o.overrunByWave===void 0||o.overrunDate===void 0)continue;let s=r.find(c=>c.id===o.overrunByWave);if(!s)continue;let a=o.id??o.title;n.push(Ln(t,"NL.I1007","info",{name:a,date:o.overrunDate,wave:s.id,end:rm(s.endDate)},a))}}function Dw(e,t={}){let n=t.locale??"en-US",r=[];for(let i of e.swimlanes)IC(i,n,r);for(let i of e.includes)for(let o of i.nestedSwimlanes)SC(o,n,r);if(QG(e,n,r),t.today){let i=t.today,o=e.timeline.startDate,s=e.timeline.endDate;(i<o||i>s)&&r.push(Ln(n,"NL.W1000","warning",{date:rm(i),start:rm(o),end:rm(s)}))}return r}var Zo=class extends Error{constructor(t){super(t),this.name="TimezoneError"}};function Mw(e){if(!e||e.toLowerCase()==="local")return{kind:"local"};if(e.toUpperCase()==="UTC")return{kind:"utc"};if(e==="Z")return{kind:"offset",ms:0};let t=/^([+-])(\d{2})(?::?(\d{2}))?$/.exec(e);if(t){let n=t[1]==="+"?1:-1,r=parseInt(t[2],10),i=t[3]!==void 0?parseInt(t[3],10):0;if(r>23||i>59)throw new Zo(`nowline: invalid timezone offset "${e}". Hours must be 0\u201323 and minutes 0\u201359.`);return{kind:"offset",ms:n*(r*60+i)*6e4}}try{return{kind:"iana",name:Intl.DateTimeFormat(void 0,{timeZone:e}).resolvedOptions().timeZone}}catch{throw new Zo(`nowline: unrecognised timezone "${e}". Use "local", "UTC", an ISO 8601 offset (e.g. "+05:30", "-07:00", "Z"), or an IANA timezone name (e.g. "America/Los_Angeles", "Asia/Kolkata").`)}}function im(e,t){switch(t.kind){case"local":return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));case"utc":return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));case"offset":{let n=new Date(e.getTime()+t.ms);return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}case"iana":{let n=new Intl.DateTimeFormat("en-CA",{timeZone:t.name,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e),r=0,i=0,o=0;for(let s of n)s.type==="year"?r=parseInt(s.value,10):s.type==="month"?i=parseInt(s.value,10)-1:s.type==="day"&&(o=parseInt(s.value,10));return new Date(Date.UTC(r,i,o))}}}var e4=/^(\d{4})-(\d{2})-(\d{2})$/,t4=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?)(Z|([+-])(\d{2})(?::?(\d{2}))?)$/,n4=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;function Fw(e={}){let t=e.zone??{kind:"local"},n=e.clock??(()=>new Date),r=e.now;if(!(r==="-"||r===null)){if(r instanceof Date)return r;if(r!==void 0){let i=e4.exec(r);if(i)return new Date(Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10)));let o=t4.exec(r);if(o){let a=new Date(r);if(!Number.isNaN(a.getTime())){if(o[2]==="Z")return im(a,{kind:"utc"});let l=o[3]==="+"?1:-1,u=parseInt(o[4],10),f=o[5]!==void 0?parseInt(o[5],10):0,d=l*(u*60+f)*6e4;return im(a,{kind:"offset",ms:d})}}let s=n4.exec(r);return s?new Date(Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10))):void 0}return im(n(),t)}}function r4(e){return e===2?"warning":e===3?"info":"error"}function NC(e,t){return{severity:r4(e.severity),code:sg(e),message:e.message,suggestion:Ku(e.message),file:t,line:(e.range?.start.line??0)+1,column:(e.range?.start.character??0)+1}}function PC(e,t){return{severity:"error",code:"parse-error",message:e.message,file:t,line:e.token?.startLine??1,column:e.token?.startColumn??1}}function CC(e,t){return{severity:"error",code:"lex-error",message:e.message,file:t,line:e.line??1,column:e.column??1}}function OC(e,t){let n=e.line!==void 0?e.line+1:1;if(!ol(e))return{severity:e.severity,code:"include",message:e.message,file:e.sourcePath,line:n,column:1};let r=t?nw(t,e):e.message,i=Ku(r);return{severity:e.severity,code:e.code??Zu(e.message),message:r,...i===void 0?{}:{suggestion:i},file:e.sourcePath,line:n,column:1}}function LC(e,t,n="warning"){return{severity:n,code:"render.warning",message:e,file:t,line:1,column:1}}function $C(e,t){return{severity:e.severity,code:e.code,message:e.message,file:t,line:1,column:1}}var DC="__nowline_browser_noop_include__";async function MC(e){throw new Error(`${DC}: include "${e}" was skipped \u2014 running in single-file mode.`)}function Bw(e){return e.includes(DC)}var Zi={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"}},i4={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"}},FC={...Zi,...i4};var Mse={none:"",multiplier:"x",person:Zi.person.ascii,people:Zi.people.ascii,points:Zi.points.ascii,time:Zi.time.ascii};var om=class{constructor(t="nl"){S(this,"prefix");S(this,"counter",0);this.prefix=t}next(t){let n=`${this.prefix}-${this.counter++}`;return t?`${n}-${t}`:n}};var o4=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"]),s4=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 a4(e){let t=[],n=0,r=e.length;for(;n<r;){if(e[n]!=="<"){let u=n;for(;n<r&&e[n]!=="<";)n++;let f=e.slice(u,n);f.trim().length>0?t.push({kind:"text",text:f}):f.length>0&&t.push({kind:"text",text:f});continue}if(e.startsWith("<!--",n)){let u=e.indexOf("-->",n+4);if(u<0)break;t.push({kind:"comment",text:e.slice(n+4,u)}),n=u+3;continue}if(e.startsWith("<![CDATA[",n)){let u=e.indexOf("]]>",n+9);if(u<0)break;t.push({kind:"cdata",text:e.slice(n+9,u)}),n=u+3;continue}if(e.startsWith("<?",n)){let u=e.indexOf("?>",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+2;continue}if(e.startsWith("<!",n)){let u=e.indexOf(">",n+2);if(u<0)break;t.push({kind:"decl",text:e.slice(n+2,u)}),n=u+1;continue}if(e[n+1]==="/"){let u=e.indexOf(">",n+2);if(u<0)break;let f=e.slice(n+2,u).trim();t.push({kind:"close",name:f}),n=u+1;continue}let i=l4(e,n);if(i<0)break;let o=e.slice(n+1,i).trim(),s=o.endsWith("/"),a=s?o.slice(0,-1).trim():o,{name:c,attrs:l}=c4(a);t.push({kind:s?"self":"open",name:c,attrs:l}),n=i+1}return t}function l4(e,t){let n=t+1,r=null;for(;n<e.length;){let i=e[n];if(r)i===r&&(r=null);else if(i==='"'||i==="'")r=i;else if(i===">")return n;n++}return-1}function c4(e){let t=0;for(;t<e.length&&/\s/.test(e[t]);)t++;let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.slice(n,t),i={};for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let o=t;for(;t<e.length&&e[t]!=="="&&!/\s/.test(e[t]);)t++;let s=e.slice(o,t);if(t>=e.length||e[t]!=="="){s&&(i[s]="");continue}if(t++,t>=e.length)break;let a=e[t];if(a!=='"'&&a!=="'"){let l=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i[s]=e.slice(l,t);continue}t++;let c=t;for(;t<e.length&&e[t]!==a;)t++;i[s]=e.slice(c,t),t<e.length&&t++}return{name:r,attrs:i}}function yu(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u4(e,t){if(e.startsWith("#")){let n=t.get(e.slice(1));return n?`#${n}`:null}if(/^url\(#[^)]+\)$/.test(e)){let n=e.slice(5,-1),r=t.get(n);return r?`url(#${r})`:null}return null}function BC(e,t={}){let n=t.idPrefix??"nl-logo",r=t.onWarn??(()=>{}),i=a4(e),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,`${n}-${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(yu(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"){r(`sanitizer: dropping <${u}>`),l.kind==="open"&&c.push(!1);continue}if(!o4.has(u)){r(`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 h=l.attrs[p];if(/^on/i.test(p)){r(`sanitizer: dropping event handler ${p}`);continue}if(!s4.has(p)){r(`sanitizer: dropping attribute ${p}`);continue}if(p==="href"||p==="xlink:href"){let g=u4(h,o);if(g===null){r(`sanitizer: dropping external href ${h}`);continue}f.push(` ${p}="${yu(g)}"`);continue}if(p==="style"){r("sanitizer: dropping inline style");continue}if(p==="id"){let g=o.get(h);g&&f.push(` id="${yu(g)}"`);continue}if(/\burl\(#/i.test(h)){let g=h.replace(/url\(#([^)]+)\)/gi,(_,x)=>{let y=o.get(x);return y?`url(#${y})`:"none"});f.push(` ${p}="${yu(g)}"`);continue}if(/data:|javascript:|vbscript:/i.test(h)){r(`sanitizer: dropping suspicious value at ${p}`);continue}f.push(` ${p}="${yu(h)}"`)}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 UC=/&/g,WC=/</g,XC=/>/g,f4=/"/g,d4=/'/g;function Bt(e){return e.replace(UC,"&amp;").replace(WC,"&lt;").replace(XC,"&gt;")}function ei(e){return e.replace(UC,"&amp;").replace(WC,"&lt;").replace(XC,"&gt;").replace(f4,"&quot;").replace(d4,"&#39;")}function fl(e){let t=Object.keys(e).sort(),n=[];for(let r of t){let i=e[r];i==null||i===!1||(i===!0?n.push(r):n.push(`${r}="${ei(String(i))}"`))}return n.length?` ${n.join(" ")}`:""}function ee(e,t,n){return n===void 0||n===""?`<${e}${fl(t)}/>`:`<${e}${fl(t)}>${n}</${e}>`}function Se(e,t){return`<text${fl(e)}>${Bt(t)}</text>`}function m(e){return Number.isFinite(e)?Number.isInteger(e)?e.toString():(Math.round(e*100)/100).toString():"0"}var p4={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 h4(e,t){let n=`${e}-shadow-${t}`,r=p4[t],i=`<feGaussianBlur in="SourceAlpha" stdDeviation="${r.stdDeviation}"/><feOffset dx="${r.dx}" dy="${r.dy}" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="${r.opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge>`;return ee("filter",{id:n,x:"-50%",y:"-50%",width:"200%",height:"200%"},i)}function GC(e,t){return t==="none"?null:`url(#${e}-shadow-${t})`}function jC(e){return["subtle","soft","hard"].map(t=>h4(e,t)).join("")}var m4={thin:100,light:300,normal:400,bold:700};function g4(e){return rs[e]??14}function Xw(e,t,n){return{"font-family":t[e.font],"font-size":n??g4(e.textSize),"font-weight":m4[e.weight]??400,"font-style":e.italic?"italic":"normal",fill:e.text}}function y4(e){if(e.border==="dashed")return"4 3";if(e.border==="dotted")return"1 3"}function KC(e){if(!e||e==="none"||e==="transparent")return 1;let t=e.startsWith("#")?e.slice(1):e;if(t.length===3&&(t=t.split("").map(s=>s+s).join("")),t.length!==6)return 1;let n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(r)+.0722*o(i)}function x4(e,t){return KC(e)>=.24?t.statusDot.onLight:t.statusDot.onDark}function lm(e,t){return e.length*t*.58}function ZC(e,t,n,r,i,o,s){let a=i*.58,c=t?lm(t,i):0,l=t?a:0,u=n+c+l,{text:f,icon:d}=e,p=lm(f,i),h={"font-family":o,"font-size":i,fill:s};if(!d)return Se({x:m(u),y:m(r),...h},f);if(d.kind==="builtin"&&d.name==="multiplier")return Se({x:m(u),y:m(r),...h},`${f}\xD7`);if(d.kind==="builtin"){let _=Zi[d.name],x=Se({x:m(u),y:m(r),...h},f),y=i*.1,w=i,v=u+p+y,b=r-i*.85,L=`<svg x="${m(v)}" y="${m(b)}" width="${m(w)}" height="${m(w)}" viewBox="${_.viewBox}" style="color:${ei(s)}" aria-hidden="true">${_.body}</svg>`;return x+L}let g=m(i*.1);return`<text x="${m(u)}" y="${m(r)}" font-family="${ei(o)}" font-size="${i}" fill="${ei(s)}">${Bt(f)}<tspan dx="${g}">${Bt(d.text)}</tspan></text>`}var HC=.6,T4=.5;function v4(e){let{metaText:t,capacity:n,x:r,baselineY:i,fontSize:o,fontFamily:s,color:a}=e;if(!t&&!n)return"";let c={"font-family":s,"font-size":o,fill:a};if(!n)return Se({x:m(r),y:m(i),...c},t);if(!t)return ZC(n,void 0,r,i,o,s,a);let l=m(o*HC),u=`<text x="${m(r)}" y="${m(i)}" font-family="${ei(s)}" font-size="${o}" fill="${ei(a)}">`,{text:f,icon:d}=n;if(!d)return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`;if(d.kind==="builtin"&&d.name==="multiplier")return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}\xD7</tspan></text>`;if(d.kind==="literal"){let L=m(o*.1);return u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan><tspan dx="${L}">${Bt(d.text)}</tspan></text>`}let p=Zi[d.name],h=L=>L.length*o*T4,g=r+h(t)+o*HC,_=o*.1,x=o,y=g+h(f)+_,w=i-o*.85,v=u+Bt(t)+`<tspan dx="${l}">${Bt(f)}</tspan></text>`,b=`<svg x="${m(y)}" y="${m(w)}" width="${m(x)}" height="${m(x)}" viewBox="${p.viewBox}" style="color:${ei(a)}" aria-hidden="true">${p.body}</svg>`;return v+b}function w4(e,t){let n=FC.calendar,r=`<svg x="${m(e.glyphTopLeft.x)}" y="${m(e.glyphTopLeft.y)}" width="${m(e.glyphSize)}" height="${m(e.glyphSize)}" viewBox="${n.viewBox}" style="color:${ei(t)}" aria-hidden="true">${n.body}</svg>`,i=`<title>${Bt(e.isoDate)}</title>`;return ee("g",{"data-layer":"inline-date-pin","data-side":e.side,"data-date":e.isoDate,"data-spilled":e.spilled?"true":null},i+r)}function Gw(e,t){return!e||e.length===0?"":e.map(n=>w4(n,t)).join("")}function _4(e){return(e?.length??0)>0}function JC(e){return e?.some(t=>t.side==="after")??!1}function E4(e,t,n,r,i,o={}){let s=Math.min(gl[i.cornerRadius]??4,r/2);return ee("rect",{x:m(e),y:m(t),width:m(n),height:m(r),rx:m(s),ry:m(s),fill:i.bg==="none"?"transparent":i.bg,stroke:i.fg,"stroke-width":1,"stroke-dasharray":y4(i)??null,...o})}function b4(e,t,n,r){let i=e.box.x+e.cardBox.x,o=e.box.y+e.cardBox.y,s=e.cardBox.width,a=e.cardBox.height,c=e.style.bg==="none"?n.surface.headerBox:e.style.bg,l=n.header.cardBorder,u=ee("rect",{x:m(i),y:m(o),width:m(s),height:m(a),rx:6,ry:6,fill:c,stroke:l,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`}),f=[];e.titleLines.forEach((x,y)=>{f.push(Se({x:m(i+16),y:m(o+26+y*20),"font-family":r[e.style.font],"font-size":16,"font-weight":600,fill:e.style.text},x))});let d=f.join(""),p=o+26+Math.max(0,e.titleLines.length-1)*20,h=n.header.author,g=[];e.authorLines.forEach((x,y)=>{g.push(Se({x:m(i+16),y:m(p+18+y*14),"font-family":r[e.style.font],"font-size":11,fill:h},x))});let _=g.join("");return ee("g",{"data-layer":"header","data-id":`${t}-header`},u+d+_)}function A4(e,t,n){let r=n.timeline.gridLine,i=n.timeline.minorGridLine,o=e.bottomTickPanelHeight??0,s=e.bottomTickPanelY!==void 0&&o>0,a=e.tickPanelY,c=s?e.bottomTickPanelY+o:e.box.y+e.box.height,l=t,u=e.box.y+e.box.height,f=[];for(let d of e.ticks)if(d.major)f.push(ee("line",{x1:m(d.x),y1:m(a),x2:m(d.x),y2:m(c),stroke:r,"stroke-width":1}));else if(e.minorGrid){if(d.labelX===void 0)continue;f.push(ee("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:i,"stroke-width":1}))}for(let d of e.nonWorking??[])d.seam&&f.push(ee("line",{x1:m(d.x),y1:m(l),x2:m(d.x),y2:m(u),stroke:n.timeline.nonWorkingSeam,"stroke-width":1,"stroke-dasharray":"1 3"}));return ee("g",{"data-layer":"grid"},f.join(""))}function QC(e,t,n,r){let i=e.box.y+e.box.height,o=[];for(let s of e.nonWorking??[]){if(!s.band)continue;let a={x:s.x,y:t,width:s.width,height:i-t},c=r?Hw(a,r):a;!c||c.width<=0||c.height<=0||o.push(ee("rect",{x:m(c.x),y:m(c.y),width:m(c.width),height:m(c.height),fill:n.timeline.nonWorkingFill,"fill-opacity":Fm}))}return o.length===0?"":ee("g",{"data-layer":"non-working"},o.join(""))}function R4(e,t,n){let r=t.timeline.panelFill,i=t.timeline.border,o=t.timeline.labelText,s=[],a=e.tickPanelY,c=e.tickPanelHeight,l=c>0,u=e.markerRow.height>0,f=e.waveStrip?e.waveStrip.y+e.waveStrip.height:a+c,d=e.markerRow.height,p=e.bottomTickPanelY,h=e.bottomTickPanelHeight??0,g=p!==void 0&&h>0;l&&s.push(ee("rect",{x:m(e.box.x),y:m(a),width:m(e.box.width),height:m(c),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),u&&s.push(ee("rect",{x:m(e.box.x),y:m(f),width:m(e.box.width),height:m(d),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1})),g&&s.push(ee("rect",{x:m(e.box.x),y:m(p),width:m(e.box.width),height:m(h),rx:4,ry:4,fill:r,stroke:i,"stroke-width":1}));for(let _ of e.ticks)_.major&&(!_.label||_.labelX===void 0||(l&&s.push(Se({x:m(_.labelX),y:m(a+xl(c)),"font-family":n.sans,"font-size":io,fill:o,"text-anchor":"middle"},_.label)),g&&s.push(Se({x:m(_.labelX),y:m(p+xl(h)),"font-family":n.sans,"font-size":io,fill:o,"text-anchor":"middle"},_.label))));return ee("g",{"data-layer":"timeline"},s.join(""))}function k4(e,t,n){if(!e)return"";let r=t.nowline.stroke,i=t.nowline.labelText,o=ee("line",{x1:m(e.x),y1:m(e.topY),x2:m(e.x),y2:m(e.bottomY),stroke:r,"stroke-width":Cu}),s=I4(e,r),a=S4(e,i,n);return ee("g",{"data-layer":"nowline"},o+s+a)}function eO(e){let t=Cu/2;return e.pillMode==="flag-right"?e.x-t:e.pillMode==="flag-left"?e.x+t:e.x}function I4(e,t){let n=e.pillTopY,r=e.pillTopY+ci,i=Im,o=e.pillWidth;if(e.pillMode==="center")return ee("rect",{x:m(e.x-o/2),y:m(n),width:m(o),height:m(ci),rx:i,ry:i,fill:t});let s=eO(e);if(e.pillMode==="flag-right"){let l=s+o,u=[`M ${m(s)} ${m(n)}`,`L ${m(l-i)} ${m(n)}`,`A ${i} ${i} 0 0 1 ${m(l)} ${m(n+i)}`,`L ${m(l)} ${m(r-i)}`,`A ${i} ${i} 0 0 1 ${m(l-i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return ee("path",{d:u,fill:t})}let a=s-o,c=[`M ${m(s)} ${m(n)}`,`L ${m(a+i)} ${m(n)}`,`A ${i} ${i} 0 0 0 ${m(a)} ${m(n+i)}`,`L ${m(a)} ${m(r-i)}`,`A ${i} ${i} 0 0 0 ${m(a+i)} ${m(r)}`,`L ${m(s)} ${m(r)}`,"Z"].join(" ");return ee("path",{d:c,fill:t})}function S4(e,t,n){let r=e.pillTopY+Sm,i=eO(e),o,s;return e.pillMode==="center"?(o=e.x,s="middle"):e.pillMode==="flag-right"?(o=i+is,s="start"):(o=i-is,s="end"),Se({x:m(o),y:m(r),"font-family":n.sans,"font-size":wl,"font-weight":700,fill:t,"text-anchor":s},e.label)}function N4(e,t,n,r,i){let o=[];e.waveTooltip!==void 0&&o.push(`<title>${Bt(e.waveTooltip)}</title>`);let s=GC(n,e.style.shadow);o.push(E4(e.box.x,e.box.y,e.box.width,e.box.height,e.style,{filter:s??null})),e.waveRole==="background"&&o.push(J4(e.box,e.style,n));let a=x4(e.style.bg,r),c={done:a.done,"in-progress":a.inProgress,"at-risk":a.atRisk,blocked:a.blocked,planned:a.planned,neutral:a.neutral},l=c[e.status]??c.neutral;if(e.progressFraction>0){let x=Math.max(0,Math.min(e.box.width,e.box.width*e.progressFraction));o.push(ee("rect",{x:m(e.box.x),y:m(e.box.y+e.box.height-er),width:m(x),height:er,fill:e.style.fg,opacity:.55}))}let u=e.dotSpills&&e.dotSpillCx!==null?e.dotSpillCx:e.box.x+e.box.width-lo;o.push(ee("circle",{cx:m(u),cy:m(e.box.y+Km),r:rr,fill:l})),o.push(Gw(e.inlineDatePins,e.style.fg));let f;if(e.textSpills)f=e.box.x+e.box.width+Ar,e.iconSpills&&(f+=Rr+kn);else{let x=!!e.linkIcon&&e.linkIcon!=="none",w=e.inlineDatePins?.find(v=>v.side==="after"&&!v.spilled)?fi(x,{barWidth:e.box.width}):fi(!t.noLinks&&x&&!e.iconSpills);f=e.box.x+w}let d=e.style.text,p=r.entities.item.text,h=e.textSpills?p:d,g=e.textSpills?p:e.style.fg,_=e.titleLines??(e.title?[e.title]:[]);if(_.forEach((x,y)=>{x!==""&&o.push(Se({x:m(f),y:m(e.box.y+Gu+y*Nl),"font-family":i[e.style.font],"font-size":Sl,"font-weight":600,fill:h},x))}),(e.metaText||e.capacity)&&o.push(v4({metaText:e.metaText,capacity:e.capacity,x:f,baselineY:e.box.y+ju(_.length),fontSize:Vm,fontFamily:i[e.style.font],color:g})),e.footnoteIndicators.length>0){let x=e.box.y+Zm;if(e.footnoteSpills&&e.footnoteSpillStartX!==null){let y=e.footnoteSpillStartX;for(let w=0;w<e.footnoteIndicators.length;w++){let v=e.footnoteIndicators[w];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Cl,"font-weight":700,fill:p},String(v))),y+=Rn}}else{let y=e.box.x+e.box.width-ss;for(let w=e.footnoteIndicators.length-1;w>=0;w--){let v=e.footnoteIndicators[w];o.push(Se({x:m(y),y:m(x),"font-family":i.sans,"font-size":Cl,"font-weight":700,fill:e.style.text,"text-anchor":"end"},String(v))),y-=Rn}}}if(!t.noLinks&&e.linkIcon&&e.linkIcon!=="none"){let x={linear:"#5e6ad2",github:"#0f172a",jira:"#0052cc",generic:r.item.linkIconFg},y=x[e.linkIcon]??x.generic,w=Rr,v=e.iconSpills&&e.iconSpillX!==null?e.iconSpillX:e.box.x+co,b=e.box.y+co,L=ee("rect",{x:m(v),y:m(b),width:w,height:w,rx:2,ry:2,fill:y}),P=v,O=b,j=ee("path",{d:`M${m(P+4)} ${m(O+10)} L${m(P+10)} ${m(O+4)} M${m(P+6)} ${m(O+4)} H${m(P+10)} V${m(O+8)}`,stroke:"#ffffff",fill:"none","stroke-width":1.1,"stroke-linecap":"round","stroke-linejoin":"round"}),z=L+j,F=e.linkHref?ee("a",{href:e.linkHref,target:"_blank",rel:"noopener"},z):z;o.push(F)}if(e.hasOverflow&&e.overflowBox){let x=r.item.overflowTailFill,y=r.item.overflowTailStroke,w=r.item.overflowCaption;o.push(ee("rect",{x:m(e.overflowBox.x),y:m(e.overflowBox.y),width:m(e.overflowBox.width),height:m(e.overflowBox.height),fill:x,stroke:y,"stroke-width":1})),e.overflowAnchorId&&e.overflowBox.width>60&&o.push(Se({x:m(e.overflowBox.x+e.overflowBox.width/2),y:m(e.overflowBox.y+e.overflowBox.height/2+3),"font-family":i.sans,"font-size":9,"font-weight":700,fill:w,"text-anchor":"middle"},`past ${e.overflowAnchorId}`))}for(let x of e.labelChips){let y=Math.min(gl[x.style.cornerRadius]??8,x.box.height/2);o.push(ee("rect",{x:m(x.box.x),y:m(x.box.y),width:m(x.box.width),height:m(x.box.height),rx:m(y),ry:m(y),fill:x.style.bg==="none"?"transparent":x.style.bg,stroke:x.style.fg,"stroke-width":.5})),o.push(Se({x:m(x.box.x+x.box.width/2),y:m(x.box.y+x.box.height/2+3),...Xw(x.style,i,rs.xs),"text-anchor":"middle"},x.text))}return ee("g",{"data-layer":"item","data-id":e.id??null},o.join(""))}function P4(e,t,n,r,i){let o=[],s=so(e.style.bg);if(s){if(o.push(ee("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:e.style.bg,stroke:e.style.fg,"stroke-width":1,"fill-opacity":.18,filter:`url(#${n}-shadow-subtle)`})),e.title){let a=ao(e.title),c=e.box.x,l=e.box.y,u=oo,f=6,d=`M${m(c+f)} ${m(l)}H${m(c+a)}V${m(l+u-f)}A${f} ${f} 0 0 1 ${m(c+a-f)} ${m(l+u)}H${m(c)}V${m(l+f)}A${f} ${f} 0 0 1 ${m(c+f)} ${m(l)}Z`;o.push(ee("path",{d,fill:e.style.fg})),o.push(Se({x:m(c+vl),y:m(l+_m),"font-family":i[e.style.font],"font-size":Em,"font-weight":600,fill:"#ffffff"},e.title))}}else{let a=e.style.fg,c=$l(s,!!e.title,_4(e.inlineDatePins));if(e.style.bracket!=="none"&&!e.waveOnly){let u=e.box.y+e.box.height,f=e.style.bracket==="dashed"?"3 2":null,d=c>0?`M${m(e.box.x+4)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(e.box.y-c)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`:`M${m(e.box.x)} ${m(e.box.y)} L${m(e.box.x)} ${m(u)} L${m(e.box.x+4)} ${m(u)}`;o.push(ee("path",{d,fill:"none",stroke:a,"stroke-width":1,"stroke-dasharray":f}))}e.title&&o.push(Se({x:m(po(e.box.x,cs,JC(e.inlineDatePins))),y:m(e.box.y-Vu),...Xw(e.style,i,Ll),"fill-opacity":.7},e.title))}o.push(Gw(e.inlineDatePins,e.style.fg));for(let a of e.children)o.push(jw(a,t,n,r,i));return ee("g",{"data-layer":"group","data-id":e.id??null},o.join(""))}function C4(e,t,n,r,i){let o=[];if(e.style.bracket==="solid"||e.style.bracket==="dashed"){let c=e.box.y-12,l=e.box.y+e.box.height+12,u=e.box.x,f=e.box.x+e.box.width,d=r.parallel.bracketStroke;o.push(ee("path",{d:`M${m(u+4)} ${m(c)} H${m(u)} V${m(l)} H${m(u+4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"})),o.push(ee("path",{d:`M${m(f-4)} ${m(c)} H${m(f)} V${m(l)} H${m(f-4)}`,fill:"none",stroke:d,"stroke-width":1.25,"stroke-dasharray":e.style.bracket==="dashed"?"3 3":null,"stroke-linejoin":"round"}))}e.title&&o.push(Se({x:m(po(e.box.x,us,JC(e.inlineDatePins))),y:m(e.box.y-Vu),...Xw(e.style,i,Ll),"fill-opacity":.7},e.title)),o.push(Gw(e.inlineDatePins,e.style.fg));for(let s of e.children)o.push(jw(s,t,n,r,i));return ee("g",{"data-layer":"parallel","data-id":e.id??null},o.join(""))}function jw(e,t,n,r,i){return e.kind==="item"?N4(e,t,n,r,i):e.kind==="group"?P4(e,t,n,r,i):C4(e,t,n,r,i)}var zC=2;function O4(e,t){switch(e){case"green":return t.swimlane.utilizationOk;case"yellow":return t.swimlane.utilizationWarn;case"red":return t.swimlane.utilizationOver}}function L4(e,t){if(!e.utilization||e.utilization.segments.length===0)return"";let n=e.box.y+e.box.height-zC,r=e.utilization.segments.map(i=>{let o=i.endX-i.startX;return o<=0?"":ee("rect",{x:m(i.startX),y:m(n),width:m(o),height:zC,fill:O4(i.classification,t),"data-utilization":i.classification,"data-load":m(i.load)})});return ee("g",{"data-layer":"lane-utilization","data-id":e.id??null},r.join(""))}function $4(e,t){let n=e.bandIndex%2===0?t.swimlane.rowTintEven:t.swimlane.rowTintOdd,r=t.swimlane.border;return ee("g",{"data-layer":"swimlane-bg","data-id":e.id??null},ee("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),fill:n,stroke:r,"stroke-width":1}))}function tO(e,t,n,r,i){let o=r.swimlane.tabFill,s=r.swimlane.tabStroke,a=r.swimlane.tabText,c=r.swimlane.ownerText,l=r.swimlane.footnoteIndicator,u=[];if(e.title){let d=e.capacity?no(e.capacity.text,e.capacity.icon,10):0,p=e.footnoteIndicators.length>0?e.footnoteIndicators.join(","):"",h=p?lm(p,10):0,g=Dl(e.box.x,e.title,e.owner,d,h),_=Su,x=e.box.y+10,y=x+Nu;u.push(ee("rect",{x:m(g.tabX),y:m(x),width:m(g.tabW),height:m(_),rx:4,ry:4,fill:o,stroke:s,"stroke-width":1})),u.push(Se({x:m(g.titleX),y:m(y),"font-family":i[e.style.font],"font-size":12,"font-weight":600,fill:a},e.title)),e.owner&&u.push(Se({x:m(g.ownerX),y:m(y),"font-family":i[e.style.font],"font-size":10,fill:c},`owner: ${e.owner}`)),e.capacity&&u.push(ZC(e.capacity,void 0,g.badgeX,y,10,i[e.style.font],c)),p&&u.push(Se({x:m(g.footnoteRightX),y:m(x+14),"font-family":i.sans,"font-size":10,"font-weight":700,fill:l,"text-anchor":"end"},p))}for(let f of e.children)u.push(jw(f,t,n,r,i));return u.push(L4(e,r)),ee("g",{"data-layer":"swimlane","data-id":e.id??null},u.join(""))}function D4(e,t,n){let r=e.radius,i=e.center.x,o=e.center.y,s=t.anchorDiamond.fill,a=t.anchorDiamond.stroke,c=ee("path",{d:`M${m(i)} ${m(o-r)} L${m(i+r)} ${m(o)} L${m(i)} ${m(o+r)} L${m(i-r)} ${m(o)} Z`,fill:s,stroke:a,"stroke-width":1.25}),l=t.anchorDiamond.label,u=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,f={x:m(u),y:m(o+4),"font-family":n.sans,"font-size":10,fill:l};e.labelSide==="left"&&(f["text-anchor"]="end");let d=e.title?Se(f,e.title):"";return ee("g",{"data-layer":"anchor","data-id":e.id??null},nO(e.hiddenDate)+c+d)}function M4(e,t){let n=t.anchorDiamond.cutLine;return ee("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:n,"stroke-width":1,"stroke-dasharray":"1 3"})}function F4(e,t,n){let r=e.center.x,i=e.center.y,o=e.radius,s=t.milestoneDiamond.fill,a=ee("path",{d:`M${m(r)} ${m(i-o)} L${m(r+o)} ${m(i)} L${m(r)} ${m(i+o)} L${m(r-o)} ${m(i)} Z`,fill:s,stroke:s,"stroke-width":1}),c=t.milestoneDiamond.label,l=e.labelSide==="left"?e.labelBox.x+e.labelBox.width:e.labelBox.x,u={x:m(l),y:m(i+4),"font-family":n.sans,"font-size":10,"font-weight":600,fill:c};e.labelSide==="left"&&(u["text-anchor"]="end");let f=e.title?Se(u,e.title):"";return ee("g",{"data-layer":"milestone","data-id":e.id??null},nO(e.hiddenDate)+a+f)}function nO(e){return e===void 0?"":`<title>${Bt(e)}</title>`}function B4(e,t,n){let r=e.isOverrun?n.milestoneDiamond.cutLineOverrun:n.milestoneDiamond.cutLineNormal,i=[];if(e.onWaveBoundary||i.push(ee("line",{x1:m(e.center.x),y1:m(e.center.y+e.radius+1),x2:m(e.center.x),y2:m(e.cutBottomY),stroke:r,"stroke-width":2,"stroke-dasharray":Pu,"stroke-linecap":"round"})),e.slackArrows&&e.slackArrows.length>0){let o=n.milestoneDiamond.slack;for(let s of e.slackArrows)i.push(ee("path",{d:`M${m(s.x)} ${m(s.y)} H${m(e.center.x-6)}`,fill:"none",stroke:o,"stroke-width":1.1,"stroke-dasharray":"3 3","stroke-linecap":"round","marker-end":`url(#${t}-arrow-dark)`}))}return i.join("")}function qC(e,t,n){let r=e.kind==="overflow"?n.dependency.overflowStroke:n.dependency.edgeStroke,i=e.waypoints;if(i.length<2)return"";let o=e.kind==="underBar"?.8:1.1;return ee("path",{d:U4(i,Dm),fill:"none",stroke:r,"stroke-width":o,"stroke-dasharray":e.kind==="overflow"?"4 2":null,"stroke-linejoin":"round","marker-end":`url(#${t}-arrow)`})}function U4(e,t){if(e.length<2)return"";let n=[`M${m(e[0].x)} ${m(e[0].y)}`];for(let r=1;r<e.length;r++){let i=e[r-1],o=e[r];if(r===e.length-1){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let s=e[r+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(t,f/2,d/2);if(p<=0||a!==0&&l!==0||c!==0&&u!==0){n.push(`L${m(o.x)} ${m(o.y)}`);continue}let h={x:o.x-a*p,y:o.y-c*p},g={x:o.x+l*p,y:o.y+u*p};n.push(`L${m(h.x)} ${m(h.y)}`),n.push(`Q${m(o.x)} ${m(o.y)} ${m(g.x)} ${m(g.y)}`)}return n.join(" ")}function W4(e,t,n,r){if(e.entries.length===0)return"";let i=n.footnotePanel.fill,o=n.footnotePanel.border,s=n.footnotePanel.header,a=n.footnotePanel.title,c=n.footnotePanel.description,l=n.footnotePanel.number,u=[];u.push(ee("rect",{x:m(e.box.x),y:m(e.box.y),width:m(e.box.width),height:m(e.box.height),rx:6,ry:6,fill:i,stroke:o,"stroke-width":1,filter:`url(#${t}-shadow-subtle)`})),u.push(Se({x:m(e.box.x+Mn),y:m(e.box.y+Pm),"font-family":r.sans,"font-size":12,"font-weight":700,fill:s},"Footnotes"));let f=e.box.y+_l+Mn,d=e.box.x+Mn,p=d+Mn;return e.entries.forEach((h,g)=>{let _=f+g*El;u.push(Se({x:m(d),y:m(_),"font-family":r.sans,"font-size":10,"font-weight":700,fill:l},String(h.number))),u.push(Se({x:m(p),y:m(_),"font-family":r.sans,"font-size":11,"font-weight":600,fill:a},h.title)),h.description&&u.push(Se({x:m(p+Math.max(120,h.title.length*6)),y:m(_),"font-family":r.sans,"font-size":11,fill:c},`\u2014 ${h.description}`))}),ee("g",{"data-layer":"footnotes"},u.join(""))}function X4(e,t,n,r,i,o){let s=r.includeRegion.border,a=r.includeRegion.fill,c=r.includeRegion.tabFill,l=r.includeRegion.tabStroke,u=r.includeRegion.tabText,f=r.includeRegion.badgeFill,d=r.includeRegion.badgeStroke,p=r.includeRegion.badgeText,h=e.box.x+8,g=e.box.y,_=e.box.width-16,x=e.box.height,y=ee("rect",{x:m(h),y:m(g),width:m(_),height:m(x),rx:8,ry:8,fill:a,stroke:s,"stroke-width":1,"stroke-dasharray":Pu}),w=Su,v=Ml(e.box.x,e.label,e.sourcePath),b=g-w/2,L=ee("rect",{x:m(v.tabX),y:m(b),width:m(v.tabWidth),height:w,rx:4,ry:4,fill:c,stroke:l,"stroke-width":1}),P=Se({x:m(v.tabLabelX),y:m(b+Nu),"font-family":i.sans,"font-size":11,"font-weight":600,fill:u},e.label),O=v.badgeX,j=v.badgeSize,z=g-j/2,F=ee("rect",{x:m(O),y:m(z),width:j,height:j,rx:4,ry:4,fill:f,stroke:d,"stroke-width":1}),k=ee("path",{d:`M${m(O+7)} ${m(z+4)} H${m(O+14)} V${m(z+11)} M${m(O+4)} ${m(z+7)} H${m(O+11)} V${m(z+14)} H${m(O+4)} Z`,stroke:p,"stroke-width":1.4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}),W=9,X=g+4,R=ee("rect",{x:m(v.sourceHaloX),y:m(X-W),width:m(v.sourceHaloWidth),height:W+6,fill:a}),C=Se({x:m(v.sourceTextX),y:m(X),"font-family":i.mono,"font-size":W,fill:p},e.sourcePath),N={x:h,y:g,width:_,height:x},G=o?QC(o.timeline,o.chartBox.y,r,N):"",q=o?.waves?sO(o.waves,N)+aO(o.waveBoundaries,N):"",V=o?.waves?lO(e.waveCrossings):"",re=e.nestedSwimlanes.map(oe=>tO(oe,t,n,r,i)).join("");return ee("g",{"data-layer":"include"},y+G+q+re+V+L+P+F+k+R+C)}function G4(e,t){let n=e.palette.attribution.mark,r=e.palette.attribution.link;if(e.swimlanes.length===0)return"";let i=e.header.attributionBox.x,o=e.header.attributionBox.y,s=ui,a=Se({x:"0",y:s,"font-family":t.sans,"font-size":$u,"font-weight":400,fill:n},Lu)+Se({x:Al,y:s,"font-family":t.sans,"font-size":ui,"font-weight":700,fill:n},"now")+ee("rect",{x:Om,y:12,width:Lm,height:ui,fill:r})+Se({x:Du,y:s,"font-family":t.sans,"font-size":ui,"font-weight":400,fill:n},"ine"),c=ee("g",{transform:`translate(${m(i)} ${m(o)}) scale(${m(bl)})`},a);return ee("a",{href:Cm,target:"_blank",rel:"noopener","aria-label":"Powered by nowline"},ee("g",{"data-layer":"attribution"},c))}async function j4(e,t,n,r,i,o,s){if(!t)return"";let a;try{a=await t(e)}catch(u){let f=`logo: failed to load ${e}: ${u instanceof Error?u.message:String(u)}`;if(r.strict)throw u;return r.warn?.(f),""}let c=(a.mime??"").toLowerCase();if(c==="image/svg+xml"){let u=new TextDecoder().decode(a.bytes),f=BC(u,{idPrefix:`${n}-logo`,onWarn:r.warn});return ee("g",{transform:`translate(${m(i)} ${m(o)})`},f)}if(c==="image/png"||c==="image/jpeg"||c==="image/jpg"||c==="image/webp"){let u=H4(a.bytes);return ee("image",{href:`data:${c};base64,${u}`,x:m(i),y:m(o),width:m(s),height:m(s),preserveAspectRatio:"xMidYMid meet"})}let l=`logo: unsupported mime ${c} for ${e}`;if(r.strict)throw new Error(l);return r.warn?.(l),""}function H4(e){if(typeof btoa<"u"){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}let t=globalThis;if(t.Buffer)return t.Buffer.from(e).toString("base64");throw new Error("renderer: no base64 encoder available")}var z4=.24,sm=2,VC=3,q4=4,V4=8,Y4=10;function rO(e){return e.bg==="none"?"transparent":e.bg}function cm(e){return KC(e)>=z4?"dark":"light"}function iO(e,t){return`url(#${e}-wave-hatch-${t})`}function K4(e,t,n){let r=Xm;return ee("pattern",{id:`${e}-wave-hatch-${t}`,width:r,height:r,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"},ee("line",{x1:m(r/2),y1:0,x2:m(r/2),y2:r,stroke:t==="dark"?n.wave.hatch:n.wave.hatchOnDark,"stroke-width":Gm,opacity:Wm}))}function Z4(e){if(!e.waves)return[];let t=new Set,n=i=>{for(let o of i)o.kind==="item"?o.waveRole==="background"&&t.add(cm(rO(o.style))):n(o.children)},r=i=>{for(let o of i)n(o.children),r(o.nested)};r(e.swimlanes);for(let i of e.includes)r(i.nestedSwimlanes);return e.waveLegend?.entries.some(i=>i.kind==="background")&&t.add(cm(cO(e.palette))),["dark","light"].filter(i=>t.has(i))}function J4(e,t,n){let i=Math.min(gl[t.cornerRadius]??4,e.height/2);return ee("rect",{x:m(e.x+.5),y:m(e.y+.5),width:m(Math.max(0,e.width-2*.5)),height:m(Math.max(0,e.height-2*.5)),rx:m(i),ry:m(i),fill:iO(n,cm(rO(t)))})}function Hw(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),i=Math.min(e.x+e.width,t.x+t.width),o=Math.min(e.y+e.height,t.y+t.height);if(!(i<=n||o<=r))return{x:n,y:r,width:i-n,height:o-r}}var Uw=4,am=.5;function oO(e,t){if(e.empty)return;let n=am;return Hw({x:e.strip.box.x,y:e.strip.box.y+n,width:e.strip.box.width,height:e.strip.box.height-2*n},{x:t.box.x+n,y:e.strip.box.y,width:t.box.width-2*n,height:e.strip.box.height})}function Q4(e,t){let n=Math.min(Uw-am,e.width/2,e.height/2),r=1e-6;return{left:e.x<=t.box.x+am+r?n:0,right:e.x+e.width>=t.box.x+t.box.width-am-r?n:0}}function ej(e,t){let{x:n,y:r,width:i,height:o}=e,s=(a,c,l)=>a>0?` A${m(a)} ${m(a)} 0 0 1 ${m(c)} ${m(l)}`:"";return`M${m(n+t.left)} ${m(r)} H${m(n+i-t.right)}`+s(t.right,n+i,r+t.right)+` V${m(r+o-t.right)}`+s(t.right,n+i-t.right,r+o)+` H${m(n+t.left)}`+s(t.left,n,r+o-t.left)+` V${m(r+t.left)}`+s(t.left,n+t.left,r)+" Z"}function Ww(e,t,n){let r=o=>n&&(n.left>0||n.right>0)?ee("path",{d:ej(t,n),...o}):ee("rect",{x:m(t.x),y:m(t.y),width:m(t.width),height:m(t.height),...o}),i=r({fill:e.style.stripFill});return e.style.tint?i+r({fill:e.style.tint,"fill-opacity":Rl}):i}function tj(e,t){let n=e.timeline,r=n.waveStrip;if(!e.waves||!r)return"";let i=[ee("rect",{x:m(n.box.x),y:m(r.y),width:m(n.box.width),height:m(r.height),rx:Uw,ry:Uw,fill:t.timeline.panelFill,stroke:t.timeline.border,"stroke-width":1})];for(let o of e.waves){let s=oO(o,n);s&&i.push(ee("g",{"data-id":o.id},`<title>${Bt(o.strip.tooltip)}</title>${Ww(o,s,Q4(s,n))}`))}return ee("g",{"data-layer":"wave-strip"},i.join(""))}function sO(e,t){let n=[];for(let r of e){if(!r.style.tint||r.empty)continue;let i=t?Hw(r.columnBox,t):r.columnBox;!i||i.width<=0||i.height<=0||n.push(ee("rect",{x:m(i.x),y:m(i.y),width:m(i.width),height:m(i.height),fill:r.style.tint,"fill-opacity":jm}))}return n.length===0?"":ee("g",{"data-layer":"wave-bg"},n.join(""))}function aO(e,t){let n=[];for(let r of e??[]){let i=r.topY,o=r.bottomY;t&&(r.x<=t.x||r.x>=t.x+t.width||(i=Math.max(i,t.y),o=Math.min(o,t.y+t.height),o<=i))||n.push(ee("line",{x1:m(r.x),y1:m(i),x2:m(r.x),y2:m(o),stroke:r.stroke,"stroke-width":Mu,"stroke-dasharray":r.dash}))}return n.length===0?"":ee("g",{"data-layer":"wave-boundary"},n.join(""))}function YC(e,t){let n=lm(e,tr);return t?n*1.05:n}function nj(e,t,n){let r=e.timeline,i=r.waveStrip;if(!e.waves||!i)return"";let o=i.y+i.height/2+q4,s=i.y+VC,a=i.height-2*VC,c=[],l=(u,f)=>{let d=YC(f,!1)+2*sm;return ee("rect",{x:m(u-d/2),y:m(s),width:m(d),height:m(a),fill:t.timeline.panelFill})+Se({x:m(u),y:m(o),"font-family":n.sans,"font-size":tr,"font-style":"italic",fill:t.wave.labelMuted,"text-anchor":"middle"},f)};i.placeholder!==void 0&&c.push(l(r.box.x+r.box.width/2,i.placeholder));for(let u of e.waves){if(u.strip.gapLabel){let{text:h,x:g}=u.strip.gapLabel;c.push(l(g,h))}if(u.strip.marker){let{x:h,y:g}=u.strip.marker,_=Hm/2;c.push(ee("path",{d:`M${m(h)} ${m(g-_)} L${m(h+_)} ${m(g)} L${m(h)} ${m(g+_)} L${m(h-_)} ${m(g)} Z`,fill:t.timeline.panelFill,stroke:t.wave.boundary,"stroke-width":1.5},`<title>${Bt(u.strip.tooltip)}</title>`))}let f=oO(u,r);if(!f)continue;let d=f.x+f.width,p=u.strip.footnotesShown?u.footnoteIndicators.length*Rn:0;if(p){let h=d-_r+sm,g=d-_r-p-sm;c.push(Ww(u,{x:g,y:s,width:h-g,height:a}))}if(u.strip.label!==void 0){let h=YC(u.strip.label,!0),g=p?Math.min(u.strip.labelX,d-_r-p-h/2):u.strip.labelX,_=h+2*sm;c.push(Ww(u,{x:g-_/2,y:s,width:_,height:a})),c.push(Se({x:m(g),y:m(o),"font-family":n.sans,"font-size":tr,"font-weight":600,fill:u.style.text,"text-anchor":"middle"},u.strip.label))}if(u.strip.footnotesShown){let h=d-_r;for(let g=u.footnoteIndicators.length-1;g>=0;g--)c.push(Se({x:m(h),y:m(i.y+Y4),"font-family":n.sans,"font-size":V4,"font-weight":700,fill:u.style.text,"text-anchor":"end"},String(u.footnoteIndicators[g]))),h-=Rn}}return c.length===0?"":ee("g",{"data-layer":"wave-labels"},c.join(""))}function lO(e){if(!e||e.length===0)return"";let t=e.map(n=>ee("line",{x1:m(n.x),y1:m(n.topY),x2:m(n.x),y2:m(n.bottomY),stroke:n.stroke,"stroke-width":1,"stroke-dasharray":Um}));return ee("g",{"data-layer":"wave-cross"},t.join(""))}function cO(e){let t=e.entities.item.bg;return t==="none"?"transparent":t}function rj(e,t,n,r){if(!e)return"";let i=[];for(let o of e.entries){let s=o.swatch;if(s&&o.kind==="background"){let a=cO(n),c={x:m(s.x),y:m(s.y),width:m(s.width),height:m(s.height)};i.push(ee("rect",{...c,rx:2,ry:2,fill:a,stroke:n.entities.item.fg,"stroke-width":1})),i.push(ee("rect",{x:m(s.x+.5),y:m(s.y+.5),width:m(s.width-1),height:m(s.height-1),rx:2,ry:2,fill:iO(t,cm(a))}))}else if(s&&o.kind==="boundary"){let a=s.x+s.width/2;i.push(ee("line",{x1:m(a),y1:m(s.y),x2:m(a),y2:m(s.y+s.height),stroke:n.wave.boundary,"stroke-width":Mu}))}for(let a of o.runs)i.push(Se({x:m(a.x),y:m(a.y),"font-family":r.sans,"font-size":tr,fill:n.wave.labelText},a.text))}return ee("g",{"data-layer":"wave-legend"},i.join(""))}async function zw(e,t={}){let r=new om(t.idPrefix??"nl").next("root"),i=e.palette,o=t.fontFamilies??Mm,s=[],a=i.arrowhead.neutral,c=i.arrowhead.light,l=i.arrowhead.dark,u=(p,h)=>`<marker id="${p}" 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="${h}"/></marker>`,f=`<defs>${jC(r)}`+u(`${r}-arrow`,a)+u(`${r}-arrow-light`,c)+u(`${r}-arrow-dark`,l)+Z4(e).map(p=>K4(r,p,i)).join("")+"</defs>";s.push(f),s.push(ee("rect",{x:0,y:0,width:m(e.width),height:m(e.height),fill:e.backgroundColor})),s.push(R4(e.timeline,i,o)),s.push(tj(e,i));for(let p of e.swimlanes)s.push($4(p,i));s.push(QC(e.timeline,e.chartBox.y,i)),e.waves&&s.push(sO(e.waves)),s.push(A4(e.timeline,e.chartBox.y,i)),s.push(aO(e.waveBoundaries)),s.push(nj(e,i,o));for(let p of e.edges)p.kind==="underBar"&&s.push(qC(p,r,i));for(let p of e.swimlanes)s.push(tO(p,t,r,i,o));for(let p of e.includes)s.push(X4(p,t,r,i,o,e));s.push(lO(e.waveCrossings));for(let p of e.edges)p.kind!=="underBar"&&s.push(qC(p,r,i));for(let p of e.anchors)s.push(M4(p,i));for(let p of e.milestones)s.push(B4(p,r,i));for(let p of e.anchors)s.push(D4(p,i,o));for(let p of e.milestones)s.push(F4(p,i,o));if(s.push(k4(e.nowline,i,o)),s.push(W4(e.footnotes,r,i,o)),s.push(rj(e.waveLegend,r,i,o)),s.push(b4(e.header,r,i,o)),s.push(G4(e,o)),e.header.logo&&t.assetResolver){let p=await j4(e.header.logo.assetRef??"",t.assetResolver,r,t,e.header.logo.box.x,e.header.logo.box.y,Math.max(e.header.logo.box.width,e.header.logo.box.height));p&&s.push(p)}return`<svg${fl({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${m(e.width)} ${m(e.height)}`,width:m(e.width),height:m(e.height),"data-theme":e.theme,"data-generator":"nowline"})}>${s.join("")}</svg>`}var qw="/browser-source.nowline",ij={error:3,warning:2,info:1},oj={error:3,warning:2,info:1};function uO(e,t){return ij[e]>=oj[t]}var um,fO=0;function dO(){return um||(um=tw()),um}function sj(){return gt.parse(`memory:///nowline-browser-${++fO}.nowline`)}async function fm(e,t={}){let n=t.filePath??qw,r=dO(),o=r.shared.workspace.LangiumDocumentFactory.fromString(e,sj());await r.shared.workspace.DocumentBuilder.build([o],{validation:!0});let s=[];for(let a of og(o))a.origin==="lexer"?s.push(CC(a.error,n)):a.origin==="parser"?s.push(PC(a.error,n)):s.push(NC(a.diagnostic,n));return{ast:o.parseResult.value,diagnostics:s}}async function Vw(e,t={}){let n=t.filePath??qw,r=await fm(e,{filePath:n});if(r.diagnostics.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:r.diagnostics};let i=dO(),o=t.readFile??MC,s=await Zv(r.ast,n,{services:i.Nowline,readFile:o}),a=s.diagnostics.some(w=>w.severity==="error"&&!ol(w)&&!Bw(w.message)),c=[...r.diagnostics];for(let w of s.diagnostics){if(w.severity==="error"&&Bw(w.message)){t.onSkippedInclude?.({sourcePath:w.sourcePath,message:w.message});continue}a&&ol(w)||c.push(OC(w))}if(c.some(w=>w.severity==="error"))return{kind:"diagnostics",diagnostics:c};let l;if(t.timezone)try{l=Mw(t.timezone)}catch(w){if(w instanceof Zo)return{kind:"diagnostics",diagnostics:[{severity:"error",code:"invalid-timezone",message:w.message,file:n,line:1,column:1}]};throw w}let u=Fw({now:t.today,zone:l}),f=Ow(r.ast,s,{theme:t.theme,today:u,locale:t.locale,width:t.width,nonWorking:t.nonWorking}),d=t.diagnosticLevel??"error",p=Dw(f,{today:u??void 0,locale:t.locale??"en-US"}).map(w=>$C(w,n)),h=t.showLinks!==!1,g=t.strict===!0,_=[],x=await zw(f,{idPrefix:t.idPrefix,assetResolver:t.assetResolver,noLinks:!h,strict:g,warn:w=>_.push(w),fontFamilies:t.fontFamilies}),y=[...p,..._.map(w=>LC(w,n,g?"error":"warning"))].filter(w=>uO(w.severity,d));return g&&y.length>0?{kind:"diagnostics",diagnostics:[...c,...y]}:{kind:"svg",svg:x,warnings:y}}function Yw(){um=void 0,fO=0}var pO="/embed.nowline",Kw=!1;async function hO(e){let{ast:t,diagnostics:n}=await fm(e,{filePath:pO});return{ast:t,errors:n.filter(r=>r.severity==="error").map(r=>r.message)}}async function dm(e,t={}){let n={filePath:pO,theme:t.theme,today:t.today,timezone:t.timezone,locale:t.locale,width:t.width,nonWorking:t.nonWorking,idPrefix:t.idPrefix,onSkippedInclude:()=>{Kw||(Kw=!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."))}},r=await Vw(e,n);if(r.kind==="svg")return r.svg;let i=r.diagnostics.filter(o=>o.severity==="error").map(o=>o.message);throw new xu(`Failed to render Nowline source: ${i.join("; ")}`,i)}var xu=class extends Error{constructor(n,r){super(n);S(this,"details",r);this.name="EmbedRenderError"}};function mO(){Kw=!1,Yw()}var Jn=Uint8Array,En=Uint16Array,t_=Int32Array,n_=new Jn([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]),r_=new Jn([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]),gO=new Jn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vO=function(e,t){for(var n=new En(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new t_(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},wO=vO(n_,2),aj=wO.b,Jw=wO.r;aj[28]=258,Jw[258]=28;var _O=vO(r_,0),dae=_O.b,yO=_O.r,Qw=new En(32768);for(De=0;De<32768;++De)ti=(De&43690)>>1|(De&21845)<<1,ti=(ti&52428)>>2|(ti&13107)<<2,ti=(ti&61680)>>4|(ti&3855)<<4,Qw[De]=((ti&65280)>>8|(ti&255)<<8)>>1;var ti,De,wu=(function(e,t,n){for(var r=e.length,i=0,o=new En(t);i<r;++i)e[i]&&++o[e[i]-1];var s=new En(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(n){a=new En(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],f=s[e[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[Qw[f]>>c]=l}else for(a=new En(r),i=0;i<r;++i)e[i]&&(a[i]=Qw[s[e[i]-1]++]>>15-e[i]);return a}),Jo=new Jn(288);for(De=0;De<144;++De)Jo[De]=8;var De;for(De=144;De<256;++De)Jo[De]=9;var De;for(De=256;De<280;++De)Jo[De]=7;var De;for(De=280;De<288;++De)Jo[De]=8;var De,pm=new Jn(32);for(De=0;De<32;++De)pm[De]=5;var De,lj=wu(Jo,9,0);var cj=wu(pm,5,0);var EO=function(e){return(e+7)/8|0},uj=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Jn(e.subarray(t,n))};var ni=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Tu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},Zw=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:AO,l:0};if(i==1){var s=new Jn(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(b,L){return b.f-L.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,f=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=n[n[l].f<n[f].f?l++:f++],c=n[l!=u&&n[l].f<n[f].f?l++:f++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};for(var d=o[0].s,r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new En(d+1),h=e_(n[u-1],p,0);if(h>t){var r=0,g=0,_=h-t,x=1<<_;for(o.sort(function(L,P){return p[P.s]-p[L.s]||L.f-P.f});r<i;++r){var y=o[r].s;if(p[y]>t)g+=x-(1<<h-p[y]),p[y]=t;else break}for(g>>=_;g>0;){var w=o[r].s;p[w]<t?g-=1<<t-p[w]++-1:++r}for(;r>=0&&g;--r){var v=o[r].s;p[v]==t&&(--p[v],++g)}h=t}return{t:new Jn(p),l:h}},e_=function(e,t,n){return e.s==-1?Math.max(e_(e.l,t,n+1),e_(e.r,t,n+1)):t[e.s]=n},xO=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new En(++t),r=0,i=e[0],o=1,s=function(c){n[r++]=c},a=1;a<=t;++a)if(e[a]==i&&a!=t)++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=e[a]}return{c:n.subarray(0,r),n:t}},vu=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},bO=function(e,t,n){var r=n.length,i=EO(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},TO=function(e,t,n,r,i,o,s,a,c,l,u){ni(t,u++,n),++i[256];for(var f=Zw(i,15),d=f.t,p=f.l,h=Zw(o,15),g=h.t,_=h.l,x=xO(d),y=x.c,w=x.n,v=xO(g),b=v.c,L=v.n,P=new En(19),O=0;O<y.length;++O)++P[y[O]&31];for(var O=0;O<b.length;++O)++P[b[O]&31];for(var j=Zw(P,7),z=j.t,F=j.l,k=19;k>4&&!z[gO[k-1]];--k);var W=l+5<<3,X=vu(i,Jo)+vu(o,pm)+s,R=vu(i,d)+vu(o,g)+s+14+3*k+vu(P,z)+2*P[16]+3*P[17]+7*P[18];if(c>=0&&W<=X&&W<=R)return bO(t,u,e.subarray(c,c+l));var C,N,G,q;if(ni(t,u,1+(R<X)),u+=2,R<X){C=wu(d,p,0),N=d,G=wu(g,_,0),q=g;var V=wu(z,F,0);ni(t,u,w-257),ni(t,u+5,L-1),ni(t,u+10,k-4),u+=14;for(var O=0;O<k;++O)ni(t,u+3*O,z[gO[O]]);u+=3*k;for(var re=[y,b],oe=0;oe<2;++oe)for(var ye=re[oe],O=0;O<ye.length;++O){var ne=ye[O]&31;ni(t,u,V[ne]),u+=z[ne],ne>15&&(ni(t,u,ye[O]>>5&127),u+=ye[O]>>12)}}else C=lj,N=Jo,G=cj,q=pm;for(var O=0;O<a;++O){var ae=r[O];if(ae>255){var ne=ae>>18&31;Tu(t,u,C[ne+257]),u+=N[ne+257],ne>7&&(ni(t,u,ae>>23&31),u+=n_[ne]);var A=ae&31;Tu(t,u,G[A]),u+=q[A],A>3&&(Tu(t,u,ae>>5&8191),u+=r_[A])}else Tu(t,u,C[ae]),u+=N[ae]}return Tu(t,u,C[256]),u+N[256]},fj=new t_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),AO=new Jn(0),dj=function(e,t,n,r,i,o){var s=o.z||e.length,a=new Jn(r+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(r,a.length-i),l=o.l,u=(o.r||0)&7;if(t){u&&(c[0]=o.r>>3);for(var f=fj[t-1],d=f>>13,p=f&8191,h=(1<<n)-1,g=o.p||new En(32768),_=o.h||new En(h+1),x=Math.ceil(n/3),y=2*x,w=function(xe){return(e[xe]^e[xe+1]<<x^e[xe+2]<<y)&h},v=new t_(25e3),b=new En(288),L=new En(32),P=0,O=0,j=o.i||0,z=0,F=o.w||0,k=0;j+2<s;++j){var W=w(j),X=j&32767,R=_[W];if(g[X]=R,_[W]=X,F<=j){var C=s-j;if((P>7e3||z>24576)&&(C>423||!l)){u=TO(e,c,0,v,b,L,O,z,k,j-k,u),z=P=O=0,k=j;for(var N=0;N<286;++N)b[N]=0;for(var N=0;N<30;++N)L[N]=0}var G=2,q=0,V=p,re=X-R&32767;if(C>2&&W==w(j-re))for(var oe=Math.min(d,C)-1,ye=Math.min(32767,j),ne=Math.min(258,C);re<=ye&&--V&&X!=R;){if(e[j+G]==e[j+G-re]){for(var ae=0;ae<ne&&e[j+ae]==e[j+ae-re];++ae);if(ae>G){if(G=ae,q=re,ae>oe)break;for(var A=Math.min(re,ae-2),$=0,N=0;N<A;++N){var M=j-re+N&32767,H=g[M],Z=M-H&32767;Z>$&&($=Z,R=M)}}}X=R,R=g[X],re+=X-R&32767}if(q){v[z++]=268435456|Jw[G]<<18|yO[q];var Y=Jw[G]&31,ie=yO[q]&31;O+=n_[Y]+r_[ie],++b[257+Y],++L[ie],F=j+G,++P}else v[z++]=e[j],++b[e[j]]}}for(j=Math.max(j,F);j<s;++j)v[z++]=e[j],++b[e[j]];u=TO(e,c,l,v,b,L,O,z,k,j-k,u),l||(o.r=u&7|c[u/8|0]<<3,u-=7,o.h=_,o.p=g,o.i=j,o.w=F)}else{for(var j=o.w||0;j<s+l;j+=65535){var le=j+65535;le>=s&&(c[u/8|0]=l,le=s),u=bO(c,u+1,e.subarray(j,le))}o.i=s}return uj(a,0,r+EO(u)+i)};var RO=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length|0,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},pj=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new Jn(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return dj(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)};var kO=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var hj=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=RO();i.p(t.dictionary),kO(e,2,i.d())}};function IO(e,t){t||(t={});var n=RO();n.p(e);var r=pj(e,t,t.dictionary?6:2,4);return hj(r,t),kO(r,r.length-4,n.d()),r}var mj=typeof TextDecoder<"u"&&new TextDecoder,gj=0;try{mj.decode(AO,{stream:!0}),gj=1}catch{}var PO="https://free.nowline.io/open";function SO(e){let t=new TextEncoder().encode(e),n=IO(t),r=32768,i="";for(let o=0;o<n.length;o+=r)i+=String.fromCharCode(...n.subarray(o,o+r));return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function i_({source:e,sourceUrl:t,share:n}){if(n===!1||n==="none")return null;if(typeof n=="object")return t!==void 0&&NO(t)?n.remoteUrl.replace("{url}",encodeURIComponent(t)):n.textUrl.replace("{text}",SO(e));let r=n===!0?PO:n,i=new URL(r);return t!==void 0&&NO(t)?i.hash=`url=${encodeURIComponent(t)}`:i.hash=`text=${SO(e)}`,i.toString()}function NO(e){try{return new URL(e).protocol==="https:"}catch{return!1}}var CO=0;async function OO(e){let t=e.document??globalThis.document;if(!t)return{rendered:0,failed:0};let n=t.querySelectorAll(e.selector),r=0,i=0,o=++CO,s=e.share??!0,a=[],c=0;for(let l of Array.from(n)){let u=yj(l);if(!u)continue;let f=xj(l),d=`nl-r${o}-${c++}`,p={theme:e.theme,locale:e.locale,width:e.width,nonWorking:e.nonWorking,today:e.today,timezone:e.timezone,idPrefix:d},h=u.parentElement,g=u.nextSibling,x=l.getAttribute("data-nowline-source-url")??void 0??e.sourceUrl;a.push(dm(f,p).then(y=>{if(Tj(u,y),r++,h!==null){let w=i_({source:f,sourceUrl:x,share:s});if(w!==null){let v=t.createElement("a");v.className="nowline-share",v.href=w,v.target="_blank",v.rel="noopener noreferrer",v.textContent="Share on Nowline",h.insertBefore(v,g)}}},y=>{i++,console.error("nowline: render failed",y)}))}return await Promise.all(a),{rendered:r,failed:i}}function yj(e){let t=e.parentElement;return t&&t.tagName.toUpperCase()==="PRE"?t:e}function xj(e){return e.textContent??""}function Tj(e,t){e.outerHTML=t}function LO(){CO=0}function hm(){if(typeof globalThis>"u")return"light";let e=globalThis.matchMedia;if(typeof e!="function")return"light";try{return e("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}function $O(e,t){return e&&e!=="auto"?lw(e)??t:t}var vj="0.0.0-dev.20261009042000.g52d5946",wj="52d5946",_j="pre code.language-nowline, code.language-nowline",DO={theme:"auto",startOnLoad:!0,selector:_j,systemTheme:hm(),share:!0},Ve={...DO},o_=!1;function Ej(e={}){Ve={theme:e.theme??Ve.theme,startOnLoad:e.startOnLoad??Ve.startOnLoad,selector:e.selector??Ve.selector,locale:e.locale??Ve.locale,width:e.width??Ve.width,nonWorking:e.nonWorking??Ve.nonWorking,today:e.today!==void 0?e.today:Ve.today,timezone:e.timezone??Ve.timezone,share:e.share??Ve.share,sourceUrl:e.sourceUrl??Ve.sourceUrl,systemTheme:hm()}}function MO(){return{theme:$O(Ve.theme,Ve.systemTheme),locale:Ve.locale,width:Ve.width,nonWorking:Ve.nonWorking,today:Ve.today,timezone:Ve.timezone}}async function bj(e,t={}){let n={...MO(),...t};return dm(e,n)}async function Aj(e){return hO(e)}async function s_(e){let t={selector:e?.selector??Ve.selector,theme:e?.theme??MO().theme,locale:e?.locale??Ve.locale,width:e?.width??Ve.width,nonWorking:e?.nonWorking??Ve.nonWorking,today:e?.today!==void 0?e.today:Ve.today,timezone:e?.timezone??Ve.timezone,share:e?.share??Ve.share,sourceUrl:e?.sourceUrl??Ve.sourceUrl,document:e?.document};return OO(t)}var Rj=s_;if(typeof document<"u"&&!o_){o_=!0;let e=()=>{Ve.startOnLoad&&s_()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):queueMicrotask(e)}function kj(){Ve={...DO,systemTheme:hm()},o_=!1,mO(),LO()}return Au(Ij);})();
2772
2772
  //# sourceMappingURL=nowline.min.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowline/embed",
3
- "version": "0.0.0-dev.20261008053748.g6e34cc1",
3
+ "version": "0.0.0-dev.20261009042000.g52d5946",
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": {
@@ -39,11 +39,11 @@
39
39
  "cdn"
40
40
  ],
41
41
  "dependencies": {
42
- "@nowline/browser": "0.0.0-dev.20261008053748.g6e34cc1",
43
- "@nowline/core": "0.0.0-dev.20261008053748.g6e34cc1",
44
- "@nowline/layout": "0.0.0-dev.20261008053748.g6e34cc1",
45
- "@nowline/renderer": "0.0.0-dev.20261008053748.g6e34cc1",
46
- "@nowline/share-link": "0.0.0-dev.20261008053748.g6e34cc1",
42
+ "@nowline/browser": "0.0.0-dev.20261009042000.g52d5946",
43
+ "@nowline/core": "0.0.0-dev.20261009042000.g52d5946",
44
+ "@nowline/layout": "0.0.0-dev.20261009042000.g52d5946",
45
+ "@nowline/renderer": "0.0.0-dev.20261009042000.g52d5946",
46
+ "@nowline/share-link": "0.0.0-dev.20261009042000.g52d5946",
47
47
  "langium": "~4.4.0"
48
48
  },
49
49
  "devDependencies": {