UNPKG

@enablerr-ui/header

Version:

enablerr - the Next Enterprise Solution

2 lines (1 loc) 43 kB
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/auth"],(function(e){"use strict";var t,n,o,r,i,s,l,a;return{setters:[function(e){t=e.getAttractions},function(e){n=e.Request,o=e.settings,r=e.currentRoles,i=e.notification,s=e.notifications_local,l=e.LinkIcon},function(e){a=e.user}],execute:function(){e("version","0.2.63");function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u,d,f=(u=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==i(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},s),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:u.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(s),i=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)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(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),s=r();t.instance=new e.component(o(o({},i),{},{target:s,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function u(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},u(d={exports:{}},d.exports),d.exports),p=c(f);function m(){}function h(e){return e()}function g(){return Object.create(null)}function $(e){e.forEach(h)}function v(e){return"function"==typeof e}function b(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function w(e,...t){if(null==e)return m;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function y(e,t,n){e.$$.on_destroy.push(w(t,n))}function k(e){return null==e?"":e}function x(e,t,n=t){return e.set(n),t}function z(e,t){e.appendChild(t)}function _(e,t,n){e.insertBefore(t,n||null)}function W(e){e.parentNode.removeChild(e)}function j(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function N(e){return document.createElement(e)}function q(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function I(e){return document.createTextNode(e)}function O(){return I(" ")}function E(){return I("")}function S(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function C(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function A(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}let M;function P(e){M=e}const T=[],D=[],H=[],L=[],R=Promise.resolve();let V=!1;function G(e){H.push(e)}let J=!1;const F=new Set;function K(){if(!J){J=!0;do{for(let e=0;e<T.length;e+=1){const t=T[e];P(t),Y(t.$$)}for(P(null),T.length=0;D.length;)D.pop()();for(let e=0;e<H.length;e+=1){const t=H[e];F.has(t)||(F.add(t),t())}H.length=0}while(T.length);for(;L.length;)L.pop()();V=!1,J=!1,F.clear()}}function Y(e){if(null!==e.fragment){e.update(),$(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(G)}}const Q=new Set;let U;function X(){U={r:0,c:[],p:U}}function Z(){U.r||$(U.c),U=U.p}function ee(e,t){e&&e.i&&(Q.delete(e),e.i(t))}function te(e,t,n,o){if(e&&e.o){if(Q.has(e))return;Q.add(e),U&&U.c.push((()=>{Q.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ne(e,t){te(e,1,1,(()=>{t.delete(e.key)}))}function oe(e){e&&e.c()}function re(e,t,n,o){const{fragment:r,on_mount:i,on_destroy:s,after_update:l}=e.$$;r&&r.m(t,n),o||G((()=>{const t=i.map(h).filter(v);s?s.push(...t):$(t),e.$$.on_mount=[]})),l.forEach(G)}function ie(e,t){const n=e.$$;null!==n.fragment&&($(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function se(e,t){-1===e.$$.dirty[0]&&(T.push(e),V||(V=!0,R.then(K)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function le(e,t,n,o,r,i,s=[-1]){const l=M;P(e);const a=e.$$={fragment:null,ctx:null,props:i,update:m,not_equal:r,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:g(),dirty:s,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=i)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](i),c&&se(e,t)),n})):[],a.update(),c=!0,$(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(W)}else a.fragment&&a.fragment.c();t.intro&&ee(e.$$.fragment),re(e,t.target,t.anchor,t.customElement),K()}P(l)}class ae{$destroy(){ie(this,1),this.$destroy=m}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const{protocol:ce,hostname:ue,port:de}=window.location,fe=de?":"+(+de+1):"",pe=`${ce.replace("http","ws")}//${ue}${fe}/wss`,me=(e,t)=>{let n,o=new WebSocket(pe);o.onopen=function(t){console.log("[open] Connection established"),o.send(e),n=setInterval((()=>o.send("ping")),3e4)},o.onmessage=function({data:e}){if("pong"===e)return;let n,o=e;try{"{"!==e[0]&&(o=`{${e.split("{")[1].split("}")[0]}}`),n=JSON.parse(o)}catch{}return n?n.tenant?t.set({tenant:n.tenant,status:"invalid"}):void he(n):void 0},o.onclose=function(o){console.log("closed",o.reason),clearInterval(n),me(e,t)},o.onerror=function(e){console.log("[error]",JSON.stringify(e)),o.close()}},he=e=>{n.saveNotification({id:e.id,user:e.user,type:e.type,status:e.status,designation:e.designation,description:e.description,date:e.date,eventId:e.eventId,eventClass:e.eventClass,taskId:e.taskId,objectId:e.objectId,url:e.url,_valid:e.__valid,read:!1,data:e.data},!0)};function ge(e,t,n){const o=e.slice();return o[12]=t[n],o}function $e(e){let t,n,o,r,i=!e[0]&&e[1].length>1&&ve(),s=e[1],l=[];for(let t=0;t<s.length;t+=1)l[t]=be(ge(e,s,t));return{c(){t=N("select"),i&&i.c(),n=E();for(let e=0;e<l.length;e+=1)l[e].c();C(t,"id","company"),C(t,"title","company"),C(t,"class","tenant-select svelte-1gn2921")},m(s,a){_(s,t,a),i&&i.m(t,null),z(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);o||(r=S(t,"change",e[4]),o=!0)},p(e,o){if(!e[0]&&e[1].length>1?i||(i=ve(),i.c(),i.m(t,n)):i&&(i.d(1),i=null),10&o){let n;for(s=e[1],n=0;n<s.length;n+=1){const r=ge(e,s,n);l[n]?l[n].p(r,o):(l[n]=be(r),l[n].c(),l[n].m(t,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=s.length}},d(e){e&&W(t),i&&i.d(),j(l,e),o=!1,r()}}}function ve(e){let t;return{c(){t=N("option"),t.textContent="Bitte Mandant wählen",t.__value="",t.value=t.__value},m(e,n){_(e,t,n)},d(e){e&&W(t)}}}function be(e){let t,n,o,r,i=e[12].name+"";return{c(){t=N("option"),n=I(i),t.__value=o=e[12]._id,t.value=t.__value,t.selected=r=e[3](e[12]._id)},m(e,o){_(e,t,o),z(t,n)},p(e,s){2&s&&i!==(i=e[12].name+"")&&B(n,i),2&s&&o!==(o=e[12]._id)&&(t.__value=o,t.value=t.__value),2&s&&r!==(r=e[3](e[12]._id))&&(t.selected=r)},d(e){e&&W(t)}}}function we(e){let t,n=e[1].length>1&&$e(e);return{c(){n&&n.c(),t=E()},m(e,o){n&&n.m(e,o),_(e,t,o)},p(e,[o]){e[1].length>1?n?n.p(e,o):(n=$e(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:m,o:m,d(e){n&&n.d(e),e&&W(t)}}}function ye(e,t,o){let r,i,s;const{loggedIn:l,cacheValidator:c,serverVersion:u,uiVersions:d,environment:f}=a;y(e,l,(e=>o(5,s=e)));const p=()=>window.location.href="/",m=(e,t)=>n.setTenant(e).then((e=>{u.set(e.serverVersion),d.set(e.uiVersions),f.set(e.environment),e.roles&&x(l,s.ticketRoles=e.roles,s)})).then((n=>me(e,t)));return e.$$.update=()=>{32&e.$$.dirty&&o(1,r=s.tenants.sort(((e,t)=>e.name.localeCompare(t.name)))),32&e.$$.dirty&&o(0,i=s.tenant),1&e.$$.dirty&&i&&m(i,c)},[i,r,l,e=>i===e,({target:{value:e}})=>{window.localStorage.setItem("enablerr-tenant",e),window.localStorage.setItem("lh-enablerr-tenant",e),x(l,s.tenant=e,s),m(e,c).then(p)},s]}class ke extends ae{constructor(e){var t;super(),document.getElementById("svelte-1gn2921-style")||((t=N("style")).id="svelte-1gn2921-style",t.textContent=".tenant-select.svelte-1gn2921{-webkit-appearance:none;-moz-appearance:none;background:transparent;background-color:#f0f0f0;background-image:url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\");background-repeat:no-repeat;background-position-x:100%;background-position-y:5px;width:fit-content;margin:0;margin-left:-0.5em;margin-top:1em;height:2.5em;font-size:16px;border:none;border-radius:1.25em;padding:0.5em;padding-left:1em;padding-right:1.5em}",z(document.head,t)),le(this,e,ye,we,b,{})}}function xe(e){let t,n,o,r,i,s,l,a,c,u,d;function f(e,t){return e[3].firstName?.length>=1?_e:ze}let p=f(e),m=p(e),h=e[3].setting?.showJobDescription&&We(e),g=!e[3].hideRoles&&e[1]?.length&&je(e);return{c(){t=N("div"),n=N("div"),o=N("img"),i=O(),s=N("div"),m.c(),l=O(),h&&h.c(),a=O(),g&&g.c(),o.src!==(r=e[5])&&C(o,"src",r),C(o,"alt","Logo"),C(o,"class","svelte-12efabq"),C(n,"class","profile-picture svelte-12efabq"),C(s,"class","profile-information svelte-12efabq"),C(t,"class","profile svelte-12efabq")},m(r,f){_(r,t,f),z(t,n),z(n,o),z(t,i),z(t,s),m.m(s,null),z(s,l),h&&h.m(s,null),z(s,a),g&&g.m(s,null),c=!0,u||(d=S(n,"click",e[12]),u=!0)},p(e,t){(!c||32&t&&o.src!==(r=e[5]))&&C(o,"src",r),p===(p=f(e))&&m?m.p(e,t):(m.d(1),m=p(e),m&&(m.c(),m.m(s,l))),e[3].setting?.showJobDescription?h?h.p(e,t):(h=We(e),h.c(),h.m(s,a)):h&&(h.d(1),h=null),!e[3].hideRoles&&e[1]?.length?g?(g.p(e,t),10&t&&ee(g,1)):(g=je(e),g.c(),ee(g,1),g.m(s,null)):g&&(X(),te(g,1,1,(()=>{g=null})),Z())},i(e){c||(ee(g),c=!0)},o(e){te(g),c=!1},d(e){e&&W(t),m.d(),h&&h.d(),g&&g.d(),u=!1,d()}}}function ze(e){let t,n,o=e[2].user+"";return{c(){t=N("div"),n=I(o),C(t,"class","profile-name svelte-12efabq")},m(e,o){_(e,t,o),z(t,n)},p(e,t){4&t&&o!==(o=e[2].user+"")&&B(n,o)},d(e){e&&W(t)}}}function _e(e){let t,n,o,r,i=e[3].firstName+"",s=e[3].lastName+"";return{c(){t=N("div"),n=I(i),o=O(),r=I(s),C(t,"class","profile-name svelte-12efabq")},m(e,i){_(e,t,i),z(t,n),z(t,o),z(t,r)},p(e,t){8&t&&i!==(i=e[3].firstName+"")&&B(n,i),8&t&&s!==(s=e[3].lastName+"")&&B(r,s)},d(e){e&&W(t)}}}function We(e){let t,n,o=(e[3].jobDescription||"")+"";return{c(){t=N("div"),n=I(o)},m(e,o){_(e,t,o),z(t,n)},p(e,t){8&t&&o!==(o=(e[3].jobDescription||"")+"")&&B(n,o)},d(e){e&&W(t)}}}function je(e){let t,n,o,r,i,s,l;return t=new e[8]({props:{text:"Rollen"}}),r=new e[7]({props:{disabled:e[9],name:"checkboxRoles[]",items:e[4]}}),r.$on("change",e[10]),s=new e[8]({}),{c(){oe(t.$$.fragment),n=O(),o=N("div"),oe(r.$$.fragment),i=O(),oe(s.$$.fragment),C(o,"class","roles svelte-12efabq")},m(e,a){re(t,e,a),_(e,n,a),_(e,o,a),re(r,o,null),_(e,i,a),re(s,e,a),l=!0},p(e,t){const n={};16&t&&(n.items=e[4]),r.$set(n)},i(e){l||(ee(t.$$.fragment,e),ee(r.$$.fragment,e),ee(s.$$.fragment,e),l=!0)},o(e){te(t.$$.fragment,e),te(r.$$.fragment,e),te(s.$$.fragment,e),l=!1},d(e){ie(t,e),e&&W(n),e&&W(o),ie(r),e&&W(i),ie(s,e)}}}function Ne(e){let t,n,o,r,i=e[0]&&xe(e);return o=new ke({}),{c(){t=N("div"),i&&i.c(),n=O(),oe(o.$$.fragment),C(t,"class","profile-container svelte-12efabq")},m(e,s){_(e,t,s),i&&i.m(t,null),z(t,n),re(o,t,null),r=!0},p(e,[o]){e[0]?i?(i.p(e,o),1&o&&ee(i,1)):(i=xe(e),i.c(),ee(i,1),i.m(t,n)):i&&(X(),te(i,1,1,(()=>{i=null})),Z())},i(e){r||(ee(i),ee(o.$$.fragment,e),r=!0)},o(e){te(i),te(o.$$.fragment,e),r=!1},d(e){e&&W(t),i&&i.d(),ie(o)}}}function qe(e,n,i){let s,l,c;y(e,o,(e=>i(3,c=e)));const{loggedIn:u,onLogout:d}=a;y(e,u,(e=>i(2,l=e)));const{CheckboxGroup:f,Divider:p}=t;let m,h,g,{currTenant:$}=n;const v=$+"-ENABLERR-ROLES",b=-1!==window.location.search.indexOf("view=standalone"),k=window.localStorage.getItem(v),x=k?JSON.parse(k):void 0;x&&(g=x);return e.$$set=e=>{"currTenant"in e&&i(0,$=e.currTenant)},e.$$.update=()=>{if(4&e.$$.dirty&&i(5,s=l.favicon||l.gravatar),2062&e.$$.dirty&&c.role?.length){const e=l.ticketRoles?l.ticketRoles?.split(","):"";i(1,m=e||c.role),i(4,h=m.map((e=>{return{value:e,label:e,checked:(t=e,!g||g.find((e=>e===t)))};var t})).sort(((e,t)=>e.value.localeCompare(t.value)))),g&&r.set(g)}},[$,m,l,c,h,s,u,f,p,b,({detail:e})=>{r.set(h.filter((e=>e.checked)).map((e=>e.value))),i(11,g=function(e){let t;return w(e,(e=>t=e))(),t}(r)),window.localStorage.setItem(v,JSON.stringify(g))},g,()=>window.singleSpaNavigate("/")]}class Ie extends ae{constructor(e){var t;super(),document.getElementById("svelte-12efabq-style")||((t=N("style")).id="svelte-12efabq-style",t.textContent=".profile-container.svelte-12efabq.svelte-12efabq{margin-left:0.25em;padding-left:0.5em;min-width:350px}.profile.svelte-12efabq.svelte-12efabq{display:flex;gap:1em;margin-bottom:0.5em;position:relative}.profile.svelte-12efabq .profile-information.svelte-12efabq{width:250px}.profile.svelte-12efabq .roles.svelte-12efabq .checkbox:not(:last-child){margin-bottom:0.5em}.profile.svelte-12efabq .roles.svelte-12efabq .checkbox:first-child{margin-top:1em}.profile.svelte-12efabq .roles.svelte-12efabq .selector{display:block !important}.profile.svelte-12efabq .profile-name.svelte-12efabq{margin-top:0.5em;margin-bottom:0.1em;font-weight:600;font-size:1.2em}.profile.svelte-12efabq .profile-picture.svelte-12efabq{width:100px;height:100px;cursor:pointer;position:relative}.profile.svelte-12efabq .profile-picture img.svelte-12efabq{padding-left:0.25em;border-radius:2em;width:100px;height:100px}",z(document.head,t)),le(this,e,qe,Ne,b,{currTenant:0})}}function Oe(e){let t,n,o,r;return{c(){t=q("svg"),n=q("polyline"),o=q("path"),C(n,"points","9 11 12 14 22 4"),C(o,"d","M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",r="feather feather-check-square "+e[2])},m(e,r){_(e,t,r),z(t,n),z(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-check-square "+e[2])&&C(t,"class",r)},i:m,o:m,d(e){e&&W(t)}}}function Ee(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Se extends ae{constructor(e){super(),le(this,e,Ee,Oe,b,{size:0,strokeWidth:1,class:2})}}function Ce(e){let t,n,o;return{c(){t=q("svg"),n=q("polyline"),C(n,"points","9 18 15 12 9 6"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",o="feather feather-chevron-right "+e[2])},m(e,o){_(e,t,o),z(t,n)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-chevron-right "+e[2])&&C(t,"class",o)},i:m,o:m,d(e){e&&W(t)}}}function Be(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ae extends ae{constructor(e){super(),le(this,e,Be,Ce,b,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,o,r;return{c(){t=q("svg"),n=q("polyline"),o=q("polyline"),C(n,"points","11 17 6 12 11 7"),C(o,"points","18 17 13 12 18 7"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",r="feather feather-chevrons-left "+e[2])},m(e,r){_(e,t,r),z(t,n),z(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-chevrons-left "+e[2])&&C(t,"class",r)},i:m,o:m,d(e){e&&W(t)}}}function Pe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Te extends ae{constructor(e){super(),le(this,e,Pe,Me,b,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,o,r;return{c(){t=q("svg"),n=q("polyline"),o=q("polyline"),C(n,"points","13 17 18 12 13 7"),C(o,"points","6 17 11 12 6 7"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",r="feather feather-chevrons-right "+e[2])},m(e,r){_(e,t,r),z(t,n),z(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-chevrons-right "+e[2])&&C(t,"class",r)},i:m,o:m,d(e){e&&W(t)}}}function He(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Le extends ae{constructor(e){super(),le(this,e,He,De,b,{size:0,strokeWidth:1,class:2})}}function Re(e){let t,n,o,r;return{c(){t=q("svg"),n=q("path"),o=q("path"),C(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),C(o,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",r="feather feather-edit "+e[2])},m(e,r){_(e,t,r),z(t,n),z(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-edit "+e[2])&&C(t,"class",r)},i:m,o:m,d(e){e&&W(t)}}}function Ve(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ge extends ae{constructor(e){super(),le(this,e,Ve,Re,b,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,o,r,i;return{c(){t=q("svg"),n=q("path"),o=q("polyline"),r=q("line"),C(n,"d","M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"),C(o,"points","16 17 21 12 16 7"),C(r,"x1","21"),C(r,"y1","12"),C(r,"x2","9"),C(r,"y2","12"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",i="feather feather-log-out "+e[2])},m(e,i){_(e,t,i),z(t,n),z(t,o),z(t,r)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-log-out "+e[2])&&C(t,"class",i)},i:m,o:m,d(e){e&&W(t)}}}function Fe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ke extends ae{constructor(e){super(),le(this,e,Fe,Je,b,{size:0,strokeWidth:1,class:2})}}function Ye(e){let t,n,o;return{c(){t=q("svg"),n=q("path"),C(n,"d","M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",o="feather feather-message-circle "+e[2])},m(e,o){_(e,t,o),z(t,n)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-message-circle "+e[2])&&C(t,"class",o)},i:m,o:m,d(e){e&&W(t)}}}function Qe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ue extends ae{constructor(e){super(),le(this,e,Qe,Ye,b,{size:0,strokeWidth:1,class:2})}}function Xe(e){let t,n,o;return{c(){t=q("svg"),n=q("path"),C(n,"d","M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",o="feather feather-paperclip "+e[2])},m(e,o){_(e,t,o),z(t,n)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-paperclip "+e[2])&&C(t,"class",o)},i:m,o:m,d(e){e&&W(t)}}}function Ze(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class et extends ae{constructor(e){super(),le(this,e,Ze,Xe,b,{size:0,strokeWidth:1,class:2})}}function tt(e){let t,n,o,r;return{c(){t=q("svg"),n=q("circle"),o=q("path"),C(n,"cx","12"),C(n,"cy","12"),C(n,"r","3"),C(o,"d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",r="feather feather-settings "+e[2])},m(e,r){_(e,t,r),z(t,n),z(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-settings "+e[2])&&C(t,"class",r)},i:m,o:m,d(e){e&&W(t)}}}function nt(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class ot extends ae{constructor(e){super(),le(this,e,nt,tt,b,{size:0,strokeWidth:1,class:2})}}function rt(e){let t,n,o;return{c(){t=q("svg"),n=q("path"),C(n,"d","M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",o="feather feather-tool "+e[2])},m(e,o){_(e,t,o),z(t,n)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-tool "+e[2])&&C(t,"class",o)},i:m,o:m,d(e){e&&W(t)}}}function it(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class st extends ae{constructor(e){super(),le(this,e,it,rt,b,{size:0,strokeWidth:1,class:2})}}function lt(e,t,n){const o=e.slice();return o[7]=t[n],o}function at(e){let t;return{c(){t=N("tr"),t.innerHTML='<td class="notifications-card__noNotifications svelte-1ypmlbi">Keine Notifikationen</td>',C(t,"class","svelte-1ypmlbi")},m(e,n){_(e,t,n)},p:m,i:m,o:m,d(e){e&&W(t)}}}function ct(e){let t,n,o,r,i=[],s=new Map,l=e[0];const a=e=>e[7].id;for(let t=0;t<l.length;t+=1){let n=lt(e,l,t),o=a(n);s.set(o,i[t]=wt(o,n))}return{c(){t=N("thead"),t.innerHTML='<tr class="svelte-1ypmlbi"><th class="svelte-1ypmlbi"></th> \n <th class="tabletitle svelte-1ypmlbi">Notifikationen</th> \n <th class="svelte-1ypmlbi"></th></tr>',n=O(),o=N("tbody");for(let e=0;e<i.length;e+=1)i[e].c()},m(e,s){_(e,t,s),_(e,n,s),_(e,o,s);for(let e=0;e<i.length;e+=1)i[e].m(o,null);r=!0},p(e,t){9&t&&(l=e[0],X(),i=function(e,t,n,o,r,i,s,l,a,c,u,d){let f=e.length,p=i.length,m=f;const h={};for(;m--;)h[e[m].key]=m;const g=[],$=new Map,v=new Map;for(m=p;m--;){const e=d(r,i,m),l=n(e);let a=s.get(l);a?o&&a.p(e,t):(a=c(l,e),a.c()),$.set(l,g[m]=a),l in h&&v.set(l,Math.abs(m-h[l]))}const b=new Set,w=new Set;function y(e){ee(e,1),e.m(l,u),s.set(e.key,e),u=e.first,p--}for(;f&&p;){const t=g[p-1],n=e[f-1],o=t.key,r=n.key;t===n?(u=t.first,f--,p--):$.has(r)?!s.has(o)||b.has(o)?y(t):w.has(r)?f--:v.get(o)>v.get(r)?(w.add(o),y(t)):(b.add(r),f--):(a(n,s),f--)}for(;f--;){const t=e[f];$.has(t.key)||a(t,s)}for(;p;)y(g[p-1]);return g}(i,t,a,1,e,l,s,o,ne,wt,null,lt),Z())},i(e){if(!r){for(let e=0;e<l.length;e+=1)ee(i[e]);r=!0}},o(e){for(let e=0;e<i.length;e+=1)te(i[e]);r=!1},d(e){e&&W(t),e&&W(n),e&&W(o);for(let e=0;e<i.length;e+=1)i[e].d()}}}function ut(e){let t,n,o,r;const i=[ht,mt,pt,ft],s=[];function l(e,t){return"communication"===e[7].type?0:"task"===e[7].type?1:"approval"===e[7].type?2:"attachment"===e[7].type?3:-1}return~(n=l(e))&&(o=s[n]=i[n](e)),{c(){t=N("div"),o&&o.c(),A(t,"background-color","orange"),C(t,"class","mr notification_icon_dot")},m(e,o){_(e,t,o),~n&&s[n].m(t,null),r=!0},p(e,r){let a=n;n=l(e),n!==a&&(o&&(X(),te(s[a],1,1,(()=>{s[a]=null})),Z()),~n?(o=s[n],o||(o=s[n]=i[n](e),o.c()),ee(o,1),o.m(t,null)):o=null)},i(e){r||(ee(o),r=!0)},o(e){te(o),r=!1},d(e){e&&W(t),~n&&s[n].d()}}}function dt(e){let t,n,o,r;const i=[bt,vt,$t,gt],s=[];function l(e,t){return"communication"===e[7].type?0:"task"===e[7].type?1:"approval"===e[7].type?2:"attachment"===e[7].type?3:-1}return~(n=l(e))&&(o=s[n]=i[n](e)),{c(){t=N("div"),o&&o.c(),A(t,"background-color","grey"),C(t,"class","mr notification_icon_dot")},m(e,o){_(e,t,o),~n&&s[n].m(t,null),r=!0},p(e,r){let a=n;n=l(e),n!==a&&(o&&(X(),te(s[a],1,1,(()=>{s[a]=null})),Z()),~n?(o=s[n],o||(o=s[n]=i[n](e),o.c()),ee(o,1),o.m(t,null)):o=null)},i(e){r||(ee(o),r=!0)},o(e){te(o),r=!1},d(e){e&&W(t),~n&&s[n].d()}}}function ft(e){let t,n;return t=new et({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function pt(e){let t,n;return t=new Se({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function mt(e){let t,n;return t=new Ge({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function ht(e){let t,n;return t=new Ue({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function gt(e){let t,n;return t=new et({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function $t(e){let t,n;return t=new Se({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function vt(e){let t,n;return t=new Ge({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function bt(e){let t,n;return t=new Ue({props:{size:"18"}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function wt(e,t){let n,o,r,i,s,l,a,c,u,d,f,p,m,h,g=t[7].designation+"";const $=[dt,ut],b=[];function w(e,t){return e[7].read?0:1}return r=w(t),i=b[r]=$[r](t),d=new Ae({props:{class:"not-icon",size:"25"}}),{key:e,first:null,c(){n=N("tr"),o=N("td"),i.c(),s=O(),l=N("td"),a=I(g),c=O(),u=N("td"),oe(d.$$.fragment),f=O(),C(o,"class","svelte-1ypmlbi"),C(l,"class","svelte-1ypmlbi"),C(u,"class","notification--arrow svelte-1ypmlbi"),C(n,"class","notification--row svelte-1ypmlbi"),this.first=n},m(e,i){_(e,n,i),z(n,o),b[r].m(o,null),z(n,s),z(n,l),z(l,a),z(n,c),z(n,u),re(d,u,null),z(n,f),p=!0,m||(h=S(n,"click",(function(){v(t[3](t[7]))&&t[3](t[7]).apply(this,arguments)})),m=!0)},p(e,n){let s=r;r=w(t=e),r===s?b[r].p(t,n):(X(),te(b[s],1,1,(()=>{b[s]=null})),Z(),i=b[r],i?i.p(t,n):(i=b[r]=$[r](t),i.c()),ee(i,1),i.m(o,null)),(!p||1&n)&&g!==(g=t[7].designation+"")&&B(a,g)},i(e){p||(ee(i),ee(d.$$.fragment,e),p=!0)},o(e){te(i),te(d.$$.fragment,e),p=!1},d(e){e&&W(n),b[r].d(),ie(d),m=!1,h()}}}function yt(e){let t,n,o,r,i;const s=[ct,at],l=[];function a(e,t){return e[0]?.length?0:1}return o=a(e),r=l[o]=s[o](e),{c(){t=N("div"),n=N("table"),r.c(),C(n,"class","no_border_spacing tableFixHeadNotif svelte-1ypmlbi"),C(t,"class","notifications-card--content svelte-1ypmlbi")},m(e,r){_(e,t,r),z(t,n),l[o].m(n,null),i=!0},p(e,t){let i=o;o=a(e),o===i?l[o].p(e,t):(X(),te(l[i],1,1,(()=>{l[i]=null})),Z(),r=l[o],r?r.p(e,t):(r=l[o]=s[o](e),r.c()),ee(r,1),r.m(n,null))},i(e){i||(ee(r),i=!0)},o(e){te(r),i=!1},d(e){e&&W(t),l[o].d()}}}function kt(e){let t,n,o;return n=new e[1]({props:{class:"notifications-card",outline:!0,$$slots:{default:[yt]},$$scope:{ctx:e}}}),{c(){t=N("div"),oe(n.$$.fragment),C(t,"class","notification-container svelte-1ypmlbi")},m(e,r){_(e,t,r),re(n,t,null),o=!0},p(e,[t]){const o={};1025&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(ee(n.$$.fragment,e),o=!0)},o(e){te(n.$$.fragment,e),o=!1},d(e){e&&W(t),ie(n)}}}function xt(e,o,r){let l;const{Card:c}=t,{loggedIn:u,onLogout:d}=a;y(e,u,(e=>r(4,l=e)));let f=n.getNotifications(l.user).then((e=>r(0,f=e)));i.subscribe((e=>{e&&(p(),i.set(!1))})),s.subscribe((e=>{r(0,f=e)}));const p=()=>{r(0,f=n.getNotificationsLocal(l.user))};return[f,c,u,e=>{window.singleSpaNavigate("/notifications/"+e.id)}]}class zt extends ae{constructor(e){var t;super(),document.getElementById("svelte-1ypmlbi-style")||((t=N("style")).id="svelte-1ypmlbi-style",t.textContent=".notification-container.svelte-1ypmlbi.svelte-1ypmlbi{width:340px}.notification-container.svelte-1ypmlbi .notifications-card{width:90%;min-height:9em;max-height:11em;padding-top:1em !important}.notification--row.svelte-1ypmlbi.svelte-1ypmlbi{cursor:pointer}.notification--row.svelte-1ypmlbi.svelte-1ypmlbi:hover{background-color:#dddddd}td.svelte-1ypmlbi.svelte-1ypmlbi{padding:0.5em 0 0.5em 0.2em;vertical-align:middle;border-bottom:1px solid #ccc}td.notification--arrow.svelte-1ypmlbi .not-icon{transform:translateY(0.21em)}.notifications-card__noNotifications.svelte-1ypmlbi.svelte-1ypmlbi{text-align:center}.notifications-card--content.svelte-1ypmlbi.svelte-1ypmlbi{max-height:11em;overflow-y:auto}.tabletitle.svelte-1ypmlbi.svelte-1ypmlbi{padding-left:0.2em}.no_border_spacing.svelte-1ypmlbi.svelte-1ypmlbi{border-spacing:0;vertical-align:middle}.tableFixHeadNotif.svelte-1ypmlbi.svelte-1ypmlbi{overflow:auto;height:100px}.tableFixHeadNotif.svelte-1ypmlbi thead th.svelte-1ypmlbi{position:sticky;z-index:1;top:0;border-bottom:2px solid;background-color:#fff}.tableFixHeadNotif.svelte-1ypmlbi thead tr.svelte-1ypmlbi{border-top:none}@media screen and (min-width: 64px) and (max-width: 1064px){.notification-container.svelte-1ypmlbi.svelte-1ypmlbi{display:none !important}}",z(document.head,t)),le(this,e,xt,kt,b,{})}}function _t(e,t,n){const o=e.slice();return o[3]=t[n].icon,o[4]=t[n].title,o[5]=t[n].link,o}function Wt(e){let t,n,o;var r=e[3];return r&&(t=new r({props:{size:"20"}})),{c(){t&&oe(t.$$.fragment),n=E()},m(e,r){t&&re(t,e,r),_(e,n,r),o=!0},p(e,o){if(r!==(r=e[3])){if(t){X();const e=t;te(e.$$.fragment,1,0,(()=>{ie(e,1)})),Z()}r?(t=new r({props:{size:"20"}}),oe(t.$$.fragment),ee(t.$$.fragment,1),re(t,n.parentNode,n)):t=null}},i(e){o||(t&&ee(t.$$.fragment,e),o=!0)},o(e){t&&te(t.$$.fragment,e),o=!1},d(e){e&&W(n),t&&ie(t,e)}}}function jt(e){let t,n,o;return t=new l({props:{title:e[4],link:e[5],$$slots:{default:[Wt]},$$scope:{ctx:e}}}),{c(){oe(t.$$.fragment),n=O()},m(e,r){re(t,e,r),_(e,n,r),o=!0},p(e,n){const o={};256&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){o||(ee(t.$$.fragment,e),o=!0)},o(e){te(t.$$.fragment,e),o=!1},d(e){ie(t,e),e&&W(n)}}}function Nt(e){let t,n;return t=new e[0]({props:{filled:!0,style:"margin: 0.5em",$$slots:{default:[jt]},$$scope:{ctx:e}}}),t.$on("click",(function(){return e[2](e[5])})),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},p(n,o){e=n;const r={};256&o&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function qt(e){let t,n,o=e[1],r=[];for(let t=0;t<o.length;t+=1)r[t]=Nt(_t(e,o,t));const i=e=>te(r[e],1,1,(()=>{r[e]=null}));return{c(){t=N("div");for(let e=0;e<r.length;e+=1)r[e].c();C(t,"class","action-icons")},m(e,o){_(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,[n]){if(2&n){let s;for(o=e[1],s=0;s<o.length;s+=1){const i=_t(e,o,s);r[s]?(r[s].p(i,n),ee(r[s],1)):(r[s]=Nt(i),r[s].c(),ee(r[s],1),r[s].m(t,null))}for(X(),s=o.length;s<r.length;s+=1)i(s);Z()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ee(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)te(r[e]);n=!1},d(e){e&&W(t),j(r,e)}}}function It(e){const{Button:n}=t;return[n,[{icon:ot,title:"Aufgabe",link:"/settings"},{icon:st,title:"Plugin",link:"/plugin"},{icon:Ke,title:"Ausloggen",link:"/login"}],e=>window.singleSpaNavigate(e)]}class Ot extends ae{constructor(e){super(),le(this,e,It,qt,b,{})}}function Et(e,t,n){const o=e.slice();return o[11]=t[n].disabled,o[12]=t[n].path,o[13]=t[n].title,o}function St(e){let t,n=e[13]+"";return{c(){t=I(n)},m(e,n){_(e,t,n)},p(e,o){1&o&&n!==(n=e[13]+"")&&B(t,n)},d(e){e&&W(t)}}}function Ct(e){let t,n;return t=new e[3]({props:{filled:!0,style:"margin: 0.5em",disabled:e[11],$$slots:{default:[St]},$$scope:{ctx:e}}}),t.$on("click",(function(){return e[9](e[12])})),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},p(n,o){e=n;const r={};1&o&&(r.disabled=e[11]),65537&o&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function Bt(e){let t,n,o=e[0],r=[];for(let t=0;t<o.length;t+=1)r[t]=Ct(Et(e,o,t));const i=e=>te(r[e],1,1,(()=>{r[e]=null}));return{c(){t=N("div");for(let e=0;e<r.length;e+=1)r[e].c()},m(e,o){_(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,[n]){if(1&n){let s;for(o=e[0],s=0;s<o.length;s+=1){const i=Et(e,o,s);r[s]?(r[s].p(i,n),ee(r[s],1)):(r[s]=Ct(i),r[s].c(),ee(r[s],1),r[s].m(t,null))}for(X(),s=o.length;s<r.length;s+=1)i(s);Z()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ee(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)te(r[e]);n=!1},d(e){e&&W(t),j(r,e)}}}function At(e,n,o){let r,i,s,l,c;const{mainView:u,environment:d}=a;y(e,u,(e=>o(5,l=e))),y(e,d,(e=>o(8,c=e)));const{Button:f}=t;let p;return e.$$.update=()=>{32&e.$$.dirty&&o(4,r="Aufgabenliste"===l),32&e.$$.dirty&&o(6,i="Auswertungen"===l),32&e.$$.dirty&&o(7,s="Dashboard"===l),464&e.$$.dirty&&c&&o(0,p=((e,t,n)=>{const o=[{disabled:e,path:"/",title:"Aufgabenliste"},{disabled:t,path:"/reporting",title:"Auswertungen"}];return c.hasDashboard&&o.unshift({disabled:n,path:"/dashboard",title:"Dashboard"}),o})(r,i,s))},[p,u,d,f,r,l,i,s,c,e=>window.singleSpaNavigate(e)]}class Mt extends ae{constructor(e){super(),le(this,e,At,Bt,b,{})}}function Pt(e){let t,n,o,r,i,s,l;return t=new zt({}),r=new Mt({}),s=new Ot({}),{c(){oe(t.$$.fragment),n=O(),o=N("div"),oe(r.$$.fragment),i=O(),oe(s.$$.fragment),C(o,"class","flex")},m(e,a){re(t,e,a),_(e,n,a),_(e,o,a),re(r,o,null),z(o,i),re(s,o,null),l=!0},i(e){l||(ee(t.$$.fragment,e),ee(r.$$.fragment,e),ee(s.$$.fragment,e),l=!0)},o(e){te(t.$$.fragment,e),te(r.$$.fragment,e),te(s.$$.fragment,e),l=!1},d(e){ie(t,e),e&&W(n),e&&W(o),ie(r),ie(s)}}}function Tt(e){let t,n,o,r;t=new Ie({props:{currTenant:e[0]}});let i=e[0]&&Pt();return{c(){oe(t.$$.fragment),n=O(),i&&i.c(),o=E()},m(e,s){re(t,e,s),_(e,n,s),i&&i.m(e,s),_(e,o,s),r=!0},p(e,[n]){const r={};1&n&&(r.currTenant=e[0]),t.$set(r),e[0]?i?1&n&&ee(i,1):(i=Pt(),i.c(),ee(i,1),i.m(o.parentNode,o)):i&&(X(),te(i,1,1,(()=>{i=null})),Z())},i(e){r||(ee(t.$$.fragment,e),ee(i),r=!0)},o(e){te(t.$$.fragment,e),te(i),r=!1},d(e){ie(t,e),e&&W(n),i&&i.d(e),e&&W(o)}}}function Dt(e,t,n){let{currTenant:o}=t;return e.$$set=e=>{"currTenant"in e&&n(0,o=e.currTenant)},[o]}class Ht extends ae{constructor(e){super(),le(this,e,Dt,Tt,b,{currTenant:0})}}function Lt(e){let t,n;return{c(){t=N("img"),t.src!==(n="/favicon_fill.png")&&C(t,"src","/favicon_fill.png"),C(t,"alt","icon"),C(t,"width","40"),C(t,"height","40"),C(t,"title","enablerr")},m(e,n){_(e,t,n)},p:m,i:m,o:m,d(e){e&&W(t)}}}function Rt(e){let t,n;return t=new Ht({props:{currTenant:e[2]}}),{c(){oe(t.$$.fragment)},m(e,o){re(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.currTenant=e[2]),t.$set(o)},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){ie(t,e)}}}function Vt(e){let t,n,o,r,i,s,l,a,c,u,d,f,p,m;return o=new Te({props:{size:"24"}}),l=new e[4]({props:{text:" === "}}),u=new Le({props:{size:"24"}}),{c(){t=N("div"),n=N("div"),oe(o.$$.fragment),i=O(),s=N("div"),oe(l.$$.fragment),a=O(),c=N("div"),oe(u.$$.fragment),C(n,"title",r=e[9](e[3],!1)),A(n,"position","absolute"),A(n,"top","-0.65em"),A(n,"left","0"),A(n,"cursor","pointer"),A(n,"z-index","10"),A(n,"padding-left",".5em"),A(n,"padding-right","2em"),A(s,"cursor","pointer"),A(s,"z-index","1"),A(s,"padding-left","2em"),A(s,"padding-right","2em"),C(c,"title",d=e[9](e[3],!0)),C(c,"style","position: absolute; top: -0.65em; right: 0; cursor: pointer; z-index 10; padding-right: .5em; padding-left: 2em;"),A(t,"position","relative")},m(r,d){_(r,t,d),z(t,n),re(o,n,null),z(t,i),z(t,s),re(l,s,null),z(t,a),z(t,c),re(u,c,null),f=!0,p||(m=[S(n,"click",e[8](!1)),S(s,"click",e[7]),S(c,"click",e[8](!0))],p=!0)},p(e,t){(!f||8&t&&r!==(r=e[9](e[3],!1)))&&C(n,"title",r),(!f||8&t&&d!==(d=e[9](e[3],!0)))&&C(c,"title",d)},i(e){f||(ee(o.$$.fragment,e),ee(l.$$.fragment,e),ee(u.$$.fragment,e),f=!0)},o(e){te(o.$$.fragment,e),te(l.$$.fragment,e),te(u.$$.fragment,e),f=!1},d(e){e&&W(t),ie(o),ie(l),ie(u),p=!1,$(m)}}}function Gt(e){let t,n,o,r,i,s,l;const a=[Rt,Lt],c=[];function u(e,t){return e[1]?0:1}n=u(e),o=c[n]=a[n](e);let d=e[1]&&Vt(e);return{c(){t=N("nav"),o.c(),i=O(),d&&d.c(),s=E(),C(t,"class",r=k("none"===e[0]?"closed":"")+" svelte-17mm0pz"),A(t,"display",e[0])},m(e,o){_(e,t,o),c[n].m(t,null),_(e,i,o),d&&d.m(e,o),_(e,s,o),l=!0},p(e,[i]){let f=n;n=u(e),n===f?c[n].p(e,i):(X(),te(c[f],1,1,(()=>{c[f]=null})),Z(),o=c[n],o?o.p(e,i):(o=c[n]=a[n](e),o.c()),ee(o,1),o.m(t,null)),(!l||1&i&&r!==(r=k("none"===e[0]?"closed":"")+" svelte-17mm0pz"))&&C(t,"class",r),(!l||1&i)&&A(t,"display",e[0]),e[1]?d?(d.p(e,i),2&i&&ee(d,1)):(d=Vt(e),d.c(),ee(d,1),d.m(s.parentNode,s)):d&&(X(),te(d,1,1,(()=>{d=null})),Z())},i(e){l||(ee(o),ee(d),l=!0)},o(e){te(o),te(d),l=!1},d(e){e&&W(t),c[n].d(),e&&W(i),d&&d.d(e),e&&W(s)}}}function Jt(e,n,o){let r,i,s,l;const{Divider:c}=t,{mainView:u,loggedIn:d}=a;y(e,u,(e=>o(3,l=e))),y(e,d,(e=>o(10,s=e)));let f=window.innerHeight>1024?"flex":"none";const p=["Dashboard","Aufgabenliste","Auswertungen","Dashboard","Aufgabenliste","Auswertungen"],m={Dashboard:"/dashboard",Auswertungen:"/reporting",Aufgabenliste:"/"},h=(e,t)=>{const n=e?p:p.toReversed(),o=t||l,r=n.findIndex((e=>e===o));return n[r+1]};return e.$$.update=()=>{1024&e.$$.dirty&&o(1,r=s.user),1024&e.$$.dirty&&o(2,i=s.tenant)},[f,r,i,l,c,u,d,()=>{o(0,f="none"===f?"flex":"none")},(e=!1)=>()=>{const t=h(e);window.singleSpaNavigate(m[t])},(e,t=!1)=>h(t,e),s]}const Ft=p({component:class extends ae{constructor(e){var t;super(),document.getElementById("svelte-17mm0pz-style")||((t=N("style")).id="svelte-17mm0pz-style",t.textContent="nav.svelte-17mm0pz{display:flex;justify-content:space-between;gap:1.5em;align-items:center;padding:2em;padding-bottom:0;flex-flow:row wrap}",z(document.head,t)),le(this,e,Jt,Gt,b,{})}},domElementGetter:()=>document.getElementById("layout-header")}),{bootstrap:Kt,mount:Yt,unmount:Qt}=Ft;e({bootstrap:Kt,mount:Yt,unmount:Qt})}}}));