gantt-schedule-timeline-calendar
Version:
Gantt, Schedule, Timeline, Calendar components all in one. [gantt, timeline, schedule, scheduler, calendar, booking, gantt chart, reservation, javascript gantt, javascript timeline, javascript schedule, javascript scheduler, javascript calendar, javascrip
664 lines • 225 kB
JavaScript
import{d as t,u as e,a as i,D as s,_ as o,b as n,c as a,p as r,P as l,e as c,f as d,g as h}from"./vendor.esm.min.js";
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const u=globalThis,m=t=>t,f=u.trustedTypes,g=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,p="$lit$",v=`lit$${Math.random().toFixed(9).slice(2)}$`,w="?"+v,b=`<${w}>`,y=document,x=()=>y.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,D=t=>$(t)||"function"==typeof t?.[Symbol.iterator],C="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,A=/>/g,S=RegExp(`>|${C}(?:([^\\s"'>=/]+)(${C}*=${C}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,_=/"/g,R=/^(?:script|style|textarea|title)$/i,G=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),T=G(1),L=G(2),z=G(3),O=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),N=new WeakMap,H=y.createTreeWalker(y,129);function V(t,e){if(!$(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==g?g.createHTML(e):e}const E=(t,e)=>{const i=t.length-1,s=[];let o,n=2===e?"<svg>":3===e?"<math>":"",a=W;for(let e=0;e<i;e++){const i=t[e];let r,l,c=-1,d=0;for(;d<i.length&&(a.lastIndex=d,l=a.exec(i),null!==l);)d=a.lastIndex,a===W?"!--"===l[1]?a=I:void 0!==l[1]?a=A:void 0!==l[2]?(R.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=S):void 0!==l[3]&&(a=S):a===S?">"===l[0]?(a=o??W,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,r=l[1],a=void 0===l[3]?S:'"'===l[3]?_:M):a===_||a===M?a=S:a===I||a===A?a=W:(a=S,o=void 0);const h=a===S&&t[e+1].startsWith("/>")?" ":"";n+=a===W?i+b:c>=0?(s.push(r),i.slice(0,c)+p+i.slice(c)+v+h):i+v+(-2===c?e:h)}return[V(t,n+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class B{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,n=0;const a=t.length-1,r=this.parts,[l,c]=E(t,e);if(this.el=B.createElement(l,i),H.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=H.nextNode())&&r.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(p)){const e=c[n++],i=s.getAttribute(t).split(v),a=/([.?@])?(.*)/.exec(e);r.push({type:1,index:o,name:a[2],strings:i,ctor:"."===a[1]?U:"?"===a[1]?X:"@"===a[1]?Z:J}),s.removeAttribute(t)}else t.startsWith(v)&&(r.push({type:6,index:o}),s.removeAttribute(t));if(R.test(s.tagName)){const t=s.textContent.split(v),e=t.length-1;if(e>0){s.textContent=f?f.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],x()),H.nextNode(),r.push({type:2,index:++o});s.append(t[e],x())}}}else if(8===s.nodeType)if(s.data===w)r.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(v,t+1));)r.push({type:7,index:o}),t+=v.length-1}o++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function Y(t,e,i=t,s){if(e===O)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const n=P(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),void 0===n?o=void 0:(o=new n(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,s)),e}class j{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??y).importNode(e,!0);H.currentNode=s;let o=H.nextNode(),n=0,a=0,r=i[0];for(;void 0!==r;){if(n===r.index){let e;2===r.type?e=new F(o,o.nextSibling,this,t):1===r.type?e=new r.ctor(o,r.name,r.strings,this,t):6===r.type&&(e=new K(o,this,t)),this._$AV.push(e),r=i[++a]}n!==r?.index&&(o=H.nextNode(),n++)}return H.currentNode=y,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class F{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),P(t)?t===k||null==t||""===t?(this._$AH!==k&&this._$AR(),this._$AH=k):t!==this._$AH&&t!==O&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):D(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==k&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=B.createElement(V(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new j(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=N.get(t.strings);return void 0===e&&N.set(t.strings,e=new B(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new F(this.O(x()),this.O(x()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=m(t).nextSibling;m(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class J{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=k,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=k}_$AI(t,e=this,i,s){const o=this.strings;let n=!1;if(void 0===o)t=Y(this,t,e,0),n=!P(t)||t!==this._$AH&&t!==O,n&&(this._$AH=t);else{const s=t;let a,r;for(t=o[0],a=0;a<o.length-1;a++)r=Y(this,s[i+a],e,a),r===O&&(r=this._$AH[a]),n||=!P(r)||r!==this._$AH[a],r===k?t=k:t!==k&&(t+=(r??"")+o[a+1]),this._$AH[a]=r}n&&!s&&this.j(t)}j(t){t===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class U extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===k?void 0:t}}class X extends J{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==k)}}class Z extends J{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??k)===O)return;const i=this._$AH,s=t===k&&i!==k||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==k&&(i===k||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const q={M:p,P:v,A:w,C:1,L:E,R:j,D:D,V:Y,I:F,H:J,N:X,U:Z,B:U,F:K},Q=u.litHtmlPolyfillSupport;Q?.(B,F),(u.litHtmlVersions??=[]).push("3.3.2");const tt=(t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new F(e.insertBefore(x(),t),t,void 0,i??{})}return o._$AI(t),o};var et=Object.freeze({__proto__:null,_$LH:q,html:T,mathml:z,noChange:O,nothing:k,render:tt,svg:L});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const it={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},st=t=>(...e)=>({_$litDirective$:t,values:e});let ot=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{I:nt}=q,at=t=>t,rt=(t,e)=>void 0!==t?._$litType$,lt=t=>void 0===t.strings,ct=()=>document.createComment(""),dt=(t,e,i)=>{const s=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(ct(),o),n=s.insertBefore(ct(),o);i=new nt(e,n,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,a=n!==t;if(a){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==o||a){let t=i._$AA;for(;t!==e;){const e=at(t).nextSibling;at(s).insertBefore(t,o),t=e}}}return i},ht=(t,e,i=t)=>(t._$AI(e,i),t),ut={},mt=(t,e=ut)=>t._$AH=e,ft=t=>t._$AH,gt=t=>{t._$AR(),t._$AA.remove()},pt=t=>{t._$AR()},vt=(t,e)=>{const i=t._$AN;if(void 0===i)return!1;for(const t of i)t._$AO?.(e,!1),vt(t,e);return!0},wt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===i?.size)},bt=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Pt(e)}};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function yt(t){void 0!==this._$AN?(wt(this),this._$AM=t,bt(this)):this._$AM=t}function xt(t,e=!1,i=0){const s=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(s))for(let t=i;t<s.length;t++)vt(s[t],!1),wt(s[t]);else null!=s&&(vt(s,!1),wt(s));else vt(this,t)}const Pt=t=>{t.type==it.CHILD&&(t._$AP??=xt,t._$AQ??=yt)};class $t extends ot{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),bt(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(vt(this,t),wt(this))}setValue(t){if(lt(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Dt{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}let Ct=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(t=>this.Z=t)}resume(){this.Z?.(),this.Y=this.Z=void 0}},Wt=class extends $t{constructor(){super(...arguments),this._$CK=new Dt(this),this._$CX=new Ct}render(t,e){return O}update(t,[e,i]){if(this.isConnected||this.disconnected(),e===this._$CJ)return O;this._$CJ=e;let s=0;const{_$CK:o,_$CX:n}=this;return(async(t,e)=>{for await(const i of t)if(!1===await e(i))return})(e,async t=>{for(;n.get();)await n.get();const a=o.deref();if(void 0!==a){if(a._$CJ!==e)return!1;void 0!==i&&(t=i(t,s)),a.commitValue(t,s),s++}return!0}),O}commitValue(t,e){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const It=st(Wt),At=st(class extends Wt{constructor(t){if(super(t),t.type!==it.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(t,e){return this._$Ctt=t,super.update(t,e)}commitValue(t,e){0===e&&pt(this._$Ctt);const i=dt(this._$Ctt);ht(i,t)}}),St=t=>(t=>null!=t?._$litType$?.h)(t)?t._$litType$.h:t.strings,Mt=st(class extends ot{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(t,[e]){const i=rt(this.it)?St(this.it):null,s=rt(e)?St(e):null;if(null!==i&&(null===s||i!==s)){const e=ft(t).pop();let s=this.et.get(i);if(void 0===s){const t=document.createDocumentFragment();s=tt(k,t),s.setConnected(!1),this.et.set(i,s)}mt(s,[e]),dt(s,void 0,e)}if(null!==s){if(null===i||i!==s){const e=this.et.get(s);if(void 0!==e){const i=ft(e).pop();pt(t),dt(t,void 0,i),mt(t,[i])}}this.it=e}else this.it=void 0;return this.render(e)}}),_t={},Rt=st(class extends ot{constructor(){super(...arguments),this.ot=_t}render(t,e){return e()}update(t,[e,i]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((t,e)=>t===this.ot[e]))return O}else if(this.ot===e)return O;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,i)}}),Gt=t=>t??k,Tt=(t,e,i)=>{const s=new Map;for(let o=e;o<=i;o++)s.set(t[o],o);return s},Lt=st(class extends ot{constructor(t){if(super(t),t.type!==it.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const o=[],n=[];let a=0;for(const e of t)o[a]=s?s(e,a):a,n[a]=i(e,a),a++;return{values:n,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){const o=ft(t),{values:n,keys:a}=this.dt(e,i,s);if(!Array.isArray(o))return this.ut=a,n;const r=this.ut??=[],l=[];let c,d,h=0,u=o.length-1,m=0,f=n.length-1;for(;h<=u&&m<=f;)if(null===o[h])h++;else if(null===o[u])u--;else if(r[h]===a[m])l[m]=ht(o[h],n[m]),h++,m++;else if(r[u]===a[f])l[f]=ht(o[u],n[f]),u--,f--;else if(r[h]===a[f])l[f]=ht(o[h],n[f]),dt(t,l[f+1],o[h]),h++,f--;else if(r[u]===a[m])l[m]=ht(o[u],n[m]),dt(t,o[h],o[u]),u--,m++;else if(void 0===c&&(c=Tt(a,m,f),d=Tt(r,h,u)),c.has(r[h]))if(c.has(r[u])){const e=d.get(a[m]),i=void 0!==e?o[e]:null;if(null===i){const e=dt(t,o[h]);ht(e,n[m]),l[m]=e}else l[m]=ht(i,n[m]),dt(t,o[h],i),o[e]=null;m++}else gt(o[u]),u--;else gt(o[h]),h++;for(;m<=f;){const e=dt(t,l[f+1]);ht(e,n[m]),l[m++]=e}for(;h<=u;){const t=o[h++];null!==t&>(t)}return this.ut=a,mt(t,l),O}});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
let zt=class extends ot{constructor(t){if(super(t),this.it=k,t.type!==it.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===k||null==t)return this._t=void 0,this.it=t;if(t===O)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};zt.directiveName="unsafeHTML",zt.resultType=1;const Ot=st(zt),kt=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then,Nt=1073741823;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Ht extends $t{constructor(){super(...arguments),this._$Cwt=Nt,this._$Cbt=[],this._$CK=new Dt(this),this._$CX=new Ct}render(...t){return t.find(t=>!kt(t))??O}update(t,e){const i=this._$Cbt;let s=i.length;this._$Cbt=e;const o=this._$CK,n=this._$CX;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cwt);t++){const a=e[t];if(!kt(a))return this._$Cwt=t,a;t<s&&a===i[t]||(this._$Cwt=Nt,s=0,Promise.resolve(a).then(async t=>{for(;n.get();)await n.get();const e=o.deref();if(void 0!==e){const i=e._$Cbt.indexOf(a);i>-1&&i<e._$Cwt&&(e._$Cwt=i,e.setValue(t))}}))}return O}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const Vt=st(Ht),Et=st(class extends ot{constructor(t){if(super(t),t.type!==it.PROPERTY&&t.type!==it.ATTRIBUTE&&t.type!==it.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!lt(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===O||e===k)return e;const i=t.element,s=t.name;if(t.type===it.PROPERTY){if(e===i[s])return O}else if(t.type===it.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(s))return O}else if(t.type===it.ATTRIBUTE&&i.getAttribute(s)===e+"")return O;return mt(t),e}}),Bt="important",Yt=" !"+Bt,jt=st(class extends ot{constructor(t){if(super(t),t.type!==it.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,i)=>{const s=t[i];return null==s?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?i.removeProperty(t):i[t]=null);for(const t in e){const s=e[t];if(null!=s){this.ft.add(t);const e="string"==typeof s&&s.endsWith(Yt);t.includes("-")||e?i.setProperty(t,e?s.slice(0,-11):s,e?Bt:""):i[t]=s}}return O}}),Ft=st(class extends ot{constructor(t){if(super(t),t.type!==it.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return O}});
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function Jt(t,e,i){return t?e(t):i?.(t)}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Ut=(t,e,i)=>{for(const i of e)if(i[0]===t)return(0,i[1])();return i?.()};
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Xt(t,e){if(void 0!==t){let i=0;for(const s of t)yield e(s,i++)}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Zt(t,e){const i="function"==typeof e;if(void 0!==t){let s=-1;for(const o of t)s>-1&&(yield i?e(s):e),s++,yield o}}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function*Kt(t,e,i=1){const s=void 0===e?0:t;e??=t;for(let t=s;i>0?t<e:e<t;t+=i)yield t}
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const qt=st(class extends ot{constructor(t){if(super(t),t.type!==it.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?O:(this.vt=t,document.importNode(t.content,!0))}});
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Qt extends zt{}Qt.directiveName="unsafeSVG",Qt.resultType=2;const te=st(Qt);
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class ee{}const ie=new WeakMap,se=st(class extends $t{render(t){return k}update(t,[e]){const i=e!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),k}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let i=ie.get(e);void 0===i&&(i=new WeakMap,ie.set(e,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?ie.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),oe=new WeakMap;class ne extends ot{update(t,e){return e[0].execute(t),O}render(t){return t.toString()}}class ae{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=st(ne),this.execute=this.execute.bind(this),this.schedule=e.schedule}directive(){return this._directive(this)}setStyle(t){for(const t in this.style)delete this.style[t];for(const e in t)this.style[e]=t[e]}toString(){return Object.keys(this.style).reduce((t,e)=>{const i=this.style[e];return null==i?t:t+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}_getInternalStyle(){return this.element?oe.get(this.element):null}updateStyle(t,e,i){const s=i.previousStyle;for(const t of e)t&&!this.style[t]&&(i.toRemove.includes(t)||i.toRemove.push(t));for(const t in s)t&&t in this.style&&!this.style[t]&&e.includes(t)&&(i.toRemove.includes(t)||i.toRemove.push(t));for(const t in this.style){if(!t)continue;if(!(t in this.style))continue;const o=this.style[t];if(!o)continue;const n=s[t];void 0!==n&&n===o&&e.includes(t)||i.toUpdate.push(t)}if(i.toRemove.length||i.toUpdate.length){for(const e of i.toRemove)t.removeProperty(e),t[e]&&delete t[e],i.elementStyles=i.elementStyles.filter(t=>t!==e);for(const e of i.toUpdate){const s=this.style[e];s&&(e.includes("-")?t.setProperty(e,s):t[e]=s,i.elementStyles.includes(e)||i.elementStyles.push(e))}i.previousStyle=Object.assign({},this.style)}}execute(t){const e=t.element;let i;this.element=e,oe.has(e)?i=oe.get(e):(i={toUpdate:[],toRemove:[],previousStyle:{},elementStyles:[],styleTaken:!1},oe.set(e,i)),i.toRemove.length=0,i.toUpdate.length=0;const s=e.style;let o;if(i.styleTaken)o=i.elementStyles;else{i.elementStyles=o=[];for(let t=i.length;t--;)o.push(s[t]);i.styleTaken=!0}this.schedule?requestAnimationFrame(()=>{this.updateStyle(s,o,i)}):this.updateStyle(s,o,i),oe.set(e,i)}}const re=new WeakMap;const le=st(class extends ot{render(t){return k}update(t,e){if("boolean"!=typeof e[0])throw new Error("[vido] Detach directive argument should be a boolean.");let i=e[0];const s=t.element;if(i)re.has(t)||re.set(t,{element:s,nextSibling:s.nextSibling,previousSibling:s.previousSibling,parent:s.parentNode}),s.remove();else{const e=re.get(t);e&&(e.nextSibling&&e.nextSibling.parentNode?e.nextSibling.parentNode.insertBefore(e.element,e.nextSibling):e.previousSibling&&e.previousSibling.parentNode?e.previousSibling.parentNode.appendChild(e.element):e.parent&&e.parent.appendChild(e.element),re.delete(t))}return this.render(i)}});class ce{constructor(){this.isAction=!0}}ce.prototype.isAction=!0;const de="undefined"!=typeof PointerEvent;let he=0;class ue extends ce{constructor(t,e){super(),this.moving="",this.initialX=0,this.initialY=0,this.lastY=0,this.lastX=0,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onWheel=this.onWheel.bind(this),this.element=t,this.id=++he,this.options=Object.assign(Object.assign({},{element:document.createTextNode(""),axis:"xy",threshold:10,onDown(){},onMove(){},onUp(){},onWheel(){}}),e.pointerOptions),de?(t.addEventListener("pointerdown",this.onPointerDown),document.addEventListener("pointermove",this.onPointerMove),document.addEventListener("pointerup",this.onPointerUp)):(t.addEventListener("touchstart",this.onPointerDown),document.addEventListener("touchmove",this.onPointerMove,{passive:!1}),document.addEventListener("touchend",this.onPointerUp),document.addEventListener("touchcancel",this.onPointerUp),t.addEventListener("mousedown",this.onPointerDown),document.addEventListener("mousemove",this.onPointerMove,{passive:!1}),document.addEventListener("mouseup",this.onPointerUp))}normalizeMouseWheelEvent(t){let e=t.deltaX||0,i=t.deltaY||0,s=t.deltaZ||0;const o=t.deltaMode,n=parseInt(getComputedStyle(t.target).getPropertyValue("line-height"));let a=1;switch(o){case 1:a=n;break;case 2:a=window.height}return e*=a,i*=a,s*=a,{x:e,y:i,z:s,event:t}}onWheel(t){const e=this.normalizeMouseWheelEvent(t);this.options.onWheel(e)}normalizePointerEvent(t){let e={x:0,y:0,pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0,event:t};switch(t.type){case"wheel":const i=this.normalizeMouseWheelEvent(t);e.x=i.x,e.y=i.y,e.pageX=e.x,e.pageY=e.y,e.screenX=e.x,e.screenY=e.y,e.clientX=e.x,e.clientY=e.y;break;case"touchstart":case"touchmove":case"touchend":case"touchcancel":e.x=t.changedTouches[0].screenX,e.y=t.changedTouches[0].screenY,e.pageX=t.changedTouches[0].pageX,e.pageY=t.changedTouches[0].pageY,e.screenX=t.changedTouches[0].screenX,e.screenY=t.changedTouches[0].screenY,e.clientX=t.changedTouches[0].clientX,e.clientY=t.changedTouches[0].clientY;break;default:e.x=t.x,e.y=t.y,e.pageX=t.pageX,e.pageY=t.pageY,e.screenX=t.screenX,e.screenY=t.screenY,e.clientX=t.clientX,e.clientY=t.clientY}return e}onPointerDown(t){if("mousedown"===t.type&&0!==t.button)return;this.moving="xy";const e=this.normalizePointerEvent(t);this.lastX=e.x,this.lastY=e.y,this.initialX=e.x,this.initialY=e.y,this.options.onDown(e)}handleX(t){let e=t.x-this.lastX;return this.lastY=t.y,this.lastX=t.x,e}handleY(t){let e=t.y-this.lastY;return this.lastY=t.y,this.lastX=t.x,e}onPointerMove(t){if(""===this.moving||"mousemove"===t.type&&0!==t.button)return;const e=this.normalizePointerEvent(t);if("x|y"===this.options.axis){let i=0,s=0;("x"===this.moving||"xy"===this.moving&&Math.abs(e.x-this.initialX)>this.options.threshold)&&(this.moving="x",i=this.handleX(e)),("y"===this.moving||"xy"===this.moving&&Math.abs(e.y-this.initialY)>this.options.threshold)&&(this.moving="y",s=this.handleY(e)),this.options.onMove({movementX:i,movementY:s,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}else if("xy"===this.options.axis){let i=0,s=0;Math.abs(e.x-this.initialX)>this.options.threshold&&(i=this.handleX(e)),Math.abs(e.y-this.initialY)>this.options.threshold&&(s=this.handleY(e)),this.options.onMove({movementX:i,movementY:s,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}else if("x"===this.options.axis)("x"===this.moving||"xy"===this.moving&&Math.abs(e.x-this.initialX)>this.options.threshold)&&(this.moving="x",this.options.onMove({movementX:this.handleX(e),movementY:0,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t}));else if("y"===this.options.axis){let i=0;("y"===this.moving||"xy"===this.moving&&Math.abs(e.y-this.initialY)>this.options.threshold)&&(this.moving="y",i=this.handleY(e)),this.options.onMove({movementX:0,movementY:i,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}}onPointerUp(t){this.moving="";const e=this.normalizePointerEvent(t);this.options.onUp({movementX:0,movementY:0,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t}),this.lastY=0,this.lastX=0}destroy(t){de?(t.removeEventListener("pointerdown",this.onPointerDown),document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp)):(t.removeEventListener("mousedown",this.onPointerDown),document.removeEventListener("mousemove",this.onPointerMove),document.removeEventListener("mouseup",this.onPointerUp),t.removeEventListener("touchstart",this.onPointerDown),document.removeEventListener("touchmove",this.onPointerMove),document.removeEventListener("touchend",this.onPointerUp),document.removeEventListener("touchcancel",this.onPointerUp))}}function me(t){let e=0;return function(i){e||(e=requestAnimationFrame(function(){e=0,t.apply(void 0,[i])}))}}function fe(t){return null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||"symbol"==typeof t}function ge(t){return!fe(t)&&(t&&t.constructor?"Object"===t.constructor.name:"object"==typeof t&&null!==t)}function pe(t){return!fe(t)&&(Array.isArray(t)||ge(t))}function ve(t,...e){const i=e.shift();if(ge(i)){ge(t)||(t=Object.create(null));for(const e in i){const s=i[e];pe(s)?t[e]=ve(t[e],s):t[e]=s}}else if(Array.isArray(i)){const e=i.length;Array.isArray(t)?t.length=e:t=new Array(e);let s=0;for(;s<e;s++){const e=i[s];pe(e)?t[s]=ve(t[s],e):t[s]=e}void 0!==i.raw&&(t.raw=i.raw.slice())}else t=i;return e.length?ve(t,...e):t}function we(t){if(void 0!==t.actions){const e=t.actions.map(t=>{const e=Object.assign({},t),i=Object.assign({},e.props);return delete i.state,delete i.api,delete e.element,e.props=i,e});t.actions=e}return ve({},t)}var be={mergeDeep:ve,clone:we,schedule:me};class ye{constructor(t,e){this.slotInstances={},this.destroyed=!1,this.vido=t,this.props=e,this.destroy=this.destroy.bind(this),this.change=this.change.bind(this),this.html=this.html.bind(this),this.getInstances=this.getInstances.bind(this),this.setComponents=this.setComponents.bind(this),this.vido.onDestroy(()=>{this.destroy()})}setComponents(t){if(t&&!this.destroyed){for(const e in t){const i=t[e];void 0===this.slotInstances[e]&&(this.slotInstances[e]=[]);for(const t of this.slotInstances[e])t.destroy();this.slotInstances[e].length=0;for(const t of i)this.slotInstances[e].push(this.vido.createComponent(t,this.props))}this.vido.update()}}destroy(){if(!this.destroyed){for(const t in this.slotInstances){for(const e of this.slotInstances[t])e.destroy();this.slotInstances[t].length=0}this.destroyed=!0}}change(t,e=void 0){if(!this.destroyed){this.props=t;for(const i in this.slotInstances){const s=this.slotInstances[i];for(const i of s)i.change(t,e)}}}getInstances(t){return this.destroyed?[]:void 0===t?this.slotInstances:this.slotInstances[t]}html(t,e){if(this.destroyed)return;if(!this.slotInstances[t]||0===this.slotInstances[t].length)return e;let i=e;for(const e of this.slotInstances[t])i=e.html(i);return i}getProps(){return this.props}isDestroyed(){return this.destroyed}}class xe extends ot{update(t,e){if("function"!=typeof e[0])throw new Error("[vido] GetElementDirective argument should be a function.");(0,e[0])(t.element)}render(){return k}}function Pe(t,e){let i=0;const s=new Map;let o,n,a=new Map,r=0;const l=[],c=Promise.resolve(),d={},h=function(t){return class extends ot{update(e,i){const s=e.element,o=i[0],n=i[1],a=i[2];for(const e of n)if(void 0!==e){const i=t.get(o);let n;if(i)for(const t of i)if(t.componentAction.create===e){n=t;break}if(n&&n.element===s)n.props=a;else{if(n&&n.created&&n.element!==s){if(n.element.isConnected)return n.element=s,void(n.props=a);n.componentAction.destroy(n.element,n.props),t.set(o,i.filter(t=>t!==n))}void 0!==s.vido&&delete s.vido;const r={instance:o,componentAction:{create:e,update(t,e){},destroy(t,e){}},element:s,props:a,created:!1};let l=[];t.has(o)&&(l=t.get(o)),l.push(r),t.set(o,l)}}}render(t,e,i){return k}}}(a);class u{constructor(t){this.instance=t}create(t,e){const i=st(h);return()=>i(this.instance,t,e)}}const m=function(t,e,i){return class{constructor(t,e,i={}){this.destroyed=!1,this.instance=t,this.name=e.name,this.vidoInstance=e,this.props=i,this.destroy=this.destroy.bind(this),this.update=this.update.bind(this),this.change=this.change.bind(this),this.html=this.html.bind(this)}destroy(){this.destroyed||(this.vidoInstance.debug&&(console.groupCollapsed(`destroying component ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.vidoInstance.destroyComponent(this.instance,this.vidoInstance),this.destroyed=!0)}update(s=void 0){return this.vidoInstance.debug&&(console.groupCollapsed(`updating component ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.vidoInstance.updateTemplate(s)}change(s,o={}){this.vidoInstance.debug&&(console.groupCollapsed(`changing component ${this.instance}`),console.log(i({props:this.props,newProps:s,components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd());const n=t.get(this.instance);n&&n.change(s,o)}html(e={}){const i=t.get(this.instance);if(i&&!i.destroyed)return i.update(e,this.vidoInstance)}_getComponents(){return t}_getActions(){return e}}}(s,a,we),f=function(t,e,i){return class{constructor(t,e,i){this.destroyed=!1,this.destroying=!1,this.instance=t,this.vidoInstance=e,this.renderFunction=i,this.destroy=this.destroy.bind(this),this.update=this.update.bind(this),this.change=this.change.bind(this)}destroy(){if(!this.destroyed){this.vidoInstance.debug&&(console.groupCollapsed(`component destroy method fired ${this.instance}`),console.log(i({props:this.vidoInstance.props,components:t.keys(),destroyable:this.vidoInstance.destroyable,actionsByInstance:e})),console.trace(),console.groupEnd()),this.content&&"function"==typeof this.content.destroy&&this.content.destroy();for(const t of this.vidoInstance.destroyable)t();this.vidoInstance.onChangeFunctions.length=0,this.vidoInstance.destroyable.length=0,this.vidoInstance.destroying=!1,this.destroying=!1,this.vidoInstance.destroyed=!0,this.destroyed=!0,this.vidoInstance.update()}}update(s={}){return this.vidoInstance.debug&&(console.groupCollapsed(`component update method fired ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.renderFunction(s)}change(s,o={leave:!1}){const n=s;this.vidoInstance.debug&&(console.groupCollapsed(`component change method fired ${this.instance}`),console.log(i({props:n,components:t.keys(),onChangeFunctions:this.vidoInstance.onChangeFunctions,changedProps:s,actionsByInstance:e})),console.trace(),console.groupEnd());for(const t of this.vidoInstance.onChangeFunctions)t(s,o)}}}(s,a,we);class g{constructor(i="",o=""){this.instance="",this.name="",this.destroyable=[],this.destroyed=!1,this.destroying=!1,this.onChangeFunctions=[],this.debug=!1,this.state=t,this.api=e,this.lastProps={},this.html=T,this.svg=L,this.lithtml=et,this.directive=st,this.asyncAppend=At,this.asyncReplace=It,this.cache=Mt,this.classMap=Ft,this.styleMap=jt,this.StyleMap=ae,this.guard=Rt,this.live=Et,this.ifDefined=Gt,this.repeat=Lt,this.unsafeHTML=Ot,this.until=Vt,this.when=Jt,this.choose=Ut,this.map=Xt,this.join=Zt,this.range=Kt,this.templateContent=qt,this.unsafeSVG=te,this.ref=se,this.schedule=me,this.getElement=st(xe),this.actionsByInstance=()=>{},this.detach=le,this.PointerAction=ue,this.Action=ce,this.Slots=ye,this._components=s,this._actions=a,this.instance=i,this.reuseComponents=this.reuseComponents.bind(this),this.onDestroy=this.onDestroy.bind(this),this.onChange=this.onChange.bind(this),this.update=this.update.bind(this),this.destroyComponent=this.destroyComponent.bind(this);for(const t in d)this[t]=d[t].bind(this);this.name=o,this.Actions=new u(i)}static addMethod(t,e){d[t]=e}onDestroy(t){this.destroyable.push(t)}onChange(t){this.onChangeFunctions.push(t)}update(t){return this.updateTemplate(t)}reuseComponents(t,e,i,s,o=!0,n=!1){const a=[],r=t.length,l=e.length;let c=!1;!o||void 0!==e&&0!==e.length||(c=!0);let d=0;if(r<l){let o=l-r;for(;o;){const n=e[l-o],r=this.createComponent(s,i(n));t.push(r),a.push(r),o--}}else if(r>l){let e=r-l;if(o)c=!0,d=r-e;else{for(;e;){const i=r-e;a.push(t[i]),t[i].destroy(),e--}t.length=l}}let h=0;n&&console.log("modified components",a),n&&console.log("current components",t),n&&console.log("data array",e);for(const s of t){const t=e[h];n&&console.log(`reuse components data at '${h}'`,t),s&&!a.includes(s)&&(n&&console.log("getProps fn result",i(t)),s.change(i(t),{leave:c&&h>=d})),h++}}createComponent(t,e={}){const o=t.name+":"+i++;let n;n=new g(o,t.name);const r=new m(o,n,e),l=new f(o,n,t(n,e));return s.set(o,l),l.change(e),n.debug&&(console.groupCollapsed(`component created ${o}`),console.log(we({props:e,components:s.keys(),actionsByInstance:a})),console.trace(),console.groupEnd()),r}destroyComponent(t,e){e.debug&&(console.groupCollapsed(`destroying component ${t}...`),console.log(we({components:s.keys(),actionsByInstance:a})),console.trace(),console.groupEnd()),e.destroying=!0;const i=s.get(t);if(i&&!i.destroyed){if(i.destroying=!0,a.has(t))for(const e of a.get(t))"function"==typeof e.componentAction.destroy&&e.componentAction.destroy(e.element,e.props);a.delete(t),i.destroy(),s.delete(t),t===o&&this.render(),e.debug&&(console.groupCollapsed(`component destroyed ${t}`),console.log(we({components:s.keys(),actionsByInstance:a})),console.trace(),console.groupEnd())}else console.warn(`No component to destroy! [${t}]`)}executeActions(){for(const t of a.values()){for(const e of t)if(e.created)e.element.vido=e.props,"function"==typeof e.componentAction.update&&e.isActive()&&e.componentAction.update(e.element,e.props);else{const t=s.get(e.instance);if(!t||t.destroyed||t.destroying)continue;e.isActive=function(){return t&&!1===t.destroyed&&!1===t.destroying};const i=e.componentAction,o=i.create;if(void 0!==o){let t;t=o.prototype&&(o.prototype.isAction||o.prototype.update||o.prototype.destroy)||o.isAction?new o(e.element,e.props):o(e.element,e.props),e.created=!0,void 0!==t&&("function"==typeof t?i.destroy=t:("function"==typeof t.update&&(i.update=t.update.bind(t)),"function"==typeof t.destroy&&(i.destroy=t.destroy.bind(t))))}}for(const e of t)e.element.vido=e.props}}updateTemplate(t=void 0){return t&&l.push(t),new Promise(t=>{const e=++r,i=this;c.then(function(){if(e===r){r=0,i.render();for(const t of l)t();l.length=0,t(null)}})})}createApp(t){n=t.element;const e=this.createComponent(t.component,t.props);return o=e.instance,this.render(),e}render(){const t=s.get(o);t&&!t.destroyed?(tt(t.update(),n),this.executeActions()):n&&tt(null,n)}}return new g}Pe.lithtml=et,Pe.Action=ce,Pe.Directive=ot,Pe.StyleMap=ae,Pe.PointerAction=ue,Pe.Slots=ye;const $e={schedule:me,detach:le,styleMap:jt,classMap:Ft,asyncAppend:At,asyncReplace:It,cache:Mt,guard:Rt,live:Et,ifDefined:Gt,repeat:Lt,unsafeHTML:Ot,until:Vt,when:Jt,choose:Ut,map:Xt,join:Zt,range:Kt,templateContent:qt,unsafeSVG:te,ref:se};Pe.directives=$e;const De=et;var Ce=Object.freeze({__proto__:null,Action:ce,AsyncReplaceDirective:Wt,Directive:ot,PartType:it,PointerAction:ue,Slots:ye,StyleMap:ae,UnsafeHTMLDirective:zt,UntilDirective:Ht,_$LH:q,asyncAppend:At,asyncReplace:It,cache:Mt,choose:Ut,classMap:Ft,createRef:()=>new ee,default:Pe,detach:le,directive:st,guard:Rt,helpers:be,html:T,ifDefined:Gt,join:Zt,lit:De,lithtml:et,map:Xt,mathml:z,noChange:O,nothing:k,range:Kt,ref:se,render:tt,repeat:Lt,schedule:me,styleMap:jt,svg:L,templateContent:qt,unsafeHTML:Ot,unsafeSVG:te,until:Vt,when:Jt});
/**
* Gantt-Schedule-Timeline-Calendar Time api
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class We{constructor(s,o){this.utcMode=!1,this.unsubs=[],this.currentDateLastCheck=0,this.state=s,this.api=o,this.dayjs=t,this.dayjs.extend(e),this.dayjs.extend(i),this.unsubs.push(s.subscribe("config.utcMode",t=>{this.utcMode=t})),this.unsubs.push(s.subscribe("config.locale",t=>{if(!t.name)throw new Error("Locale must have a name property.");this.locale=t,this.dayjs.locale(this.locale,null,!0)}))}destroy(){for(const t of this.unsubs)t()}date(e=void 0){return this.utcMode?t.utc(e).locale(this.locale.name):e?t(e).locale(this.locale.name):t().locale(this.locale.name)}recalculateTime(){this.api.main.recalculateTimes([{name:"all"}])}recalculateFromTo(t,e=!1){const i=t.period;if((t=Object.assign({},t)).from=+t.from,t.to=+t.to,t.fromDate=this.date(t.from).startOf(i),t.from=t.fromDate.valueOf(),t.toDate=this.date(t.to).endOf(i),t.to=t.toDate.valueOf(),!t.autoExpandTimeFromItems||t.calculatedZoomMode)return t;let s=Number.MAX_SAFE_INTEGER,o=0;const n=this.state.get("config.chart.items");if(Object.keys(n).length>0&&(0===t.from||0===t.to||e)){for(const t in n){const e=n[t];e.time.start<s&&e.time.start&&(s=e.time.start),e.time.end>o&&(o=e.time.end)}s<t.from&&(t.fromDate=this.date(s).startOf(i),t.from=t.fromDate.valueOf()),o>t.to&&(t.toDate=this.date(o).endOf(i),t.to=t.toDate.valueOf())}return t}getCenter(t){return t.leftGlobal+Math.round((t.rightGlobal-t.leftGlobal)/2)}isInCurrentView(t,e=this.state.get("$data.chart.time")){const i=t.valueOf();return!(i<e.leftGlobal||i>e.rightGlobal)}recalculateDatesWidths(t,e=this.state.get("$data.chart.time")){if(!e.timePerPixel)throw new Error("[gantt-schedule-timeline-calendar] No timePerPixel");for(const i of t){if(!i.leftGlobal||!i.rightGlobal)throw new Error("[gantt-schedule-timeline-calendar] No date leftGlobal or rightGlobal.");i.width=(i.rightGlobal+1-i.leftGlobal)/e.timePerPixel}return t}recalculateDatesPositions(t,e=this.state.get("$data.chart.time"),i=!0,s=!1){let o=0;if(i)for(const i of t){if(i.leftGlobal>=e.leftGlobal)break;if(isNaN(i.width))throw new Error("[gantt-schedule-timeline-calendar] NaN date width.");o-=i.width}for(let i of t){if(s&&(i=this.api.mergeDeep({},i)),i.leftPx=o,i.rightPx=o+i.width,isNaN(i.leftPx)||isNaN(i.rightPx))throw new Error("[gantt-schedule-timeline-calendar] Date leftPx or rightPx is a NaN.");i.currentView&&(i.currentView.leftPx=i.leftPx-e.leftPx,i.currentView.rightPx=i.rightPx-e.leftPx,i.currentView.width=i.currentView.rightPx-i.currentView.leftPx),o+=i.width}return t}setDatesCacheLevel(t,e,i=this.state.get("$data.chart.time")){if(!e.length)return;i.datesCache||(i.datesCache={timePerPixel:0,levels:[]}),i.datesCache.timePerPixel=i.timePerPixel,i.datesCache.levels[t]||(i.datesCache.levels[t]={leftTime:0,rightTime:0,dates:[]});const s=i.datesCache.levels[t];s.leftTime=e[0].leftGlobal,s.rightTime=e[e.length-1].rightGlobal,s.dates=[...e]}addDatesToCacheLevel(t,e,i=this.state.get("$data.chart.time")){if(!e.length)return;if(!i.datesCache)return;if(i.datesCache.timePerPixel!==i.timePerPixel)return e;const s=e[0],o=e[e.length-1],n=i.datesCache.levels[t];if(!n)return e;if(n.leftTime<=s.leftGlobal&&n.rightTime>=o.rightGlobal)return n.dates;if(n.dates.length>=1e6)throw new Error("[gantt-schedule-timeline-calendar] To many dates.");const a=[];if(s.leftGlobal<n.leftTime){for(const t of e){if(!(t.leftGlobal<n.leftTime))break;a.push(t)}n.leftTime=a[0].leftGlobal}for(const t of n.dates)a.push(t);if(o.rightGlobal>n.rightTime){for(const t of e)t.rightGlobal>n.rightTime&&a.push(t);n.rightTime=a[a.length-1].rightGlobal}return n.dates=a,n.dates}isLevelDateInCache(t,e,i=this.state.get("$data.chart.time")){if(!i.datesCache)return!1;if(i.datesCache.timePerPixel!==i.timePerPixel)return!1;const s=i.datesCache.levels[t];return!(!s||!s.dates.length)&&(e>=s.leftTime&&e<=s.rightTime)}getLevelDatesFromCache(t,e,i,s=this.state.get("$data.chart.time")){if(s.datesCache.timePerPixel!==s.timePerPixel)return[];const o=s.datesCache.levels[t];if(!o)return[];if(!(e>=o.leftTime&&i<=o.rightTime))return[];let n=0,a=0,r=!1;const l=o.dates.length;for(;a<l;a++){const t=o.dates[a];if(t.rightGlobal>=e&&(r=!0),t.rightGlobal>=i)break;r||n++}return{[Symbol.iterator](){let t=n;return{next:()=>t<=a?{value:o.dates[t++],done:!1}:(t=n,{done:!0})}},length:a-n+1}}getLevelDateFromCache(t,e,i=this.state.get("$data.chart.time")){if(!this.isLevelDateInCache(t,e,i))return null;for(const s of i.datesCache.levels[t].dates)if(s.rightGlobal>=e)return s;return null}getAllLevelDatesFromCache(t,e=this.state.get("$data.chart.time")){return e.datesCache.levels[t].dates}findOrCreateMainDateAtTime(t,e=this.state.get("$data.chart.time")){if(this.isLevelDateInCache(e.level,t,e))return this.getLevelDateFromCache(e.level,t,e);let i=[];e.datesCache.levels[e.level]&&(i=e.datesCache.levels[e.level].dates),i=this.addMissingDates(i,this.date(t),e);for(const e of i)if(e.rightGlobal>=t)return e;return null}addMissingDates(t,e,i=this.state.get("$data.chart.time"),s=!0){if(!t.length)return[];const o=t[0],n=t[t.length-1];if(!(e.valueOf()<o.leftGlobal||e.valueOf()>n.rightGlobal))return t;if(this.isLevelDateInCache(i.level,e.valueOf(),i))return this.getAllLevelDatesFromCache(i.level,i);const a=t.length;let r=t;if(s){r=new Array(a);for(let e=0;e<a;e++)r[e]=this.api.mergeDeep({},t[e])}const l=this.state.get(`config.chart.calendarLevels.${i.level}`),c=this.getCurrentFormatForLevel(l,i);let d=1;if("number"==typeof c.periodIncrement&&(d=c.periodIncrement),e.valueOf()<o.leftGlobal){if("function"==typeof c.periodIncrement)return t;const n=o.leftGlobalDate.subtract(1,"ms");let a=o.leftGlobalDate.subtract(d,i.period).startOf(i.period);for(;e.valueOf()<a.valueOf();)a=a.subtract(d,i.period).startOf(i.period);let l=[];do{l=this.generatePeriodDates({leftDate:a,rightDate:n,period:i.period,level:this.state.get(`config.chart.calendarLevels.${i.level}`),levelIndex:i.level,callOnDate:!0,callOnLevelDates:!0,time:i}),a=a.subtract(1,i.period)}while(!l.length||l[0].leftGlobal>e.valueOf());return l=l.filter(t=>!r.find(e=>e.leftGlobal===t.leftGlobal)),t=[...l,...r],t=this.recalculateDatesWidths(t,i),t=this.recalculateDatesPositions(t,i,!0,s),this.addDatesToCacheLevel(i.level,t,i)}if(e.valueOf()>n.rightGlobal){let o=n.rightGlobalDate.add(d,i.period).endOf(i.period);for(;e.valueOf()>o.valueOf();)o=o.add(d,i.period).endOf(i.period);let a=this.generatePeriodDates({leftDate:n.rightGlobalDate.add(1,"ms"),rightDate:o,period:i.period,level:this.state.get(`config.chart.calendarLevels.${i.level}`),levelIndex:i.level,callOnDate:!0,callOnLevelDates:!0,time:i});return a=a.filter(t=>!r.find(e=>e.leftGlobal===t.leftGlobal)),t=[...r,...a],t=this.recalculateDatesWidths(t,i),t=this.recalculateDatesPositions(t,i,!0,s),this.addDatesToCacheLevel(i.level,t,i)}return r}getGlobalOffsetPxFromDates(t,e=!0,i=this.state.get("$data.chart.time"),s=void 0){const o=t.valueOf();if(!i.allDates||0===i.allDates.length)return-100;if(void 0===s&&(s=i.allDates[i.level]),e&&(s=this.addMissingDates(s,t,i)),!s||0===s.length)return-1;let n;for(let t=0,e=s.length;t<e;t++){const e=s[t];if(o<=e.rightGlobal+1){n=e;break}}return n?o<n.leftGlobal?n.leftPx:n.rightPx-(n.rightGlobal-o)/i.timePerPixel:o<=i.leftGlobal?0:o>=i.rightGlobal?i.totalViewDurationPx+(o-i.rightGlobal+1)/i.timePerPixel:-1}getViewOffsetPxFromDates(t,e=!0,i=this.state.get("$data.chart.time"),s=void 0,o=!0){s||(s=i.allDates[i.level]),o&&(s=this.addMissingDates(s,t,i));const n=this.getDatesDiffPx(i.leftGlobalDate,t,i,!0,s);return e?this.limitOffsetPxToView(n):n}limitOffsetPxToView(t,e=this.state.get("$data.chart.time")){if(t<0)return 0;if(!e.levels.length)return e.width;const i=e.levels[e.level];if(!i.length)return e.width;const s=i[i.length-1];return t>s.currentView.rightPx?s.currentView.rightPx:t}findDateAtViewOffsetPx(t,e){return e.find(e=>e.currentView.rightPx>=t)}findDateIndex(t,e){let i=0;for(const s of e){if(s.rightGlobal>=t)return i;i++}return-1}findDateAtTime(t,e=void 0){if(!e){const t=this.state.get("$data.chart.time");e=t.allDates[t.level]}return e.find(e=>e.rightGlobal>=t)}getMainDateFromRelativePosition(t,e){const i=t.leftPx+e,s=this.state.get("$data.chart.time"),o=s.allDates[s.level];for(const t of o)if(t.rightPx>i)return t}getTimeFromOffsetPx(t,e=!0,i=this.state.get("$data.chart.time"),s=void 0){let o=t;e&&(o+=i.leftPx),s||(s=i.allDates[i.level]);const n=this.state.get(`config.chart.calendarLevels.${i.level}`),a=this.getCurrentFormatForLevel(n,i);let r=1;if("number"==typeof a.periodIncrement&&(r=a.periodIncrement),o<0){if("function"==typeof a.periodIncrement)return i.from;let t,e=i.fromDate.subtract(r,i.period).startOf(i.period),s=0;for(let n=0;n<1e3;n++){const n=this.generatePeriodDates({leftDate:e,rightDate:e.add(r,i.period).subtract(1,"ms"),period:i.period,time:i,level:this.state.get(`config.chart.calendarLevels.${i.level}`),levelIndex:i.level,callOnDate:!0,callOnLevelDates:!0,expandIfMissing:!1});if(n.length&&(t=n[0],s-=t.width,s<=o))return t.leftGlobal+(o-s)*i.timePerPixel;e=e.subtract(r,i.period).startOf(i.period)}}else if(o>i.totalViewDurationPx){let t,e=i.toDate.add(1,i.period).startOf(i.period),s=i.totalViewDurationPx;for(let n=0;n<1e3;n++){const n=this.generatePeriodDates({leftDate:e,rightDate:e.add(r,i.period).subtract(1,"ms"),period:i.period,time:i,level:this.state.get(`config.chart.calendarLevels.${i.level}`),levelIndex:i.level,callOnDate:!0,callOnLevelDates:!0,expandIfMissing:!1});if(n.length&&(t=n[0],s+=t.width,s>o))return t.rightGlobal+1-(s-o)*i.timePerPixel;e=e.add(r,i.period).startOf(i.period)}}for(let t=0,e=s.length;t<e;t++){const e=s[t];if(e.rightPx>o){const t=(e.rightPx-o)*i.timePerPixel;return e.rightGlobal+1-t}}const l=s[s.length-1];return l.rightGlobal+1-(l.rightPx-o)*i.timePerPixel}getCurrentFormatForLevel(t,e){return t.find(t=>+e.zoom<=+t.zoomTo)}alignLevelToMain(t,e,i=this.state.get("$data.chart.time")){if(t===i.level)return e;if(!this.state.get("config.chart.time.alignLevelsToMain"))return e;const s=i.allDates[i.level];if(!s||!s.length)return e;if(!e||!e.length)return e;const o=e.length;for(let t=0;t<o;t++){const o=e[t];let n,a=!1,r=0;for(const t of s){if(t.rightGlobal>=o.leftGlobal){if(!a)if(t.leftGlobal>=o.leftGlobal)o.leftGlobal=t.leftGlobal,o.leftGlobalDate=this.date(o.leftGlobal),o.leftPx=t.leftPx;else{const e=(t.rightGlobal-o.leftGlobal)/i.timePerPixel;r=-(t.width-e)}a=!0}if(t.leftGlobal>o.rightGlobal)break;a&&(r+=t.width,n=t)}if(n)if(n.rightGlobal<=o.rightGlobal)o.rightGlobal=n.rightGlobal,o.rightGlobalDate=this.date(o.rightGlobal),o.width=r,o.rightPx=o.leftPx+o.width;else{const t=(n.rightGlobal-o.rightGlobal)/i.timePerPixel;o.width=r-t,o.rightPx=o.leftPx+o.width}}return e}stopCheckingCurrentDates(){this.checkCurrentDateTimeoutId&&clearTimeout(this.checkCurrentDateTimeoutId)}checkCurrentDates(t=!1,e=this.state.get("$data.chart.time")){const i=this.date().valueOf(),s=e.checkCurrentDateInterval;if(this.stopCheckingCurrentDates(),t&&(this.checkCurrentDateTimeoutId=setTimeout(()=>{this.checkCurrentDates(t,e)},s)),i-this.currentDateLastCheck<s)return;const o=e.allDates;let n=!1;for(const t of o){const e=t.length;for(let s=0;s<e;s++){const o=t[s],a=o.current;o.current=!1,o.previous=!1,o.next=!1,o.leftGlobal<=i&&o.rightGlobal>=i&&(!0!==a&&(n=!0),o.current=!0,s>0&&(t[s-1].previous=!0),s+1<e&&(t[s+1].next=!0))}}this.currentDateLastCheck=i,n&&this.state.update("$data.chart.time.levels",t=>t,{data:"current-time"}),this.api.render()}getDSTDiffForLevel(t,e,i,s=this.state.get("$data.chart.time")){const o=this.api.time.getLevelDatesFromCache(t,e,i,s);let n=0;for(const t of o)t.DST.diffMs&&e<=t.DST.afterTime&&i>t.DST.afterTime&&(n+=t.DST.diffMs);return n}setDatesDST(t){for(const e of t){const t=e.rightGlobal-e.leftGlobal,i=e.rightGlobalDate.utc(!0).valueOf()-e.leftGlobalDate.utc(!0).valueOf();if(t!==i){e.DST={diffMs:t-i,afterTime:0,afterDate:null};for(let t=0;t<9216;t++)if(e.leftGlobalDate.add(t,"hour").hour()!==e.leftGlobalDate.utc(!0).add(t,"hour").hour()){e.DST.afterDate=e.leftGlobalDate.add(t,"hour").subtract(1,"ms"),e.DST.afterTime=e.DST.afterDate.valueOf();break}}}return t}_generatePeriodDates(t){const e=[];t=Object.assign({},t);const{datesCount:i,rightDate:s,period:o,level:n,levelIndex:a,time:r,originalLeftDate:l,format:c}=t;let d=t.leftDate;const h=this.date().valueOf();for(let t=0;t<i;t++){let t=c.periodIncrement||1;"function"==typeof t&&(t=t({currentDates:e,date:d,leftDate:l,rightDate:s,period:o,level:n,levelIndex:a,time:r,vido:this.api.vido,api:this.api}));const i=d.add(t-1,o).endOf(o),u=d.valueOf()<=h&&i.valueOf()>=h,m={id:`gstcid-${d.valueOf()}`,leftGlobal:d.valueOf(),leftGlobalDate:d,rightGlobalDate:i,rightGlobal:i.valueOf(),width:0,leftPx:0,rightPx:0,period:o,formatted:null,current:u,previous:!1,next:!1,periodIncrementedBy:t,DST:{diffMs:0,afterTime:0,afterDate:null}};u&&e.length&&(e[e.length-1].previous=!0),e.length&&e[e.length-1].current&&(m.next=!0);const f=m.rightGlobal+1-m.leftGlobal;m.width=f/r.timePerPixel,e.push(m),d=d.add(t||1,o)}return this.setDatesDST(e)}generatePeriodDates({leftDate:t,rightDate:e,period:i,level:s,levelIndex:o,time:n,callOnDate:a,callOnLevelDates:r,expandIfMissing:l=!0}){if(!n.timePerPixel)return[];const c=this.getCurrentFormatForLevel(s,n);t=t.startOf(i),e=e.endOf(i);const d=Math.ceil(e.diff(t,i,!0)),h=t.clone();let u=this._generatePeriodDates({datesCount:d,leftDate:t,rightDate:e,period:i,level:s,levelIndex:o,time:n,originalLeftDate:h,format:c});if(a){const t=[];for(let e=0;e<u.length;e++){let i=u[e];if(i){for(let t=0,e=n.onDate.length;t<e;t++)i=n.onDate[t]({date:i,format:c,time:n,level:s,levelIndex:o});i&&t.push(i)}}u=t}if(r)for(let t=0,e=n.onLevelDates.length;t<e;t++)u=n.onLevelDates[t]({dates:u,format:c,time:n,level:s,levelIndex:o});if((!u.length||u[u.length-1].rightGlobal<e.valueOf())&&l){let l=this._generatePeriodDates({datesCount:d+100,leftDate:t,rightDate:e,period:i,level:s,levelIndex:o,time:n,originalLeftDate:h,format:c});if(a){const t=[];for(let e=0;e<l.length;e++){let i=l[e];if(i){for(let t=0,e=n.onDate.length;t<e;t++)i=n.onDate[t]({date:i,format:c,time:n,level:s,levelIndex:o});i&&t.push(i)}}l=t}if(r)for(let t=0,e=n.onLevelDates.length;t<e;t++)l=n.onLevelDates[t]({dates:l,format:c,time:n,level:s,levelIndex:o});const u=[];for(const t of l)if(u.push(t),t.rightGlobal>=e.valueOf())return u}this.addDatesToCacheLevel(o,u,n);const m=[];for(const t of u)if(m.push(t),t.rightGlobal>=e.valueOf())return m;return m}getDatesDiffPx(t,e,i,s=!0,o=void 0){let n=e.valueOf(),a=t.valueOf();if(a===n)return 0;let r,l,c=0,d=!1;if(n<a){const i=t;t=e,a=n,n=(e=i).valueOf(),d=!0}if(void 0===o){if(!i.allDates||!i.allDates.length||!i.allDates[i.level])return 0;o=i.allDates[i.level]}if(0===o.length)return 0;if(this.isLevelDateInCache(i.level,a,i)?o=this.getAllLevelDatesFromCache(i.level,i):a<o[0].leftGlobal&&(o=this.addMissingDates(o,t,i)),this.isLevelDateInCache(i.level,n,i))o=this.getAllLevelDatesFromCache(i.level,i);else{n>o[o.length-1].rightGlobalDate.clone().valueOf()&&(o=this.addMissingDates(o,e,i))}this.addDatesToCacheLevel(i.level,o,i);let h=!1,u=0;for(const t of o)if(t.rightGlobal+1>=a&&!h&&(h=!0,l=t),h&&(c+=t.width),t.rightGlobal+1>=n){r=t,u=t.width;break}if(s){let t=a-l.leftGlobal;a<l.leftGlobal&&(t=0);let e=r.rightGlobal+1-n;r.leftGlobal>n&&(e=r.rightGlobal+1-r.leftGlobal);const s=(e+t)/i.timePerPixel;return d?-(c-s):c-s}return c-=u,d?-c:c}getDatesDiffMs(t,e,i,s=!0,o=void 0){if(t.valueOf()===e.valueOf())return 0;let n,a,r=0,l=!1;if(e.valueOf()<t.valueOf()){const i=t;t=e,e=i,l=!0}if(void 0===o){if(!i.allDates||!i.allDates.length||!i.allDates[i.level])return 0;o=i.allDates[i.level]}if(0===o.length)return 0;if(this.isLevelDateInCache(i.level,t.valueOf(),i)?o=this.getAllLevelDatesFromCache(i.level,i):t.valueOf()<o[0].leftGlobal&&(o=this.addMissingDates(o,t,i)),this.isLevelDateInCache(i.level,e.valueOf(),i))o=this.getAllLevelDatesFromCache(i.level,i);else{const t=o[o.length-1].rightGlobalDate.clone();e.valueOf()>t.valueOf()&&(o=this.addMissingDates(o,e,i))}this.addDatesToCacheLevel(i.level,o,i);let c=!1,d=0;for(const i of o)if(i.rightGlobal+1>=t.valueOf()&&!c&&(c=!0,a=i),c&&(r+=i.rightGlobal+1-i.leftGlobal),i.rightGlobal+1>=e.valueOf()){n=i,d=i.rightGlobal+1-i.leftGlobal;break}if(s){let i=t.valueOf()-a.leftGlobal;t.valueOf()<a.leftGlobal&&(i=0);let s=n.rightGlobal+1-e.valueOf();n.leftGlobal>e.valueOf()&&(s=n.rightGlobal+1-n.leftGlobal);const o=s+i;return l?-(r-o):r-o}return r-=d,l?-r:r}addTimeFromDates(t,e,i=this.state.get("$data.chart.time")){if(!i.allDates||!i.allDates.length||!i.allDates[i.level])return t+e;if(!e)return t;let s=this.getAllLevelDatesFromCache(i.level,i);const o=this.date(t);s=this.addMissingDates(s,o,i,!0);let n=this.findDateIndex(t,s),a=t-s[n].leftGlobal;a<0&&(a=0);let r=0;if(e>0){for(;r<e;){const t=s[n];if(r+=t.rightGlobal+1-t.leftGlobal,a&&(r-=a,a=0),r>=e)break;n++,s[n]||(s=this.addMissingDates(s,t.leftGlobalDate.add(1,i.period),i,!0))}return s[n].rightGlobal+1-(r-e)}for(;r>e;){let t=s[n];if(r-=a,a&&(a=0),r<=e)break;if(n--,n<0&&(s=this.addMissingDates(s,t.leftGlobalDate.subtract(1,i.period),i,!0),n=0),t=s[n],r-=t.rightGlobal+1-t.leftGlobal,r<=e)break}return s[n].leftGlobal+(-r+e)}getLeftViewDate(t=this.state.get("$data.chart.time")){if(!t.levels||!t.levels.length)return null;const e=t.levels[t.level];return e.length?e[0]:null}getRightViewDate(t=this.state.get("$data.chart.time")){if(!t.levels||!t.levels.length||!t.levels[t.level])return null;const e=t.levels[t.level];return e.length?e[e.length-1]:null}getLowerPeriod(t){switch(t){case"year":return"month";case"month":case"week":return"day";case"day":return"hour";case"hour":return"minute";case"minute":return"second";case"second":return"millisecond";default:return t}}getHigherPeriod(t){switch(t){case"month":return"year";case"week":case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second";default:return t}}}
/**
* Gantt-Schedule-Timeline-Calendar IDApi
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/var Ie=new class{constructor(){this.GSTCID=this.GSTCID.bind(this),this.isGSTCID=this.isGSTCID.bind(this),this.sourceID=this.sourceID.bind(this)}GSTCID(t){return this.isGSTCID(t)?t:`gstcid-${t}`}isGSTCID(t){return String(t).startsWith("gstcid-")}sourceID(t){return this.isGSTCID(t)?t.substring(7):t}};
/**
* Gantt-Schedule-Timeline-Calendar Slots
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class Ae extends ye{constructor(t,e,i){super(e,i),this.subs=[],this.name=t,this.subs.push(e.state.subscribe(`config.slots.${t}`,this.setComponents,{queue:!0}))}destroy(){this.subs.forEach(t=>t()),super.destroy()}getName(){return this.name}}function Se(t,e,i){return new Ae(t,e,i)}
/**
* Gantt-Schedule-Timeline-Calendar helpers
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/const Me="gstc";function _e(t,e=""){let i=`${Me}__${t}`;return t===Me&&(i=Me),e?`${i} ${i}--${e.replace(":","-")}`:i}function Re(t,e){let i=`${Me}__${t}`;return t===Me&&(i=Me),`${i}--${e}`}
/**
* Api functions
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/let Ge=0;const Te=new Map;function Le(t){return Te.get(t.apiId)}class ze{constructor(t){this.apiId=0,this.name=Me,this.debug=!1,this.plugins={},this.iconsCache={},this.unsubscribes=[],this.mutedMethods=new Set,this.mergeDeep=null,this.generateSlots=Se,this.getClass=_e,this.getId=Re,this.GSTCID=Ie.GSTCID,this.isGSTCID=Ie.isGSTCID,this.sourceID=Ie.sourceID,this.allActions=[],this.keysToKeep=["id","parents","children","allChildren","parentId"],this.apiId=++Ge,Te.set(this.apiId,{rowsDataWithParentsExpanded:[],rowsIdsWithParentsExpanded:[],rowsWithParentsExpanded:[],rowsWithParentsExpandedAsMap:new Map,rowsPositionsMap:{id:"",dataIndex:0,keys:[]},allRowsIds:[],allRowsAsArray:[],rowsWithParentsExpandedDataIndexMap:new Map,itemsAsArray:[],itemsDataAsArray:[]}),this.state=t,this.time=new We(this.state,this),this.unsubscribes.push(this.state.subscribe("config.debug",t=>this.debug=t)),this.unsubscribes.push(this.state.subscribe("config.chart.items;",()=>this.resetRowsOverlappingCalculated())),this.unsubscribes.push(this.state.subscribe("config.chart.items.:itemId.time",t=>{var e;if(t.length){const i=this.getRowsData();if(!i)return;const s=this.state.get("config.chart.items");for(const o of t)if(null===(e=o.params)||void 0===e?void 0:e.itemId){const t=s[o.params.itemId];if(t){i[t.rowId].overlappingCalculated=!1}}}},{bulk:!0,bulkValue:!1})),this.debug&&(window.state=t)}schedule(t){let e=0;return function(...i){e||(e=requestAnimationFrame(function(){e=0,t(...i)}))}}render(){return this.vido.update()}getListenerPosition(t){for(const e of this.state.getListeners().values())for(const i of e.listeners)if(i[1].fn===t)return i[0]}setVido(t){this.vido=t}clone(t){return this.mergeDeep({},t)}setMergeDeep(t){this.mergeDeep=t}log(...t){this.debug&&console.log.call(console,...t)}getInitializedPlugins(){return this.state.get("$data.initializedPlugins")}pluginInitialized(t){this.getInitializedPlugins().add(t)}pluginDestroyed(t){this.getInitializedPlugins().delete(t)}clearPluginsPositions(){this.getInitializedPlugins().clear()}isPluginInitialized(t){return this.getInitializedPlugins().has(t)}getPluginPosition(t){return[...this.getInitializedPlugins()].indexOf(t)}getPluginsPositions(){const t={};let e=0;for(const i of this.getInitializedPlugins())t[i]=e++;return t}isPluginInitializedBefore(t,e){return this.getPluginPosition(t)<this.getPluginPosition(e)}getActions(t){this.allActions.includes(t)||this.allActions.push(t);let e=this.state.get("config.actions."+t);return void 0===e&&(e=[]),e.slice()}isItemHorizontallyInViewport(t,e=void 0,i=void 0){if(!e||!i){const t=this.state.get().config.chart.time;e=t.leftGlobal,i=t.rightGlobal}return t.time.start<=i&&t.time.end>=e}getChildrenLinkedItemsIds(t,e,i=[]){const s=e[t];if(s.linkedWith&&s.linkedWith.length){i.includes(t)||i.push(t);for(const t of s.linkedWith){if(i.includes(t))continue;i.push(t);const s=e[t];s.linkedWith&&s.linkedWith.length&&this.getChildrenLinkedItemsIds(t,e,i)}}return i}collectAllLinkedItems(){const t=[],e=new Map,i=this.getAllItemsAsArray(),s=this.getItemsData();for(const e of i){const i=e.id;void 0===s[i]?t.push(i):s[e.id].linkedWith=e.linkedWith||[]}if(t.length)throw new Error(`Items with id [${t.join(", ")}] does not exists in "$data.chart.items". TIP: For performance reasons, state is mutable, so try not to modify items from the "state.get" method before you copy them (with "gstc.api.clone(items)" for example).`);for(const t of i){const i=t.id;if(e.has(i))continue;const o=this.getChildrenLinkedItemsIds(i,s);s[i].linkedWith.splice(s[i].linkedWith.length,0,...o);const n=Array.from(new Set(s[i].linkedWith));s[i].linkedWith=n.filter(t=>t!==i),e.set(i,!0);for(const t of n)s[t].linkedWith=n.filter(e=>e!==t),e.set(t,!0)}}getChildrenDependantItemsIds(t,e,i=[]){if(t.dependant&&t.dependant.length)for(const s of t.dependant){if(i.includes(s))continue;i.push(s);const o=e[s];if(!o)throw new Error(`Dependant item not found [id:'${s}'] found in item [id:'${t.id}']`);o.dependant&&o.dependant.length&&this.getChildrenDependantItemsIds(o,e,i)}return i}calculateItemVerticalPosition(t,e=null,i=null,s=null){if(s||(s=this.getItem(t)),e||(e=this.getItemData(t)),i||(i=this.getRowData(s.rowId)),s.gap&&e||(this.prepareItem(s),e=this.getItemData(t)),!i)return e.position;const o=i.position.top+s.gap.top,n=e.position.rowTop+s.gap.top,a=this.getRowViewTop(i.id);let r=a+e.position.actualRowTop;return a===1/0?r=1/0:-1===a&&(r=-1),e.position.top=o,e.position.actualRowTop=n,e.position.viewTop=r,e.position}setItemDataOutOfView(t,e=this.state.get("$data.chart.time")){t.outOfView||(t.outOfView={left:!1,right:!1,whole:!1});const i=t.time.startDate.valueOf(),s=t.time.endDate.valueOf();return t.outOfView.left=i<e.leftGlobal||i>=e.rightGlobal,t.outOfView.right=s>e.rightGlobal||s<=e.leftGlobal,t.outOfView.whole=s<=e.leftGlobal||i>=e.rightGlobal,t}calculateItemHorizontalPosition(t,e=null,i=null,s=this.state.get("$data.chart.time"),o=null){if(o||(o=this.getItem(t)),e||(e=this.getItemData(t)),i||(i=this.getRowData(o.rowId)),!i)return e.position;const n=e.time.startDate.valueOf()===o.time.start?e.time.startDate:this.time.date(o.time.start),a=e.time.endDate.valueOf()===o.time.end?e.time.endDate:this.time.date(o.time.end),r=this.time.getViewOffsetPxFromDates(n,!1,s),l=this.time.getViewOffsetPxFromDates(a.add(1,"ms"),!1,s);e.position.left=r,e.position.actualLeft=this.time.limitOffsetPxToView(r,s),e.position.right=l,e.position.actualRight=this.time.limitOffsetPxToView(l,s),e.width=l-r;let c=this.time.getViewOffsetPxFromDates(a,!1,s);c===l&&(c-=1/s.timePerPixel),e.timeWidth=c-r,e.actualWidth=e.position.actualRight-e.position.actualLeft;const d=this.state.get("config.chart.item.minWidth");return"number"==typeof d&&e.actualWidth<d&&(e.actualWidth=d),this.setItemDataOutOfView(e,s),e.position}calculateItemPosition(t,e=null,i=null,s=this.state.get("$data.chart.time"),o=null){return e||(e=this.state.get(`$data.chart.items.${t}`)),o||(o=this.state.get(`config.chart.items.${t}`)),i||(i=this.state.get(`$data.list.rows.${o.rowId}`)),this.calculateItemHorizontalPosition(t,e,i,s,o),this.calculateItemVerticalPosition(t,e,i,o),e.position}getItemPosition(t,e,i,s,o){var n,a;return void 0===e&&(e=null),void 0===i&&(i=null),void 0===s&&(s=null===(a=null===(n=this.state.get().$data)||void 0===n?void 0:n.chart)||void 0===a?void 0:a.time),void 0===o&&(o=null),o||(o=this.getItem(t)),e||(e=this.getItemData(t)),0===e.position.left&&0===e.position.right&&this.calculateItemPosition(t,e,i,s,o),e.position}getRow(t){return this.state.get().config.list.rows[t]}getRows(t){if(!t.length)return[];const e=this.getAllRows(),i=[];for(const s of t)e[s]&&i.push(e[s]);return i}getAllRows(){var t,e;return null===(e=null===(t=this.state.get().config)||void 0===t?void 0:t.list)||void 0===e?void 0:e.rows}getVisibleRowsId(){var t,e;return null===(e=null===(t=this.state.get().$data)||void 0===t?void 0:t.list)||void 0===e?void 0:e.visibleRows}getRowsData(){var t,e;return null===(e=null===(t=this.state.get().$data)||void 0===t?void 0:t.list)||void 0===e?void 0:e.rows}setRowsData(t){this.state.update("$data.list.rows",t)}getRowData(t){return this.state.get().$data.list.rows[t]}setRowData(t,e){this.state.update(`$data.list.rows.${t}`,e)}getItem(t){return this.state.get().config.chart.items[t]}getItems(t=[],e=this.getAllItems()){const i=[];for(const s of t)e[s]&&i.push(e[s]);return i}getAllItemsAsArray(){return Le(this).itemsAsArray}getAllItemsDataAsArray(){return Le(this).itemsDataAsArray}getAllItems(){return this.state.get().config.chart.items}getItemData(t){const e=this.state.get();if(e.$data&&e.$data.chart&&e.$data.chart.items)return e.$data.chart.items[t]}getItemsData(){const t=this.state.get();if(t.$data&&t.$data.chart)return t.$data.chart.items}setItemData(t,e){this.state.update(`$data.chart.items.${t}`,t=>{for(const i in e)t[i]=e[i];return t})}setItemsData(t){this.state.update("$data.chart.items",t)}prepareDependantItems(t,e){return this.getChildrenDependantItemsIds(t,e).filter(e=>e!==t.id)}prepareItem(t,e=this.state.get().config.chart.item.height,i=this.getItemsData(),s=this.getAllItems(),o=this.getAllRows()){let n=t.id;if(n=String(n),t.id=n,i[t.id]||(i[t.id]={id:t.id,actualHeight:0,outerHeight:0,time:null,position:{left:0,actualLeft:0,right:0,actualRight:0,rowTop:t.rowTop||0,actualRowTop:t.actualRowTop||0,top:0,viewTop:0},outOfView:{left:!1,right:!1,whole:!1},width:-1,actualWidth:-1,timeWidth:-1,detached:!1,linkedWith:[],dependant:this.getChildrenDependantItemsIds(t,s)}),t.time||console.error("There is something wrong with this item.",t),"number"!=typeof t.time.start||"number"!=typeof t.time.end)throw new Error('[gantt-schedule-timeline-calendar] Item "time.start" and "time.end" values should be a number (unix epoch milliseconds).');const a=t.rowId;if("string"!=typeof a)throw new Error('[gantt-schedule-timeline-calendar] Item "rowId" should be a string.');if(!a.startsWith("gstcid-"))throw new Error('[gantt-schedule-timeline-calendar] Item "rowId" should start with "gstcid-".');if(!o[a])throw new Error(`[gantt-schedule-timeline-calendar] Row for item "${t.id}" does not exists ("${a}"). TIP: Try updating the rows first to make sure the rows for the items exist.`);t.time.start=+t.time.start,t.time.end=+t.time.end,t.id=String(t.id);const r=this.state.get().config.chart.item;"number"!=typeof t.height&&(t.height=e),i[t.id].time=function(t,e,i){let s,o;return{get startDate(){return s||(s=i.time.date(t)),s},get endDate(){return o||(o=i.time.date(e)),o},set startDate(e){s=e,t=e.valueOf()},set endDate(t){o=t,e=t.valueOf()}}}(t.time.start,t.time.end,this),i[t.id].actualHeight=t.height,void 0===t.overlap&&(t.overlap=r.overlap),"number"!=typeof t.top&&(t.top=0),t.gap||(t.gap={}),"number"!=typeof t.gap.top&&(t.gap.top=r.gap.top),"number"!=typeof t.gap.bottom&&(t.gap.bottom=r.gap.bottom),"number"!=typeof t.minWidth&&(t.minWidth=r.minWidth),i[t.id].outerHeight=i[t.id].actualHeight+t.gap.top+t.gap.bottom,i[t.id].position.actualRowTop=i[t.id].position.rowTop+t.gap.top}prepareItems(t){const e=this.state.get("config.chart.item.height"),i=this.getItemsData(),s=Le(this);s.itemsAsArray.length=0,s.itemsDataAsArray.length=0;for(const o in t){const n=t[o];this.prepareItem(n,e,i,t),s.itemsAsArray.push(t[o]),s.itemsDataAsArray.push(i[o])}return this.collectAllLinkedItems(),t}sortRowsByChildren(t,e={},i=this.state.get("config.list.rows"),s=this.state.get("$data.list.rows")){for(const o of t){const t=i[o],n=s[o],a=t.parentId&&e[t.parentId]||!t.parentId;!e[o]&&a&&(e[o]=t),n.children.length&&this.sortRowsByChildren(n.children,e,i,s)}return e}getSortableValue(t,e){return"string"==typeof t?e[t]:"function"==typeof t?t({row:e,vido:this.vido}):""}sortRowsByColumn(t,e=!0){const i=this.state.get("config.list.sort.compare");let s=this.getAllRows();const o=Le(this);if(0===o.allRowsIds.length)return s;const n=o.allRowsAsArray;i?n.sort(i(t)):n.sort((i,s)=>{const o=this.getSortableValue(t.sortable,i),n=this.getSortableValue(t.sortable,s);return"number"==typeof o?e?o-n:n-o:"string"==typeof o?e?o.localeCompare(n):n.localeCompare(o):void 0});const a=n.map(t=>t.id),r=this.getRowsData();for(const t of a){const e=r[t];e.children&&e.children.length&&e.children.sort((t,e)=>a.indexOf(t)-a.indexOf(e))}s=this.sortRowsByChildren(a),this.state.update("config.list.rows",s,{data:"sortRowsByColumn"});const l=this.getScrollTop();return this.state.get("config.scroll.vertical.byPixels")?this.setScrollTop(l.absolutePosPx):this.setScrollTop(l.dataIndex,l.preciseOffset),s}fillEmptyRowValues(t){const e=this.state.get("config.list.row.height"),i=this.getRowsData();let s=0;for(let o in t){const n=t[o];let a=i[o];if(o=String(o),n.id=o,"string"!=typeof o)throw new Error('[gantt-schedule-timeline-calendar] Row "id" must be a string.');if(!o.startsWith("gstcid-"))throw new Error(`[gantt-schedule-timeline-calendar] Row "id" should start with "gstcid-" (your row id: "${o}").`);if(o.startsWith("gstcid-gstcid-"))throw new Error(`[gantt-schedule-timeline-calendar] Your row "id" is wrapped more than once. It should look like this "gstcid-something" and it looks like this: "${o}".`);i[o]||(a={id:n.id,parentId:n.parentId,parents:[],children:[],allChildren:[],position:{top:0,bottom:0},items:[],itemsOrder:[],itemsTimeSectors:[],actualHeight:0,outerHeight:0,parentsExpanded:!0,inView:!0,overlappingCalculated:!1}),"number"!=typeof n.height&&(n.height=e),a.actualHeight=n.height,"boolean"!=typeof n.expanded&&(n.expanded=!1),a.position.top=s,"object"!=typeof n.gap&&(n.gap={}),"number"!=typeof n.gap.top&&(n.gap.top=0),"number"!=typeof n.gap.bottom&&(n.gap.bottom=0),void 0===n.visible&&(n.visible=!0),a.outerHeight=a.actualHeight+n.gap.top+n.gap.bottom,i[o]=a,s+=a.outerHeight}return t}itemsOnTheSameLevel(t,e){const i=t.position.rowTop+t.outerHeight,s=e.position.rowTop+e.outerHeight;return e.position.rowTop<=t.position.rowTop&&s>t.position.rowTop||(e.position.rowTop>=t.position.rowTop&&e.position.rowTop<i||e.position.rowTop>=t.position.rowTop&&s<i)}itemsTimeOverlaps(t,e){return e.time.start>=t.time.start&&e.time.start<=t.time.end||(e.time.end>=t.time.start&&e.time.end<=t.time.end||(e.time.start>=t.time.start&&e.time.end<=t.time.end||e.time.start<=t.time.start&&e.time.end>=t.time.end))}itemsOverlaps(t,e,i,s){const o=e.time.start&&t.time.start&&e.time.end&&t.time.end;return t.id!==e.id&&o&&this.itemsOnTheSameLevel(i,s)&&this.itemsTimeOverlaps(t,e)}itemOverlapsWithOthers(t,e,i=0){const s=this.getItemsData();for(let o=i,n=e.length;o<n;o++){const i=e[o];if(this.itemsOverlaps(t,i,s[t.id],s[i.id]))return i}return null}makeChildren(t,e={parents:[]}){if("object"!=typeof t)return[];t.children||(t.children=[]),t.allChildren||(t.allChildren=[]),t.parents||(t.parents=[...e.parents]),t.parentId&&"undefined"!==t.parentId&&t.parents.push(t.parentId);for(const e in t)if("id"!==e&&"parentId"!==e&&"children"!==e&&"allChildren"!==e&&"parents"!==e){"undefined"!==e&&(t.children.push(e),t.allChildren.push(e));const i=t[e];if("object"!=typeof i)continue;const s=this.makeChildren(i,t);t.allChildren.splice(t.allChildren.length,0,...s)}return t.allChildren}clearNested(t){for(const e in t)"object"!=typeof t[e]||Array.isArray(t[e])||this.clearNested(t[e]),this.keysToKeep.includes(e)||delete t[e],"parentId"===e&&"undefined"===t[e]&&(t[e]=void 0);return t}fastTree(t,e=null){var i,s;if(!e){e={undefined:{},id:"undefined"};for(const s in t){const o=t[s];e[o.id]||(e[o.id]={parentId:null!==(i=o.parentId)&&void 0!==i?i:"undefined",id:o.id})}}for(const t in e){const i=e[t];e[null!==(s=i.parentId)&&void 0!==s?s:"undefined"][i.id]=i}this.makeChildren(e[void 0]),delete e[void 0],delete e.id,delete e.parents,delete e.children,delete e.allChildren;for(const t in e)e[t]=this.clearNested(e[t]);return e}updateRowItemsAndItemRowMapForItem(t,e,i,s,o){var n,a,r;if(void 0===i&&(i=null===(n=this.state.get().$data)||void 0===n?void 0:n.itemRowMap),void 0===s&&(s=null===(r=null===(a=this.state.get().$data)||void 0===a?void 0:a.list)||void 0===r?void 0:r.rows),void 0===o&&(o=this.state.get().config.chart.items),!s[e])return;s[e].items||(s[e].items=[]);const l=i[t];l!==e&&(l&&s[l]&&(s[l].items=s[l].items.filter(e=>e!==t).sort((t,e)=>o[t].time.start-o[e].time.start)),i[t]=e,s[e].items.includes(t)||(s[e].items.push(t),this.timeSectorsItemsAddOrUpdate([o[t]],s[e].itemsTimeSectors)),l&&e!==l&&(s[l]&&(s[l].overlappingCalculated=!1),s[e]&&(s[e].overlappingCalculated=!1),this.timeSectorsDeleteItems([t],s[l].itemsTimeSectors)))}sortRowItemsInAddOrder(t,e){e.itemsOrder=e.items.slice(),e.itemsOrder.sort((e,i)=>t[e]-t[i])}sortRowItemsByTime(t){t.items=t.items.sort((t,e)=>this.getItem(t).time.start-this.getItem(e).time.start)}makeTreeMap(t,e,i=!1){let s=this.state.get("$data.treeMap");if(!i||!s){s=this.fastTree(t);for(const e in t){const i=t[e],o=s[e];for(const t in o)i[t]=o[t]}}const o=this.state.get("$data.reloading")?{}:this.state.get("$data.itemRowMap"),n={};let a=0;const r=this.getAllItems();for(const t of e){const e=r[t];n[e.id]=a,this.updateRowItemsAndItemRowMapForItem(e.id,e.rowId,o),a++}for(const e in t){const i=t[e];this.sortRowItemsInAddOrder(n,i),i.itemsTimeSectors=this.timeSectorsGenerate(this.getItems(i.items))}return this.state.update("$data.itemRowMap",o),i||this.state.update("$data.treeMap",s),t}_updateRowsWithParentsExpandedCache(t){const e=Le(this);e.rowsIdsWithParentsExpanded.length=0,e.rowsIdsWithParentsExpanded.splice(0,0,...t),e.rowsWithParentsExpanded.length=0,e.rowsDataWithParentsExpanded.length=0,e.rowsWithParentsExpandedDataIndexMap.clear();const i=this.state.get("config.list.rows"),s=this.state.get("$data.list.rows");e.rowsWithParentsExpandedAsMap.clear();let o=0;for(const t of e.rowsIdsWithParentsExpanded){const n=i[t];n&&(e.rowsWithParentsExpanded.push(n),e.rowsWithParentsExpandedAsMap.set(t,n),e.rowsDataWithParentsExpanded.push(s[t]),e.rowsWithParentsExpandedDataIndexMap.set(t,o),o++)}}generateRowsWithParentsExpanded(t){const e=[],i=this.getRowsData();t:for(const s in t){if(!i[s]||!i[s].parents)return[];if(this.isRowVisible(s)){for(const e of i[s].parents){const i=t[e];if(!i||!i.expanded)continue t}e.push(s)}}return this._updateRowsWithParentsExpandedCache(e),e}getRowInfoFromTop(t){const e=this.state.get("config.list.rows"),i=this.state.get("$data.list.rows"),s=this.getRowPositionMapNode(t);return{dataIndex:s.dataIndex,row:e[s.id],rowData:i[s.id]}}getRowViewTop(t,e=this.state.get("$data.list.rows"),i=this.state.get("$data.scroll.vertical")){return e[t].position.top-i.absolutePosPx-i.preciseOffset}parentsExpanded(t){return Le(this).rowsWithParentsExpandedAsMap.has(t)}setAllRowsIdsCache(t){const e=Le(this);e.allRowsIds=t;const i=this.state.get("config.list.rows");e.allRowsAsArray.length=0;for(const s of t)e.allRowsAsArray.push(i[s])}resetRowsOverlappingCalculated(t=this.getRowsData()){for(const e in t)t[e].overlappingCalculated=!1}timeSectorItemFits(t,e){return t.time.start>=e.from&&t.time.start<=e.to||t.time.end>=e.from&&t.time.end<=e.to||t.time.start<=e.from&&t.time.end>=e.to}timeSectorsGenerate(t,e=this.state.get().$data.chart.time,i=10){const s=[];if(e.from===e.to)return s;const o=this,n=Math.ceil((e.to-e.from)/i),a=new Map,r=new Set;for(let l=0;l<i;l++){const i={from:e.from+n*l,to:e.from+n*(l+1)-1,items:new Set,remove:!1,get fromDate(){return o.time.date(this.from)},get toDate(){return o.time.date(this.to)}};for(const e of t)if(this.timeSectorItemFits(e,i)){i.items.add(e.id),a.has(e.id)||a.set(e.id,[]);const t=a.get(e.id);t.push(i),r.add(t)}s.push(i)}for(const t of r){if(t.length<=1)continue;const e={from:Math.min(...t.map(t=>t.from)),to:Math.max(...t.map(t=>t.to)),items:new Set,remove:!1,get fromDate(){return o.time.date(this.from)},get toDate(){return o.time.date(this.to)}};for(const i of t){for(const t of i.items)e.items.add(t);i.remove=!0}s.push(e)}return s.filter(t=>!t.remove)}timeSectorsItemsAddOrUpdate(t,e){for(const i of e)for(const e of t)if(this.timeSectorItemFits(e,i)){if(i.items.has(e.id))continue;i.items.add(e.id)}else i.items.delete(e.id);return e}timeSectorsDeleteItems(t,e){for(const i of e)for(const e of t)i.items.delete(e);return e}timeSectorsGenerateForRows(t=!1,e=this.getRowsData(),i=this.state.get().$data.chart.time,s=10){if(i.from===i.to)return e;const o=this.state.get().$data.list.rowsIds;for(const n of o){const o=e[n];!t&&o.itemsTimeSectors&&0!==o.itemsTimeSectors.length||(o.itemsTimeSectors=this.timeSectorsGenerate(this.getItems(o.itemsOrder),i,s))}return e}fixOverlappedItemsByTimeSectors(t){if(t.overlappingCalculated)return;if(this.isMutedMethod("fixOverlapped"))return;const e=this.getItemsData(),i=t.itemsTimeSectors=this.timeSectorsGenerate(this.getItems(t.itemsOrder)),s=this.getItems(t.items);for(const t of s){if(t.overlap)continue;const i=e[t.id];i&&(i.position.rowTop=t.top)}for(let t=0,s=i.length;t<s;t++){const s=i[t].items,o=this.getItems(s);let n=0;for(const t of o){if(t.overlap)continue;const i=e[t.id];if(!i)continue;i.position.actualRowTop=i.position.rowTop+t.gap.top;let s=this.itemOverlapsWithOthers(t,o);if(s)for(;s;){const e=this.getItemData(s.id),a=o.findIndex(t=>t.id===s.id);a<n?(i.position.rowTop+=e.outerHeight,i.position.actualRowTop=i.position.rowTop+t.gap.top):(e.position.rowTop+=i.outerHeight,e.position.actualRowTop=e.position.rowTop+s.gap.top),s=this.itemOverlapsWithOthers(t,o)}n++}}i.length>0&&(t.overlappingCalculated=!0)}recalculateRowHeight(t,e){if(!e||!t||!t.gap)return 0;let i=0;const s=this.getItemsData();if(!s)return 0;if(!1===t.visible)return e.actualHeight=0,e.outerHeight=0,0;const o=this.getItems(e.itemsOrder);this.fixOverlappedItemsByTimeSectors(e);for(const t of o){const e=s[t.id];i=Math.max(i,e.position.rowTop+e.outerHeight)}return i<t.height&&(i=t.height),e.actualHeight=i,e.outerHeight=e.actualHeight+t.gap.top+t.gap.bottom,e.outerHeight}calculateVisibleRowsHeights(){var t;if(this.isMutedMethod("calculateVisibleRowsHeights"))return!1;const e=this.state.get("$data.list.visibleRows");let i=0;const s=this.getAllRows(),o=this.getRowsData();let n=!1;for(const a of e){const e=(null===(t=o[a])||void 0===t?void 0:t.outerHeight)||0,r=this.recalculateRowHeight(s[a],o[a]);e!==r&&(n=!0),i+=r}return this.state.update("$data.list.visibleRowsHeight",i),n&&this.measureRows(),n}getRealChartHeight(t=!0){const e=this.state.get("$data.scroll.vertical.preciseOffset")||0,i=t?this.state.get("config.innerHeight"):this.state.get("$data.chart.dimensions.heightWithoutScrollBar"),s=this.state.get("config.additionalSpace");return i-s.top-s.bottom+-1*e}getLastRowId(t=Le(this).rowsIdsWithParentsExpanded,e=this.state.get("$data.scroll.vertical")){return t[this.getLastRowIndex(t,e)]}getLastRowIndex(t=Le(this).rowsIdsWithParentsExpanded,e=this.state.get("$data.scroll.vertical")){return t.length-e.lastPageCount}generateRowsPositionsMap(t,e=0,i={id:"",dataIndex:0,keys:[]}){if(0===t.length)return i;if(1===t.length)return i[t[0].position.top]={id:t[0].id,dataIndex:e,keys:[]},i.keys=[t[0].position.top],i;const s=Math.floor(t.length/2),o=e,n=e+s,a=t.slice(1,s),r=t.slice(s+1);i.keys.push(t[0].position.top),i.keys.push(t[s].position.top);const l=i[t[0].position.top]={id:t[0].id,dataIndex:o,keys:[]},c=i[t[s].position.top]={id:t[s].id,dataIndex:n,keys:[]};return this.generateRowsPositionsMap(a,o+1,l),this.generateRowsPositionsMap(r,n+1,c),i}getRowPositionMapNode(t,e=Le(this).rowsPositionsMap){return t>=e.keys[1]?this.getRowPositionMapNode(t,e[e.keys[1]]):t>=e.keys[0]?this.getRowPositionMapNode(t,e[e.keys[0]]):e}measureRows(t=!1){if(this.isMutedMethod("measureRows"))return;const e=this.state.get("$data.scroll.vertical"),i=this.state.get("config.list.rows"),s=this.getRealChartHeight(),o=this.getRowsData(),n=Le(this);if(void 0===e.dataIndex)return[];const a=this.state.get("$data.list.rowsIds");let r=0;if(e.data&&(r=n.rowsWithParentsExpandedDataIndexMap.get(e.data.id),-1===r)){const t=this.getLastRowId(n.rowsIdsWithParentsExpanded,e);r=n.rowsWithParentsExpandedDataIndexMap.get(t)}let l=0,c=0,d=0;for(let h=a.length;d<h;d++){const h=a[d],u=n.rowsWithParentsExpandedAsMap.has(h),m=this.getRowViewTop(h,o,e),f=d>=r&&m<=s,g=o[h];if(!g)return[];t&&(g.overlappingCalculated=!1),this.recalculateRowHeight(i[h],g),g.inView=f,g.parentsExpanded=u,g.position.top=l,c=l+g.outerHeight,g.position.bottom=c,u&&(l+=g.outerHeight)}return n.rowsPositionsMap=this.generateRowsPositionsMap(n.rowsDataWithParentsExpanded),this.state.update("$data.list.rows",o,{data:"measureRows"}),this.state.update("$data.list.rowsHeight",c),this.state.update("$data.scroll.vertical.absoluteSize",c),this.calculateVerticalScrollSize(),c}isRowVisible(t,e=this.getAllRows(),i=this.getRowsData()){if(!e[t])return!1;if(!1===e[t].visible)return!1;if(!i[t])return!1;const s=i[t].parents;for(const t of s)if(!e[t]||!1===e[t].visible)return!1;return!0}getVisibleRows(){const t=this.state.get("$data.scroll.vertical"),e=Le(this),i=e.rowsIdsWithParentsExpanded,s=this.getRowsData();if(!t.data)return[];const o=this.getRealChartHeight();if(!o)return[];let n=e.rowsWithParentsExpandedDataIndexMap.get(t.data.id);-1!==n&&void 0!==n||(n=t.dataIndex>e.rowsDataWithParentsExpanded.length-1?i.length-t.lastPageCount:t.dataIndex);const a=[];let r,l;for(let e=n,c=i.length;e<c;e++){const n=i[e];if(s[n]&&(l=s[n],r=this.getRowViewTop(n,s,t),r>=0&&r<=o?(a.push(n),l.parentsExpanded=!0):l.parentsExpanded=!1,r>o))break}return a}normalizeMouseWheelEvent(t){let e=t.deltaX,i=t.deltaY,s=t.deltaZ;const o=t.deltaMode,n=this.state.get("config.list.rowHeight");let a=1;switch(o){case 1:n&&(a=n);break;case 2:a=window.height}return e*=a,i*=a,s*=a,{x:e,y:i,z:s,event:t}}resetHorizontalScroll(t=this.state.get("$data.scroll.horizontal")){t.data=null,t.dataId="",t.dataIndex=0,t.handlePosPx=0,t.absolutePosPx=0,t.preciseOffset=0;const e=this.state.get("$data.chart.time");if(!e.allDates||!e.allDates.length)return;const i=e.allDates[e.level];if(!i||!i.length)return;const s=i[0];return t.data=Object.assign({},s),t.dataId=s.id,t}resetVerticalScroll(t=this.state.get("$data.scroll.vertical")){return t.data=null,t.dataId="",t.dataIndex=0,t.handlePosPx=0,t.absolutePosPx=0,t.preciseOffset=0,t.data=null,t.dataId=null,t}limitHorizontalScrollToView(t=this.state.get("$data.chart.time")){const e=this.state.get("$data.scroll.horizontal");if(!t.allDates||!t.allDates.length)return;const i=t.allDates[t.level].length-e.lastPageCount;e.dataIndex>i&&this.setScrollLeft(i,0,t)}calculateHorizontalScrollPosPxFromDates(t,e=0,i=this.state.get("$data.scroll.horizontal"),s=this.state.get("$data.chart.time")){if(s.calculatedZoomMode)return 0;if(void 0===t&&(t=0),!s.allDates||!s.allDates.length)return;const o=s.allDates[s.level];if(!o||!o.length)return;let n,a=0,r=0;if("number"==typeof t||""===t){""===t&&(t=0),r=t,n=o[r],n||(r=0,n=o[r]);const e=s.allDates[s.level].length-i.lastPageCount;r>e&&e>=0&&(r=e,n=o[r])}else if("string"==typeof t)for(let e=0;e<o.length;e++){const i=o[e];if(i.id===t){n=i,r=e;break}}if(!n&&i.data)for(let t=0;t<o.length;t++){const e=o[t];if(e.leftGlobal>=i.data.leftGlobal){n=e,r=t;break}}if(n||(r>0?(r=o.length-1,n=o[r]):(n=o[0],r=0)),r>o.length-i.lastPageCount-1&&(r=o.length-i.lastPageCount-1,r<0&&(r=0),n=o[r],e=n.leftPx-i.absoluteSizeWithoutLastPage),i.data=Object.assign({},n),a=n.leftPx-e,i.dataIndex=r,i.dataId=n.id,a){const t=a/i.absoluteSizeWithoutLastPage*i.maxHandlePosPx;i.handlePosPx=Math.max(t,0)}else i.handlePosPx=0;return i.handlePosPx>i.maxHandlePosPx&&(i.handlePosPx=Math.max(i.maxHandlePosPx,0),e=n.leftPx-i.absoluteSizeWithoutLastPage),i.preciseOffset=e,i.maxHandlePosPx>0?i.percent=i.handlePosPx/i.maxHandlePosPx*100:i.percent=0,i.absolutePosPx=Math.max(a,0),i}setScrollLeftByPixels(t){const e=this.state.get("$data.chart.time"),i=this.state.get("config.scroll.horizontal"),s=e.allDates[e.level];return s&&s.length?(t<0&&(t=0),this.state.update("$data.scroll.horizontal",o=>{t>o.absoluteSizeWithoutLastPage&&(t=o.absoluteSizeWithoutLastPage);let n=0;const a=Math.round(t);let r;for(r of s){if(Math.round(r.rightPx)>a)break;n++}return o.dataIndex=n,o.dataId=r.id,o.data=Object.assign({},r),i.precise?o.preciseOffset=r.leftPx-t:o.preciseOffset=0,this.calculateHorizontalScrollSizeAndPosFromDates(e.totalViewDurationPx,e,o,!1),t=o.absolutePosPx,o},{data:"set-scroll-left"}),t):0}setScrollLeft(t,e=0,i=this.state.get("$data.chart.time")){if(i.calculatedZoomMode)return 0;const s=this.state.get("config.scroll.horizontal");if(s.byPixels){if("number"!=typeof t)throw new Error("When 'config.scroll.horizontal.byPixels' is true, 'dataIndexOrDateId' must be a number.");return t<0&&(t=0),this.setScrollLeftByPixels(t)}let o=0;const n=i.allDates[i.level];return n&&n.length?(this.state.update("$data.scroll.horizontal",a=>{let r,l;if("number"==typeof t)r=t;else if("string"==typeof t)for(let e=0;e<n.length;e++)if(n[e].id===t){r=e;break}return!s.precise&&e&&(e=0),l=n[r],l||(r>0?(r=n.length-1,l=n[r]):(r=0,l=n[0])),Math.abs(e)>l.width&&(e=-(l.width-1)),a.dataIndex=r,a.dataId=l.id,a.preciseOffset=e,this.calculateHorizontalScrollSizeAndPosFromDates(i.totalViewDurationPx,i,a,!1),o=a.absolutePosPx,a},{data:"set-scroll-left"}),o):0}scrollToTime(t,e=!0){const i=this.state.get("$data.chart.time");if(i.calculatedZoomMode)return 0;if(!i.allDates||!i.allDates.length)return 0;const s=i.allDates[i.level];if(!s||!s.length)return 0;let o=this.time.findDateAtTime(t,i.allDates[i.level]);o||(t<s[0].leftGlobal?(t=s[0].leftGlobal,o=s[0]):t>s[s.length-1].rightGlobal&&(t=s[s.length-1].rightGlobal,o=s[s.length-1]));let n,a=0,r=0;const l=this.getChartWidth(!0)/2;if(e){r=(t-o.leftGlobal)/i.timePerPixel,o.rightPx<l&&(r=0);const e=-(l-r);if(n=this.time.getMainDateFromRelativePosition(o,e),!n)return console.warn(`[gstc.api.scrollToTime] Time out of bounds (${t} -> ${this.time.date(t).format("YYYY-MM-DD HH:mm:ss")}).`),0;a=i.allDates[i.level].indexOf(n)}else a=i.allDates[i.level].indexOf(o),r=(t-o.leftGlobal)/i.timePerPixel,n=o;if(r<0&&(r=0),-1===a)return 0;if(this.state.get("config.scroll.horizontal").byPixels){this.setScrollLeft(n.leftPx+(e?n.width/2:0)+r);const t=this.getScrollLeft(),s=t.data.leftGlobal-t.preciseOffset*i.timePerPixel;return e?s+l*i.timePerPixel:s}this.setScrollLeft(a,-r);const c=this.getScrollLeft(),d=c.data.leftGlobal-c.preciseOffset*i.timePerPixel;return e?d+l*i.timePerPixel:d}getScrollLeft(){return this.state.get("$data.scroll.horizontal")}getScrollSize(t){const e=this.state.get("$data.scroll.vertical.visible")?this.state.get("$data.chart.dimensions.widthWithoutScrollBar"):this.state.get("$data.chart.dimensions.width"),i=this.state.get("$data.scroll.horizontal.visible")?this.state.get("$data.chart.dimensions.heightWithoutScrollBar"):this.state.get("$data.chart.dimensions.innerHeight"),s=this.state.get("config.additionalSpace");return"horizontal"===t?e:i-s.top-s.bottom}getLastPageDatesWidth(t,e){let i=0,s=0;if(0===e.length)return{lastPageSize:i,lastPageCount:s};const o=this.state.get("config.scroll.horizontal"),n=o.byPixels||o.precise;for(let o=e.length-1;o>=0;o--){const n=e[o];if(i+=n.width,i>=t){i-=n.width;break}s++}return 0===i&&(i=t),n&&(i=t),{lastPageSize:i,lastPageCount:s}}calculateInitialChartWidth(t=!1){const e=this.state.get("config.initialWidth"),i=this.state.get("config.list.columns.data");let s=0;for(const t in i){s+=i[t].width}let o=e-s;return t&&(o-=this.state.get("config.scroll.horizontal.width")||0),o}getChartWidth(t=!1){let e=t?this.state.get("$data.chart.dimensions.widthWithoutScrollBar"):this.state.get("$data.chart.dimensions.width");return e||(e=this.calculateInitialChartWidth(t)),e}isHorizontalScrollVisible(t){const e=this.state.get("$data.scroll.horizontal");if(null!==e.data)return e.visible;const i=this.state.get("config.scroll.horizontal"),s=this.state.get("$data.chart.time"),o=s.totalViewDurationPx,n=this.getChartWidth(t),a=s.allDates[s.level];if(!a||!a.length)return!1;const{lastPageSize:r,lastPageCount:l}=this.getLastPageDatesWidth(n,a),c=this.getScrollSize("horizontal");let d=r/o*c;d<i.minInnerSize&&(d=i.minInnerSize);return!(l===a.length||c===d)}calculateHorizontalScrollSizeAndPosFromDates(t,e=this.state.get("$data.chart.time"),i=this.state.get("$data.scroll.horizontal"),s=!0){if(!e.allDates.length)return;const o=e.allDates[e.level],n=this.state.get("$data.scroll.vertical.visible"),a=this.getChartWidth(n),r=t,{lastPageSize:l,lastPageCount:c}=this.getLastPageDatesWidth(a,o),d=r-l,h=this.state.get("config.scroll.horizontal"),u=this.getScrollSize("horizontal");let m=l/r*u;m<h.minInnerSize&&(m=h.minInnerSize);const f=i.visible,g=!(c===o.length||u===m),p=Math.max(u?u-m:0,0);return i.absoluteSize=r,i.absoluteSizeWithoutLastPage=Math.max(d,0),i.innerHandleSize=m,i.maxHandlePosPx=p,i.scrollSize=g?u:0,i.lastPageCount=c,i.lastPageSize=l,i.visible=g,this.calculateHorizontalScrollPosPxFromDates(i.dataId,i.preciseOffset,i,e),s&&this.state.update("$data.scroll.horizontal",i),f!==g&&this.calculateVerticalScrollSize(),i}getLastPageRowsHeight(t,e){let i=0,s=0;const o=this.state.get("config.additionalSpace"),n=t-o.top-o.bottom;if(0===e.length)return{lastPageSize:i,lastPageCount:s};const a=this.getRowsData();for(let t=e.length-1;t>=0;t--){const o=a[e[t]];if(i+=o.outerHeight,i>=n){i-=o.outerHeight;break}s++}0===i&&(i=t);const r=this.state.get("config.scroll.vertical");return(r.byPixels||r.precise)&&(i=t),{lastPageSize:i,lastPageCount:s}}calculateVerticalScrollSize(){const t=this.state.get("$data.list.rowsWithParentsExpanded"),e=this.state.get("$data.list.rowsHeight"),i=this.isHorizontalScrollVisible(!0)?this.state.get("$data.chart.dimensions.heightWithoutScrollBar"):this.state.get("$data.chart.dimensions.innerHeight"),{lastPageSize:s,lastPageCount:o}=this.getLastPageRowsHeight(i,t),n=this.state.get("config.scroll.vertical"),a=i;let r=s/e*a;r<n.minInnerSize&&(r=n.minInnerSize);const l=!(o===t.length||a===r),c=a-r;this.state.update("$data.scroll.vertical",i=>{if(i.absoluteSize=e,i.absoluteSizeWithoutLastPage=e-s,i.innerHandleSize=r,i.maxHandlePosPx=c,i.scrollSize=l?a:0,i.lastPageCount=o,i.lastPageSize=s,i.handlePosPx>c&&(i.handlePosPx=c),i.dataIndex>t.length-o){const e=this.getAllRows(),s=this.getRowsData();i.dataIndex=t.length-o;const n=t[i.dataIndex];e&&n?(i.data=e[n],i.dataId=i.data.id,i.absolutePosPx=s[n].position.top):(i.dataIndex=0,i.dataId="",i.data=null,i.handlePosPx=0,i.absolutePosPx=0),i.preciseOffset=0}else{const e=this.getRowsData(),s=t[i.dataIndex];e[s]&&(i.data=e[s],i.dataId=s,i.absolutePosPx=i.data.position.top-i.preciseOffset)}return i.visible=l,i})}setScrollTopByPixels(t){const e=Le(this),i=this.state.get("$data.scroll.vertical.absoluteSizeWithoutLastPage");t>i&&(t=i),t<0&&(t=0);let{dataIndex:s,row:o,rowData:n}=this.getRowInfoFromTop(t);if(!n)return;const a=this.state.get("config.scroll.vertical");return this.state.update("$data.scroll.vertical",i=>{const r=e.rowsWithParentsExpanded.length-i.lastPageCount;if(s>r){if(s=r,o=e.rowsWithParentsExpanded[s],!o&&(s=0,o=e.rowsWithParentsExpanded[s],!o))return t=0,this.resetVerticalScroll(i);n=this.getRowData(o.id)}return i.data=e.rowsWithParentsExpanded[s],i.dataId=i.data.id,a.precise?i.preciseOffset=n.position.top-t:(t=this.getRowData(i.dataId).position.top,i.preciseOffset=0),i.handlePosPx=t?Math.round(t/i.absoluteSizeWithoutLastPage*i.maxHandlePosPx):0,i.handlePosPx>i.maxHandlePosPx&&(i.handlePosPx=i.maxHandlePosPx),i.percent=i.handlePosPx/i.maxHandlePosPx*100,i.dataIndex=s,i.absolutePosPx=t,i},{data:"set-scroll-top"}),t}setScrollTop(t=0,e=0){if(this.state.get("config.scroll.vertical.byPixels")){if("number"!=typeof t)throw new Error("When 'config.scroll.vertical.byPixels' is true, 'dataIndexOrRowId' must be a number.");return t<0&&(t=0),this.setScrollTopByPixels(t)}const i=Le(this),s=i.rowsIdsWithParentsExpanded;let o,n,a=0;if("string"==typeof t){const e=t;if(o=this.getRow(e),n=this.getRowData(o.id),this.parentsExpanded(e))a=s.indexOf(e);else for(const t of n.parents)this.parentsExpanded(t)&&(a=s.indexOf(t));if(!o)throw new Error(`Row with id: '${e}' not found. Maybe use GSTC.api.GSTCID(id) or check if row exists.`)}else{if("number"!=typeof t)throw new Error("[gstc.api.setScrollTop] Wrong dataIndex value. Must be `string` (for `rowId`) or `number` (for array index) only.");if(a=t,a>i.rowsWithParentsExpanded.length-1&&(a=i.rowsWithParentsExpanded.length-1),i.rowsWithParentsExpanded[a]||0===a||(a=0),!i.rowsWithParentsExpanded[a])return;o=i.rowsWithParentsExpanded[a],n=this.getRowData(o.id)}let r=0;return this.state.update("$data.scroll.vertical",t=>{const s=i.rowsWithParentsExpanded.length-t.lastPageCount;if(a>s){if(a=s,o=i.rowsWithParentsExpanded[a],!o&&(a=0,o=i.rowsWithParentsExpanded[a],!o))return r=0,this.resetVerticalScroll(t);n=this.getRowData(o.id)}return r=n.position.top-e,t.data=i.rowsWithParentsExpanded[a],t.dataId=t.data.id,t.preciseOffset=e,t.handlePosPx=r?Math.round(r/t.absoluteSizeWithoutLastPage*t.maxHandlePosPx):0,t.handlePosPx>t.maxHandlePosPx&&(t.handlePosPx=t.maxHandlePosPx),t.percent=t.handlePosPx/t.maxHandlePosPx*100,t.dataIndex=a,t.absolutePosPx=r,t},{data:"set-scroll-top"}),r}getScrollTop(){return this.state.get("$data.scroll.vertical")}getCurrentCalendarLevels(){return this.state.get("$data.chart.time.levels")}getGridCells(t=void 0){const e=this.state.get("$data.chart.grid.cells");if(!e)return[];if(void 0!==t){const i=t.length,s=new Array(i);for(let o=0;o<i;o++)s[o]=e[t[o]];return s}return Object.values(e)}getAllGridCells(){return this.state.get("$data.chart.grid.cells")}getGridRows(t=void 0){const e=this.state.get("$data.chart.grid.rows");return void 0!==t?e?Object.values(e).filter(e=>t.includes(e.row.id)):[]:e?Object.values(e):[]}getAllGridRows(){return this.state.get("$data.chart.grid.rows")}getGridCell(t){return this.state.get(`$data.chart.grid.cells.${t}`)}getGridRow(t){return this.state.get(`$data.chart.grid.rows.${t}`)}muteMethod(t){this.mutedMethods.add(t)}unmuteMethod(t){this.mutedMethods.delete(t)}isMutedMethod(t){return this.mutedMethods.has(t)}getSVGIconSrc(t){return"string"==typeof this.iconsCache[t]||(this.iconsCache[t]="data:image/svg+xml;base64,"+btoa(t)),this.iconsCache[t]}destroy(){for(const t of this.unsubscribes)t();this.unsubscribes=[],this.debug&&delete window.state}}
/**
* ScrollBar component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Oe(t,e){const{onDestroy:i,state:s,cache:o,api:n,html:a,StyleMap:r,Actions:l,update:c}=t,d="scroll-bar";let h,u,m="",f="";i(s.subscribe("config.classNames",()=>{h=n.getClass(d),u=n.getClass(d+"-inner")}));const g="horizontal"===e.type?"height":"width",p="height"===g?"width":"height",v="horizontal"===e.type?"left":"top",w=new r({}),b=new r({}),y={maxPosPx:0,innerHandleSize:0,scrollSize:0,dataId:""};i(s.subscribeAll("horizontal"===e.type?[`config.scroll.${e.type}`,`$data.scroll.${e.type}`]:[`config.scroll.${e.type}`,`$data.scroll.${e.type}`,"$data.chart.dimensions.heightWithoutScrollBar","$data.list.rowsWithParentsExpanded","$data.list.rowsHeight","config.additionalSpace"],function(t,i){const o=s.get(`config.scroll.${e.type}`),a=s.get(`$data.scroll.${e.type}`),r=n.getScrollSize(e.type),l=a.innerHandleSize,d=a.maxHandlePosPx,h=a.dataId,u=s.get("config.additionalSpace"),m=s.get("$data.chart.time");if(!m.allDates||!m.allDates.length||!m.allDates[m.level])return;if(a.visible?w.style.display="flex":w.style.display="none",w.style[g]=o.width+"px",w.style[p]=r+"px","vertical"===e.type&&(w.style.top=s.get("config.headerHeight")+u.top+"px"),!a.lastPageSize||!a.absoluteSize||!r)return;b.style[g]="100%",b.style[p]=l+"px";!("set-scroll-top"===i.options.data||"set-scroll-left"===i.options.data)&&function(t,e,i,s){const o=y.maxPosPx!==t||y.innerHandleSize!==e||y.scrollSize!==i||y.dataId!==s;return o&&(y.maxPosPx=t,y.innerHandleSize=e,y.scrollSize=i,y.dataId=s),o}(d,l,r,h)&&("horizontal"===e.type?o.byPixels?n.setScrollLeft(a.absolutePosPx):n.setScrollLeft(a.dataIndex,a.preciseOffset):o.byPixels?n.setScrollTop(a.absolutePosPx):n.setScrollTop(a.dataIndex,a.preciseOffset)),c()},{group:!0,bulkValue:!1}));const x=n.getActions(d);x.push(class extends ce{constructor(t){super();const i=`$data.elements.scroll-bar--${e.type}`;s.get(i)||s.update(i,t,{only:null})}update(){}destroy(){}});const P={api:n,state:s,props:e,componentName:d},$=l.create(x,P),D=[class extends ce{constructor(t){super(),this.moving=!1,this.initialPointerPos=0,this.initialHandlePos=0,this.currentPos=0,this.currentPointerPos=0,this.lastDataIndex=0,this.lastOffset=0,this.dataIndex=0,this.previousRowId="",s.update(`$data.elements.scroll-bar-inner--${e.type}`,t,{only:null}),this.bodyClassName=s.get("config.scroll.bodyClassName"),this.pointerDown=this.pointerDown.bind(this),this.pointerUp=this.pointerUp.bind(this);const i=this.pointerMove.bind(this);this.pointerMove=i,this.unsubscribe=s.subscribe(`$data.scroll.${e.type}`,this.dataChanged.bind(this)),this.destroy=this.destroy.bind(this),t.addEventListener("pointerdown",this.pointerDown),document.addEventListener("pointermove",this.pointerMove),document.addEventListener("pointerup",this.pointerUp)}destroy(t){this.unsubscribe(),t.removeEventListener("pointerdown",this.pointerDown),document.removeEventListener("pointermove",this.pointerMove),document.removeEventListener("pointerup",this.pointerUp)}dataChanged(){const t=s.get(`$data.scroll.${e.type}`),i=s.get("$data.chart.time");if(!i.allDates.length)return;const o=i.allDates[i.level],n=t.dataIndex;if(this.lastDataIndex=n,"horizontal"===e.type&&o&&o.length)this.currentPos=t.handlePosPx,b.style[v]=this.currentPos+"px",c();else if("vertical"===e.type){if(!s.get("$data.list.rowsWithParentsExpanded").length)return;this.currentPos=t.handlePosPx,b.style[v]=this.currentPos+"px",c()}}limitPosition(t){return Math.max(Math.min(t,s.get(`$data.scroll.${e.type}.maxHandlePosPx`)),0)}pointerDown(t){t.stopPropagation(),t.preventDefault(),n.muteMethod("calculateRowsHeight"),document.body.classList.add(this.bodyClassName),requestAnimationFrame(()=>{this.moving=!0,this.initialPointerPos="horizontal"===e.type?t.pageX:t.pageY,this.initialHandlePos=s.get(`$data.scroll.${e.type}.handlePosPx`),f=" "+n.getClass(d)+"-inner--active",m=" "+n.getClass(d)+"--active",c()})}pointerUp(t){this.moving&&(n.unmuteMethod("calculateRowsHeight"),t.preventDefault(),t.stopPropagation(),document.body.classList.remove(this.bodyClassName)),this.moving=!1,f="",m="",c()}pointerMoveRead(t){this.currentPointerPos="horizontal"===e.type?t.pageX:t.pageY}pointerMoveWrite(){const t=s.get(`config.scroll.${e.type}`),i=s.get(`$data.scroll.${e.type}`),o=this.currentPointerPos-this.initialPointerPos;this.currentPos=this.limitPosition(this.initialHandlePos+o);const a=s.get("$data.chart.time");if(!a.allDates.length)return;const r=a.allDates[a.level],l=this.currentPos/i.maxHandlePosPx*i.absoluteSizeWithoutLastPage,c=Math.round(l);if("horizontal"===e.type){let e,i=0,s=0,o=0;for(let t=r.length;i<t&&(e=r[i],o=Math.round(e.rightPx),!(o>c));i++);t.precise&&o!==c&&(s=e.leftPx-l),i||(i=0),e||(e=r[0]),this.dataIndex=i,this.lastDate=r[i],t.byPixels?n.setScrollLeft(l):n.setScrollLeft(e.id,s),this.lastDataIndex=i,this.lastOffset=s}else{const{dataIndex:e,row:i,rowData:s}=n.getRowInfoFromTop(l);let o=0;t.precise&&s.position.top!==l&&(o=s.position.top-l),this.dataIndex=e,this.previousRowId=i.id,t.byPixels?n.setScrollTop(l):n.setScrollTop(e,o),this.lastDataIndex=e,this.lastOffset=o}}pointerMove(t){this.moving&&(t.stopPropagation(),t.preventDefault(),requestAnimationFrame(()=>{this.pointerMoveRead(t)}),requestAnimationFrame(()=>{this.pointerMoveWrite()}))}}],C=l.create(D,P),W=n.generateSlots(d,t,e);function I({classNameOuter:t,classNameOuterActive:e,classNameInner:i,classNameInnerActive:s,styleMapInner:o,styleMapOuter:n,innerActions:a,outerActions:r,slots:l,cache:c,html:d,vido:h,props:u}){return!u||!u.type?null:l.html("outer",d`
<div
data-actions=${r()}
class=${t+" "+t+"--"+u.type+e}
style=${n.directive()}
>
${l.html("inner",d`
<div
data-actions=${a()}
class=${i+" "+i+"--"+u.type+s}
style=${o.directive()}
>
${l.html("content")}
</div>
`)}
</div>
`)}let A=I;return i(s.subscribe(`config.templates.${d}`,t=>{A=null!=t?t:I,c()})),()=>A({innerActions:C,outerActions:$,classNameOuter:h,classNameOuterActive:m,classNameInner:u,classNameInnerActive:f,cache:o,styleMapInner:b,styleMapOuter:w,slots:W,html:a,vido:t,props:e})}
/**
* List component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function ke(t,e={}){const{api:i,state:s,onDestroy:o,Actions:n,update:a,reuseComponents:r,html:l,StyleMap:c,cache:d}=t,h="list",u=i.getActions(h);let m,f;const g=Object.assign(Object.assign({},e),{list:m,percent:f,api:i,state:s,componentName:h});let p;const v=s.subscribe("config.components.ListColumn",t=>p=t);!function(){const t=s.get("config.list.expander.icons"),e={};for(const s in t){const o=t[s];e[s]=i.getSVGIconSrc(o)}s.update("$data.list.expander.icons",e)}(),function(){const t={open:"",close:""},e=s.get("config.list.toggle.icons");for(const s in e){const o=e[s];t[s]=i.getSVGIconSrc(o)}s.update("$data.list.toggle.icons",t)}();const w=i.getClass(h),b=i.generateSlots(h,t,e);o(s.subscribe("config.list",function(){m=s.get("config.list"),f=m.columns.percent,g.list=m,g.percent=f,a()}));const y=[];o(s.subscribe("config.list.columns.data",function(t){const e=Object.values(t).filter(t=>!t.hidden).sort((t,e)=>"number"==typeof t.position&&"number"==typeof e.position?t.position-e.position:0);r(y,e,t=>({column:t}),p,!0),a()}));const x=new c({height:"","--expander-padding-width":"","--expander-size":""});let P;function $(t){P||(P=t.offsetWidth,0===f&&(P=0),s.update("$data.list.width",P))}o(s.subscribeAll(["$data.height","config.list.expander"],()=>{const t=s.get("config.list.expander");x.style.height=s.get("$data.height")+"px",x.style["--expander-padding-width"]=t.padding+"px",x.style["--expander-size"]=t.size+"px",a()},{group:!0})),o(()=>{y.forEach(t=>t.destroy()),v()});u.push(class{constructor(t,e){e.state.update("$data.elements.list",t),$(t)}update(t){return $(t)}});const D=n.create(u,g);function C({className:t,styleMap:e,list:i,listColumns:s,actions:o,slots:n,html:a,cache:r,vido:l,props:c}){return n.html("outer",i.columns.percent>0?a`
<div class=${t} data-actions=${o()} style=${e.directive()}>
${n.html("content",s.map(t=>t.html()))}
</div>
`:"")}let W=C;return o(s.subscribe(`config.templates.${h}`,t=>{W=null!=t?t:C,a()})),()=>W({list:m,className:w,actions:D,styleMap:x,listColumns:y,slots:b,cache:d,html:l,vido:t,props:e})}
/**
* ListColumn component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class Ne{constructor(t,e){let i=!1,s=e.state.get("$data.elements.list-columns");void 0===s&&(s=[],i=!0),s.includes(t)||(s.push(t),i=!0),i&&e.state.update("$data.elements.list-columns",s,{only:null})}destroy(t,e){e.state.update("$data.elements.list-columns",e=>e.filter(e=>e!==t),{only:null})}}function He(t,e){const{api:i,state:s,onDestroy:o,onChange:n,cache:a,Actions:r,update:l,createComponent:c,reuseComponents:d,html:h,StyleMap:u}=t,m=[];let f,g;m.push(s.subscribe("config.components.ListColumnRow",t=>f=t)),m.push(s.subscribe("config.components.ListColumnHeader",t=>g=t));const p=Object.assign(Object.assign({},e),{api:i,state:s,componentName:"list-column"}),v={column:e.column,state:s,api:i,componentName:"list-column-headers"},w={api:i,state:s,componentName:"list-column-rows"},b="list-column",y=b+"-rows",x=b+"-rows-offset",P=i.getActions(b),$=i.getActions(y),D=i.getClass(b,e.column.id),C=i.getClass(x,e.column.id),W=i.getClass(y,e.column.id);let I,A=i.getId(b,e&&e.column?e.column.id:"");const S=new u({width:"","--width":""}),M=new u({height:""}),_=new u({"margin-top":"0px"});let R=s.get("config.additionalSpace");const G=i.generateSlots(b,t,e);let T;function L(){if(!e||!e.column)return;const t=s.get("config.list");if(!t.columns.data[e.column.id])return;I=t.columns.data[e.column.id].width*t.columns.percent*.01,T=I;const o=Math.round(i.getRealChartHeight());S.style.width=T+"px",S.style["--width"]=T+"px",_.style.height=o+"px",M.style.top=s.get("config.headerHeight")+R.top+"px"}o(s.subscribeAll(["config.list.columns.percent","config.list.columns.resizer.width","$data.chart.dimensions.width","$data.chart.dimensions.heightWithoutScrollBar","$data.list.width","$data.list.visibleRowsHeight","config.additionalSpace.top"],L,{group:!0}));const z=c(g,e);o(z.destroy);const O=[],k={};function N(){var t;if(!e||!e.column)return;s.mute(N);const o=s.get("$data.list.visibleRows")||[],n=i.getRows(o),a=i.getRowsData();for(const i of n){const s=k[i.id]=null!==(t=k[i.id])&&void 0!==t?t:{};s.column=e.column,s.row=i,s.rowData=a[i.id],s.width=T}for(const t in k)o.includes(t)||delete k[t];d(O,n,t=>t&&k[t.id],f,!0),G.change(e),s.unmute(N)}n(t=>{if((e=t)&&e.column&&e.column.id){A=i.getId(b,e&&e.column?e.column.id:"");for(const t in e)p[t]=e[t];L(),z.change(e),N()}}),o(s.subscribeAll(["$data.list.visibleRows","$data.list.visibleRowsHeight","$data.list.rows","config.list.rows","config.chart.items.*.height","config.chart.items.*.rowId","config.chart.items.*.time"],N,{group:!0,bulkValue:!1})),o(s.subscribe("$data.scroll.vertical.preciseOffset",t=>{_.style.transform=`translateY(${Math.round(t)||0}px)`,l()})),o(s.subscribe("config.additionalSpace",t=>{R=t})),o(()=>{O.forEach(t=>t.destroy()),m.forEach(t=>t())}),P.push(Ne);const H=r.create(P,v),V=r.create($,w);function E({className:t,classNameOffset:e,classNameContainer:i,containerStyleMap:s,offsetStyleMap:o,widthStyleMap:n,visibleRows:a,rowActions:r,elId:l,headerActions:c,ListColumnHeader:d,html:h,cache:u,vido:m,props:f}){return f&&f.column?G.html("outer",h`
<div
class=${t}
data-gstcid=${f.column.id}
data-actions=${c()}
style=${n.directive()}
>
${G.html("inner",h` ${d.html()}${G.html("container-outer",h`
<div
class=${i}
data-gstcid=${f.column.id}
data-actions=${r()}
style=${s.directive()}
>
${G.html("container-inner",h`
<div class=${e} data-gstcid=${f.column.id} style=${o.directive()}>
${G.html("content",a.map(t=>t.html()))}
</div>
`)}
</div>
`)} `)}
</div>
`):null}let B=E;return o(s.subscribe(`config.templates.${b}`,t=>{B=null!=t?t:E,l()})),()=>B({classNameOffset:C,offsetStyleMap:_,visibleRows:O,classNameContainer:W,containerStyleMap:M,rowActions:V,className:D,elId:A,headerActions:H,widthStyleMap:S,ListColumnHeader:z,html:h,cache:a,vido:t,props:e})}
/**
* ListColumnHeader component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Ve(t,e){const{api:i,state:s,onDestroy:o,cache:n,onChange:a,Actions:r,update:l,createComponent:c,html:d,StyleMap:h}=t,u="list-column-header",m=Object.assign(Object.assign({},e),{api:i,state:s,componentName:u}),f=i.getActions(u),g=[];let p;g.push(s.subscribe("config.components.ListColumnHeaderResizer",t=>p=t));const v=c(p,e);let w;g.push(s.subscribe("config.components.ListColumnRowExpander",t=>w=t));const b=c(w,e);o(()=>{v.destroy(),b.destroy(),g.forEach(t=>t())});const y=i.generateSlots(u,t,e),x=i.getClass(u),P=i.getClass(u+"-content");let $=i.getId(u,e.column.id);a(t=>{e=t;for(const t in e)m[t]=e[t];$=i.getId(u,e.column.id),v.change(e),b.change(e),y.change(t)});const D=new h({height:"","--height":"","--paddings-count":""});o(s.subscribe("config.headerHeight",()=>{const t=s.get("config");D.style.height=t.headerHeight+"px",D.style["--height"]=t.headerHeight+"px",D.style["--paddings-count"]="1",l()}));const C=r.create(f,m);function W({className:t,contentClass:e,styleMap:i,elId:s,cache:o,ListColumnRowExpander:n,ListColumnHeaderResizer:a,actions:r,slots:l,html:c,vido:d,props:h}){return!h||!h.column?null:l.html("outer",c`
<div
class=${t}
data-gstcid=${h.column.id}
style=${i.directive()}
data-actions=${r()}
>
${l.html("content",h.column.expander?c`
<div class=${e}>
${n.html(h.column)}${a.html(h.column)}
</div>
`:c` <div class=${e}>${a.html(h.column)}</div> `)}
</div>
`)}let I=W;return o(s.subscribe(`config.templates.${u}`,t=>{I=null!=t?t:W,l()})),()=>I({className:x,contentClass:P,cache:n,styleMap:D,elId:$,ListColumnRowExpander:b,ListColumnHeaderResizer:v,actions:C,slots:y,html:d,vido:t,props:e})}
/**
* ListColumnHeaderResizer component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Ee(t,e){const{api:i,state:s,onDestroy:o,cache:n,update:a,html:r,Actions:l,onChange:c,PointerAction:d,StyleMap:h,unsafeHTML:u}=t,m="list-column-header-resizer",f=i.getActions(m),g=i.getActions(m+"-dots"),p={up:"",down:""};let v,w,b,y;o(s.subscribe("config.list.sort.icons",t=>{p.up=i.getSVGIconSrc(t.up),p.down=i.getSVGIconSrc(t.down)})),v=i.getClass(m),w=i.getClass(m+"-container"),b=i.getClass(m+"-dots"),y=i.getClass(m+"-dots-dot");const x=i.getClass(m+"-sort-icon");let P;const $=new h({});let D=!1;const C=i.generateSlots(m,t,e);let W=!0,I=0;const A={componentName:m,column:e.column,api:i,state:s,pointerOptions:{axis:"x",onMove:function({movementX:t,event:i}){if(!W)return;t&&(i.preventDefault(),i.stopPropagation());let o=s.get("config.list.columns.minWidth");"number"==typeof e.column.minWidth&&(o=e.column.minWidth),I+=t,I<o&&(I=o),D&&s.update(`config.list.columns.data.${e.column.id}.width`,I)}}};function S(){if(!e||!e.column||!e.column.id)return;A.column=e.column,v=i.getClass(m,e.column.id),w=i.getClass(m+"-container",e.column.id),b=i.getClass(m+"-dots",e.column.id),y=i.getClass(m+"-dots-dot",e.column.id),W=!("resizer"in e.column)||e.column.resizer;const t=s.get("config.list");P=I=e.column.width*t.columns.percent*.01,$.style["--width"]=t.columns.resizer.width+"px",D=t.columns.resizer.inRealTime,s.update("$data.list.width",P),C.change(e),a()}c(t=>{e=t,S()}),o(s.subscribeAll(["config.list.columns.percent","config.list.columns.resizer.width","config.list.columns.resizer.inRealTime"],S,{group:!0}));let M=[1,2,3,4,5,6,7,8];o(s.subscribe("config.list.columns.resizer.dots",t=>{M=[];for(let e=0;e<t;e++)M.push(e);a()}));let _=!0;function R(){e.column.sortable&&(_=!_,s.update("config.list.sort",t=>(t.activeColumnId=e.column.id,t.asc=_,t)))}let G=!1;o(s.subscribe("config.list.sort",t=>{if(t.activeColumnId===e.column.id)return _=t.asc,void(G=!0);G=!1})),g.push(d);const T=l.create(f,A),L=l.create(g,A);function z({className:t,containerClass:e,iconClass:i,dotsClass:s,dotClass:o,dotsStyleMap:n,dots:a,onLabelClick:r,dotsActions:l,resizer:c,icons:d,sortActive:h,cache:u,asc:m,actions:f,slots:g,html:p,unsafeHTML:v,vido:w,props:b}){const y=!b||!b.column;function x(){return b.column.sortable&&h?m?p` <img src="${d.down}" class=${i} /> `:p` <img src="${d.up}" class=${i} /> `:null}function P(){return y?null:"function"==typeof b.column.header.content?b.column.header.content({column:b.column,vido:w}):b.column.header.content}return y?null:g.html("outer",p`
<div class=${t} data-gstcid=${b.column.id} data-actions=${f()}>
${g.html("container-outer",c?y?null:p`
<div class=${e} @click=${r}>
${g.html("content",b.column.header.html?v(b.column.header.html):P())}
${x()}
</div>
<div class=${s} style=${n.directive()} data-actions=${l()}>
${a.map(()=>p` <div class=${o} /> `)}
</div>
`:y?null:p`
<div class=${e} @click=${r}>
${g.html("content",b.column.header.html?v(b.column.header.html):P())}
${x()}
</div>
`)}
</div>
`)}let O=z;return o(s.subscribe(`config.templates.${m}`,t=>{O=null!=t?t:z,a()})),()=>O({className:v,containerClass:w,onLabelClick:R,iconClass:x,cache:n,dotsClass:b,dotsStyleMap:$,dotsActions:L,dots:M,dotClass:y,resizer:W,icons:p,sortActive:G,asc:_,actions:T,slots:C,html:r,unsafeHTML:u,vido:t,props:e})}
/**
* ListColumnRow component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class Be{constructor(t,e){let i=e.state.get("$data.elements.list-column-rows"),s=!1;void 0===i&&(s=!0,i=[]),i.includes(t)||(i.push(t),s=!0),s&&e.state.update("$data.elements.list-column-rows",i,{only:null})}destroy(t,e){e.state.update("$data.elements.list-column-rows",e=>e.filter(e=>e!==t),{only:null})}}function Ye(t,e){const{api:i,state:s,onDestroy:o,cache:n,Actions:a,update:r,html:l,createComponent:c,onChange:d,StyleMap:h,unsafeHTML:u}=t,m="list-column-row",f=Object.assign(Object.assign({},e),{api:i,state:s,componentName:m});let g,p=!1;o(s.subscribe("config.components.ListColumnRowExpander",t=>g=t));const v=new h(e.column.expander?{height:"",top:"","--height":"","--expander-padding-width":"","--expander-size":""}:{height:"",top:"","--height":""}),w=c(g,{row:e.row}),b=i.getClass(m),y=i.getClass(m+"-content");let x=i.getClass(m);const P=i.generateSlots(m,t,e);let $;d(function(o,n){var a;if(n.leave||!o||void 0===o.row||void 0===o.column)return p=!0,P.change(o,n),void r();p=!1,e=o;for(const t in e)f[t]=e[t];if(!e.column||!e.row||!e.rowData)return p=!0,P.change(o,n),void r();if(void 0===e.column||void 0===e.row)return;$=e.column.isHTML?void 0===e.row?null:"function"==typeof e.column.data?u(e.column.data({row:e.row,vido:t})):"function"==typeof e.row[e.column.data]?u(e.row[e.column.data]({row:e.row,vido:t})):"string"==typeof e.row[e.column.data]?u(e.row[e.column.data]):null:void 0===e.row?null:"function"==typeof e.column.data?e.column.data({row:e.row,vido:t}):"function"==typeof e.row[e.column.data]?e.row[e.column.data]({row:e.row,vido:t}):e.row[e.column.data];const l=s.get("config.list.expander");for(const t in v.style)delete v.style[t];v.style.height=e.rowData.outerHeight+"px",v.style["--height"]=e.rowData.outerHeight+"px",e.column.expander&&(v.style["--expander-padding-width"]=l.padding*(e.rowData.parents.length+1)+"px");const c=s.get("config.list.rows");for(const t of e.rowData.parents){const e=c[t];if("object"==typeof e.style&&"object"==typeof e.style.children){const t=e.style.children;for(const e in t)v.style[e]=t[e]}}if(null===(a=null==e?void 0:e.row)||void 0===a?void 0:a.style)for(const t in e.row.style)v.style[t]=e.row.style[t];if(e.row.classNames){if(Array.isArray(e.row.classNames)&&e.row.classNames.length)x=i.getClass(m)+" "+e.row.classNames.join(" ");else if("function"==typeof e.row.classNames){const s=e.row.classNames({row:e.row,vido:t});Array.isArray(s)&&s.length&&(x=i.getClass(m)+" "+s.join(" "))}}else x=b;w&&w.change(e),P.change(e,n),r()}),o(()=>{w&&w.destroy()});const D=i.getActions(m);D.includes(Be)||D.push(Be);const C=a.create(D,f);function W({classNameCurrent:t,classNameContent:e,styleMap:i,cache:s,shouldDetach:o,content:n,ListColumnRowExpander:a,slots:r,actions:l,html:c,vido:d,props:h}){return o||!h||!h.column||!h.row?null:r.html("outer",c`
<div
class=${t}
data-gstcid=${h.row.id}
style=${i.directive()}
data-actions=${l()}
>
${r.html("inner",c`
${h.column.expander?a.html():null}
<div class=${e}>${r.html("content",n)}</div>
`)}
</div>
`)}let I=W;return o(s.subscribe(`config.templates.${m}`,t=>{I=null!=t?t:W,r()})),()=>I({classNameCurrent:x,cache:n,shouldDetach:p,styleMap:v,ListColumnRowExpander:w,classNameContent:y,slots:P,actions:C,content:$,html:l,vido:t,props:e})}
/**
* ListColumnRowExpander component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function je(t,e){const{api:i,state:s,onDestroy:o,Actions:n,html:a,cache:r,createComponent:l,onChange:c,update:d}=t,h="list-column-row-expander",u=i.getActions(h),m=Object.assign(Object.assign({},e),{api:i,state:s,componentName:h}),f=i.getClass(h);let g;const p=s.subscribe("config.components.ListColumnRowExpanderToggle",t=>g=t),v=l(g,e);o(()=>{v.destroy(),p()});const w=i.generateSlots(h,t,e);e.row&&c(function(t){if((e=t)&&e.row&&e.rowData){for(const t in e)m[t]=e[t];v.change(e),w.change(t),d()}});const b=n.create(u,m);function y({className:t,ListColumnRowExpanderToggle:e,slots:i,actions:s,html:o,cache:n,vido:a,props:r}){return!r?null:i.html("outer",o`
<div class=${t} data-gstcid=${r.row?r.row.id:""} data-action=${s()}>
${i.html("content",e.html())}
</div>
`)}let x=y;return o(s.subscribe(`config.templates.${h}`,t=>{x=null!=t?t:y,d()})),()=>x({className:f,ListColumnRowExpanderToggle:v,slots:w,actions:b,html:a,cache:r,vido:t,props:e})}
/**
* ListColumnRowExpanderToggle component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Fe(t,e){const{api:i,state:s,cache:o,onDestroy:n,Actions:a,update:r,html:l,onChange:c}=t,d="list-column-row-expander-toggle",h=Object.assign(Object.assign({},e),{api:i,state:s,componentName:d}),u=i.getActions(d),m=i.getClass(d),f=i.getClass(d+"-child"),g=i.getClass(d+"-open"),p=i.getClass(d+"-closed");let v,w,b,y=!1;n(s.subscribe("$data.list.expander.icons",t=>{t&&(v=t.child,w=t.open,b=t.closed),r()}));const x=i.generateSlots(d,t,e);e.row?(c(function(t){if(e&&e.row){e=t;for(const t in e)h[t]=e[t];y=e.row.expanded,x.change(t),r()}}),n(function(){})):n(s.subscribe("config.list.rows.*.expanded",function(t){for(const e of t)if(e.value){y=!0;break}r()},{bulk:!0}));const P=a.create(u,h);function $(){y=!y,e.row?s.update(`config.list.rows.${e.row.id}.expanded`,y,{data:{name:"expanded",rowId:e.row.id,expanded:y}}):s.update("config.list.rows",t=>{for(const e in t)t[e].expanded=y;return t},{only:["*.expanded"],data:{name:"expanded"}})}function D({className:t,classNameChild:e,classNameOpen:i,classNameClosed:s,expanded:o,iconChild:n,iconOpen:a,iconClosed:r,toggle:l,cache:c,slots:d,actions:h,html:u,vido:m,props:f}){return!f?null:d.html("outer",u`
<div
class=${t}
data-gstcid=${f.row?f.row.id:""}
data-action=${h()}
@click=${l}
>
${d.html("content",n?0===(null===(p=null===(g=f.rowData)||void 0===g?void 0:g.children)||void 0===p?void 0:p.length)?u` <img width="16" height="16" class=${e} src=${n} /> `:o?u` <img width="16" height="16" class=${i} src=${a} /> `:u` <img width="16" height="16" class=${s} src=${r} /> `:"")}
</div>
`);var g,p}let C=D;return n(s.subscribe(`config.templates.${d}`,t=>{C=null!=t?t:D,r()})),()=>C({className:m,classNameChild:f,iconChild:v,expanded:y,cache:o,classNameOpen:g,classNameClosed:p,iconOpen:w,iconClosed:b,toggle:$,slots:x,actions:P,html:l,vido:t,props:e})}
/**
* ListToggle component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Je(t,e={}){const{html:i,onDestroy:s,api:o,state:n,update:a,StyleMap:r,Actions:l,onChange:c}=t,d="list-toggle",h=o.getClass(d),u=Object.assign(Object.assign({},e),{api:o,state:n,componentName:d});let m={open:"",close:""};s(n.subscribe("$data.list.toggle.icons",t=>{t&&(m=t,a())}));const f=new r({top:"0px"});s(n.subscribe("$data.scroll.vertical.preciseOffset",t=>{f.style.top=(-1*Math.round(t)||0)+"px"}));let g=!0;s(n.subscribe("config.list.columns.percent",t=>g=0!==t));let p=!1;function v(){p=!0}function w(){p&&(p=!1,n.update("config.list.columns.percent",t=>0===t?100:0))}c(t=>{e=t;for(const i in t)u[i]=e[i]});const b=o.getActions(d),y=l.create(b,u),x=o.generateSlots(d,t,e);function P({className:t,styleMap:e,pointerDown:i,pointerUp:s,open:o,toggleIconsSrc:n,actions:a,slots:r,html:l,vido:c,props:d}){return r.html("outer",l`
<div
class=${t}
style=${e.directive()}
@pointerdown=${i}
@pointerup=${s}
actions=${a()}
>
${r.html("content",l` <img src=${o?n.close:n.open} /> `)}
</div>
`)}let $=P;return s(n.subscribe(`config.templates.${d}`,t=>{$=null!=t?t:P,a()})),()=>$({className:h,styleMap:f,pointerDown:v,pointerUp:w,open:g,toggleIconsSrc:m,actions:y,slots:x,html:i,vido:t,props:e})}
/**
* Chart component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Ue(t,e={}){const{api:i,state:s,onDestroy:o,Actions:n,html:a,createComponent:r,update:l}=t,c="chart",d=[];let h,u,m;d.push(s.subscribe("config.components.ChartCalendar",t=>h=t)),d.push(s.subscribe("config.components.ChartTimeline",t=>u=t)),d.push(s.subscribe("config.components.ScrollBar",t=>m=t));const f=r(h);o(f.destroy);const g=r(u);o(g.destroy);const p=r(m,{type:"horizontal"});o(p.destroy);const v=r(m,{type:"vertical"});o(v.destroy),o(()=>{d.forEach(t=>t())});const w=i.getClass(c),b=i.getActions(c);let y=!1;o(s.subscribe("config.chart.time.calculatedZoomMode",t=>{y=t,l()}));const x={handleEvent:function(t){t.type},passive:!1,capture:!1};let P,$=0,D=0;b.push(function(t){return P||(P=new ResizeObserver(()=>{if(!1===t.isConnected)return;const e=Math.max(0,t.offsetWidth),i=Math.max(0,t.offsetHeight),o=e-s.get("config.scroll.horizontal.width"),n=s.get("config.headerHeight");$===e&&D===i||($=e,D=i,s.update("$data.chart.dimensions",t=>(t.width=e,t.widthWithoutScrollBar=o,t.height=i,t.innerHeight=i-n,t)))}),P.observe(t),s.update("$data.elements.chart",t)),()=>{P&&(P.disconnect(),P=null)}}),o(()=>{P&&(P.disconnect(),P=null)});const C={api:i,state:s,componentName:c},W=n.create(b,C),I=i.generateSlots(c,t,e);function A({className:t,onWheel:e,ChartCalendar:i,ChartTimeline:s,ScrollBarVertical:o,calculatedZoomMode:n,ScrollBarHorizontal:a,actions:r,slots:l,html:c,vido:d,props:h}){return l.html("outer",c`
<div class=${t} data-actions=${r()} @wheel=${e}>
${l.html("content",c`
${i.html()}${s.html()}${o.html()}
${n?null:a.html()}
`)}
</div>
`)}let S=A;return o(s.subscribe(`config.templates.${c}`,t=>{S=null!=t?t:A,l()})),()=>S({className:w,onWheel:x,ChartCalendar:f,ChartTimeline:g,ScrollBarVertical:v,calculatedZoomMode:y,ScrollBarHorizontal:p,actions:W,slots:I,html:a,vido:t,props:e})}
/**
* ChartCalendar component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Xe(t,e){const{api:i,state:s,onDestroy:o,Actions:n,update:a,reuseComponents:r,html:l,StyleMap:c}=t,d="chart-calendar",h=i.getActions(d),u=Object.assign(Object.assign({},e),{api:i,state:s,componentName:d}),m=s.get("config.components.ChartCalendarDate"),f=i.getClass(d);let g;const p=new c({height:"","--headerHeight":"","margin-left":""});o(s.subscribe("config.headerHeight",t=>{g=t,p.style.height=g+"px",p.style["--calendar-height"]=g+"px",a()}));let v=[],w=0;o(s.subscribeAll(["$data.chart.time.levels","config.chart.time","$data.chart.time","config.chart.calendarLevels"],()=>{const t=s.get("$data.chart.time.levels");let e=0;if(t.length!==w){w=t.length,v.forEach(t=>t.forEach(t=>t.destroy())),v=[];for(let t=0;t<w;t++)v.push([])}for(const s of t){if(!s.length)continue;let t="YYYY-MM-DD HH";switch(s[0].period){case"day":t="YYYY-MM-DD";break;case"week":t="YYYY-MM-ww";break;case"month":t="YYYY-MM";break;case"year":t="YYYY"}const o=i.time.date().format(t);r(v[e],s,i=>i&&{level:e,date:i,currentDate:o,currentDateFormat:t},m,!0),e++}a()},{bulk:!0,bulkValue:!1})),o(()=>{v.forEach(t=>t.forEach(t=>t.destroy()))}),h.push(t=>{s.update("$data.elements.chart-calendar",t)});const b=n.create(h,u),y=i.generateSlots(d,t,e);function x({className:t,styleMap:e,components:i,actions:s,slots:o,html:n,vido:a,props:r}){return o.html("outer",n`
<div class=${t} data-actions=${s()} style=${e.directive()}>
${o.html("inner",i.length?i.map((e,i)=>e&&e.length?n`
<div class=${t+"-dates "+t+`-dates--level-${i}`}>
${o.html("content",e.map(t=>t.html()))}
</div>
`:null):null)}
</div>
`)}let P=x;return o(s.subscribe(`config.templates.${d}`,t=>{P=null!=t?t:x,a()})),()=>P({className:f,styleMap:p,components:v,actions:b,slots:y,html:l,vido:t,props:e})}
/**
* ChartCalendarDate component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class Ze extends ce{constructor(t,e){super(),e.state.update("$data.elements.chart-calendar-dates",e=>(void 0===e&&(e=[]),e.includes(t)||e.push(t),e))}}function Ke(t,e){const{api:i,state:s,onDestroy:o,Actions:n,update:a,onChange:r,html:l,StyleMap:c,cache:d}=t,h="chart-calendar-date",u=i.getActions(h),m=i.getClass(h);let f,g="",p="";r(()=>{f=s.get("config.chart.time")});const v=new c({width:"0px"},{schedule:!1});let w="";let b=!1;const y=i.generateSlots(h,t,e);let x,P;const $={date:e.date,period:e.period,api:i,state:s,componentName:h};r((t,i)=>{if(i.leave)return b=!0,y.change(t,i),a();b=!1,x=e.level===f.level,P=x?m+"--main-date ":m+"--non-main-date ",e=t,$.date=e.date,$.period=e.period,function(){if(!e||!e.date)return;const t=s.get(`config.chart.calendarLevels.${e.level}`);v.style.width=e.date.currentView.width+"px",v.style.left=e.date.currentView.leftPx+"px";const i=t.find(t=>+f.zoom<=+t.zoomTo);g=e.date.current?" gstc-current":e.date.next?" gstc-next":e.date.previous?" gstc-previous":"",p=m+"-content "+m+`-content--${e.date.period}`+g,i.classNames&&Array.isArray(i.classNames)?(p+=" "+i.classNames.join(" "),w=" "+i.classNames.join(" ")):w="",a()}(),y.change(t,i)}),u.includes(Ze)||u.push(Ze);const D=n.create(u,$);function C({className:t,mainClass:e,additionalClass:i,formatClassName:s,finalClassName:o,styleMap:n,cache:a,shouldDetach:r,actions:l,slots:c,html:d,vido:h,props:u}){return r||!u||!u.date?null:c.html("outer",d`
<div
class=${t+" "+t+`--${u.date.period} `+e+t+`--level-${u.level}`+i+s}
data-gstcid=${u.date.id}
style=${n.directive()}
data-actions=${l()}
>
${c.html("content",d`<div class=${o.trim()}>${u.date.formatted}</div>`)}
</div>
`)}let W=C;return o(s.subscribe(`config.templates.${h}`,t=>{W=null!=t?t:C,a()})),()=>W({className:m,mainClass:P,additionalClass:g,formatClassName:w,styleMap:v,finalClassName:p,cache:d,shouldDetach:b,actions:D,slots:y,html:l,vido:t,props:e})}
/**
* ChartTimeline component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function qe(t,e){const{api:i,state:s,onDestroy:o,Action:n,Actions:a,update:r,html:l,createComponent:c,StyleMap:d}=t,h="chart-timeline",u=Object.assign(Object.assign({},e),{api:i,state:s,componentName:h});let m,f,g;o(s.subscribe("config.components.ChartTimelineGrid",t=>{m&&m.destroy(),m=c(t)})),o(()=>{m&&m.destroy()}),o(s.subscribe("config.components.ChartTimelineItems",t=>{f&&f.destroy(),f=c(t)})),o(()=>{f&&f.destroy()}),o(s.subscribe("config.components.ListToggle",t=>{g&&g.destroy(),g=c(t)})),o(()=>{g&&g.destroy()});const p=i.generateSlots(h,t,e),v=i.getClass(h),w=i.getClass(h+"-inner");let b;o(s.subscribe("config.list.toggle.display",t=>b=t));const y=new d({}),x=new d({});let P,$;o(s.subscribe("config.additionalSpace",t=>{P=t,r()})),o(s.subscribe("config.headerHeight",t=>{$=t,r()})),o(s.subscribeAll(["$data.chart.dimensions.heightWithoutScrollBar","$data.scroll.vertical.offset","$data.chart.dimensions.width","$data.list.visibleRowsHeight","$data.chart.time.dates.day","config.headerHeight","config.additionalSpace"],function(){const t=s.get("$data.chart.dimensions.width"),e=Math.round(i.getRealChartHeight(!0));y.style.height=s.get("config.innerHeight")+"px",y.style["--height"]=y.style.height,y.style.top=P.top+$+"px",t?(y.style.width=t+"px",y.style["--width"]=t+"px"):(y.style.width="0px",y.style["--width"]="0px"),x.style.height=e+"px",x.style.width=t?t+"px":"0px";const o=s.get("$data.scroll.vertical.preciseOffset")||0;x.style.transform=`translateY(${Math.round(o)}px)`,r()},{group:!0,bulkValue:!1}));let D=[];o(s.subscribe("config.actions.chart-timeline",t=>{D=t})),D.push(class extends n{constructor(t){super();s.get("$data.elements.chart-timeline")!==t&&s.update("$data.elements.chart-timeline",t)}});const C=a.create(D,u);function W({className:t,classNameInner:e,styleMap:i,innerStyleMap:s,Grid:o,Items:n,showToggle:a,ListToggle:r,actions:l,slots:c,html:d,vido:h,props:u}){return c.html("outer",d`
<div class=${t} style=${i.directive()} data-actions=${l()}>
${c.html("inner",d`
<div class=${e} style=${s.directive()}>
${c.html("content",d` ${o.html()}${n.html()}${a?r.html():""} `)}
</div>
`)}
</div>
`)}let I=W;return o(s.subscribe(`config.templates.${h}`,t=>{I=null!=t?t:W,r()})),()=>I({className:v,styleMap:y,classNameInner:w,Grid:m,innerStyleMap:x,Items:f,showToggle:b,ListToggle:g,actions:C,slots:p,html:l,vido:t,props:e})}
/**
* ChartTimelineGrid component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class Qe{constructor(t,e){e.state.get("$data.elements.chart-timeline-grid")!==t&&e.state.update("$data.elements.chart-timeline-grid",t,{only:null})}destroy(t,e){e.state.update("$data.elements",t=>(delete t["chart-timeline-grid"],t),{only:null})}}function ti(t,e){const{api:i,state:s,onDestroy:o,Actions:n,update:a,html:r,reuseComponents:l,StyleMap:c}=t,d="chart-timeline-grid",h=i.getActions(d),u={api:i,state:s,componentName:d},m=s.get("config.components.ChartTimelineGridRow"),f=i.getClass(d);let g;o(s.subscribe("config.chart.grid.cell.onCreate",t=>g=t));const p=[],v={},w=new Map,b=new c({});function y(t){let e=t.month()+1;e<10&&(e="0"+e);let i=t.date();i<10&&(i="0"+i);let s=t.hour();s<10&&(s="0"+s);let o=t.minute();o<10&&(o="0"+o);let n=t.second();return n<10&&(n="0"+n),`${t.year()}-${e}-${i}T${s}-${o}-${n}`}o(s.subscribeAll(["$data.scroll.vertical.preciseOffset","$data.chart.dimensions.width","$data.chart.dimensions.heightWithoutScrollBar"],function(){const t=s.get("$data.chart.dimensions.width"),e=i.getRealChartHeight();b.style.height=Math.round(e)+"px",b.style.width=t+"px"},{group:!0}));let x="",P=0,$=0,D="",C=0,W="",I=0,A=0;function S(){const t=i.getGridRows();l(p,t||[],t=>t,m,!0),a()}o(s.subscribeAll(["$data.list.rowsHeight","$data.list.visibleRows","$data.list.visibleRowsHeight","$data.chart.time.levels","$data.scroll","config.list.rows;","config.list.rows.*;"],function(e,o){const n=s.get("$data.chart.time"),a=s.get(`$data.chart.time.levels.${n.level}`),r=n.levels[n.level];if(!r||!r.length)return;const l=n.levels[n.level].map(t=>t.currentView.width).join(",");if(!a||0===a.length)return void s.update("$data.chart.grid",{rows:{},cells:{}});const c=i.getRowsData(),d=s.get("$data.list.visibleRows"),h=d.map(t=>c[t].outerHeight).join("|"),u=d.join("|"),m=s.get("$data.scroll");if(u===x&&P===n.leftGlobal&&$===n.rightGlobal&&h===D&&C===a.length&&W===l&&m.horizontal.handlePosPx===I&&m.vertical.handlePosPx===A)return"$data.chart.time.levels"===o.path.listener?S():void 0;I=m.horizontal.handlePosPx,A=m.vertical.handlePosPx,P=n.leftGlobal,$=n.rightGlobal,W=l,D=h;let f=0;if(u!==x)for(const t in v)delete v[t];else if(C!==a.length)for(const t in v)v[t].cells.length=0;C=a.length;const p=i.getAllRows(),b=s.get("$data.chart.grid.cells");for(const t in b)delete b[t];for(const e of d){const i=p[e],s=c[e];if(!i||!s)continue;let o,n;u!==x?o=[]:(o=v[e].cells,o.length=0);for(const e of a){let n;w.has(e.leftGlobal)?n=w.get(e.leftGlobal):(n=y(e.leftGlobalDate),w.set(e.leftGlobal,n));const a=i.id+"-"+n;let r;if(b[a])r=b[a],r.id=a,r.time=e,r.row=i,r.rowData=s,r.top=f,r.vido=t,r.content=null;else{const o=Object.create(null);o.id=a,o.time=e,o.row=i,o.rowData=s,o.top=f,o.vido=t,o.content=null,r=o}for(const t of g)r.content=t(r);b[r.id]=r,o.push(r.id)}v[e]?(n=v[e],n.row=i,n.rowData=s,n.cells=o,n.top=f):n={row:i,rowData:s,cells:o,top:f},v[e]=n,f+=s.outerHeight}x=u,s.update("$data.chart.grid",{rows:v,cells:b})},{group:!0,bulkValue:!1})),o(s.subscribe("$data.chart.grid",S,{group:!0})),o(()=>{p.forEach(t=>t.destroy())}),h.push(Qe);const M=n.create(h,u),_=i.generateSlots(d,t,e);function R({className:t,styleMap:e,rowsComponents:i,actions:s,slots:o,html:n,vido:a,props:r}){return o.html("outer",n`
<div class=${t} data-actions=${s()} style=${e.directive()}>
${o.html("content",i.map(t=>t.html()))}
</div>
`)}let G=R;return o(s.subscribe(`config.templates.${d}`,t=>{G=null!=t?t:R,a()})),()=>G({className:f,styleMap:b,rowsComponents:p,actions:M,slots:_,html:r,vido:t,props:e})}
/**
* ChartTimelineGridRow component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class ei{constructor(t,e){let i=!1,s=e.state.get("$data.elements.chart-timeline-grid-rows");void 0===s&&(s=[],i=!0),s.includes(t)||(s.push(t),i=!0),i&&e.state.update("$data.elements.chart-timeline-grid-rows",s,{only:null})}destroy(t,e){e.state.update("$data.elements.chart-timeline-grid-rows",e=>e.filter(e=>e!==t),{only:null})}}function ii(t,e){const{api:i,state:s,onDestroy:o,cache:n,Actions:a,update:r,html:l,reuseComponents:c,onChange:d,StyleMap:h}=t,u="chart-timeline-grid-row",m=Object.assign(Object.assign({},e),{api:i,state:s,componentName:u});let f;o(s.subscribe("config.components.ChartTimelineGridRowCell",t=>f=t));const g=i.getActions(u),p=i.getClass(u),v=new h({height:e.row.height+"px"});let w=!1;const b=i.generateSlots(u,t,e),y=[];d(function(t,s){if(!t||s.leave||void 0===t.row)return w=!0,c(y,[],t=>t,f,!0),b.change(t,s),void r();w=!1,e=t;const o=i.getGridCells(e.cells);if(c(y,o,t=>t,f,!0),v.setStyle({}),v.style.height=e.rowData.outerHeight+"px",e.row.style)for(const t in e.row.style)v.style[t]=e.row.style[t];for(const t in e)m[t]=e[t];b.change(t,s)}),o(function(){y.forEach(t=>t.destroy())}),-1===g.indexOf(ei)&&g.push(ei);const x=a.create(g,m);function P({className:t,styleMap:e,rowsCellsComponents:i,cache:s,shouldDetach:o,actions:n,slots:a,html:r,vido:l,props:c}){return o||!c||!c.row?null:a.html("outer",r`
<div class=${t} data-gstcid=${c.row.id} data-actions=${n()} style=${e.directive()}>
${a.html("content",i.map(t=>t.html()))}
</div>
`)}let $=P;return o(s.subscribe(`config.templates.${u}`,t=>{$=null!=t?t:P,r()})),()=>$({className:p,styleMap:v,rowsCellsComponents:y,cache:n,shouldDetach:w,actions:x,slots:b,html:l,vido:t,props:e})}
/**
* ChartTimelineGridRowCell component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class si{constructor(t,e){let i=!1,s=e.state.get("$data.elements.chart-timeline-grid-row-cells");void 0===s&&(s=[],i=!0),s.includes(t)||(s.push(t),i=!0),i&&e.state.update("$data.elements.chart-timeline-grid-row-cells",s,{only:null})}destroy(t,e){e.state.update("$data.elements.chart-timeline-grid-row-cells",e=>e.filter(e=>e!==t),{only:[""]})}}function oi(t,e){const{api:i,state:s,cache:o,Actions:n,html:a,onChange:r,onDestroy:l,StyleMap:c,update:d}=t,h="chart-timeline-grid-row-cell",u=Object.assign(Object.assign({},e),{api:i,state:s,componentName:h});let m=!1;const f=i.getActions(h),g=i.generateSlots(h,t,e);let p;function v(t){p=i.getClass(h),t&&t.time&&t.time.current&&(p+=" current")}v(e);const w=new c({width:"",height:""});r(function(t,i){var s,o;if(!t||i.leave||void 0===t.row)return m=!0,g.change(t,i),void d();m=!1,e=t;for(const t in e)u[t]=e[t];if(v(e),w.setStyle({}),e&&e.row){if(w.style.width=((null===(o=null===(s=null==e?void 0:e.time)||void 0===s?void 0:s.currentView)||void 0===o?void 0:o.width)||0)+"px",e.row.style)for(const t in e.row.style)w.style[t]=e.row.style[t];g.change(e,i),d()}}),f.push(si);const b=n.create(f,u);function y({className:t,styleMap:e,cache:i,shouldDetach:s,actions:o,slots:n,html:a,vido:r,props:l}){var c;return s||!l||!l.id?null:n.html("outer",a`
<div class=${t} data-gstcid=${l.id} data-actions=${o()} style=${e.directive()}>
${n.html("content",null!==(c=l&&l.content)&&void 0!==c?c:null)}
</div>
`)}let x=y;return l(s.subscribe(`config.templates.${h}`,t=>{x=null!=t?t:y,d()})),()=>x({className:p,styleMap:w,cache:o,shouldDetach:m,actions:b,slots:g,html:a,vido:t,props:e})}
/**
* ChartTimelineItems component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function ni(t,e={}){const{api:i,state:s,onDestroy:o,Actions:n,update:a,html:r,reuseComponents:l,StyleMap:c}=t,d="chart-timeline-items";let h,u;o(s.subscribe(`config.actions.${d}`,t=>h=t)),o(s.subscribe("config.components.ChartTimelineItemsRow",t=>u=t));const m=i.getClass(d),f=new c({});let g;o(s.subscribeAll(["$data.chart.dimensions.heightWithoutScrollBar","$data.chart.dimensions.width","$data.scroll.vertical.preciseOffset"],function(){const t=s.get("$data.chart.dimensions.width"),e=i.getRealChartHeight();f.style.width=t+"px",f.style.height=e+"px"},{group:!0})),o(s.subscribe("config.debug",t=>g=t));const p=[],v={};o(s.subscribeAll(["$data.list.visibleRows","config.list.rows","config.components.ChartTimelineItemsRow","config.chart.items","$data.chart.items","$data.chart.time","$data.chart.viewPortVisibleItems","config.templates"],function t(e,o){s.mute(t),g&&console.log("[items.ts] Updating item & rows components.");const n=s.get("$data.list.visibleRows")||[],r=i.getRows(n),c=i.getRowsData();for(const t of r)v[t.id]||(v[t.id]={}),v[t.id].row=t,v[t.id].rowData=c[t.id];for(const t in v)n.includes(t)||delete v[t];l(p,r,t=>t?v[t.id]:null,u,!0),a(),s.unmute(t)},{group:!0,bulkValue:!1})),o(()=>{p.forEach(t=>t.destroy())});const w={api:i,state:s,componentName:d},b=n.create(h,w),y=i.generateSlots(d,t,e);function x({className:t,styleMap:e,rowsComponents:i,actions:s,slots:o,html:n,vido:a,props:r}){return o.html("outer",n`
<div class=${t} style=${e.directive()} data-actions=${s()}>
${o.html("content",i.map(t=>t.html()))}
</div>
`)}let P=x;return o(s.subscribe(`config.templates.${d}`,t=>{P=null!=t?t:x,a()})),()=>P({className:m,styleMap:f,rowsComponents:p,actions:b,slots:y,html:r,vido:t,props:e})}
/**
* ChartTimelineItemsRow component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class ai{constructor(t,e){let i=!1,s=e.state.get("$data.elements.chart-timeline-items-rows");void 0===s&&(s=[],i=!0),s.includes(t)||(s.push(t),i=!0),i&&e.state.update("$data.elements.chart-timeline-items-rows",s,{only:null})}destroy(t,e){e.state.update("$data.elements.chart-timeline-items-rows",e=>e.filter(e=>e!==t),{only:null})}}function ri(t,e){const{api:i,state:s,onDestroy:o,cache:n,Actions:a,update:r,html:l,onChange:c,reuseComponents:d,StyleMap:h}=t,u="chart-timeline-items-row",m=Object.assign(Object.assign({},e),{api:i,state:s,componentName:u});let f;o(s.subscribe("config.components.ChartTimelineItemsRowItem",t=>f=t));let g="";const p=[],v=new h({width:"",height:""});let w=!1;function b(t=e.rowData,i=null){const o=s.get("$data.chart");w=!1,v.style.width=o.dimensions.width+"px",e?(v.style.height=t.outerHeight+"px",v.style["--row-height"]=t.outerHeight+"px",r()):w=!0}function y(t,e){if(!t||!e)return w=!0,d(p,[],()=>null,f,!0),r();const s=e.items;if(void 0===s)return w=!0,d(p,[],()=>null,f,!0),b(),r();const o=i.getItems(s).filter(t=>i.isItemHorizontallyInViewport(t));d(p,o,e=>({row:t,item:e,itemData:e?i.getItemData(e.id):null}),f,!0),b(),r()}const x=i.getClass(u),P=i.generateSlots(u,t,e);c(function(i,s){if(s.leave||!i||void 0===i.row)return w=!0,d(p,[],()=>null,f,!0),P.change(i,s),r();e=i;for(const t in e)m[t]=e[t];if(e.row.classNames){if(Array.isArray(e.row.classNames)&&e.row.classNames.length)g=x+" "+e.row.classNames.join(" ");else if("function"==typeof e.row.classNames){const i=e.row.classNames({row:e.row,vido:t});Array.isArray(i)&&i.length&&(g=x+" "+i.join(" "))}}else g=x;y(e.row,e.rowData),P.change(i,s),r()}),o(s.subscribe("$data.chart.dimensions.width",()=>y(e.row,e.rowData))),o(()=>{p.forEach(t=>t.destroy())});const $=i.getActions(u);$.push(ai);const D=a.create($,m);function C({classNameCurrent:t,styleMap:e,shouldDetach:i,itemComponents:s,actions:o,slots:n,cache:a,html:r,vido:l,props:c}){return i||!c||!c.row?null:n.html("outer",r`
<div
class=${t}
data-gstcid=${c.row.id}
data-actions=${o()}
style=${e.directive()}
>
${n.html("content",s.map(t=>t.html()))}
</div>
`)}let W=C;return o(s.subscribe(`config.templates.${u}`,t=>{W=null!=t?t:C,r()})),()=>W({cache:n,shouldDetach:w,classNameCurrent:g,styleMap:v,itemComponents:p,actions:D,slots:P,html:l,vido:t,props:e})}
/**
* ChartTimelineItemsRowItem component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/class li{constructor(t,e){let i=!1,s=e.state.get("$data.elements.chart-timeline-items-row-items");void 0===s&&(s=[],i=!0),s.includes(t)||(s.push(t),i=!0),i&&e.state.update("$data.elements.chart-timeline-items-row-items",s,{only:null})}destroy(t,e){e.state.update("$data.elements.chart-timeline-items-row-items",e=>e.filter(e=>e!==t),{only:null})}}function ci(t,e){const{api:i,state:s,cache:o,onDestroy:n,Actions:a,update:r,html:l,onChange:c,unsafeHTML:d,StyleMap:h}=t;let u,m,f=0,g=0;n(s.subscribe("config.chart.spacing",t=>{"number"==typeof t?(g=t,f=0):("number"==typeof t.left&&(f=t.left),"number"==typeof t.right&&(g=t.right)),r()}));const p="chart-timeline-items-row-item";let v=0,w=0,b=!1,y="";const x=new h({width:"",height:"",left:"",top:""}),P=new h({}),$=new h({}),D={item:e.item,itemData:e.itemData,row:e.row,left:v,width:w,api:i,state:s,componentName:p},C=i.getClass(p),W=i.getClass(p+"-label"),I=i.generateSlots(p,t,e);let A,S=!1;n(s.subscribe("config.chart.item.cutIcons",t=>{A={left:i.getSVGIconSrc(t.left),right:i.getSVGIconSrc(t.right)}}));const M=i.getClass(`${p}-cut`)+" "+i.getClass(`${p}--left-cut-icon`),_=i.getClass(`${p}-cut-image`),R=()=>l`
<div class=${M} style=${P.directive()}>
<img src="${A.left}" width="18" height="18" class=${_} />
</div>
`,G=i.getClass(`${p}-cut`)+" "+i.getClass(`${p}--right-cut-icon`),T=i.getClass(`${p}-cut-image`),L=()=>l`
<div class=${G} style=${$.directive()}>
<img src="${A.right}" width="18" height="18" class=${T} />
</div>
`;c(function(o,n){if(n.leave||void 0===o.row||void 0===o.item)return b=!0,S=!0,I.change(o,n),r();S=!1,b=!1,(e=o).item.id===u&&e.row.id===m||(u=e.item.id,m=e.row.id),D.item=e.item,D.itemData=e.itemData,D.row=e.row,function(){var o;if(S)return r();const n=s.get("$data.chart.time");if(b||0===n.levels.length||!n.levels[n.level]||0===n.levels[n.level].length)return S=!0,r();if(!e.item||!e.itemData)return S=!0,r();if(!s.get().$data.chart.verticallyVisibleItems.includes(e.item.id))return S=!0,r();const a=e.itemData;if(v=a.position.actualLeft+f,w=a.actualWidth-g-f,e.item.time.end<n.leftGlobal||e.item.time.start>n.rightGlobal||w<=0)return S=!0,a.detached=S,r();if(y=C,e.item.time.start<n.leftGlobal?(P.style.display="flex",y+=" "+i.getClass(p+"--left-cut")):P.style.display="none",e.item.time.end>n.rightGlobal?($.style.display="flex",y+=" "+i.getClass(p+"--right-cut")):$.style.display="none",e.item.classNames)if(Array.isArray(e.item.classNames)&&e.item.classNames.length)y+=" "+e.item.classNames.join(" ");else if("function"==typeof e.item.classNames){const i=e.item.classNames({item:e.item,vido:t});Array.isArray(i)&&(y+=" "+i.join(" "))}const l=x.style.width,c=x.style.left,d=x.style.top,h=x.style.height;x.setStyle({});const u=i.isItemHorizontallyInViewport(e.item,n.leftGlobal,n.rightGlobal);if(S=!u,a.detached=S,u?(x.style.width=w+"px",x.style.left=v+"px",x.style.top=a.position.actualRowTop+"px",x.style.height=a.actualHeight+"px"):(x.style.width=l,x.style.left=c,x.style.top=d,x.style.height=h),null===(o=null==e?void 0:e.item)||void 0===o?void 0:o.style)for(const t in e.item.style)x.style[t]=e.item.style[t];D.left=v,D.width=w,r()}(),I.change(o,n),r()});const z=i.getActions(p);z.push(li);const O=a.create(z,D);function k(){return e.item?e.item.isHTML?e.item&&e.item.label?"function"==typeof e.item.label?d(e.item.label({item:e.item,vido:t})):"string"==typeof e.item.label?d(e.item.label):null:null:e.item&&e.item.label?"function"==typeof e.item.label?e.item.label({item:e.item,vido:t}):e.item.label:null:null}function N({className:t,labelClassName:e,styleMap:i,cache:s,shouldDetach:o,cutterLeft:n,cutterRight:a,getContent:r,actions:l,slots:c,html:d,vido:h,props:u}){return o||!u||!u.item?null:c.html("outer",d`
<div
class=${t}
data-gstcid=${u.item.id}
data-actions=${l()}
style=${i.directive()}
>
${c.html("inner",d`
${n()}
<div class=${e}>${c.html("content",r())}</div>
${a()}
`)}
</div>
`)}let H=N;return c(()=>{const t=s.get(`config.templates.${p}`);H=null!=t?t:N,r()}),()=>H({className:y,labelClassName:W,cache:o,shouldDetach:S,styleMap:x,cutterLeft:R,cutterRight:L,getContent:k,actions:O,slots:I,html:l,vido:t,props:e})}
/**
* Gantt-Schedule-Timeline-Calendar default configuration
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/const di=["main","scroll-bar","list","list-column","list-column-header","list-column-header-resizer","list-column-row","list-column-row-expander","list-column-row-expander-toggle","list-toggle","chart","chart-calendar","chart-calendar-date","chart-timeline","chart-timeline-grid","chart-timeline-grid-row","chart-timeline-grid-row-cell","chart-timeline-items","chart-timeline-items-row","chart-timeline-items-row-item"];function hi(){const t={};return di.forEach(e=>t[e]=[]),t}function ui(){const t={};return di.forEach(e=>t[e]=null),t}function mi(){const t={};return di.forEach(e=>{t[e]={outer:[],inner:[],"container-outer":[],"container-inner":[],content:[]}}),t}function fi(){const t=[{zoomTo:17,period:"day",periodIncrement:1,classNames:["gstc-date-medium gstc-date-left"],format:({timeStart:t})=>t.format("DD MMMM YYYY (dddd)")},{zoomTo:23,period:"month",periodIncrement:1,format:({timeStart:t})=>t.format("MMMM YYYY")},{zoomTo:24,period:"month",periodIncrement:1,format:({timeStart:t})=>t.format("MMMM 'YY")},{zoomTo:25,period:"month",periodIncrement:1,format:({timeStart:t})=>t.format("MMM YYYY")},{zoomTo:27,period:"year",periodIncrement:1,format:({timeStart:t})=>t.format("YYYY")},{zoomTo:100,period:"year",periodIncrement:1,format:()=>null}],e=[{zoomTo:9,period:"minute",classNames:["gstc-date-medium"],main:!0,periodIncrement:1,format:({timeStart:t})=>t.format("HH:mm")},{zoomTo:11,period:"minute",classNames:["gstc-date-medium"],main:!0,periodIncrement:5,format:({timeStart:t})=>t.format("HH:mm")},{zoomTo:12,period:"minute",classNames:["gstc-date-medium"],main:!0,periodIncrement:15,format:({timeStart:t})=>t.format("HH:mm")},{zoomTo:13,period:"minute",classNames:["gstc-date-medium"],main:!0,periodIncrement:30,format:({timeStart:t})=>t.format("HH:mm")},{zoomTo:16,period:"hour",classNames:["gstc-date-medium"],main:!0,periodIncrement:1,format:({timeStart:t})=>t.format("HH:mm")},{zoomTo:17,period:"hour",main:!0,periodIncrement:1,format:({timeStart:t})=>t.format("HH")},{zoomTo:19,period:"day",main:!0,periodIncrement:1,classNames:["gstc-date-medium"],format:({timeStart:t,className:e,vido:i})=>i.html`<span class="${e}-content gstc-date-bold">${t.format("DD")}</span> <span class="${e}-content gstc-date-thin">${t.format("dddd")}</span>`},{zoomTo:20,period:"day",main:!0,periodIncrement:1,format:({timeStart:t,vido:e,className:i})=>e.html`<div class="${i}-content gstc-date-top">${t.format("DD")}</div><div class="${i}-content gstc-date-small">${t.format("dddd")}</div>`},{zoomTo:21,period:"day",main:!0,periodIncrement:1,format:({timeStart:t,vido:e,className:i})=>e.html`<div class="${i}-content gstc-date-top">${t.format("DD")}</div><div class="${i}-content gstc-date-small">${t.format("ddd")}</div>`},{zoomTo:22,period:"day",main:!0,periodIncrement:1,classNames:["gstc-date-vertical"],format:({timeStart:t,className:e,vido:i})=>i.html`<div class="${e}-content gstc-date-top">${t.format("DD")}</div><div class="${e}-content gstc-date-extra-small">${t.format("ddd")}</div>`},{zoomTo:23,period:"week",main:!0,periodIncrement:1,format:({timeStart:t,timeEnd:e,className:i,vido:s})=>s.html`<div class="${i}-content gstc-date-top">${t.format("DD")} - ${e.format("DD")}</div><div class="${i}-content gstc-date-small gstc-date-thin">${t.format("ddd")} - ${e.format("dd")}</div>`},{zoomTo:25,period:"week",main:!0,periodIncrement:1,classNames:["gstc-date-vertical"],format:({timeStart:t,timeEnd:e,className:i,vido:s})=>s.html`<div class="${i}-content gstc-date-top gstc-date-small gstc-date-normal">${t.format("DD")}</div><div class="gstc-dash gstc-date-small">-</div><div class="${i}-content gstc-date-small gstc-date-normal">${e.format("DD")}</div>`},{zoomTo:26,period:"month",main:!0,periodIncrement:1,classNames:["gstc-date-month-level-1"],format:({timeStart:t,vido:e,className:i})=>e.html`<div class="${i}-content gstc-date-top">${t.format("MMM")}</div><div class="${i}-content gstc-date-small gstc-date-bottom">${t.format("MM")}</div>`},{zoomTo:27,period:"month",main:!0,periodIncrement:1,classNames:["gstc-date-vertical"],format:({timeStart:t,className:e,vido:i})=>i.html`<div class="${e}-content gstc-date-top">${t.format("MM")}</div><div class="${e}-content gstc-date-extra-small">${t.format("MMM")}</div>`},{zoomTo:28,period:"year",main:!0,periodIncrement:1,classNames:["gstc-date-big"],format:({timeStart:t})=>t.format("YYYY")},{zoomTo:29,period:"year",main:!0,periodIncrement:1,classNames:["gstc-date-medium"],format:({timeStart:t})=>t.format("YYYY")},{zoomTo:30,period:"year",main:!0,periodIncrement:1,classNames:["gstc-date-medium"],format:({timeStart:t})=>t.format("YY")},{zoomTo:100,period:"year",main:!0,periodIncrement:1,format:()=>null}];return{licenseKey:"",debug:!1,plugins:[],plugin:{},innerHeight:428,initialWidth:1024,additionalSpace:{top:0,bottom:0},headerHeight:72,autoInnerHeight:!1,components:{ScrollBar:Oe,List:ke,ListColumn:He,ListColumnHeader:Ve,ListColumnHeaderResizer:Ee,ListColumnRow:Ye,ListColumnRowExpander:je,ListColumnRowExpanderToggle:Fe,ListToggle:Je,Chart:Ue,ChartCalendar:Xe,ChartCalendarDate:Ke,ChartTimeline:qe,ChartTimelineGrid:ti,ChartTimelineGridRow:ii,ChartTimelineGridRowCell:oi,ChartTimelineItems:ni,ChartTimelineItemsRow:ri,ChartTimelineItemsRowItem:ci},slots:mi(),list:{rows:{},row:{height:40,gap:{top:0,bottom:0}},columns:{percent:100,resizer:{width:10,inRealTime:!0,dots:6},minWidth:50,data:{}},expander:{padding:18,size:20,icon:{width:16,height:16},icons:{child:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><ellipse ry="4" rx="4" id="svg_1" cy="12" cx="12" fill="#000000B0"/></svg>',open:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>',closed:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"/><path fill="none" d="M0 0h24v24H0V0z"/></svg>'}},toggle:{display:!0,icons:{open:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path stroke="null" d="m16.406954,16.012672l4.00393,-4.012673l-4.00393,-4.012673l1.232651,-1.232651l5.245324,5.245324l-5.245324,5.245324l-1.232651,-1.232651z"/><path stroke="null" d="m-0.343497,12.97734zm1.620144,0l11.341011,0l0,-1.954681l-11.341011,0l0,1.954681zm0,3.909362l11.341011,0l0,-1.954681l-11.341011,0l0,1.954681zm0,-9.773404l0,1.95468l11.341011,0l0,-1.95468l-11.341011,0z"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path transform="rotate(-180 4.392796516418457,12) " stroke="null" d="m1.153809,16.012672l4.00393,-4.012673l-4.00393,-4.012673l1.232651,-1.232651l5.245324,5.245324l-5.245324,5.245324l-1.232651,-1.232651z"/><path stroke="null" d="m9.773297,12.97734zm1.620144,0l11.341011,0l0,-1.954681l-11.341011,0l0,1.954681zm0,3.909362l11.341011,0l0,-1.954681l-11.341011,0l0,1.954681zm0,-9.773404l0,1.95468l11.341011,0l0,-1.95468l-11.341011,0z"/></svg>'}},sort:{compare:null,asc:!0,activeColumnId:null,icons:{up:'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline></svg>',down:'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline></svg>'}}},scroll:{bodyClassName:"gstc-scrolling",horizontal:{width:20,minInnerSize:40,multiplier:1,precise:!0,byPixels:!0},vertical:{width:20,minInnerSize:40,multiplier:1,precise:!0,byPixels:!0}},chart:{time:{period:"day",from:0,to:0,zoom:20,leftGlobal:0,centerGlobal:0,rightGlobal:0,calculatedZoomMode:!1,onLevelDates:[],onCurrentViewLevelDates:[],onDate:[],allDates:[],autoExpandTimeFromItems:!1,alignLevelsToMain:!0,timePerPixel:0,checkCurrentDateInterval:3e5,datesCache:{timePerPixel:0,levels:[]}},calendarLevels:[t,e],grid:{cell:{onCreate:[]}},item:{gap:{top:4,bottom:4},rowTop:0,height:32,minWidth:10,overlap:!1,cutIcons:{left:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1em" height="1em" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M20 9v6h-8v4.84L4.16 12L12 4.16V9h8z" fill="#ffffff"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>',right:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1em" height="1em" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M4 15V9h8V4.16L19.84 12L12 19.84V15H4z" fill="#ffffff"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>'}},items:{},spacing:4},actions:hi(),templates:ui(),locale:{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:0,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:t=>{const e=["th","st","nd","rd"],i=t%100;return`[${t}${e[(i-20)%10]||e[i]||e[0]}]`}},utcMode:!1,merge:(t,e)=>be.mergeDeep({},t,e),useLast:!0,Promise:Promise,mute:[],version:"3.43.14"}}const gi=be.mergeDeep;function pi(t){const e=fi();let i=function(t,e){return be.mergeDeep(t,e)};"function"==typeof t.merge&&(i=t.merge);const s=function(t,e,i){const s=i({},e.actions),o=i({},t.actions||{});let n=[...Object.keys(s),...Object.keys(o)];n=n.filter(t=>n.includes(t));const a={};for(const t of n)a[t]=[],void 0!==s[t]&&Array.isArray(s[t])&&(a[t]=[...s[t]]),void 0!==o[t]&&Array.isArray(o[t])&&(a[t]=[...a[t],...o[t]]);return delete t.actions,delete e.actions,a}(t,e,i),o={config:i(e,t)};return o.config.actions=s,o}t.extend(e),t.extend(i);const vi=!0;const wi=fi().locale,bi={name:"gstc",GSTCID:Ie.GSTCID,isGSTCID:Ie.isGSTCID,sourceID:Ie.sourceID,fromArray(t){const e=this.GSTCID,i={};for(const s of t)s.id=e(s.id),"rowId"in s&&(s.rowId=e(s.rowId)),"parentId"in s&&(s.parentId=e(s.parentId)),"dependant"in s&&(s.dependant=s.dependant.map(t=>e(t))),"linkedWith"in s&&(s.linkedWith=s.linkedWith.map(t=>e(t))),i[s.id]=s;return i},stateFromConfig:function(t){return this.state=new s(pi(t),{delimiter:".",useMute:vi,maxSimultaneousJobs:1e3,Promise:t.Promise,debug:!!t.debug,useCache:!1,useSplitCache:!0,useIndicesCache:!1,defaultBulkValue:!1})},wasmStateFromConfig:function(t){return o(this,arguments,void 0,function*(t,e="./wildcard_matcher_bg.wasm"){return this.state=new s(pi(t),{delimiter:".",useMute:vi,maxSimultaneousJobs:1e3}),yield this.state.loadWasmMatcher(e),this.state})},merge:gi,mergeDeep:gi,clone:function(t){return gi({},t)},lithtml:et,html:et,vido:Ce,date:(e,i=!1,s=gi({},wi))=>(t.locale(s,null,!0),i?e?t.utc(e).locale(s.name):t.utc().locale(s.name):e?t(e).locale(s.name):t().locale(s.name)),setPeriod(t){return this.state.update("config.chart.time.period",t),this.state.get("config.chart.time.zoom")},dayjs:t};
/**
* Main api
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/
function yi(t,e){const{api:i,onDestroy:s,state:o,update:n,StyleMap:a}=t,r=i.name,l=new Map;let c;s(o.subscribe("config.debug",t=>c=t));let d=!1;function h(t,e){"fullReload"!==e.options.data&&g.fullReload(e,t)}function u(t,e){var i;["config","config.chart.items"].includes(e.path.update)||"config.list.rows"===e.path.update&&"expanded"!==(null===(i=e.options.data)||void 0===i?void 0:i.name)||(["config.list.rows.*.parentId"].includes(e.path.listener)?function(t,e){"subscribe"!==e.type&&"sortRowsByColumn"!==e.options.data&&"fullReload"!==e.options.data&&g.partialReload(!0,e,t)}(t,e):function(t,e){"subscribe"!==e.type&&"fullReload"!==e.options.data&&g.partialReload(!1,e,t)}(t,e))}function m(t=null,e){e&&"subscribe"===e.type||e&&e.options.data&&"update-vertically-visible-items"===e.options.data||g.minimalReload(e,t)}function f(){l.forEach(t=>t()),l.clear(),c&&console.log("Plugins destroyed.")}var g={className:_e(r),styleMap:new a({}),initializePlugins(){s(o.subscribe("config.plugins",e=>{if(void 0!==e&&Array.isArray(e)){l.forEach((t,i)=>{e.includes(i)||(t(),l.delete(i))});for(const i of e){if(l.has(i))continue;let e=i(t);"function"!=typeof e&&Object.prototype.hasOwnProperty.call(e,"destroy")?e=e.destroy.bind(e):"function"!=typeof e&&(e=()=>{}),l.set(i,e)}}c&&console.log("Plugins initialized.")})),s(f)},heightChange(){if(i.isMutedMethod("heightChange"))return;const t=o.get("config"),e=o.get("config.scroll.horizontal.width"),s=t.innerHeight-e;o.multi(!0).update("$data.chart.dimensions.heightWithoutScrollBar",s).update("$data.chart.dimensions.innerHeight",t.innerHeight).update("$data.chart.dimensions.height",t.innerHeight+t.headerHeight).update("$data.height",t.innerHeight+t.headerHeight).done(),g.styleMap.style["--height"]=s+"px",g.styleMap.style.height=t.innerHeight+t.headerHeight+"px",i.calculateVerticalScrollSize(),n()},resizerActiveChange(t){d=t,g.className=_e(i.name),d&&(g.className+=` ${i.name}__list-column-header-resizer--active`),n()},generateTreeFromVisibleRows(){if(i.isMutedMethod("generateTreeFromVisibleRows"))return;const t=i.getVisibleRowsId(),e=i.getAllRows(),s=i.getRowsData(),o={},a=[];for(const i of t){e[i];const t=s[i];o[i]=t;for(const e of t.items)a.push(e)}i.makeTreeMap(o,a,!0),n()},generateTree(t=!0){let e=o.get("$data.list.rowsIds");if(!e)return;e=e.slice();const s=o.get("config.list.rows");if(!t)return g.generateTreeFromVisibleRows();i.fillEmptyRowValues(s);let n=i.getAllRows();const a=i.getRowsData(),r=o.get("config.chart.items");i.prepareItems(r),i.makeTreeMap(a,Object.keys(r)),n=i.sortRowsByChildren(Object.values(n).map(t=>t.id));o.get("config").list.rows=n;const l=Object.keys(n);o.update("$data.list.rowsIds",l),i.setAllRowsIdsCache(l)},prepareExpanded(){if(i.isMutedMethod("prepareExpanded"))return;const t=i.getAllRows();if(!t)return;const e=i.generateRowsWithParentsExpanded(t);o.update("$data.list.rowsWithParentsExpanded",e)},generateVisibleRowsAndItems(){if(i.isMutedMethod("generateVisibleRowsAndItems"))return;const t=i.getVisibleRows(),e=o.get("$data.list.visibleRows")||[];let s=!0;t.length!==e.length?s=!0:t.length&&(s=t.join("|")!==e.join("|"));let a=o.multi(!0);s&&(a=a.update("$data.list.visibleRows",t));const r=[],l=[],c=i.getRowsData(),d=o.get("config.chart.items");for(const e of t){const t=c[e];for(const e of t.items){r.push(e);const t=d[e];t&&i.isItemHorizontallyInViewport(t)&&l.push(e)}}a=a.update("$data.chart.verticallyVisibleItems",r),a=a.update("$data.chart.viewPortVisibleItems",l),a.done(),n()},updateItemsVerticalPositionsOfVisibleRows(){const t=i.getAllItems(),e=i.getItemsData(),s=i.getRowsData(),o=i.getVisibleRows();let n=[];for(const t of o){const e=s[t];e&&(n=n.concat(e.items))}for(const o of n){const n=t[o];n&&i.calculateItemVerticalPosition(o,e[o],s[n.rowId])}},getMutedListeners(){const t=[];return o.isMutedListener(h)&&t.push(h),o.isMutedListener(u)&&t.push(u),o.isMutedListener(m)&&t.push(m),t},triggerLoadedEvent(){Promise.resolve().then(()=>{const t=o.get("$data.elements.main");if(!t)return;const e=t.parentNode;if(!e)return;const i=new Event("gstc-loaded");t.dispatchEvent(i),e.dispatchEvent(i)})},getLastPageDatesWidth(t,e){if(0===e.length)return 0;let i=0,s=0;if(e.length){if(Math.ceil(e[e.length-1].rightPx)>t)for(let o=e.length-1;o>=0;o--){const n=e[o];if(i+=n.width,i>=t){i-=n.width;break}s++}}return o.update("$data.scroll.horizontal",t=>(t.lastPageSize=i,t.lastPageCount=s,t)),i},formatDate(e,i,s){const o=_e("chart-calendar-date");return e.format({timeStart:i.leftGlobalDate.locale(s),timeEnd:i.rightGlobalDate.locale(s),vido:t,className:o,props:{date:i}})},generatePeriodDates(t,e,s,n){const a=t.period,r=e.fromDate,l=e.toDate,c=o.get("config.locale.name");let d=i.time.generatePeriodDates({leftDate:r,rightDate:l,level:s,levelIndex:n,period:a,time:e,callOnDate:!1,callOnLevelDates:!0});d=i.time.recalculateDatesWidths(d,e),n!==e.level&&(d=i.time.alignLevelToMain(n,d,e)),d=i.time.recalculateDatesPositions(d,e,!1,!1);for(const e of d)e.formatted=g.formatDate(t,e,c);return d},limitGlobal:t=>(t.leftGlobal<t.from&&(t.leftGlobal=t.from,t.leftGlobalDate=i.time.date(t.leftGlobal),t.leftGlobal=t.leftGlobalDate.valueOf()),t.rightGlobal>t.to&&(t.rightGlobal=t.to,t.rightGlobalDate=i.time.date(t.rightGlobal),t.rightGlobal=t.rightGlobalDate.valueOf()),t),setCenter(t){let e=Math.floor(t.rightGlobalDate.diff(t.leftGlobalDate,"millisecond",!0)/2);const s=i.time.getRightViewDate(t);s&&(s.width!==s.currentView.width&&(e-=(s.width-s.currentView.width)*t.timePerPixel),t.centerGlobalDate=t.leftGlobalDate.add(e,"millisecond"),t.centerGlobal=t.centerGlobalDate.valueOf())},guessPeriod(t,e){if(!t.zoom)return t;for(const i of e){const e=i.find(e=>+t.zoom<=+e.zoomTo);e&&e.main&&(t.period=e.period)}return t},getFormatAndLevelIndexForZoom(t,e=o.get("config.chart.calendarLevels")){let i=0,s=0;for(const o of e){for(const e of o)if(e.main&&t<=e.zoomTo)return s=i,{levelIndex:s,format:e};i++}if(!s)throw new Error(`There is no main date format for zoom ${t}.`)},generateAllDates(t,e){if(!t.zoom)return[];t.allDates=new Array(e.length),i.time.stopCheckingCurrentDates();const{format:s,levelIndex:o}=g.getFormatAndLevelIndexForZoom(t.zoom,e);t.level=o,t.allDates[t.level]=g.generatePeriodDates(s,t,e[o],t.level);let n=0;for(const s of e){const e=s.find(e=>+t.zoom<=+e.zoomTo);n!==t.level&&(t.allDates[n]=g.generatePeriodDates(e,t,s,n)),i.time.setDatesCacheLevel(n,t.allDates[n],t),n++}return i.time.checkCurrentDates(!0,t),t.allDates},getPeriodDatesAndCalculateViewOffsetFromAllDates(t,e){if(!t.length)return[];const s=t.filter(t=>t.leftGlobal<e.rightGlobal&&t.rightGlobal>=e.rightGlobal||t.leftGlobal<=e.leftGlobal&&t.rightGlobal>e.leftGlobal||t.leftGlobal>=e.leftGlobal&&t.rightGlobal<=e.rightGlobal);if(!s.length)return[];let o=0;e.leftGlobal>s[0].leftGlobal&&(o=i.time.getDatesDiffPx(e.leftGlobalDate,s[0].leftGlobalDate,e,!0));let n=o;const a=s.length-1;return s.map((t,s)=>{if(t.currentView={leftPx:n,rightPx:n+t.width,width:t.width+o,leftGlobalDate:i.time.date(t.leftGlobal-o*e.timePerPixel),rightGlobalDate:i.time.date(t.rightGlobal),durationMs:0},t.currentView.durationMs=t.currentView.rightGlobalDate.valueOf()-t.currentView.leftGlobalDate.valueOf(),o=0,n+=t.width,s===a&&t.rightGlobal>e.rightGlobal){let s=0;t.currentView.leftPx<0&&(s=t.currentView.leftPx,t.currentView.leftPx=0),t.currentView.width=(e.rightGlobal+1-t.leftGlobal)/e.timePerPixel+s,t.currentView.rightPx=t.currentView.leftPx+t.currentView.width,t.currentView.rightGlobalDate=i.time.date(t.leftGlobal+t.currentView.width*e.timePerPixel)}return t})},updateLevels(t,e){t.levels=[],t.currentZoomLevelFormatting=[];let i=0;for(const s of e){const e=s.find(e=>+t.zoom<=+e.zoomTo);if(t.currentZoomLevelFormatting[i]=e,e.main&&(t.format=e,t.level=i),e){let o=g.getPeriodDatesAndCalculateViewOffsetFromAllDates(t.allDates[i],t);t.onCurrentViewLevelDates.forEach(n=>{o=n({dates:o,format:e,time:t,level:s,levelIndex:i})}),t.levels.push(o)}i++}},updateLocale(){const t=o.get("$data.chart.time"),e=o.get("config.locale.name");let i=0;for(const s of t.allDates){const o=t.currentZoomLevelFormatting[i];for(const t of s)t.formatted=g.formatDate(o,t,e);i++}i=0;for(const s of t.levels){const o=t.currentZoomLevelFormatting[i];for(const t of s)t.formatted=g.formatDate(o,t,e);i++}n()},calculateTotalViewDurationFromDates(t){let e=0,i=0;for(const s of t.allDates[t.level])e+=s.width,i+=s.rightGlobal+1-s.leftGlobal;t.totalViewDurationPx=e,t.totalViewDurationMs=i},calculateRightGlobal(t,e,s,n,a){const r=o.get("$data.chart.time"),l=t.endOf(r.period).valueOf(),c=i.time.findDateAtTime(l,s);if(!c)return t.valueOf();let d=s.indexOf(c),h=c.leftGlobal,u=0;for(let t=s.length;d<t;d++){const t=s[d];if(h=t.rightGlobal,u+=t.width,u+n>=e)break}return h+a},updateViewPortVisibleItems(t=!1,e=o.get("$data.chart.time")){const s=o.get("$data.chart.verticallyVisibleItems"),n=i.getItems(s);if(!n)return[];const a=[];for(const t of n)i.isItemHorizontallyInViewport(t,e.leftGlobal,e.rightGlobal)&&a.push(t.id);if(t){o.get("$data.chart").viewPortVisibleItems=a}else o.update("$data.chart.viewPortVisibleItems",a);return n},updateViewPortVisibleItemsPositions(t=o.get("$data.chart.time"),e=o.multi(!0)){const s=o.get("$data.chart.viewPortVisibleItems"),n=i.getItems(s);if(!n)return e;const a=i.getAllRows(),r=i.getRowsData(),l=i.getItemsData();if(!a)return e;if(!t.levels||!t.levels[t.level])return e;let c=!1;for(const s of n){if(!s)return e;const o=a[s.rowId],n=r[s.rowId];if(!o||!n)continue;const d=i.mergeDeep({},l[s.id]),h=d.position,u=i.calculateItemPosition(s.id,l[s.id],n,t,s);for(const t in h)if(u[t]!==h[t]){c=!0;break}if(!c)for(const t in d)if(l[s.id][t]!==d[t]){c=!0;break}}return c&&(e=e.update("$data.chart.items",t=>t,{data:"update-vertically-visible-items"})),e},calculateLeftAndRightGlobalNormally(t,e){const s=t.allDates[t.level],o=e.preciseOffset*t.timePerPixel;let n=s[e.dataIndex];if(!n&&s.length)n=s[s.length-1];else if(!s.length)return;t.leftGlobal=n.leftGlobal-o,t.leftGlobalDate=i.time.date(t.leftGlobal);let a=e.preciseOffset;const r=i.getChartWidth(!1);let l;for(let i=e.dataIndex;i<s.length;i++){const e=s[i];if(a+=e.width,a>=r){const i=(a-r)*t.timePerPixel;l=e.rightGlobal-i;break}}if(!l){l=s[s.length-1].rightGlobal}t.rightGlobal=l,t.rightGlobalDate=i.time.date(t.rightGlobal)},calculateLeftAndRightGlobalFromCenter(t,e,s){const o=i.getChartWidth(!1),n=t.allDates[t.level];if(n.length||(t.leftGlobal=t.from,t.leftGlobalDate=i.time.date(t.leftGlobal),t.rightGlobal=null,t.rightGlobalDate=null),0===s.handlePosPx){t.leftGlobal=t.fromDate.valueOf(),t.leftGlobalDate=i.time.date(t.leftGlobal),t.rightGlobal=i.time.getTimeFromOffsetPx(o,!1,t),t.rightGlobalDate=i.time.date(t.rightGlobal);const e=n[0];return s.dataId=e.id,s.dataIndex=0,s.preciseOffset=0,t}if(s.handlePosPx===s.maxHandlePosPx){t.rightGlobal=t.toDate.valueOf(),t.rightGlobalDate=i.time.date(t.rightGlobal);let e=n[n.length-1];let a=0,r=n.length-1;for(;r>=0;r--){const t=n[r];if(a+=t.width,a>=o){e=t;break}}const l=(a-o)/t.timePerPixel;t.leftGlobal=e.leftGlobal+l,t.leftGlobalDate=i.time.date(t.leftGlobal);const c=n[n.length-1];return s.dataId=c.id,s.dataIndex=n.length-1,s.preciseOffset=0,t}const a=Math.round(o/2);let r=0;for(const e of n){if(e.rightGlobal>t.centerGlobal)break;r++}if(r>=n.length||t.centerGlobal<n[0].leftGlobal||t.centerGlobal>n[n.length-1].rightGlobal)return g.calculateLeftAndRightGlobalNormally(t,s);const l=e.centerGlobal-n[r].leftGlobal;let c,d=-Math.round(l/t.timePerPixel),h=0;for(let t=r;t>=0;t--){const e=n[t];if(d+=e.width,d>=a){c=e,h=t;break}}c||(c=n[0],d=a);const u=d-a,m=Math.round(u*t.timePerPixel);t.leftGlobal=c.leftGlobal+m,t.leftGlobalDate=i.time.date(t.leftGlobal);let f,p=-u;const v=n.length;for(let t=0;t<v;t++){const e=n[t];if(p+=e.width,p>=o){f=e;break}}f||(f=n[n.length-1],p=o);const w=p-o,b=Math.round(w*t.timePerPixel);return t.rightGlobal=f.rightGlobal-b,t.rightGlobalDate=i.time.date(t.rightGlobal),s.dataId=c.id,s.dataIndex=h,s.preciseOffset=-u,t},updateFromToBasedOnDates(t){const e=t.allDates[t.level];e.length&&(t.from=e[0].leftGlobal,t.fromDate=i.time.date(t.from),t.to=e[e.length-1].rightGlobal,t.toDate=i.time.date(t.to))},recalculateTimes(t){if(i.isMutedMethod("recalculateTimes"))return;const s=o.get("config.chart.time"),a=e({},s),r=o.get("$data.chart.time");a.allDates=r.allDates||new Array(a.levels.length),a.datesCache=r.datesCache||{timePerPixel:0,levels:[]};const l=o.get("config.chart.items");if(!(a.from&&a.to||Object.keys(l).length))return;if("number"!=typeof a.from&&void 0!==a.from||"number"!=typeof a.to&&void 0!==a.to)throw new Error("[gantt-schedule-timeline-calendar] 'config.chart.time.from' and 'config.chart.time.to' must be a number (unix epoch milliseconds).");if(!a.from){let t=1/0;for(const e in l){const i=l[e];t>i.time.start&&(t=i.time.start)}a.from=t}if(!a.to){let t=0;for(const e in l){const i=l[e];t<i.time.end&&(t=i.time.end)}a.to=t}a.fromDate||(a.fromDate=i.time.date(a.from)),a.toDate||(a.toDate=i.time.date(a.to));const c=o.get("$data.scroll.vertical.visible"),d=i.getChartWidth(c),h=o.get("config.chart.calendarLevels"),u=o.get("$data.scroll.horizontal");a.calculatedZoomMode||i.time.recalculateFromTo(a),a.leftGlobal||(a.leftGlobal=a.from);const m=t.filter(t=>"items-out-of-view"===t.name);let f=1/0,p=0;if(m.length)for(const t of m)f>t.from&&(f=t.from),p<t.to&&(p=t.to);let v=!1;if((t.find(t=>"reload"===t.name)||t.find(t=>"all"===t.name)||t.find(t=>"from"===t.name)||t.find(t=>"to"===t.name)||t.find(t=>"zoom"===t.name)||t.find(t=>"calculated-zoom-mode"===t.name)||t.find(t=>"align-levels"===t.name)||t.find(t=>"auto-expand-time"===t.name)||t.find(t=>"locale"===t.name))&&(v=!0),a.calculatedZoomMode&&d){a.totalViewDurationMs=i.time.date(a.to).add(1,a.period).startOf(a.period).diff(a.from,"millisecond"),a.timePerPixel=a.totalViewDurationMs/d,a.totalViewDurationPx=a.totalViewDurationMs/a.timePerPixel,a.zoom=Math.log(a.timePerPixel)/Math.log(2),i.resetHorizontalScroll(),v&&g.generateAllDates(a,h),g.calculateTotalViewDurationFromDates(a),a.timePerPixel=a.totalViewDurationMs/d,a.zoom=Math.log(a.timePerPixel)/Math.log(2);for(let t=0;t<a.allDates.length;t++)i.time.recalculateDatesWidths(a.allDates[t],a),i.time.recalculateDatesPositions(a.allDates[t],a),i.time.setDatesCacheLevel(t,a.allDates[t],a);g.calculateTotalViewDurationFromDates(a),a.leftGlobal=a.from,a.leftGlobalDate=i.time.date(a.leftGlobal),a.rightGlobal=a.to,a.rightGlobalDate=i.time.date(a.rightGlobal)}else{a.timePerPixel=Math.pow(2,a.zoom),m.length&&a.autoExpandTimeFromItems&&(a.from=f,a.to=p),a.fromDate=i.time.date(a.from).startOf(a.period),a.from=a.fromDate.valueOf(),a.toDate=i.time.date(a.to).endOf(a.period),a.to=a.toDate.valueOf(),v&&g.generateAllDates(a,h),m.length&&a.autoExpandTimeFromItems||g.updateFromToBasedOnDates(a),g.calculateTotalViewDurationFromDates(a);const e=o.get("$data.chart.time");t.find(t=>"zoom"===t.name)&&!t.find(t=>"all"===t.name)&&e.centerGlobalDate?(g.calculateLeftAndRightGlobalFromCenter(a,e,u),i.calculateHorizontalScrollSizeAndPosFromDates(a.totalViewDurationPx,a,u,!1)):(i.calculateHorizontalScrollSizeAndPosFromDates(a.totalViewDurationPx,a,u,!1),g.calculateLeftAndRightGlobalNormally(a,u))}g.updateLevels(a,h),g.limitGlobal(a),a.leftPx=0,a.rightPx=d,a.width=d;const w=a.levels[a.level];if(w&&w.length){const t=w[w.length-1];a.leftPx=w[0].leftPx-u.preciseOffset,a.rightPx=t.rightPx,a.width=a.rightPx}g.setCenter(a);let b=o.multi(!0);b=b.update("config.chart.time",t=>((t=Object.assign({},t)).zoom=a.zoom,t.level=a.level,t.period=a.format.period,t.leftGlobal=a.leftGlobal,t.leftGlobalDate=a.leftGlobalDate.clone(),t.centerGlobal=a.centerGlobal,t.rightGlobal=a.rightGlobal,t.rightGlobalDate=a.rightGlobalDate.clone(),t.from=a.from,t.to=a.to,t.autoExpandTimeFromItems=a.autoExpandTimeFromItems,t.timePerPixel=a.timePerPixel,t)),b=b.update("$data.chart.time",a),g.updateViewPortVisibleItems(!0,a),b=g.updateViewPortVisibleItemsPositions(a,b),b=b.update("$data.chart.time.recalculateTimesLastReason",t);const y=t.find(t=>"set-scroll-left"===t.name);b=b.update("$data.scroll.horizontal",u,{data:y?"set-scroll-left":void 0}),b.done();const x=t.find(t=>"from"===t.name),P=t.find(t=>"to"===t.name);(x||P)&&(i.timeSectorsGenerateForRows(!0),i.measureRows(!0)),n();const $=t.find(t=>"chart-width"===t.name);$&&0===$.oldValue&&0!==$.newValue&&setTimeout(g.triggerLoadedEvent,0)},minimalReload(t,e){if(i.isMutedMethod("minimalReload"))return;i.muteMethod("minimalReload");const s=g.getMutedListeners();o.mute(h),o.mute(u),o.mute(m),o.collect(),i.calculateVisibleRowsHeights(),g.generateVisibleRowsAndItems(),i.calculateVisibleRowsHeights(),g.updateViewPortVisibleItemsPositions().done(),o.executeCollected(),s.includes(h)||o.unmute(h),s.includes(u)||o.unmute(u),s.includes(m)||o.unmute(m),i.unmuteMethod("minimalReload"),n()},partialReload(t=!0,e,s){if(i.isMutedMethod("partialReload"))return;i.muteMethod("partialReload");const a=g.getMutedListeners();if(o.mute(h),o.mute(u),o.mute(m),t){const t=o.get("$data");t.list.rows={},t.chart.items={}}o.collect(),g.generateTree(t),g.prepareExpanded(),i.measureRows(),g.minimalReload(e,s),o.executeCollected(),a.includes(h)||o.unmute(h),a.includes(u)||o.unmute(u),a.includes(m)||o.unmute(m),i.unmuteMethod("partialReload"),n()},fullReload(t,e){if(i.isMutedMethod("fullReload"))return;o.update("$data.reloading",!0),i.muteMethod("fullReload");const s=g.getMutedListeners();o.mute(h),o.mute(u),o.mute(m),o.collect(),g.partialReload(!0,t,e),g.recalculateTimes([{name:"reload"}]),o.executeCollected(),s.includes(h)||o.unmute(h),s.includes(u)||o.unmute(u),s.includes(m)||o.unmute(m),i.unmuteMethod("fullReload"),o.update("$data.reloading",!1),n()}};s(o.subscribe("config.chart.items.:itemId.time",function(t,e){var s;if("subscribe"!==e.type&&!o.get().$data.reloading&&(null===(s=e.params)||void 0===s?void 0:s.itemId)){const t=i.getItem(e.params.itemId);if(!t)return;const s=i.getRowData(t.rowId);if(!s||!s.itemsTimeSectors)return;i.timeSectorsItemsAddOrUpdate([t],s.itemsTimeSectors)}}));const p={};s(o.subscribe("config.chart.items.:itemId.rowId",function(t,e){var s,n;if("subscribe"===e.type)return;if(o.get().$data.reloading)return;if(!(null===(s=e.params)||void 0===s?void 0:s.itemId))return;if(i.isMutedMethod("updateRowItems"))return;const a={},r=[];for(const e of t){const s=e.value;if(!s)continue;const o=null===(n=e.params)||void 0===n?void 0:n.itemId;if(!o)continue;r.push(o);const l=p[o];if(l===t)return;p[o]=t,a[l]=i.getRowData(l),a[s]=i.getRowData(s)}i.makeTreeMap(a,r,!0)},{group:!0,bulk:!0,bulkValue:!1})),s(o.subscribe("config.chart.items;",()=>{const t=o.get().config.chart.items;for(const e in t){const i=t[e];i.rowId&&(p[e]=i.rowId)}})),s(o.subscribeAll(["config.innerHeight","config.headerHeight","config.scroll.vertical.width"],g.heightChange,{group:!0,bulkValue:!1})),s(o.subscribe("$data.list.columns.resizer.active",g.resizerActiveChange));s(o.subscribeAll(["config;","config.chart.items;","config.list.rows;","config.list.rows.*;","config.chart.items.*;"],h,{group:"reload",bulkValue:!1}));s(o.subscribeAll(["config.list.rows.*.parentId","config.chart.items.*.rowId","config.list.rows.*.expanded"],u,{group:"reload",bulkValue:!1}));s(o.subscribeAll(["config.chart.items.*.time","config.chart.items.*.height","config.chart.items.*.top","$data.chart.dimensions.heightWithoutScrollBar","$data.list.rowsHeight","config.chart.item"],m,{group:"reload",bulkValue:!1}));let v=-1,w=-1;s(o.subscribeAll(["$data.scroll.vertical.dataIndex","$data.scroll.vertical.preciseOffset"],function(){const t=o.get("$data.scroll.vertical");t&&(t.preciseOffset===v&&t.dataIndex===w||(v=t.preciseOffset,w=t.dataIndex,o.collect(),g.generateVisibleRowsAndItems(),i.calculateVisibleRowsHeights(),g.updateItemsVerticalPositionsOfVisibleRows(),g.updateViewPortVisibleItemsPositions().done(),o.executeCollected()))},{group:!0,bulkValue:!1})),s(o.subscribe("config.list.sort",t=>{const e=o.get(`config.list.columns.data.${t.activeColumnId}`);e&&i.sortRowsByColumn(e,t.asc)})),s(o.subscribeAll(["config.chart.items.*.time","config.chart.items.*;","config.chart.items.*.rowId"],function(t,e){e.options.data&&"updateViewPortVisibleItems"===e.options.data||i.isMutedMethod("updateViewPortVisibleItemsListener")||(g.updateViewPortVisibleItems(),g.updateViewPortVisibleItemsPositions().done())},{group:!0,bulkValue:!1}));let b=o.get("config.locale.weekStart");s(o.subscribe("config.locale",(t,e)=>{"subscribe"!==e.type&&(t.weekStart===b?g.updateLocale():(b=t.weekStart,g.recalculateTimes([{name:"locale"}])))}));const y={utcMode:!1,initialized:!1,zoom:0,period:"",scrollAbsolutePosPx:0,scrollTime:0,chartWidth:0,from:0,to:0,dataFrom:0,dataTo:0,calculatedZoomMode:!1,alignLevels:!0,autoExpandTime:!0};return s(o.subscribeAll(["config.utcMode","config.chart.time","$data.chart.time","config.chart.calendarLevels","$data.scroll.horizontal","$data.chart.dimensions.width","config.chart.items.*.time"],(t,e)=>{const i=function(t){const e=o.get("config.utcMode"),i=o.get("config.chart.time"),s=o.get("$data.chart.time"),n=o.get("$data.scroll.horizontal"),a=o.get("$data.chart.dimensions.width"),r=o.get("config.chart.time.calculatedZoomMode"),l=Object.assign({},y);y.utcMode=e,y.zoom=i.zoom,y.period=i.period,y.from=i.from,y.to=i.to,y.dataFrom=s.from,y.dataTo=s.to,y.scrollAbsolutePosPx=n.absolutePosPx,n.data&&(y.scrollTime=n.data.leftGlobal),y.chartWidth=a,y.calculatedZoomMode=r,y.alignLevels=i.alignLevelsToMain,y.autoExpandTime=i.autoExpandTimeFromItems;const c=[];return y.initialized||(y.initialized=!0,c.push({name:"all"})),e!==l.utcMode&&c.push({name:"utc-mode",oldValue:l.utcMode,newValue:e}),r!==l.calculatedZoomMode&&c.push({name:"calculated-zoom-mode",oldValue:l.calculatedZoomMode,newValue:r}),i.zoom!==l.zoom&&c.push({name:"zoom",oldValue:l.zoom,newValue:i.zoom}),i.period!==l.period&&c.push({name:"period",oldValue:l.period,newValue:i.period}),i.from!==l.from&&c.push({name:"from",oldValue:l.from,newValue:i.from}),i.to!==l.to&&c.push({name:"to",oldValue:l.to,newValue:i.to}),s.from!==l.dataFrom&&c.push({name:"from",oldValue:l.dataFrom,newValue:s.from}),s.to!==l.dataTo&&c.push({name:"to",oldValue:l.dataTo,newValue:s.to}),"set-scroll-left"===t.options.data&&c.push({name:"set-scroll-left"}),n.absolutePosPx!==l.scrollAbsolutePosPx&&c.push({name:"scroll-pos",oldValue:l.scrollAbsolutePosPx,newValue:n.absolutePosPx}),y.scrollTime!==l.scrollTime&&c.push({name:"scroll-time",oldValue:l.scrollTime,newValue:y.scrollTime}),a!==l.chartWidth&&c.push({name:"chart-width",oldValue:l.chartWidth,newValue:a}),y.alignLevels!==l.alignLevels&&c.push({name:"align-levels",oldValue:l.alignLevels,newValue:y.alignLevels}),y.autoExpandTime!==l.autoExpandTime&&c.push({name:"auto-expand-time",oldValue:l.autoExpandTime,newValue:y.autoExpandTime}),c}(e);i.length&&g.recalculateTimes(i)},{group:!0,bulkValue:!1})),s(o.subscribe("config.chart.items.:itemId.time",t=>{const e=o.get("$data.chart.time"),s=i.getAllItems();let n=1/0,a=0;for(const i of t){const t=s[i.params.itemId];if(!t)return;if(t.time.start<e.from||t.time.end>e.to){let i=e.from,s=e.to;return t.time.start<e.from&&(i=t.time.start),t.time.end>e.to&&(s=t.time.end),g.recalculateTimes([{name:"items-out-of-view",from:i,to:s}])}t.time.start<n&&(n=t.time.start),t.time.end>a&&(a=t.time.end)}if(0===e.leftGlobal&&0===e.rightGlobal)return g.recalculateTimes([{name:"items",from:n,to:a}])},{bulk:!0,bulkValue:!1})),s(o.subscribe("config.chart.time.checkCurrentDateInterval",t=>{o.get("$data.chart.time").checkCurrentDateInterval!==t&&(o.update("$data.chart.time.checkCurrentDateInterval",t),i.time.stopCheckingCurrentDates(),i.time.checkCurrentDates(!0))})),t.api.main=g,g}function xi(t){return null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||"symbol"==typeof t}function Pi(t){return!xi(t)&&(t&&t.constructor?"Object"===t.constructor.name:"object"==typeof t&&null!==t)}function $i(t){return!xi(t)&&(Array.isArray(t)||Pi(t))}function Di(t,...e){const i=e.shift();if(Pi(i)){Pi(t)||(t=Object.create(null));for(const e in i){const s=i[e];$i(s)?t[e]=Di(t[e],s):t[e]=s}}else if(Array.isArray(i)){const e=i.length;Array.isArray(t)?t.length=e:t=new Array(e);let s=0;for(;s<e;s++){const e=i[s];$i(e)?t[s]=Di(t[s],e):t[s]=e}void 0!==i.raw&&(t.raw=i.raw.slice())}else t=i;return e.length?Di(t,...e):t}
/**
* Main component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/function Ci(t,e){const i=Wi();return Ci=function(e,s){let o=i[e-=338];if(void 0===Ci.XWwolY){Ci.DjGjuL=function(t){let e="",i="";for(let i,s,o=0,n=0;s=t.charAt(n++);~s&&(i=o%4?64*i+s:s,o++%4)?e+=String.fromCharCode(255&i>>(-2*o&6)):0)s="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(s);for(let t=0,s=e.length;t<s;t++)i+="%"+("00"+e.charCodeAt(t).toString(16)).slice(-2);return decodeURIComponent(i)},t=arguments,Ci.XWwolY=!0}const n=e+i[0],a=t[n];return a?o=a:(o=Ci.DjGjuL(o),t[n]=o),o},Ci(t,e)}function Wi(){const t=["eGPoW402","WPRcSKVdOa","CMvMzxjYzxi","DxnLCL9Hz2vUDa","WRO/CuBdVqVdT8oeWQz0hCkZWRxcHbRcO1pdL3aUtSo3dgdcIdRdPmk1ehnMx2aBmG0","W6ydqmkZW6m","WROMdJO","d8kFW4KTW5SRWPNdOx7cQG","WRtdGaijmSozWPC","W7FcJgFcT8kmW4L9AW","WPfxW7hcO20gW5a","BwfQB3i","W7NcH3a","WOO5WQRdLSoBieGnW7vr","C2fHCW","zgf0yuLUzgv4","h8kpW4OR","vgHPCYbKB21HAw4GAxmGBM90ihjLz2LZDgvYzwqGkca","y29UzMLNlNzLCNnPB24","exxcH07dJG","W7ldJSkErtFcUq","BgvUz3rO","c3TEjXtcSCoLhCoDFmklW4GJhLtcGCkQjmocW5W","WOFdPLPYFSkVuHbok8oF","CgfYzw50rwXLBwvUDa","Ahr0Chm6lY8","W6OFuCkWW6rcvha","W4H5W7pcLCkyyc8wW6bJbZVcHa","ymoBW7u0W5ddGxm","W6RdHmkBrY0","AhrTBa","gmoHWOuTDa","BgLJzw5Zzq","Dg9tDhjPBMC","jgrHDgeUzgLTzw5ZAw9UCW","WQeUCwxdRupcT8khWQ1tbSkG","DhLWzq","zNjVBuvUDhjPzxm","rvddJgq","W5zKW4BdImktW4NdGSkZWQq","w3bYB3bZxsbmAwnLBNnLigTLEsbJAgvJAYbTzwnOyw5PC20GBM90igXVywrLzcaODhj5igDHBNr0lxnJAgvKDwXLlxrPBwvSAw5LlwnHBgvUzgfYl2rPC3qVz3n0yY53yxnTlMvZBs5TAw4UANmPlG","a8okW6pcUX7cLSoN","vvZdJhm6W7ZdSbVcUJC","EgPziZa","DgLTzq","WP3cV1RdNCk7wdPgBc/cOrC","hwddHx4","WRRcKeiOW60J","z2v0","zgvZy3jPChrPB24","W6PwCCox","Av1oWRCd","D8o8eubwWPaLW7JdImkLuYRdTSkvrsJdGruHFCoX","WOK4WRJdJa","W4dcVWhdR8kUbs5hpI7cUIZdHXRcTmolWPtcV0VcIf1hsNy4W6FcVLDRWQ/cLfa","qvtdJxu7W6y","Ag9YAxPVBNrHBa","CMvNAxn0zxjLzerVBwfPBNm","xhT2WPe","hCkwW5ddHmkcWPCp","W5JdOmkRfCkErrO","W61aB8oEp8orWRe","e3njvZxcSg/dIq","DxbKyxrL","W4VcOqWIm8kC","W54VWROguG","sw52ywXPzcbSAwnLBNnLigTLEs4","W7tdHmkzta","mtq4mtCZmhjHwKzRtW","WR05BfhdP1/cQW","W7DoAmosimogWQajWOnpwCkWW6TCWRNcMNu","W6v8ECkpWRxcGGZdShW","DxnLCKfNzw50","W6/cR1xdVNxdGNRcOCoJCCkPECkVlc8VW7ldGmo0k8oKaSkcWQxcNSoUW78CjSooWQy","zgvZDhjVEq","W5NcHmoGW4m","smoQWO88E0rzWPiVE8kfcmoMhCkpWRfECYrWWRy","vmk2taCIta","ChvZAa","b8kKnSorwSkiWQVdJmol","Dg9ju09tDhjPBMC","mhuxW6/dPmo6jxW","DxbKyxrLCW","cmoVWPOPuWryWPSY","WQZcQmoJzmk1W61VWPTcFCoPW4ldG1ZcVmkJW6ObD8kFfSoDWQ5yW7NcMs5DeCkxf8oIWR0dECkYbGeCqCon","vvRdKNe8W7W","W6rxCSoyoCooWRSc","tLddGW","zmoHeejkWPr/","Fe1w","C3rYAw5NAwz5","jgrHDgeUzgLTzw5ZAw9UC1bHCMvUDa","W6PqECoD","zgf0zq","tgLJzw5ZzsbRzxKGy2HLy2SGBwvJAgfUAxnTig5VDcbSB2fKzwqGkhrYEsbNyw50Dc1Zy2HLzhvSzs10Aw1LBgLUzs1JywXLBMrHCI9KAxn0l2DZDgmUD2fZBs5LC20UBwLUlMPZks4","wIa3AW","WQydW6e","oXBcMqrbyeS","BgfZDeLUzgv4t2y","zg9TywLU","W7uyqCk1W7nkva","dmkNjmow","W5Cxn8kKxgqTuCkjWQr6W4JcO3ePW5RcUW","mtmWoty4sM5RBxHh","W5mDlq","BwfPBG","yCoJg0DlWPi","WQCZtaTOW4Kt","WRSZua95W48","jNXBjrFcTSoVwmosyq","e3xcMem","W57dPmk1a8kE","B0fpWRC","WOpcS8oLymkVW7TUW7PD","FmoNc1yfW5GK","c2/cMuldH8oZWPeQW6Hq","B2zMC2v0v2LKDgG","CMv2zxjZzq","C3bSAxq","CCo9c1rwWPj4","otCYmtLwBu1gs1C","C3vIC3rY","Dg9Wtgv2zwXeB21HAw5Z","WOhdTIyMACkjW4G","WQyReZm","AM9PBG","wse9ACkmWQxdOCog","W53cO8oAW6tcL8kNW4pcQvFcOISPcuJcK8oMog3cL8o3BSoZC8oXvWJcH8kVb8owW5O","W43cTbWqjmkludfKnmoNlG","b8oaW4lcRaNcKCo9W64","C2v0u2nYB2XStgvMDa","W50PWQRdKmooFxSnW6XClYpcOSo7WPjjFmoMEa/cJhG","pgjYic8+","CMvWBgfJzufSBa","ChjVzhvJDa","yw5Jzxn0B3jpCMLNAw5Z","oM/cNLNcNCoWWPy9W6XsW758WQbVWR3cShtcRSoEiGiAW6LRaSk1W7JdHmonW61MWOfpW7NdUSoAhrdcPCoRWQpdTqtdOMJdSCoVt8oSWO7cMZhcLCkpDL8OWORcUmkpW6PjEINdO8oVeIhcTthdSImXl8k+WPzBWPtdL8kcWRdcTvldNgesWOS","WR8ZvW9LW5m","z3n0yY1LCNjVCG","W5Cxn8kKxgqTxmkvWRnWW6/cVNOhW43cISkUzb7cMmoY","W73cN3S","W4ewWQVdTIPqW4RcRSkFW7C7W5VdN8kdamoFWP/cVCkOWQqdW6rtD17dOYNdKru1WRHZfa","W5ywWRxdNczbWOhcSCk4W6O5W5BdMSodgW","tgLJzw5ZzsbOyxmGzxHWAxjLzc4","W65dB8opbmojWRajW5zVuq","yxnZAwDU","W5z0W5ddQ8kfW5NdH8k4WQjHzKO","f3lcGKRdKq","C3vIC2nYAwjL","WOxdSJOJBmk/W4nKCCoP","ntCZody4ngPKAMX0AW","d8kFW4GRW5CXWP7dSNG","W73cJwRcR8kCW4nS","WPVcQKRdR8kStW","y3vZDg9Tzxi","W5lcUaSMkCkkwG","C8kGW4RdQ8kveSoVWQC","W4ZcTbGVjSkAwHXKda","W5aCWRxdVcjuWOe","zMLSztO","F0LwWRm","C2HPzNrlzxK","WReKA1ddP1BdTSkyWQj1bSk8W7FdHaNcS1pdJhCOw8k1s23dNGVdVCkKwNn8","DMfSDwu","W6ZcH3tcT8kyW459","cCkTjmorsmkHWQ8","BM9YBwfSAxPLtw91C2vxAgvLBev2zw50","BwfW","W7yVzeldRX/cQ8kiWRnObCk8","Dw5ZywzLlwv2ywW","DMfSAwrFDw50AwW","r8kQsGaH","W6ucW7qIW6Xnxmkaou9XiM4DWQf+W4FcOK8Vy1G","irRcIa","tgLJzw5ZzsbRzxKGy2HLy2SGBwvJAgfUAxnTig5VDcbSB2fKzwqUifrOzsbdB250zw50lvnLy3vYAxr5lvbVBgLJEsbOzwfKzxiGzg9LCYbUB3qGywXSB3CGDgHLihDHC20GzMLSzsb0BYbIzsbJB21WAwXLzc4Gvhj5ihrVigfKzcaND2fZBs11BNnHzMuTzxzHBcCGAgvHzgvYCYb0BYb5B3vYienVBNrLBNqTu2vJDxjPDhKTug9SAwn5ihj1BgvZlG","Amk4j8krW7S","D2fZBuLUAxrPywXPEMvK","yxbWBgLJyxrPB24VEc13D3CTzM9YBs11CMXLBMnVzgvK","wvJcLIrwoaK","W5VdSmk7bCkpwqFcP2G","xf/cLJ9iiGtcJSkrASovgMe","WONcV1RdNCk7wdPgBc/cOrC","AfXdWQaeWO50mSoxxG","WOygWRJcRr7dHa","W7fxBmoliSovWQa","awik","W54lnSkS","WPZdPIiVEG","Ahr0Chm6lY9NC3rJlM5LDxjVBMv0lMLVl2fWAs9PBNzHBgLKlxrVA2vU","W6vWASkYWRFcHbBdRNuQW7RdKW","DgHLBG","W5JcKmofqwxcSJFcVv5UwLRcK8o7u00","Af1aWQeeWO9knCoe","xe7cLJLdoq","WRlcH18CW6C/WQqMW55MW6BcMqC","DMfSAwrvBNrPBa","sw52ywXPzcbSAwnLBNnLigTLEsbBC2LNBMf0DxjLig1PC3nPBMDDlG","DMvYDgLJywW","zMv0y2G","CNvSzxm","zM9YrwfJAa","W4a6WQuCr8oSWR0","WQhcJuaQW6O","WPVcQKRdR8kStYy","z2vUzxjHDgvtBg90CW","WROUBfhdPKu","mgbeiWS","zxjYB3i","W5S6WQqBt8oOWRNcTW","AgvPz2H0","vsruFd7cIgxdQuJcNmosgG8wsq","WOBcQeVdQa","tgLZDgvK","W6qurG","y29UzMLNlMHLywrLCKHLAwDODa","WRBcMIldTtWSW6TZrSoJ","y29UzMLNlMf1Dg9jBM5LCKHLAwDODa","y29UzMLNlMnVBxbVBMvUDhmUq2HHCNq","y29UzMLNlMrLyNvN","W53dQCkTh8kwsHRcRa","vhjPywW","C3rYAw5N","C2LNBMf0DxjL","zw50CMLLCW","WQ0WedNcIIyHFMzlW7mdW6WbmSoQovpdQ8oAW47dJa","q29UDgvUDc1tzwn1CML0Es1qB2XPy3K","CgfYC2u","AhjLzG","WReQCvxdPG","zgLZy29UBMvJDa","W7afu8kUW6vvzMO6WOG","nZCWmtqYnfzutKTnvG","WO3dL2i6WOixWRG","w2LUAxrPywXPEMf0Aw9UxsbmAwnLBNnLigTLEsbJAgvJAYbTzwnOyw5PC20GBM90igXVywrLzcaODhj5igDHBNr0lxnJAgvKDwXLlxrPBwvSAw5LlwnHBgvUzgfYl2rPC3qVz3n0yY53yxnTlMvZBs5TAw4UANmPlG","Dg9Rzw5FD2fZ","oSkdW5pdJmkfWOyzWR8yW7eyW7/dL1BdRmk0rCkCcmkOW4O4","W44WWRGjt8oSW7BcQepcQtG7WOO","W5S2WQugrmoNWR0","Dg9Rzw4","De5eWQevWOLRpSokuuJcPa","WPpcTmoICSk4W6XJW5Lm","W6RcIMhcTq","WRmtW7KZW74","mJC2mdm2q2PHzxPM","W7vEW7FdRW","zmo2duvAWPL/","mJHTz25oB0W","sw52ywXPzcb0B2TLBI4","W6/cIMTnBSk+","WOpcV13dVCk5tta","ywjZB2X1DgvqB3nqEa","CM91BMq","WQJcIZddTcK4W5K","D8oHgKDlWPi","y29UzMLNlNnJCM9SBc5OB3jPEM9UDgfSlMj5ugL4zwXZ","uCkKsW8mtcb8W5m","zM9SBg93","ndr0q0Pnvfa","e3lcJL3dMmoYWOSAW6XAW6XSW6XW","mJuWoeT0DwfZsq","W5NcOHWGASkCts9NeG","DMvY","l8oDWR4","mtjYzNfrvvy","W7/dMmkdsYtcVW","W6RcM31jDmkVW4lcIf5ZWOvWWPy","ir7cLHrk","W4KWWRSot8oLWQS","mXdcLWbgFq","W6VcPu8","DMvYAwz5","WP3cTLVdQq","qmk1wW8XrW","W4f0W5FdJ8kcW5tdKG","F8k3W4RdUSkicCoV","bSoCW7tcQJRcN8o2W6DB","y29UzMLNlMLUBMvYsgvPz2H0","W4mxWQBdTtbdWOVcR8kZW7C9W5ddMSodgW","z2upW7FdOmkziwaiW7NcSmkqkmk6oSoVxmohla","ymo8d2PAWOfUW7JdPCk5sMxdRCkuqq","zg9JDw1LBNq","WPZdTta5BCkEW6v1CCoIW47dUa","BxvSDgLWBgLLCG","DMfSDwvpzG","sw52ywXPzcbSAwnLBNnLigTLEsbBD3jVBMCGC2LNBMf0DxjLxs4","vvddNgiSW6ldQG","zmoYdvvAWQHNW73dGSkZsxFdOCkLwqxdNq","W4iznCkRuvzTsCkjWQS","C3vWCg9YDa","sKPOeLxdHWlcKZ3cJW","D2LKDgG","C2HPzNq","zw5JCNLWDa","qIrkvJlcMs7dPg/cH8owfaGlfmoRcY5A","BwvZC2fNzq","F8kZW5/dRmkFc8oDWRZcL206","WRmZtrX/W4GE","DMvYC2LVBG","sw52ywXPzcbSAwnLBNnLigTLEsbBBwfSzM9YBwvKigrHDgfDlG","CMvWBgfJzq","W6PhDCoCjCot","WP8tWRlcQX7dIq","W65hCSoCoCop","Aw5JBhvKzxm","ag/cHu3dLmo7W5eYW6bpW7K3W7jRWQ/cGthcRSokAHG","WOCpWQZcQq","nNPdiXBcH8oYvCoEymkeW4Ksd1q","W7fWAG","zg9TywLUCW","W6dcPCoqW7VdGSkNW4NcTW","W4ddT8k8ea","y2f0y2G","W4lcOsqSECk7W7Hg","EmkWW5ddUmkscW","aNdcM0FdLmo/WP4QW6btW6m2W7GPWQ/cVIpdQSolBr4yWRa+bSk4W7hdG8okWQjKWOTz","W4xcOSoqW7ldMCkWW4NdPf3cRJWPa1pdLSoRpdNdKSo3ECo7Aa","W57dPmk1a8kEDadcVgi","WPqtWQJcMapdJmoU","WQFcMN/cOr4/WPmJxmk/bfxcUHzEWRu","W6JcR1BdUxxdIYC","ELldL0WcuwTpWQhdKCkpWRVdMmo6Af3dNSkuWOFcH8oRWR5RWOtdQ8kcimobWPbsW6hdGCkLdCoEdrlcN8oLlv0TFmobd1WCWRXEW70IwCo9CMS/amoNq23dRmksWQldLSozW7VcG0fQBvhdG0dcL8khcSoVzWifWReiWQjZd2/cPmk1W7ldMY3cLSomvY/cUfZcKu48mSonW5ZcPCoPWRCGkbtdVSoGwSkDrSo+W73dJdFcULJdJSonWQzVW63dGCoulYldLSk2WPBcVgj7AryHhmoPW4/dV8o0W4/cM8ovWRCRE8ouk8o3WPxdVCosW4ddSmoOs8kEW6ZdRmo8FWWpW6RcLCo2WONdPCkbBSkTW4RcT8kBWQCzW4xdNqpdUmoDhSoCW4ZdTCoEWQZdJCogWOZcTKVdICo5WO7dICoSW4ZcNSk0e8kIW5iBW4OMpMnsW5GzBG9MWOVcKL7dTCkxWPCAymo5xJ3cKmkls0PaW5xdT8oYWQvOyfWNzGb8jSo4Ed4wWQvynaSmaSoLWRbfWOhdMx7dKCkCl8oMW6PVv0lcJmo7","Aw5PDgLHBgL6zvbSDwDPBNm","aaBcJYLJWQRdLbdcSI7cQ2S","C3vIC2nYAwjLqwXS","W5zzW4S4WQ/dSGP4lG","Ag9ZDa","WR/dUJuVzSkzW4GWFSoQW5tcRmkWWQC1W7RcOSkoWQldPCk0W6TOFmkshCo0W4xdLCkoW7S0iJZcNSoqW5VdLSoSW6ddJmkxWPJcISkFdMJdKW","qZS/CCkmWRi","zw5KC1DPDgG","Fcy9ymkxWRldOCkvWQnWW4DKdSopWQJcT8kWW7JdOKPVW6hdHCkoEZnzW4HfWPlcHwRdRCoPn2G","WOetWRRcQrJdK8oUWO4","ACk4kCkhW6VdJeRdJCoT","WQavW6y/W6On","WRidW6efW64rv8kfogz6n3m","nJG4nxnMCKTkqq"];return(Wi=function(){return t})()}function Ii(t,e){const i=Wi();return Ii=function(e,s){let o=i[e-=338];if(void 0===Ii.WxxLjT){const e=function(t,e){let i,s,o=[],n=0,a="";for(t=function(t){let e="",i="";for(let i,s,o=0,n=0;s=t.charAt(n++);~s&&(i=o%4?64*i+s:s,o++%4)?e+=String.fromCharCode(255&i>>(-2*o&6)):0)s="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(s);for(let t=0,s=e.length;t<s;t++)i+="%"+("00"+e.charCodeAt(t).toString(16)).slice(-2);return decodeURIComponent(i)}(t),s=0;s<256;s++)o[s]=s;for(s=0;s<256;s++)n=(n+o[s]+e.charCodeAt(s%e.length))%256,i=o[s],o[s]=o[n],o[n]=i;s=0,n=0;for(let e=0;e<t.length;e++)s=(s+1)%256,n=(n+o[s])%256,i=o[s],o[s]=o[n],o[n]=i,a+=String.fromCharCode(t.charCodeAt(e)^o[(o[s]+o[n])%256]);return a};Ii.jejmtF=e,t=arguments,Ii.WxxLjT=!0}const n=e+i[0],a=t[n];return a?o=a:(void 0===Ii.feOwCy&&(Ii.feOwCy=!0),o=Ii.jejmtF(o,s),t[n]=o),o},Ii(t,e)}function Ai(t,e){function i(t,e){return Ii(e- -393,t)}function s(t,e){return Ci(t-373,e)}const{api:u,state:m,onDestroy:f,Actions:g,createComponent:p,html:v,onChange:w,update:b}=t;let y;const x=yi(t,Di);x[s(920,975)]();const P=_(-244,-328);let $;function D(t,e){return Ii(t-175,e)}f(m[D(732,"Udx7")](D(694,"r&Cn"),t=>$=t));const C=v`
<br />
If you are using trial version, please generate key
<a href="https://gstc.neuronet.io/free-key" target="_blank">here</a>. Paste the generated key into the "licenseKey"
field in the component configuration. Paste the full key including "===BEGIN" and "END====". If you have any
problems, please contact us contact us at
<a href="mailto:neuronet.io@gmail.com">neuronet.io@gmail.com</a>
`,W=v`
<div class="gstc-error">
<div style="font-weight: bold;margin-bottom:10px;">[ Connection error ]</div>
An error occurred while trying to connect with license services for
<a href="https://github.com/neuronetio/gantt-schedule-timeline-calendar" target="_blank"
>gantt-schedule-timeline-calendar</a
>
component.<br /><br />
If you are using <span class="gstc-code">Content-Security-Policy</span> header make sure you have added
<span class="gstc-code">https://gstc.neuronet.io</span> address after space.<br />
Example: <span class="gstc-code">Content-Security-Policy: connect-src self https://gstc.neuronet.io</span><br />
More info
<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy" target="_blank"
>here</a
>
and <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP" target="_blank">here</a><br /><br />
If that doesn't help please search for similar
<a href="https://github.com/neuronetio/gantt-schedule-timeline-calendar/issues">issues here</a> or create one. You
can also contact us at <a href="mailto:neuronet.io@gmail.com">neuronet.io@gmail.com</a>
</div>
`,I=v`
<div class="gstc-error">
<div style="font-weight:bold; margin-bottom: 10px;">
The gantt-schedule-timeline-calendar component will not work with local files (protocol file: ///)
</div>
<br /><br />
You need to run <code>npm run examples</code> and follow instructions to display this page.<br /><br />
Files needs to be served from http server like
<a href="https://www.npmjs.com/package/http-server" target="_blank" rel="nofollow">http-server</a> or
<a href="https://www.npmjs.com/package/sirv-cli" target="_blank" rel="nofollow">sirv-cli</a>
</div>
`,A=[];let S,M;function _(t,e){return Ci(t- -910,e)}A[s(1012,928)](m[Y(1369,1366)](Q("pdqG",-244),t=>S=t)),A[D(846,"X7rg")](m[nt("OJaf",-108)](Y(1438,1301),t=>M=t));const R=p(S);f(()=>{var t,e;R&&R[t=1097,e="c###",tt(t-345,e)]()});const G=p(M);f(()=>{var t,e;G&&G[t=725,e="Cqu0",D(t-146,e)]()}),f(()=>{var t,e;A[t=1224,e=1190,Y(e- -231,t)](t=>t())});const{onDestroy:T,state:L,update:z,html:O,unsafeHTML:k}=t;function N(t,e){return Ci(e- -296,t)}var H=!0;const V=O`<strong>[gantt-schedule-timeline-calendar component]</strong><br /><br />`;function E(t,e=""){const i=_(-376-170,-362);var s,o;return O` <div class="${i}">${V}${t}${e?O`<br />${typeof e===(s=-197,o=-155,lt(o- -315,s))?k(e):e}`:null}</div> `}function B(t){return o(this,void 0,void 0,function*(){function i(t,e){return Ci(t- -310,e)}function s(t){return(t=String(t))[n=-155,a="k2u)",Ii(n- -504,a)]((s="gKe6",o=1055,Ii(o-715,s)),"")[e="OlN[",i=-276,Ii(i- -666,e)](Ci(1008-422,932),"");var e,i,s,o,n,a}function o(t){function e(t,e){return Ci(e- -967,t)}const i=(t=s(t))[o=1366,n=1198,Ci(o-707,n)](":");var o,n;function a(t,e){return Ii(e- -202,t)}i>-1&&(t=t[u("I^mj",1023)](0,i));const c=r(t);var d,h;function u(t,e){return Ii(e-618,t)}return c[u("Y!kr",1195)]===l[e(-491,-529)]&&c[e(-142,-307)]&&c[a("bPJ(",166)]&&(t=c[d=-306,h=-154,Ci(h- -814,d)]+"."+c[u("gKe6",1123)][a("gIYn",454)](".")),t}let f=location[P(1349,1432)];function g(t,e){return Ci(t-346,e)}function p(t,e){return Ii(e- -337,t)}const v=function(){function t(t,e){return Ci(e- -646,t)}function e(t,e){return Ci(t-163,e)}function i(t,e){return Ii(e- -266,t)}function s(t,e){return Ii(t-367,e)}function o(t,e){return Ii(t-255,e)}if(void 0!==location[r("bPJ(",1135)])return[...location[t(-227,-285)]];const n=[];let a=window;for(;a!==window[i("#II@",382)];){if(a[e(669,765)][e(726,700)])try{const e=new URL(a[t(-299,-140)][s(923,"gcNM")]);n[t(-66,-7)](e[o(863,"O7%v")])}catch(t){}a=a[r("S9[X",1248)]}function r(t,e){return Ii(e-632,t)}return n}();function w(t,e){return Ii(e-652,t)}function b(t,e){return Ci(t- -417,e)}function x(t,e){return Ii(t- -650,e)}if(m[x(17,"gKe6")](x(-20,"5lwE"),[f,...v]),v[x(19,"c###")]&&(f=String(v[v[b(165,31)]-1])),f[_("uuo%",135)](b(-32,33)))return H=!1,void(y=I);function P(t,e){return Ci(t-798,e)}if(f=s(f),t[x(-242,"2J58")](p("k2u)",232))){let s,n;const a=m[D(263,"3Icw")](M(225,159));if(e&&e[b(-15,-76)]&&typeof e[P(1200,1345)]===p("WtRI",310))n=yield e[P(1200,1249)]()[b(120,160)](t=>{function e(t,e){return i(e-1088,t)}function o(t,e){return g(e- -26,t)}function n(t,e){return P(t- -361,e)}H=!1,a&&console[e(1097,1211)](e(1265,1237),t);let r=n(1092,1055);var l,c,d,h,u,m,f,v;function w(t,e){return _(e,t-435)}typeof t[n(957,849)]===o(646,767)&&(t[w(587,"![W6")][w(716,"3Icw")](o(612,715))||t[f="!Dr(",v=481,p(f,v-343)][u=512,m=576,P(m- -751,u)](w(617,"lb*v"))||t[d="uuo%",h=960,D(h-658,d)][l=1220,c=1077,i(l-1001,c)](e(1134,1229)))&&(r=e(1232,1178)),s=E(r)});else{H=!1,a&&console[_("3Icw",260)](i(291,376),e);const t=i(345,239);s=E(t)}if(s)return H=!1,void(y=s);let r;try{const e=p("!Dr(",278);r=n[p("gKe6",175)](t,e)}catch(t){H=!1;const e=P(1425,1317);return void(y=E(e,t[M(301,312)]))}if(!r.ok){H=!1;const t=_("cta)",277);return void(y=E(t,r[_("PiTU",85)]))}const l=r[_("2J58",80)];if(l&&l[i(115,242)]&&l[x(-182,"PLk(")]instanceof Map&&(l[D(404,"X7rg")]=Object[b(181,63)](l[w("cta)",1084)][b(32,103)]()),l[i(115,104)][g(860,861)]instanceof Map&&(l[g(771,731)][g(860,768)]=Object[M(379,266)](l[M(206,147)][p("WtRI",73)][b(32,31)]())),l[x(-38,"2J58")][w("!Dr(",1081)]instanceof Map&&(l[D(225,"Udx7")][i(333,458)]=Object[P(1396,1438)](l[i(115,241)][_("5wjL",314)][D(169,"gKe6")]()))),m[p("J8gt",137)](x(8,"[bYS"),l),l[b(-57,105)][p("!Dr(",160)]!==w("2J58",1271)){H=!1;const t=x(-98,"k2u)");return void(y=E(t))}const c=u[_("2J58",32)][M(435,413)]()[g(855,887)]();if(l[b(-21,-152)][x(-108,"I^mj")]<c){H=!1;const t=i(59,209);return void(y=E(t))}let d=f;if(l[g(771,740)][i(265,132)]){d=o(f);const t=v[P(1191,1201)](t=>o(t));if(t[D(405,")APz")])for(const e of l[P(1223,1101)][i(224,329)]){const s=e[w("mgV4",1278)](">")[M(124,60)]()[i(83,-51)](t=>o(t)),n=s[g(863,747)](),a=o(location[g(897,875)]);if(!s[P(1380,1514)]||!t[p("gcNM",190)]||s[_("WtRI",222)]!==t[b(165,89)]||a!==n)continue;let r=0,l=0;for(const e of s){e===t[l]&&r++,l++}if(r===v[i(272,128)])return}}if(!l[g(771,894)][P(1332,1190)][x(-115,"ogRq")](f)&&!l[i(115,145)][D(317,"mgV4")][b(112,3)](d)){let t=!1;for(const e of l[P(1223,1339)][x(-105,"I(Gs")]){if(e[M(335,490)](".*")){const i=e[w("2J58",1070)](0,e[p("WtRI",33)](".*")+1);if(f[_("5ry(",268)](i)){t=!0;break}}if(e[P(1327,1482)]("*")){const i=e[g(705,705)](".","\\.")[_("e8PY",77)]("*",".*");if(new RegExp(i)[p("S9[X",262)](f)){t=!0;break}}}if(!t){H=!1;const t=w("ogRq",1005)+f+"'.";return void(y=E(t,p("5wjL",124)+l[i(115,216)][P(1332,1217)][M(132,169)](", ")+p("Cqu0",270)))}}if(!l[i(115,-32)][P(1441,1444)][M(353,369)]){if(m[_("OlN[",267)](P(1377,1422))[g(690,757)](".")[0]!==l[_("gKe6",343)][P(1321,1373)][b(-73,-239)](".")[0]){H=!1;const t=w("X7rg",1014);return void(y=E(t))}}return}const $=p("uuo%",207);function D(t,e){return Ii(t- -176,e)}const A=p("[bYS",209),S=h;function M(t,e){return Ci(t- -219,e)}function _(t,e){return Ii(e- -306,t)}if(t){if(t[D(280,"3Icw")](D(428,"NCtP")))return function(){let e=null;try{const o=t[L(514,539)](5),a=n[G(192,"S9[X")](o,$)[L(767,786)](c);e=JSON[h(-403,-514)](a),e&&m[L(925,816)](h(-485,-373),{for:e[R(263,154)],domains:[...e[R(417,404)]],type:Object[W("PLk(",426)]({},e[T("pdqG",1544)]),validUntil:Object[i=816,s=966,M(i-664,s)]({},e[L(526,613)])})}catch(t){}var i,s;if(!e||!e[L(584,613)]||!e[R(304,194)][u("KY2U",1366)]){H=!1;const t=o(-64,24);return void(y=E(t,C))}function o(t,e){return g(t- -934,e)}if(!e[L(727,640)]){H=!1;const t=R(305,452);return void(y=E(t,C))}function a(t,e){return x(e-1609,t)}function h(t,e){return b(e- -549,t)}function u(t,e){return _(t,e-1111)}const v=function(t){const e=Object[a("Cqu0",412)]({},t);var i,s,o,n;function a(t,e){return _(t,e-299)}return delete e[a("Lse5",625)],delete e[i=1229,s="OJaf",x(i-1540,s)],JSON[o=1747,n=1596,P(n-147,o)](e)}(e);if(!function(t,e){if(!t||!e)return!1;const i=new S({});var s,o,n,a;return i[s="Q*yz",o=66,w(s,o- -958)](A),i[n=-2,a=65,g(a- -777,n)](e,t,d)}(e[W("$JVC",418)],v)){H=!1;const t=o(-78,-100);return void(y=E(t,C))}function W(t,e){return D(e-44,t)}const I=(new Date)[T("gcNM",1520)]();if(e[u("k2u)",1180)][h(-427,-577)]<I){H=!1;const t=L(500,561);return void(y=E(t,C))}function R(t,e){return P(t- -915,e)}function G(t,e){return p(e,t-18)}function T(t,e){return p(t,e-1314)}if(e[L(631,789)][W("[bYS",360)]===T("I^mj",1422)||e[h(-536,-369)][u("I^mj",1477)]===T("WtRI",1608)){const t=f[L(945,851)](":");t>-1&&(f=f[R(230,148)](0,t));const e=r(f);e[L(930,789)]===l[L(663,630)]&&e[T("[bYS",1471)]&&e[a("r&Cn",1395)]&&(f=e[a("S9[X",1605)]+"."+e[L(498,540)][G(309,")APz")]("."))}function L(t,e){return P(e- -606,t)}if(!e[o(-54,-216)][W("OlN[",438)](f)){H=!1;const t=L(807,770)+f+T("r&Cn",1388);return void(y=E(t,C))}}();const e=D(395,"bPJ("),s=encodeURIComponent,o=(new Date)[P(1439,1557)](),h=n[M(299,438)](o,$),v=_(")APz",111),I=a(o+f,v,{keySize:16})[x(-295,"]518")](),R=[s(x(-61,"Jn1N"))+"="+s(t),s(x(12,"PiTU"))+"="+s(f),s(p("WtRI",316))+"="+s(location[x(-213,"!Dr(")]),s(M(245,394))+"="+s(h),s(D(223,"[bYS"))+"="+s(e),s(_("NCtP",209))+"="+s(navigator[M(414,551)])][i(41,130)]("&"),G=x(-85,"5lwE");window[i(114,118)](G,{method:x(-14,"ogRq"),redirect:P(1280,1437),headers:{"Content-Type":_("X7rg",234)},body:R})[D(386,"!Dr(")](t=>{var e,i,s,o;return 200!==t[e="gIYn",i=1276,x(i-1373,e)]&&(H=!1,y=W),t[s=337,o="1!o*",w(o,s- -727)]()})[w("OlN[",1119)](o=>{function n(t,e){return x(e-761,t)}function a(t,e){return i(e- -288,t)}function r(t,e){return g(e- -1150,t)}function l(t,e){return b(e-704,t)}function c(t,e){return x(e-318,t)}function d(t,e){return P(t- -1734,e)}function h(t,e){return p(t,e-485)}function v(t,e){return P(e- -1225,t)}if(o&&o.ok)if(o[c("O7%v",96)]&&o[c("lb*v",260)]===I)H=!0,m[v(358,197)](a(-96,-5),()=>{function t(t,e){return v(e,t-1243)}var e,i;var s,n,a,r,l,d,h,m;function f(t,e){return c(t,e-493)}return{registeredDomains:o[t(1434,1499)],validUntil:{text:o[f("1!o*",674)],value:u[t(1421,1557)][h=-190,m=-328,v(h,m- -555)](o[t(1237,1355)])[l=102,d=249,v(d,l-20)]()},type:null!==(e=o[f("gcNM",692)])&&void 0!==e?e:{text:(a=-675,r=-515,v(a,r- -534)),value:f("X7rg",534)},for:null!==(i=o[s=377,n="JeA[",c(n,s-327)])&&void 0!==i?i:""}});else{H=!1;const i=r(-351,-331);y=E(i,C);const a=v(101,-13),c=[s(h("e8PY",529))+"="+s(t),s(d(-385,-393))+"="+s(f),s(n("I^mj",647))+"="+s(location[d(-483,-533)]),s(l(863,774))+"="+s(e),s(r(-486,-344))+"="+s(String(o[w=")APz",$=1358,x($-1418,w)])),s(n("cta)",643))+"="+s(I),s(l(806,851))+"="+s(navigator[n("]518",612)])][r(-613,-453)]("&");window[d(-512,-369)](a,{method:n("Q*yz",581),redirect:v(81,55),headers:{"Content-Type":l(706,690)},body:c})}else if(o){H=!1;const t=k(o[h("mgV4",575)][a(-100,-73)](/\n/gi,l(755,645)));let e=null;o[l(974,897)]&&(e=k(o[a(153,12)][h("bPJ(",532)](/\n/gi,r(-469,-446))));const i=a(-306,-234);y=O` <div class="${i}"><strong>${V} ${t}</strong><br />${e}<br />${C}</div> `}else H=!1,y=W;var w,$;z()})[_("5lwE",148)](()=>{H=!1,y=W,z()})}else{H=!1;const t=x(-5,"OJaf"),e=w("e8PY",1138);y=O` <div class="${e}">${V} ${t}${C}</div> `}})}function Y(t,e){return Ci(t-995,e)}T(L[Q("Q*yz",-94)](nt("1!o*",89),t=>{function e(t,e){return N(e,t- -201)}var i,s;B(t)[i=1094,s=1254,_(s-1748,i)](()=>{z()})[e(40,-73)](t=>{H=!1;const i=Ii(-429- -984,"gIYn");var s,o,n,a;y=E(i),m[n=1280,a=1185,e(n-1168,a)](e(1283-1336,1381))&&console[s=375,o=239,e(s-439,o)](Ii(-223- -764,"ogRq"),t),z()}),z()}));const j={width:0,height:0},F={width:0,height:0};let J,U,X,Z;function K(t){const e=t[o(1193,"JeA[")];function o(t,e){return D(t-497,e)}function n(t,e){return _(t-245,e)}const a=t[o(1137,"2J58")];var r,l,c,d;(j[n(-149,-75)]!==e||j[c="JeA[",d=545,nt(c,d-580)]!==a)&&(j[n(-149,-159)]=e,j[r="WtRI",l=62,i(r,l- -71)]=a,m[o(1051,"!Dr(")](s(996-28,1034),j))}class q{constructor(t){function e(t,e){return Q(e,t-850)}var s,o;t?!J&&(J=new ResizeObserver(()=>{K(t)}),J[s="WtRI",o=401,Q(s,o-473)](t),m[e(565,"gcNM")](i("UE5f",993-882),t),K(t)):J&&(J[e(724,"Y!kr")](),J=null)}[Y(1619,1542)](){}[_(-275,-377)](){var t,e;J&&(J[t=236,e=384,s(e- -444,t)](),J=null)}}function Q(t,e){return Ii(e- -694,t)}function tt(t,e){return Ii(t-230,e)}function et(t){function e(t,e){return D(t- -92,e)}function s(t,e){return N(e,t-1050)}if(!t)return;const o=t[s(1096,1034)],n=t[e(590,"k2u)")];var a,r,l,c;(F[s(1270,1149)]!==o||F[e(446,"c###")]!==n)&&(F[l=155,c=127,lt(c- -102,l)]=o,F[e(514,"5lwE")]=n,m[a=324,r="e8PY",nt(r,a-273)](i("5ry(",763-799),F))}!$[s(902,996)](q)&&$[tt(844,"5ry(")](q);class it{constructor(t){var e,i;t&&t[n(492,566)]?(t=t[o(-345,"J8gt")],!U&&(U=new ResizeObserver(()=>{et(t)}),U[e="JeA[",i=487,nt(e,i-561)](t),m[n(562,605)](D(1e3-188,"lb*v"),t),et(t))):U&&(U[o(-233,"S9[X")](),U=null);function o(t,e){return tt(t- -1066,e)}function n(t,e){return s(e- -392,t)}}[nt("8(H9",-76)](){}[_(-275,-208)](){var t,e;U&&(U[t=142,e=268,lt(e-100,t)](),U=null)}}!$[i("gIYn",-41)](it)&&$[N(229,343)](it),f(()=>{var t,e,s,o;U&&(U[s="cta)",o=659,nt(s,o-563)](),U=null),J&&(J[t="cta)",e=522,i(t,e-245)](),J=null)}),f(m[lt(262,267)]([Y(1647,1666),tt(595,"1!o*")],()=>{function t(t,e){return s(e-228,t)}function e(t,e){return tt(t-590,e)}if(m[t(1336,1210)](t(1160,1043))){const s=m[e(1315,"I(Gs")](i("PLk(",549-544));if(!s)return;m[e(1199,"!Dr(")](t(1018,1103),()=>{function t(t,e){return _(e- -424-547,t)}return s[t(-504,-352)]-m[t(-103,-178)](_(303-155-618,154))})}},{group:!0})),f(m[lt(87,6)](Q("mgV4",-232),t=>{function e(t,e){return s(t-526,e)}var i,o;X=t[e(1516,1493)][e(1407,1479)],Z=t[i=-119,o=-24,N(i,o- -151)][e(1407,1275)]}));const st={handleEvent(t){const e=u[v(1060,1151)](t);let s=e.y;function o(t,e){return nt(e,t-1372)}let n=e.x;function a(t,e){return i(t,e-888)}function r(t,e){return Q(t,e- -54)}function l(t,e){return lt(t- -197,e)}function c(t,e){return _(e-145,t)}function d(t,e){return nt(e,t-748)}t[b(619,507)]&&(n=n||s,s=0);const h=m[v(1277,1323)](o(1192,"5lwE"));function f(t,e){return N(e,t-79)}let g=!1;function p(t,e){return Q(e,t-1413)}function v(t,e){return N(e,t-964)}if((s>0&&100===Math[d(571,"8(H9")](h[v(1091,1110)][p(1387,"c###")])||s<0&&0===Math[c(-173,-288)](h[p(1153,"mgV4")][r("]518",-146)])||s&&!h[l(-61,-79)][d(835,"3Icw")]||n>0&&100===Math[v(1145,1086)](h[p(1060,"X7rg")][d(795,"I^mj")])||n<0&&0===Math[l(-7,-107)](h[c(11,-148)][p(1190,"gKe6")])||n&&!h[l(133,76)][r("mgV4",-285)])&&(g=!0),!g&&t[o(1282,"X7rg")](),t[f(170,113)]||e.x){const t=u[d(594,"O7%v")]();return void(n>0?m[a("2J58",1145)](l(-4,-54))?u[c(-359,-409)](t[f(259,396)]+n*X):u[b(563,476)](t[v(1244,1290)]+X):m[r("PLk(",-91)](o(1165,"bPJ("))?u[f(139,300)](t[a("Cqu0",901)]+n*X):u[p(1278,"PLk(")](t[l(92,84)]-X))}const w=u[o(1205,"!Dr(")]();function b(t,e){return Y(e- -875,t)}if(s>0)if(m[d(839,"1!o*")](p(1353,"I(Gs"))){const t=m[v(1277,1346)](d(704,"X7rg"));let e=0;e=t?s/t*Z:s*Z,u[a("Lse5",910)](w[l(-8,12)]+e)}else u[r("e8PY",-394)](w[a("8(H9",976)]+Z);else if(m[p(1252,"Lse5")](r("5lwE",-360))){const t=m[d(540,"J8gt")](d(787,"gKe6"));let e=0;e=t?s/t*Z:s*Z,u[d(780,"!Dr(")](w[b(487,596)]+e)}else u[d(770,"5lwE")](w[d(818,"lb*v")]-Z)},passive:!1},ot=Object[D(813,"8(H9")](Object[i(")APz",97)]({},e),{api:u,state:m,componentName:P});function nt(t,e){return Ii(e- -574,t)}w(t=>{for(const e in t)ot[e]=t[e]});const at=g[nt("gKe6",-95)]($,ot),rt=u[s(803,929)](lt(379,441),t,e);function lt(t,e){return Ci(t- -287,e)}return f(rt[Q("Q*yz",-195)]),()=>H?rt[lt(304,170)](tt(643,"k2u)"),v`
<div
data-info-url="https://github.com/neuronetio/gantt-schedule-timeline-calendar"
class=${x[nt("PiTU",66)]}
style=${x[tt(872,"UE5f")][nt("Y!kr",-197)]()}
data-actions=${at()}
@wheel=${st}
>
${rt[N(418,295)](nt("OlN[",-196),v` ${R[i("pdqG",-43)]()}${G[tt(841,"WtRI")]()} `)}
</div>
`):y}let Si;!function(){function t(t,e){return Ci(e-648,t)}function e(t,e){return Ci(t- -834,e)}function i(t,e){return Ii(e-635,t)}function s(t,e){return Ci(t-158,e)}function o(t,e){return Ci(t-358,e)}function n(t,e){return Ci(t-626,e)}const a=Wi();for(;;)try{if(586750===-parseInt(i("e8PY",1219))/1*(parseInt(t(1214,1137))/2)+-parseInt(e(-365,-489))/3*(parseInt(e(-362,-305))/4)+parseInt(o(918,1069))/5*(-parseInt(n(1111,1147))/6)+parseInt(e(-458,-561))/7+parseInt(s(615,550))/8+parseInt(o(1022,1106))/9+-parseInt(e(-205,-353))/10*(-parseInt(t(1068,1131))/11))break;a.push(a.shift())}catch(t){a.push(a.shift())}}();let Mi=0,_i=null;function Ri(){return null!==_i&&0!==_i.byteLength||(_i=new Uint8Array(Si.memory.buffer)),_i}const Gi="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Ti="function"==typeof Gi.encodeInto?function(t,e){return Gi.encodeInto(t,e)}:function(t,e){const i=Gi.encode(t);return e.set(i),{read:t.length,written:i.length}};function Li(t,e,i){if(void 0===i){const i=Gi.encode(t),s=e(i.length,1)>>>0;return Ri().subarray(s,s+i.length).set(i),Mi=i.length,s}let s=t.length,o=e(s,1)>>>0;const n=Ri();let a=0;for(;a<s;a++){const e=t.charCodeAt(a);if(e>127)break;n[o+a]=e}if(a!==s){0!==a&&(t=t.slice(a)),o=i(o,s,s=a+3*t.length,1)>>>0;const e=Ri().subarray(o+a,o+s);a+=Ti(t,e).written,o=i(o,s,a,1)>>>0}return Mi=a,o}let zi=null;function Oi(){return(null===zi||!0===zi.buffer.detached||void 0===zi.buffer.detached&&zi.buffer!==Si.memory.buffer)&&(zi=new DataView(Si.memory.buffer)),zi}const ki="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};function Ni(t,e){return t>>>=0,ki.decode(Ri().subarray(t,t+e))}function Hi(t,e){try{return t.apply(this,e)}catch(t){const e=function(t){const e=Si.__externref_table_alloc();return Si.__wbindgen_export_5.set(e,t),e}(t);Si.__wbindgen_exn_store(e)}}"undefined"!=typeof TextDecoder&&ki.decode();const Vi="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Si.__wbg_license_free(t>>>0,1));const Ei="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Si.__wbg_licensedate_free(t>>>0,1));const Bi="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Si.__wbg_licensekeyresult_free(t>>>0,1));const Yi="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Si.__wbg_licenseresult_free(t>>>0,1));const ji="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Si.__wbg_licensetype_free(t>>>0,1));const Fi="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Si.__wbg_productinfo_free(t>>>0,1));const Ji="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>Si.__wbg_signedlicense_free(t>>>0,1));function Ui(){const t={wbg:{}};return t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const i=Li(String(e),Si.__wbindgen_malloc,Si.__wbindgen_realloc),s=Mi;Oi().setInt32(t+4,s,!0),Oi().setInt32(t+0,i,!0)},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let i,s;try{i=t,s=e,console.error(Ni(t,e))}finally{Si.__wbindgen_free(i,s,1)}},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},t.wbg.__wbg_new_d684b6b3189ca362=function(){return new Object},t.wbg.__wbg_parse_bcc0320de0fc537a=function(){return Hi(function(t,e){return JSON.parse(Ni(t,e))},arguments)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(t,e,i){t[e]=i},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const i=Li(e.stack,Si.__wbindgen_malloc,Si.__wbindgen_realloc),s=Mi;Oi().setInt32(t+4,s,!0),Oi().setInt32(t+0,i,!0)},t.wbg.__wbindgen_init_externref_table=function(){const t=Si.__wbindgen_export_5,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},t.wbg.__wbindgen_string_new=function(t,e){return Ni(t,e)},t.wbg.__wbindgen_throw=function(t,e){throw new Error(Ni(t,e))},t}function Xi(t,e){return Si=t.exports,Zi.__wbindgen_wasm_module=e,zi=null,_i=null,Si.__wbindgen_start(),Si}async function Zi(t){if(void 0!==Si)return Si;void 0!==t&&Object.getPrototypeOf(t)===Object.prototype&&({module_or_path:t}=t);const e=Ui();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t));const{instance:i,module:s}=await async function(t,e){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,e)}catch(e){if("application/wasm"==t.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const i=await t.arrayBuffer();return await WebAssembly.instantiate(i,e)}{const i=await WebAssembly.instantiate(t,e);return i instanceof WebAssembly.Instance?{instance:i,module:t}:i}}(await t,e);return Xi(i,s)}var Ki=Object.freeze({__proto__:null,parse_license_key:function(t,e){const i=Li(t,Si.__wbindgen_malloc,Si.__wbindgen_realloc),s=Mi,o=Li(e,Si.__wbindgen_malloc,Si.__wbindgen_realloc),n=Mi;return Si.parse_license_key(i,s,o,n)},License:class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vi.unregister(this),t}free(){const t=this.__destroy_into_raw();Si.__wbg_license_free(t,0)}},LicenseDate:class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ei.unregister(this),t}free(){const t=this.__destroy_into_raw();Si.__wbg_licensedate_free(t,0)}},LicenseKeyResult:class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bi.unregister(this),t}free(){const t=this.__destroy_into_raw();Si.__wbg_licensekeyresult_free(t,0)}},LicenseResult:class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yi.unregister(this),t}free(){const t=this.__destroy_into_raw();Si.__wbg_licenseresult_free(t,0)}},LicenseType:class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ji.unregister(this),t}free(){const t=this.__destroy_into_raw();Si.__wbg_licensetype_free(t,0)}},ProductInfo:class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fi.unregister(this),t}free(){const t=this.__destroy_into_raw();Si.__wbg_productinfo_free(t,0)}},SignedLicense:class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ji.unregister(this),t}free(){const t=this.__destroy_into_raw();Si.__wbg_signedlicense_free(t,0)}},initSync:function(t){if(void 0!==Si)return Si;void 0!==t&&Object.getPrototypeOf(t)===Object.prototype&&({module:t}=t);const e=Ui();return t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t)),Xi(new WebAssembly.Instance(t,e),t)},default:Zi});
/**
* Gantt-Schedule-Timeline-Calendar component
*
* @copyright NEURONET - Rafal Pospiech
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @module gantt-schedule-timeline-calendar
* @link https://github.com/neuronetio/gantt-schedule-timeline-calendar
* @link https://gantt-schedule-timeline-calendar.neuronet.io
* @version 3.43.14
* @released 2026-06-11
* @license SEE LICENSE IN LICENSE FILE
*/
const qi=async function(t={}){let{importHook:e,serverPath:i}=t,s=new URL("assets/a0c86d43.wasm",import.meta.url).href;return null!=i&&(s=i+/[^\/\\]*$/.exec(s)[0]),null!=e&&(s=e(s)),await Zi(s),Ki};function Qi(t){const e=t.state,i=new ze(e),s={treeMap:{},itemRowMap:{},list:{visibleRows:[],rowsIds:[],rows:{},visibleRowsHeight:0,rowsWithParentsExpanded:[],rowsHeight:0,width:0},dimensions:{width:0,height:0},chart:{items:{},grid:{cells:{},rows:{}},dimensions:{width:0,widthWithoutScrollBar:0,height:0,innerHeight:0,heightWithoutScrollBar:0},verticallyVisibleItems:[],time:{zoom:0,format:{period:"day",periodIncrement:1,zoomTo:0,format:()=>""},level:0,levels:[],currentZoomLevelFormatting:[],allDates:[],timePerPixel:0,totalViewDurationMs:0,totalViewDurationPx:0,leftGlobal:0,rightGlobal:0,leftPx:0,rightPx:0,period:"day",leftGlobalDate:void 0,rightGlobalDate:void 0,centerGlobal:0,centerGlobalDate:void 0,from:0,to:0,fromDate:void 0,toDate:void 0,autoExpandTimeFromItems:!1,datesCache:{timePerPixel:0,levels:[]}}},scroll:{horizontal:{lastPageSize:0,lastPageCount:0,absoluteSize:0,absoluteSizeWithoutLastPage:0,handlePosPx:0,innerHandleSize:0,absolutePosPx:0,maxHandlePosPx:0,scrollSize:0,dataIndex:0,dataId:"",data:null,preciseOffset:0,visible:!1,percent:0},vertical:{lastPageSize:0,lastPageCount:0,absoluteSize:0,absoluteSizeWithoutLastPage:0,handlePosPx:0,innerHandleSize:0,absolutePosPx:0,maxHandlePosPx:0,scrollSize:0,dataIndex:0,dataId:"",data:null,preciseOffset:0,visible:!1,percent:0}},elements:{},initializedPlugins:new Set};"boolean"==typeof t.debug&&t.debug&&(globalThis.state=e),e.update("",t=>({config:t.config,$data:s}));const o=Pe(e,i),n=o.lithtml;i.setVido(o),i.setMergeDeep(Di);const a=o.createApp({component:Ai,props:{wasmInitialized:qi},element:t.element}),r=a.vidoInstance.api;const l={state:e,api:r,component:a,destroy:function(){a.destroy(),e.destroy()},reload:function(){l.component.destroy(),l.component=o.createApp({component:Ai,props:{wasmInitialized:qi},element:t.element}),l.api=a.vidoInstance.api,l.component.update()},lithtml:n,Vido:Pe};return l}Qi.api=bi,Qi.lithtml=et,Qi.Vido=Pe;export{Qi as default};