@enablerr-ui/task 0.2.79 → 0.2.80
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 +1 -1
- package/package.json +1 -1
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,s,r,l,i,a,c,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.currentRoles,r=t.settings,l=t.Page},function(t){i=t.Form},function(t){a=t.Workflow},function(t){c=t.Report},function(t){u=t.Collaboration}],execute:function(){t("version","0.2.79");function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $,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){s(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==r(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},l),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,e,n),mount:a.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function a(t,e,n){var s=Object.keys(l),r=Object.keys(t).reduce((function(e,n){return s.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var s=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),l=s();e.instance=new t.component(o(o({},r),{},{target:l,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)}))}},$(f={exports:{}},f.exports),f.exports),p=d(m);function g(){}function v(t){return t()}function y(){return Object.create(null)}function h(t){t.forEach(v)}function b(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 S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function j(t){return document.createTextNode(t)}function C(){return j(" ")}function O(){return j("")}function B(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function P(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}let N;function z(t){N=t}function T(){if(!N)throw new Error("Function called outside component initialization");return N}const D=[],A=[],W=[],M=[],q=Promise.resolve();let R=!1;function V(){R||(R=!0,q.then(L))}function G(t){W.push(t)}function F(t){M.push(t)}let Y=!1;const J=new Set;function L(){if(!Y){Y=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];z(e),K(e.$$)}for(z(null),D.length=0;A.length;)A.pop()();for(let t=0;t<W.length;t+=1){const e=W[t];J.has(e)||(J.add(e),e())}W.length=0}while(D.length);for(;M.length;)M.pop()();R=!1,Y=!1,J.clear()}}function K(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(G)}}const H=new Set;let Q;function U(){Q={r:0,c:[],p:Q}}function X(){Q.r||h(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(H.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),Q&&Q.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function nt(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function ot(t){t&&t.c()}function st(t,e,n,o){const{fragment:s,on_mount:r,on_destroy:l,after_update:i}=t.$$;s&&s.m(e,n),o||G((()=>{const e=r.map(v).filter(b);l?l.push(...e):h(e),t.$$.on_mount=[]})),i.forEach(G)}function rt(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 lt(t,e,n,o,s,r,l=[-1]){const i=N;z(t);const a=t.$$={fragment:null,ctx:null,props:r,update:g,not_equal:s,bound:y(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:e.context||[]),callbacks:y(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return a.ctx&&s(a.ctx[e],a.ctx[e]=r)&&(!a.skip_bound&&a.bound[e]&&a.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(D.push(t),V(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],a.update(),c=!0,h(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&&Z(t.$$.fragment),st(t,e.target,e.anchor,e.customElement),L()}z(i)}class it{$destroy(){rt(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 at(t){let e,n,o,s,r;return{c(){e=S("svg"),n=S("path"),o=S("line"),s=S("line"),B(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"),B(o,"x1","12"),B(o,"y1","9"),B(o,"x2","12"),B(o,"y2","13"),B(s,"x1","12"),B(s,"y1","17"),B(s,"x2","12.01"),B(s,"y2","17"),B(e,"xmlns","http://www.w3.org/2000/svg"),B(e,"width",t[0]),B(e,"height",t[0]),B(e,"fill","none"),B(e,"viewBox","0 0 24 24"),B(e,"stroke","currentColor"),B(e,"stroke-width",t[1]),B(e,"stroke-linecap","round"),B(e,"stroke-linejoin","round"),B(e,"class",r="feather feather-alert-triangle "+t[2])},m(t,r){I(t,e,r),x(e,n),x(e,o),x(e,s)},p(t,[n]){1&n&&B(e,"width",t[0]),1&n&&B(e,"height",t[0]),2&n&&B(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-alert-triangle "+t[2])&&B(e,"class",r)},i:g,o:g,d(t){t&&E(e)}}}function ct(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ut extends it{constructor(t){super(),lt(this,t,ct,at,k,{size:0,strokeWidth:1,class:2})}}function dt(t){let e,n,o;return{c(){e=S("svg"),n=S("polyline"),B(n,"points","6 9 12 15 18 9"),B(e,"xmlns","http://www.w3.org/2000/svg"),B(e,"width",t[0]),B(e,"height",t[0]),B(e,"fill","none"),B(e,"viewBox","0 0 24 24"),B(e,"stroke","currentColor"),B(e,"stroke-width",t[1]),B(e,"stroke-linecap","round"),B(e,"stroke-linejoin","round"),B(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){I(t,e,o),x(e,n)},p(t,[n]){1&n&&B(e,"width",t[0]),1&n&&B(e,"height",t[0]),2&n&&B(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&B(e,"class",o)},i:g,o:g,d(t){t&&E(e)}}}function $t(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ft extends it{constructor(t){super(),lt(this,t,$t,dt,k,{size:0,strokeWidth:1,class:2})}}function mt(t){return{c:g,m:g,p:g,i:g,o:g,d:g}}function pt(t){let e,n,o,s,r,l,a,c,u,d,$,f,m,p,g,v,y=t[2].status+"";return o=new t[7]({props:{$$slots:{default:[ht]},$$scope:{ctx:t}}}),r=new t[10]({}),m=new t[10]({props:{class:"divider"}}),g=new i({props:{schema:t[17],recID:t[4],prevEventID:t[5],taskId:t[0],prev:t[6],readonly:t[3],isStandalone:t[1],root:"true"}}),g.$on("back",t[12]),{c(){e=_("div"),n=_("div"),ot(o.$$.fragment),s=C(),ot(r.$$.fragment),l=C(),a=_("div"),c=_("div"),c.textContent="Task-Status",u=C(),d=_("div"),$=j(y),f=C(),ot(m.$$.fragment),p=C(),ot(g.$$.fragment),B(n,"class","accordion-description svelte-1u8yl2a"),B(c,"class","task--status-title svelte-1u8yl2a"),B(d,"class","task--status-label svelte-1u8yl2a"),B(a,"class","task--status svelte-1u8yl2a"),B(e,"class","subcat svelte-1u8yl2a")},m(t,i){I(t,e,i),x(e,n),st(o,n,null),x(n,s),st(r,n,null),x(e,l),x(e,a),x(a,c),x(a,u),x(a,d),x(d,$),I(t,f,i),st(m,t,i),I(t,p,i),st(g,t,i),v=!0},p(t,e){const n={};524288&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n),(!v||4&e)&&y!==(y=t[2].status+"")&&P($,y);const s={};16&e&&(s.recID=t[4]),32&e&&(s.prevEventID=t[5]),1&e&&(s.taskId=t[0]),64&e&&(s.prev=t[6]),8&e&&(s.readonly=t[3]),2&e&&(s.isStandalone=t[1]),g.$set(s)},i(t){v||(Z(o.$$.fragment,t),Z(r.$$.fragment,t),Z(m.$$.fragment,t),Z(g.$$.fragment,t),v=!0)},o(t){tt(o.$$.fragment,t),tt(r.$$.fragment,t),tt(m.$$.fragment,t),tt(g.$$.fragment,t),v=!1},d(t){t&&E(e),rt(o),rt(r),t&&E(f),rt(m,t),t&&E(p),rt(g,t)}}}function gt(t){let e,n,o=t[17].identity.description+"";return{c(){e=_("div"),n=j(o),B(e,"class","description svelte-1u8yl2a")},m(t,o){I(t,e,o),x(e,n)},p:g,d(t){t&&E(e)}}}function vt(t){let e,n,o;return n=new ft({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=j("Beschreibung\n "),ot(n.$$.fragment)},m(t,s){I(t,e,s),st(n,t,s),o=!0},p:g,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n,t)}}}function yt(t){let e,n,o;return n=new t[9]({props:{noRipple:!0,$$slots:{default:[vt]},$$scope:{ctx:t}}}),n.$on("click",(function(){b(t[18])&&t[18].apply(this,arguments)})),{c(){e=_("div"),ot(n.$$.fragment),B(e,"slot","handle")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p(e,o){t=e;const s={};524288&o&&(s.$$scope={dirty:o,ctx:t}),n.$set(s)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function ht(t){let e,n;return e=new t[8]({props:{$$slots:{handle:[yt,({toggle:t})=>({18:t}),({toggle:t})=>t?262144:0],default:[gt]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};786432&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function bt(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:bt,then:pt,catch:mt,value:17,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let l=e.ctx;void 0!==s&&(l=l.slice(),l[s]=r);const i=t&&(e.current=t)(l);let a=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(U(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),X())})):e.block.d(1),i.c(),Z(i,1),i.m(e.mount(),e.anchor),a=!0),e.block=i,e.blocks&&(e.blocks[o]=i),a&&L()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=T();if(t.then((t=>{z(n),o(e.then,1,e.value,t),z(null)}),(t=>{if(z(n),o(e.catch,2,e.error,t),z(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 s}(t[11],o),{c(){e=O(),o.block.c()},m(t,s){I(t,e,s),o.block.m(t,o.anchor=s),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}(o,t=e,n)},i(t){n||(Z(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){tt(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function wt(t,s,r){let{task:l}=s,{taskId:i}=s,{eventItem:a}=s,{followerEventId:c}=s,{isStandalone:u}=s;const{Accordion:d,AccordionSection:$,Button:f,Divider:m}=e,p=l,g=a,v=n.getSchema(c||g._id);let y,h,b=p.task?.readonly,k=p.docId||p.id;c&&(h=k,k=void 0,y=g._id),o.subscribe((async t=>{t&&t.taskId===i&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{r(2,p.status=t.status,p),r(2,p.readonly=t.readonly,p),r(3,b=p.readonly)}))}));return t.$$set=t=>{"task"in t&&r(13,l=t.task),"taskId"in t&&r(0,i=t.taskId),"eventItem"in t&&r(14,a=t.eventItem),"followerEventId"in t&&r(15,c=t.followerEventId),"isStandalone"in t&&r(1,u=t.isStandalone)},[i,u,p,b,k,y,h,d,$,f,m,v,()=>window.singleSpaNavigate("/"),l,a,c]}class xt extends it{constructor(t){var e;super(),document.getElementById("svelte-1u8yl2a-style")||((e=_("style")).id="svelte-1u8yl2a-style",e.textContent=".subcat.svelte-1u8yl2a .task--status.svelte-1u8yl2a{width:100%;display:flex;gap:1em;margin:1.1em 0}.subcat.svelte-1u8yl2a .task--status .task--status-title.svelte-1u8yl2a{flex:0 1 40%}.subcat.svelte-1u8yl2a .task--status .task--status-label.svelte-1u8yl2a{flex:1}.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a{margin:2em 0 1em 0}.subcat.svelte-1u8yl2a .accordion-description .description.svelte-1u8yl2a{margin-top:1em}.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a .btn,.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a .btn:hover,.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a .btn:focus{padding:0;background:inherit}",x(document.head,e)),lt(this,t,wt,kt,k,{task:13,taskId:0,eventItem:14,followerEventId:15,isStandalone:1})}}function It(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[0].visum?.role||t[2]}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Et(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[6]}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function _t(t){let e,n,o,s;return e=new t[12]({props:{noCalendar:!0,readonly:!0,value:t[5]}}),o=new t[13]({props:{readonly:!0,value:t[5]}}),{c(){ot(e.$$.fragment),n=C(),ot(o.$$.fragment)},m(t,r){st(e,t,r),I(t,n,r),st(o,t,r),s=!0},p(t,n){const s={};32&n[0]&&(s.value=t[5]),e.$set(s);const r={};32&n[0]&&(r.value=t[5]),o.$set(r)},i(t){s||(Z(e.$$.fragment,t),Z(o.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),tt(o.$$.fragment,t),s=!1},d(t){rt(e,t),t&&E(n),rt(o,t)}}}function St(t){let e,n,o=t[0].visum&&_t(t);return{c(){o&&o.c(),e=O()},m(t,s){o&&o.m(t,s),I(t,e,s),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&Z(o,1)):(o=_t(t),o.c(),Z(o,1),o.m(e.parentNode,e)):o&&(U(),tt(o,1,1,(()=>{o=null})),X())},i(t){n||(Z(o),n=!0)},o(t){tt(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function jt(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[Ot]},$$scope:{ctx:t}}}),e.$on("click",t[15]),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Ct(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(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Ot(t){let e;return{c(){e=j(t[7])},m(t,n){I(t,e,n)},p(t,n){128&n[0]&&P(e,t[7])},d(t){t&&E(e)}}}function Bt(t){let e;return{c(){e=j("Visum zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e;return{c(){e=j("Abbrechen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Nt(t){let e;return{c(){e=j("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function zt(t){let e,n,o,s,r,l,i;return s=new t[14]({props:{filled:!0,$$slots:{default:[Pt]},$$scope:{ctx:t}}}),s.$on("click",t[25]),l=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Nt]},$$scope:{ctx:t}}}),l.$on("click",t[18]),{c(){e=_("p"),e.textContent="Willst du die Aufgabe visieren?",n=C(),o=_("div"),ot(s.$$.fragment),r=C(),ot(l.$$.fragment),B(o,"class","flex_div svelte-tgywjv")},m(t,a){I(t,e,a),I(t,n,a),I(t,o,a),st(s,o,null),x(o,r),st(l,o,null),i=!0},p(t,e){const n={};1&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};1&e[1]&&(o.$$scope={dirty:e,ctx:t}),l.$set(o)},i(t){i||(Z(s.$$.fragment,t),Z(l.$$.fragment,t),i=!0)},o(t){tt(s.$$.fragment,t),tt(l.$$.fragment,t),i=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(s),rt(l)}}}function Tt(t){let e,n,o;return n=new ut({props:{size:"25"}}),{c(){e=_("div"),ot(n.$$.fragment),B(e,"slot","title-icon")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p:g,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Dt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[30],danger:!0,$$slots:{"title-icon":[Tt],default:[zt]},$$scope:{ctx:t}}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function At(t){let e;return{c(){e=j("Abbrechen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Wt(t){let e;return{c(){e=j("Ja, bitte zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Mt(t){let e,n,o,s,r,l,i;return s=new t[14]({props:{filled:!0,$$slots:{default:[At]},$$scope:{ctx:t}}}),s.$on("click",t[27]),l=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Wt]},$$scope:{ctx:t}}}),l.$on("click",t[19]),{c(){e=_("p"),e.textContent="Willst du das Visum zurücknehmen?",n=C(),o=_("div"),ot(s.$$.fragment),r=C(),ot(l.$$.fragment),B(o,"class","flex_div svelte-tgywjv")},m(t,a){I(t,e,a),I(t,n,a),I(t,o,a),st(s,o,null),x(o,r),st(l,o,null),i=!0},p(t,e){const n={};1&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};1&e[1]&&(o.$$scope={dirty:e,ctx:t}),l.$set(o)},i(t){i||(Z(s.$$.fragment,t),Z(l.$$.fragment,t),i=!0)},o(t){tt(s.$$.fragment,t),tt(l.$$.fragment,t),i=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(s),rt(l)}}}function qt(t){let e,n,o;return n=new ut({props:{size:"25"}}),{c(){e=_("div"),ot(n.$$.fragment),B(e,"slot","title-icon")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p:g,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Rt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[30],danger:!0,$$slots:{"title-icon":[qt],default:[Mt]},$$scope:{ctx:t}}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Vt(t){let e,n,o,s,r,l,i,a,c,u,d,$,f,m,p,g,v,y;s=new t[10]({props:{name:"Rolle",$$slots:{default:[It]},$$scope:{ctx:t}}}),l=new t[10]({props:{name:"visiert von",$$slots:{default:[Et]},$$scope:{ctx:t}}}),a=new t[10]({props:{name:"visiert am",$$slots:{default:[St]},$$scope:{ctx:t}}});const h=[Ct,jt],b=[];function k(t,e){return t[0].visum&&"Ready"===t[0].status?0:1}function w(e){t[26](e)}u=k(t),d=b[u]=h[u](t);let S={$$slots:{default:[Dt,({closeCallback:t})=>({30:t}),({closeCallback:t})=>[t?1073741824:0]]},$$scope:{ctx:t}};function j(e){t[28](e)}void 0!==t[3]&&(S.open=t[3]),f=new t[8]({props:S}),A.push((()=>nt(f,"open",w)));let O={$$slots:{default:[Rt,({closeCallback:t})=>({30:t}),({closeCallback:t})=>[t?1073741824:0]]},$$scope:{ctx:t}};return void 0!==t[4]&&(O.open=t[4]),g=new t[8]({props:O}),A.push((()=>nt(g,"open",j))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=C(),o=_("div"),ot(s.$$.fragment),r=C(),ot(l.$$.fragment),i=C(),ot(a.$$.fragment),c=C(),d.c(),$=C(),ot(f.$$.fragment),p=C(),ot(g.$$.fragment),B(o,"class","visum")},m(t,d){I(t,e,d),I(t,n,d),I(t,o,d),st(s,o,null),x(o,r),st(l,o,null),x(o,i),st(a,o,null),x(o,c),b[u].m(o,null),I(t,$,d),st(f,t,d),I(t,p,d),st(g,t,d),y=!0},p(t,e){const n={};5&e[0]|1&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const r={};64&e[0]|1&e[1]&&(r.$$scope={dirty:e,ctx:t}),l.$set(r);const i={};33&e[0]|1&e[1]&&(i.$$scope={dirty:e,ctx:t}),a.$set(i);let c=u;u=k(t),u===c?b[u].p(t,e):(U(),tt(b[c],1,1,(()=>{b[c]=null})),X(),d=b[u],d?d.p(t,e):(d=b[u]=h[u](t),d.c()),Z(d,1),d.m(o,null));const $={};1073741824&e[0]|1&e[1]&&($.$$scope={dirty:e,ctx:t}),!m&&8&e[0]&&(m=!0,$.open=t[3],F((()=>m=!1))),f.$set($);const p={};1073741824&e[0]|1&e[1]&&(p.$$scope={dirty:e,ctx:t}),!v&&16&e[0]&&(v=!0,p.open=t[4],F((()=>v=!1))),g.$set(p)},i(t){y||(Z(s.$$.fragment,t),Z(l.$$.fragment,t),Z(a.$$.fragment,t),Z(d),Z(f.$$.fragment,t),Z(g.$$.fragment,t),y=!0)},o(t){tt(s.$$.fragment,t),tt(l.$$.fragment,t),tt(a.$$.fragment,t),tt(d),tt(f.$$.fragment,t),tt(g.$$.fragment,t),y=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(s),rt(l),rt(a),b[u].d(),t&&E($),rt(f,t),t&&E(p),rt(g,t)}}}function Gt(t,l,i){let a,c;w(t,s,(t=>i(23,a=t))),w(t,r,(t=>i(24,c=t)));const{Modal:u,Dialog:d,FormField:$,TextField:f,DatePicker:m,TimePicker:p,Button:g}=e;let v,y,h,b,k,x,{task:I}=l,{taskId:E}=l,{eventItem:_}=l,S=!1,j=!1;const C=()=>{i(3,S=!1)};o.subscribe((t=>{t&&t.taskId===E&&i(0,I.visum=t.data,I)}));return t.$$set=t=>{"task"in t&&i(0,I=t.task),"taskId"in t&&i(20,E=t.taskId),"eventItem"in t&&i(21,_=t.eventItem)},t.$$.update=()=>{31457287&t.$$.dirty[0]&&(i(5,y=new Date(I.visum?.timeStamp)),i(7,b=I.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),i(22,k=!I.visum),i(22,k=k&&!!_.output?.approval?.length),k&&a&&(i(2,x=_.output.approval.flatMap((({refRole:t})=>t))),i(22,k=x.some((t=>a.some((e=>t===e)))))),i(1,v=!k),i(6,h=I.visum?.user||(v?"":c.email)))},[I,v,x,S,j,y,h,b,u,d,$,f,m,p,g,()=>{i(3,S=!0)},()=>{i(4,j=!0)},C,()=>{i(3,S=!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),i(0,I.visum=t,I)},()=>{i(4,j=!1),n.deleteTaskVisum(I._id,_._id),i(0,I.visum=!1,I)},E,_,k,a,c,()=>C(),function(t){S=t,i(3,S)},()=>C(),function(t){j=t,i(4,j)}]}class Ft extends it{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,Gt,Vt,k,{task:0,taskId:20,eventItem:21},[-1,-1])}}const Yt=[];const Jt=t("taskClipboard",function(t,e=g){let n;const o=[];function s(e){if(k(t,e)&&(t=e,n)){const e=!Yt.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),Yt.push(n,t)}if(e){for(let t=0;t<Yt.length;t+=2)Yt[t][0](Yt[t+1]);Yt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,l=g){const i=[r,l];return o.push(i),1===o.length&&(n=e(s)||g),r(t),()=>{const t=o.indexOf(i);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:Lt}=et;function Kt(t){let e,n,o,s,r,l,i,a,c=t[8](t[27],!!t[28]||t[0]===t[22])+"";n=new t[3]({props:{name:"menu",items:t[25],value:t[26].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){b(t[7](t[30],t[23],t[22],t[28]))&&t[7](t[30],t[23],t[22],t[28]).apply(this,arguments)}));var u=t[26].component;function d(t){return{props:{taskId:t[23],task:t[29],eventItem:t[27],followerEventId:t[28],isStandalone:t[4]}}}return u&&(i=new u(d(t)),i.$on("back",t[9])),{c(){e=_("div"),ot(n.$$.fragment),o=C(),s=j(c),r=C(),l=_("div"),i&&ot(i.$$.fragment),B(e,"class","task--header svelte-kw8mxg"),B(l,"class","task--content svelte-kw8mxg")},m(t,c){I(t,e,c),st(n,e,null),x(e,o),x(e,s),I(t,r,c),I(t,l,c),i&&st(i,l,null),a=!0},p(e,o){t=e;const r={};33554432&o[0]&&(r.items=t[25]),67108864&o[0]&&(r.value=t[26].name),n.$set(r),(!a||406847489&o[0])&&c!==(c=t[8](t[27],!!t[28]||t[0]===t[22])+"")&&P(s,c);const $={};if(8388608&o[0]&&($.taskId=t[23]),536870912&o[0]&&($.task=t[29]),134217728&o[0]&&($.eventItem=t[27]),268435456&o[0]&&($.followerEventId=t[28]),u!==(u=t[26].component)){if(i){U();const t=i;tt(t.$$.fragment,1,0,(()=>{rt(t,1)})),X()}u?(i=new u(d(t)),i.$on("back",t[9]),ot(i.$$.fragment),Z(i.$$.fragment,1),st(i,l,null)):i=null}else u&&i.$set($)},i(t){a||(Z(n.$$.fragment,t),i&&Z(i.$$.fragment,t),a=!0)},o(t){tt(n.$$.fragment,t),i&&tt(i.$$.fragment,t),a=!1},d(t){t&&E(e),rt(n),t&&E(r),t&&E(l),i&&rt(i)}}}function Ht(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[21],titleClass:"task_title",closeCallback:t[10],class:"task--area",$$slots:{default:[Kt]},$$scope:{ctx:t}}}),{c(){e=_("div"),ot(n.$$.fragment),B(e,"class","task svelte-kw8mxg")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p(t,e){const o={};2097152&e[0]&&(o.title=t[21]),2126512129&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Qt(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[Ht,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=_("div"),ot(n.$$.fragment),B(e,"class","task--page svelte-kw8mxg")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p(t,e){const o={};2128609281&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Ut(t){let e,n,o;return n=new l({props:{update:t[5],$$slots:{default:[Qt,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:l,followerEventId:i,task:a,findMenu:c}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:l,28:i,29:a,30:c}),({prop:t})=>[(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)|(t?1073741824:0)]]},$$scope:{ctx:t}}}),{c(){e=C(),ot(n.$$.fragment),Lt.title="enablerr - Task"},m(t,s){I(t,e,s),st(n,t,s),o=!0},p(t,e){const o={};2128609281&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n,t)}}}function Xt(t,o,s){let r;w(t,Jt,(t=>s(16,r=t)));const{Modal:l,Dialog:i,Tabs:d}=e;let $,f,m;const p=-1!==window.location.search.indexOf("view=standalone");let g,v,y;const h={items:[{id:"task",name:"Aufgabe",component:xt},{id:"visum",name:"Visum",component:Ft},{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,g=document.body.style.position,v=document.body.style.overflow,y=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 k=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){T().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"})),function(t){T().$$.on_mount.push(t)}((()=>{!function(t,e,n=e){t.set(n)}(Jt,r=!1,r)}));return[m,l,i,d,p,async(t,e,o,r)=>{const l=h.findById(o);if(!l)return k(t,e,h.deflt());"task"!==o&&(r=void 0),s(0,m=e);let i={status:"New"};const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");let c=a.identity.designation;if(r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?($===e?i=f:($=e,f=i=await n.getTaskById(e)),i||window.singleSpaNavigate("/error"),i.event!==a._id.toString()&&window.singleSpaNavigate("/error")):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:a,followerEventId:r,task:i,items:h.map(),findMenu:t=>h.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=g||"",document.body.style.top="",document.body.style.overflow=v||"",document.body.style.width=y||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:s}})=>{o||k(n,e,t(s))},(t,e)=>{let n=!t.output?.approval;return(V(),q).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)},()=>p?window.close():window.singleSpaNavigate("/")]}class Zt extends it{constructor(t){var e;super(),Lt.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(Lt.head,e)),lt(this,t,Xt,Ut,k,{},[-1,-1])}}const te=p({component:Zt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ee,mount:ne,unmount:oe}=te;t({bootstrap:ee,mount:ne,unmount:oe});t("Task",Zt)}}}));
|
|
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,s,r,l,i,a,c,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.currentRoles,r=t.settings,l=t.Page},function(t){i=t.Form},function(t){a=t.Workflow},function(t){c=t.Report},function(t){u=t.Collaboration}],execute:function(){t("version","0.2.80");function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $,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){s(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==r(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},l),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,e,n),mount:a.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function a(t,e,n){var s=Object.keys(l),r=Object.keys(t).reduce((function(e,n){return s.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var s=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),l=s();e.instance=new t.component(o(o({},r),{},{target:l,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)}))}},$(f={exports:{}},f.exports),f.exports),p=d(m);function g(){}function v(t){return t()}function y(){return Object.create(null)}function h(t){t.forEach(v)}function b(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 S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function j(t){return document.createTextNode(t)}function C(){return j(" ")}function O(){return j("")}function B(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function P(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}let z;function N(t){z=t}function T(){if(!z)throw new Error("Function called outside component initialization");return z}const D=[],A=[],W=[],M=[],q=Promise.resolve();let R=!1;function V(){R||(R=!0,q.then(L))}function G(t){W.push(t)}function F(t){M.push(t)}let Y=!1;const J=new Set;function L(){if(!Y){Y=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];N(e),K(e.$$)}for(N(null),D.length=0;A.length;)A.pop()();for(let t=0;t<W.length;t+=1){const e=W[t];J.has(e)||(J.add(e),e())}W.length=0}while(D.length);for(;M.length;)M.pop()();R=!1,Y=!1,J.clear()}}function K(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(G)}}const H=new Set;let Q;function U(){Q={r:0,c:[],p:Q}}function X(){Q.r||h(Q.c),Q=Q.p}function Z(t,e){t&&t.i&&(H.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),Q&&Q.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function nt(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function ot(t){t&&t.c()}function st(t,e,n,o){const{fragment:s,on_mount:r,on_destroy:l,after_update:i}=t.$$;s&&s.m(e,n),o||G((()=>{const e=r.map(v).filter(b);l?l.push(...e):h(e),t.$$.on_mount=[]})),i.forEach(G)}function rt(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 lt(t,e,n,o,s,r,l=[-1]){const i=z;N(t);const a=t.$$={fragment:null,ctx:null,props:r,update:g,not_equal:s,bound:y(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:e.context||[]),callbacks:y(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return a.ctx&&s(a.ctx[e],a.ctx[e]=r)&&(!a.skip_bound&&a.bound[e]&&a.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(D.push(t),V(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],a.update(),c=!0,h(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&&Z(t.$$.fragment),st(t,e.target,e.anchor,e.customElement),L()}N(i)}class it{$destroy(){rt(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 at(t){let e,n,o,s,r;return{c(){e=S("svg"),n=S("path"),o=S("line"),s=S("line"),B(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"),B(o,"x1","12"),B(o,"y1","9"),B(o,"x2","12"),B(o,"y2","13"),B(s,"x1","12"),B(s,"y1","17"),B(s,"x2","12.01"),B(s,"y2","17"),B(e,"xmlns","http://www.w3.org/2000/svg"),B(e,"width",t[0]),B(e,"height",t[0]),B(e,"fill","none"),B(e,"viewBox","0 0 24 24"),B(e,"stroke","currentColor"),B(e,"stroke-width",t[1]),B(e,"stroke-linecap","round"),B(e,"stroke-linejoin","round"),B(e,"class",r="feather feather-alert-triangle "+t[2])},m(t,r){I(t,e,r),x(e,n),x(e,o),x(e,s)},p(t,[n]){1&n&&B(e,"width",t[0]),1&n&&B(e,"height",t[0]),2&n&&B(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-alert-triangle "+t[2])&&B(e,"class",r)},i:g,o:g,d(t){t&&E(e)}}}function ct(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ut extends it{constructor(t){super(),lt(this,t,ct,at,k,{size:0,strokeWidth:1,class:2})}}function dt(t){let e,n,o;return{c(){e=S("svg"),n=S("polyline"),B(n,"points","6 9 12 15 18 9"),B(e,"xmlns","http://www.w3.org/2000/svg"),B(e,"width",t[0]),B(e,"height",t[0]),B(e,"fill","none"),B(e,"viewBox","0 0 24 24"),B(e,"stroke","currentColor"),B(e,"stroke-width",t[1]),B(e,"stroke-linecap","round"),B(e,"stroke-linejoin","round"),B(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){I(t,e,o),x(e,n)},p(t,[n]){1&n&&B(e,"width",t[0]),1&n&&B(e,"height",t[0]),2&n&&B(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&B(e,"class",o)},i:g,o:g,d(t){t&&E(e)}}}function $t(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ft extends it{constructor(t){super(),lt(this,t,$t,dt,k,{size:0,strokeWidth:1,class:2})}}function mt(t){return{c:g,m:g,p:g,i:g,o:g,d:g}}function pt(t){let e,n,o,s,r,l,a,c,u,d,$,f,m,p,g,v,y=t[2].status+"";return o=new t[7]({props:{$$slots:{default:[ht]},$$scope:{ctx:t}}}),r=new t[10]({}),m=new t[10]({props:{class:"divider"}}),g=new i({props:{schema:t[17],recID:t[4],prevEventID:t[5],taskId:t[0],prev:t[6],readonly:t[3],isStandalone:t[1],root:"true"}}),g.$on("back",t[12]),{c(){e=_("div"),n=_("div"),ot(o.$$.fragment),s=C(),ot(r.$$.fragment),l=C(),a=_("div"),c=_("div"),c.textContent="Task-Status",u=C(),d=_("div"),$=j(y),f=C(),ot(m.$$.fragment),p=C(),ot(g.$$.fragment),B(n,"class","accordion-description svelte-1u8yl2a"),B(c,"class","task--status-title svelte-1u8yl2a"),B(d,"class","task--status-label svelte-1u8yl2a"),B(a,"class","task--status svelte-1u8yl2a"),B(e,"class","subcat svelte-1u8yl2a")},m(t,i){I(t,e,i),x(e,n),st(o,n,null),x(n,s),st(r,n,null),x(e,l),x(e,a),x(a,c),x(a,u),x(a,d),x(d,$),I(t,f,i),st(m,t,i),I(t,p,i),st(g,t,i),v=!0},p(t,e){const n={};524288&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n),(!v||4&e)&&y!==(y=t[2].status+"")&&P($,y);const s={};16&e&&(s.recID=t[4]),32&e&&(s.prevEventID=t[5]),1&e&&(s.taskId=t[0]),64&e&&(s.prev=t[6]),8&e&&(s.readonly=t[3]),2&e&&(s.isStandalone=t[1]),g.$set(s)},i(t){v||(Z(o.$$.fragment,t),Z(r.$$.fragment,t),Z(m.$$.fragment,t),Z(g.$$.fragment,t),v=!0)},o(t){tt(o.$$.fragment,t),tt(r.$$.fragment,t),tt(m.$$.fragment,t),tt(g.$$.fragment,t),v=!1},d(t){t&&E(e),rt(o),rt(r),t&&E(f),rt(m,t),t&&E(p),rt(g,t)}}}function gt(t){let e,n,o=t[17].identity.description+"";return{c(){e=_("div"),n=j(o),B(e,"class","description svelte-1u8yl2a")},m(t,o){I(t,e,o),x(e,n)},p:g,d(t){t&&E(e)}}}function vt(t){let e,n,o;return n=new ft({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=j("Beschreibung\n "),ot(n.$$.fragment)},m(t,s){I(t,e,s),st(n,t,s),o=!0},p:g,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n,t)}}}function yt(t){let e,n,o;return n=new t[9]({props:{noRipple:!0,$$slots:{default:[vt]},$$scope:{ctx:t}}}),n.$on("click",(function(){b(t[18])&&t[18].apply(this,arguments)})),{c(){e=_("div"),ot(n.$$.fragment),B(e,"slot","handle")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p(e,o){t=e;const s={};524288&o&&(s.$$scope={dirty:o,ctx:t}),n.$set(s)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function ht(t){let e,n;return e=new t[8]({props:{$$slots:{handle:[yt,({toggle:t})=>({18:t}),({toggle:t})=>t?262144:0],default:[gt]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};786432&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function bt(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:bt,then:pt,catch:mt,value:17,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let l=e.ctx;void 0!==s&&(l=l.slice(),l[s]=r);const i=t&&(e.current=t)(l);let a=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(U(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),X())})):e.block.d(1),i.c(),Z(i,1),i.m(e.mount(),e.anchor),a=!0),e.block=i,e.blocks&&(e.blocks[o]=i),a&&L()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=T();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 s}(t[11],o),{c(){e=O(),o.block.c()},m(t,s){I(t,e,s),o.block.m(t,o.anchor=s),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}(o,t=e,n)},i(t){n||(Z(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){tt(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function wt(t,s,r){let{task:l}=s,{taskId:i}=s,{eventItem:a}=s,{followerEventId:c}=s,{isStandalone:u}=s;const{Accordion:d,AccordionSection:$,Button:f,Divider:m}=e,p=l,g=a,v=n.getSchema(c||g._id);let y,h,b=p.task?.readonly,k=p.docId||p.id;c&&(h=k,k=void 0,y=g._id),o.subscribe((async t=>{t&&t.taskId===i&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{r(2,p.status=t.status,p),r(2,p.readonly=t.readonly,p),r(3,b=p.readonly)}))}));return t.$$set=t=>{"task"in t&&r(13,l=t.task),"taskId"in t&&r(0,i=t.taskId),"eventItem"in t&&r(14,a=t.eventItem),"followerEventId"in t&&r(15,c=t.followerEventId),"isStandalone"in t&&r(1,u=t.isStandalone)},[i,u,p,b,k,y,h,d,$,f,m,v,()=>window.singleSpaNavigate("/"),l,a,c]}class xt extends it{constructor(t){var e;super(),document.getElementById("svelte-1u8yl2a-style")||((e=_("style")).id="svelte-1u8yl2a-style",e.textContent=".subcat.svelte-1u8yl2a .task--status.svelte-1u8yl2a{width:100%;display:flex;gap:1em;margin:1.1em 0}.subcat.svelte-1u8yl2a .task--status .task--status-title.svelte-1u8yl2a{flex:0 1 40%}.subcat.svelte-1u8yl2a .task--status .task--status-label.svelte-1u8yl2a{flex:1}.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a{margin:2em 0 1em 0}.subcat.svelte-1u8yl2a .accordion-description .description.svelte-1u8yl2a{margin-top:1em}.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a .btn,.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a .btn:hover,.subcat.svelte-1u8yl2a .accordion-description.svelte-1u8yl2a .btn:focus{padding:0;background:inherit}",x(document.head,e)),lt(this,t,wt,kt,k,{task:13,taskId:0,eventItem:14,followerEventId:15,isStandalone:1})}}function It(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[0].visum?.role||t[2]}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Et(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[6]}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function _t(t){let e,n,o,s;return e=new t[12]({props:{noCalendar:!0,readonly:!0,value:t[5]}}),o=new t[13]({props:{readonly:!0,value:t[5]}}),{c(){ot(e.$$.fragment),n=C(),ot(o.$$.fragment)},m(t,r){st(e,t,r),I(t,n,r),st(o,t,r),s=!0},p(t,n){const s={};32&n[0]&&(s.value=t[5]),e.$set(s);const r={};32&n[0]&&(r.value=t[5]),o.$set(r)},i(t){s||(Z(e.$$.fragment,t),Z(o.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),tt(o.$$.fragment,t),s=!1},d(t){rt(e,t),t&&E(n),rt(o,t)}}}function St(t){let e,n,o=t[0].visum&&_t(t);return{c(){o&&o.c(),e=O()},m(t,s){o&&o.m(t,s),I(t,e,s),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&Z(o,1)):(o=_t(t),o.c(),Z(o,1),o.m(e.parentNode,e)):o&&(U(),tt(o,1,1,(()=>{o=null})),X())},i(t){n||(Z(o),n=!0)},o(t){tt(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function jt(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[Ot]},$$scope:{ctx:t}}}),e.$on("click",t[15]),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Ct(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(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Ot(t){let e;return{c(){e=j(t[7])},m(t,n){I(t,e,n)},p(t,n){128&n[0]&&P(e,t[7])},d(t){t&&E(e)}}}function Bt(t){let e;return{c(){e=j("Visum zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e;return{c(){e=j("Abbrechen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function zt(t){let e;return{c(){e=j("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Nt(t){let e,n,o,s,r,l,i;return s=new t[14]({props:{filled:!0,$$slots:{default:[Pt]},$$scope:{ctx:t}}}),s.$on("click",t[25]),l=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[zt]},$$scope:{ctx:t}}}),l.$on("click",t[18]),{c(){e=_("p"),e.textContent="Willst du die Aufgabe visieren?",n=C(),o=_("div"),ot(s.$$.fragment),r=C(),ot(l.$$.fragment),B(o,"class","flex_div svelte-tgywjv")},m(t,a){I(t,e,a),I(t,n,a),I(t,o,a),st(s,o,null),x(o,r),st(l,o,null),i=!0},p(t,e){const n={};1&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};1&e[1]&&(o.$$scope={dirty:e,ctx:t}),l.$set(o)},i(t){i||(Z(s.$$.fragment,t),Z(l.$$.fragment,t),i=!0)},o(t){tt(s.$$.fragment,t),tt(l.$$.fragment,t),i=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(s),rt(l)}}}function Tt(t){let e,n,o;return n=new ut({props:{size:"25"}}),{c(){e=_("div"),ot(n.$$.fragment),B(e,"slot","title-icon")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p:g,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Dt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[30],danger:!0,$$slots:{"title-icon":[Tt],default:[Nt]},$$scope:{ctx:t}}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function At(t){let e;return{c(){e=j("Abbrechen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Wt(t){let e;return{c(){e=j("Ja, bitte zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Mt(t){let e,n,o,s,r,l,i;return s=new t[14]({props:{filled:!0,$$slots:{default:[At]},$$scope:{ctx:t}}}),s.$on("click",t[27]),l=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Wt]},$$scope:{ctx:t}}}),l.$on("click",t[19]),{c(){e=_("p"),e.textContent="Willst du das Visum zurücknehmen?",n=C(),o=_("div"),ot(s.$$.fragment),r=C(),ot(l.$$.fragment),B(o,"class","flex_div svelte-tgywjv")},m(t,a){I(t,e,a),I(t,n,a),I(t,o,a),st(s,o,null),x(o,r),st(l,o,null),i=!0},p(t,e){const n={};1&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};1&e[1]&&(o.$$scope={dirty:e,ctx:t}),l.$set(o)},i(t){i||(Z(s.$$.fragment,t),Z(l.$$.fragment,t),i=!0)},o(t){tt(s.$$.fragment,t),tt(l.$$.fragment,t),i=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(s),rt(l)}}}function qt(t){let e,n,o;return n=new ut({props:{size:"25"}}),{c(){e=_("div"),ot(n.$$.fragment),B(e,"slot","title-icon")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p:g,i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Rt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[30],danger:!0,$$slots:{"title-icon":[qt],default:[Mt]},$$scope:{ctx:t}}}),{c(){ot(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||(Z(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){rt(e,t)}}}function Vt(t){let e,n,o,s,r,l,i,a,c,u,d,$,f,m,p,g,v,y;s=new t[10]({props:{name:"Rolle",$$slots:{default:[It]},$$scope:{ctx:t}}}),l=new t[10]({props:{name:"visiert von",$$slots:{default:[Et]},$$scope:{ctx:t}}}),a=new t[10]({props:{name:"visiert am",$$slots:{default:[St]},$$scope:{ctx:t}}});const h=[Ct,jt],b=[];function k(t,e){return t[0].visum&&"Ready"===t[0].status?0:1}function w(e){t[26](e)}u=k(t),d=b[u]=h[u](t);let S={$$slots:{default:[Dt,({closeCallback:t})=>({30:t}),({closeCallback:t})=>[t?1073741824:0]]},$$scope:{ctx:t}};function j(e){t[28](e)}void 0!==t[3]&&(S.open=t[3]),f=new t[8]({props:S}),A.push((()=>nt(f,"open",w)));let O={$$slots:{default:[Rt,({closeCallback:t})=>({30:t}),({closeCallback:t})=>[t?1073741824:0]]},$$scope:{ctx:t}};return void 0!==t[4]&&(O.open=t[4]),g=new t[8]({props:O}),A.push((()=>nt(g,"open",j))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=C(),o=_("div"),ot(s.$$.fragment),r=C(),ot(l.$$.fragment),i=C(),ot(a.$$.fragment),c=C(),d.c(),$=C(),ot(f.$$.fragment),p=C(),ot(g.$$.fragment),B(o,"class","visum")},m(t,d){I(t,e,d),I(t,n,d),I(t,o,d),st(s,o,null),x(o,r),st(l,o,null),x(o,i),st(a,o,null),x(o,c),b[u].m(o,null),I(t,$,d),st(f,t,d),I(t,p,d),st(g,t,d),y=!0},p(t,e){const n={};5&e[0]|1&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const r={};64&e[0]|1&e[1]&&(r.$$scope={dirty:e,ctx:t}),l.$set(r);const i={};33&e[0]|1&e[1]&&(i.$$scope={dirty:e,ctx:t}),a.$set(i);let c=u;u=k(t),u===c?b[u].p(t,e):(U(),tt(b[c],1,1,(()=>{b[c]=null})),X(),d=b[u],d?d.p(t,e):(d=b[u]=h[u](t),d.c()),Z(d,1),d.m(o,null));const $={};1073741824&e[0]|1&e[1]&&($.$$scope={dirty:e,ctx:t}),!m&&8&e[0]&&(m=!0,$.open=t[3],F((()=>m=!1))),f.$set($);const p={};1073741824&e[0]|1&e[1]&&(p.$$scope={dirty:e,ctx:t}),!v&&16&e[0]&&(v=!0,p.open=t[4],F((()=>v=!1))),g.$set(p)},i(t){y||(Z(s.$$.fragment,t),Z(l.$$.fragment,t),Z(a.$$.fragment,t),Z(d),Z(f.$$.fragment,t),Z(g.$$.fragment,t),y=!0)},o(t){tt(s.$$.fragment,t),tt(l.$$.fragment,t),tt(a.$$.fragment,t),tt(d),tt(f.$$.fragment,t),tt(g.$$.fragment,t),y=!1},d(t){t&&E(e),t&&E(n),t&&E(o),rt(s),rt(l),rt(a),b[u].d(),t&&E($),rt(f,t),t&&E(p),rt(g,t)}}}function Gt(t,l,i){let a,c;w(t,s,(t=>i(23,a=t))),w(t,r,(t=>i(24,c=t)));const{Modal:u,Dialog:d,FormField:$,TextField:f,DatePicker:m,TimePicker:p,Button:g}=e;let v,y,h,b,k,x,{task:I}=l,{taskId:E}=l,{eventItem:_}=l,S=!1,j=!1;const C=()=>{i(3,S=!1)};o.subscribe((t=>{t&&t.taskId===E&&i(0,I.visum=t.data,I)}));return t.$$set=t=>{"task"in t&&i(0,I=t.task),"taskId"in t&&i(20,E=t.taskId),"eventItem"in t&&i(21,_=t.eventItem)},t.$$.update=()=>{31457287&t.$$.dirty[0]&&(i(5,y=new Date(I.visum?.timeStamp)),i(7,b=I.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),i(22,k=!I.visum),i(22,k=k&&!!_.output?.approval?.length),k&&a&&(i(2,x=_.output.approval.flatMap((({refRole:t})=>t))),i(22,k=x.some((t=>a.some((e=>t===e)))))),i(1,v=!k),i(6,h=I.visum?.user||(v?"":c.email)))},[I,v,x,S,j,y,h,b,u,d,$,f,m,p,g,()=>{i(3,S=!0)},()=>{i(4,j=!0)},C,()=>{i(3,S=!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),i(0,I.visum=t,I)},()=>{i(4,j=!1),n.deleteTaskVisum(I._id,_._id),i(0,I.visum=!1,I)},E,_,k,a,c,()=>C(),function(t){S=t,i(3,S)},()=>C(),function(t){j=t,i(4,j)}]}class Ft extends it{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,Gt,Vt,k,{task:0,taskId:20,eventItem:21},[-1,-1])}}const Yt=[];const Jt=t("taskClipboard",function(t,e=g){let n;const o=[];function s(e){if(k(t,e)&&(t=e,n)){const e=!Yt.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),Yt.push(n,t)}if(e){for(let t=0;t<Yt.length;t+=2)Yt[t][0](Yt[t+1]);Yt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,l=g){const i=[r,l];return o.push(i),1===o.length&&(n=e(s)||g),r(t),()=>{const t=o.indexOf(i);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:Lt}=et;function Kt(t){let e,n,o,s,r,l,i,a,c=t[8](t[27],!!t[28]||t[0]===t[22])+"";n=new t[3]({props:{name:"menu",items:t[25],value:t[26].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){b(t[7](t[30],t[23],t[22],t[28]))&&t[7](t[30],t[23],t[22],t[28]).apply(this,arguments)}));var u=t[26].component;function d(t){return{props:{taskId:t[23],task:t[29],eventItem:t[27],followerEventId:t[28],isStandalone:t[4]}}}return u&&(i=new u(d(t)),i.$on("back",t[9])),{c(){e=_("div"),ot(n.$$.fragment),o=C(),s=j(c),r=C(),l=_("div"),i&&ot(i.$$.fragment),B(e,"class","task--header svelte-kw8mxg"),B(l,"class","task--content svelte-kw8mxg")},m(t,c){I(t,e,c),st(n,e,null),x(e,o),x(e,s),I(t,r,c),I(t,l,c),i&&st(i,l,null),a=!0},p(e,o){t=e;const r={};33554432&o[0]&&(r.items=t[25]),67108864&o[0]&&(r.value=t[26].name),n.$set(r),(!a||406847489&o[0])&&c!==(c=t[8](t[27],!!t[28]||t[0]===t[22])+"")&&P(s,c);const $={};if(8388608&o[0]&&($.taskId=t[23]),536870912&o[0]&&($.task=t[29]),134217728&o[0]&&($.eventItem=t[27]),268435456&o[0]&&($.followerEventId=t[28]),u!==(u=t[26].component)){if(i){U();const t=i;tt(t.$$.fragment,1,0,(()=>{rt(t,1)})),X()}u?(i=new u(d(t)),i.$on("back",t[9]),ot(i.$$.fragment),Z(i.$$.fragment,1),st(i,l,null)):i=null}else u&&i.$set($)},i(t){a||(Z(n.$$.fragment,t),i&&Z(i.$$.fragment,t),a=!0)},o(t){tt(n.$$.fragment,t),i&&tt(i.$$.fragment,t),a=!1},d(t){t&&E(e),rt(n),t&&E(r),t&&E(l),i&&rt(i)}}}function Ht(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[21],titleClass:"task_title",closeCallback:t[10],class:"task--area",$$slots:{default:[Kt]},$$scope:{ctx:t}}}),{c(){e=_("div"),ot(n.$$.fragment),B(e,"class","task svelte-kw8mxg")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p(t,e){const o={};2097152&e[0]&&(o.title=t[21]),2126512129&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Qt(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[Ht,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=_("div"),ot(n.$$.fragment),B(e,"class","task--page svelte-kw8mxg")},m(t,s){I(t,e,s),st(n,e,null),o=!0},p(t,e){const o={};2128609281&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n)}}}function Ut(t){let e,n,o;return n=new l({props:{update:t[5],$$slots:{default:[Qt,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:l,followerEventId:i,task:a,findMenu:c}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:l,28:i,29:a,30:c}),({prop:t})=>[(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)|(t?1073741824:0)]]},$$scope:{ctx:t}}}),{c(){e=C(),ot(n.$$.fragment),Lt.title="enablerr - Task"},m(t,s){I(t,e,s),st(n,t,s),o=!0},p(t,e){const o={};2128609281&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(Z(n.$$.fragment,t),o=!0)},o(t){tt(n.$$.fragment,t),o=!1},d(t){t&&E(e),rt(n,t)}}}function Xt(t,o,s){let r;w(t,Jt,(t=>s(16,r=t)));const{Modal:l,Dialog:i,Tabs:d}=e;let $,f,m;const p=-1!==window.location.search.indexOf("view=standalone");let g,v,y;const h={items:[{id:"task",name:"Aufgabe",component:xt},{id:"visum",name:"Visum",component:Ft},{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,g=document.body.style.position,v=document.body.style.overflow,y=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 k=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){T().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"})),function(t){T().$$.on_mount.push(t)}((()=>{!function(t,e,n=e){t.set(n)}(Jt,r=!1,r)}));return[m,l,i,d,p,async(t,e,o,r)=>{const l=h.findById(o);if(!l)return k(t,e,h.deflt());"task"!==o&&(r=void 0),s(0,m=e);let i={status:"New"};const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");let c=a.identity.designation;if(r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?($===e?i=f:($=e,f=i=await n.getTaskById(e)),i||window.singleSpaNavigate("/error"),i.event!==a._id.toString()&&(a._id=i.event)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:a,followerEventId:r,task:i,items:h.map(),findMenu:t=>h.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=g||"",document.body.style.top="",document.body.style.overflow=v||"",document.body.style.width=y||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:s}})=>{o||k(n,e,t(s))},(t,e)=>{let n=!t.output?.approval;return(V(),q).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)},()=>p?window.close():window.singleSpaNavigate("/")]}class Zt extends it{constructor(t){var e;super(),Lt.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(Lt.head,e)),lt(this,t,Xt,Ut,k,{},[-1,-1])}}const te=p({component:Zt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ee,mount:ne,unmount:oe}=te;t({bootstrap:ee,mount:ne,unmount:oe});t("Task",Zt)}}}));
|