@enablerr-ui/report 0.2.36 → 0.2.38
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"],(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.36");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 w(){return v(" ")}function b(){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=b()},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,b,_,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=w(),l=$("div"),i=v(t[6]),u=w(),K(a.$$.fragment),p=w(),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),b=!0,_||(E=y(n,"submit",($=t[10],function(t){return t.preventDefault(),$.call(this,t)})),_=!0)},p(t,e){(!b||32&e)&&x(s,t[5]),(!b||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){b||(R(a.$$.fragment,t),R(g.$$.fragment,t),b=!0)},o(t){H(a.$$.fragment,t),H(g.$$.fragment,t),b=!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=w(),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=b()},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+"?h="+window.location.hostname),_(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+"?h="+window.location.hostname))&&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,b,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}}}),b=new t[8]({props:{disabled:t[4],small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[gt]},$$scope:{ctx:t}}}),b.$on("click",(function(){return t[22](t[27])})),{c(){e=$("tr"),n=$("td"),o=v(j),r=w(),s=$("td"),c=v(O),l=w(),i=$("td"),u=v(P),a=w(),d=$("td"),K(p.$$.fragment),g=w(),K(b.$$.fragment),y=w(),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(b,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}),b.$set(r)},i(t){E||(R(p.$$.fragment,t),R(b.$$.fragment,t),E=!0)},o(t){H(p.$$.fragment,t),H(b.$$.fragment,t),E=!1},d(t){t&&h(e),J(p),J(b)}}}function wt(t){return{c:c,m:c,p:c,i:c,o:c,d:c}}function bt(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:wt,then:ft,catch:pt,value:26,blocks:[,,,]};return L(a=t[1],x),{c(){e=$("div"),n=$("form"),o=$("div"),K(r.$$.fragment),s=w(),c=$("input"),l=w(),v&&v.c(),i=w(),u=b(),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,w,b,y,k,{task:x}=c,_=[],E=x.task?.readonly;const j=async()=>{const t=await x;l(14,w=await o.getSchema(t.event)),v=t.task.id;return await o.getUserReports(v)};_=j();const O=()=>{let t=b.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&&w&&x.task&&f&&m.role?.length&&w.authorization?.length){const t=w.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,_,b,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,w,E,f,m,()=>{b.click()},()=>O(),function(t){z[t?"unshift":"push"]((()=>{b=t,l(2,b)}))},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,bt,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(e){"use strict";var t,n,o,l,r;return{setters:[function(e){t=e.getAttractions},function(e){n=e.attachment_notification,o=e.Request,l=e.currentRoles,r=e.settings}],execute:function(){e("version","0.2.38");function s(){}function i(e,t){for(const n in t)e[n]=t[n];return e}function c(e){return e()}function a(){return Object.create(null)}function u(e){e.forEach(c)}function d(e){return"function"==typeof e}function f(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function p(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return s;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function m(e,t,n,o){if(e){const l=g(e,t,n,o);return e[0](l)}}function g(e,t,n,o){return e[1]&&o?i(n.ctx.slice(),e[1](o(t))):n.ctx}function h(e,t,n,o,l,r,s){const i=function(e,t,n,o){if(e[2]&&o){const l=e[2](o(n));if(void 0===t.dirty)return l;if("object"==typeof l){const e=[],n=Math.max(t.dirty.length,l.length);for(let o=0;o<n;o+=1)e[o]=t.dirty[o]|l[o];return e}return t.dirty|l}return t.dirty}(t,o,l,r);if(i){const l=g(t,n,o,s);e.p(l,i)}}function $(e,t){const n={};t=new Set(t);for(const o in e)t.has(o)||"$"===o[0]||(n[o]=e[o]);return n}function y(e){return null==e?"":e}function v(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function w(e){e.parentNode.removeChild(e)}function x(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function k(e){return document.createElement(e)}function z(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function _(e){return document.createTextNode(e)}function C(){return _(" ")}function E(){return _("")}function j(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function O(e){return function(t){return t.preventDefault(),e.call(this,t)}}function B(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function L(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function M(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const o in t)null==t[o]?e.removeAttribute(o):"style"===o?e.style.cssText=t[o]:"__value"===o?e.value=e[o]=t[o]:n[o]&&n[o].set?e[o]=t[o]:L(e,o,t[o])}function T(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function P(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function W(e,t,n){e.classList[n?"add":"remove"](t)}let D;function R(e){D=e}function S(){if(!D)throw new Error("Function called outside component initialization");return D}function I(){const e=S();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const l=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,l)}))}}}const N=[],A=[],F=[],G=[],H=Promise.resolve();let q=!1;function U(e){F.push(e)}function V(e){G.push(e)}let K=!1;const X=new Set;function Y(){if(!K){K=!0;do{for(let e=0;e<N.length;e+=1){const t=N[e];R(t),J(t.$$)}for(R(null),N.length=0;A.length;)A.pop()();for(let e=0;e<F.length;e+=1){const t=F[e];X.has(t)||(X.add(t),t())}F.length=0}while(N.length);for(;G.length;)G.pop()();q=!1,K=!1,X.clear()}}function J(e){if(null!==e.fragment){e.update(),u(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(U)}}const Q=new Set;let Z;function ee(){Z={r:0,c:[],p:Z}}function te(){Z.r||u(Z.c),Z=Z.p}function ne(e,t){e&&e.i&&(Q.delete(e),e.i(t))}function oe(e,t,n,o){if(e&&e.o){if(Q.has(e))return;Q.add(e),Z&&Z.c.push((()=>{Q.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function le(e,t){const n=t.token={};function o(e,o,l,r){if(t.token!==n)return;t.resolved=r;let s=t.ctx;void 0!==l&&(s=s.slice(),s[l]=r);const i=e&&(t.current=e)(s);let c=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ee(),oe(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),te())})):t.block.d(1),i.c(),ne(i,1),i.m(t.mount(),t.anchor),c=!0),t.block=i,t.blocks&&(t.blocks[o]=i),c&&Y()}if((l=e)&&"object"==typeof l&&"function"==typeof l.then){const n=S();if(e.then((e=>{R(n),o(t.then,1,t.value,e),R(null)}),(e=>{if(R(n),o(t.catch,2,t.error,e),R(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var l}function re(e,t){oe(e,1,1,(()=>{t.delete(e.key)}))}function se(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ie(e){e&&e.c()}function ce(e,t,n,o){const{fragment:l,on_mount:r,on_destroy:s,after_update:i}=e.$$;l&&l.m(t,n),o||U((()=>{const t=r.map(c).filter(d);s?s.push(...t):u(t),e.$$.on_mount=[]})),i.forEach(U)}function ae(e,t){const n=e.$$;null!==n.fragment&&(u(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ue(e,t){-1===e.$$.dirty[0]&&(N.push(e),q||(q=!0,H.then(Y)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function de(e,t,n,o,l,r,i=[-1]){const c=D;R(e);const d=e.$$={fragment:null,ctx:null,props:r,update:s,not_equal:l,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:t.context||[]),callbacks:a(),dirty:i,skip_bound:!1};let f=!1;if(d.ctx=n?n(e,t.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&l(d.ctx[t],d.ctx[t]=r)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](r),f&&ue(e,t)),n})):[],d.update(),f=!0,u(d.before_update),d.fragment=!!o&&o(d.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);d.fragment&&d.fragment.l(e),e.forEach(w)}else d.fragment&&d.fragment.c();t.intro&&ne(e.$$.fragment),ce(e,t.target,t.anchor,t.customElement),Y()}R(c)}class fe{$destroy(){ae(this,1),this.$destroy=s}$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)}}function pe(e){let t,n,o,l,r;return{c(){t=z("svg"),n=z("path"),o=z("line"),l=z("line"),L(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"),L(o,"x1","12"),L(o,"y1","9"),L(o,"x2","12"),L(o,"y2","13"),L(l,"x1","12"),L(l,"y1","17"),L(l,"x2","12.01"),L(l,"y2","17"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",r="feather feather-alert-triangle "+e[2])},m(e,r){b(e,t,r),v(t,n),v(t,o),v(t,l)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-alert-triangle "+e[2])&&L(t,"class",r)},i:s,o:s,d(e){e&&w(t)}}}function me(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=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,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class ge extends fe{constructor(e){super(),de(this,e,me,pe,f,{size:0,strokeWidth:1,class:2})}}function he(e){let t,n,o,l,r;return{c(){t=z("svg"),n=z("path"),o=z("polyline"),l=z("line"),L(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),L(o,"points","7 10 12 15 17 10"),L(l,"x1","12"),L(l,"y1","15"),L(l,"x2","12"),L(l,"y2","3"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",r="feather feather-download "+e[2])},m(e,r){b(e,t,r),v(t,n),v(t,o),v(t,l)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-download "+e[2])&&L(t,"class",r)},i:s,o:s,d(e){e&&w(t)}}}function $e(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=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,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class ye extends fe{constructor(e){super(),de(this,e,$e,he,f,{size:0,strokeWidth:1,class:2})}}function ve(e){let t,n,o,l;return{c(){t=z("svg"),n=z("polyline"),o=z("path"),L(n,"points","3 6 5 6 21 6"),L(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"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",l="feather feather-trash "+e[2])},m(e,l){b(e,t,l),v(t,n),v(t,o)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-trash "+e[2])&&L(t,"class",l)},i:s,o:s,d(e){e&&w(t)}}}function be(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=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,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class we extends fe{constructor(e){super(),de(this,e,be,ve,f,{size:0,strokeWidth:1,class:2})}}function xe(e){let t,n,o,l,r;return{c(){t=z("svg"),n=z("path"),o=z("polyline"),l=z("line"),L(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),L(o,"points","17 8 12 3 7 8"),L(l,"x1","12"),L(l,"y1","3"),L(l,"x2","12"),L(l,"y2","15"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",r="feather feather-upload "+e[2])},m(e,r){b(e,t,r),v(t,n),v(t,o),v(t,l)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-upload "+e[2])&&L(t,"class",r)},i:s,o:s,d(e){e&&w(t)}}}function ke(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=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,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class ze extends fe{constructor(e){super(),de(this,e,ke,xe,f,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n;return{c(){t=z("svg"),n=z("path"),L(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"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width","24"),L(t,"height","24"),L(t,"viewBox","0 0 24 24"),L(t,"fill","none"),L(t,"stroke","currentColor"),L(t,"stroke-width","2"),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round")},m(e,o){b(e,t,o),v(t,n)},p:s,i:s,o:s,d(e){e&&w(t)}}}class Ce extends fe{constructor(e){super(),de(this,e,null,_e,f,{})}}function Ee(...e){return e.filter((e=>!!e)).join(" ")}function je(e){let t,n,o,l;return{c(){t=z("svg"),n=z("line"),o=z("line"),L(n,"x1","12"),L(n,"y1","5"),L(n,"x2","12"),L(n,"y2","19"),L(o,"x1","5"),L(o,"y1","12"),L(o,"x2","19"),L(o,"y2","12"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width","24"),L(t,"height","24"),L(t,"viewBox","0 0 24 24"),L(t,"fill","none"),L(t,"stroke","currentColor"),L(t,"stroke-width","2"),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",l=Ee(e[0]))},m(e,l){b(e,t,l),v(t,n),v(t,o)},p(e,[n]){1&n&&l!==(l=Ee(e[0]))&&L(t,"class",l)},i:s,o:s,d(e){e&&w(t)}}}function Oe(e,t,n){let{class:o=null}=t;return e.$$set=e=>{"class"in e&&n(0,o=e.class)},[o]}class Be extends fe{constructor(e){super(),de(this,e,Oe,je,f,{class:0})}}function Le(e,t={}){const n={event:t.event||"click",transition:t.transition||150,zIndex:t.zIndex||"100",bg:t.rippleColor||null,disabled:t.disabled||!1},o=t=>function(e,t,{bg:n,zIndex:o,transition:l}){const r=parseInt(getComputedStyle(t).borderWidth.replace("px","")),s=t.getBoundingClientRect(),i=s.left,c=s.top,a=t.offsetWidth,u=t.offsetHeight,d=e.clientX-i,f=e.clientY-c,p=Math.max(d,a-d),m=Math.max(f,u-f),g=window.getComputedStyle(t),h=Math.sqrt(p*p+m*m),$=r>0?r:0,y=document.createElement("div"),v=document.createElement("div");v.className="ripple-container",y.className="ripple",y.style.marginTop="0px",y.style.marginLeft="0px",y.style.width="1px",y.style.height="1px",y.style.transition=`all ${l}ms cubic-bezier(0.4, 0, 0.2, 1)`,y.style.borderRadius="50%",y.style.pointerEvents="none",y.style.position="relative",y.style.zIndex=o,null!==n&&(y.style.backgroundColor=n);v.style.position="absolute",v.style.left=0-$+"px",v.style.top=0-$+"px",v.style.height="0",v.style.width="0",v.style.pointerEvents="none",v.style.overflow="hidden";const b=t.style.position.length>0?t.style.position:getComputedStyle(t).position;"relative"!==b&&"absolute"!==b&&(t.style.position="relative");function w(){setTimeout((()=>{y.style.backgroundColor="rgba(0, 0, 0, 0)"}),250),setTimeout((()=>{v.parentNode.removeChild(v)}),l+250),setTimeout((()=>{let e=!0;for(let n=0;n<t.childNodes.length;n++)"ripple-container"===t.childNodes[n].className&&(e=!1);e&&(t.style.position="static"!==b?b:"")}),l+250)}v.appendChild(y),t.appendChild(v),y.style.marginLeft=d+"px",y.style.marginTop=f+"px",v.style.width=a+"px",v.style.height=u+"px",v.style.borderTopLeftRadius=g.borderTopLeftRadius,v.style.borderTopRightRadius=g.borderTopRightRadius,v.style.borderBottomLeftRadius=g.borderBottomLeftRadius,v.style.borderBottomRightRadius=g.borderBottomRightRadius,v.style.direction="ltr",setTimeout((()=>{y.style.width=2*h+"px",y.style.height=2*h+"px",y.style.marginLeft=d-h+"px",y.style.marginTop=f-h+"px"}),0),w()}(t,e,n);return n.disabled||e.addEventListener(n.event,o),{destroy(){e.removeEventListener(n.event,o)},update(t={}){t.disabled?e.removeEventListener(n.event,o):e.addEventListener(n.event,o)}}}function Me(e,t){if(null==e)return!0;return e.split(",").map((e=>e.trim().toLowerCase())).some((e=>function(e,t){if(t.name&&e.startsWith("."))return t.name.toLowerCase().endsWith(e);return function(e,t){if("*"===e||"*/*"===e)return!0;const n=e.split("*");if(1===n.length)return e===t;if(2!==n.length)return!1;return t.startsWith(n[0])&&t.endsWith(n[1])}(e.toLowerCase(),(t.type||"").toLowerCase())}(e,t)))}function Te(e,t,n){const o=e.slice();return o[27]=t[n],o}const Pe=e=>({}),We=e=>({}),De=e=>({}),Re=e=>({}),Se=e=>({}),Ie=e=>({}),Ne=e=>({}),Ae=e=>({}),Fe=e=>({}),Ge=e=>({}),He=e=>({wrongType:128&e,dragActive:64&e}),qe=e=>({wrongType:e[7],dragActive:e[6]});function Ue(e){let t;const n=e[18]["drag-and-drop-message"],o=m(n,e,e[17],Re),l=o||function(e){let t;return{c(){t=_("drag & drop here or click to upload files")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,De,Re)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Ve(e){let t;const n=e[18]["release-to-upload-message"],o=m(n,e,e[17],Ie),l=o||function(e){let t;return{c(){t=_("release to upload")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Se,Ie)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Ke(e){let t;const n=e[18]["incorrect-file-message"],o=m(n,e,e[17],Ae),l=o||function(e){let t;return{c(){t=_("incorrect file type")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Ne,Ae)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Xe(e){let t;const n=e[18]["upload-unavailable-message"],o=m(n,e,e[17],Ge),l=o||function(e){let t;return{c(){t=_("file upload unavailable")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Fe,Ge)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Ye(e){let t;const n=e[18]["more-icon"],o=m(n,e,e[17],We),l=o||function(e){let t,n;return t=new Be({props:{class:"plus"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Pe,We)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Je(e,t){let n,o,l,r;var s=t[2];function i(e){return{props:{file:e[27]}}}return s&&(o=new s(i(t)),o.$on("delete",t[13])),{key:e,first:null,c(){n=E(),o&&ie(o.$$.fragment),l=E(),this.first=n},m(e,t){b(e,n,t),o&&ce(o,e,t),b(e,l,t),r=!0},p(e,n){t=e;const r={};if(1&n&&(r.file=t[27]),s!==(s=t[2])){if(o){ee();const e=o;oe(e.$$.fragment,1,0,(()=>{ae(e,1)})),te()}s?(o=new s(i(t)),o.$on("delete",t[13]),ie(o.$$.fragment),ne(o.$$.fragment,1),ce(o,l.parentNode,l)):o=null}else s&&o.$set(r)},i(e){r||(o&&ne(o.$$.fragment,e),r=!0)},o(e){o&&oe(o.$$.fragment,e),r=!1},d(e){e&&w(n),e&&w(l),o&&ae(o,e)}}}function Qe(e){let t,n,o,l,r,c,a,f,p,g,$,x,z,_=[],E=new Map,T=[{type:"file"},{multiple:!0},{accept:e[3]},{disabled:o=e[4]||e[0].length>=e[5]},e[15]],P={};for(let e=0;e<T.length;e+=1)P=i(P,T[e]);const D=e[18]["empty-layer"],R=m(D,e,e[17],qe),S=R||function(e){let t,n,o,l,r,s;t=new Ce({props:{class:"icon"}});const i=[Xe,Ke,Ve,Ue],c=[];function a(e,t){return e[4]?0:e[7]?1:e[6]?2:3}return l=a(e),r=c[l]=i[l](e),{c(){ie(t.$$.fragment),n=C(),o=k("div"),r.c(),L(o,"class","title svelte-11deuuc")},m(e,r){ce(t,e,r),b(e,n,r),b(e,o,r),c[l].m(o,null),s=!0},p(e,t){let n=l;l=a(e),l===n?c[l].p(e,t):(ee(),oe(c[n],1,1,(()=>{c[n]=null})),te(),r=c[l],r?r.p(e,t):(r=c[l]=i[l](e),r.c()),ne(r,1),r.m(o,null))},i(e){s||(ne(t.$$.fragment,e),ne(r),s=!0)},o(e){oe(t.$$.fragment,e),oe(r),s=!1},d(e){ae(t,e),e&&w(n),e&&w(o),c[l].d()}}}(e);let I=e[0].length<e[5]&&Ye(e),N=e[0];const A=e=>`${e[27].name}-${e[27].lastModified}`;for(let t=0;t<N.length;t+=1){let n=Te(e,N,t),o=A(n);E.set(o,_[t]=Je(o,n))}return{c(){t=k("label"),n=k("input"),l=C(),r=k("div"),S&&S.c(),c=C(),a=k("div"),I&&I.c(),p=C();for(let e=0;e<_.length;e+=1)_[e].c();M(n,P),W(n,"svelte-11deuuc",!0),L(r,"class","empty-layer svelte-11deuuc"),L(a,"class","dropzone-layer svelte-11deuuc"),W(a,"accepting",e[6]),L(t,"class",g=y(Ee("file-dropzone",e[1]))+" svelte-11deuuc"),W(t,"has-content",e[0]&&0!==e[0].length),W(t,"wrong-type",e[7]),W(t,"disabled",e[4]||e[0].length>=e[5])},m(o,i){b(o,t,i),v(t,n),e[19](n),v(t,l),v(t,r),S&&S.m(r,null),e[20](r),v(t,c),v(t,a),I&&I.m(a,null),e[21](a),v(t,p);for(let e=0;e<_.length;e+=1)_[e].m(t,null);var u;$=!0,x||(z=[j(n,"change",e[12]),j(a,"dragover",B(O(e[11]))),j(a,"dragenter",e[22]),j(a,"dragleave",e[23]),j(a,"drop",B(O(e[12]))),(u=f=Le.call(null,a,{disabled:e[4]||e[0].length>=e[5]}),u&&d(u.destroy)?u.destroy:s),j(t,"click",e[14])],x=!0)},p(e,[l]){M(n,P=function(e,t){const n={},o={},l={$$scope:1};let r=e.length;for(;r--;){const s=e[r],i=t[r];if(i){for(const e in s)e in i||(o[e]=1);for(const e in i)l[e]||(n[e]=i[e],l[e]=1);e[r]=i}else for(const e in s)l[e]=1}for(const e in o)e in n||(n[e]=void 0);return n}(T,[{type:"file"},{multiple:!0},(!$||8&l)&&{accept:e[3]},(!$||49&l&&o!==(o=e[4]||e[0].length>=e[5]))&&{disabled:o},32768&l&&e[15]])),W(n,"svelte-11deuuc",!0),R?R.p&&(!$||131264&l)&&h(R,D,e,e[17],l,He,qe):S&&S.p&&131280&l&&S.p(e,l),e[0].length<e[5]?I?(I.p(e,l),33&l&&ne(I,1)):(I=Ye(e),I.c(),ne(I,1),I.m(a,null)):I&&(ee(),oe(I,1,1,(()=>{I=null})),te()),f&&d(f.update)&&49&l&&f.update.call(null,{disabled:e[4]||e[0].length>=e[5]}),64&l&&W(a,"accepting",e[6]),8197&l&&(N=e[0],ee(),_=function(e,t,n,o,l,r,s,i,c,a,u,d){let f=e.length,p=r.length,m=f;const g={};for(;m--;)g[e[m].key]=m;const h=[],$=new Map,y=new Map;for(m=p;m--;){const e=d(l,r,m),i=n(e);let c=s.get(i);c?o&&c.p(e,t):(c=a(i,e),c.c()),$.set(i,h[m]=c),i in g&&y.set(i,Math.abs(m-g[i]))}const v=new Set,b=new Set;function w(e){ne(e,1),e.m(i,u),s.set(e.key,e),u=e.first,p--}for(;f&&p;){const t=h[p-1],n=e[f-1],o=t.key,l=n.key;t===n?(u=t.first,f--,p--):$.has(l)?!s.has(o)||v.has(o)?w(t):b.has(l)?f--:y.get(o)>y.get(l)?(b.add(o),w(t)):(v.add(l),f--):(c(n,s),f--)}for(;f--;){const t=e[f];$.has(t.key)||c(t,s)}for(;p;)w(h[p-1]);return h}(_,l,A,1,e,N,E,t,re,Je,null,Te),te()),(!$||2&l&&g!==(g=y(Ee("file-dropzone",e[1]))+" svelte-11deuuc"))&&L(t,"class",g),3&l&&W(t,"has-content",e[0]&&0!==e[0].length),130&l&&W(t,"wrong-type",e[7]),51&l&&W(t,"disabled",e[4]||e[0].length>=e[5])},i(e){if(!$){ne(S,e),ne(I);for(let e=0;e<N.length;e+=1)ne(_[e]);$=!0}},o(e){oe(S,e),oe(I);for(let e=0;e<_.length;e+=1)oe(_[e]);$=!1},d(n){n&&w(t),e[19](null),S&&S.d(n),e[20](null),I&&I.d(),e[21](null);for(let e=0;e<_.length;e+=1)_[e].d();x=!1,u(z)}}}function Ze(e,n,o){const l=["class","files","fileComponent","accept","beforeChange","disabled","max"];let r=$(n,l),{$$slots:s={},$$scope:c}=n,{class:a=null}=n;const{FileTile:u}=t;let d,f,p,{files:m=[]}=n,{fileComponent:g=u}=n,{accept:h=null}=n,{beforeChange:y=null}=n,{disabled:v=!1}=n,{max:b=1/0}=n,w=!1,x=!1,k=[];const z=I();return e.$$set=e=>{n=i(i({},n),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),o(15,r=$(n,l)),"class"in e&&o(1,a=e.class),"files"in e&&o(0,m=e.files),"fileComponent"in e&&o(2,g=e.fileComponent),"accept"in e&&o(3,h=e.accept),"beforeChange"in e&&o(16,y=e.beforeChange),"disabled"in e&&o(4,v=e.disabled),"max"in e&&o(5,b=e.max),"$$scope"in e&&o(17,c=e.$$scope)},[m,a,g,h,v,b,w,x,d,f,p,function(e){o(7,x=[...e.dataTransfer.items].some((e=>!Me(h,e))))},async function(e){const t=Array.from((e.dataTransfer||e.target).files);await Promise.all(t.map((async e=>{try{"function"==typeof y&&await y(e)}catch(e){return}Me(h,e)&&k.length<b&&k.push(e)}))),o(0,m=k),console.log(m),setTimeout((()=>o(7,x=!1)),1e3),z("change",{files:m,nativeEvent:e}),o(10,p.value="",p),o(6,w=!1)},function({detail:e}){k=k.filter((t=>t!==e)),o(0,m=k),console.log(m),z("change",{files:m})},function(e){e.target!=d&&e.target!=f&&e.target!=p&&e.preventDefault()},r,y,c,s,function(e){A[e?"unshift":"push"]((()=>{p=e,o(10,p)}))},function(e){A[e?"unshift":"push"]((()=>{d=e,o(8,d)}))},function(e){A[e?"unshift":"push"]((()=>{f=e,o(9,f)}))},()=>o(6,w=!0),()=>{o(6,w=!1),o(7,x=!1)}]}class et extends fe{constructor(e){var t;super(),document.getElementById("svelte-11deuuc-style")||((t=k("style")).id="svelte-11deuuc-style",t.textContent=".file-dropzone.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{border:0.125em dashed currentColor;border-radius:1.5625em;color:#326173;display:block;margin:2em 0 0.5em;position:relative}.file-dropzone.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc:focus-within{border-color:rgba(50, 97, 115, 0.5);border-style:solid}.file-dropzone.disabled.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{color:#888}.file-dropzone.svelte-11deuuc input.svelte-11deuuc.svelte-11deuuc{clip:rect(0, 0, 0, 0);height:1px;margin:-1px;overflow:hidden;position:absolute;width:1px}.file-dropzone.svelte-11deuuc .icon{stroke:currentColor}.file-dropzone.svelte-11deuuc .empty-layer.svelte-11deuuc.svelte-11deuuc{align-items:center;display:flex;padding:2em 1em;z-index:1}.file-dropzone.svelte-11deuuc .empty-layer .title.svelte-11deuuc.svelte-11deuuc{color:currentColor;flex:1;font-weight:500;margin-left:0.5em;text-align:center}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc{align-items:center;border-radius:1.5625em;cursor:pointer;display:flex;height:100%;justify-content:flex-end;left:0;position:absolute;top:0;width:100%;z-index:2}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc:hover{background:rgba(50, 97, 115, 0.025)}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc .ripple{background-color:rgba(50, 97, 115, 0.1)}.file-dropzone.svelte-11deuuc .dropzone-layer.accepting.svelte-11deuuc.svelte-11deuuc{background-color:rgba(50, 97, 115, 0.05)}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc svg{margin-right:1em;opacity:0;pointer-events:none;stroke:currentColor;transition:transform 150ms}.file-dropzone.svelte-11deuuc input.svelte-11deuuc:focus~.dropzone-layer.svelte-11deuuc{background:rgba(50, 97, 115, 0.05)}.file-dropzone.disabled.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc{background:none;cursor:not-allowed}.file-dropzone.has-content.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{display:grid;gap:0.5em;grid-template-columns:repeat(auto-fill, 12em);padding:1em}.file-dropzone.has-content.svelte-11deuuc .empty-layer.svelte-11deuuc.svelte-11deuuc{display:none}.file-dropzone.has-content.svelte-11deuuc .dropzone-layer.svelte-11deuuc svg{opacity:1}.file-dropzone.wrong-type.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{color:#b80000}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc:hover{background-color:rgba(184, 0, 0, 0.025)}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.accepting.svelte-11deuuc.svelte-11deuuc{background-color:rgba(184, 0, 0, 0.05)}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.svelte-11deuuc .ripple{background-color:rgba(184, 0, 0, 0.1)}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.svelte-11deuuc svg.plus{transform:rotate(45deg)}",v(document.head,t)),de(this,e,Ze,Qe,f,{class:1,files:0,fileComponent:2,accept:3,beforeChange:16,disabled:4,max:5})}}function tt(e,t,n){const o=e.slice();return o[41]=t[n],o[43]=n,o}function nt(e,t,n){const o=e.slice();return o[44]=t[n],o[45]=t,o[46]=n,o}function ot(e){let t;return{c(){t=k("div"),t.textContent="Drag & Drop Dokumenter oder klicken Sie hier zum Hochladen\n von Dateien",L(t,"slot","drag-and-drop-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function lt(e){let t;return{c(){t=k("div"),t.textContent="Inkorrektes File Format",L(t,"slot","incorrect-file-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function rt(e){let t;return{c(){t=k("div"),t.textContent="Loslassen um hochzuladen",L(t,"slot","release-to-upload-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function st(e){let t;return{c(){t=k("div"),t.textContent="File Upload steht gerade nicht zur Verfügung",L(t,"slot","upload-unavailable-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function it(e){let t,n,o,l,r,s,i=e[3],c=[];for(let t=0;t<i.length;t+=1)c[t]=ut(nt(e,i,t));const a=e=>oe(c[e],1,1,(()=>{c[e]=null}));return o=new e[7]({props:{disabled:e[4],filled:!0,style:"color: whitesmoke; display: inline;",type:"submit",$$slots:{default:[dt]},$$scope:{ctx:e}}}),o.$on("click",e[24]),r=new e[7]({props:{small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[ft]},$$scope:{ctx:e}}}),r.$on("click",e[25]),{c(){for(let e=0;e<c.length;e+=1)c[e].c();t=C(),n=k("div"),ie(o.$$.fragment),l=C(),ie(r.$$.fragment),L(n,"class","flex gap svelte-ifmgly")},m(e,i){for(let t=0;t<c.length;t+=1)c[t].m(e,i);b(e,t,i),b(e,n,i),ce(o,n,null),v(n,l),ce(r,n,null),s=!0},p(e,n){if(1048&n[0]){let o;for(i=e[3],o=0;o<i.length;o+=1){const l=nt(e,i,o);c[o]?(c[o].p(l,n),ne(c[o],1)):(c[o]=ut(l),c[o].c(),ne(c[o],1),c[o].m(t.parentNode,t))}for(ee(),o=i.length;o<c.length;o+=1)a(o);te()}const l={};16&n[0]&&(l.disabled=e[4]),65536&n[1]&&(l.$$scope={dirty:n,ctx:e}),o.$set(l);const s={};65536&n[1]&&(s.$$scope={dirty:n,ctx:e}),r.$set(s)},i(e){if(!s){for(let e=0;e<i.length;e+=1)ne(c[e]);ne(o.$$.fragment,e),ne(r.$$.fragment,e),s=!0}},o(e){c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)oe(c[e]);oe(o.$$.fragment,e),oe(r.$$.fragment,e),s=!1},d(e){x(c,e),e&&w(t),e&&w(n),ae(o),ae(r)}}}function ct(e){let t,n;return t=new ze({props:{size:"18"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function at(e){let t,n;return t=new we({props:{size:"18"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function ut(e){let t,n,o,l,r,s,i,c,a,u,f,p,m,g,h,$,y,x,z,E,B,M,P,W=e[44].file.name+"",D=jt(e[44].file.size)+"";function R(t){e[22](t,e[44])}let S={type:"text",id:"fileTitle_"+e[46],required:!0};return void 0!==e[44].custom_name&&(S.value=e[44].custom_name),g=new e[8]({props:S}),A.push((()=>se(g,"value",R))),y=new e[7]({props:{disabled:e[4],small:!0,filled:!0,style:"color: whitesmoke; display: inline;",type:"submit",$$slots:{default:[ct]},$$scope:{ctx:e}}}),z=new e[7]({props:{small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[at]},$$scope:{ctx:e}}}),z.$on("click",(function(){return e[23](e[46])})),{c(){t=k("div"),n=k("form"),o=k("div"),l=k("div"),r=_("#"),s=_(e[46]),i=C(),c=k("div"),a=_(W),u=C(),f=k("div"),p=_(D),m=C(),ie(g.$$.fragment),$=C(),ie(y.$$.fragment),x=C(),ie(z.$$.fragment),L(c,"class","word-break svelte-ifmgly"),L(o,"class","container-file svelte-ifmgly"),L(n,"id",E="submitForm_"+e[44].file.name+"_"+e[46]),L(n,"class","svelte-ifmgly"),L(t,"class","form-step svelte-ifmgly")},m(h,w){b(h,t,w),v(t,n),v(n,o),v(o,l),v(l,r),v(l,s),v(o,i),v(o,c),v(c,a),v(o,u),v(o,f),v(f,p),v(o,m),ce(g,o,null),v(o,$),ce(y,o,null),v(o,x),ce(z,o,null),B=!0,M||(P=j(n,"submit",O((function(){d(e[10](e[44],e[46]))&&e[10](e[44],e[46]).apply(this,arguments)}))),M=!0)},p(t,o){e=t,(!B||8&o[0])&&W!==(W=e[44].file.name+"")&&T(a,W),(!B||8&o[0])&&D!==(D=jt(e[44].file.size)+"")&&T(p,D);const l={};!h&&8&o[0]&&(h=!0,l.value=e[44].custom_name,V((()=>h=!1))),g.$set(l);const r={};16&o[0]&&(r.disabled=e[4]),65536&o[1]&&(r.$$scope={dirty:o,ctx:e}),y.$set(r);const s={};65536&o[1]&&(s.$$scope={dirty:o,ctx:e}),z.$set(s),(!B||8&o[0]&&E!==(E="submitForm_"+e[44].file.name+"_"+e[46]))&&L(n,"id",E)},i(e){B||(ne(g.$$.fragment,e),ne(y.$$.fragment,e),ne(z.$$.fragment,e),B=!0)},o(e){oe(g.$$.fragment,e),oe(y.$$.fragment,e),oe(z.$$.fragment,e),B=!1},d(e){e&&w(t),ae(g),ae(y),ae(z),M=!1,P()}}}function dt(e){let t;return{c(){t=_("Alle Dokumente hochladen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function ft(e){let t;return{c(){t=_("Alle Dokumente entfernen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function pt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function mt(e){let t,n,o,l,r,s,i,c;const a=[ht,gt],u=[];function d(e,t){return 0===e[40].length?0:1}return s=d(e),i=u[s]=a[s](e),{c(){t=k("div"),n=k("table"),o=k("thead"),o.innerHTML='<tr class="svelte-ifmgly"><th class="svelte-ifmgly">#</th> \n <th class="svelte-ifmgly">Datei</th> \n <th class="text_right svelte-ifmgly">Grösse</th> \n <th class="tablehead--action svelte-ifmgly">Aktionen</th></tr>',l=C(),r=k("tbody"),i.c(),L(o,"class","tablehead"),L(n,"class","tableFixHead"),L(t,"class","task_list svelte-ifmgly")},m(e,i){b(e,t,i),v(t,n),v(n,o),v(n,l),v(n,r),u[s].m(r,null),c=!0},p(e,t){let n=s;s=d(e),s===n?u[s].p(e,t):(ee(),oe(u[n],1,1,(()=>{u[n]=null})),te(),i=u[s],i?i.p(e,t):(i=u[s]=a[s](e),i.c()),ne(i,1),i.m(r,null))},i(e){c||(ne(i),c=!0)},o(e){oe(i),c=!1},d(e){e&&w(t),u[s].d()}}}function gt(e){let t,n,o=e[40],l=[];for(let t=0;t<o.length;t+=1)l[t]=vt(tt(e,o,t));const r=e=>oe(l[e],1,1,(()=>{l[e]=null}));return{c(){for(let e=0;e<l.length;e+=1)l[e].c();t=E()},m(e,o){for(let t=0;t<l.length;t+=1)l[t].m(e,o);b(e,t,o),n=!0},p(e,n){if(2068&n[0]){let s;for(o=e[40],s=0;s<o.length;s+=1){const r=tt(e,o,s);l[s]?(l[s].p(r,n),ne(l[s],1)):(l[s]=vt(r),l[s].c(),ne(l[s],1),l[s].m(t.parentNode,t))}for(ee(),s=o.length;s<l.length;s+=1)r(s);te()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ne(l[e]);n=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)oe(l[e]);n=!1},d(e){x(l,e),e&&w(t)}}}function ht(e){let t;return{c(){t=k("tr"),t.innerHTML='<td colspan="4" style="text-align: center;" class="svelte-ifmgly">Keine Dokumente gefunden</td>',L(t,"class","svelte-ifmgly")},m(e,n){b(e,t,n)},p:s,i:s,o:s,d(e){e&&w(t)}}}function $t(e){let t,n,o,l;return n=new ye({props:{size:"18"}}),{c(){t=k("a"),ie(n.$$.fragment),L(t,"href",o="/api/userreport/"+e[41]._id+"?h="+window.location.hostname),P(t,"color","whitesmoke")},m(e,o){b(e,t,o),ce(n,t,null),l=!0},p(e,n){(!l||4&n[0]&&o!==(o="/api/userreport/"+e[41]._id+"?h="+window.location.hostname))&&L(t,"href",o)},i(e){l||(ne(n.$$.fragment,e),l=!0)},o(e){oe(n.$$.fragment,e),l=!1},d(e){e&&w(t),ae(n)}}}function yt(e){let t,n;return t=new we({props:{size:"18"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function vt(e){let t,n,o,l,r,s,i,c,a,u,d,f,p,m,g,h,$=e[43]+1+"",y=e[41].title+"",x=jt(e[41].sizeInByte)+"";return f=new e[7]({props:{small:!0,filled:!0,style:"display: inline;",$$slots:{default:[$t]},$$scope:{ctx:e}}}),m=new e[7]({props:{disabled:e[4],small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[yt]},$$scope:{ctx:e}}}),m.$on("click",(function(){return e[26](e[41])})),{c(){t=k("tr"),n=k("td"),o=_($),l=C(),r=k("td"),s=_(y),i=C(),c=k("td"),a=_(x),u=C(),d=k("td"),ie(f.$$.fragment),p=C(),ie(m.$$.fragment),g=C(),L(n,"class","svelte-ifmgly"),P(r,"max-width","30em"),L(r,"class","svelte-ifmgly"),L(c,"class","text_right svelte-ifmgly"),L(d,"class","svelte-ifmgly"),L(t,"class","svelte-ifmgly")},m(e,$){b(e,t,$),v(t,n),v(n,o),v(t,l),v(t,r),v(r,s),v(t,i),v(t,c),v(c,a),v(t,u),v(t,d),ce(f,d,null),v(d,p),ce(m,d,null),v(t,g),h=!0},p(t,n){e=t,(!h||4&n[0])&&y!==(y=e[41].title+"")&&T(s,y),(!h||4&n[0])&&x!==(x=jt(e[41].sizeInByte)+"")&&T(a,x);const o={};4&n[0]|65536&n[1]&&(o.$$scope={dirty:n,ctx:e}),f.$set(o);const l={};16&n[0]&&(l.disabled=e[4]),65536&n[1]&&(l.$$scope={dirty:n,ctx:e}),m.$set(l)},i(e){h||(ne(f.$$.fragment,e),ne(m.$$.fragment,e),h=!0)},o(e){oe(f.$$.fragment,e),oe(m.$$.fragment,e),h=!1},d(e){e&&w(t),ae(f),ae(m)}}}function bt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function wt(e){let t;return{c(){t=_("Abbrechen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function xt(e){let t;return{c(){t=_("Löschen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function kt(e){let t,n,o,l,r,s,i;return l=new e[7]({props:{filled:!0,$$slots:{default:[wt]},$$scope:{ctx:e}}}),l.$on("click",e[27]),s=new e[7]({props:{danger:!0,outline:!0,$$slots:{default:[xt]},$$scope:{ctx:e}}}),s.$on("click",e[28]),{c(){t=k("p"),t.textContent="Willst du das Dokument wirklich löschen?",n=C(),o=k("div"),ie(l.$$.fragment),r=C(),ie(s.$$.fragment),L(o,"class","flex_div svelte-ifmgly")},m(e,c){b(e,t,c),b(e,n,c),b(e,o,c),ce(l,o,null),v(o,r),ce(s,o,null),i=!0},p(e,t){const n={};65536&t[1]&&(n.$$scope={dirty:t,ctx:e}),l.$set(n);const o={};65536&t[1]&&(o.$$scope={dirty:t,ctx:e}),s.$set(o)},i(e){i||(ne(l.$$.fragment,e),ne(s.$$.fragment,e),i=!0)},o(e){oe(l.$$.fragment,e),oe(s.$$.fragment,e),i=!1},d(e){e&&w(t),e&&w(n),e&&w(o),ae(l),ae(s)}}}function zt(e){let t,n,o;return n=new ge({props:{size:"25"}}),{c(){t=k("div"),ie(n.$$.fragment),L(t,"slot","title-icon")},m(e,l){b(e,t,l),ce(n,t,null),o=!0},p:s,i(e){o||(ne(n.$$.fragment,e),o=!0)},o(e){oe(n.$$.fragment,e),o=!1},d(e){e&&w(t),ae(n)}}}function _t(e){let t,n;return t=new e[6]({props:{title:"Bestätigung",closeCallback:e[39],danger:!0,$$slots:{"title-icon":[zt],default:[kt]},$$scope:{ctx:e}}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p(e,n){const o={};256&n[1]&&(o.closeCallback=e[39]),65536&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function Ct(e){let t,n,o,l,r,s,i,c,a,u,d,f;function p(t){e[20](t)}let m={accept:"image/*,.pdf,.csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,.ppt,.doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",max:Et,$$slots:{"upload-unavailable-message":[st],"release-to-upload-message":[rt],"incorrect-file-message":[lt],"drag-and-drop-message":[ot]},$$scope:{ctx:e}};void 0!==e[0]&&(m.files=e[0]),l=new et({props:m}),A.push((()=>se(l,"files",p))),l.$on("change",e[21]);let g=e[3]&&e[3].length>0&&it(e),h={ctx:e,current:null,token:null,hasCatch:!1,pending:bt,then:mt,catch:pt,value:40,blocks:[,,,]};function $(t){e[29](t)}le(c=e[2],h);let y={$$slots:{default:[_t,({closeCallback:e})=>({39:e}),({closeCallback:e})=>[0,e?256:0]]},$$scope:{ctx:e}};return void 0!==e[1]&&(y.open=e[1]),u=new e[5]({props:y}),A.push((()=>se(u,"open",$))),{c(){t=k("div"),n=k("form"),o=k("div"),ie(l.$$.fragment),s=C(),g&&g.c(),i=C(),h.block.c(),a=C(),ie(u.$$.fragment),L(o,"class","document-choose svelte-ifmgly"),L(n,"id","uploadForm"),L(t,"class","form-step svelte-ifmgly")},m(e,r){b(e,t,r),v(t,n),v(n,o),ce(l,o,null),b(e,s,r),g&&g.m(e,r),b(e,i,r),h.block.m(e,h.anchor=r),h.mount=()=>a.parentNode,h.anchor=a,b(e,a,r),ce(u,e,r),f=!0},p(t,n){e=t;const o={};65536&n[1]&&(o.$$scope={dirty:n,ctx:e}),!r&&1&n[0]&&(r=!0,o.files=e[0],V((()=>r=!1))),l.$set(o),e[3]&&e[3].length>0?g?(g.p(e,n),8&n[0]&&ne(g,1)):(g=it(e),g.c(),ne(g,1),g.m(i.parentNode,i)):g&&(ee(),oe(g,1,1,(()=>{g=null})),te()),h.ctx=e,4&n[0]&&c!==(c=e[2])&&le(c,h)||function(e,t,n){const o=t.slice(),{resolved:l}=e;e.current===e.then&&(o[e.value]=l),e.current===e.catch&&(o[e.error]=l),e.block.p(o,n)}(h,e,n);const s={};65792&n[1]&&(s.$$scope={dirty:n,ctx:e}),!d&&2&n[0]&&(d=!0,s.open=e[1],V((()=>d=!1))),u.$set(s)},i(e){f||(ne(l.$$.fragment,e),ne(g),ne(h.block),ne(u.$$.fragment,e),f=!0)},o(e){oe(l.$$.fragment,e),oe(g);for(let e=0;e<3;e+=1){oe(h.blocks[e])}oe(u.$$.fragment,e),f=!1},d(e){e&&w(t),ae(l),e&&w(s),g&&g.d(e),e&&w(i),h.block.d(e),h.token=null,h=null,e&&w(a),ae(u,e)}}}const Et=5;function jt(e){if(e>=1073741824)e=Math.round(e/1073741824*100)/100+" GB";else if(e>=1048576){e=Math.round(e/1048576*100)/100+" MB"}else if(e>=1024){e=Math.round(e/1024*100)/100+" KB"}else e>1?e+=" bytes":1==e?e+=" byte":e="0 bytes";return e}function Ot(e,s,i){let c,a,u;p(e,l,(e=>i(18,a=e))),p(e,r,(e=>i(19,u=e)));const{Modal:d,Dialog:f,Button:m,TextField:g}=t;let h,$,y,{task:v}=s,b=!1,w=[],x=v.task?.readonly,k=[],z=[];function _(e){e.length<=0?e=[]:(i(3,z=[]),e.forEach((e=>{i(3,z=[...z,{file:e,custom_name:e.name}])})),i(0,k=[]))}function C(e){i(0,k=[...e]),_(k),i(0,k=[])}const E=async()=>{const e=await v;i(16,y=await o.getSchema(e.event)),$=e.task.id;return await o.getUserReports($)};function j(e,t){if(!e)return;if(t){if(!e.name)return}else t=e.name;const n=new FormData;n.append("title",t),n.append("file",e),o.uploadUserReport($,n)}w=E();const O=e=>{i(1,b=!0),h=e},B=()=>{i(1,b=!1),h=""};function L(){o.deleteUserReport(h).then((()=>{i(1,b=!1),h=""}))}async function M(){await Promise.all(z.map((async(e,t)=>{await j(e.file,e.custom_name)}))),i(3,z=[])}n.subscribe((e=>{e&&e.taskId===$&&i(2,w=E())}));return e.$$set=e=>{"task"in e&&i(15,v=e.task)},e.$$.update=()=>{if(1&e.$$.dirty[0]&&_(k),1015808&e.$$.dirty[0]&&y&&v.task&&a&&u.role?.length&&y.authorization?.length){const e=y.authorization.some((e=>a?.find((t=>t===e.role&&"edit"===e.activity))));i(17,x||=!e)}131072&e.$$.dirty[0]&&i(4,c=x)},[k,b,w,z,c,d,f,m,g,C,function(e,t){var n;e.file&&e&&(j(e.file,e.file.custom_name),n=t,z.splice(n,1),i(3,z=[...z]))},O,B,L,M,v,y,x,a,u,function(e){k=e,i(0,k)},e=>C(e.detail.files),function(t,n){e.$$.not_equal(n.custom_name,t)&&(n.custom_name=t,i(3,z))},e=>{z.splice(e,1),i(3,z=[...z])},()=>{M()},()=>i(3,z=[]),e=>O(e._id),()=>B(),()=>L(),function(e){b=e,i(1,b)}]}class Bt extends fe{constructor(e){var t;super(),document.getElementById("svelte-ifmgly-style")||((t=k("style")).id="svelte-ifmgly-style",t.textContent=".form-step.svelte-ifmgly.svelte-ifmgly{margin-bottom:1em}.form-step.svelte-ifmgly .document-choose.svelte-ifmgly{margin:1em}.form-step.svelte-ifmgly .btn-document{width:300px;text-align:center}.form-step.svelte-ifmgly .btn-document div{margin-inline:auto}.form-step.svelte-ifmgly .btn-document-primary{color:#fff}.form-step.svelte-ifmgly .btn-document-secondary{background-color:#91BDD9}.form-step.svelte-ifmgly .container-file.svelte-ifmgly{display:grid;padding:0 1em;gap:1em;grid-template-columns:50px 218px 80px 1fr 50px 50px;align-items:center}.form-step.svelte-ifmgly .word-break.svelte-ifmgly{word-break:break-all}.gap.svelte-ifmgly.svelte-ifmgly{gap:1em}.task_list.svelte-ifmgly.svelte-ifmgly{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-ifmgly th.svelte-ifmgly{padding:0.8em}.task_list.svelte-ifmgly td.svelte-ifmgly{padding:0.8em}.task_list.svelte-ifmgly tr.svelte-ifmgly:nth-child(2n){background-color:#f8f8fe}.flex_div.svelte-ifmgly.svelte-ifmgly{display:flex;margin-top:1em;justify-content:space-between}.task_list.svelte-ifmgly td.svelte-ifmgly{vertical-align:middle}.tablehead--action.svelte-ifmgly.svelte-ifmgly{width:13em}#nameOfFile.svelte-ifmgly.svelte-ifmgly{width:15em;margin-top:6px;overflow-wrap:anywhere}#sizeOfFile.svelte-ifmgly.svelte-ifmgly{margin-top:3px;font-style:italic}td.text_right.svelte-ifmgly.svelte-ifmgly,th.text_right.svelte-ifmgly.svelte-ifmgly{padding-right:1em}",v(document.head,t)),de(this,e,Ot,Ct,f,{task:15},[-1,-1])}}function Lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mt,Tt,Pt=(Mt=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){l(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 l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(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:i.bind(null,t,n),mount:c.bind(null,t,n),unmount:a.bind(null,t,n),update:u.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function i(e){return Promise.resolve()}function c(e,t,n){var l=Object.keys(s),r=Object.keys(e).reduce((function(t,n){return l.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var l=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=l();t.instance=new e.component(o(o({},r),{},{target:s,props:Object.assign({},n,e.props)}))}))}function a(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)}))}},Mt(Tt={exports:{}},Tt.exports),Tt.exports);const Wt=Lt(Pt)({component:Bt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Dt,mount:Rt,unmount:St}=Wt;e({bootstrap:Dt,mount:Rt,unmount:St});e("Report",Bt)}}}));
|