@enablerr-ui/report 0.2.35 → 0.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -1 +1 @@
1
- System.register(["@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n,o,r,s;return{setters:[function(t){e=t.getAttractions},function(t){n=t.attachment_notification,o=t.Request,r=t.currentRoles,s=t.settings}],execute:function(){t("version","0.2.35");function c(){}function l(t){return t()}function i(){return Object.create(null)}function u(t){t.forEach(l)}function a(t){return"function"==typeof t}function d(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function p(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return c;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function f(t,e){t.appendChild(e)}function m(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function g(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function v(t){return document.createTextNode(t)}function b(){return v(" ")}function w(){return v("")}function y(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function k(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function x(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let E;function j(t){E=t}function O(){if(!E)throw new Error("Function called outside component initialization");return E}const P=[],z=[],B=[],D=[],S=Promise.resolve();let M=!1;function C(t){B.push(t)}let I=!1;const N=new Set;function A(){if(!I){I=!0;do{for(let t=0;t<P.length;t+=1){const e=P[t];j(e),G(e.$$)}for(j(null),P.length=0;z.length;)z.pop()();for(let t=0;t<B.length;t+=1){const e=B[t];N.has(e)||(N.add(e),e())}B.length=0}while(P.length);for(;D.length;)D.pop()();M=!1,I=!1,N.clear()}}function G(t){if(null!==t.fragment){t.update(),u(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(C)}}const T=new Set;let W;function F(){W={r:0,c:[],p:W}}function q(){W.r||u(W.c),W=W.p}function R(t,e){t&&t.i&&(T.delete(t),t.i(e))}function H(t,e,n,o){if(t&&t.o){if(T.has(t))return;T.add(t),W&&W.c.push((()=>{T.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function L(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let c=e.ctx;void 0!==r&&(c=c.slice(),c[r]=s);const l=t&&(e.current=t)(c);let i=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(F(),H(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),q())})):e.block.d(1),l.c(),R(l,1),l.m(e.mount(),e.anchor),i=!0),e.block=l,e.blocks&&(e.blocks[o]=l),i&&A()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=O();if(t.then((t=>{j(n),o(e.then,1,e.value,t),j(null)}),(t=>{if(j(n),o(e.catch,2,e.error,t),j(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}const U="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function K(t){t&&t.c()}function V(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:c,after_update:i}=t.$$;r&&r.m(e,n),o||C((()=>{const e=s.map(l).filter(a);c?c.push(...e):u(e),t.$$.on_mount=[]})),i.forEach(C)}function J(t,e){const n=t.$$;null!==n.fragment&&(u(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Q(t,e){-1===t.$$.dirty[0]&&(P.push(t),M||(M=!0,S.then(A)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function X(t,e,n,o,r,s,l=[-1]){const a=E;j(t);const d=t.$$={fragment:null,ctx:null,props:s,update:c,not_equal:r,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:i(),dirty:l,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&r(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&Q(t,e)),n})):[],d.update(),p=!0,u(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(h)}else d.fragment&&d.fragment.c();e.intro&&R(t.$$.fragment),V(t,e.target,e.anchor,e.customElement),A()}j(a)}class Y{$destroy(){J(this,1),this.$destroy=c}$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 Z(t){let e,n,o,r,s;return{c(){e=g("svg"),n=g("path"),o=g("polyline"),r=g("line"),k(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),k(o,"points","7 10 12 15 17 10"),k(r,"x1","12"),k(r,"y1","15"),k(r,"x2","12"),k(r,"y2","3"),k(e,"xmlns","http://www.w3.org/2000/svg"),k(e,"width",t[0]),k(e,"height",t[0]),k(e,"fill","none"),k(e,"viewBox","0 0 24 24"),k(e,"stroke","currentColor"),k(e,"stroke-width",t[1]),k(e,"stroke-linecap","round"),k(e,"stroke-linejoin","round"),k(e,"class",s="feather feather-download "+t[2])},m(t,s){m(t,e,s),f(e,n),f(e,o),f(e,r)},p(t,[n]){1&n&&k(e,"width",t[0]),1&n&&k(e,"height",t[0]),2&n&&k(e,"stroke-width",t[1]),4&n&&s!==(s="feather feather-download "+t[2])&&k(e,"class",s)},i:c,o:c,d(t){t&&h(e)}}}function tt(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class et extends Y{constructor(t){super(),X(this,t,tt,Z,d,{size:0,strokeWidth:1,class:2})}}function nt(t){let e,n,o,r;return{c(){e=g("svg"),n=g("polyline"),o=g("path"),k(n,"points","3 6 5 6 21 6"),k(o,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),k(e,"xmlns","http://www.w3.org/2000/svg"),k(e,"width",t[0]),k(e,"height",t[0]),k(e,"fill","none"),k(e,"viewBox","0 0 24 24"),k(e,"stroke","currentColor"),k(e,"stroke-width",t[1]),k(e,"stroke-linecap","round"),k(e,"stroke-linejoin","round"),k(e,"class",r="feather feather-trash "+t[2])},m(t,r){m(t,e,r),f(e,n),f(e,o)},p(t,[n]){1&n&&k(e,"width",t[0]),1&n&&k(e,"height",t[0]),2&n&&k(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-trash "+t[2])&&k(e,"class",r)},i:c,o:c,d(t){t&&h(e)}}}function ot(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class rt extends Y{constructor(t){super(),X(this,t,ot,nt,d,{size:0,strokeWidth:1,class:2})}}const{document:st}=U;function ct(t,e,n){const o=t.slice();return o[27]=e[n],o[29]=n,o}function lt(t){let e;return{c(){e=$("div"),e.textContent="Dokument ersetzen"},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function it(t){let e;return{c(){e=$("div"),e.textContent="Dokument wählen"},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function ut(t){let e;function n(t,e){return t[0]?lt:it}let o=n(t),r=o(t);return{c(){r.c(),e=w()},m(t,n){r.m(t,n),m(t,e,n)},p(t,s){o!==(o=n(t))&&(r.d(1),r=o(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){r.d(t),t&&h(e)}}}function at(t){let e,n,o,r,s,c,l,i,u,a,d,p,g,w,_,E;function j(e){t[21](e)}let O={placeholder:t[7],type:"text",id:"fileTitle",required:!0};return void 0!==t[3]&&(O.value=t[3]),a=new t[9]({props:O}),z.push((()=>function(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}(a,"value",j))),g=new t[8]({props:{disabled:t[4],filled:!0,style:"color: whitesmoke;",type:"submit",$$slots:{default:[dt]},$$scope:{ctx:t}}}),{c(){e=$("div"),n=$("form"),o=$("div"),r=$("div"),s=v(t[5]),c=b(),l=$("div"),i=v(t[6]),u=b(),K(a.$$.fragment),p=b(),K(g.$$.fragment),k(r,"class","word-break svelte-o8wpc2"),k(o,"class","container-file svelte-o8wpc2"),k(n,"id","submitForm"),k(e,"class","form-step svelte-o8wpc2")},m(d,h){var $;m(d,e,h),f(e,n),f(n,o),f(o,r),f(r,s),f(o,c),f(o,l),f(l,i),f(o,u),V(a,o,null),f(o,p),V(g,o,null),w=!0,_||(E=y(n,"submit",($=t[10],function(t){return t.preventDefault(),$.call(this,t)})),_=!0)},p(t,e){(!w||32&e)&&x(s,t[5]),(!w||64&e)&&x(i,t[6]);const n={};var o;128&e&&(n.placeholder=t[7]),!d&&8&e&&(d=!0,n.value=t[3],o=()=>d=!1,D.push(o)),a.$set(n);const r={};16&e&&(r.disabled=t[4]),1073741824&e&&(r.$$scope={dirty:e,ctx:t}),g.$set(r)},i(t){w||(R(a.$$.fragment,t),R(g.$$.fragment,t),w=!0)},o(t){H(a.$$.fragment,t),H(g.$$.fragment,t),w=!1},d(t){t&&h(e),J(a),J(g),_=!1,E()}}}function dt(t){let e;return{c(){e=v("Dokument hochladen")},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function pt(t){return{c:c,m:c,p:c,i:c,o:c,d:c}}function ft(t){let e,n,o,r,s,c,l,i;const u=[ht,mt],a=[];function d(t,e){return 0===t[26].length?0:1}return c=d(t),l=a[c]=u[c](t),{c(){e=$("div"),n=$("table"),o=$("thead"),o.innerHTML='<tr class="svelte-o8wpc2"><th class="svelte-o8wpc2">#</th> \n <th class="svelte-o8wpc2">Datei</th> \n <th class="text_right svelte-o8wpc2">Grösse</th> \n <th id="headAction" class="svelte-o8wpc2">Aktionen</th></tr>',r=b(),s=$("tbody"),l.c(),k(o,"class","tablehead"),k(n,"class","tableFixHead"),k(e,"class","task_list svelte-o8wpc2")},m(t,l){m(t,e,l),f(e,n),f(n,o),f(n,r),f(n,s),a[c].m(s,null),i=!0},p(t,e){let n=c;c=d(t),c===n?a[c].p(t,e):(F(),H(a[n],1,1,(()=>{a[n]=null})),q(),l=a[c],l?l.p(t,e):(l=a[c]=u[c](t),l.c()),R(l,1),l.m(s,null))},i(t){i||(R(l),i=!0)},o(t){H(l),i=!1},d(t){t&&h(e),a[c].d()}}}function mt(t){let e,n,o=t[26],r=[];for(let e=0;e<o.length;e+=1)r[e]=vt(ct(t,o,e));const s=t=>H(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=w()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);m(t,e,o),n=!0},p(t,n){if(4114&n){let c;for(o=t[26],c=0;c<o.length;c+=1){const s=ct(t,o,c);r[c]?(r[c].p(s,n),R(r[c],1)):(r[c]=vt(s),r[c].c(),R(r[c],1),r[c].m(e.parentNode,e))}for(F(),c=o.length;c<r.length;c+=1)s(c);q()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)R(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)H(r[t]);n=!1},d(t){!function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(r,t),t&&h(e)}}}function ht(t){let e;return{c(){e=$("tr"),e.innerHTML='<td colspan="4" style="text-align: center;" class="svelte-o8wpc2">Keine Dokumente gefunden</td>',k(e,"class","svelte-o8wpc2")},m(t,n){m(t,e,n)},p:c,i:c,o:c,d(t){t&&h(e)}}}function $t(t){let e,n,o,r;return n=new et({props:{size:"18"}}),{c(){e=$("a"),K(n.$$.fragment),k(e,"href",o="/api/userreport/"+t[27]._id),_(e,"color","whitesmoke")},m(t,o){m(t,e,o),V(n,e,null),r=!0},p(t,n){(!r||2&n&&o!==(o="/api/userreport/"+t[27]._id))&&k(e,"href",o)},i(t){r||(R(n.$$.fragment,t),r=!0)},o(t){H(n.$$.fragment,t),r=!1},d(t){t&&h(e),J(n)}}}function gt(t){let e,n;return e=new rt({props:{size:"18"}}),{c(){K(e.$$.fragment)},m(t,o){V(e,t,o),n=!0},p:c,i(t){n||(R(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){J(e,t)}}}function vt(t){let e,n,o,r,s,c,l,i,u,a,d,p,g,w,y,E,j=t[29]+1+"",O=t[27].title+"",P=yt(t[27].sizeInByte)+"";return p=new t[8]({props:{small:!0,filled:!0,style:"display: inline;",$$slots:{default:[$t]},$$scope:{ctx:t}}}),w=new t[8]({props:{disabled:t[4],small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[gt]},$$scope:{ctx:t}}}),w.$on("click",(function(){return t[22](t[27])})),{c(){e=$("tr"),n=$("td"),o=v(j),r=b(),s=$("td"),c=v(O),l=b(),i=$("td"),u=v(P),a=b(),d=$("td"),K(p.$$.fragment),g=b(),K(w.$$.fragment),y=b(),k(n,"class","svelte-o8wpc2"),_(s,"max-width","30em"),k(s,"class","svelte-o8wpc2"),k(i,"class","text_right svelte-o8wpc2"),k(d,"class","svelte-o8wpc2"),k(e,"class","svelte-o8wpc2")},m(t,h){m(t,e,h),f(e,n),f(n,o),f(e,r),f(e,s),f(s,c),f(e,l),f(e,i),f(i,u),f(e,a),f(e,d),V(p,d,null),f(d,g),V(w,d,null),f(e,y),E=!0},p(e,n){t=e,(!E||2&n)&&O!==(O=t[27].title+"")&&x(c,O),(!E||2&n)&&P!==(P=yt(t[27].sizeInByte)+"")&&x(u,P);const o={};1073741826&n&&(o.$$scope={dirty:n,ctx:t}),p.$set(o);const r={};16&n&&(r.disabled=t[4]),1073741824&n&&(r.$$scope={dirty:n,ctx:t}),w.$set(r)},i(t){E||(R(p.$$.fragment,t),R(w.$$.fragment,t),E=!0)},o(t){H(p.$$.fragment,t),H(w.$$.fragment,t),E=!1},d(t){t&&h(e),J(p),J(w)}}}function bt(t){return{c:c,m:c,p:c,i:c,o:c,d:c}}function wt(t){let e,n,o,r,s,c,l,i,u,a,d,p,g;r=new t[8]({props:{class:"btn-document btn-document-primary",filled:!0,disabled:t[4],$$slots:{default:[ut]},$$scope:{ctx:t}}}),r.$on("click",t[18]);let v=t[0]&&at(t),x={ctx:t,current:null,token:null,hasCatch:!1,pending:bt,then:ft,catch:pt,value:26,blocks:[,,,]};return L(a=t[1],x),{c(){e=$("div"),n=$("form"),o=$("div"),K(r.$$.fragment),s=b(),c=$("input"),l=b(),v&&v.c(),i=b(),u=w(),x.block.c(),k(c,"type","file"),k(c,"accept",".pdf"),k(c,"id","fileInput"),c.required=!0,_(c,"display","none"),k(o,"class","document-choose svelte-o8wpc2"),k(n,"id","uploadForm"),k(e,"class","form-step svelte-o8wpc2")},m(a,h){m(a,e,h),f(e,n),f(n,o),V(r,o,null),f(o,s),f(o,c),t[20](c),m(a,l,h),v&&v.m(a,h),m(a,i,h),m(a,u,h),x.block.m(a,x.anchor=h),x.mount=()=>u.parentNode,x.anchor=u,d=!0,p||(g=y(c,"change",t[19]),p=!0)},p(e,[n]){t=e;const o={};16&n&&(o.disabled=t[4]),1073741825&n&&(o.$$scope={dirty:n,ctx:t}),r.$set(o),t[0]?v?(v.p(t,n),1&n&&R(v,1)):(v=at(t),v.c(),R(v,1),v.m(i.parentNode,i)):v&&(F(),H(v,1,1,(()=>{v=null})),q()),x.ctx=t,2&n&&a!==(a=t[1])&&L(a,x)||function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(x,t,n)},i(t){d||(R(r.$$.fragment,t),R(v),R(x.block),d=!0)},o(t){H(r.$$.fragment,t),H(v);for(let t=0;t<3;t+=1){H(x.blocks[t])}d=!1},d(n){n&&h(e),J(r),t[20](null),n&&h(l),v&&v.d(n),n&&h(i),n&&h(u),x.block.d(n),x.token=null,x=null,p=!1,g()}}}function yt(t){if(t>=1073741824)t=Math.round(t/1073741824*100)/100+" GB";else if(t>=1048576){t=Math.round(t/1048576*100)/100+" MB"}else if(t>=1024){t=Math.round(t/1024*100)/100+" KB"}else t>1?t+=" bytes":1==t?t+=" byte":t="0 bytes";return t}function kt(t,c,l){let i,u,a,d,f,m;p(t,r,(t=>l(16,f=t))),p(t,s,(t=>l(17,m=t)));const{Button:h,Divider:$,TextField:g}=e;let v,b,w,y,k,{task:x}=c,_=[],E=x.task?.readonly;const j=async()=>{const t=await x;l(14,b=await o.getSchema(t.event)),v=t.task.id;return await o.getUserReports(v)};_=j();const O=()=>{let t=w.files[0];l(3,k=t?t.name.split(".").slice(0,-1).join("."):""),l(0,y=t)};function P(t){o.deleteUserReport(t).then((()=>{}))}n.subscribe((t=>{t&&t.taskId===v&&l(1,_=j())}));return t.$$set=t=>{"task"in t&&l(13,x=t.task)},t.$$.update=()=>{if(253952&t.$$.dirty&&b&&x.task&&f&&m.role?.length&&b.authorization?.length){const t=b.authorization.some((t=>f?.find((e=>e===t.role&&"edit"===t.activity))));l(15,E||=!t)}32768&t.$$.dirty&&l(4,i=E),1&t.$$.dirty&&l(5,u=y?y.name:""),1&t.$$.dirty&&l(6,a=y?yt(y.size):""),1&t.$$.dirty&&l(7,d=y?y.name.split(".").slice(0,-1).join("."):"")},[y,_,w,k,i,u,a,d,h,g,function(){if(!y||!d)return;const t=new FormData;t.append("title",k),t.append("file",y),o.uploadUserReport(v,t).then((()=>{document.getElementById("submitForm").reset(),l(0,y=null)}))},O,P,x,b,E,f,m,()=>{w.click()},()=>O(),function(t){z[t?"unshift":"push"]((()=>{w=t,l(2,w)}))},function(t){k=t,l(3,k)},t=>P(t._id)]}class xt extends Y{constructor(t){var e;super(),st.getElementById("svelte-o8wpc2-style")||((e=$("style")).id="svelte-o8wpc2-style",e.textContent=".form-step.svelte-o8wpc2 .document-choose.svelte-o8wpc2{margin:1em}.form-step.svelte-o8wpc2 .btn-document{width:300px;text-align:center}.form-step.svelte-o8wpc2 .btn-document div{margin-inline:auto}.form-step.svelte-o8wpc2 .btn-document-primary{color:#fff}.form-step.svelte-o8wpc2 .btn-document-secondary{background-color:#91BDD9}.form-step.svelte-o8wpc2 .container-file.svelte-o8wpc2{display:grid;gap:1em;grid-template-columns:218px 100px 2fr 1fr;align-items:center}.form-step.svelte-o8wpc2 .word-break.svelte-o8wpc2{word-break:break-all}.task_list.svelte-o8wpc2.svelte-o8wpc2{flex:auto;overflow-y:scroll;overflow-x:hidden;width:99%;height:30em;border:1px solid #ccc;border-radius:0.5em;margin-top:2em}.task_list.svelte-o8wpc2 th.svelte-o8wpc2{padding:0.8em}.task_list.svelte-o8wpc2 td.svelte-o8wpc2{padding:0.8em}.task_list.svelte-o8wpc2 tr.svelte-o8wpc2:nth-child(2n){background-color:#f8f8fe}.task_list.svelte-o8wpc2 td.svelte-o8wpc2{vertical-align:middle}#headAction.svelte-o8wpc2.svelte-o8wpc2{width:13em}td.text_right.svelte-o8wpc2.svelte-o8wpc2,th.text_right.svelte-o8wpc2.svelte-o8wpc2{padding-right:1em}",f(st.head,e)),X(this,t,kt,wt,d,{task:13})}}function _t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Et,jt,Ot=(Et=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==s(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},c),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,e,n),mount:i.bind(null,e,n),unmount:u.bind(null,e,n),update:a.bind(null,e,n)}};var c={component:null,domElementGetter:null,props:{}};function l(t){return Promise.resolve()}function i(t,e,n){var r=Object.keys(c),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),c=r();e.instance=new t.component(o(o({},s),{},{target:c,props:Object.assign({},n,t.props)}))}))}function u(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function a(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},Et(jt={exports:{}},jt.exports),jt.exports);const Pt=_t(Ot)({component:xt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:zt,mount:Bt,unmount:Dt}=Pt;t({bootstrap:zt,mount:Bt,unmount:Dt});t("Report",xt)}}}));
1
+ System.register(["@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n,o,r,i;return{setters:[function(t){e=t.getAttractions},function(t){n=t.attachment_notification,o=t.Request,r=t.currentRoles,i=t.settings}],execute:function(){t("version","0.2.37");function s(){}function l(t){return t()}function c(){return Object.create(null)}function a(t){t.forEach(l)}function u(t){return"function"==typeof t}function d(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function f(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return s;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function p(t,e){t.appendChild(e)}function m(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function g(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function v(t){return document.createTextNode(t)}function b(){return v(" ")}function y(){return v("")}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function w(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function x(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let j;function E(t){j=t}function O(){if(!j)throw new Error("Function called outside component initialization");return j}const z=[],P=[],B=[],C=[],D=Promise.resolve();let M=!1;function W(t){B.push(t)}function S(t){C.push(t)}let I=!1;const A=new Set;function N(){if(!I){I=!0;do{for(let t=0;t<z.length;t+=1){const e=z[t];E(e),G(e.$$)}for(E(null),z.length=0;P.length;)P.pop()();for(let t=0;t<B.length;t+=1){const e=B[t];A.has(e)||(A.add(e),e())}B.length=0}while(z.length);for(;C.length;)C.pop()();M=!1,I=!1,A.clear()}}function G(t){if(null!==t.fragment){t.update(),a(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(W)}}const T=new Set;let F;function L(){F={r:0,c:[],p:F}}function q(){F.r||a(F.c),F=F.p}function R(t,e){t&&t.i&&(T.delete(t),t.i(e))}function H(t,e,n,o){if(t&&t.o){if(T.has(t))return;T.add(t),F&&F.c.push((()=>{T.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function U(t,e){const n=e.token={};function o(t,o,r,i){if(e.token!==n)return;e.resolved=i;let s=e.ctx;void 0!==r&&(s=s.slice(),s[r]=i);const l=t&&(e.current=t)(s);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(L(),H(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),q())})):e.block.d(1),l.c(),R(l,1),l.m(e.mount(),e.anchor),c=!0),e.block=l,e.blocks&&(e.blocks[o]=l),c&&N()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=O();if(t.then((t=>{E(n),o(e.then,1,e.value,t),E(null)}),(t=>{if(E(n),o(e.catch,2,e.error,t),E(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}const K="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function V(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function J(t){t&&t.c()}function Q(t,e,n,o){const{fragment:r,on_mount:i,on_destroy:s,after_update:c}=t.$$;r&&r.m(e,n),o||W((()=>{const e=i.map(l).filter(u);s?s.push(...e):a(e),t.$$.on_mount=[]})),c.forEach(W)}function X(t,e){const n=t.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Y(t,e){-1===t.$$.dirty[0]&&(z.push(t),M||(M=!0,D.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,o,r,i,l=[-1]){const u=j;E(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:r,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:c(),dirty:l,skip_bound:!1};let f=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const i=o.length?o[0]:n;return d.ctx&&r(d.ctx[e],d.ctx[e]=i)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](i),f&&Y(t,e)),n})):[],d.update(),f=!0,a(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(h)}else d.fragment&&d.fragment.c();e.intro&&R(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),N()}E(u)}class tt{$destroy(){X(this,1),this.$destroy=s}$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 et(t){let e,n,o,r,i;return{c(){e=g("svg"),n=g("path"),o=g("line"),r=g("line"),w(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"),w(o,"x1","12"),w(o,"y1","9"),w(o,"x2","12"),w(o,"y2","13"),w(r,"x1","12"),w(r,"y1","17"),w(r,"x2","12.01"),w(r,"y2","17"),w(e,"xmlns","http://www.w3.org/2000/svg"),w(e,"width",t[0]),w(e,"height",t[0]),w(e,"fill","none"),w(e,"viewBox","0 0 24 24"),w(e,"stroke","currentColor"),w(e,"stroke-width",t[1]),w(e,"stroke-linecap","round"),w(e,"stroke-linejoin","round"),w(e,"class",i="feather feather-alert-triangle "+t[2])},m(t,i){m(t,e,i),p(e,n),p(e,o),p(e,r)},p(t,[n]){1&n&&w(e,"width",t[0]),1&n&&w(e,"height",t[0]),2&n&&w(e,"stroke-width",t[1]),4&n&&i!==(i="feather feather-alert-triangle "+t[2])&&w(e,"class",i)},i:s,o:s,d(t){t&&h(e)}}}function nt(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:i=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,i=t.class)},[o,r,i]}class ot extends tt{constructor(t){super(),Z(this,t,nt,et,d,{size:0,strokeWidth:1,class:2})}}function rt(t){let e,n,o,r,i;return{c(){e=g("svg"),n=g("path"),o=g("polyline"),r=g("line"),w(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),w(o,"points","7 10 12 15 17 10"),w(r,"x1","12"),w(r,"y1","15"),w(r,"x2","12"),w(r,"y2","3"),w(e,"xmlns","http://www.w3.org/2000/svg"),w(e,"width",t[0]),w(e,"height",t[0]),w(e,"fill","none"),w(e,"viewBox","0 0 24 24"),w(e,"stroke","currentColor"),w(e,"stroke-width",t[1]),w(e,"stroke-linecap","round"),w(e,"stroke-linejoin","round"),w(e,"class",i="feather feather-download "+t[2])},m(t,i){m(t,e,i),p(e,n),p(e,o),p(e,r)},p(t,[n]){1&n&&w(e,"width",t[0]),1&n&&w(e,"height",t[0]),2&n&&w(e,"stroke-width",t[1]),4&n&&i!==(i="feather feather-download "+t[2])&&w(e,"class",i)},i:s,o:s,d(t){t&&h(e)}}}function it(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:i=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,i=t.class)},[o,r,i]}class st extends tt{constructor(t){super(),Z(this,t,it,rt,d,{size:0,strokeWidth:1,class:2})}}function lt(t){let e,n,o,r;return{c(){e=g("svg"),n=g("polyline"),o=g("path"),w(n,"points","3 6 5 6 21 6"),w(o,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),w(e,"xmlns","http://www.w3.org/2000/svg"),w(e,"width",t[0]),w(e,"height",t[0]),w(e,"fill","none"),w(e,"viewBox","0 0 24 24"),w(e,"stroke","currentColor"),w(e,"stroke-width",t[1]),w(e,"stroke-linecap","round"),w(e,"stroke-linejoin","round"),w(e,"class",r="feather feather-trash "+t[2])},m(t,r){m(t,e,r),p(e,n),p(e,o)},p(t,[n]){1&n&&w(e,"width",t[0]),1&n&&w(e,"height",t[0]),2&n&&w(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-trash "+t[2])&&w(e,"class",r)},i:s,o:s,d(t){t&&h(e)}}}function ct(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:i=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,i=t.class)},[o,r,i]}class at extends tt{constructor(t){super(),Z(this,t,ct,lt,d,{size:0,strokeWidth:1,class:2})}}const{document:ut}=K;function dt(t,e,n){const o=t.slice();return o[37]=e[n],o[39]=n,o}function ft(t){let e;return{c(){e=$("div"),e.textContent="Dokument ersetzen"},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function pt(t){let e;return{c(){e=$("div"),e.textContent="Dokument wählen"},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function mt(t){let e;function n(t,e){return t[0]?ft:pt}let o=n(t),r=o(t);return{c(){r.c(),e=y()},m(t,n){r.m(t,n),m(t,e,n)},p(t,i){o!==(o=n(t))&&(r.d(1),r=o(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){r.d(t),t&&h(e)}}}function ht(t){let e,n,o,r,i,s,l,c,a,u,d,f,g,y,_,j;function E(e){t[26](e)}let O={placeholder:t[8],type:"text",id:"fileTitle",required:!0};return void 0!==t[4]&&(O.value=t[4]),u=new t[12]({props:O}),P.push((()=>V(u,"value",E))),g=new t[11]({props:{disabled:t[5],filled:!0,style:"color: whitesmoke;",type:"submit",$$slots:{default:[$t]},$$scope:{ctx:t}}}),{c(){e=$("div"),n=$("form"),o=$("div"),r=$("div"),i=v(t[6]),s=b(),l=$("div"),c=v(t[7]),a=b(),J(u.$$.fragment),f=b(),J(g.$$.fragment),w(r,"class","word-break svelte-15uidat"),w(o,"class","container-file svelte-15uidat"),w(n,"id","submitForm"),w(e,"class","form-step svelte-15uidat")},m(d,h){var $;m(d,e,h),p(e,n),p(n,o),p(o,r),p(r,i),p(o,s),p(o,l),p(l,c),p(o,a),Q(u,o,null),p(o,f),Q(g,o,null),y=!0,_||(j=k(n,"submit",($=t[13],function(t){return t.preventDefault(),$.call(this,t)})),_=!0)},p(t,e){(!y||64&e[0])&&x(i,t[6]),(!y||128&e[0])&&x(c,t[7]);const n={};256&e[0]&&(n.placeholder=t[8]),!d&&16&e[0]&&(d=!0,n.value=t[4],S((()=>d=!1))),u.$set(n);const o={};32&e[0]&&(o.disabled=t[5]),512&e[1]&&(o.$$scope={dirty:e,ctx:t}),g.$set(o)},i(t){y||(R(u.$$.fragment,t),R(g.$$.fragment,t),y=!0)},o(t){H(u.$$.fragment,t),H(g.$$.fragment,t),y=!1},d(t){t&&h(e),X(u),X(g),_=!1,j()}}}function $t(t){let e;return{c(){e=v("Dokument hochladen")},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function gt(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function vt(t){let e,n,o,r,i,s,l,c;const a=[yt,bt],u=[];function d(t,e){return 0===t[36].length?0:1}return s=d(t),l=u[s]=a[s](t),{c(){e=$("div"),n=$("table"),o=$("thead"),o.innerHTML='<tr class="svelte-15uidat"><th class="svelte-15uidat">#</th> \n <th class="svelte-15uidat">Datei</th> \n <th class="text_right svelte-15uidat">Grösse</th> \n <th id="headAction" class="svelte-15uidat">Aktionen</th></tr>',r=b(),i=$("tbody"),l.c(),w(o,"class","tablehead"),w(n,"class","tableFixHead"),w(e,"class","task_list svelte-15uidat")},m(t,l){m(t,e,l),p(e,n),p(n,o),p(n,r),p(n,i),u[s].m(i,null),c=!0},p(t,e){let n=s;s=d(t),s===n?u[s].p(t,e):(L(),H(u[n],1,1,(()=>{u[n]=null})),q(),l=u[s],l?l.p(t,e):(l=u[s]=a[s](t),l.c()),R(l,1),l.m(i,null))},i(t){c||(R(l),c=!0)},o(t){H(l),c=!1},d(t){t&&h(e),u[s].d()}}}function bt(t){let e,n,o=t[36],r=[];for(let e=0;e<o.length;e+=1)r[e]=xt(dt(t,o,e));const i=t=>H(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=y()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);m(t,e,o),n=!0},p(t,n){if(32804&n[0]){let s;for(o=t[36],s=0;s<o.length;s+=1){const i=dt(t,o,s);r[s]?(r[s].p(i,n),R(r[s],1)):(r[s]=xt(i),r[s].c(),R(r[s],1),r[s].m(e.parentNode,e))}for(L(),s=o.length;s<r.length;s+=1)i(s);q()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)R(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)H(r[t]);n=!1},d(t){!function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(r,t),t&&h(e)}}}function yt(t){let e;return{c(){e=$("tr"),e.innerHTML='<td colspan="4" style="text-align: center;" class="svelte-15uidat">Keine Dokumente gefunden</td>',w(e,"class","svelte-15uidat")},m(t,n){m(t,e,n)},p:s,i:s,o:s,d(t){t&&h(e)}}}function kt(t){let e,n,o,r;return n=new st({props:{size:"18"}}),{c(){e=$("a"),J(n.$$.fragment),w(e,"href",o="/api/userreport/"+t[37]._id+"?h="+window.location.hostname),_(e,"color","whitesmoke")},m(t,o){m(t,e,o),Q(n,e,null),r=!0},p(t,n){(!r||4&n[0]&&o!==(o="/api/userreport/"+t[37]._id+"?h="+window.location.hostname))&&w(e,"href",o)},i(t){r||(R(n.$$.fragment,t),r=!0)},o(t){H(n.$$.fragment,t),r=!1},d(t){t&&h(e),X(n)}}}function wt(t){let e,n;return e=new at({props:{size:"18"}}),{c(){J(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p:s,i(t){n||(R(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function xt(t){let e,n,o,r,i,s,l,c,a,u,d,f,g,y,k,j,E=t[39]+1+"",O=t[37].title+"",z=Ct(t[37].sizeInByte)+"";return f=new t[11]({props:{small:!0,filled:!0,style:"display: inline;",$$slots:{default:[kt]},$$scope:{ctx:t}}}),y=new t[11]({props:{disabled:t[5],small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[wt]},$$scope:{ctx:t}}}),y.$on("click",(function(){return t[27](t[37])})),{c(){e=$("tr"),n=$("td"),o=v(E),r=b(),i=$("td"),s=v(O),l=b(),c=$("td"),a=v(z),u=b(),d=$("td"),J(f.$$.fragment),g=b(),J(y.$$.fragment),k=b(),w(n,"class","svelte-15uidat"),_(i,"max-width","30em"),w(i,"class","svelte-15uidat"),w(c,"class","text_right svelte-15uidat"),w(d,"class","svelte-15uidat"),w(e,"class","svelte-15uidat")},m(t,h){m(t,e,h),p(e,n),p(n,o),p(e,r),p(e,i),p(i,s),p(e,l),p(e,c),p(c,a),p(e,u),p(e,d),Q(f,d,null),p(d,g),Q(y,d,null),p(e,k),j=!0},p(e,n){t=e,(!j||4&n[0])&&O!==(O=t[37].title+"")&&x(s,O),(!j||4&n[0])&&z!==(z=Ct(t[37].sizeInByte)+"")&&x(a,z);const o={};4&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),f.$set(o);const r={};32&n[0]&&(r.disabled=t[5]),512&n[1]&&(r.$$scope={dirty:n,ctx:t}),y.$set(r)},i(t){j||(R(f.$$.fragment,t),R(y.$$.fragment,t),j=!0)},o(t){H(f.$$.fragment,t),H(y.$$.fragment,t),j=!1},d(t){t&&h(e),X(f),X(y)}}}function _t(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function jt(t){let e;return{c(){e=v("Abbrechen")},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function Et(t){let e;return{c(){e=v("Löschen")},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function Ot(t){let e,n,o,r,i,s,l;return r=new t[11]({props:{filled:!0,$$slots:{default:[jt]},$$scope:{ctx:t}}}),r.$on("click",t[28]),s=new t[11]({props:{danger:!0,outline:!0,$$slots:{default:[Et]},$$scope:{ctx:t}}}),s.$on("click",t[29]),{c(){e=$("p"),e.textContent="Willst du das Dokument wirklich löschen?",n=b(),o=$("div"),J(r.$$.fragment),i=b(),J(s.$$.fragment),w(o,"class","flex_div svelte-15uidat")},m(t,c){m(t,e,c),m(t,n,c),m(t,o,c),Q(r,o,null),p(o,i),Q(s,o,null),l=!0},p(t,e){const n={};512&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};512&e[1]&&(o.$$scope={dirty:e,ctx:t}),s.$set(o)},i(t){l||(R(r.$$.fragment,t),R(s.$$.fragment,t),l=!0)},o(t){H(r.$$.fragment,t),H(s.$$.fragment,t),l=!1},d(t){t&&h(e),t&&h(n),t&&h(o),X(r),X(s)}}}function zt(t){let e,n,o;return n=new ot({props:{size:"25"}}),{c(){e=$("div"),J(n.$$.fragment),w(e,"slot","title-icon")},m(t,r){m(t,e,r),Q(n,e,null),o=!0},p:s,i(t){o||(R(n.$$.fragment,t),o=!0)},o(t){H(n.$$.fragment,t),o=!1},d(t){t&&h(e),X(n)}}}function Pt(t){let e,n;return e=new t[10]({props:{title:"Bestätigung",closeCallback:t[35],danger:!0,$$slots:{"title-icon":[zt],default:[Ot]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,n){const o={};16&n[1]&&(o.closeCallback=t[35]),512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(R(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function Bt(t){let e,n,o,r,i,s,l,c,a,u,d,f,g,v,y;r=new t[11]({props:{class:"btn-document btn-document-primary",filled:!0,disabled:t[5],$$slots:{default:[mt]},$$scope:{ctx:t}}}),r.$on("click",t[23]);let x=t[0]&&ht(t),j={ctx:t,current:null,token:null,hasCatch:!1,pending:_t,then:vt,catch:gt,value:36,blocks:[,,,]};function E(e){t[30](e)}U(a=t[2],j);let O={$$slots:{default:[Pt,({closeCallback:t})=>({35:t}),({closeCallback:t})=>[0,t?16:0]]},$$scope:{ctx:t}};return void 0!==t[1]&&(O.open=t[1]),d=new t[9]({props:O}),P.push((()=>V(d,"open",E))),{c(){e=$("div"),n=$("form"),o=$("div"),J(r.$$.fragment),i=b(),s=$("input"),l=b(),x&&x.c(),c=b(),j.block.c(),u=b(),J(d.$$.fragment),w(s,"type","file"),w(s,"accept",".pdf"),w(s,"id","fileInput"),s.required=!0,_(s,"display","none"),w(o,"class","document-choose svelte-15uidat"),w(n,"id","uploadForm"),w(e,"class","form-step svelte-15uidat")},m(a,f){m(a,e,f),p(e,n),p(n,o),Q(r,o,null),p(o,i),p(o,s),t[25](s),m(a,l,f),x&&x.m(a,f),m(a,c,f),j.block.m(a,j.anchor=f),j.mount=()=>u.parentNode,j.anchor=u,m(a,u,f),Q(d,a,f),g=!0,v||(y=k(s,"change",t[24]),v=!0)},p(e,n){t=e;const o={};32&n[0]&&(o.disabled=t[5]),1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),r.$set(o),t[0]?x?(x.p(t,n),1&n[0]&&R(x,1)):(x=ht(t),x.c(),R(x,1),x.m(c.parentNode,c)):x&&(L(),H(x,1,1,(()=>{x=null})),q()),j.ctx=t,4&n[0]&&a!==(a=t[2])&&U(a,j)||function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(j,t,n);const i={};528&n[1]&&(i.$$scope={dirty:n,ctx:t}),!f&&2&n[0]&&(f=!0,i.open=t[1],S((()=>f=!1))),d.$set(i)},i(t){g||(R(r.$$.fragment,t),R(x),R(j.block),R(d.$$.fragment,t),g=!0)},o(t){H(r.$$.fragment,t),H(x);for(let t=0;t<3;t+=1){H(j.blocks[t])}H(d.$$.fragment,t),g=!1},d(n){n&&h(e),X(r),t[25](null),n&&h(l),x&&x.d(n),n&&h(c),j.block.d(n),j.token=null,j=null,n&&h(u),X(d,n),v=!1,y()}}}function Ct(t){if(t>=1073741824)t=Math.round(t/1073741824*100)/100+" GB";else if(t>=1048576){t=Math.round(t/1048576*100)/100+" MB"}else if(t>=1024){t=Math.round(t/1024*100)/100+" KB"}else t>1?t+=" bytes":1==t?t+=" byte":t="0 bytes";return t}function Dt(t,s,l){let c,a,u,d,p,m;f(t,r,(t=>l(21,p=t))),f(t,i,(t=>l(22,m=t)));const{Modal:h,Dialog:$,Button:g,Divider:v,TextField:b}=e;let y,k,w,x,_,j,{task:E}=s,O=!1,z=[],B=E.task?.readonly;const C=async()=>{const t=await E;l(19,w=await o.getSchema(t.event)),k=t.task.id;return await o.getUserReports(k)};z=C();const D=()=>{let t=x.files[0];l(4,j=t?t.name.split(".").slice(0,-1).join("."):""),l(0,_=t)},M=t=>{l(1,O=!0),y=t},W=()=>{l(1,O=!1),y=""};function S(){o.deleteUserReport(y).then((()=>{l(1,O=!1),y=""}))}n.subscribe((t=>{t&&t.taskId===k&&l(2,z=C())}));return t.$$set=t=>{"task"in t&&l(18,E=t.task)},t.$$.update=()=>{if(8126464&t.$$.dirty[0]&&w&&E.task&&p&&m.role?.length&&w.authorization?.length){const t=w.authorization.some((t=>p?.find((e=>e===t.role&&"edit"===t.activity))));l(20,B||=!t)}1048576&t.$$.dirty[0]&&l(5,c=B),1&t.$$.dirty[0]&&l(6,a=_?_.name:""),1&t.$$.dirty[0]&&l(7,u=_?Ct(_.size):""),1&t.$$.dirty[0]&&l(8,d=_?_.name.split(".").slice(0,-1).join("."):"")},[_,O,z,x,j,c,a,u,d,h,$,g,b,function(){if(!_||!d)return;const t=new FormData;t.append("title",j),t.append("file",_),o.uploadUserReport(k,t).then((()=>{document.getElementById("submitForm").reset(),l(0,_=null)}))},D,M,W,S,E,w,B,p,m,()=>{x.click()},()=>D(),function(t){P[t?"unshift":"push"]((()=>{x=t,l(3,x)}))},function(t){j=t,l(4,j)},t=>M(t._id),()=>W(),()=>S(),function(t){O=t,l(1,O)}]}class Mt extends tt{constructor(t){var e;super(),ut.getElementById("svelte-15uidat-style")||((e=$("style")).id="svelte-15uidat-style",e.textContent=".form-step.svelte-15uidat .document-choose.svelte-15uidat{margin:1em}.form-step.svelte-15uidat .btn-document{width:300px;text-align:center}.form-step.svelte-15uidat .btn-document div{margin-inline:auto}.form-step.svelte-15uidat .btn-document-primary{color:#fff}.form-step.svelte-15uidat .btn-document-secondary{background-color:#91BDD9}.form-step.svelte-15uidat .container-file.svelte-15uidat{display:grid;gap:1em;grid-template-columns:218px 100px 2fr 1fr;align-items:center}.form-step.svelte-15uidat .word-break.svelte-15uidat{word-break:break-all}.task_list.svelte-15uidat.svelte-15uidat{flex:auto;overflow-y:scroll;overflow-x:hidden;width:99%;height:30em;border:1px solid #ccc;border-radius:0.5em;margin-top:2em}.task_list.svelte-15uidat th.svelte-15uidat{padding:0.8em}.task_list.svelte-15uidat td.svelte-15uidat{padding:0.8em}.task_list.svelte-15uidat tr.svelte-15uidat:nth-child(2n){background-color:#f8f8fe}.flex_div.svelte-15uidat.svelte-15uidat{display:flex;margin-top:1em;justify-content:space-between}.task_list.svelte-15uidat td.svelte-15uidat{vertical-align:middle}#headAction.svelte-15uidat.svelte-15uidat{width:13em}td.text_right.svelte-15uidat.svelte-15uidat,th.text_right.svelte-15uidat.svelte-15uidat{padding-right:1em}",p(ut.head,e)),Z(this,t,Dt,Bt,d,{task:18},[-1,-1])}}function Wt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var St,It,At=(St=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){return i="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},i(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==i(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},s),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,e,n),mount:c.bind(null,e,n),unmount:a.bind(null,e,n),update:u.bind(null,e,n)}};var s={component:null,domElementGetter:null,props:{}};function l(t){return Promise.resolve()}function c(t,e,n){var r=Object.keys(s),i=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),s=r();e.instance=new t.component(o(o({},i),{},{target:s,props:Object.assign({},n,t.props)}))}))}function a(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)}))}},St(It={exports:{}},It.exports),It.exports);const Nt=Wt(At)({component:Mt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Gt,mount:Tt,unmount:Ft}=Nt;t({bootstrap:Gt,mount:Tt,unmount:Ft});t("Report",Mt)}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/report",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.35",
4
+ "version": "0.2.37",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"