@enablerr-ui/task 0.2.75 → 0.2.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -1 +1 @@
1
- System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,i,a,l,c,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,r=t.currentRoles,s=t.settings,i=t.Page},function(t){a=t.Form},function(t){l=t.Workflow},function(t){c=t.Report},function(t){u=t.Collaboration}],execute:function(){t("version","0.2.75");function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m,$,f=(m=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==s(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},i),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:a.bind(null,e,n),mount:l.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var i={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function l(t,e,n){var r=Object.keys(i),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),i=r();e.instance=new t.component(o(o({},s),{},{target:i,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},m($={exports:{}},$.exports),$.exports),p=d(f);function g(){}function b(t){return t()}function v(){return Object.create(null)}function h(t){t.forEach(b)}function y(t){return"function"==typeof t}function k(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function w(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return g;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function x(t,e){t.appendChild(e)}function I(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function O(t){return document.createTextNode(t)}function S(){return O(" ")}function j(){return O("")}function q(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function P(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let T;function N(t){T=t}function z(){if(!T)throw new Error("Function called outside component initialization");return T}const D=[],W=[],A=[],M=[],F=Promise.resolve();let V=!1;function G(){V||(V=!0,F.then(K))}function R(t){A.push(t)}function Y(t){M.push(t)}let J=!1;const L=new Set;function K(){if(!J){J=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];N(e),H(e.$$)}for(N(null),D.length=0;W.length;)W.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];L.has(e)||(L.add(e),e())}A.length=0}while(D.length);for(;M.length;)M.pop()();V=!1,J=!1,L.clear()}}function H(t){if(null!==t.fragment){t.update(),h(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const Q=new Set;let U;function X(){U={r:0,c:[],p:U}}function Z(){U.r||h(U.c),U=U.p}function tt(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function et(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),U&&U.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function rt(t){t&&t.c()}function st(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:i,after_update:a}=t.$$;r&&r.m(e,n),o||R((()=>{const e=s.map(b).filter(y);i?i.push(...e):h(e),t.$$.on_mount=[]})),a.forEach(R)}function it(t,e){const n=t.$$;null!==n.fragment&&(h(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function at(t,e,n,o,r,s,i=[-1]){const a=T;N(t);const l=t.$$={fragment:null,ctx:null,props:s,update:g,not_equal:r,bound:v(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:v(),dirty:i,skip_bound:!1};let c=!1;if(l.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return l.ctx&&r(l.ctx[e],l.ctx[e]=s)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(D.push(t),G(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],l.update(),c=!0,h(l.before_update),l.fragment=!!o&&o(l.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);l.fragment&&l.fragment.l(t),t.forEach(E)}else l.fragment&&l.fragment.c();e.intro&&tt(t.$$.fragment),st(t,e.target,e.anchor,e.customElement),K()}N(a)}class lt{$destroy(){it(this,1),this.$destroy=g}$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(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function ct(t){let e,n,o,r,s;return{c(){e=C("svg"),n=C("path"),o=C("line"),r=C("line"),q(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),q(o,"x1","12"),q(o,"y1","9"),q(o,"x2","12"),q(o,"y2","13"),q(r,"x1","12"),q(r,"y1","17"),q(r,"x2","12.01"),q(r,"y2","17"),q(e,"xmlns","http://www.w3.org/2000/svg"),q(e,"width",t[0]),q(e,"height",t[0]),q(e,"fill","none"),q(e,"viewBox","0 0 24 24"),q(e,"stroke","currentColor"),q(e,"stroke-width",t[1]),q(e,"stroke-linecap","round"),q(e,"stroke-linejoin","round"),q(e,"class",s="feather feather-alert-triangle "+t[2])},m(t,s){I(t,e,s),x(e,n),x(e,o),x(e,r)},p(t,[n]){1&n&&q(e,"width",t[0]),1&n&&q(e,"height",t[0]),2&n&&q(e,"stroke-width",t[1]),4&n&&s!==(s="feather feather-alert-triangle "+t[2])&&q(e,"class",s)},i:g,o:g,d(t){t&&E(e)}}}function ut(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class dt extends lt{constructor(t){super(),at(this,t,ut,ct,k,{size:0,strokeWidth:1,class:2})}}function mt(t){let e,n,o;return{c(){e=C("svg"),n=C("polyline"),q(n,"points","6 9 12 15 18 9"),q(e,"xmlns","http://www.w3.org/2000/svg"),q(e,"width",t[0]),q(e,"height",t[0]),q(e,"fill","none"),q(e,"viewBox","0 0 24 24"),q(e,"stroke","currentColor"),q(e,"stroke-width",t[1]),q(e,"stroke-linecap","round"),q(e,"stroke-linejoin","round"),q(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){I(t,e,o),x(e,n)},p(t,[n]){1&n&&q(e,"width",t[0]),1&n&&q(e,"height",t[0]),2&n&&q(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&q(e,"class",o)},i:g,o:g,d(t){t&&E(e)}}}function $t(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class ft extends lt{constructor(t){super(),at(this,t,$t,mt,k,{size:0,strokeWidth:1,class:2})}}function pt(t){return{c:g,m:g,p:g,i:g,o:g,d:g}}function gt(t){let e,n,o,r,s,i,l,c,u,d,m,$,f,p,g,b,v,h,y,k,w=t[1].status+"";return u=new t[6]({props:{$$slots:{default:[yt]},$$scope:{ctx:t}}}),v=new t[9]({props:{class:"divider"}}),y=new a({props:{schema:t[22],recID:t[3],prevEventID:t[4],taskId:t[0],prev:t[5],readonly:t[2],root:"true"}}),y.$on("back",t[11]),{c(){e=_("div"),n=_("table"),o=_("th"),r=S(),s=_("th"),i=S(),l=_("tr"),c=_("td"),rt(u.$$.fragment),d=S(),m=_("tr"),$=_("td"),$.textContent="Task-Status:",f=S(),p=_("td"),g=O(w),b=S(),rt(v.$$.fragment),h=S(),rt(y.$$.fragment),P(o,"width","20%"),P(s,"width","80%"),q(c,"colspan","2"),q(c,"class","svelte-1udgmqg"),q(l,"class","svelte-1udgmqg"),q($,"class","svelte-1udgmqg"),q(p,"class","svelte-1udgmqg"),q(m,"class","svelte-1udgmqg"),q(e,"class","subcat svelte-1udgmqg")},m(t,a){I(t,e,a),x(e,n),x(n,o),x(n,r),x(n,s),x(n,i),x(n,l),x(l,c),st(u,c,null),x(n,d),x(n,m),x(m,$),x(m,f),x(m,p),x(p,g),I(t,b,a),st(v,t,a),I(t,h,a),st(y,t,a),k=!0},p(t,e){const n={};16777216&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n),(!k||2&e)&&w!==(w=t[1].status+"")&&B(g,w);const o={};8&e&&(o.recID=t[3]),16&e&&(o.prevEventID=t[4]),1&e&&(o.taskId=t[0]),32&e&&(o.prev=t[5]),4&e&&(o.readonly=t[2]),y.$set(o)},i(t){k||(tt(u.$$.fragment,t),tt(v.$$.fragment,t),tt(y.$$.fragment,t),k=!0)},o(t){et(u.$$.fragment,t),et(v.$$.fragment,t),et(y.$$.fragment,t),k=!1},d(t){t&&E(e),it(u),t&&E(b),it(v,t),t&&E(h),it(y,t)}}}function bt(t){let e,n,o,r,s=t[22].identity.description+"";return e=new t[9]({}),o=new t[9]({}),{c(){rt(e.$$.fragment),n=O(s),rt(o.$$.fragment)},m(t,s){st(e,t,s),I(t,n,s),st(o,t,s),r=!0},p:g,i(t){r||(tt(e.$$.fragment,t),tt(o.$$.fragment,t),r=!0)},o(t){et(e.$$.fragment,t),et(o.$$.fragment,t),r=!1},d(t){it(e,t),t&&E(n),it(o,t)}}}function vt(t){let e,n,o;return n=new ft({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=O("Beschreibung\n "),rt(n.$$.fragment)},m(t,r){I(t,e,r),st(n,t,r),o=!0},p:g,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n,t)}}}function ht(t){let e,n,o;return n=new t[8]({props:{$$slots:{default:[vt]},$$scope:{ctx:t}}}),n.$on("click",(function(){y(t[23])&&t[23].apply(this,arguments)})),{c(){e=_("div"),rt(n.$$.fragment),q(e,"slot","handle")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(e,o){t=e;const r={};16777216&o&&(r.$$scope={dirty:o,ctx:t}),n.$set(r)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function yt(t){let e,n;return e=new t[7]({props:{$$slots:{handle:[ht,({toggle:t})=>({23:t}),({toggle:t})=>t?8388608:0],default:[bt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};25165824&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function kt(t){return{c:g,m:g,p:g,i:g,o:g,d:g}}function wt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:kt,then:gt,catch:pt,value:22,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==r&&(i=i.slice(),i[r]=s);const a=t&&(e.current=t)(i);let l=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(X(),et(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),Z())})):e.block.d(1),a.c(),tt(a,1),a.m(e.mount(),e.anchor),l=!0),e.block=a,e.blocks&&(e.blocks[o]=a),l&&K()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=z();if(t.then((t=>{N(n),o(e.then,1,e.value,t),N(null)}),(t=>{if(N(n),o(e.catch,2,e.error,t),N(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}(t[10],o),{c(){e=j(),o.block.c()},m(t,r){I(t,e,r),o.block.m(t,o.anchor=r),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(o,t=e,n)},i(t){n||(tt(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){et(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function xt(t,r,s){const{Accordion:i,AccordionSection:a,Card:l,Table:c,Button:u,Modal:d,Tabs:m,Divider:$,FormField:f,TextField:p}=e;let{task:g}=r,{taskId:b}=r,{eventItem:v}=r,{followerEventId:h}=r;const y=g,k=v,w=n.getSchema(h||k._id);let x,I,E=y.task?.readonly,_=y.docId||y.id;h&&(I=_,_=void 0,x=k._id),o.subscribe((async t=>{t&&t.taskId===b&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{s(1,y.status=t.status,y),s(1,y.readonly=t.readonly,y),s(2,E=y.readonly)}))}));return t.$$set=t=>{"task"in t&&s(12,g=t.task),"taskId"in t&&s(0,b=t.taskId),"eventItem"in t&&s(13,v=t.eventItem),"followerEventId"in t&&s(14,h=t.followerEventId)},[b,y,E,_,x,I,i,a,u,$,w,()=>window.singleSpaNavigate("/"),g,v,h]}class It extends lt{constructor(t){var e;super(),document.getElementById("svelte-1udgmqg-style")||((e=_("style")).id="svelte-1udgmqg-style",e.textContent=".subcat.svelte-1udgmqg.svelte-1udgmqg{margin-bottom:0.5em}.subcat.svelte-1udgmqg table td.svelte-1udgmqg{padding-bottom:0.5em}.subcat.svelte-1udgmqg table tr.svelte-1udgmqg{vertical-align:top}.task_divider{background:#326173;color:#326173}.subcat .accordion .btn{padding:0;margin:0}.subcat .accordion .btn:hover,.subcat .accordion .btn:focus{background:inherit}tr.svelte-1udgmqg>td.svelte-1udgmqg{padding:0}",x(document.head,e)),at(this,t,xt,wt,k,{task:12,taskId:0,eventItem:13,followerEventId:14})}}function Et(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[0].visum?.role||t[2]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};5&n&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function _t(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[6]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.value=t[6]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Ct(t){let e,n,o;return e=new t[12]({props:{noCalendar:!0,readonly:!0,value:t[5]}}),n=new t[13]({props:{readonly:!0,value:t[5]}}),{c(){rt(e.$$.fragment),rt(n.$$.fragment)},m(t,r){st(e,t,r),st(n,t,r),o=!0},p(t,o){const r={};32&o&&(r.value=t[5]),e.$set(r);const s={};32&o&&(s.value=t[5]),n.$set(s)},i(t){o||(tt(e.$$.fragment,t),tt(n.$$.fragment,t),o=!0)},o(t){et(e.$$.fragment,t),et(n.$$.fragment,t),o=!1},d(t){it(e,t),it(n,t)}}}function Ot(t){let e,n,o=t[0].visum&&Ct(t);return{c(){o&&o.c(),e=j()},m(t,r){o&&o.m(t,r),I(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n&&tt(o,1)):(o=Ct(t),o.c(),tt(o,1),o.m(e.parentNode,e)):o&&(X(),et(o,1,1,(()=>{o=null})),Z())},i(t){n||(tt(o),n=!0)},o(t){et(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function St(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[qt]},$$scope:{ctx:t}}}),e.$on("click",t[15]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.disabled=t[1]),134217856&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function jt(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Bt]},$$scope:{ctx:t}}}),e.$on("click",t[16]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function qt(t){let e;return{c(){e=O(t[7])},m(t,n){I(t,e,n)},p(t,n){128&n&&B(e,t[7])},d(t){t&&E(e)}}}function Bt(t){let e;return{c(){e=O("Visum zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e;return{c(){e=O("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Tt(t){let e,n,o,r;return o=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Pt]},$$scope:{ctx:t}}}),o.$on("click",t[17]),{c(){e=_("p"),e.textContent="Willst du die Aufgabe visieren?",n=S(),rt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),st(o,t,s),r=!0},p(t,e){const n={};134217728&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(tt(o.$$.fragment,t),r=!0)},o(t){et(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),it(o,t)}}}function Nt(t){let e,n,o;return n=new dt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),q(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:g,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function zt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[26],danger:!0,$$slots:{"title-icon":[Nt],default:[Tt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};67108864&n&&(o.closeCallback=t[26]),134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Dt(t){let e;return{c(){e=O("Ja, bitte zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Wt(t){let e,n,o,r;return o=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Dt]},$$scope:{ctx:t}}}),o.$on("click",t[18]),{c(){e=_("p"),e.textContent="Willst du das Visum zurücknehmen?",n=S(),rt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),st(o,t,s),r=!0},p(t,e){const n={};134217728&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(tt(o.$$.fragment,t),r=!0)},o(t){et(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),it(o,t)}}}function At(t){let e,n,o;return n=new dt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),q(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:g,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function Mt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[26],danger:!0,$$slots:{"title-icon":[At],default:[Wt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};67108864&n&&(o.closeCallback=t[26]),134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Ft(t){let e,n,o,r,s,i,a,l,c,u,d,m,$,f,p,g,b,v;r=new t[10]({props:{name:"Rolle",$$slots:{default:[Et]},$$scope:{ctx:t}}}),i=new t[10]({props:{name:"visiert von",$$slots:{default:[_t]},$$scope:{ctx:t}}}),l=new t[10]({props:{name:"visiert am",$$slots:{default:[Ot]},$$scope:{ctx:t}}});const h=[jt,St],y=[];function k(t,e){return t[0].visum&&"Ready"===t[0].status?0:1}function w(e){t[24](e)}u=k(t),d=y[u]=h[u](t);let C={$$slots:{default:[zt,({closeCallback:t})=>({26:t}),({closeCallback:t})=>t?67108864:0]},$$scope:{ctx:t}};function O(e){t[25](e)}void 0!==t[3]&&(C.open=t[3]),$=new t[8]({props:C}),W.push((()=>ot($,"open",w)));let j={$$slots:{default:[Mt,({closeCallback:t})=>({26:t}),({closeCallback:t})=>t?67108864:0]},$$scope:{ctx:t}};return void 0!==t[4]&&(j.open=t[4]),g=new t[8]({props:j}),W.push((()=>ot(g,"open",O))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=S(),o=_("div"),rt(r.$$.fragment),s=S(),rt(i.$$.fragment),a=S(),rt(l.$$.fragment),c=S(),d.c(),m=S(),rt($.$$.fragment),p=S(),rt(g.$$.fragment),q(o,"class","visum")},m(t,d){I(t,e,d),I(t,n,d),I(t,o,d),st(r,o,null),x(o,s),st(i,o,null),x(o,a),st(l,o,null),x(o,c),y[u].m(o,null),I(t,m,d),st($,t,d),I(t,p,d),st(g,t,d),v=!0},p(t,[e]){const n={};134217733&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};134217792&e&&(s.$$scope={dirty:e,ctx:t}),i.$set(s);const a={};134217761&e&&(a.$$scope={dirty:e,ctx:t}),l.$set(a);let c=u;u=k(t),u===c?y[u].p(t,e):(X(),et(y[c],1,1,(()=>{y[c]=null})),Z(),d=y[u],d?d.p(t,e):(d=y[u]=h[u](t),d.c()),tt(d,1),d.m(o,null));const m={};201326592&e&&(m.$$scope={dirty:e,ctx:t}),!f&&8&e&&(f=!0,m.open=t[3],Y((()=>f=!1))),$.$set(m);const p={};201326592&e&&(p.$$scope={dirty:e,ctx:t}),!b&&16&e&&(b=!0,p.open=t[4],Y((()=>b=!1))),g.$set(p)},i(t){v||(tt(r.$$.fragment,t),tt(i.$$.fragment,t),tt(l.$$.fragment,t),tt(d),tt($.$$.fragment,t),tt(g.$$.fragment,t),v=!0)},o(t){et(r.$$.fragment,t),et(i.$$.fragment,t),et(l.$$.fragment,t),et(d),et($.$$.fragment,t),et(g.$$.fragment,t),v=!1},d(t){t&&E(e),t&&E(n),t&&E(o),it(r),it(i),it(l),y[u].d(),t&&E(m),it($,t),t&&E(p),it(g,t)}}}function Vt(t,i,a){let l,c;w(t,r,(t=>a(22,l=t))),w(t,s,(t=>a(23,c=t)));const{Modal:u,Dialog:d,FormField:m,TextField:$,DatePicker:f,TimePicker:p,Button:g}=e;let b,v,h,y,k,x,{task:I}=i,{taskId:E}=i,{eventItem:_}=i,C=!1,O=!1;return o.subscribe((t=>{t&&t.taskId===E&&a(0,I.visum=t.data,I)})),t.$$set=t=>{"task"in t&&a(0,I=t.task),"taskId"in t&&a(19,E=t.taskId),"eventItem"in t&&a(20,_=t.eventItem)},t.$$.update=()=>{15728647&t.$$.dirty&&(a(5,v=new Date(I.visum?.timeStamp)),a(7,y=I.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),a(21,k=!I.visum),a(21,k=k&&!!_.output?.approval?.length),k&&l&&(a(2,x=_.output.approval.flatMap((({refRole:t})=>t))),a(21,k=x.some((t=>l.some((e=>t===e)))))),a(1,b=!k),a(6,h=I.visum?.user||(b?"":c.email)))},[I,b,x,C,O,v,h,y,u,d,m,$,f,p,g,()=>{a(3,C=!0)},()=>{a(4,O=!0)},()=>{a(3,C=!1);const t={eventId:_._id,eventDesignation:_.identity.designation,docId:I.docId,role:x.filter((t=>l.find((e=>e===t)))).join(", "),user:c.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(I._id,t),a(0,I.visum=t,I)},()=>{a(4,O=!1),n.deleteTaskVisum(I._id,_._id),a(0,I.visum=!1,I)},E,_,k,l,c,function(t){C=t,a(3,C)},function(t){O=t,a(4,O)}]}class Gt extends lt{constructor(t){var e;super(),document.getElementById("svelte-b9m9m8-style")||((e=_("style")).id="svelte-b9m9m8-style",e.textContent=".visum .time-picker .dropdown{display:none !important}",x(document.head,e)),at(this,t,Vt,Ft,k,{task:0,taskId:19,eventItem:20})}}const{document:Rt}=nt;function Yt(t){let e,n,o,r,s,i,a,l,c=t[7](t[25],!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){y(t[6](t[28],t[21],t[20],t[26]))&&t[6](t[28],t[21],t[20],t[26]).apply(this,arguments)}));var u=t[24].component;function d(t){return{props:{taskId:t[21],task:t[27],eventItem:t[25],followerEventId:t[26]}}}return u&&(a=new u(d(t)),a.$on("back",t[8])),{c(){e=_("div"),rt(n.$$.fragment),o=S(),r=O(c),s=S(),i=_("div"),a&&rt(a.$$.fragment),q(e,"class","task--header svelte-be0b6g"),q(i,"class","task--content svelte-be0b6g")},m(t,c){I(t,e,c),st(n,e,null),x(e,o),x(e,r),I(t,s,c),I(t,i,c),a&&st(a,i,null),l=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!l||101711873&o)&&c!==(c=t[7](t[25],!!t[26]||t[0]===t[20])+"")&&B(r,c);const m={};if(2097152&o&&(m.taskId=t[21]),134217728&o&&(m.task=t[27]),33554432&o&&(m.eventItem=t[25]),67108864&o&&(m.followerEventId=t[26]),u!==(u=t[24].component)){if(a){X();const t=a;et(t.$$.fragment,1,0,(()=>{it(t,1)})),Z()}u?(a=new u(d(t)),a.$on("back",t[8]),rt(a.$$.fragment),tt(a.$$.fragment,1),st(a,i,null)):a=null}else u&&a.$set(m)},i(t){l||(tt(n.$$.fragment,t),a&&tt(a.$$.fragment,t),l=!0)},o(t){et(n.$$.fragment,t),a&&et(a.$$.fragment,t),l=!1},d(t){t&&E(e),it(n),t&&E(s),t&&E(i),a&&it(a)}}}function Jt(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[Yt]},$$scope:{ctx:t}}}),{c(){e=_("div"),rt(n.$$.fragment),q(e,"class","task svelte-be0b6g")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title=t[19]),1605369857&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function Lt(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[Jt,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=_("div"),rt(n.$$.fragment),q(e,"class","task--page svelte-be0b6g")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function Kt(t){let e,n,o;return n=new i({props:{update:t[4],$$slots:{default:[Lt,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:i,followerEventId:a,task:l,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:i,26:a,27:l,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=S(),rt(n.$$.fragment),Rt.title="enablerr - Task"},m(t,r){I(t,e,r),st(n,t,r),o=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n,t)}}}function Ht(t,o,r){const{Modal:s,Dialog:i,Tabs:a}=e;let d,m,$,f,p,g;const b={items:[{id:"task",name:"Aufgabe",component:It},{id:"visum",name:"Visum",component:Gt},{id:"collab",name:"Kommunikation",component:u},{id:"workflow",name:"Workflow",component:l},{id:"report",name:"Anhänge",component:c}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},v=()=>{scrollY=window.scrollY,f=document.body.style.position,p=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};v();const h=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){z().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[$,s,i,a,async(t,e,o,s)=>{const i=b.findById(o);if(!i)return h(t,e,b.deflt());"task"!==o&&(s=void 0),r(0,$=e);let a={status:"New"};const l=await n.getEvent(t);l||window.singleSpaNavigate("/error");let c=l.identity.designation;if(s){const t=await n.getEvent(s);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(d===e?a=m:(d=e,m=a=await n.getTaskById(e)),a||window.singleSpaNavigate("/error"),a.event!==l._id.toString()&&window.singleSpaNavigate("/error")):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:l,followerEventId:s,task:a,items:b.map(),findMenu:t=>b.findByName(t)}},function(t){t.detail.value?v():(document.body.style.position=f||"",document.body.style.top="",document.body.style.overflow=p||"",document.body.style.width=g||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||h(n,e,t(r))},(t,e)=>{let n=!t.output?.approval;return(G(),F).then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)}))})),""},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>window.singleSpaNavigate("/")]}class Qt extends lt{constructor(t){var e;super(),Rt.getElementById("svelte-be0b6g-style")||((e=_("style")).id="svelte-be0b6g-style",e.textContent='.task--page.svelte-be0b6g .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-be0b6g{margin-top:4em}@media(max-height: 900px){.task.svelte-be0b6g{margin-top:0}}.task.svelte-be0b6g .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-be0b6g .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-be0b6g{margin-top:0.5em}.task--header.svelte-be0b6g .task_tabs{margin-bottom:1em}.task--content.svelte-be0b6g{margin-top:1em;overflow-x:hidden;overflow-y:auto;height:fit-content;min-height:40vh;max-height:90vh}',x(Rt.head,e)),at(this,t,Ht,Kt,k,{})}}const Ut=p({component:Qt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Xt,mount:Zt,unmount:te}=Ut;t({bootstrap:Xt,mount:Zt,unmount:te});t("Task",Qt)}}}));
1
+ System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,i,l,a,c,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,r=t.currentRoles,s=t.settings,i=t.Page},function(t){l=t.Form},function(t){a=t.Workflow},function(t){c=t.Report},function(t){u=t.Collaboration}],execute:function(){t("version","0.2.77");function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m,$,f=(m=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==s(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},i),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,e,n),mount:a.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var i={component:null,domElementGetter:null,props:{}};function l(t){return Promise.resolve()}function a(t,e,n){var r=Object.keys(i),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),i=r();e.instance=new t.component(o(o({},s),{},{target:i,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},m($={exports:{}},$.exports),$.exports),p=d(f);function g(){}function v(t){return t()}function h(){return Object.create(null)}function b(t){t.forEach(v)}function y(t){return"function"==typeof t}function w(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function k(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return g;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function x(t,e){t.appendChild(e)}function I(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function j(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function O(){return C(" ")}function S(){return C("")}function q(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function P(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let T;function N(t){T=t}function z(){if(!T)throw new Error("Function called outside component initialization");return T}const D=[],A=[],W=[],M=[],F=Promise.resolve();let V=!1;function G(){V||(V=!0,F.then(K))}function R(t){W.push(t)}function Y(t){M.push(t)}let J=!1;const L=new Set;function K(){if(!J){J=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];N(e),H(e.$$)}for(N(null),D.length=0;A.length;)A.pop()();for(let t=0;t<W.length;t+=1){const e=W[t];L.has(e)||(L.add(e),e())}W.length=0}while(D.length);for(;M.length;)M.pop()();V=!1,J=!1,L.clear()}}function H(t){if(null!==t.fragment){t.update(),b(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const Q=new Set;let U;function X(){U={r:0,c:[],p:U}}function Z(){U.r||b(U.c),U=U.p}function tt(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function et(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),U&&U.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function rt(t){t&&t.c()}function st(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:i,after_update:l}=t.$$;r&&r.m(e,n),o||R((()=>{const e=s.map(v).filter(y);i?i.push(...e):b(e),t.$$.on_mount=[]})),l.forEach(R)}function it(t,e){const n=t.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function lt(t,e,n,o,r,s,i=[-1]){const l=T;N(t);const a=t.$$={fragment:null,ctx:null,props:s,update:g,not_equal:r,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:e.context||[]),callbacks:h(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return a.ctx&&r(a.ctx[e],a.ctx[e]=s)&&(!a.skip_bound&&a.bound[e]&&a.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(D.push(t),G(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],a.update(),c=!0,b(a.before_update),a.fragment=!!o&&o(a.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);a.fragment&&a.fragment.l(t),t.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&tt(t.$$.fragment),st(t,e.target,e.anchor,e.customElement),K()}N(l)}class at{$destroy(){it(this,1),this.$destroy=g}$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(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function ct(t){let e,n,o,r,s;return{c(){e=j("svg"),n=j("path"),o=j("line"),r=j("line"),q(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),q(o,"x1","12"),q(o,"y1","9"),q(o,"x2","12"),q(o,"y2","13"),q(r,"x1","12"),q(r,"y1","17"),q(r,"x2","12.01"),q(r,"y2","17"),q(e,"xmlns","http://www.w3.org/2000/svg"),q(e,"width",t[0]),q(e,"height",t[0]),q(e,"fill","none"),q(e,"viewBox","0 0 24 24"),q(e,"stroke","currentColor"),q(e,"stroke-width",t[1]),q(e,"stroke-linecap","round"),q(e,"stroke-linejoin","round"),q(e,"class",s="feather feather-alert-triangle "+t[2])},m(t,s){I(t,e,s),x(e,n),x(e,o),x(e,r)},p(t,[n]){1&n&&q(e,"width",t[0]),1&n&&q(e,"height",t[0]),2&n&&q(e,"stroke-width",t[1]),4&n&&s!==(s="feather feather-alert-triangle "+t[2])&&q(e,"class",s)},i:g,o:g,d(t){t&&E(e)}}}function ut(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class dt extends at{constructor(t){super(),lt(this,t,ut,ct,w,{size:0,strokeWidth:1,class:2})}}function mt(t){let e,n,o;return{c(){e=j("svg"),n=j("polyline"),q(n,"points","6 9 12 15 18 9"),q(e,"xmlns","http://www.w3.org/2000/svg"),q(e,"width",t[0]),q(e,"height",t[0]),q(e,"fill","none"),q(e,"viewBox","0 0 24 24"),q(e,"stroke","currentColor"),q(e,"stroke-width",t[1]),q(e,"stroke-linecap","round"),q(e,"stroke-linejoin","round"),q(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){I(t,e,o),x(e,n)},p(t,[n]){1&n&&q(e,"width",t[0]),1&n&&q(e,"height",t[0]),2&n&&q(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&q(e,"class",o)},i:g,o:g,d(t){t&&E(e)}}}function $t(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class ft extends at{constructor(t){super(),lt(this,t,$t,mt,w,{size:0,strokeWidth:1,class:2})}}function pt(t){return{c:g,m:g,p:g,i:g,o:g,d:g}}function gt(t){let e,n,o,r,s,i,a,c,u,d,m,$,f,p,g,v,h,b,y,w,k=t[1].status+"";return u=new t[6]({props:{$$slots:{default:[yt]},$$scope:{ctx:t}}}),h=new t[9]({props:{class:"divider"}}),y=new l({props:{schema:t[22],recID:t[3],prevEventID:t[4],taskId:t[0],prev:t[5],readonly:t[2],root:"true"}}),y.$on("back",t[11]),{c(){e=_("div"),n=_("table"),o=_("th"),r=O(),s=_("th"),i=O(),a=_("tr"),c=_("td"),rt(u.$$.fragment),d=O(),m=_("tr"),$=_("td"),$.textContent="Task-Status:",f=O(),p=_("td"),g=C(k),v=O(),rt(h.$$.fragment),b=O(),rt(y.$$.fragment),P(o,"width","20%"),P(s,"width","80%"),q(c,"colspan","2"),q(c,"class","svelte-1udgmqg"),q(a,"class","svelte-1udgmqg"),q($,"class","svelte-1udgmqg"),q(p,"class","svelte-1udgmqg"),q(m,"class","svelte-1udgmqg"),q(e,"class","subcat svelte-1udgmqg")},m(t,l){I(t,e,l),x(e,n),x(n,o),x(n,r),x(n,s),x(n,i),x(n,a),x(a,c),st(u,c,null),x(n,d),x(n,m),x(m,$),x(m,f),x(m,p),x(p,g),I(t,v,l),st(h,t,l),I(t,b,l),st(y,t,l),w=!0},p(t,e){const n={};16777216&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n),(!w||2&e)&&k!==(k=t[1].status+"")&&B(g,k);const o={};8&e&&(o.recID=t[3]),16&e&&(o.prevEventID=t[4]),1&e&&(o.taskId=t[0]),32&e&&(o.prev=t[5]),4&e&&(o.readonly=t[2]),y.$set(o)},i(t){w||(tt(u.$$.fragment,t),tt(h.$$.fragment,t),tt(y.$$.fragment,t),w=!0)},o(t){et(u.$$.fragment,t),et(h.$$.fragment,t),et(y.$$.fragment,t),w=!1},d(t){t&&E(e),it(u),t&&E(v),it(h,t),t&&E(b),it(y,t)}}}function vt(t){let e,n,o,r,s=t[22].identity.description+"";return e=new t[9]({}),o=new t[9]({}),{c(){rt(e.$$.fragment),n=C(s),rt(o.$$.fragment)},m(t,s){st(e,t,s),I(t,n,s),st(o,t,s),r=!0},p:g,i(t){r||(tt(e.$$.fragment,t),tt(o.$$.fragment,t),r=!0)},o(t){et(e.$$.fragment,t),et(o.$$.fragment,t),r=!1},d(t){it(e,t),t&&E(n),it(o,t)}}}function ht(t){let e,n,o;return n=new ft({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=C("Beschreibung\n "),rt(n.$$.fragment)},m(t,r){I(t,e,r),st(n,t,r),o=!0},p:g,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n,t)}}}function bt(t){let e,n,o;return n=new t[8]({props:{$$slots:{default:[ht]},$$scope:{ctx:t}}}),n.$on("click",(function(){y(t[23])&&t[23].apply(this,arguments)})),{c(){e=_("div"),rt(n.$$.fragment),q(e,"slot","handle")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(e,o){t=e;const r={};16777216&o&&(r.$$scope={dirty:o,ctx:t}),n.$set(r)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function yt(t){let e,n;return e=new t[7]({props:{$$slots:{handle:[bt,({toggle:t})=>({23:t}),({toggle:t})=>t?8388608:0],default:[vt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};25165824&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function wt(t){return{c:g,m:g,p:g,i:g,o:g,d:g}}function kt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:wt,then:gt,catch:pt,value:22,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let i=e.ctx;void 0!==r&&(i=i.slice(),i[r]=s);const l=t&&(e.current=t)(i);let a=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(X(),et(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),Z())})):e.block.d(1),l.c(),tt(l,1),l.m(e.mount(),e.anchor),a=!0),e.block=l,e.blocks&&(e.blocks[o]=l),a&&K()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=z();if(t.then((t=>{N(n),o(e.then,1,e.value,t),N(null)}),(t=>{if(N(n),o(e.catch,2,e.error,t),N(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}(t[10],o),{c(){e=S(),o.block.c()},m(t,r){I(t,e,r),o.block.m(t,o.anchor=r),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(o,t=e,n)},i(t){n||(tt(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){et(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function xt(t,r,s){const{Accordion:i,AccordionSection:l,Card:a,Table:c,Button:u,Modal:d,Tabs:m,Divider:$,FormField:f,TextField:p}=e;let{task:g}=r,{taskId:v}=r,{eventItem:h}=r,{followerEventId:b}=r;const y=g,w=h,k=n.getSchema(b||w._id);let x,I,E=y.task?.readonly,_=y.docId||y.id;b&&(I=_,_=void 0,x=w._id),o.subscribe((async t=>{t&&t.taskId===v&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{s(1,y.status=t.status,y),s(1,y.readonly=t.readonly,y),s(2,E=y.readonly)}))}));return t.$$set=t=>{"task"in t&&s(12,g=t.task),"taskId"in t&&s(0,v=t.taskId),"eventItem"in t&&s(13,h=t.eventItem),"followerEventId"in t&&s(14,b=t.followerEventId)},[v,y,E,_,x,I,i,l,u,$,k,()=>window.singleSpaNavigate("/"),g,h,b]}class It extends at{constructor(t){var e;super(),document.getElementById("svelte-1udgmqg-style")||((e=_("style")).id="svelte-1udgmqg-style",e.textContent=".subcat.svelte-1udgmqg.svelte-1udgmqg{margin-bottom:0.5em}.subcat.svelte-1udgmqg table td.svelte-1udgmqg{padding-bottom:0.5em}.subcat.svelte-1udgmqg table tr.svelte-1udgmqg{vertical-align:top}.task_divider{background:#326173;color:#326173}.subcat .accordion .btn{padding:0;margin:0}.subcat .accordion .btn:hover,.subcat .accordion .btn:focus{background:inherit}tr.svelte-1udgmqg>td.svelte-1udgmqg{padding:0}",x(document.head,e)),lt(this,t,xt,kt,w,{task:12,taskId:0,eventItem:13,followerEventId:14})}}function Et(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[0].visum?.role||t[2]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};5&n[0]&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function _t(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[6]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};64&n[0]&&(o.value=t[6]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function jt(t){let e,n,o,r;return e=new t[12]({props:{noCalendar:!0,readonly:!0,value:t[5]}}),o=new t[13]({props:{readonly:!0,value:t[5]}}),{c(){rt(e.$$.fragment),n=O(),rt(o.$$.fragment)},m(t,s){st(e,t,s),I(t,n,s),st(o,t,s),r=!0},p(t,n){const r={};32&n[0]&&(r.value=t[5]),e.$set(r);const s={};32&n[0]&&(s.value=t[5]),o.$set(s)},i(t){r||(tt(e.$$.fragment,t),tt(o.$$.fragment,t),r=!0)},o(t){et(e.$$.fragment,t),et(o.$$.fragment,t),r=!1},d(t){it(e,t),t&&E(n),it(o,t)}}}function Ct(t){let e,n,o=t[0].visum&&jt(t);return{c(){o&&o.c(),e=S()},m(t,r){o&&o.m(t,r),I(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&tt(o,1)):(o=jt(t),o.c(),tt(o,1),o.m(e.parentNode,e)):o&&(X(),et(o,1,1,(()=>{o=null})),Z())},i(t){n||(tt(o),n=!0)},o(t){et(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function Ot(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[qt]},$$scope:{ctx:t}}}),e.$on("click",t[15]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};2&n[0]&&(o.disabled=t[1]),128&n[0]|1&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function St(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Bt]},$$scope:{ctx:t}}}),e.$on("click",t[16]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};1&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function qt(t){let e;return{c(){e=C(t[7])},m(t,n){I(t,e,n)},p(t,n){128&n[0]&&B(e,t[7])},d(t){t&&E(e)}}}function Bt(t){let e;return{c(){e=C("Visum zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e;return{c(){e=C("Abbrechen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Tt(t){let e;return{c(){e=C("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Nt(t){let e,n,o,r,s,i,l;return r=new t[14]({props:{filled:!0,$$slots:{default:[Pt]},$$scope:{ctx:t}}}),r.$on("click",t[25]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Tt]},$$scope:{ctx:t}}}),i.$on("click",t[18]),{c(){e=_("p"),e.textContent="Willst du die Aufgabe visieren?",n=O(),o=_("div"),rt(r.$$.fragment),s=O(),rt(i.$$.fragment),q(o,"class","flex_div svelte-tgywjv")},m(t,a){I(t,e,a),I(t,n,a),I(t,o,a),st(r,o,null),x(o,s),st(i,o,null),l=!0},p(t,e){const n={};1&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};1&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){l||(tt(r.$$.fragment,t),tt(i.$$.fragment,t),l=!0)},o(t){et(r.$$.fragment,t),et(i.$$.fragment,t),l=!1},d(t){t&&E(e),t&&E(n),t&&E(o),it(r),it(i)}}}function zt(t){let e,n,o;return n=new dt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),q(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:g,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function Dt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[30],danger:!0,$$slots:{"title-icon":[zt],default:[Nt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};1073741824&n[0]&&(o.closeCallback=t[30]),1&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function At(t){let e;return{c(){e=C("Abbrechen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Wt(t){let e;return{c(){e=C("Ja, bitte zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Mt(t){let e,n,o,r,s,i,l;return r=new t[14]({props:{filled:!0,$$slots:{default:[At]},$$scope:{ctx:t}}}),r.$on("click",t[27]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Wt]},$$scope:{ctx:t}}}),i.$on("click",t[19]),{c(){e=_("p"),e.textContent="Willst du das Visum zurücknehmen?",n=O(),o=_("div"),rt(r.$$.fragment),s=O(),rt(i.$$.fragment),q(o,"class","flex_div svelte-tgywjv")},m(t,a){I(t,e,a),I(t,n,a),I(t,o,a),st(r,o,null),x(o,s),st(i,o,null),l=!0},p(t,e){const n={};1&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};1&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){l||(tt(r.$$.fragment,t),tt(i.$$.fragment,t),l=!0)},o(t){et(r.$$.fragment,t),et(i.$$.fragment,t),l=!1},d(t){t&&E(e),t&&E(n),t&&E(o),it(r),it(i)}}}function Ft(t){let e,n,o;return n=new dt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),q(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:g,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function Vt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[30],danger:!0,$$slots:{"title-icon":[Ft],default:[Mt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};1073741824&n[0]&&(o.closeCallback=t[30]),1&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Gt(t){let e,n,o,r,s,i,l,a,c,u,d,m,$,f,p,g,v,h;r=new t[10]({props:{name:"Rolle",$$slots:{default:[Et]},$$scope:{ctx:t}}}),i=new t[10]({props:{name:"visiert von",$$slots:{default:[_t]},$$scope:{ctx:t}}}),a=new t[10]({props:{name:"visiert am",$$slots:{default:[Ct]},$$scope:{ctx:t}}});const b=[St,Ot],y=[];function w(t,e){return t[0].visum&&"Ready"===t[0].status?0:1}function k(e){t[26](e)}u=w(t),d=y[u]=b[u](t);let j={$$slots:{default:[Dt,({closeCallback:t})=>({30:t}),({closeCallback:t})=>[t?1073741824:0]]},$$scope:{ctx:t}};function C(e){t[28](e)}void 0!==t[3]&&(j.open=t[3]),$=new t[8]({props:j}),A.push((()=>ot($,"open",k)));let S={$$slots:{default:[Vt,({closeCallback:t})=>({30:t}),({closeCallback:t})=>[t?1073741824:0]]},$$scope:{ctx:t}};return void 0!==t[4]&&(S.open=t[4]),g=new t[8]({props:S}),A.push((()=>ot(g,"open",C))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=O(),o=_("div"),rt(r.$$.fragment),s=O(),rt(i.$$.fragment),l=O(),rt(a.$$.fragment),c=O(),d.c(),m=O(),rt($.$$.fragment),p=O(),rt(g.$$.fragment),q(o,"class","visum")},m(t,d){I(t,e,d),I(t,n,d),I(t,o,d),st(r,o,null),x(o,s),st(i,o,null),x(o,l),st(a,o,null),x(o,c),y[u].m(o,null),I(t,m,d),st($,t,d),I(t,p,d),st(g,t,d),h=!0},p(t,e){const n={};5&e[0]|1&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|1&e[1]&&(s.$$scope={dirty:e,ctx:t}),i.$set(s);const l={};33&e[0]|1&e[1]&&(l.$$scope={dirty:e,ctx:t}),a.$set(l);let c=u;u=w(t),u===c?y[u].p(t,e):(X(),et(y[c],1,1,(()=>{y[c]=null})),Z(),d=y[u],d?d.p(t,e):(d=y[u]=b[u](t),d.c()),tt(d,1),d.m(o,null));const m={};1073741824&e[0]|1&e[1]&&(m.$$scope={dirty:e,ctx:t}),!f&&8&e[0]&&(f=!0,m.open=t[3],Y((()=>f=!1))),$.$set(m);const p={};1073741824&e[0]|1&e[1]&&(p.$$scope={dirty:e,ctx:t}),!v&&16&e[0]&&(v=!0,p.open=t[4],Y((()=>v=!1))),g.$set(p)},i(t){h||(tt(r.$$.fragment,t),tt(i.$$.fragment,t),tt(a.$$.fragment,t),tt(d),tt($.$$.fragment,t),tt(g.$$.fragment,t),h=!0)},o(t){et(r.$$.fragment,t),et(i.$$.fragment,t),et(a.$$.fragment,t),et(d),et($.$$.fragment,t),et(g.$$.fragment,t),h=!1},d(t){t&&E(e),t&&E(n),t&&E(o),it(r),it(i),it(a),y[u].d(),t&&E(m),it($,t),t&&E(p),it(g,t)}}}function Rt(t,i,l){let a,c;k(t,r,(t=>l(23,a=t))),k(t,s,(t=>l(24,c=t)));const{Modal:u,Dialog:d,FormField:m,TextField:$,DatePicker:f,TimePicker:p,Button:g}=e;let v,h,b,y,w,x,{task:I}=i,{taskId:E}=i,{eventItem:_}=i,j=!1,C=!1;const O=()=>{l(3,j=!1)};o.subscribe((t=>{t&&t.taskId===E&&l(0,I.visum=t.data,I)}));return t.$$set=t=>{"task"in t&&l(0,I=t.task),"taskId"in t&&l(20,E=t.taskId),"eventItem"in t&&l(21,_=t.eventItem)},t.$$.update=()=>{31457287&t.$$.dirty[0]&&(l(5,h=new Date(I.visum?.timeStamp)),l(7,y=I.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),l(22,w=!I.visum),l(22,w=w&&!!_.output?.approval?.length),w&&a&&(l(2,x=_.output.approval.flatMap((({refRole:t})=>t))),l(22,w=x.some((t=>a.some((e=>t===e)))))),l(1,v=!w),l(6,b=I.visum?.user||(v?"":c.email)))},[I,v,x,j,C,h,b,y,u,d,m,$,f,p,g,()=>{l(3,j=!0)},()=>{l(4,C=!0)},O,()=>{l(3,j=!1);const t={eventId:_._id,eventDesignation:_.identity.designation,docId:I.docId,role:x.filter((t=>a.find((e=>e===t)))).join(", "),user:c.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(I._id,t),l(0,I.visum=t,I)},()=>{l(4,C=!1),n.deleteTaskVisum(I._id,_._id),l(0,I.visum=!1,I)},E,_,w,a,c,()=>O(),function(t){j=t,l(3,j)},()=>O(),function(t){C=t,l(4,C)}]}class Yt extends at{constructor(t){var e;super(),document.getElementById("svelte-tgywjv-style")||((e=_("style")).id="svelte-tgywjv-style",e.textContent=".visum .time-picker .dropdown{display:none !important}.flex_div.svelte-tgywjv{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}",x(document.head,e)),lt(this,t,Rt,Gt,w,{task:0,taskId:20,eventItem:21},[-1,-1])}}const{document:Jt}=nt;function Lt(t){let e,n,o,r,s,i,l,a,c=t[8](t[26],!!t[27]||t[0]===t[21])+"";n=new t[3]({props:{name:"menu",items:t[24],value:t[25].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){y(t[7](t[29],t[22],t[21],t[27]))&&t[7](t[29],t[22],t[21],t[27]).apply(this,arguments)}));var u=t[25].component;function d(t){return{props:{taskId:t[22],task:t[28],eventItem:t[26],followerEventId:t[27]}}}return u&&(l=new u(d(t)),l.$on("back",t[9])),{c(){e=_("div"),rt(n.$$.fragment),o=O(),r=C(c),s=O(),i=_("div"),l&&rt(l.$$.fragment),q(e,"class","task--header svelte-kw8mxg"),q(i,"class","task--content svelte-kw8mxg")},m(t,c){I(t,e,c),st(n,e,null),x(e,o),x(e,r),I(t,s,c),I(t,i,c),l&&st(l,i,null),a=!0},p(e,o){t=e;const s={};16777216&o[0]&&(s.items=t[24]),33554432&o[0]&&(s.value=t[25].name),n.$set(s),(!a||203423745&o[0])&&c!==(c=t[8](t[26],!!t[27]||t[0]===t[21])+"")&&B(r,c);const m={};if(4194304&o[0]&&(m.taskId=t[22]),268435456&o[0]&&(m.task=t[28]),67108864&o[0]&&(m.eventItem=t[26]),134217728&o[0]&&(m.followerEventId=t[27]),u!==(u=t[25].component)){if(l){X();const t=l;et(t.$$.fragment,1,0,(()=>{it(t,1)})),Z()}u?(l=new u(d(t)),l.$on("back",t[9]),rt(l.$$.fragment),tt(l.$$.fragment,1),st(l,i,null)):l=null}else u&&l.$set(m)},i(t){a||(tt(n.$$.fragment,t),l&&tt(l.$$.fragment,t),a=!0)},o(t){et(n.$$.fragment,t),l&&et(l.$$.fragment,t),a=!1},d(t){t&&E(e),it(n),t&&E(s),t&&E(i),l&&it(l)}}}function Kt(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[20],titleClass:"task_title",closeCallback:t[10],class:"task--area",$$slots:{default:[Lt]},$$scope:{ctx:t}}}),{c(){e=_("div"),rt(n.$$.fragment),q(e,"class","task svelte-kw8mxg")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};1048576&e[0]&&(o.title=t[20]),1063256065&e[0]|1&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function Ht(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[Kt,({closeCallback:t})=>({30:t}),({closeCallback:t})=>[t?1073741824:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=_("div"),rt(n.$$.fragment),q(e,"class","task--page svelte-kw8mxg")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};1064304641&e[0]|1&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n)}}}function Qt(t){let e,n,o;return n=new i({props:{update:t[5],$$slots:{default:[Ht,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:i,followerEventId:l,task:a,findMenu:c}})=>({20:t,21:e,22:n,23:o,24:r,25:s,26:i,27:l,28:a,29:c}),({prop:t})=>[(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)|(t?536870912:0)]]},$$scope:{ctx:t}}}),{c(){e=O(),rt(n.$$.fragment),Jt.title="enablerr - Task"},m(t,r){I(t,e,r),st(n,t,r),o=!0},p(t,e){const o={};1064304641&e[0]|1&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),it(n,t)}}}function Ut(t,o,r){const{Modal:s,Dialog:i,Tabs:l}=e;let d,m,$;const f=-1!==window.location.search.indexOf("view=standalone");let p,g,v;const h={items:[{id:"task",name:"Aufgabe",component:It},{id:"visum",name:"Visum",component:Yt},{id:"collab",name:"Kommunikation",component:u},{id:"workflow",name:"Workflow",component:a},{id:"report",name:"Anhänge",component:c}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},b=()=>{scrollY=window.scrollY,p=document.body.style.position,g=document.body.style.overflow,v=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};b();const y=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){z().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[$,s,i,l,f,async(t,e,o,s)=>{const i=h.findById(o);if(!i)return y(t,e,h.deflt());"task"!==o&&(s=void 0),r(0,$=e);let l={status:"New"};const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");let c=a.identity.designation;if(s){const t=await n.getEvent(s);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(d===e?l=m:(d=e,m=l=await n.getTaskById(e)),l||window.singleSpaNavigate("/error"),l.event!==a._id.toString()&&window.singleSpaNavigate("/error")):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:a,followerEventId:s,task:l,items:h.map(),findMenu:t=>h.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=g||"",document.body.style.width=v||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||y(n,e,t(r))},(t,e)=>{let n=!t.output?.approval;return(G(),F).then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)}))})),""},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>f?window.close():window.singleSpaNavigate("/")]}class Xt extends at{constructor(t){var e;super(),Jt.getElementById("svelte-kw8mxg-style")||((e=_("style")).id="svelte-kw8mxg-style",e.textContent='.task--page.svelte-kw8mxg .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-kw8mxg{margin-top:4em}@media(max-height: 900px){.task.svelte-kw8mxg{margin-top:0}}.task.svelte-kw8mxg .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-kw8mxg .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-kw8mxg{margin-top:0.5em}.task--header.svelte-kw8mxg .task_tabs{margin-bottom:1em}.task--content.svelte-kw8mxg{margin-top:1em;height:fit-content;min-height:40vh;max-height:90vh}',x(Jt.head,e)),lt(this,t,Ut,Qt,w,{},[-1,-1])}}const Zt=p({component:Xt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:te,mount:ee,unmount:ne}=Zt;t({bootstrap:te,mount:ee,unmount:ne});t("Task",Xt)}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/task",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.75",
4
+ "version": "0.2.77",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"