22 lines
84 KiB
JavaScript
22 lines
84 KiB
JavaScript
/**
|
|
* Bundled by jsDelivr using Rollup v2.74.1 and Terser v5.15.1.
|
|
* Original file: /npm/svelte-gantt@4.0.9-beta/index.js
|
|
*
|
|
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
|
*/
|
|
function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function o(){return Object.create(null)}function i(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}function a(t,e,n){t.$$.on_destroy.push(l(e,n))}function d(t,n,o,i){return t[1]&&i?e(o.ctx.slice(),t[1](i(n))):o.ctx}function c(t,e,n,o,i,s,r){const l=function(t,e,n,o){if(t[2]&&o){const i=t[2](o(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|i[o];return t}return e.dirty|i}return e.dirty}(e,o,i,s);if(l){const i=d(e,n,o,r);t.p(i,l)}}function u(t,e){const n={};e=new Set(e);for(const o in t)e.has(o)||"$"===o[0]||(n[o]=t[o]);return n}function h(t){return null==t?"":t}function g(t,e,n=e){return t.set(n),e}function f(e){return e&&s(e.destroy)?e.destroy:t}function m(t,e){t.appendChild(e)}function p(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode.removeChild(t)}function $(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function v(t){return document.createElement(t)}function b(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function x(t){return document.createTextNode(t)}function y(){return x(" ")}function k(){return x("")}function z(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function M(t,e){e=""+e,t.data!==e&&(t.data=e)}function D(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let W,T;function E(){if(void 0===W){W=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(t){W=!0}}return W}function R(t,e){const n=getComputedStyle(t),o=(parseInt(n.zIndex)||0)-1;"static"===n.position&&(t.style.position="relative");const i=v("iframe");i.setAttribute("style",`display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${o};`),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const s=E();let r;return s?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",r=z(window,"message",(t=>{t.source===i.contentWindow&&e()}))):(i.src="about:blank",i.onload=()=>{r=z(i.contentWindow,"resize",e)}),m(t,i),()=>{(s||r&&i.contentWindow)&&r(),w(i)}}function S(t,e,n){t.classList[n?"add":"remove"](e)}class O{constructor(t=null){this.a=t,this.e=this.n=null}m(t,e,n=null){this.e||(this.e=v(e.nodeName),this.t=e,this.h(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)p(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(w)}}function H(t){T=t}function Y(){if(!T)throw new Error("Function called outside component initialization");return T}function P(t){Y().$$.on_mount.push(t)}function B(){const t=Y();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const i=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,i)}))}}}function A(t,e){Y().$$.context.set(t,e)}function L(t){return Y().$$.context.get(t)}function j(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const U=[],X=[],I=[],F=[],N=Promise.resolve();let _=!1;function q(){_||(_=!0,N.then(J))}function Q(){return q(),N}function K(t){I.push(t)}let Z=!1;const G=new Set;function J(){if(!Z){Z=!0;do{for(let t=0;t<U.length;t+=1){const e=U[t];H(e),V(e.$$)}for(U.length=0;X.length;)X.pop()();for(let t=0;t<I.length;t+=1){const e=I[t];G.has(e)||(G.add(e),e())}I.length=0}while(U.length);for(;F.length;)F.pop()();_=!1,Z=!1,G.clear()}}function V(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(K)}}const tt=new Set;let et;function nt(){et={r:0,c:[],p:et}}function ot(){et.r||i(et.c),et=et.p}function it(t,e){t&&t.i&&(tt.delete(t),t.i(e))}function st(t,e,n,o){if(t&&t.o){if(tt.has(t))return;tt.add(t),et.c.push((()=>{tt.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function rt(t,e){st(t,1,1,(()=>{e.delete(t.key)}))}function lt(t,e,n,o,i,s,r,l,a,d,c,u){let h=t.length,g=s.length,f=h;const m={};for(;f--;)m[t[f].key]=f;const p=[],w=new Map,$=new Map;for(f=g;f--;){const t=u(i,s,f),l=n(t);let a=r.get(l);a?o&&a.p(t,e):(a=d(l,t),a.c()),w.set(l,p[f]=a),l in m&&$.set(l,Math.abs(f-m[l]))}const v=new Set,b=new Set;function x(t){it(t,1),t.m(l,c),r.set(t.key,t),c=t.first,g--}for(;h&&g;){const e=p[g-1],n=t[h-1],o=e.key,i=n.key;e===n?(c=e.first,h--,g--):w.has(i)?!r.has(o)||v.has(o)?x(e):b.has(i)?h--:$.get(o)>$.get(i)?(b.add(o),x(e)):(v.add(i),h--):(a(n,r),h--)}for(;h--;){const e=t[h];w.has(e.key)||a(e,r)}for(;g;)x(p[g-1]);return p}function at(t,e){const n={},o={},i={$$scope:1};let s=t.length;for(;s--;){const r=t[s],l=e[s];if(l){for(const t in r)t in l||(o[t]=1);for(const t in l)i[t]||(n[t]=l[t],i[t]=1);t[s]=l}else for(const t in r)i[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}function dt(t){return"object"==typeof t&&null!==t?t:{}}function ct(t){t&&t.c()}function ut(t,e,o){const{fragment:r,on_mount:l,on_destroy:a,after_update:d}=t.$$;r&&r.m(e,o),K((()=>{const e=l.map(n).filter(s);a?a.push(...e):i(e),t.$$.on_mount=[]})),d.forEach(K)}function ht(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function gt(e,n,s,r,l,a,d=[-1]){const c=T;H(e);const u=n.props||{},h=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:l,bound:o(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:[]),callbacks:o(),dirty:d};let g=!1;if(h.ctx=s?s(e,u,((t,n,...o)=>{const i=o.length?o[0]:n;return h.ctx&&l(h.ctx[t],h.ctx[t]=i)&&(h.bound[t]&&h.bound[t](i),g&&function(t,e){-1===t.$$.dirty[0]&&(U.push(t),q(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(e,t)),n})):[],h.update(),g=!0,i(h.before_update),h.fragment=!!r&&r(h.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);h.fragment&&h.fragment.l(t),t.forEach(w)}else h.fragment&&h.fragment.c();n.intro&&it(e.$$.fragment),ut(e,n.target,n.anchor),J()}H(c)}class ft{$destroy(){ht(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(){}}const mt=[];function pt(e,n=t){let o;const i=[];function s(t){if(r(e,t)&&(e=t,o)){const t=!mt.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),mt.push(n,e)}if(t){for(let t=0;t<mt.length;t+=2)mt[t][0](mt[t+1]);mt.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(r,l=t){const a=[r,l];return i.push(a),1===i.length&&(o=n(s)||t),r(e),()=>{const t=i.indexOf(a);-1!==t&&i.splice(t,1),0===i.length&&(o(),o=null)}}}}function wt(e,n,o){const r=!Array.isArray(e),a=r?[e]:e,d=n.length<2;return c=e=>{let o=!1;const c=[];let u=0,h=t;const g=()=>{if(u)return;h();const o=n(r?c[0]:c,e);d?e(o):h=s(o)?o:t},f=a.map(((t,e)=>l(t,(t=>{c[e]=t,u&=~(1<<e),o&&g()}),(()=>{u|=1<<e}))));return o=!0,g(),function(){i(f),h()}},{subscribe:pt(o,c).subscribe};var c}
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */function $t(){const{subscribe:t,set:e,update:n}=pt({ids:[],entities:{}});return{set:e,_update:n,subscribe:t,add:t=>n((({ids:e,entities:n})=>({ids:[...e,t.model.id],entities:Object.assign(Object.assign({},n),{[t.model.id]:t})}))),delete:t=>n((e=>{const n=e.entities,o=t;n[o];const i=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}(n,["symbol"==typeof o?o:o+""]);return{ids:e.ids.filter((e=>e!==t)),entities:i}})),deleteAll:t=>n((e=>{const n=Object.assign({},e.entities),o={};return t.forEach((t=>{delete n[t],o[t]=!0})),{ids:e.ids.filter((t=>!o[t])),entities:n}})),update:t=>n((({ids:e,entities:n})=>({ids:e,entities:Object.assign(Object.assign({},n),{[t.model.id]:t})}))),upsert:t=>n((({ids:e,entities:n})=>({ids:-1!==e.indexOf(t.model.id)?e:[...e,t.model.id],entities:Object.assign(Object.assign({},n),{[t.model.id]:t})}))),upsertAll:t=>n((e=>{const n=Object.assign({},e.entities),o=[...e.ids];return t.forEach((t=>{n[t.model.id]||o.push(t.model.id),n[t.model.id]=t})),{ids:o,entities:n}})),addAll:t=>{const n=[],o={};for(const e of t)n.push(e.model.id),o[e.model.id]=e;e({ids:n,entities:o})},refresh:()=>n((t=>Object.assign({},t)))}}const vt=$t(),bt=$t(),xt=$t(),yt=Mt(vt),kt=Mt(bt),zt=Mt(xt),Ct=wt(yt,(t=>t.reduce(((t,e)=>(t[e.model.resourceId]||(t[e.model.resourceId]=[]),t[e.model.resourceId].push(e.model.id),t)),{})));function Mt(t){return wt(t,(({ids:t,entities:e})=>t.map((t=>e[t]))))}function Dt(t,e){const n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function Wt(t,e=document.body){e.style.cursor=t}class Tt{constructor(t,e){this.dragging=!1,this.resizing=!1,this.resizeTriggered=!1,this.onmousedown=t=>{if(!function(t){return 1===t.which}(t))return;t.stopPropagation(),t.preventDefault();const e=this.dragAllowed,n=this.resizeAllowed;if(e||n){this.settings.container = this.settings.container||document.querySelector('div.sg-rows.svelte-8uspd');const a=this.settings.getX(t),d=this.settings.getY(t),c=this.settings.getWidth();this.initialX=t.clientX,this.initialY=t.clientY,this.mouseStartPosX=Dt(this.settings.container,t).x-a,this.mouseStartPosY=Dt(this.settings.container,t).y-d,this.mouseStartRight=a+c,n&&this.mouseStartPosX<this.settings.resizeHandleWidth&&(this.direction="left",this.resizing=!0),n&&this.mouseStartPosX>c-this.settings.resizeHandleWidth&&(this.direction="right",this.resizing=!0),e&&!this.resizing&&(this.dragging=!0),(this.dragging||this.resizing)&&this.settings.onDown&&this.settings.onDown({mouseEvent:t,x:a,width:c,y:d,resizing:this.resizing,dragging:this.dragging}),window.addEventListener("mousemove",this.onmousemove,!1),o=window,i="mouseup",s=this.onmouseup,o.addEventListener(i,(function t(e){o.removeEventListener(i,t,l),s.apply(this,arguments,r)}))}var o,i,s,r,l},this.onmousemove=t=>{if(!this.resizeTriggered){if(!(Math.abs(t.clientX-this.initialX)>2||Math.abs(t.clientY-this.initialY)>2))return;this.resizeTriggered=!0}if(t.preventDefault(),this.resizing){const e=Dt(this.settings.container,t),n=this.settings.getX(t),o=this.settings.getWidth();let i,s;"left"===this.direction?e.x>n+o?(this.direction="right",i=this.mouseStartRight,s=this.mouseStartRight-e.x,this.mouseStartRight=this.mouseStartRight+o):(i=e.x,s=this.mouseStartRight-e.x):"right"===this.direction&&(e.x<=n?(this.direction="left",i=e.x,s=n-e.x,this.mouseStartRight=n):(i=n,s=e.x-n)),this.settings.onResize&&this.settings.onResize({mouseEvent:t,x:i,width:s})}if(this.dragging&&this.settings.onDrag){const e=Dt(this.settings.container,t);this.settings.onDrag({mouseEvent:t,x:e.x-this.mouseStartPosX,y:e.y-this.mouseStartPosY})}},this.onmouseup=t=>{const e=this.settings.getX(t),n=this.settings.getY(t),o=this.settings.getWidth();this.settings.onMouseUp&&this.settings.onMouseUp(),this.resizeTriggered&&this.settings.onDrop&&this.settings.onDrop({mouseEvent:t,x:e,y:n,width:o,dragging:this.dragging,resizing:this.resizing}),this.dragging=!1,this.resizing=!1,this.direction=null,this.resizeTriggered=!1,window.removeEventListener("mousemove",this.onmousemove,!1)},this.settings=e,this.node=t,t.addEventListener("mousedown",this.onmousedown,!1)}get dragAllowed(){return"function"==typeof this.settings.dragAllowed?this.settings.dragAllowed():this.settings.dragAllowed}get resizeAllowed(){return"function"==typeof this.settings.resizeAllowed?this.settings.resizeAllowed():this.settings.resizeAllowed}destroy(){this.node.removeEventListener("mousedown",this.onmousedown,!1),this.node.removeEventListener("mousemove",this.onmousemove,!1),this.node.removeEventListener("mouseup",this.onmouseup,!1)}}class Et{constructor(t){this.handlerMap={},this.register("row",(e=>{let n=document.elementsFromPoint(e.clientX,e.clientY).find((t=>!!t.getAttribute("data-row-id")));if(void 0!==n){const e=n.getAttribute("data-row-id"),{entities:o}=function(t){let e;return l(t,(t=>e=t))(),e}(t),i=o[e];if(i.model.enableDragging)return i}return null}))}register(t,e){this.handlerMap[t]=e}getTarget(t,e){var n=this.handlerMap[t];if(n)return n(e)}}class Rt{constructor(t){this.columnService=t}createTask(t){t.amountDone=t.amountDone||0,t.classes=t.classes||"",t.from=t.from||null,t.to=t.to||null,t.label=t.label||void 0,t.html=t.html||void 0,t.showButton=t.showButton||!1,t.buttonClasses=t.buttonClasses||"",t.buttonHtml=t.buttonHtml||"",t.enableDragging=void 0===t.enableDragging||t.enableDragging;const e=0|this.columnService.getPositionByDate(t.from);return{model:t,left:e,width:(0|this.columnService.getPositionByDate(t.to))-e,height:this.getHeight(t),top:this.getPosY(t),reflections:[]}}createTasks(t){return t.map((t=>this.createTask(t)))}row(t){return this.rowEntities[t]}getHeight(t){return this.row(t.resourceId).height-2*this.rowPadding}getPosY(t){return this.row(t.resourceId).y+this.rowPadding}}function St(t,e,n){const o=`reflected-task-${t.model.id}-${e.model.id}`,i=Object.assign(Object.assign({},t.model),{resourceId:e.model.id,id:o,enableDragging:!1});return Object.assign(Object.assign({},t),{model:i,top:e.y+n.rowPadding,reflected:!0,reflectedOnParent:!1,reflectedOnChild:!0,originalId:t.model.id})}function Ot(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}function Ht(t){let e;return{c(){e=v("div"),C(e,"class","sg-task-background svelte-6l5eiz"),D(e,"width",t[0].amountDone+"%")},m(t,n){p(t,e,n)},p(t,n){1&n[0]&&D(e,"width",t[0].amountDone+"%")},d(t){t&&w(e)}}}function Yt(t){let e,n=t[0].label+"";return{c(){e=x(n)},m(t,n){p(t,e,n)},p(t,o){1&o[0]&&n!==(n=t[0].label+"")&&M(e,n)},d(t){t&&w(e)}}}function Pt(t){let e,n=t[9](t[0])+"";return{c(){e=new O(null)},m(t,o){e.m(n,t,o)},p(t,o){1&o[0]&&n!==(n=t[9](t[0])+"")&&e.p(n)},d(t){t&&e.d()}}}function Bt(t){let e,n=t[0].html+"";return{c(){e=new O(null)},m(t,o){e.m(n,t,o)},p(t,o){1&o[0]&&n!==(n=t[0].html+"")&&e.p(n)},d(t){t&&e.d()}}}function At(t){let e,n,o,i,s=t[0].buttonHtml+"";return{c(){e=v("span"),C(e,"class",n="sg-task-button "+t[0].buttonClasses+" svelte-6l5eiz")},m(n,r){p(n,e,r),e.innerHTML=s,o||(i=z(e,"click",t[3]),o=!0)},p(t,o){1&o[0]&&s!==(s=t[0].buttonHtml+"")&&(e.innerHTML=s),1&o[0]&&n!==(n="sg-task-button "+t[0].buttonClasses+" svelte-6l5eiz")&&C(e,"class",n)},d(t){t&&w(e),o=!1,i()}}}function Lt(t){let e,n,o=t[0].labelBottom+"";return{c(){e=v("label"),n=x(o),C(e,"class","sg-label-bottom svelte-6l5eiz")},m(t,o){p(t,e,o),m(e,n)},p(t,e){1&e[0]&&o!==(o=t[0].labelBottom+"")&&M(n,o)},d(t){t&&w(e)}}}function jt(e){let n,o,r,l,a,d,c,u,h,g,$=e[0].amountDone&&Ht(e);function b(t,e){return t[0].html?Bt:t[9]?Pt:Yt}let x=b(e),k=x(e),M=e[0].showButton&&At(e),W=e[0].labelBottom&&Lt(e);return{c(){n=v("div"),$&&$.c(),o=y(),r=v("div"),k.c(),l=y(),M&&M.c(),a=y(),W&&W.c(),C(r,"class","sg-task-content svelte-6l5eiz"),C(n,"data-task-id",d=e[0].id),C(n,"class",c="sg-task "+e[0].classes+" svelte-6l5eiz"),D(n,"width",e[6].width+"px"),D(n,"height",e[1]+"px"),e[0].bgcolor&&D(n,"background-color",e[0].bgcolor),D(n,"transform","translate("+e[6].x+"px, "+e[6].y+"px)"),S(n,"moving",e[4]||e[5]),S(n,"selected",e[7]),S(n,"animating",Ut),S(n,"sg-task-reflected",e[2]),S(n,"dragging-enabled",e[8].model.enableDragging)},m(t,i){p(t,n,i),$&&$.m(n,null),m(n,o),m(n,r),k.m(r,null),m(r,l),M&&M.m(r,null),m(n,a),W&&W.m(n,null),h||(g=[z(n,"dblclick",e[34]),f(e[12].call(null,n)),f(u=e[13].call(null,n,e[0]))],h=!0)},p(t,e){t[0].amountDone?$?$.p(t,e):($=Ht(t),$.c(),$.m(n,o)):$&&($.d(1),$=null),x===(x=b(t))&&k?k.p(t,e):(k.d(1),k=x(t),k&&(k.c(),k.m(r,l))),t[0].showButton?M?M.p(t,e):(M=At(t),M.c(),M.m(r,null)):M&&(M.d(1),M=null),t[0].labelBottom?W?W.p(t,e):(W=Lt(t),W.c(),W.m(n,null)):W&&(W.d(1),W=null),1&e[0]&&d!==(d=t[0].id)&&C(n,"data-task-id",d),1&e[0]&&c!==(c="sg-task "+t[0].classes+" svelte-6l5eiz")&&C(n,"class",c),t[0].bgcolor&&D(n,"background-color",t[0].bgcolor),64&e[0]&&D(n,"width",t[6].width+"px"),2&e[0]&&D(n,"height",t[1]+"px"),64&e[0]&&D(n,"transform","translate("+t[6].x+"px, "+t[6].y+"px)"),u&&s(u.update)&&1&e[0]&&u.update.call(null,t[0]),49&e[0]&&S(n,"moving",t[4]||t[5]),129&e[0]&&S(n,"selected",t[7]),1&e[0]&&S(n,"animating",Ut),5&e[0]&&S(n,"sg-task-reflected",t[2]),257&e[0]&&S(n,"dragging-enabled",t[8].model.enableDragging)},i:t,o:t,d(t){t&&w(n),$&&$.d(),k.d(),M&&M.d(),W&&W.d(),h=!1,i(g)}}}Ot('.sg-label-bottom.svelte-6l5eiz{position:absolute;top:calc(100% + 10px);color:#888}.debug.svelte-6l5eiz{position:absolute;top:-10px;right:0;font-size:8px;color:black}.sg-task.svelte-6l5eiz{position:absolute;white-space:nowrap;transition:background-color 0.2s, opacity 0.2s;pointer-events:all}.sg-task{background:rgb(116, 191, 255)}.sg-task-background.svelte-6l5eiz{position:absolute;height:100%;top:0}.sg-task-content.svelte-6l5eiz{position:absolute;height:100%;top:0;padding-left:14px;font-size:14px;display:flex;align-items:center;justify-content:flex-start}.sg-task.svelte-6l5eiz:not(.moving){transition:transform 0.2s, background-color 0.2s, width 0.2s}.sg-task.moving.svelte-6l5eiz{z-index:1;opacity:0.5}.sg-task.dragging-enabled.svelte-6l5eiz:hover::before{content:"";width:4px;height:50%;top:25%;position:absolute;border-style:solid;border-color:rgba(255, 255, 255, 0.5);cursor:ew-resize;margin-left:3px;left:0;border-width:0 1px;z-index:1}.sg-task.dragging-enabled.svelte-6l5eiz:hover::after{content:"";width:4px;height:50%;top:25%;position:absolute;border-style:solid;border-color:rgba(255, 255, 255, 0.5);cursor:ew-resize;margin-right:3px;right:0;border-width:0 1px;z-index:1}.sg-task.selected.svelte-6l5eiz{outline:2px solid rgba(3, 169, 244, 0.5);outline-offset:3px;z-index:1}.sg-task-reflected.svelte-6l5eiz{opacity:0.5}.sg-task-background.svelte-6l5eiz{background:rgba(0, 0, 0, 0.2)}.sg-task{color:white;background:rgb(116, 191, 255)}.sg-task:hover{background:rgb(98, 161, 216)}.sg-task.selected{background:rgb(69, 112, 150)}');let Ut=!0;function Xt(t,e,n){let o,i,s,r;a(t,bt,(t=>n(18,o=t))),a(t,vt,(t=>n(19,i=t)));let{model:l}=e,{height:d}=e,{left:c}=e,{top:u}=e,{width:h}=e,{reflected:g=!1}=e,f=!1,m=!1,p={x:c,y:u,width:h};function w(t,e,o){f||m||(n(6,p.x=t,p),n(6,p.y=e,p),n(6,p.width=o,p))}const{dimensionsChanged:$}=L("dimensions"),{rowContainer:v}=L("gantt"),{taskContent:b,resizeHandleWidth:x,rowPadding:y,onTaskButtonClick:k,reflectOnParentRows:z,reflectOnChildRows:C,taskElementHook:M}=L("options");a(t,y,(t=>n(20,s=t)));const{dndManager:D,api:W,utils:T,selectionManager:E,columnService:R}=L("services");let S=E.selection;a(t,S,(t=>n(21,r=t)));let O,H=!1;return t.$set=t=>{"model"in t&&n(0,l=t.model),"height"in t&&n(1,d=t.height),"left"in t&&n(15,c=t.left),"top"in t&&n(16,u=t.top),"width"in t&&n(17,h=t.width),"reflected"in t&&n(2,g=t.reflected)},t.$$.update=()=>{229376&t.$$.dirty[0]&&w(c,u,h),2097153&t.$$.dirty[0]&&n(7,H=-1!==r.indexOf(l.id)),262145&t.$$.dirty[0]&&n(8,O=o.entities[l.resourceId])},[l,d,g,function(t){k&&k(l)},f,m,p,H,O,b,y,W,function(t){const e=new Tt(t,{onDown:t=>{t.dragging&&Wt("move"),t.resizing&&Wt("e-resize")},onMouseUp:()=>{Wt("default")},onResize:t=>{n(6,p.x=t.x,p),n(6,p.width=t.width,p),n(5,m=!0)},onDrag:t=>{n(6,p.x=t.x,p),n(6,p.y=t.y,p),n(4,f=!0)},dragAllowed:()=>O.model.enableDragging&&l.enableDragging,resizeAllowed:()=>O.model.enableDragging&&l.enableDragging,onDrop:t=>{let e=!0;const r=o.entities[l.resourceId];if(t.dragging){const o=D.getTarget("row",t.mouseEvent);o?(n(0,l.resourceId=o.model.id,l),W.tasks.raise.switchRow(this,o,r)):e=!1}n(4,f=n(5,m=!1));const a=i.entities[l.id];if(e){const e=l.from,i=l.to,d=n(0,l.from=T.roundTo(R.getDateByPosition(t.x)),l),c=n(0,l.to=T.roundTo(R.getDateByPosition(t.x+t.width)),l),u=0|R.getPositionByDate(d),h=0|R.getPositionByDate(c),g=o.entities[l.resourceId],f=u,m=h-u,p=s+g.y;w(f,p,m);const $=Object.assign(Object.assign({},a),{left:f,width:m,top:p,model:l}),v=e!=d||i!=c||r&&r.model.id!==g.model.id;v&&W.tasks.raise.change({task:$,sourceRow:r,targetRow:g}),vt.update($),v&&W.tasks.raise.changed({task:$,sourceRow:r,targetRow:g}),$.reflections&&vt.deleteAll($.reflections);const b=[];if(C&&g.allChildren){$.reflections||($.reflections=[]);const t={rowPadding:s};g.allChildren.forEach((e=>{const n=St($,e,t);$.reflections.push(n.model.id),b.push(n)}))}if(z&&g.allParents.length>0){$.reflections||($.reflections=[]);const t={rowPadding:s};g.allParents.forEach((e=>{const n=St($,e,t);$.reflections.push(n.model.id),b.push(n)}))}b.length>0&&vt.upsertAll(b),g.allParents.length>0||g.allChildren||($.reflections=null)}else n(6,p.x=a.left,p),n(6,p.width=a.width,p),n(6,p.y=a.top,p)},container:v,resizeHandleWidth:x,getX:()=>p.x,getY:()=>p.y,getWidth:()=>p.width});return{destroy:()=>e.destroy()}},function(t,e){if(M)return M(t,e)},S,c,u,h,o,i,s,r,w,$,v,x,k,z,C,M,D,T,E,R,()=>{W.tasks.raise.dblclicked(l)}]}class It extends ft{constructor(t){super(),gt(this,t,Xt,jt,r,{model:0,height:1,left:15,top:16,width:17,reflected:2,onclick:3},[-1,-1])}get onclick(){return this.$$.ctx[3]}}function Ft(t){let e,n=t[0].model.contentHtml+"";return{c(){e=new O(null)},m(t,o){e.m(n,t,o)},p(t,o){1&o&&n!==(n=t[0].model.contentHtml+"")&&e.p(n)},d(t){t&&e.d()}}}function Nt(e){let n,o,i,s=e[0].model.contentHtml&&Ft(e);return{c(){n=v("div"),s&&s.c(),C(n,"class",o="sg-row "+e[0].model.classes+" svelte-7u5y5s"),C(n,"data-row-id",i=e[0].model.id),D(n,"height",e[3]+"px"),S(n,"sg-hover",e[1]==e[0].model.id),S(n,"sg-selected",e[2]==e[0].model.id)},m(t,e){p(t,n,e),s&&s.m(n,null)},p(t,[e]){t[0].model.contentHtml?s?s.p(t,e):(s=Ft(t),s.c(),s.m(n,null)):s&&(s.d(1),s=null),1&e&&o!==(o="sg-row "+t[0].model.classes+" svelte-7u5y5s")&&C(n,"class",o),1&e&&i!==(i=t[0].model.id)&&C(n,"data-row-id",i),8&e&&D(n,"height",t[3]+"px"),3&e&&S(n,"sg-hover",t[1]==t[0].model.id),5&e&&S(n,"sg-selected",t[2]==t[0].model.id)},i:t,o:t,d(t){t&&w(n),s&&s.d()}}}function _t(t,e,n){let o,i,s,{row:r}=e;const{rowHeight:l}=L("options");a(t,l,(t=>n(3,s=t)));const{hoveredRow:d,selectedRow:c}=L("gantt");return a(t,d,(t=>n(1,o=t))),a(t,c,(t=>n(2,i=t))),t.$set=t=>{"row"in t&&n(0,r=t.row)},[r,o,i,s,l,d,c]}Ot(".sg-row.svelte-7u5y5s{position:relative;width:100%;box-sizing:border-box}");class qt extends ft{constructor(t){super(),gt(this,t,_t,Nt,r,{row:0})}}Ot(".sg-milestone.svelte-10k3w4l.svelte-10k3w4l{position:absolute;top:0;bottom:0;white-space:nowrap;height:20px;width:20px;min-width:40px;margin-left:-20px;display:flex;align-items:center;flex-direction:column;transition:background-color 0.2s, opacity 0.2s}.sg-milestone.svelte-10k3w4l .inside.svelte-10k3w4l{position:relative}.sg-milestone.svelte-10k3w4l .inside.svelte-10k3w4l:before{position:absolute;top:0;left:0;content:' ';height:28px;width:28px;transform-origin:0 0;transform:rotate(45deg);background-color:#feac31;border-color:#feac31}.sg-milestone.svelte-10k3w4l.svelte-10k3w4l:not(.moving){transition:transform 0.2s, background-color 0.2s, width 0.2s}.sg-milestone.moving.svelte-10k3w4l.svelte-10k3w4l{z-index:1}.sg-milestone.selected.svelte-10k3w4l.svelte-10k3w4l{outline:2px solid rgba(3, 169, 244, 0.5);outline-offset:3px;z-index:1}");function Qt(e){let n,o,i,s,r=e[0].label+"";return{c(){n=v("div"),o=v("div"),i=x(r),C(o,"class","sg-time-range-label svelte-ezlpj0"),C(n,"class",s="sg-time-range "+(e[0].classes?Array.isArray(e[0].classes)?e[0].classes.join(" "):e[0].classes:"")+" svelte-ezlpj0"),D(n,"width",e[2].width+"px"),D(n,"left",e[2].x+"px"),S(n,"moving",e[1])},m(t,e){p(t,n,e),m(n,o),m(o,i)},p(t,[e]){1&e&&r!==(r=t[0].label+"")&&M(i,r),1&e&&s!==(s="sg-time-range "+(t[0].classes?Array.isArray(t[0].classes)?t[0].classes.join(" "):t[0].classes:"")+" svelte-ezlpj0")&&C(n,"class",s),4&e&&D(n,"width",t[2].width+"px"),4&e&&D(n,"left",t[2].x+"px"),3&e&&S(n,"moving",t[1])},i:t,o:t,d(t){t&&w(n)}}}function Kt(t,e,n){let{model:o}=e,{left:i}=e,{width:s}=e,{resizing:r=!1}=e;const l={width:s,x:i};return t.$set=t=>{"model"in t&&n(0,o=t.model),"left"in t&&n(3,i=t.left),"width"in t&&n(4,s=t.width),"resizing"in t&&n(1,r=t.resizing)},t.$$.update=()=>{24&t.$$.dirty&&(n(2,l.x=i,l),n(2,l.width=s,l))},[o,r,l,i,s]}Ot(".sg-time-range.svelte-ezlpj0{height:100%;position:absolute;display:flex;flex-direction:column;align-items:center;background-image:linear-gradient(-45deg, rgba(0, 0, 0, 0) 46%, #e03218 49%, #e03218 51%, rgba(0, 0, 0, 0) 55%);background-size:6px 6px !important;color:red;font-weight:400}.sg-time-range-label.svelte-ezlpj0{margin-top:10px;background:#fff;white-space:nowrap;padding:4px;font-weight:400;font-size:10px}");class Zt extends ft{constructor(t){super(),gt(this,t,Kt,Qt,r,{model:0,left:3,width:4,resizing:1})}}function Gt(e){let n,o,s,r,l,a;return{c(){n=v("div"),o=v("div"),s=y(),r=v("div"),C(o,"class","sg-time-range-handle-left svelte-1hnnt3v"),C(r,"class","sg-time-range-handle-right svelte-1hnnt3v"),C(n,"class","sg-time-range-control svelte-1hnnt3v"),D(n,"width",e[0].width+"px"),D(n,"left",e[0].x+"px")},m(t,i){p(t,n,i),m(n,o),m(n,s),m(n,r),l||(a=[f(e[1].call(null,o)),f(e[1].call(null,r)),f(e[2].call(null,n))],l=!0)},p(t,[e]){1&e&&D(n,"width",t[0].width+"px"),1&e&&D(n,"left",t[0].x+"px")},i:t,o:t,d(t){t&&w(n),l=!1,i(a)}}}function Jt(t,e,n){const{rowContainer:o}=L("gantt"),{utils:i,columnService:s}=L("services"),{resizeHandleWidth:r}=L("options");L("dimensions");const{api:l}=L("services");let{model:a}=e,{width:d}=e,{left:c}=e;const u={width:d,x:c};return t.$set=t=>{"model"in t&&n(3,a=t.model),"width"in t&&n(4,d=t.width),"left"in t&&n(5,c=t.left)},t.$$.update=()=>{48&t.$$.dirty&&(n(0,u.x=c,u),n(0,u.width=d,u))},[u,function(t){function e(t){xt.update(t),n(0,u.x=t.left,u),n(0,u.width=t.width,u)}const d=new Tt(t,{onDown:t=>{l.timeranges.raise.clicked({model:a}),e({left:t.x,width:t.width,model:a,resizing:!0})},onResize:t=>{l.timeranges.raise.resized({model:a,left:t.x,width:t.width}),e({left:t.x,width:t.width,model:a,resizing:!0})},dragAllowed:!1,resizeAllowed:!0,onDrop:t=>{const n=i.roundTo(s.getDateByPosition(t.x)),o=i.roundTo(s.getDateByPosition(t.x+t.width)),r=s.getPositionByDate(n),l=s.getPositionByDate(o);Object.assign(a,{from:n,to:o}),e({left:r,width:l-r,model:a,resizing:!1}),window.removeEventListener("mousemove",onmousemove,!1)},container:o,resizeHandleWidth:r,getX:()=>u.x,getY:()=>0,getWidth:()=>u.width});return{destroy:()=>d.destroy()}},function(t){a.classes&&t.classList.add(a.classes)},a,d,c]}Ot(".sg-time-range-control.svelte-1hnnt3v{position:absolute}.sg-time-range-handle-left.svelte-1hnnt3v{position:absolute;left:0}.sg-time-range-handle-right.svelte-1hnnt3v{position:absolute;right:0}.sg-time-range-handle-left.svelte-1hnnt3v::before,.sg-time-range-handle-right.svelte-1hnnt3v::before{position:absolute;content:'';bottom:4px;border-radius:6px 6px 6px 0;border:2px solid #b0b0b7;width:9px;height:9px;transform:translateX(-50%) rotate(-45deg);background-color:#fff;border-color:#e03218;cursor:ew-resize}");class Vt extends ft{constructor(t){super(),gt(this,t,Jt,Gt,r,{model:3,width:4,left:5})}}Ot(".column.svelte-1mx1tfz{position:absolute;height:100%;box-sizing:border-box}.column.svelte-1mx1tfz{border-right:#efefef 1px solid}");class te{constructor(t){this.moment=t}format(t,e){return this.moment(t).format(e)}}class ee{format(t,e){const n=new Date(t);switch(e){case"H":return n.getHours()+"";case"HH":return ne(n.getHours());case"H:mm":return`${n.getHours()}:${ne(n.getMinutes())}`;case"hh:mm":return`${ne(n.getHours())}:${ne(n.getMinutes())}`;case"hh:mm:ss":return`${n.getHours()}:${ne(n.getMinutes())}:${ne(n.getSeconds())}`;case"dd/MM/yyyy":return`${n.getDate()}/${n.getMonth()+1}/${n.getFullYear()}`;case"dd/MM/yyyy hh:mm":return`${n.getDate()}/${n.getMonth()+1}/${n.getFullYear()} ${n.getHours()}:${n.getMinutes()}`;case"dd/MM/yyyy hh:mm:ss":return`${n.getDate()}/${n.getMonth()+1}/${n.getFullYear()} ${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}`;case"YYYY":return`${n.getFullYear()}`;case"Q":return`${Math.floor(n.getMonth()/3+1)}`;case"[Q]Q":return`Q${Math.floor(n.getMonth()/3+1)}`;case"YYYY[Q]Q":return`${n.getFullYear()}Q${Math.floor(n.getMonth()/3+1)}`;case"MM":return 1==(o=String(n.getMonth()+1)).length&&(o=`0${o}`),`${o}`;case"MMMM":return`${(o=n.toLocaleString("default",{month:"long"})).charAt(0).toUpperCase()}${o.substring(1)}`;case"MMMM - YYYY":return`${(o=n.toLocaleString("default",{month:"long"})).charAt(0).toUpperCase()}${o.substring(1)}-${n.getFullYear()}`;case"MMMM YYYY":return`${(o=n.toLocaleString("default",{month:"long"})).charAt(0).toUpperCase()}${o.substring(1)} ${n.getFullYear()}`;case"MMM":return`${(o=n.toLocaleString("default",{month:"short"})).charAt(0).toUpperCase()}${o.substring(1)}`;case"MMM - YYYY":return`${(o=n.toLocaleString("default",{month:"short"})).charAt(0).toUpperCase()}${o.substring(1)} - ${n.getFullYear()}`;case"MMM YYYY":var o;return`${(o=n.toLocaleString("default",{month:"short"})).charAt(0).toUpperCase()}${o.substring(1)} ${n.getFullYear()}`;case"W":return`${ie(n)}`;case"WW":const t=ie(n);return`${1==t.toString().length?"0":""}${t}`;default:return console.warn(`Date Format "${e}" is not supported, use another date adapter.`),`${n.getDate()}/${n.getMonth()+1}/${n.getFullYear()}`}}}function ne(t){let e=t.toString();for(let t=e.length;t<2;t++)e="0"+e;return e}function oe(t,e,n,o=!1){return t<100&&t>=0?new Date(t+400,e,n).valueOf()-31536e6:o?function(t){const e=new Date(t),n=e.getDay(),o=e.getDate()-n+(0===n?-6:1);return new Date(e.setDate(o))}(new Date(t,e,n).valueOf()).valueOf():new Date(t,e,n).valueOf()}function ie(t){(t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))).setUTCDate(t.getUTCDate()+4-(t.getUTCDay()||7));const e=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.valueOf()-e.valueOf())/864e5+1)/7)}function se(t,e=1){switch(t){case"y":case"year":return 31536e6*e;case"month":return 30*e*24*60*60*1e3;case"week":return 7*e*24*60*60*1e3;case"d":case"day":return 24*e*60*60*1e3;case"h":case"hour":return 60*e*60*1e3;case"m":case"minute":return 60*e*1e3;case"s":case"second":return 1e3*e;default:throw new Error(`Unknown unit: ${t}`)}}function re(t,e,n){const o=t.slice();return o[15]=e[n],o}function le(t){let e,n,o,i,s,r,l=(t[15].label||"N/A")+"";function a(...e){return t[14](t[15],...e)}return{c(){e=v("div"),n=v("div"),o=x(l),i=y(),C(n,"class","column-header-cell-label svelte-1eoeq9j"),C(e,"class","column-header-cell svelte-1eoeq9j"),D(e,"width",t[15].width+"px"),S(e,"sticky",t[0].sticky)},m(t,l){p(t,e,l),m(e,n),m(n,o),m(e,i),s||(r=z(e,"click",a),s=!0)},p(n,i){t=n,2&i&&l!==(l=(t[15].label||"N/A")+"")&&M(o,l),2&i&&D(e,"width",t[15].width+"px"),1&i&&S(e,"sticky",t[0].sticky)},d(t){t&&w(e),s=!1,r()}}}function ae(e){let n,o=e[1],i=[];for(let t=0;t<o.length;t+=1)i[t]=le(re(e,o,t));return{c(){n=v("div");for(let t=0;t<i.length;t+=1)i[t].c();C(n,"class","column-header-row svelte-1eoeq9j")},m(t,e){p(t,n,e);for(let t=0;t<i.length;t+=1)i[t].m(n,null)},p(t,[e]){if(7&e){let s;for(o=t[1],s=0;s<o.length;s+=1){const r=re(t,o,s);i[s]?i[s].p(r,e):(i[s]=le(r),i[s].c(),i[s].m(n,null))}for(;s<i.length;s+=1)i[s].d(1);i.length=o.length}},i:t,o:t,d(t){t&&w(n),$(i,t)}}}function de(t,e,n){let o,i;const s=B(),{from:r,to:l,width:d}=L("dimensions");a(t,r,(t=>n(10,i=t))),a(t,d,(t=>n(9,o=t)));const{dateAdapter:c}=L("options");let{header:u}=e,{baseWidth:h}=e,{baseDuration:g}=e,{columnWidth:f}=e,{columnCount:m}=e,p=[];function w(t,e,n,o=1){let i=new Date(e),s=[];if("month"==t){let t=[0,2,4,6,7,9,11];for(let e=0;e<n;e++){let n=0;for(let e=0;e<o;e++){let e=0;const o=i.getMonth();if(1==o){e=(t=>29===new Date(t,1,29).getDate())(i.getFullYear())?-1:-2}else t.includes(o)&&(e=1,9==o?e+=1/24:2==o&&(e-=1/24));n+=e,i=new Date(i.setMonth(i.getMonth()+u.offset))}s[e]=n}}else if("year"==t)for(let t=0;t<n;t++){let e=0;i.getFullYear()%4==0&&(e=1),s[t]=e,i=new Date(i.setFullYear(i.getFullYear()+u.offset))}return new Promise((t=>{t(s)}))}return t.$set=t=>{"header"in t&&n(0,u=t.header),"baseWidth"in t&&n(7,h=t.baseWidth),"baseDuration"in t&&n(8,g=t.baseDuration),"columnWidth"in t&&n(5,f=t.columnWidth),"columnCount"in t&&n(6,m=t.columnCount)},t.$$.update=()=>{if(385&t.$$.dirty){n(0,u.duration=se(u.unit,u.offset),u);const t=u.duration;n(5,f=h*(t/g))}if(608&t.$$.dirty&&(n(6,m=Math.ceil(o/f)),isFinite(m)||(console.error("columnCount is not finite"),n(6,m=0))),1633&t.$$.dirty){const t=[];let e=function(t,e){let n=new Date(t),o=n.getFullYear(),i=n.getMonth(),s=n.getDate();switch(e){case"y":case"year":return oe(o,0,1);case"month":return oe(o,i,1);case"week":return oe(o,i,s,!0);case"d":case"day":return oe(o,i,s);case"h":case"hour":return n.setMinutes(0,0,0),n.valueOf();case"m":case"minute":case"s":case"second":let r=se(e);return Math.floor(t/r)*r;default:throw new Error(`Unknown unit: ${e}`)}}(i,u.unit);if("month"==u.unit||"year"==u.unit)w(u.unit,e,m,(null==u?void 0:u.offset)||1).then((i=>{let s=i;for(let n=0;n<m;n++){t.push({width:Math.min(f,o),label:c.format(e,u.format),from:e,to:e+u.duration,unit:u.unit});const i=864e5*s[n];e+=u.duration+i}n(1,p=t)}));else{for(let n=0;n<m;n++)t.push({width:Math.min(f,o),label:c.format(e,u.format),from:e,to:e+u.duration,unit:u.unit}),e+=u.duration;n(1,p=t)}}},[u,p,s,r,d,f,m,h,g,o,i,l,c,w,t=>s("dateSelected",{from:t.from,to:t.to,unit:t.unit})]}Ot(".column-header-row.svelte-1eoeq9j.svelte-1eoeq9j{box-sizing:border-box;white-space:nowrap;height:32px}.column-header-cell.svelte-1eoeq9j.svelte-1eoeq9j{display:inline-block;height:100%;box-sizing:border-box;text-overflow:clip;text-align:center;display:inline-flex;justify-content:center;align-items:center;font-size:1em;font-size:14px;font-weight:300;transition:background 0.2s;cursor:pointer;user-select:none;border-right:#efefef 1px solid;border-bottom:#efefef 1px solid}.column-header-cell.svelte-1eoeq9j.svelte-1eoeq9j:hover{background:#f9f9f9}.column-header-cell.sticky.svelte-1eoeq9j>.column-header-cell-label.svelte-1eoeq9j{position:sticky;left:1rem}");class ce extends ft{constructor(t){super(),gt(this,t,de,ae,r,{header:0,baseWidth:7,baseDuration:8,columnWidth:5,columnCount:6})}}class ue{constructor(){}getPositionByDate(t){return he(t,this.from,this.from+this.totalColumnDuration,this.totalColumnWidth)}getDateByPosition(t){return function(t,e,n,o){return e+t/o*(n-e)}(t,this.from,this.from+this.totalColumnDuration,this.totalColumnWidth)}roundTo(t){return Math.round(t/this.magnetDuration)*this.magnetDuration}}function he(t,e,n,o){if(!t)return;return(t-e)/(n-e)*o}function ge(t,e,n,o){let i=function(t,e,n,o){let i=-1,s=t.length;for(;s-i>1;){let r=Math.floor((i+s)/2);(o?n(t[r])<e:n(t[r])<=e)?i=r:s=r}return o||void 0===t[i]||n(t[i])!==e||(s=i),[i,s]}(t,e,n,o);return[t[i[0]],t[i[1]]]}function fe(t,e,n){const o=t.slice();return o[13]=e[n],o}function me(t){let e;const n=new ce({props:{header:t[13],baseWidth:t[1],baseDuration:t[2]}});return n.$on("dateSelected",t[12]),{c(){ct(n.$$.fragment)},m(t,o){ut(n,t,o),e=!0},p(t,e){const o={};1&e&&(o.header=t[13]),2&e&&(o.baseWidth=t[1]),4&e&&(o.baseDuration=t[2]),n.$set(o)},i(t){e||(it(n.$$.fragment,t),e=!0)},o(t){st(n.$$.fragment,t),e=!1},d(t){ht(n,t)}}}function pe(t){let e,n,o=t[0],i=[];for(let e=0;e<o.length;e+=1)i[e]=me(fe(t,o,e));const s=t=>st(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=k()},m(t,o){for(let e=0;e<i.length;e+=1)i[e].m(t,o);p(t,e,o),n=!0},p(t,[n]){if(7&n){let r;for(o=t[0],r=0;r<o.length;r+=1){const s=fe(t,o,r);i[r]?(i[r].p(s,n),it(i[r],1)):(i[r]=me(s),i[r].c(),it(i[r],1),i[r].m(e.parentNode,e))}for(nt(),r=o.length;r<i.length;r+=1)s(r);ot()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)it(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)st(i[t]);n=!1},d(t){$(i,t),t&&w(e)}}}function we(t,e,n){let o,i,s,{headers:r}=e,{columnUnit:l}=e,{columnOffset:d}=e;const{from:c,to:u,width:h}=L("dimensions");let g,f,m;return a(t,c,(t=>n(9,o=t))),a(t,u,(t=>n(10,i=t))),a(t,h,(t=>n(11,s=t))),t.$set=t=>{"headers"in t&&n(0,r=t.headers),"columnUnit"in t&&n(6,l=t.columnUnit),"columnOffset"in t&&n(7,d=t.columnOffset)},t.$$.update=()=>{if(193&t.$$.dirty){let t=null,e=null;[...r,{unit:l,offset:d}].forEach((n=>{const o=n.duration=n.duration||se(n.unit,n.offset);(o<e||null===e)&&(e=o,t=n)})),n(8,g=t)}3842&t.$$.dirty&&(n(1,f=0|he(o+g.duration,o,i,s)),f<=0&&console.error("baseHeaderWidth is invalid, columns or headers might be too short for the current view.")),256&t.$$.dirty&&n(2,m=g.duration)},[r,f,m,c,u,h,l,d,g,o,i,s,function(e){j(t,e)}]}class $e extends ft{constructor(t){super(),gt(this,t,we,pe,r,{headers:0,columnUnit:6,columnOffset:7})}}function ve(t){let e;return{c(){e=v("div"),C(e,"class","sg-columns svelte-19kvsxe"),D(e,"background-image",t[4])},m(t,n){p(t,e,n)},p(t,n){16&n&&D(e,"background-image",t[4])},d(t){t&&w(e)}}}function be(e){let n,o,i,s="day"==e[1]&&1==e[2]&&e[0]&&ve(e);return{c(){n=v("div"),o=y(),s&&s.c(),i=k(),C(n,"class","sg-columns svelte-19kvsxe"),D(n,"background-image",e[3])},m(t,e){p(t,n,e),p(t,o,e),s&&s.m(t,e),p(t,i,e)},p(t,[e]){8&e&&D(n,"background-image",t[3]),"day"==t[1]&&1==t[2]&&t[0]?s?s.p(t,e):(s=ve(t),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},i:t,o:t,d(t){t&&w(n),t&&w(o),s&&s.d(t),t&&w(i)}}}function xe(t,e){t.beginPath(),t.moveTo(e,0),t.lineTo(e,20),t.stroke()}function ye(t,e,n){let o,{columns:i=[]}=e,{columnStrokeWidth:s=1}=e,{columnStrokeColor:r="#efefef"}=e,{highlightWeekends:l}=e,{columnUnit:d}=e,{columnOffset:c}=e,{highlightColor:u}=e;const{from:h}=L("dimensions");let g,f;return a(t,h,(t=>n(10,o=t))),t.$set=t=>{"columns"in t&&n(6,i=t.columns),"columnStrokeWidth"in t&&n(7,s=t.columnStrokeWidth),"columnStrokeColor"in t&&n(8,r=t.columnStrokeColor),"highlightWeekends"in t&&n(0,l=t.highlightWeekends),"columnUnit"in t&&n(1,d=t.columnUnit),"columnOffset"in t&&n(2,c=t.columnOffset),"highlightColor"in t&&n(9,u=t.highlightColor)},t.$$.update=()=>{64&t.$$.dirty&&(n(3,g=function(t){const e=document.createElement("canvas");e.width=(t.length-1)*t[0].width,e.height=20;const n=e.getContext("2d");return n.shadowColor="rgba(128,128,128,0.5)",n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowBlur=.5,n.lineWidth=s,n.lineCap="square",n.strokeStyle=r,n.translate(.5,.5),t.forEach((t=>{xe(n,t.left)})),`url("${e.toDataURL()}")`}(i.slice(0,5))),n(4,f=function(t){const e=new Date(o).getDay(),n=0==e?7:7-e,i=document.createElement("canvas");i.width=t.length*t[0].width,i.height=20;const s=i.getContext("2d");return s.shadowColor="rgba(128,128,128,0.5)",s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowBlur=.5,s.lineWidth=t[0].width,s.lineCap="square",s.strokeStyle=u,s.translate(.5,.5),t.forEach((function(e,o){o==n&&xe(s,e.left-t[0].width/2),o==n+1&&xe(s,e.left-t[0].width/2)})),`url("${i.toDataURL()}")`}(i.slice(0,7))))},[l,d,c,g,f,h,i,s,r,u]}Ot(".sg-columns.svelte-19kvsxe{position:absolute;height:100%;width:100%;overflow:hidden;background-repeat:repeat;background-position-x:-1px}");class ke extends ft{constructor(t){super(),gt(this,t,ye,be,r,{columns:6,columnStrokeWidth:7,columnStrokeColor:8,highlightWeekends:0,columnUnit:1,columnOffset:2,highlightColor:9})}}Ot(".sg-context-menu.svelte-1a9x2in{position:absolute;background:white;border:1px solid #ccc;padding:0.25em 0;font-size:10px;transition:opacity 0.4s ease 0s;opacity:1;box-shadow:rgba(0, 0, 0, 0.32) 1px 1px 3px 0px}.context-option.svelte-1a9x2in:hover{background:#eee}.context-option.svelte-1a9x2in{cursor:default;padding:0.2em 1em}");function ze(e){let n,o,i;return{c(){n=v("div"),C(n,"class","sg-resize svelte-v0xg82"),D(n,"left",e[0]+"px")},m(t,s){p(t,n,s),o||(i=f(e[1].call(null,n)),o=!0)},p(t,[e]){1&e&&D(n,"left",t[0]+"px")},i:t,o:t,d(t){t&&w(n),o=!1,i()}}}function Ce(t,e,n){const o=B();let{x:i=240}=e,{container:s}=e;const r={onDrag:t=>{n(0,i=t.x),o("resize",{left:i}),Wt("col-resize")},onDrop:t=>{n(0,i=t.x),o("resize",{left:i}),Wt("default")},dragAllowed:!0,resizeAllowed:!1,container:s,getX:()=>i,getY:()=>0,getWidth:()=>0};return t.$set=t=>{"x"in t&&n(0,i=t.x),"container"in t&&n(2,s=t.container)},t.$$.update=()=>{4&t.$$.dirty&&(r.container=s)},[i,function(t){return new Tt(t,r)},s]}Ot(".sg-resize.svelte-v0xg82{z-index:2;background:#e9eaeb;width:5px;cursor:col-resize;position:absolute;height:100%;transition:width 0.2s, transform 0.2s}.sg-resize.svelte-v0xg82:hover{transform:translateX(-2px);width:10px}");class Me extends ft{constructor(t){super(),gt(this,t,Ce,ze,r,{x:0,container:2})}}class De{constructor(){this.selection=pt([])}selectSingle(t){this.selection.set([t])}toggleSelection(t){this.selection.update((e=>{const n=e.indexOf(t);return-1!==n?e.splice(n,1):e.push(t),e}))}clearSelection(){this.selection.set([])}}class We{constructor(){this.listeners=[],this.listenersMap={}}registerEvent(t,e){this[t]||(this[t]={});const n=this[t];n.on||(n.on={},n.raise={});let o="on:"+t+":"+e;n.raise[e]=(...t)=>{this.listeners.forEach((e=>{e.eventId===o&&e.handler(t)}))},n.on[e]=t=>{let e={handler:t,eventId:o};this.listenersMap[o]=e,this.listeners.push(e);return()=>{const t=this.listeners.indexOf(e);this.listeners.splice(t,1)}}}}class Te{constructor(){}createRow(t,e){t.classes=t.classes||"",t.contentHtml=t.contentHtml||void 0,t.enableDragging=void 0===t.enableDragging||t.enableDragging;return{model:t,y:e,height:t.height||this.rowHeight,expanded:!0}}createRows(t){const e={y:0,result:[]};return this.createChildRows(t,e),e.result}createChildRows(t,e,n=null,o=0,i=[]){const s=[],r=[];return n&&(i=[...i,n]),t.forEach((t=>{const l=this.createRow(t,e.y);if(e.result.push(l),s.push(l),r.push(l),l.childLevel=o,l.parent=n,l.allParents=i,e.y+=l.height,t.children){const n=this.createChildRows(t.children,e,l,o+1,i);l.children=n.rows,l.allChildren=n.allRows,r.push(...n.allRows)}})),{rows:s,allRows:r}}}class Ee{constructor(t){this.columnService=t}create(t){t.enableResizing=void 0===t.enableResizing||t.enableResizing;const e=this.columnService.getPositionByDate(t.from);return{model:t,left:e,width:this.columnService.getPositionByDate(t.to)-e,resizing:!1}}}const Re={};function Se(t,e,n){Re[t]||(Re[t]={}),Re[t][e]=n}function Oe(t,e){delete Re[t][e]}function He(t,e){let n;for(let o in t)if(n=e.getAttribute(o))return{attr:o,data:n}}function Ye(t){let{type:e,target:n}=t;const o=Re[e];if(!o)return;let i,s=n;for(;s&&s!=t.currentTarget&&!(i=He(o,s));)s=s.parentElement;i&&o[i.attr]?o[i.attr](t,i.data,s):o.empty&&o.empty(t,null,s)}function Pe(t,e,n){const o=t.slice();return o[131]=e[n],o}function Be(t,e,n){const o=t.slice();return o[134]=e[n],o}function Ae(t,e,n){const o=t.slice();return o[137]=e[n],o}function Le(t,e,n){const o=t.slice();return o[140]=e[n],o}function je(t,e,n){const o=t.slice();return o[137]=e[n],o}function Ue(t,e,n){const o=t.slice();return o[131]=e[n],o}function Xe(t){let n,o;const i=[{rowContainerHeight:t[18]},{paddingTop:t[19]},{paddingBottom:t[20]},{tableWidth:t[1]},t[48],{visibleRows:t[21]}];var s=t[131];function r(t){let n={};for(let t=0;t<i.length;t+=1)n=e(n,i[t]);return{props:n}}if(s){var l=new s(r());l.$on("init",Ge)}const a=new Me({props:{x:t[1],container:t[11]}});return a.$on("resize",t[45]),{c(){l&&ct(l.$$.fragment),n=y(),ct(a.$$.fragment)},m(t,e){l&&ut(l,t,e),p(t,n,e),ut(a,t,e),o=!0},p(t,e){const o=3932162&e[0]|131072&e[1]?at(i,[262144&e[0]&&{rowContainerHeight:t[18]},524288&e[0]&&{paddingTop:t[19]},1048576&e[0]&&{paddingBottom:t[20]},2&e[0]&&{tableWidth:t[1]},131072&e[1]&&dt(t[48]),2097152&e[0]&&{visibleRows:t[21]}]):{};if(s!==(s=t[131])){if(l){nt();const t=l;st(t.$$.fragment,1,0,(()=>{ht(t,1)})),ot()}s?((l=new s(r())).$on("init",Ge),ct(l.$$.fragment),it(l.$$.fragment,1),ut(l,n.parentNode,n)):l=null}else s&&l.$set(o);const d={};2&e[0]&&(d.x=t[1]),2048&e[0]&&(d.container=t[11]),a.$set(d)},i(t){o||(l&&it(l.$$.fragment,t),it(a.$$.fragment,t),o=!0)},o(t){l&&st(l.$$.fragment,t),st(a.$$.fragment,t),o=!1},d(t){l&&ht(l,t),t&&w(n),ht(a,t)}}}function Ie(t,n){let o,i;const s=[n[137]];let r={};for(let t=0;t<s.length;t+=1)r=e(r,s[t]);const l=new Vt({props:r});return{key:t,first:null,c(){o=k(),ct(l.$$.fragment),this.first=o},m(t,e){p(t,o,e),ut(l,t,e),i=!0},p(t,e){const n=134217728&e[0]?at(s,[dt(t[137])]):{};l.$set(n)},i(t){i||(it(l.$$.fragment,t),i=!0)},o(t){st(l.$$.fragment,t),i=!1},d(t){t&&w(o),ht(l,t)}}}function Fe(t,e){let n,o;const i=new qt({props:{row:e[140]}});return{key:t,first:null,c(){n=k(),ct(i.$$.fragment),this.first=n},m(t,e){p(t,n,e),ut(i,t,e),o=!0},p(t,e){const n={};2097152&e[0]&&(n.row=t[140]),i.$set(n)},i(t){o||(it(i.$$.fragment,t),o=!0)},o(t){st(i.$$.fragment,t),o=!1},d(t){t&&w(n),ht(i,t)}}}function Ne(t,n){let o,i;const s=[n[137]];let r={};for(let t=0;t<s.length;t+=1)r=e(r,s[t]);const l=new Zt({props:r});return{key:t,first:null,c(){o=k(),ct(l.$$.fragment),this.first=o},m(t,e){p(t,o,e),ut(l,t,e),i=!0},p(t,e){const n=134217728&e[0]?at(s,[dt(t[137])]):{};l.$set(n)},i(t){i||(it(l.$$.fragment,t),i=!0)},o(t){st(l.$$.fragment,t),i=!1},d(t){t&&w(o),ht(l,t)}}}function _e(t,n){let o,i;const s=[{model:n[134].model},{left:n[134].left},{width:n[134].width},{height:n[134].height},{top:n[134].top},n[134]];let r={};for(let t=0;t<s.length;t+=1)r=e(r,s[t]);const l=new It({props:r});return{key:t,first:null,c(){o=k(),ct(l.$$.fragment),this.first=o},m(t,e){p(t,o,e),ut(l,t,e),i=!0},p(t,e){const n=4194304&e[0]?at(s,[{model:t[134].model},{left:t[134].left},{width:t[134].width},{height:t[134].height},{top:t[134].top},dt(t[134])]):{};l.$set(n)},i(t){i||(it(l.$$.fragment,t),i=!0)},o(t){st(l.$$.fragment,t),i=!1},d(t){t&&w(o),ht(l,t)}}}function qe(t){let n,o;const i=[{paddingTop:t[19]},{paddingBottom:t[20]},{visibleRows:t[21]},t[48]];var s=t[131];function r(t){let n={};for(let t=0;t<i.length;t+=1)n=e(n,i[t]);return{props:n}}if(s){var l=new s(r());l.$on("init",Ge)}return{c(){l&&ct(l.$$.fragment),n=k()},m(t,e){l&&ut(l,t,e),p(t,n,e),o=!0},p(t,e){const o=3670016&e[0]|131072&e[1]?at(i,[524288&e[0]&&{paddingTop:t[19]},1048576&e[0]&&{paddingBottom:t[20]},2097152&e[0]&&{visibleRows:t[21]},131072&e[1]&&dt(t[48])]):{};if(s!==(s=t[131])){if(l){nt();const t=l;st(t.$$.fragment,1,0,(()=>{ht(t,1)})),ot()}s?((l=new s(r())).$on("init",Ge),ct(l.$$.fragment),it(l.$$.fragment,1),ut(l,n.parentNode,n)):l=null}else s&&l.$set(o)},i(t){o||(l&&it(l.$$.fragment,t),o=!0)},o(t){l&&st(l.$$.fragment,t),o=!1},d(t){t&&w(n),l&&ht(l,t)}}}function Qe(t){let e,n,o,s,r,l,a,d,c,u,h,g,b,x,k,M,W,T,E,O,H,Y,P,B=[],A=new Map,L=[],j=new Map,U=[],X=new Map,I=[],F=new Map,N=t[7],_=[];for(let e=0;e<N.length;e+=1)_[e]=Xe(Ue(t,N,e));const q=t=>st(_[t],1,1,(()=>{_[t]=null})),Q=new $e({props:{headers:t[0],columnUnit:t[2],columnOffset:t[3]}});Q.$on("dateSelected",t[47]);let Z=t[27];const G=t=>t[137].model.id;for(let e=0;e<Z.length;e+=1){let n=je(t,Z,e),o=G(n);A.set(o,B[e]=Ie(o,n))}const J=new ke({props:{columns:t[15],columnStrokeColor:t[9],columnStrokeWidth:t[10],columnUnit:t[2],columnOffset:t[3],highlightWeekends:t[4],highlightColor:t[5]}});let V=t[21];const tt=t=>t[140].model.id;for(let e=0;e<V.length;e+=1){let n=Le(t,V,e),o=tt(n);j.set(o,L[e]=Fe(o,n))}let et=t[27];const at=t=>t[137].model.id;for(let e=0;e<et.length;e+=1){let n=Ae(t,et,e),o=at(n);X.set(o,U[e]=Ne(o,n))}let dt=t[22];const gt=t=>t[134].model.id;for(let e=0;e<dt.length;e+=1){let n=Be(t,dt,e),o=gt(n);F.set(o,I[e]=_e(o,n))}let ft=t[8],mt=[];for(let e=0;e<ft.length;e+=1)mt[e]=qe(Pe(t,ft,e));const pt=t=>st(mt[t],1,1,(()=>{mt[t]=null}));return{c(){e=v("div");for(let t=0;t<_.length;t+=1)_[t].c();n=y(),o=v("div"),s=v("div"),r=v("div"),l=v("div"),ct(Q.$$.fragment),a=y();for(let t=0;t<B.length;t+=1)B[t].c();c=y(),u=v("div"),h=v("div"),ct(J.$$.fragment),g=y(),b=v("div"),x=v("div");for(let t=0;t<L.length;t+=1)L[t].c();k=y(),M=v("div");for(let t=0;t<U.length;t+=1)U[t].c();W=y();for(let t=0;t<I.length;t+=1)I[t].c();T=y();for(let t=0;t<mt.length;t+=1)mt[t].c();C(l,"class","header-container svelte-8uspd"),D(l,"width",t[24]+"px"),C(r,"class","sg-header-scroller svelte-8uspd"),C(s,"class","sg-header svelte-8uspd"),K((()=>t[126].call(s))),S(s,"right-scrollbar-visible",t[17]),D(x,"transform","translateY("+t[19]+"px)"),C(b,"class","sg-rows svelte-8uspd"),D(b,"height",t[18]+"px"),C(M,"class","sg-foreground svelte-8uspd"),C(h,"class","content svelte-8uspd"),D(h,"width",t[24]+"px"),C(u,"class","sg-timeline-body svelte-8uspd"),K((()=>t[129].call(u))),S(u,"zooming",t[16]),C(o,"class","sg-timeline sg-view svelte-8uspd"),C(e,"class",O="sg-gantt "+t[6]+" svelte-8uspd"),S(e,"sg-disable-transition",!t[23])},m(i,w){p(i,e,w);for(let t=0;t<_.length;t+=1)_[t].m(e,null);m(e,n),m(e,o),m(o,s),m(s,r),m(r,l),ut(Q,l,null),m(l,a);for(let t=0;t<B.length;t+=1)B[t].m(l,null);t[125](s),d=R(s,t[126].bind(s)),m(o,c),m(o,u),m(u,h),ut(J,h,null),m(h,g),m(h,b),m(b,x);for(let t=0;t<L.length;t+=1)L[t].m(x,null);t[127](b),m(h,k),m(h,M);for(let t=0;t<U.length;t+=1)U[t].m(M,null);m(M,W);for(let t=0;t<I.length;t+=1)I[t].m(M,null);m(h,T);for(let t=0;t<mt.length;t+=1)mt[t].m(h,null);t[128](u),E=R(u,t[129].bind(u)),t[130](e),H=!0,Y||(P=[f(t[44].call(null,r)),f(t[43].call(null,u)),z(u,"wheel",t[46]),z(e,"click",Ye),z(e,"mouseover",Ye),z(e,"mouseleave",Ye)],Y=!0)},p(t,o){if(3934338&o[0]|147456&o[1]){let i;for(N=t[7],i=0;i<N.length;i+=1){const s=Ue(t,N,i);_[i]?(_[i].p(s,o),it(_[i],1)):(_[i]=Xe(s),_[i].c(),it(_[i],1),_[i].m(e,n))}for(nt(),i=N.length;i<_.length;i+=1)q(i);ot()}const i={};if(1&o[0]&&(i.headers=t[0]),4&o[0]&&(i.columnUnit=t[2]),8&o[0]&&(i.columnOffset=t[3]),Q.$set(i),134217728&o[0]){const e=t[27];nt(),B=lt(B,o,G,1,t,e,A,l,rt,Ie,null,je),ot()}(!H||16777216&o[0])&&D(l,"width",t[24]+"px"),131072&o[0]&&S(s,"right-scrollbar-visible",t[17]);const r={};if(32768&o[0]&&(r.columns=t[15]),512&o[0]&&(r.columnStrokeColor=t[9]),1024&o[0]&&(r.columnStrokeWidth=t[10]),4&o[0]&&(r.columnUnit=t[2]),8&o[0]&&(r.columnOffset=t[3]),16&o[0]&&(r.highlightWeekends=t[4]),32&o[0]&&(r.highlightColor=t[5]),J.$set(r),2097152&o[0]){const e=t[21];nt(),L=lt(L,o,tt,1,t,e,j,x,rt,Fe,null,Le),ot()}if((!H||524288&o[0])&&D(x,"transform","translateY("+t[19]+"px)"),(!H||262144&o[0])&&D(b,"height",t[18]+"px"),134217728&o[0]){const e=t[27];nt(),U=lt(U,o,at,1,t,e,X,M,rt,Ne,W,Ae),ot()}if(4194304&o[0]){const e=t[22];nt(),I=lt(I,o,gt,1,t,e,F,M,rt,_e,null,Be),ot()}if(3670272&o[0]|131072&o[1]){let e;for(ft=t[8],e=0;e<ft.length;e+=1){const n=Pe(t,ft,e);mt[e]?(mt[e].p(n,o),it(mt[e],1)):(mt[e]=qe(n),mt[e].c(),it(mt[e],1),mt[e].m(h,null))}for(nt(),e=ft.length;e<mt.length;e+=1)pt(e);ot()}(!H||16777216&o[0])&&D(h,"width",t[24]+"px"),65536&o[0]&&S(u,"zooming",t[16]),(!H||64&o[0]&&O!==(O="sg-gantt "+t[6]+" svelte-8uspd"))&&C(e,"class",O),8388672&o[0]&&S(e,"sg-disable-transition",!t[23])},i(t){if(!H){for(let t=0;t<N.length;t+=1)it(_[t]);it(Q.$$.fragment,t);for(let t=0;t<Z.length;t+=1)it(B[t]);it(J.$$.fragment,t);for(let t=0;t<V.length;t+=1)it(L[t]);for(let t=0;t<et.length;t+=1)it(U[t]);for(let t=0;t<dt.length;t+=1)it(I[t]);for(let t=0;t<ft.length;t+=1)it(mt[t]);H=!0}},o(t){_=_.filter(Boolean);for(let t=0;t<_.length;t+=1)st(_[t]);st(Q.$$.fragment,t);for(let t=0;t<B.length;t+=1)st(B[t]);st(J.$$.fragment,t);for(let t=0;t<L.length;t+=1)st(L[t]);for(let t=0;t<U.length;t+=1)st(U[t]);for(let t=0;t<I.length;t+=1)st(I[t]);mt=mt.filter(Boolean);for(let t=0;t<mt.length;t+=1)st(mt[t]);H=!1},d(n){n&&w(e),$(_,n),ht(Q);for(let t=0;t<B.length;t+=1)B[t].d();t[125](null),d(),ht(J);for(let t=0;t<L.length;t+=1)L[t].d();t[127](null);for(let t=0;t<U.length;t+=1)U[t].d();for(let t=0;t<I.length;t+=1)I[t].d();$(mt,n),t[128](null),E(),t[130](null),Y=!1,i(P)}}}function Ke(t){for(const e in t)if(null==t[e])throw new Error(`"${e}" is not set`)}function Ze(t){return t instanceof Date?t.valueOf():t}function Ge(t){}function Je(t,n,o){const i=["highlightWeekends","highlightColor","rows","tasks","timeRanges","rowPadding","rowHeight","from","to","minWidth","fitWidth","classes","headers","zoomLevels","taskContent","tableWidth","resizeHandleWidth","onTaskButtonClick","dateAdapter","magnetUnit","magnetOffset","columnUnit","columnOffset","ganttTableModules","ganttBodyModules","reflectOnParentRows","reflectOnChildRows","columnStrokeColor","columnStrokeWidth","taskElementHook","columnService","api","taskFactory","rowFactory","dndManager","timeRangeFactory","utils","refreshTimeRanges","refreshTasks","getRowContainer","selectTask","unselectTasks","scrollToRow","scrollToTask","updateTask","updateTasks","updateRow","updateRows","getRow","getTask","getTasks"];let s,r,l,d,c,h,f,m,p,w,$,v,b,x,y,k,z,C,M,D,W=u(n,i);a(t,vt,(t=>o(107,w=t))),a(t,bt,(t=>o(110,b=t))),a(t,yt,(t=>o(111,x=t))),a(t,kt,(t=>o(112,y=t))),a(t,Ct,(t=>o(113,k=t))),a(t,zt,(t=>o(27,M=t)));var T=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,s){function r(t){try{a(o.next(t))}catch(t){s(t)}}function l(t){try{a(o.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,l)}a((o=o.apply(t,e||[])).next())}))};let E,R,S,O,H=[],B=!1,{highlightWeekends:L=!1}=n,{highlightColor:j="#6eb859"}=n,{rows:U}=n,{tasks:I=[]}=n,{timeRanges:F=[]}=n;Ke({rows:U});let{rowPadding:N=6}=n,{rowHeight:_=52}=n;const q=pt(_);a(t,q,(t=>o(99,s=t)));const K=pt(N);a(t,K,(t=>o(100,r=t)));let{from:Z}=n,{to:G}=n;Ke({from:Z,to:G});const J=pt(Ze(Z));a(t,J,(t=>o(101,l=t)));const V=pt(Ze(G));a(t,V,(t=>o(102,d=t)));let{minWidth:tt=800}=n,{fitWidth:et=!1}=n;const nt=pt(tt);a(t,nt,(t=>o(103,c=t)));const ot=pt(et);a(t,ot,(t=>o(104,h=t)));let it,{classes:st=[]}=n,{headers:rt=[{unit:"day",format:"MMMM Do"},{unit:"hour",format:"H:mm"}]}=n,{zoomLevels:lt=[{headers:[{unit:"day",format:"DD.MM.YYYY"},{unit:"hour",format:"HH"}],minWidth:800,fitWidth:!0},{headers:[{unit:"hour",format:"ddd D/M, H A"},{unit:"minute",format:"mm",offset:15}],minWidth:5e3,fitWidth:!1}]}=n,{taskContent:at=null}=n,{tableWidth:dt=100}=n,{resizeHandleWidth:ct=10}=n,{onTaskButtonClick:ut=null}=n,{dateAdapter:ht=new ee}=n,{magnetUnit:gt="minute"}=n,{magnetOffset:ft=15}=n;function mt(t,e){t&&e&&o(90,it=se(t,e))}mt(gt,ft);let $t,{columnUnit:Mt="minute"}=n,{columnOffset:Wt=15}=n;function Tt(t,e){t&&e&&o(91,$t=se(t,e))}Tt(Mt,Wt);let{ganttTableModules:Ot=[]}=n,{ganttBodyModules:Ht=[]}=n,{reflectOnParentRows:Yt=!0}=n,{reflectOnChildRows:Pt=!1}=n,{columnStrokeColor:Bt}=n,{columnStrokeWidth:At}=n,{taskElementHook:Lt=null}=n;const jt=pt(null);a(t,jt,(t=>o(28,D=t)));const Ut=pt(null);a(t,Ut,(t=>o(25,z=t)));const Xt=pt(null);a(t,Xt,(t=>o(26,C=t)));const It=wt([jt,nt,ot],(([t,e,n])=>n&&t>e?t:e));a(t,It,(t=>o(24,f=t)));const Ft={getColumnByDate(t){const e=function(t,e){return ge(t,e,(t=>t.from))}(qt,t);return e[0]?e[0]:e[1]},getColumnByPosition(t){const e=function(t,e){return ge(t,e,(t=>t.left))}(qt,t);return e[0]?e[0]:e[1]},getPositionByDate(t){if(!t)return null;const e=this.getColumnByDate(t);const n=(t-e.from)/e.duration*e.width;return e.left+n},getDateByPosition(t){const e=this.getColumnByPosition(t);t-=e.left;let n=e.duration/e.width*t;return e.from+n},roundTo:t=>Math.round(t/it)*it},Nt=pt(0|he(l+$t,l,d,f));a(t,Nt,(t=>o(105,m=t)));let _t=Math.ceil(f/m),qt=Qt(l,_t,$t,m);function Qt(t,e,n,o){if(!isFinite(e))throw new Error(`column count is not a finite number [${e}]`);if(o<=0)throw new Error("column width is not a positive number");let i=[],s=t,r=0;for(let t=0;t<e;t++){const t=s,e=s+n,l=e-t;i.push({width:o,from:t,left:r,duration:l}),r+=o,s=e}return i}const Kt=wt([Nt,J,V],(()=>({})));a(t,Kt,(t=>o(106,p=t))),A("dimensions",{from:J,to:V,width:It,visibleWidth:jt,visibleHeight:Ut,headerHeight:Xt,dimensionsChanged:Kt}),A("options",{dateAdapter:ht,taskElementHook:Lt,taskContent:at,rowPadding:K,rowHeight:q,resizeHandleWidth:ct,reflectOnParentRows:Yt,reflectOnChildRows:Pt,onTaskButtonClick:ut});const Zt=pt(null);a(t,Zt,(t=>o(108,$=t)));const Gt=pt(null);a(t,Gt,(t=>o(109,v=t)));const Jt={scrollables:H,hoveredRow:Zt,selectedRow:Gt};var Vt;A("gantt",Jt),P((()=>{Object.assign(Jt,{rowContainer:O,mainContainer:S,mainHeaderContainer:R}),ce.registerEvent("tasks","move"),ce.registerEvent("tasks","select"),ce.registerEvent("tasks","switchRow"),ce.registerEvent("tasks","moveEnd"),ce.registerEvent("tasks","change"),ce.registerEvent("tasks","changed"),ce.registerEvent("gantt","viewChanged"),ce.registerEvent("gantt","dateSelected"),ce.registerEvent("tasks","dblclicked"),ce.registerEvent("timeranges","clicked"),ce.registerEvent("timeranges","resized"),o(89,B=!0)})),Se("click","data-task-id",((t,e,n)=>{const o=+e;t.ctrlKey?fe.toggleSelection(o):fe.selectSingle(o),ce.tasks.raise.select(w.entities[o])})),Se("mouseover","data-row-id",((t,e,n)=>{g(Zt,$=+e)})),Se("click","data-row-id",((t,e,n)=>{ye(),g(Gt,v=v!=+e?+e:null)})),Se("mouseleave","empty",((t,e,n)=>{g(Zt,$=null)})),Vt=()=>{Oe("click","data-task-id"),Oe("click","data-row-id")},Y().$$.on_destroy.push(Vt);let te=0,ne=0;let oe=0,ie=!1;function re(t){const e=pe.createRows(t);bt.addAll(e)}function le(t){return T(this,void 0,void 0,(function*(){yield Q();const e=[],n={rowPadding:r};t.forEach((t=>{const o=me.createTask(t),i=b.entities[o.model.resourceId];o.reflections=[],Pt&&i.allChildren&&i.allChildren.forEach((t=>{const i=St(o,t,n);o.reflections.push(i.model.id),e.push(i)})),Yt&&i.allParents.length>0&&i.allParents.forEach((t=>{const i=St(o,t,n);o.reflections.push(i.model.id),e.push(i)})),e.push(o)})),vt.addAll(e)}))}function ae(t){const e=t.map((t=>$e.create(t)));xt.addAll(e)}function de(){return T(this,void 0,void 0,(function*(){o(23,Ae=!1),yield Q(),E.offsetHeight,o(23,Ae=!0)}))}const ce=new We,fe=new De,me=new Rt(Ft),pe=new Te,we=new Et(bt),$e=new Ee(Ft),ve=new ue;function be(){xt._update((({ids:t,entities:e})=>(t.forEach((t=>{const n=e[t],o=0|Ft.getPositionByDate(n.model.from),i=0|Ft.getPositionByDate(n.model.to);n.left=o,n.width=i-o})),{ids:t,entities:e})))}function xe(){x.forEach((t=>{const e=0|Ft.getPositionByDate(t.model.from),n=0|Ft.getPositionByDate(t.model.to);t.left=e,t.width=n-e})),vt.refresh()}function ye(){fe.clearSelection()}A("services",{utils:ve,api:ce,dndManager:we,selectionManager:fe,columnService:Ft});let ke,ze,Ce,Me,Re,He=[],Ye=0,Pe=0,Be=[],Ae=!0;return t.$set=t=>{n=e(e({},n),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),o(48,W=u(n,i)),"highlightWeekends"in t&&o(4,L=t.highlightWeekends),"highlightColor"in t&&o(5,j=t.highlightColor),"rows"in t&&o(52,U=t.rows),"tasks"in t&&o(53,I=t.tasks),"timeRanges"in t&&o(54,F=t.timeRanges),"rowPadding"in t&&o(55,N=t.rowPadding),"rowHeight"in t&&o(56,_=t.rowHeight),"from"in t&&o(57,Z=t.from),"to"in t&&o(58,G=t.to),"minWidth"in t&&o(59,tt=t.minWidth),"fitWidth"in t&&o(60,et=t.fitWidth),"classes"in t&&o(6,st=t.classes),"headers"in t&&o(0,rt=t.headers),"zoomLevels"in t&&o(61,lt=t.zoomLevels),"taskContent"in t&&o(62,at=t.taskContent),"tableWidth"in t&&o(1,dt=t.tableWidth),"resizeHandleWidth"in t&&o(63,ct=t.resizeHandleWidth),"onTaskButtonClick"in t&&o(64,ut=t.onTaskButtonClick),"dateAdapter"in t&&o(65,ht=t.dateAdapter),"magnetUnit"in t&&o(66,gt=t.magnetUnit),"magnetOffset"in t&&o(67,ft=t.magnetOffset),"columnUnit"in t&&o(2,Mt=t.columnUnit),"columnOffset"in t&&o(3,Wt=t.columnOffset),"ganttTableModules"in t&&o(7,Ot=t.ganttTableModules),"ganttBodyModules"in t&&o(8,Ht=t.ganttBodyModules),"reflectOnParentRows"in t&&o(68,Yt=t.reflectOnParentRows),"reflectOnChildRows"in t&&o(69,Pt=t.reflectOnChildRows),"columnStrokeColor"in t&&o(9,Bt=t.columnStrokeColor),"columnStrokeWidth"in t&&o(10,At=t.columnStrokeWidth),"taskElementHook"in t&&o(70,Lt=t.taskElementHook)},t.$$.update=()=>{if(2097152&t.$$.dirty[1]|134217728&t.$$.dirty[2]&&B&&re(U),4194304&t.$$.dirty[1]|134217728&t.$$.dirty[2]&&B&&le(I),8388608&t.$$.dirty[1]|134217728&t.$$.dirty[2]&&B&&ae(F),33554432&t.$$.dirty[1]&&g(q,s=_),16777216&t.$$.dirty[1]&&g(K,r=N),67108864&t.$$.dirty[1]&&g(J,l=Ze(Z)),134217728&t.$$.dirty[1]&&g(V,d=Ze(G)),805306368&t.$$.dirty[1]&&(g(nt,c=tt),g(ot,h=et)),48&t.$$.dirty[2]&&mt(gt,ft),12&t.$$.dirty[0]&&Tt(Mt,Wt),16777216&t.$$.dirty[0]|536870912&t.$$.dirty[2]|768&t.$$.dirty[3]&&g(Nt,m=0|he(l+$t,l,d,f)),16777216&t.$$.dirty[0]|4096&t.$$.dirty[3]&&o(92,_t=Math.ceil(f/m)),1610612736&t.$$.dirty[2]|4352&t.$$.dirty[3]&&o(15,qt=Qt(l,_t,$t,m)),8192&t.$$.dirty[3]&&p&&(xe(),be()),131200&t.$$.dirty[3]&&(o(49,me.rowPadding=r,me),o(49,me.rowEntities=b.entities,me)),33554432&t.$$.dirty[1]&&o(50,pe.rowHeight=_,pe),16777216&t.$$.dirty[0]|1879048240&t.$$.dirty[2]|4864&t.$$.dirty[3]&&(o(51,ve.from=l,ve),o(51,ve.to=d,ve),o(51,ve.width=f,ve),o(51,ve.magnetOffset=ft,ve),o(51,ve.magnetUnit=gt,ve),o(51,ve.magnetDuration=it,ve),o(51,ve.totalColumnDuration=_t*$t,ve),o(51,ve.totalColumnWidth=_t*m,ve)),524288&t.$$.dirty[3]&&o(96,He=y.filter((t=>!t.hidden))),33554432&t.$$.dirty[1]|8&t.$$.dirty[3]&&o(18,ze=He.length*_),33816576&t.$$.dirty[0]&&o(17,ke=ze>z),33554432&t.$$.dirty[1]|1&t.$$.dirty[3]&&o(97,Ce=Math.floor(te/_)),33554432&t.$$.dirty[0]|33554432&t.$$.dirty[1]|24&t.$$.dirty[3]&&o(98,Me=Math.min(Ce+Math.ceil(z/_),He.length-1)),33554432&t.$$.dirty[1]|16&t.$$.dirty[3]&&o(19,Ye=Ce*_),33554432&t.$$.dirty[1]|40&t.$$.dirty[3]&&o(20,Pe=(He.length-Me-1)*_),56&t.$$.dirty[3]&&o(21,Be=He.slice(Ce,Me+1)),2097152&t.$$.dirty[0]|1064960&t.$$.dirty[3]){const t=[];Be.forEach((e=>{k[e.model.id]&&k[e.model.id].forEach((e=>{t.push(w.entities[e])}))})),o(22,Re=t)}8192&t.$$.dirty[3]&&p&&de()},[rt,dt,Mt,Wt,L,j,st,Ot,Ht,Bt,At,E,R,S,O,qt,ie,ke,ze,Ye,Pe,Be,Re,Ae,f,z,C,M,D,q,K,J,V,nt,ot,jt,Ut,Xt,It,Nt,Kt,Zt,Gt,function(t){const e=e=>{const{scrollTop:n,scrollLeft:i}=t;H.forEach((t=>{"horizontal"===t.orientation?t.node.scrollLeft=i:t.node.scrollTop=n})),o(93,te=n),ne=i};return t.addEventListener("scroll",e),{destroy(){t.removeEventListener("scroll",e,!1)}}},function(t){H.push({node:t,orientation:"horizontal"})},function(t){o(1,dt=t.detail.left)},function(t){return T(this,void 0,void 0,(function*(){if(t.ctrlKey){t.preventDefault();const e=oe;if(oe=t.deltaY>0?Math.max(oe-1,0):Math.min(oe+1,lt.length-1),e!=oe&<[oe]){const e=Object.assign({columnUnit:Mt,columnOffset:Wt,minWidth:c},lt[oe]),n=e.minWidth/f,i=S,s=Dt(i,t),r=(i.scrollLeft+s.x)*n-s.x+i.clientWidth/2;console.log("scrollLeft",r),o(2,Mt=e.columnUnit),o(3,Wt=e.columnOffset),g(nt,c=e.minWidth),e.headers&&o(0,rt=e.headers),e.fitWidth&&g(ot,h=e.fitWidth),ce.gantt.raise.viewChanged(),o(16,ie=!0),yield Q(),i.scrollLeft=r,o(16,ie=!1)}}}))},function(t){g(J,l=t.detail.from),g(V,d=t.detail.to),ce.gantt.raise.dateSelected({from:l,to:d})},W,me,pe,ve,U,I,F,N,_,Z,G,tt,et,lt,at,ct,ut,ht,gt,ft,Yt,Pt,Lt,Ft,ce,we,$e,be,xe,function(){return O},function(t){const e=w.entities[t];e&&fe.selectSingle(e)},ye,function(t,e="auto"){const{scrollTop:n,clientHeight:o}=S,i=y.findIndex((e=>e.model.id==t));if(-1===i)return;const s=i*_;s<n&&S.scrollTo({top:s,behavior:e}),s>n+o&&S.scrollTo({top:s+_-o,behavior:e})},function(t,e="auto"){const{scrollLeft:n,scrollTop:o,clientWidth:i,clientHeight:s}=S,r=w.entities[t];if(!r)return;const l=r.left,a=y.findIndex((t=>t.model.id==r.model.resourceId))*_,d={top:void 0,left:void 0,behavior:e};l<n&&(d.left=l),l>n+i&&(d.left=l+r.width-i),a<o&&(d.top=a),a>o+s&&(d.top=a+_-s),S.scrollTo(d)},function(t){const e=me.createTask(t);vt.upsert(e)},function(t){const e=t.map((t=>me.createTask(t)));vt.upsertAll(e)},function(t){const e=pe.createRow(t,null);bt.upsert(e)},function(t){const e=t.map((t=>pe.createRow(t,null)));bt.upsertAll(e)},function(t){return b.entities[t]},function(t){return w.entities[t]},function(t){return k[t]?k[t].map((t=>w.entities[t])):null},B,it,$t,_t,te,ne,oe,He,Ce,Me,s,r,l,d,c,h,m,p,w,$,v,b,x,y,k,T,H,mt,Tt,Qt,Jt,re,le,ae,de,fe,function(t){X[t?"unshift":"push"]((()=>{o(12,R=t)}))},function(){C=this.clientHeight,Xt.set(C)},function(t){X[t?"unshift":"push"]((()=>{o(14,O=t)}))},function(t){X[t?"unshift":"push"]((()=>{o(13,S=t)}))},function(){z=this.clientHeight,Ut.set(z),D=this.clientWidth,jt.set(D)},function(t){X[t?"unshift":"push"]((()=>{o(11,E=t)}))}]}Ot(".sg-disable-transition.svelte-8uspd .sg-task,.sg-disable-transition.svelte-8uspd .sg-milestone{transition:transform 0s, background-color 0.2s, width 0s !important}.sg-view:not(:first-child){margin-left:5px}.right-scrollbar-visible.svelte-8uspd{padding-right:17px}.sg-timeline.svelte-8uspd{flex:1 1 0%;display:flex;flex-direction:column;overflow-x:auto}.sg-gantt.svelte-8uspd{display:flex;width:100%;height:100%;position:relative}.sg-foreground.svelte-8uspd{box-sizing:border-box;overflow:hidden;top:0;left:0;position:absolute;width:100%;height:100%;z-index:1;pointer-events:none}.sg-rows.svelte-8uspd{width:100%;box-sizing:border-box;overflow:hidden}.sg-timeline-body.svelte-8uspd{overflow:auto;flex:1 1 auto}.sg-header-scroller.svelte-8uspd{border-right:1px solid #efefef;overflow:hidden;position:relative}.content.svelte-8uspd{position:relative}*{box-sizing:border-box}");function Ve(t){let e,n,o;function i(t,e){return t[0].expanded?en:tn}let s=i(t),r=s(t);return{c(){e=v("div"),r.c(),C(e,"class","sg-tree-expander svelte-1tk4vqn")},m(i,s){p(i,e,s),r.m(e,null),n||(o=z(e,"click",t[1]),n=!0)},p(t,n){s!==(s=i(t))&&(r.d(1),r=s(t),r&&(r.c(),r.m(e,null)))},d(t){t&&w(e),r.d(),n=!1,o()}}}function tn(t){let e;return{c(){e=v("i"),C(e,"class","fas fa-angle-right")},m(t,n){p(t,e,n)},d(t){t&&w(e)}}}function en(t){let e;return{c(){e=v("i"),C(e,"class","fas fa-angle-down")},m(t,n){p(t,e,n)},d(t){t&&w(e)}}}function nn(t){let e,n,o,i=t[0].children&&Ve(t);const s=t[4].default,r=function(t,e,n,o){if(t){const i=d(t,e,n,o);return t[0](i)}}(s,t,t[3],null);return{c(){e=v("div"),i&&i.c(),n=y(),r&&r.c(),C(e,"class","sg-cell-inner svelte-1tk4vqn"),D(e,"padding-left",3*t[0].childLevel+"em")},m(t,s){p(t,e,s),i&&i.m(e,null),m(e,n),r&&r.m(e,null),o=!0},p(t,[l]){t[0].children?i?i.p(t,l):(i=Ve(t),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r&&r.p&&8&l&&c(r,s,t,t[3],l,null,null),(!o||1&l)&&D(e,"padding-left",3*t[0].childLevel+"em")},i(t){o||(it(r,t),o=!0)},o(t){st(r,t),o=!1},d(t){t&&w(e),i&&i.d(),r&&r.d(t)}}}function on(t,e,n){let{row:o}=e;const i=B();let{$$slots:s={},$$scope:r}=e;return t.$set=t=>{"row"in t&&n(0,o=t.row),"$$scope"in t&&n(3,r=t.$$scope)},[o,function(){o.expanded?i("rowCollapsed",{row:o}):i("rowExpanded",{row:o})},i,r,s]}Ot(".sg-tree-expander.svelte-1tk4vqn{cursor:pointer;min-width:1.4em;display:flex;justify-content:center;align-items:center}.sg-cell-inner.svelte-1tk4vqn{display:flex}");class sn extends ft{constructor(t){super(),gt(this,t,on,nn,r,{row:0})}}function rn(t,e,n){const o=t.slice();return o[12]=e[n],o}function ln(e){let n,o,i=e[1].model.iconClass&&dn(e);function s(t,e){return t[1].model.headerHtml?gn:t[12].renderer?hn:"resourceInfo"===t[12].type?un:cn}let r=s(e),l=r(e);return{c(){i&&i.c(),n=y(),l.c(),o=k()},m(t,e){i&&i.m(t,e),p(t,n,e),l.m(t,e),p(t,o,e)},p(t,e){t[1].model.iconClass?i?i.p(t,e):(i=dn(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),r===(r=s(t))&&l?l.p(t,e):(l.d(1),l=r(t),l&&(l.c(),l.m(o.parentNode,o)))},i:t,o:t,d(t){i&&i.d(t),t&&w(n),l.d(t),t&&w(o)}}}function an(t){let e;const n=new sn({props:{row:t[1],$$slots:{default:[$n]},$$scope:{ctx:t}}});return n.$on("rowCollapsed",t[10]),n.$on("rowExpanded",t[11]),{c(){ct(n.$$.fragment)},m(t,o){ut(n,t,o),e=!0},p(t,e){const o={};2&e&&(o.row=t[1]),32771&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){e||(it(n.$$.fragment,t),e=!0)},o(t){st(n.$$.fragment,t),e=!1},d(t){ht(n,t)}}}function dn(t){let e,n,o;return{c(){e=v("div"),n=v("i"),C(n,"class",o=h(t[1].model.iconClass)+" svelte-ffcwbe"),C(e,"class","sg-table-icon svelte-ffcwbe")},m(t,o){p(t,e,o),m(e,n)},p(t,e){2&e&&o!==(o=h(t[1].model.iconClass)+" svelte-ffcwbe")&&C(n,"class",o)},d(t){t&&w(e)}}}function cn(t){let e,n=t[1].model[t[12].property]+"";return{c(){e=x(n)},m(t,n){p(t,e,n)},p(t,o){3&o&&n!==(n=t[1].model[t[12].property]+"")&&M(e,n)},d(t){t&&w(e)}}}function un(t){let e,n,o,i,s,r=t[1].model[t[12].property]+"";return{c(){e=v("img"),o=y(),i=v("div"),s=x(r),C(e,"class","sg-resource-image svelte-ffcwbe"),e.src!==(n=t[1].model.imageSrc)&&C(e,"src",n),C(e,"alt",""),C(i,"class","sg-resource-title")},m(t,n){p(t,e,n),p(t,o,n),p(t,i,n),m(i,s)},p(t,o){2&o&&e.src!==(n=t[1].model.imageSrc)&&C(e,"src",n),3&o&&r!==(r=t[1].model[t[12].property]+"")&&M(s,r)},d(t){t&&w(e),t&&w(o),t&&w(i)}}}function hn(t){let e,n=t[12].renderer(t[1])+"";return{c(){e=new O(null)},m(t,o){e.m(n,t,o)},p(t,o){3&o&&n!==(n=t[12].renderer(t[1])+"")&&e.p(n)},d(t){t&&e.d()}}}function gn(t){let e,n=t[1].model.headerHtml+"";return{c(){e=new O(null)},m(t,o){e.m(n,t,o)},p(t,o){2&o&&n!==(n=t[1].model.headerHtml+"")&&e.p(n)},d(t){t&&e.d()}}}function fn(t){let e,n,o;return{c(){e=v("div"),n=v("i"),C(n,"class",o=h(t[1].model.iconClass)+" svelte-ffcwbe"),C(e,"class","sg-table-icon svelte-ffcwbe")},m(t,o){p(t,e,o),m(e,n)},p(t,e){2&e&&o!==(o=h(t[1].model.iconClass)+" svelte-ffcwbe")&&C(n,"class",o)},d(t){t&&w(e)}}}function mn(t){let e,n=t[1].model[t[12].property]+"";return{c(){e=x(n)},m(t,n){p(t,e,n)},p(t,o){3&o&&n!==(n=t[1].model[t[12].property]+"")&&M(e,n)},d(t){t&&w(e)}}}function pn(t){let e,n=t[12].renderer(t[1])+"";return{c(){e=new O(null)},m(t,o){e.m(n,t,o)},p(t,o){3&o&&n!==(n=t[12].renderer(t[1])+"")&&e.p(n)},d(t){t&&e.d()}}}function wn(t){let e,n=t[1].model.headerHtml+"";return{c(){e=new O(null)},m(t,o){e.m(n,t,o)},p(t,o){2&o&&n!==(n=t[1].model.headerHtml+"")&&e.p(n)},d(t){t&&e.d()}}}function $n(t){let e,n,o=t[1].model.iconClass&&fn(t);function i(t,e){return t[1].model.headerHtml?wn:t[12].renderer?pn:mn}let s=i(t),r=s(t);return{c(){o&&o.c(),e=y(),r.c(),n=k()},m(t,i){o&&o.m(t,i),p(t,e,i),r.m(t,i),p(t,n,i)},p(t,l){t[1].model.iconClass?o?o.p(t,l):(o=fn(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),s===(s=i(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(t){o&&o.d(t),t&&w(e),r.d(t),t&&w(n)}}}function vn(t){let e,n,o,i,s;const r=[an,ln],l=[];function a(t,e){return"tree"==t[12].type?0:1}return n=a(t),o=l[n]=r[n](t),{c(){e=v("div"),o.c(),i=y(),C(e,"class","sg-table-body-cell sg-table-cell svelte-ffcwbe"),D(e,"width",t[12].width+"px")},m(t,o){p(t,e,o),l[n].m(e,null),m(e,i),s=!0},p(t,d){let c=n;n=a(t),n===c?l[n].p(t,d):(nt(),st(l[c],1,1,(()=>{l[c]=null})),ot(),o=l[n],o||(o=l[n]=r[n](t),o.c()),it(o,1),o.m(e,i)),(!s||1&d)&&D(e,"width",t[12].width+"px")},i(t){s||(it(o),s=!0)},o(t){st(o),s=!1},d(t){t&&w(e),l[n].d()}}}function bn(t){let e,n,o,i,s=t[0],r=[];for(let e=0;e<s.length;e+=1)r[e]=vn(rn(t,s,e));const l=t=>st(r[t],1,1,(()=>{r[t]=null}));return{c(){e=v("div");for(let t=0;t<r.length;t+=1)r[t].c();C(e,"data-row-id",n=t[1].model.id),D(e,"height",t[2]+"px"),C(e,"class",o="sg-table-row "+(t[1].model.classes||"")+" svelte-ffcwbe"),S(e,"sg-row-expanded",t[1].expanded),S(e,"sg-hover",t[3]==t[1].model.id),S(e,"sg-selected",t[4]==t[1].model.id)},m(t,n){p(t,e,n);for(let t=0;t<r.length;t+=1)r[t].m(e,null);i=!0},p(t,[a]){if(3&a){let n;for(s=t[0],n=0;n<s.length;n+=1){const o=rn(t,s,n);r[n]?(r[n].p(o,a),it(r[n],1)):(r[n]=vn(o),r[n].c(),it(r[n],1),r[n].m(e,null))}for(nt(),n=s.length;n<r.length;n+=1)l(n);ot()}(!i||2&a&&n!==(n=t[1].model.id))&&C(e,"data-row-id",n),(!i||4&a)&&D(e,"height",t[2]+"px"),(!i||2&a&&o!==(o="sg-table-row "+(t[1].model.classes||"")+" svelte-ffcwbe"))&&C(e,"class",o),2&a&&S(e,"sg-row-expanded",t[1].expanded),10&a&&S(e,"sg-hover",t[3]==t[1].model.id),18&a&&S(e,"sg-selected",t[4]==t[1].model.id)},i(t){if(!i){for(let t=0;t<s.length;t+=1)it(r[t]);i=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)st(r[t]);i=!1},d(t){t&&w(e),$(r,t)}}}function xn(t,e,n){let o,i,s,{headers:r=null}=e,{row:l=null}=e;const{rowHeight:d}=L("options");a(t,d,(t=>n(2,o=t)));const{hoveredRow:c,selectedRow:u}=L("gantt");a(t,c,(t=>n(3,i=t))),a(t,u,(t=>n(4,s=t)));const h=B();let g="";return P((()=>{0==l.model.expanded&&h("rowCollapsed",{row:l})})),t.$set=t=>{"headers"in t&&n(0,r=t.headers),"row"in t&&n(1,l=t.row)},t.$$.update=()=>{2&t.$$.dirty&&(g=l.parent?`padding-left: ${3*l.childLevel}em;`:"")},[r,l,o,i,s,d,c,u,g,h,function(e){j(t,e)},function(e){j(t,e)}]}Ot(".sg-table-row.svelte-ffcwbe{display:inline-flex;min-width:100%;align-items:stretch;position:relative;font-weight:400;font-size:14px}.sg-table-cell.svelte-ffcwbe{border-left:1px solid #eee}.sg-table-body-cell.svelte-ffcwbe{border-bottom:#efefef 1px solid;background-color:#fff;font-weight:bold}.sg-resource-image.svelte-ffcwbe{width:2.4em;height:2.4em;border-radius:50%;margin-right:.6em;background:#047c69}.sg-resource-info.svelte-ffcwbe{flex:1;height:100%;display:flex;flex-direction:row;align-items:center}.sg-table-icon.svelte-ffcwbe{margin-right:0.5em}");class yn extends ft{constructor(t){super(),gt(this,t,xn,bn,r,{headers:0,row:1})}}function kn(t,e,n){const o=t.slice();return o[30]=e[n],o}function zn(t,e,n){const o=t.slice();return o[33]=e[n],o}function Cn(t){let e,n,o,i=t[33].title+"";return{c(){e=v("div"),n=x(i),o=y(),C(e,"class","sg-table-header-cell sg-table-cell svelte-87uanl"),D(e,"width",t[33].width+"px")},m(t,i){p(t,e,i),m(e,n),m(e,o)},p(t,o){32&o[0]&&i!==(i=t[33].title+"")&&M(n,i),32&o[0]&&D(e,"width",t[33].width+"px")},d(t){t&&w(e)}}}function Mn(t){let e;const n=new yn({props:{row:t[30],headers:t[5]}});return n.$on("rowExpanded",t[15]),n.$on("rowCollapsed",t[16]),{c(){ct(n.$$.fragment)},m(t,o){ut(n,t,o),e=!0},p(t,e){const o={};16&e[0]&&(o.row=t[30]),32&e[0]&&(o.headers=t[5]),n.$set(o)},i(t){e||(it(n.$$.fragment,t),e=!0)},o(t){st(n.$$.fragment,t),e=!1},d(t){ht(n,t)}}}function Dn(t){let e,n,o,i,s,r,l,a,d,c=t[5],u=[];for(let e=0;e<c.length;e+=1)u[e]=Cn(zn(t,c,e));let h=t[4],g=[];for(let e=0;e<h.length;e+=1)g[e]=Mn(kn(t,h,e));const b=t=>st(g[t],1,1,(()=>{g[t]=null}));return{c(){e=v("div"),n=v("div");for(let t=0;t<u.length;t+=1)u[t].c();o=y(),i=v("div"),s=v("div"),r=v("div");for(let t=0;t<g.length;t+=1)g[t].c();C(n,"class","sg-table-header svelte-87uanl"),D(n,"height",t[8]+"px"),C(r,"class","sg-table-rows svelte-87uanl"),D(r,"padding-top",t[1]+"px"),D(r,"padding-bottom",t[2]+"px"),D(r,"height",t[3]+"px"),C(s,"class","sg-table-scroller svelte-87uanl"),C(i,"class","sg-table-body svelte-87uanl"),S(i,"bottom-scrollbar-visible",t[7]),C(e,"class","sg-table sg-view svelte-87uanl"),D(e,"width",t[0]+"px")},m(c,h){p(c,e,h),m(e,n);for(let t=0;t<u.length;t+=1)u[t].m(n,null);t[29](n),m(e,o),m(e,i),m(i,s),m(s,r);for(let t=0;t<g.length;t+=1)g[t].m(r,null);l=!0,a||(d=f(t[14].call(null,s)),a=!0)},p(t,o){if(32&o[0]){let e;for(c=t[5],e=0;e<c.length;e+=1){const i=zn(t,c,e);u[e]?u[e].p(i,o):(u[e]=Cn(i),u[e].c(),u[e].m(n,null))}for(;e<u.length;e+=1)u[e].d(1);u.length=c.length}if((!l||256&o[0])&&D(n,"height",t[8]+"px"),98352&o[0]){let e;for(h=t[4],e=0;e<h.length;e+=1){const n=kn(t,h,e);g[e]?(g[e].p(n,o),it(g[e],1)):(g[e]=Mn(n),g[e].c(),it(g[e],1),g[e].m(r,null))}for(nt(),e=h.length;e<g.length;e+=1)b(e);ot()}(!l||2&o[0])&&D(r,"padding-top",t[1]+"px"),(!l||4&o[0])&&D(r,"padding-bottom",t[2]+"px"),(!l||8&o[0])&&D(r,"height",t[3]+"px"),128&o[0]&&S(i,"bottom-scrollbar-visible",t[7]),(!l||1&o[0])&&D(e,"width",t[0]+"px")},i(t){if(!l){for(let t=0;t<h.length;t+=1)it(g[t]);l=!0}},o(t){g=g.filter(Boolean);for(let t=0;t<g.length;t+=1)st(g[t]);l=!1},d(n){n&&w(e),$(u,n),t[29](null),$(g,n),a=!1,d()}}}function Wn(t){t.forEach((t=>{t.children&&Wn(t.children),t.hidden=!0}))}function Tn(t,e=!1){t.forEach((t=>{t.children&&Tn(t.children,!t.expanded),t.hidden=e}))}function En(t,e,n){let o,i,s,r,l,d,c;a(t,bt,(t=>n(18,o=t))),a(t,vt,(t=>n(20,s=t)));const u=B();let{tableWidth:h}=e,{paddingTop:f}=e,{paddingBottom:m}=e,{rowContainerHeight:p}=e,{visibleRows:w}=e,{tableHeaders:$=[{title:"Name",property:"label",width:100}]}=e;const{from:v,to:b,width:x,visibleWidth:y,headerHeight:k}=L("dimensions");a(t,x,(t=>n(22,l=t))),a(t,y,(t=>n(23,d=t))),a(t,k,(t=>n(8,c=t)));const{rowPadding:z,rowHeight:C}=L("options");a(t,z,(t=>n(21,r=t))),a(t,C,(t=>n(19,i=t))),P((()=>{u("init",{module:this})}));const{scrollables:M}=L("gantt");let D,W,T;function E(){let t=0;o.ids.forEach((e=>{o.entities[e].hidden||(g(bt,o.entities[e].y=t,o),t+=i)})),s.ids.forEach((t=>{const e=s.entities[t],n=o.entities[e.model.resourceId];g(vt,s.entities[t].top=n.y+r,s)}))}return t.$set=t=>{"tableWidth"in t&&n(0,h=t.tableWidth),"paddingTop"in t&&n(1,f=t.paddingTop),"paddingBottom"in t&&n(2,m=t.paddingBottom),"rowContainerHeight"in t&&n(3,p=t.rowContainerHeight),"visibleRows"in t&&n(4,w=t.visibleRows),"tableHeaders"in t&&n(5,$=t.tableHeaders)},t.$$.update=()=>{if(32&t.$$.dirty[0]){let t=0;$.forEach((e=>{t+=e.width})),n(17,W=t)}12713985&t.$$.dirty[0]&&n(7,T=l>d&&W<=h)},[h,f,m,p,w,$,D,T,c,x,y,k,z,C,function(t){return M.push({node:t,orientation:"vertical"}),t.addEventListener("scroll",(e=>{n(6,D.scrollLeft=t.scrollLeft,D)})),{destroy(){t.removeEventListener("scroll")}}},function(t){const e=t.detail.row;e.expanded=!0,e.children&&Tn(e.children),E()},function(t){const e=t.detail.row;e.expanded=!1,e.children&&Wn(e.children),E()},W,o,i,s,r,l,d,u,v,b,M,E,function(t){X[t?"unshift":"push"]((()=>{n(6,D=t)}))}]}Ot(".bottom-scrollbar-visible.svelte-87uanl{padding-bottom:17px}.sg-table.svelte-87uanl{overflow-x:auto;display:flex;flex-direction:column}.sg-table-scroller.svelte-87uanl{width:100%;border-bottom:1px solid #efefef;overflow-y:hidden}.sg-table-header.svelte-87uanl{display:flex;align-items:stretch;overflow:hidden;border-bottom:#efefef 1px solid;background-color:#fbfbfb}.sg-table-body.svelte-87uanl{display:flex;flex:1 1 0;width:100%;overflow-y:hidden}.sg-table-header-cell.svelte-87uanl{font-size:14px;font-weight:400}.sg-table-cell{white-space:nowrap;overflow:hidden;display:flex;align-items:center;flex-shrink:0;padding:0 .5em;height:100%}.sg-table-cell:last-child{flex-grow:1}");var Rn=class extends ft{constructor(t){super(),gt(this,t,En,Dn,r,{tableWidth:0,paddingTop:1,paddingBottom:2,rowContainerHeight:3,visibleRows:4,tableHeaders:5},[-1,-1])}};function Sn(e){let n,o,i;return{c(){n=b("svg"),o=b("path"),i=b("path"),C(o,"d",e[2]),C(o,"stroke",e[0]),C(o,"stroke-width",e[1]),C(o,"fill","transparent"),C(o,"class","select-area svelte-1uk268y"),C(i,"d",e[3]),C(i,"fill",e[0]),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"shape-rendering","crispEdges"),C(n,"class","arrow svelte-1uk268y"),C(n,"height","100%"),C(n,"width","100%")},m(t,e){p(t,n,e),m(n,o),m(n,i)},p(t,[e]){4&e&&C(o,"d",t[2]),1&e&&C(o,"stroke",t[0]),2&e&&C(o,"stroke-width",t[1]),8&e&&C(i,"d",t[3]),1&e&&C(i,"fill",t[0])},i:t,o:t,d(t){t&&w(n)}}}function On(t,e,n){let o,i,s,r,{startY:l}=e,{endY:a}=e,{endX:d}=e,{startX:c}=e,{minLen:u=12}=e,{arrowSize:h=5}=e,{stroke:g="red"}=e,{strokeWidth:f=2}=e;return P((()=>{})),t.$set=t=>{"startY"in t&&n(4,l=t.startY),"endY"in t&&n(5,a=t.endY),"endX"in t&&n(6,d=t.endX),"startX"in t&&n(7,c=t.startX),"minLen"in t&&n(8,u=t.minLen),"arrowSize"in t&&n(9,h=t.arrowSize),"stroke"in t&&n(0,g=t.stroke),"strokeWidth"in t&&n(1,f=t.strokeWidth)},t.$$.update=()=>{if(48&t.$$.dirty&&n(10,o=a-l),192&t.$$.dirty&&n(11,i=d-c),3568&t.$$.dirty){let t;NaN!=c&&null!=c||n(2,s="M0 0"),t=c+u>=d&&l!=a?`L ${c+u} ${l} \n L ${c+u} ${l+o/2}\n L ${d-u} ${l+o/2}\n L ${d-u} ${a} `:`L ${c+i/2} ${l} \n L ${c+i/2} ${a}`,n(2,s=`M${c} ${l}`+t+`L ${d-2} ${a}`)}608&t.$$.dirty&&(NaN!=d&&null!=d||n(3,r="M0 0"),n(3,r=`M${d-h} ${a-h} L${d} ${a} L${d-h} ${a+h} Z`))},[g,f,s,r,l,a,d,c,u,h]}Ot(".arrow.svelte-1uk268y{position:absolute;left:0px;pointer-events:none}.select-area.svelte-1uk268y{pointer-events:visible;position:absolute}");class Hn extends ft{constructor(t){super(),gt(this,t,On,Sn,r,{startY:4,endY:5,endX:6,startX:7,minLen:8,arrowSize:9,stroke:0,strokeWidth:1})}}function Yn(t){let e,n;const o=new Hn({props:{startX:t[3].left+t[3].width,startY:t[3].top+t[3].height/2,endX:t[4].left,endY:t[4].top+t[4].height/2,stroke:t[1],strokeWidth:t[2]}});return{c(){e=v("div"),ct(o.$$.fragment),C(e,"class","sg-dependency svelte-741ycn"),D(e,"left","0"),D(e,"top","0"),C(e,"data-dependency-id",t[0])},m(t,i){p(t,e,i),ut(o,e,null),n=!0},p(t,[i]){const s={};8&i&&(s.startX=t[3].left+t[3].width),8&i&&(s.startY=t[3].top+t[3].height/2),16&i&&(s.endX=t[4].left),16&i&&(s.endY=t[4].top+t[4].height/2),2&i&&(s.stroke=t[1]),4&i&&(s.strokeWidth=t[2]),o.$set(s),(!n||1&i)&&C(e,"data-dependency-id",t[0])},i(t){n||(it(o.$$.fragment,t),n=!0)},o(t){st(o.$$.fragment,t),n=!1},d(t){t&&w(e),ht(o)}}}function Pn(t,e,n){let o;a(t,vt,(t=>n(7,o=t)));let i,s,{id:r}=e,{fromId:l}=e,{toId:d}=e,{stroke:c}=e,{strokeWidth:u}=e;return t.$set=t=>{"id"in t&&n(0,r=t.id),"fromId"in t&&n(5,l=t.fromId),"toId"in t&&n(6,d=t.toId),"stroke"in t&&n(1,c=t.stroke),"strokeWidth"in t&&n(2,u=t.strokeWidth)},t.$$.update=()=>{160&t.$$.dirty&&n(3,i=o.entities[l]),192&t.$$.dirty&&n(4,s=o.entities[d])},[r,c,u,i,s,l,d]}Ot(".sg-dependency.svelte-741ycn{position:absolute;width:100%;height:100%}");class Bn extends ft{constructor(t){super(),gt(this,t,Pn,Yn,r,{id:0,fromId:5,toId:6,stroke:1,strokeWidth:2})}}function An(t,e,n){const o=t.slice();return o[6]=e[n],o}function Ln(t,n){let o,i;const s=[n[6]];let r={};for(let t=0;t<s.length;t+=1)r=e(r,s[t]);const l=new Bn({props:r});return{key:t,first:null,c(){o=k(),ct(l.$$.fragment),this.first=o},m(t,e){p(t,o,e),ut(l,t,e),i=!0},p(t,e){const n=1&e?at(s,[dt(t[6])]):{};l.$set(n)},i(t){i||(it(l.$$.fragment,t),i=!0)},o(t){st(l.$$.fragment,t),i=!1},d(t){t&&w(o),ht(l,t)}}}function jn(t){let e,n,o=[],i=new Map,s=t[0];const r=t=>t[6].id;for(let e=0;e<s.length;e+=1){let n=An(t,s,e),l=r(n);i.set(l,o[e]=Ln(l,n))}return{c(){e=v("div");for(let t=0;t<o.length;t+=1)o[t].c();C(e,"class","dependency-container svelte-50yf7x")},m(t,i){p(t,e,i);for(let t=0;t<o.length;t+=1)o[t].m(e,null);n=!0},p(t,[n]){if(1&n){const s=t[0];nt(),o=lt(o,n,r,1,t,s,i,e,rt,Ln,null,An),ot()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)it(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)st(o[t]);n=!1},d(t){t&&w(e);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Un(t,e,n){let o,i;a(t,vt,(t=>n(4,o=t)));const{visibleHeight:s}=L("dimensions");a(t,s,(t=>n(5,i=t)));let{paddingTop:r}=e,{dependencies:l=[]}=e,d=[];return t.$set=t=>{"paddingTop"in t&&n(2,r=t.paddingTop),"dependencies"in t&&n(3,l=t.dependencies)},t.$$.update=()=>{if(60&t.$$.dirty){const t=[];for(let e=0;e<l.length;e++){const n=l[e],s=o.entities,a=s[n.fromId],d=s[n.toId];a&&d&&Math.min(a.top,d.top)<=r+i&&Math.max(a.top,d.top)>=r&&t.push(n)}n(0,d=t)}},[d,s,r,l]}Ot(".dependency-container.svelte-50yf7x{position:absolute;width:100%;height:100%;pointer-events:none;top:0;float:left;overflow:hidden;z-index:0}");var Xn=class extends ft{constructor(t){super(),gt(this,t,Un,jn,r,{paddingTop:2,dependencies:3})}};const In={enabled:!0,elementContent:()=>{const t=document.createElement("div");return t.innerHTML="New Task",Object.assign(t.style,{position:"absolute",background:"#eee",padding:"0.5em 1em",fontSize:"12px",pointerEvents:"none"}),t}};class Fn{constructor(t,e){this.options=Object.assign({},In,e),this.draggable=new Tt(t,{onDrag:this.onDrag.bind(this),dragAllowed:()=>this.options.enabled,resizeAllowed:!1,onDrop:this.onDrop.bind(this),container:document.body,getX:t=>t.pageX,getY:t=>t.pageY,getWidth:()=>0})}onDrag({x:t,y:e}){this.element||(this.element=this.options.elementContent(),document.body.appendChild(this.element),this.options.dragging=!0),this.element.style.top=e+"px",this.element.style.left=t+"px"}onDrop(t){var e,n,o,i;const s=this.options.gantt,r=s.dndManager.getTarget("row",t.mouseEvent);if(r){const o=Dt(s.getRowContainer(),t.mouseEvent),i=s.utils.getDateByPosition(o.x);null===(n=(e=this.options).onsuccess)||void 0===n||n.call(e,r,i,s)}else null===(i=(o=this.options).onfail)||void 0===i||i.call(o);document.body.removeChild(this.element),this.options.dragging=!1,this.element=null}}var Nn=class extends ft{constructor(t){super(),gt(this,t,Je,Qe,r,{highlightWeekends:4,highlightColor:5,rows:52,tasks:53,timeRanges:54,rowPadding:55,rowHeight:56,from:57,to:58,minWidth:59,fitWidth:60,classes:6,headers:0,zoomLevels:61,taskContent:62,tableWidth:1,resizeHandleWidth:63,onTaskButtonClick:64,dateAdapter:65,magnetUnit:66,magnetOffset:67,columnUnit:2,columnOffset:3,ganttTableModules:7,ganttBodyModules:8,reflectOnParentRows:68,reflectOnChildRows:69,columnStrokeColor:9,columnStrokeWidth:10,taskElementHook:70,columnService:71,api:72,taskFactory:49,rowFactory:50,dndManager:73,timeRangeFactory:74,utils:51,refreshTimeRanges:75,refreshTasks:76,getRowContainer:77,selectTask:78,unselectTasks:79,scrollToRow:80,scrollToTask:81,updateTask:82,updateTasks:83,updateRow:84,updateRows:85,getRow:86,getTask:87,getTasks:88},[-1,-1,-1,-1,-1])}get columnService(){return this.$$.ctx[71]}get api(){return this.$$.ctx[72]}get taskFactory(){return this.$$.ctx[49]}get rowFactory(){return this.$$.ctx[50]}get dndManager(){return this.$$.ctx[73]}get timeRangeFactory(){return this.$$.ctx[74]}get utils(){return this.$$.ctx[51]}get refreshTimeRanges(){return this.$$.ctx[75]}get refreshTasks(){return this.$$.ctx[76]}get getRowContainer(){return this.$$.ctx[77]}get selectTask(){return this.$$.ctx[78]}get unselectTasks(){return this.$$.ctx[79]}get scrollToRow(){return this.$$.ctx[80]}get scrollToTask(){return this.$$.ctx[81]}get updateTask(){return this.$$.ctx[82]}get updateTasks(){return this.$$.ctx[83]}get updateRow(){return this.$$.ctx[84]}get updateRows(){return this.$$.ctx[85]}get getRow(){return this.$$.ctx[86]}get getTask(){return this.$$.ctx[87]}get getTasks(){return this.$$.ctx[88]}};export{te as MomentSvelteGanttDateAdapter,Nn as SvelteGantt,Xn as SvelteGanttDependencies,Fn as SvelteGanttExternal,Rn as SvelteGanttTable};export default null;
|
|
//# sourceMappingURL=/sm/0efb39eb74ee5e6a13806f48d002a4da523f03441aea00208c6eb29cd9eb257a.map
|