@enablerr-ui/detail 0.3.42 → 0.3.43
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,4 +1,4 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,r,i,o,s,a,l,c,d,u,h;return{setters:[function(e){t=e.Request,n=e.Storage,r=e.task_notification,i=e.currentRoles,o=e.TextArea,s=e.toasts,a=e.settings,l=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){h=e.taskClipboard}],execute:function(){function f(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}e("version","0.3.42");const m=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),p=e=>{try{return new Date(e).toLocaleString()}catch{return e}},g=e=>e?"(ja)":"(nein)",w=(e,t)=>{if(!e.display&&!e.items)return"";const n={...t};return(e.display?.reduce(((t,r)=>{let[i,o]=r.split(".");if(e.list?.find((({name:e})=>e===i))&&o&&void 0!==n[i]){const e=`${i}_${o}`;n[e]=n[i][o],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?g(n[e]):m(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&g(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e&&!y(e))).join(" · "))).filter((e=>!!e)).join(" • ")},y=e=>/^[0-9a-f]{24}/.test(e),v=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function _(){}function I(e){return e()}function C(){return Object.create(null)}function $(e){e.forEach(I)}function E(e){return"function"==typeof e}function A(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function b(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return _;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function S(e){return null==e?"":e}function T(e,t,n=t){return e.set(n),t}function N(e,t){e.appendChild(t)}function R(e,t,n){e.insertBefore(t,n||null)}function D(e){e.parentNode.removeChild(e)}function k(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function O(e){return document.createElement(e)}function x(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function M(e){return document.createTextNode(e)}function B(){return M(" ")}function P(){return M("")}function L(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function F(e){return function(t){return t.preventDefault(),e.call(this,t)}}function V(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function U(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function H(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function W(e,t){e.value=null==t?"":t}function z(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function q(e,t,n){e.classList[n?"add":"remove"](t)}let j;function G(e){j=e}function X(){if(!j)throw new Error("Function called outside component initialization");return j}function Y(e){X().$$.on_mount.push(e)}function Z(e){X().$$.on_destroy.push(e)}function K(){const e=X();return(t,n)=>{const r=e.$$.callbacks[t];if(r){const i=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);r.slice().forEach((t=>{t.call(e,i)}))}}}function Q(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const J=[],ee=[],te=[],ne=[],re=Promise.resolve();let ie=!1;function oe(){ie||(ie=!0,re.then(ue))}function se(){return oe(),re}function ae(e){te.push(e)}function le(e){ne.push(e)}let ce=!1;const de=new Set;function ue(){if(!ce){ce=!0;do{for(let e=0;e<J.length;e+=1){const t=J[e];G(t),he(t.$$)}for(G(null),J.length=0;ee.length;)ee.pop()();for(let e=0;e<te.length;e+=1){const t=te[e];de.has(t)||(de.add(t),t())}te.length=0}while(J.length);for(;ne.length;)ne.pop()();ie=!1,ce=!1,de.clear()}}function he(e){if(null!==e.fragment){e.update(),$(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ae)}}const fe=new Set;let me;function pe(){me={r:0,c:[],p:me}}function ge(){me.r||$(me.c),me=me.p}function we(e,t){e&&e.i&&(fe.delete(e),e.i(t))}function ye(e,t,n,r){if(e&&e.o){if(fe.has(e))return;fe.add(e),me&&me.c.push((()=>{fe.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}function ve(e,t){const n=t.token={};function r(e,r,i,o){if(t.token!==n)return;t.resolved=o;let s=t.ctx;void 0!==i&&(s=s.slice(),s[i]=o);const a=e&&(t.current=e)(s);let l=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==r&&e&&(pe(),ye(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ge())})):t.block.d(1),a.c(),we(a,1),a.m(t.mount(),t.anchor),l=!0),t.block=a,t.blocks&&(t.blocks[r]=a),l&&ue()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=X();if(e.then((e=>{G(n),r(t.then,1,t.value,e),G(null)}),(e=>{if(G(n),r(t.catch,2,t.error,e),G(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}var i}function _e(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}const Ie="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ce(e,t){ye(e,1,1,(()=>{t.delete(e.key)}))}function $e(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Ee(e){e&&e.c()}function Ae(e,t,n,r){const{fragment:i,on_mount:o,on_destroy:s,after_update:a}=e.$$;i&&i.m(t,n),r||ae((()=>{const t=o.map(I).filter(E);s?s.push(...t):$(t),e.$$.on_mount=[]})),a.forEach(ae)}function be(e,t){const n=e.$$;null!==n.fragment&&($(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Se(e,t,n,r,i,o,s=[-1]){const a=j;G(e);const l=e.$$={fragment:null,ctx:null,props:o,update:_,not_equal:i,bound:C(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:t.context||[]),callbacks:C(),dirty:s,skip_bound:!1};let c=!1;if(l.ctx=n?n(e,t.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return l.ctx&&i(l.ctx[t],l.ctx[t]=o)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](o),c&&function(e,t){-1===e.$$.dirty[0]&&(J.push(e),oe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],l.update(),c=!0,$(l.before_update),l.fragment=!!r&&r(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(D)}else l.fragment&&l.fragment.c();t.intro&&we(e.$$.fragment),Ae(e,t.target,t.anchor,t.customElement),ue()}G(a)}class Te{$destroy(){be(this,1),this.$destroy=_}$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 Ne(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("polygon"),U(n,"d","M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"),U(r,"points","12 15 17 21 7 21 12 15"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-airplay "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-airplay "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function Re(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class De extends Te{constructor(e){super(),Se(this,e,Re,Ne,A,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("path"),r=x("line"),i=x("line"),U(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"),U(r,"x1","12"),U(r,"y1","9"),U(r,"x2","12"),U(r,"y2","13"),U(i,"x1","12"),U(i,"y1","17"),U(i,"x2","12.01"),U(i,"y2","17"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-alert-triangle "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-alert-triangle "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function Oe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class xe extends Te{constructor(e){super(),Se(this,e,Oe,ke,A,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("circle"),r=x("polyline"),i=x("line"),U(n,"cx","12"),U(n,"cy","12"),U(n,"r","10"),U(r,"points","8 12 12 16 16 12"),U(i,"x1","12"),U(i,"y1","8"),U(i,"x2","12"),U(i,"y2","16"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-arrow-down-circle "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-arrow-down-circle "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function Be(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Pe extends Te{constructor(e){super(),Se(this,e,Be,Me,A,{size:0,strokeWidth:1,class:2})}}function Le(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("path"),U(n,"d","M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"),U(r,"d","M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-book-open "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-book-open "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function Fe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ve extends Te{constructor(e){super(),Se(this,e,Fe,Le,A,{size:0,strokeWidth:1,class:2})}}function Ue(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("circle"),U(n,"d","M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"),U(r,"cx","12"),U(r,"cy","13"),U(r,"r","4"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-camera "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-camera "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function He(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class We extends Te{constructor(e){super(),Se(this,e,He,Ue,A,{size:0,strokeWidth:1,class:2})}}function ze(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),U(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),U(r,"points","22 4 12 14.01 9 11.01"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function qe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class je extends Te{constructor(e){super(),Se(this,e,qe,ze,A,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,r;return{c(){t=x("svg"),n=x("path"),U(n,"d","M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",r="feather feather-command "+e[2])},m(e,r){R(e,t,r),N(t,n)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-command "+e[2])&&U(t,"class",r)},i:_,o:_,d(e){e&&D(t)}}}function Xe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ye extends Te{constructor(e){super(),Se(this,e,Xe,Ge,A,{size:0,strokeWidth:1,class:2})}}function Ze(e){let t,n,r,i;return{c(){t=x("svg"),n=x("polyline"),r=x("path"),U(n,"points","9 10 4 15 9 20"),U(r,"d","M20 4v7a4 4 0 0 1-4 4H4"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function Ke(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Qe extends Te{constructor(e){super(),Se(this,e,Ke,Ze,A,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("path"),r=x("line"),i=x("line"),U(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),U(r,"x1","18"),U(r,"y1","9"),U(r,"x2","12"),U(r,"y2","15"),U(i,"x1","12"),U(i,"y1","9"),U(i,"x2","18"),U(i,"y2","15"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-delete "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-delete "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function et(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class tt extends Te{constructor(e){super(),Se(this,e,et,Je,A,{size:0,strokeWidth:1,class:2})}}function nt(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),i=x("line"),U(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),U(r,"points","15 3 21 3 21 9"),U(i,"x1","10"),U(i,"y1","14"),U(i,"x2","21"),U(i,"y2","3"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-external-link "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-external-link "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function rt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class it extends Te{constructor(e){super(),Se(this,e,rt,nt,A,{size:0,strokeWidth:1,class:2})}}function ot(e){let t,n,r,i,o,s;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),i=x("line"),o=x("line"),U(n,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),U(r,"points","14 2 14 8 20 8"),U(i,"x1","12"),U(i,"y1","18"),U(i,"x2","12"),U(i,"y2","12"),U(o,"x1","9"),U(o,"y1","15"),U(o,"x2","15"),U(o,"y2","15"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",s="feather feather-file-plus "+e[2])},m(e,s){R(e,t,s),N(t,n),N(t,r),N(t,i),N(t,o)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-file-plus "+e[2])&&U(t,"class",s)},i:_,o:_,d(e){e&&D(t)}}}function st(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class at extends Te{constructor(e){super(),Se(this,e,st,ot,A,{size:0,strokeWidth:1,class:2})}}function lt(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("circle"),r=x("line"),i=x("path"),U(n,"cx","12"),U(n,"cy","12"),U(n,"r","10"),U(r,"x1","2"),U(r,"y1","12"),U(r,"x2","22"),U(r,"y2","12"),U(i,"d","M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-globe "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-globe "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function ct(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class dt extends Te{constructor(e){super(),Se(this,e,ct,lt,A,{size:0,strokeWidth:1,class:2})}}function ut(e){let t,n,r,i,o,s,a,l;return{c(){t=x("svg"),n=x("line"),r=x("line"),i=x("line"),o=x("line"),s=x("line"),a=x("line"),U(n,"x1","8"),U(n,"y1","6"),U(n,"x2","21"),U(n,"y2","6"),U(r,"x1","8"),U(r,"y1","12"),U(r,"x2","21"),U(r,"y2","12"),U(i,"x1","8"),U(i,"y1","18"),U(i,"x2","21"),U(i,"y2","18"),U(o,"x1","3"),U(o,"y1","6"),U(o,"x2","3.01"),U(o,"y2","6"),U(s,"x1","3"),U(s,"y1","12"),U(s,"x2","3.01"),U(s,"y2","12"),U(a,"x1","3"),U(a,"y1","18"),U(a,"x2","3.01"),U(a,"y2","18"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",l="feather feather-list "+e[2])},m(e,l){R(e,t,l),N(t,n),N(t,r),N(t,i),N(t,o),N(t,s),N(t,a)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-list "+e[2])&&U(t,"class",l)},i:_,o:_,d(e){e&&D(t)}}}function ht(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ft extends Te{constructor(e){super(),Se(this,e,ht,ut,A,{size:0,strokeWidth:1,class:2})}}function mt(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),U(n,"d","M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"),U(r,"points","22,6 12,13 2,6"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-mail "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-mail "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function pt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class gt extends Te{constructor(e){super(),Se(this,e,pt,mt,A,{size:0,strokeWidth:1,class:2})}}function wt(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("circle"),U(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),U(r,"cx","12"),U(r,"cy","10"),U(r,"r","3"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-map-pin "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-map-pin "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function yt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class vt extends Te{constructor(e){super(),Se(this,e,yt,wt,A,{size:0,strokeWidth:1,class:2})}}function _t(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("polyline"),r=x("line"),i=x("path"),U(n,"points","23 7 23 1 17 1"),U(r,"x1","16"),U(r,"y1","8"),U(r,"x2","23"),U(r,"y2","1"),U(i,"d","M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-phone-outgoing "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-phone-outgoing "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function It(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ct extends Te{constructor(e){super(),Se(this,e,It,_t,A,{size:0,strokeWidth:1,class:2})}}function $t(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("polyline"),r=x("path"),i=x("rect"),U(n,"points","6 9 6 2 18 2 18 9"),U(r,"d","M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"),U(i,"x","6"),U(i,"y","14"),U(i,"width","12"),U(i,"height","8"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-printer "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-printer "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function Et(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class At extends Te{constructor(e){super(),Se(this,e,Et,$t,A,{size:0,strokeWidth:1,class:2})}}function bt(e){let t,n,r,i;return{c(){t=x("svg"),n=x("circle"),r=x("line"),U(n,"cx","11"),U(n,"cy","11"),U(n,"r","8"),U(r,"x1","21"),U(r,"y1","21"),U(r,"x2","16.65"),U(r,"y2","16.65"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-search "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function St(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Tt extends Te{constructor(e){super(),Se(this,e,St,bt,A,{size:0,strokeWidth:1,class:2})}}const{document:Nt}=Ie;function Rt(e){e[49]=e[50].items}function Dt(e,t,n){const r=e.slice();return r[51]=t[n],r[53]=n,r}function kt(e,t,n){const r=e.slice();return r[54]=t[n],r}function Ot(e,t,n){const r=e.slice();return r[54]=t[n],r}function xt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Mt(e){let t,n,r,i,o,s;Rt(e);let a=e[5]?.length&&Bt(e),l=e[49]?.length&&Lt(e),c=e[5]?.length&&Ut(e);return{c(){a&&a.c(),t=B(),n=O("div"),r=O("table"),l&&l.c(),i=B(),o=O("tbody"),c&&c.c(),U(r,"striped",""),U(r,"class","svelte-47aais"),U(n,"class","eList svelte-47aais")},m(e,d){a&&a.m(e,d),R(e,t,d),R(e,n,d),N(n,r),l&&l.m(r,null),N(r,i),N(r,o),c&&c.m(o,null),s=!0},p(e,n){Rt(e),e[5]?.length?a?(a.p(e,n),32&n[0]&&we(a,1)):(a=Bt(e),a.c(),we(a,1),a.m(t.parentNode,t)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge()),e[49]?.length?l?l.p(e,n):(l=Lt(e),l.c(),l.m(r,i)):l&&(l.d(1),l=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&we(c,1)):(c=Ut(e),c.c(),we(c,1),c.m(o,null)):c&&(pe(),ye(c,1,1,(()=>{c=null})),ge())},i(e){s||(we(a),we(c),s=!0)},o(e){ye(a),ye(c),s=!1},d(e){a&&a.d(e),e&&D(t),e&&D(n),l&&l.d(),c&&c.d()}}}function Bt(e){let t,n,r,i,o,s,a,l,c,d,u,h=e[6]&&Pt(e);function f(t){e[33](t)}let m={id:e[10]};return void 0!==e[3]&&(m.value=e[3]),i=new e[8]({props:m}),ee.push((()=>$e(i,"value",f))),i.$on("input",e[14]),l=new tt({props:{size:"18"}}),{c(){h&&h.c(),t=B(),n=O("div"),r=M("Suchen: "),Ee(i.$$.fragment),s=B(),a=O("span"),Ee(l.$$.fragment),U(a,"class","feather pointer svelte-47aais"),z(n,"margin-bottom","1em"),z(n,"position","relative")},m(o,f){h&&h.m(o,f),R(o,t,f),R(o,n,f),N(n,r),Ae(i,n,null),N(n,s),N(n,a),Ae(l,a,null),c=!0,d||(u=L(a,"click",e[16]),d=!0)},p(e,n){e[6]?h?64&n[0]&&we(h,1):(h=Pt(e),h.c(),we(h,1),h.m(t.parentNode,t)):h&&(pe(),ye(h,1,1,(()=>{h=null})),ge());const r={};!o&&8&n[0]&&(o=!0,r.value=e[3],le((()=>o=!1))),i.$set(r)},i(e){c||(we(h),we(i.$$.fragment,e),we(l.$$.fragment,e),c=!0)},o(e){ye(h),ye(i.$$.fragment,e),ye(l.$$.fragment,e),c=!1},d(e){h&&h.d(e),e&&D(t),e&&D(n),be(i),be(l),d=!1,u()}}}function Pt(e){let t,n;return t=new e[7]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Lt(e){let t,n,r,i=e[4]&&e[0]&&Ft(),o=e[49],s=[];for(let t=0;t<o.length;t+=1)s[t]=Vt(Ot(e,o,t));return{c(){t=O("thead"),n=O("tr"),i&&i.c(),r=B();for(let e=0;e<s.length;e+=1)s[e].c();U(n,"class","svelte-47aais"),U(t,"class","svelte-47aais")},m(e,o){R(e,t,o),N(t,n),i&&i.m(n,null),N(n,r);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Ft(),i.c(),i.m(n,r)):i&&(i.d(1),i=null),8196&t[0]){let r;for(o=e[49],r=0;r<o.length;r+=1){const i=Ot(e,o,r);s[r]?s[r].p(i,t):(s[r]=Vt(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&D(t),i&&i.d(),k(s,e)}}}function Ft(e){let t;return{c(){t=O("th"),U(t,"class","svelte-47aais")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Vt(e){let t,n,r=e[54]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-47aais")},m(e,r){R(e,t,r),N(t,n)},p(e,t){4&t[0]&&r!==(r=e[54]?.designation+"")&&H(n,r)},d(e){e&&D(t)}}}function Ut(e){let t,n,r=[],i=new Map,o=e[5];const s=e=>e[51]?._id;for(let t=0;t<o.length;t+=1){let n=Dt(e,o,t),a=s(n);i.set(a,r[t]=qt(a,n))}return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=P()},m(e,i){for(let t=0;t<r.length;t+=1)r[t].m(e,i);R(e,t,i),n=!0},p(e,n){178239&n[0]&&(o=e[5],pe(),r=function(e,t,n,r,i,o,s,a,l,c,d,u){let h=e.length,f=o.length,m=h;const p={};for(;m--;)p[e[m].key]=m;const g=[],w=new Map,y=new Map;for(m=f;m--;){const e=u(i,o,m),a=n(e);let l=s.get(a);l?r&&l.p(e,t):(l=c(a,e),l.c()),w.set(a,g[m]=l),a in p&&y.set(a,Math.abs(m-p[a]))}const v=new Set,_=new Set;function I(e){we(e,1),e.m(a,d),s.set(e.key,e),d=e.first,f--}for(;h&&f;){const t=g[f-1],n=e[h-1],r=t.key,i=n.key;t===n?(d=t.first,h--,f--):w.has(i)?!s.has(r)||v.has(r)?I(t):_.has(i)?h--:y.get(r)>y.get(i)?(_.add(r),I(t)):(v.add(i),h--):(l(n,s),h--)}for(;h--;){const t=e[h];w.has(t.key)||l(t,s)}for(;f;)I(g[f-1]);return g}(r,n,s,1,e,o,i,t.parentNode,Ce,qt,t,Dt),ge())},i(e){if(!n){for(let e=0;e<o.length;e+=1)we(r[e]);n=!0}},o(e){for(let e=0;e<r.length;e+=1)ye(r[e]);n=!1},d(e){for(let t=0;t<r.length;t+=1)r[t].d(e);e&&D(t)}}}function Ht(e){let t,n,r,i,o,s,a=e[4]&&e[0]&&Wt(e),l=e[49],c=[];for(let t=0;t<l.length;t+=1)c[t]=zt(kt(e,l,t));return{c(){t=O("tr"),a&&a.c(),n=B();for(let e=0;e<c.length;e+=1)c[e].c();r=B(),U(t,"class","pointer svelte-47aais"),q(t,"active",e[51]._id===e[1]),q(t,"blocked",!!e[51].blocked),q(t,"undeliverable",!!e[51].undeliverable)},m(l,d){R(l,t,d),a&&a.m(t,null),N(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);N(t,r),i=!0,o||(s=L(t,"click",V((function(){E(e[12](e[51],e[53]))&&e[12](e[51],e[53]).apply(this,arguments)}))),o=!0)},p(i,o){if((e=i)[4]&&e[0]?a?(a.p(e,o),17&o[0]&&we(a,1)):(a=Wt(e),a.c(),we(a,1),a.m(t,n)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge()),10276&o[0]){let n;for(l=e[49],n=0;n<l.length;n+=1){const i=kt(e,l,n);c[n]?c[n].p(i,o):(c[n]=zt(i),c[n].c(),c[n].m(t,r))}for(;n<c.length;n+=1)c[n].d(1);c.length=l.length}34&o[0]&&q(t,"active",e[51]._id===e[1]),32&o[0]&&q(t,"blocked",!!e[51].blocked),32&o[0]&&q(t,"undeliverable",!!e[51].undeliverable)},i(e){i||(we(a),i=!0)},o(e){ye(a),i=!1},d(e){e&&D(t),a&&a.d(),k(c,e),o=!1,s()}}}function Wt(e){let t,n,r,i,o;return n=new it({props:{size:"18"}}),{c(){t=O("td"),Ee(n.$$.fragment),U(t,"class","editRow svelte-47aais"),z(t,"color","#326173")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",V((function(){E(e[17](e[51]))&&e[17](e[51]).apply(this,arguments)}))),i=!0)},p(t,n){e=t},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function zt(e){let t,n,r,i=e[11](e[51],e[54])+"";return{c(){t=O("td"),n=M(i),U(t,"class",r=S(e[54].type)+" svelte-47aais")},m(e,r){R(e,t,r),N(t,n)},p(e,o){36&o[0]&&i!==(i=e[11](e[51],e[54])+"")&&H(n,i),4&o[0]&&r!==(r=S(e[54].type)+" svelte-47aais")&&U(t,"class",r)},d(e){e&&D(t)}}}function qt(e,t){let n,r,i,o=t[15](t[51],t[49],t[3]),s=o&&Ht(t);return{key:e,first:null,c(){n=P(),s&&s.c(),r=P(),this.first=n},m(e,t){R(e,n,t),s&&s.m(e,t),R(e,r,t),i=!0},p(e,n){t=e,44&n[0]&&(o=t[15](t[51],t[49],t[3])),o?s?(s.p(t,n),44&n[0]&&we(s,1)):(s=Ht(t),s.c(),we(s,1),s.m(r.parentNode,r)):s&&(pe(),ye(s,1,1,(()=>{s=null})),ge())},i(e){i||(we(s),i=!0)},o(e){ye(s),i=!1},d(e){e&&D(n),s&&s.d(e),e&&D(r)}}}function jt(e){let t,n;return t=new e[7]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Gt(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:jt,then:Mt,catch:xt,value:50,blocks:[,,,]};return ve(n=e[2]&&e[13](),i),{c(){t=P(),i.block.c()},m(e,n){R(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,4&r[0]&&n!==(n=e[2]&&e[13]())&&ve(n,i)||_e(i,e,r)},i(e){r||(we(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}r=!1},d(e){e&&D(t),i.block.d(e),i.token=null,i=null}}}const Xt=e("getDisplayItems",(async(e,n,r)=>{if(!e)return;let i=[];for(const o of e){if("_total"===o){i.push({name:"_total",designation:"Betrag",type:"number"});continue}if("__total"===o){i.push({name:"__total",designation:"Total CHF",type:"number",decimals:2});continue}const[e,s]=o.split(".");let a=n.list?.find((t=>t.name===e))?.item?.find((e=>e.name===s));if(a&&(a={...a},a.name=`${e}_${s}`,r=r.map((t=>(t[e]&&(t[a.name]=t["_"+e]?t["_"+e][s]:t[e][s]),t)))),a||(a=n.items.find((t=>t.name===e))),!a){const n=(await t.getSchemaByClass(e)).items.find((e=>e.name===s));n&&(a={name:e,designation:n.designation,type:n.type,decimals:n.properties?.decimals||0})}i.find((t=>t?.name===e))||i.push(a)}return i.length?i:n.items}));function Yt(e,i,o){let s;let a=JSON.parse(n.getItem("Locale")).id;const l=K(),{Loading:d,TextField:h}=c,{currentTasks:f}=u;b(e,f,(e=>o(37,s=e)));let p,w,y,v,{inputList:_}=i,{eventId:I}=i,{prevEventId:C}=i,{record:$}=i,{className:E}=i,{rowId:A}=i,{filterForReady:S=!1}=i,{filter:T}=i,{query:N}=i,{refStatus:R}=i,{showEdit:D=!1}=i,{praefix:k=""}=i,{selectionFields:O=!1}=i,{deList:x}=i,{stopAggregation:M=!1}=i,{shouldBlock:B}=i,{inputSearch:P=""}=i,L=!0,F=P,V=E+Math.floor(9e3*Math.random()+1e3).toString()+"search",U=!1,H=!0;const W=(e,t)=>{if(!t)return;let n=e[t.name];if("__total"===t.name&&void 0===n&&(n=1.081*e._total),!n&&t.name.includes("_")&&!t.name.startsWith("_")){const[r,i]=t.name.split("_");try{n=e[r][i]}catch{}}if(Array.isArray(n)){const e=e=>e.replaceAll(" ",String.fromCharCode(160));if(n.length&&Array.isArray(n[0].serialno)){let t=[];for(const r of n)t=t.concat(r.serialno.map(e));n=t.join(", ")}else n=n.map(e),n.length>3&&(n=n.slice(0,3),n=n.concat("...")),n=n.join(", ")}if(!n&&t.name.split("_").length>1){const[r,i]=t.name.split("_");try{n=e[r][0][i],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n||(n=e[`_${t.name}`]),n=Number(n)?Number(n).toLocaleString(a,{minimumFractionDigits:t.properties?.decimals||t.decimals||0,maximumFractionDigits:t.properties?.decimals||t.decimals||0}):""),"boolean"===t.type&&"Aktiv"===n&&(n=!1),"number"===t.type?n:"boolean"==typeof n||"boolean"===t.type?g(n):m(e[`_${t.name}`]||n||"")},z=t.getSchemaByClass(E),q=async(e,n)=>{if(!e)return[];if(T){let n;const r=T.startsWith("!");r&&(n=T.replace("!",""));const i=T.startsWith("$");if(n&&!i&&(e=e.filter((e=>i?e[n]===A:r?!e[n]:!!e[n]))),i){n=T.replace("$","");const[r,i]=n.split(".");if($[i]){const n=await t.getSectionView(r,{[i]:$[i]});e=e.filter((e=>n.find((t=>t._id==e[r]))))}else e=[]}}if(R&&!N)return o(18,R=[].concat(R)),e.filter((e=>!!R.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(C){const n=await t.getEvent(C);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===E)return"Information"===n.state.task?e.filter((e=>"Closed"!==e._task.status)):e.filter((e=>"Ready"===e._task.status))}return e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status))},j=(e,t)=>{if(e){let n,r="1";if("string"==typeof e)n=e;else{const t=Object.keys(e);n=t[0],r=t[1]}"date"===n&&(r="-1");const i=new Intl.Collator(a,{numeric:!0});return 1==r?t.sort(((e,t)=>i.compare(e[n],t[n]))):t.sort(((e,t)=>i.compare(t[n],e[n])))}return t},G=async e=>{let n,r=0;H=!1;const i=e=>new Promise((t=>setTimeout(t,e))),s=await z;for(;r++<200&&!M&&!(n=await X(e,s.id));)await i(500);o(6,U=!1),M&&t.readTasksByAggregationId(e,!0),n&&(o(5,y=j(w.displaySort,n.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),H=!0}),100))},X=async(e,n)=>await t.readTasksByAggregationId(e,!1,n),Z=async(e,t,n,r)=>{const{value:i,refClass:o}=r,[s,a]=n.split("."),l=i?.get(k),c=l&&await fh(s,l);if(!c)return e;const d=c[a];return d?.length?d.map((n=>{let r=e?.find((e=>e._id===n[t]))||{};r={...r};for(const e in r)n[e]&&(r[e]=n[e]);for(const e in n)n[e]&&(r[e]=n[e]);return uh(o+r._id.toString(),r),r})):e};Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(V)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await z;e.eventId===t.id&&(mh(t.class,e.eventId),o(2,L=!o(2,L=!1)))}));return e.$$set=e=>{"inputList"in e&&o(20,_=e.inputList),"eventId"in e&&o(21,I=e.eventId),"prevEventId"in e&&o(22,C=e.prevEventId),"record"in e&&o(23,$=e.record),"className"in e&&o(24,E=e.className),"rowId"in e&&o(1,A=e.rowId),"filterForReady"in e&&o(25,S=e.filterForReady),"filter"in e&&o(26,T=e.filter),"query"in e&&o(27,N=e.query),"refStatus"in e&&o(18,R=e.refStatus),"showEdit"in e&&o(0,D=e.showEdit),"praefix"in e&&o(28,k=e.praefix),"selectionFields"in e&&o(29,O=e.selectionFields),"deList"in e&&o(30,x=e.deList),"stopAggregation"in e&&o(19,M=e.stopAggregation),"shouldBlock"in e&&o(31,B=e.shouldBlock),"inputSearch"in e&&o(32,P=e.inputSearch)},[D,A,L,F,p,y,U,d,h,f,V,W,(e,t)=>n=>{o(19,M=!0);const r=H?e:v[t];l("choose",{row:r})},async()=>{w=await z,o(4,p=(e=>!s?.length||!!s.find((t=>t===e)))(w.id)),N&&o(5,y=v=await t.getTasksFiltered(w.class,N)),y||o(5,y=v=j(w.displaySort,await _||await ch(w.class,w.id))),500!==y?.length||N||(o(6,U=!0),t.getTasksList(w.id,!1,!0).then((({aggregationId:e})=>G(e))));let e,n=!1,r="";const i=O&&O?.find((e=>w.class===e.refClass.split(":")[0])),a=i?.value?.get&&i.value.get(k);if(a){const[s,l]=i.refClass.split(":");w.class===s&&o(5,y=await Z(y,s,l,i)),n=i.parentClass?.find((e=>"quantity"===e.name)),r=i.className,e=await t.getCountedSection(r,l.split(".")[0],a,s,"quantity")}o(0,D&&=!i),!i&&(T||S||R)&&o(5,y=await q(y,w));const{display:c}=w;let d=await Xt(c,w,y);return!D&&n?(d=d.concat([{name:"quantity",designation:"h-Soll",type:"number",decimals:2},{name:"ist",designation:"h-Ist",type:"number",decimals:2}]),o(5,y=y.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!y.find((t=>t._id===e._id))){const t=v.find((t=>t._id===e._id));t&&(t.ist=e.quantity.$numberDecimal),y.push(t)}})),l("init",y)):x&&o(5,y=y.filter((e=>!x.find((t=>t?._id===e._id))))),B&&o(5,y=y.filter((e=>!e[B]))),{items:d}},({detail:{value:e}})=>{o(3,F=e)},(e,t,n)=>{if(!e)return!1;if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let r=!1;for(const i of t){const t=W(e,i).toLowerCase();!r&&t.includes(n)&&(r=!0)}return r},()=>{o(3,F="")},async e=>{let t=e._task;t||(t=await dh(E,"",e._id,!0),t=t._task),window.open(`/task/${t.event}/${t.task_id||t._id}/task?view=standalone`,"_blank")},R,M,_,I,C,$,E,S,T,N,k,O,x,B,P,function(e){F=e,o(3,F)}]}class Zt extends Te{constructor(e){var t;super(),Nt.getElementById("svelte-47aais-style")||((t=O("style")).id="svelte-47aais-style",t.textContent=".feather.svelte-47aais.svelte-47aais{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-47aais.svelte-47aais{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-47aais .editRow.svelte-47aais{width:1em}.eList.svelte-47aais table.svelte-47aais{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-47aais table thead.svelte-47aais{position:sticky;top:0;background:#326173;color:white}.eList.svelte-47aais table thead tr.svelte-47aais{height:2.3em}.eList.svelte-47aais table tbody tr.svelte-47aais{height:2.75em !important}th.svelte-47aais.svelte-47aais,td.svelte-47aais.svelte-47aais{padding-left:0.4em;padding-right:0.4em}td.number.svelte-47aais.svelte-47aais{text-align:end}tr.pointer.svelte-47aais.svelte-47aais:hover{background-color:#DAE1E5}tr.active.svelte-47aais.svelte-47aais{color:#326173;background-color:#fcebd5}tr.blocked.svelte-47aais.svelte-47aais{color:red !important}tr.undeliverable.svelte-47aais.svelte-47aais{color:orange}",N(Nt.head,t)),Se(this,e,Yt,Gt,A,{inputList:20,eventId:21,prevEventId:22,record:23,className:24,rowId:1,filterForReady:25,filter:26,query:27,refStatus:18,showEdit:0,praefix:28,selectionFields:29,deList:30,stopAggregation:19,shouldBlock:31,inputSearch:32},[-1,-1])}}function Kt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Qt(e){let t,n,r=e[45]&&Jt(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[45]?r?(r.p(e,n),16&n[0]&&we(r,1)):(r=Jt(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Jt(e){let t,n;return t=new e[25]({props:{title:e[20]?"Auswahl":e[0],class:"eList "+(e[18]?"form":""),$$slots:{default:[dn]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1048577&n[0]&&(r.title=e[20]?"Auswahl":e[0]),262144&n[0]&&(r.class="eList "+(e[18]?"form":"")),33554430&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function en(e){let t,n;return t=new wh({props:{schema:e[2],recID:e[1],readonly:e[19]}}),t.$on("choose",(function(){E(e[34](e[45]))&&e[34](e[45]).apply(this,arguments)})),t.$on("back",e[31]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(n,r){e=n;const i={};4&r[0]&&(i.schema=e[2]),2&r[0]&&(i.recID=e[1]),524288&r[0]&&(i.readonly=e[19]),t.$set(i)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function tn(e){let t,n,r,i,o,s,a;t=new e[26]({props:{text:e[20]?"Zusätzliche Auswahl":""}});const l=[rn,nn],c=[];function d(e,t){return e[20]?0:1}return r=d(e),i=c[r]=l[r](e),s=new Zt({props:{inputSearch:e[15],record:e[3],eventId:e[2].id,className:e[2].class,prevEventId:e[14],filterForReady:e[5],filter:e[6],query:e[7],refStatus:e[8],praefix:e[9],selectionFields:e[10],rowId:e[1],shouldBlock:e[16],deList:e[12],stopAggregation:e[24],showEdit:e[11]}}),s.$on("edit",e[35]),s.$on("choose",e[38]),s.$on("init",e[36]),{c(){Ee(t.$$.fragment),n=B(),i.c(),o=B(),Ee(s.$$.fragment)},m(e,i){Ae(t,e,i),R(e,n,i),c[r].m(e,i),R(e,o,i),Ae(s,e,i),a=!0},p(e,n){const a={};1048576&n[0]&&(a.text=e[20]?"Zusätzliche Auswahl":""),t.$set(a);let u=r;r=d(e),r===u?c[r].p(e,n):(pe(),ye(c[u],1,1,(()=>{c[u]=null})),ge(),i=c[r],i?i.p(e,n):(i=c[r]=l[r](e),i.c()),we(i,1),i.m(o.parentNode,o));const h={};32768&n[0]&&(h.inputSearch=e[15]),8&n[0]&&(h.record=e[3]),4&n[0]&&(h.eventId=e[2].id),4&n[0]&&(h.className=e[2].class),16384&n[0]&&(h.prevEventId=e[14]),32&n[0]&&(h.filterForReady=e[5]),64&n[0]&&(h.filter=e[6]),128&n[0]&&(h.query=e[7]),256&n[0]&&(h.refStatus=e[8]),512&n[0]&&(h.praefix=e[9]),1024&n[0]&&(h.selectionFields=e[10]),2&n[0]&&(h.rowId=e[1]),65536&n[0]&&(h.shouldBlock=e[16]),4096&n[0]&&(h.deList=e[12]),16777216&n[0]&&(h.stopAggregation=e[24]),2048&n[0]&&(h.showEdit=e[11]),s.$set(h)},i(e){a||(we(t.$$.fragment,e),we(i),we(s.$$.fragment,e),a=!0)},o(e){ye(t.$$.fragment,e),ye(i),ye(s.$$.fragment,e),a=!1},d(e){be(t,e),e&&D(n),c[r].d(e),e&&D(o),be(s,e)}}}function nn(e){let t,n,r,i;n=new e[27]({props:{outline:!0,$$slots:{default:[on]},$$scope:{ctx:e}}}),n.$on("click",e[32]);let o=e[29]&&e[13]&&sn(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),U(t,"class","form--buttons svelte-jb5mrh")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};32768&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[29]&&e[13]?o?(o.p(e,r),8192&r[0]&&we(o,1)):(o=sn(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function rn(e){let t,n,r,i,o,s,a=e[23]&&ln(e);return r=new e[27]({props:{outline:!0,$$slots:{default:[cn]},$$scope:{ctx:e}}}),r.$on("click",e[32]),o=new e[26]({props:{text:"Liste aus "+e[17]}}),{c(){a&&a.c(),t=B(),n=O("div"),Ee(r.$$.fragment),i=B(),Ee(o.$$.fragment),U(n,"class","form--buttons svelte-jb5mrh")},m(e,l){a&&a.m(e,l),R(e,t,l),R(e,n,l),Ae(r,n,null),R(e,i,l),Ae(o,e,l),s=!0},p(e,n){e[23]?a?(a.p(e,n),8388608&n[0]&&we(a,1)):(a=ln(e),a.c(),we(a,1),a.m(t.parentNode,t)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge());const i={};32768&n[1]&&(i.$$scope={dirty:n,ctx:e}),r.$set(i);const s={};131072&n[0]&&(s.text="Liste aus "+e[17]),o.$set(s)},i(e){s||(we(a),we(r.$$.fragment,e),we(o.$$.fragment,e),s=!0)},o(e){ye(a),ye(r.$$.fragment,e),ye(o.$$.fragment,e),s=!1},d(e){a&&a.d(e),e&&D(t),e&&D(n),be(r),e&&D(i),be(o,e)}}}function on(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function sn(e){let t,n;return t=new e[27]({props:{filled:!0,$$slots:{default:[an]},$$scope:{ctx:e}}}),t.$on("click",e[33]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};32768&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function an(e){let t;return{c(){t=M("Neu")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function ln(e){let t,n;return t=new Ll({props:{item:e[21],record:{_id:"",[e[21].name]:""},noForm:"true",classId:"sel_"+e[21].name,eventId:e[22],required:!1,hidden:!1,readonly:!1,deList:e[23]}}),t.$on("notify",e[37]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2097152&n[0]&&(r.item=e[21]),2097152&n[0]&&(r.record={_id:"",[e[21].name]:""}),2097152&n[0]&&(r.classId="sel_"+e[21].name),4194304&n[0]&&(r.eventId=e[22]),8388608&n[0]&&(r.deList=e[23]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function cn(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function dn(e){let t,n,r,i;const o=[tn,en],s=[];function a(e,t){return e[45].length&&!e[18]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function un(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function hn(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:un,then:Qt,catch:Kt,value:45,blocks:[,,,]};return ve(n=e[30](e[4]),i),{c(){t=P(),i.block.c()},m(e,n){R(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,16&r[0]&&n!==(n=e[30](e[4]))&&ve(n,i)||_e(i,e,r)},i(e){r||(we(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}r=!1},d(e){e&&D(t),i.block.d(e),i.token=null,i=null}}}function fn(e,n,r){let i;const{Dialog:o,Divider:s,Button:a}=c,l=K(),{currentTasks:d}=u;b(e,d,(e=>r(41,i=e)));let{title:h}=n,{schema:f}=n,{record:m}=n,{recID:p}=n,{isOpening:g=!0}=n,{filterForReady:w=!1}=n,{filter:y}=n,{query:v}=n,{refStatus:_}=n,{praefix:I=""}=n,{selectionFields:C=!1}=n,{showEdit:$=!0}=n,{deList:E}=n,{newAllowed:A=!0}=n,{prevEventId:S}=n,{inputSearch:T}=n,{shouldBlock:N}=n,R=f.id;f.class;let D,k,O,x,M,B,P,L="",F=!1,V=!1;h??=f.identity.designation;const U=!i?.length||i.find((e=>e===R));return e.$$set=e=>{"title"in e&&r(0,h=e.title),"schema"in e&&r(2,f=e.schema),"record"in e&&r(3,m=e.record),"recID"in e&&r(1,p=e.recID),"isOpening"in e&&r(4,g=e.isOpening),"filterForReady"in e&&r(5,w=e.filterForReady),"filter"in e&&r(6,y=e.filter),"query"in e&&r(7,v=e.query),"refStatus"in e&&r(8,_=e.refStatus),"praefix"in e&&r(9,I=e.praefix),"selectionFields"in e&&r(10,C=e.selectionFields),"showEdit"in e&&r(11,$=e.showEdit),"deList"in e&&r(12,E=e.deList),"newAllowed"in e&&r(13,A=e.newAllowed),"prevEventId"in e&&r(14,S=e.prevEventId),"inputSearch"in e&&r(15,T=e.inputSearch),"shouldBlock"in e&&r(16,N=e.shouldBlock)},[h,p,f,m,g,w,y,v,_,I,C,$,E,A,S,T,N,L,F,D,O,M,B,P,V,o,s,a,d,U,async e=>{if(!e)return!1;const n=await ch(f.class,f.id);if(k=C&&C?.find((e=>f.class===e.refClass.split(":")[0])),r(20,O=k?.value?.get&&k.value.get(I)),O){x=k.refClass;const[e,n]=x.split(":"),[i]=n.split(".");r(21,M=k.parentClass.find((t=>t.name===e)));const o=await t.getSchemaByClass(M.refClass);r(22,B=o.id),r(17,L=k.parentClass.find((e=>e.name===i)).designation)}return n},()=>{r(18,F=!1),p||l("back"),$||l("back")},()=>{r(24,V=!0),r(18,F=!1),l("back")},()=>{r(24,V=!0),r(1,p=!1),r(19,D=!1),r(18,F=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,r]=t.split(".");let i=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===r));if(i){e[`${n}_${r}`]=e[n][r]}})),l("choose",{row:e})},({detail:e})=>{r(19,D=!!e._task.visum||"Closed"===e._task.status),r(1,p=e._docId),r(18,F=!0)},({detail:e})=>{O&&r(23,P=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};l("choose",{row:t})},function(t){Q(e,t)}]}class mn extends Te{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=O("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",N(document.head,t)),Se(this,e,fn,hn,A,{title:0,schema:2,record:3,recID:1,isOpening:4,filterForReady:5,filter:6,query:7,refStatus:8,praefix:9,selectionFields:10,showEdit:11,deList:12,newAllowed:13,prevEventId:14,inputSearch:15,shouldBlock:16},[-1,-1])}}const{document:pn}=Ie;function gn(e){e[28]=e[30].list,e[29]=e[30].items}function wn(e,t,n){const r=e.slice();return r[31]=t[n],r}function yn(e,t,n){const r=e.slice();return r[34]=t[n],r}function vn(e,t,n){const r=e.slice();return r[34]=t[n],r}function _n(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function In(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y;function v(t){e[25](t)}gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Cn]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let _={id:e[8]};void 0!==e[1]&&(_.value=e[1]),s=new e[6]({props:_}),ee.push((()=>$e(s,"value",v))),s.$on("input",e[12]),d=new tt({props:{size:"18"}});let I=e[29]?.length&&function(e){let t,n,r,i,o=e[29],s=[];for(let t=0;t<o.length;t+=1)s[t]=$n(vn(e,o,t));return{c(){t=O("thead"),n=O("tr"),r=O("th"),i=B();for(let e=0;e<s.length;e+=1)s[e].c();U(r,"class","svelte-14hcfjl"),U(n,"class","svelte-14hcfjl"),U(t,"class","svelte-14hcfjl")},m(e,o){R(e,t,o),N(t,n),N(n,r),N(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(o=e[29],r=0;r<o.length;r+=1){const i=vn(e,o,r);s[r]?s[r].p(i,t):(s[r]=$n(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&D(t),k(s,e)}}}(e),C=e[28]?.length&&function(e){let t,n,r=e[28],i=[];for(let t=0;t<r.length;t+=1)i[t]=bn(wn(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(44547&n[0]){let s;for(r=e[28],s=0;s<r.length;s+=1){const o=wn(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=bn(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),i=O("div"),o=M("Suchen: "),Ee(s.$$.fragment),l=B(),c=O("span"),Ee(d.$$.fragment),u=B(),h=O("div"),f=O("table"),I&&I.c(),m=B(),p=O("tbody"),C&&C.c(),U(t,"class","form--buttons svelte-14hcfjl"),U(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),U(f,"striped",""),U(f,"class","svelte-14hcfjl"),U(h,"class","eList svelte-14hcfjl")},m(a,v){R(a,t,v),Ae(n,t,null),R(a,r,v),R(a,i,v),N(i,o),Ae(s,i,null),N(i,l),N(i,c),Ae(d,c,null),R(a,u,v),R(a,h,v),N(h,f),I&&I.m(f,null),N(f,m),N(f,p),C&&C.m(p,null),g=!0,w||(y=L(c,"click",e[14]),w=!0)},p(e,t){gn(e);const r={};256&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],le((()=>a=!1))),s.$set(i),e[29]?.length&&I.p(e,t),e[28]?.length&&C.p(e,t)},i(e){g||(we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),we(C),g=!0)},o(e){ye(n.$$.fragment,e),ye(s.$$.fragment,e),ye(d.$$.fragment,e),ye(C),g=!1},d(e){e&&D(t),be(n),e&&D(r),e&&D(i),be(s),be(d),e&&D(u),e&&D(h),I&&I.d(),C&&C.d(),w=!1,y()}}}function Cn(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function $n(e){let t,n,r=e[34]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function En(e){let t,n,r,i,o,s,a,l;r=new it({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=An(yn(e,c,t));return{c(){t=O("tr"),n=O("td"),Ee(r.$$.fragment),i=B();for(let e=0;e<d.length;e+=1)d[e].c();o=B(),U(n,"class","editRow svelte-14hcfjl"),U(t,"class","pointer svelte-14hcfjl"),q(t,"active",e[31]._id===e[0])},m(c,u){R(c,t,u),N(t,n),Ae(r,n,null),N(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);N(t,o),s=!0,a||(l=L(n,"click",e[15](e[31])),a=!0)},p(n,r){if(e=n,3584&r[0]){let n;for(c=e[29],n=0;n<c.length;n+=1){const i=yn(e,c,n);d[n]?d[n].p(i,r):(d[n]=An(i),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&r[0]&&q(t,"active",e[31]._id===e[0])},i(e){s||(we(r.$$.fragment,e),s=!0)},o(e){ye(r.$$.fragment,e),s=!1},d(e){e&&D(t),be(r),k(d,e),a=!1,l()}}}function An(e){let t,n,r,i,o=e[9](e[31],e[34])+"";return{c(){t=O("td"),n=M(o),U(t,"class","svelte-14hcfjl")},m(o,s){R(o,t,s),N(t,n),r||(i=L(t,"click",V(e[10](e[31]))),r=!0)},p(t,n){e=t},d(e){e&&D(t),r=!1,i()}}}function bn(e){let t,n,r=e[13](e[31],e[29],e[1]),i=r&&En(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){2&n[0]&&(r=e[13](e[31],e[29],e[1])),r?i?(i.p(e,n),2&n[0]&&we(i,1)):(i=En(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function Sn(e){let t,n;return t=new e[5]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Tn(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Sn,then:In,catch:_n,value:30,blocks:[,,,]};return ve(e[11](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function Nn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Tn]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|256&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Rn(e,n,i){const o=K(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{classId:f}=n,{className:p}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:v}=n,{recordId:_}=n,{filter:I}=n,{multiValues:C}=n,$="",E=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const A=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?g(n):m(e[`_${t.name}`]||e[t.name]||"")},b=t.getSchemaByClass(p);Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(E)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await b;e.eventId===t.id&&mh(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(16,h=e.item),"classId"in e&&i(17,f=e.classId),"className"in e&&i(18,p=e.className),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(19,y=e.viewName),"viewValue"in e&&i(20,v=e.viewValue),"recordId"in e&&i(21,_=e.recordId),"filter"in e&&i(22,I=e.filter),"multiValues"in e&&i(23,C=e.multiValues)},[w,$,o,s,a,l,d,u,E,A,e=>()=>o("choose",{row:e}),async()=>{const e=await b;let n=[];if(h.lookup){const r="."+f+"#"+h.lookup,i=document.querySelector(r);let o=i?.value||_;if(C.has(h.lookup)){const r=C.get(h.lookup)[0];n=r?await t.getSectionView(h.name,{[h.lookup]:r},!0):await ch(h.name,e.id)}else if(o&&24===o.toString().length){const e=await fh(h.lookup,o);if(e){const r=e[h.name]?.map((e=>e[h.name]));r&&(n=await t.getSectionView(h.name,{_id:{$in:r}},!0))}}}else{const r="."+f+"#"+y.split(":")[0],i=document.querySelector(r);let o={[y]:i?.value||_};if(h.refItem){const e="."+f+"#"+h.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[h.refItem]:t.value},{[h.refItem]:{$exists:!0,$eq:""}}]};o={...o,...e}}}catch{}}o[y]&&(n=await t.getSectionView(e.class,o,!0)),I&&(n=n.filter((e=>e._id!=I)))}const r=e.display;return{list:n,items:await Xt(r,e,n)}},({detail:{value:e}})=>{i(1,$=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(A(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,$="")},e=>async()=>{const n=await t.getTaskByDocId(e._id,!0),r=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(r)},h,f,p,y,v,_,I,C,()=>o("back"),function(e){$=e,i(1,$)}]}class Dn extends Te{constructor(e){var t;super(),pn.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl .editRow.svelte-14hcfjl{width:1em}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",N(pn.head,t)),Se(this,e,Rn,Nn,A,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:kn}=Ie;function On(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function xn(e){let t,n,r=e[72]&&function(e){let t,n,r,i,s,a,l,c,d,u,h,f,m,p,g,w,y,v,_;function I(t){e[55](t)}function C(t){e[56](t)}let $={class:"full-width",id:e[32],rows:"1",required:e[2],disabled:e[3],placeholder:e[34],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[1]&&($.value=e[1]);void 0!==e[25]&&($.overwrite=e[25]);n=new o({props:$}),ee.push((()=>$e(n,"value",I))),ee.push((()=>$e(n,"overwrite",C))),n.$on("click",e[37]()),n.$on("blur",e[44]);const E=[Bn,Mn],A=[];function b(e,t){return!e[3]||e[16]?0:e[22]&&e[0]?1:-1}~(a=b(e))&&(l=A[a]=E[a](e));let T=(!e[3]||e[16]||e[17])&&Pn(e);function k(t){e[57](t)}let x={class:"tModal",noClickaway:!0,$$slots:{default:[Un]},$$scope:{ctx:e}};void 0!==e[19]&&(x.open=e[19]);m=new e[28]({props:x}),ee.push((()=>$e(m,"open",k)));let M=e[20]&&Hn(e);return{c(){t=O("div"),Ee(n.$$.fragment),s=B(),l&&l.c(),c=B(),d=O("input"),h=B(),T&&T.c(),f=B(),Ee(m.$$.fragment),g=B(),M&&M.c(),w=P(),U(d,"class",u=S(e[9]||e[10])+" svelte-jox15l"),U(d,"id",e[5]),U(d,"name",e[5]),d.value=e[0],d.hidden=!0,z(t,"position","relative")},m(r,i){R(r,t,i),Ae(n,t,null),N(t,s),~a&&A[a].m(t,null),N(t,c),N(t,d),N(t,h),T&&T.m(t,null),R(r,f,i),Ae(m,r,i),R(r,g,i),M&&M.m(r,i),R(r,w,i),y=!0,v||(_=L(t,"keydown",e[38]),v=!0)},p(e,o){const s={};4&o[0]&&(s.required=e[2]),8&o[0]&&(s.disabled=e[3]),!r&&2&o[0]&&(r=!0,s.value=e[1],le((()=>r=!1))),!i&&33554432&o[0]&&(i=!0,s.overwrite=e[25],le((()=>i=!1))),n.$set(s);let h=a;a=b(e),a===h?~a&&A[a].p(e,o):(l&&(pe(),ye(A[h],1,1,(()=>{A[h]=null})),ge()),~a?(l=A[a],l?l.p(e,o):(l=A[a]=E[a](e),l.c()),we(l,1),l.m(t,c)):l=null),(!y||1536&o[0]&&u!==(u=S(e[9]||e[10])+" svelte-jox15l"))&&U(d,"class",u),(!y||32&o[0])&&U(d,"id",e[5]),(!y||32&o[0])&&U(d,"name",e[5]),(!y||1&o[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[16]||e[17]?T?(T.p(e,o),196616&o[0]&&we(T,1)):(T=Pn(e),T.c(),we(T,1),T.m(t,null)):T&&(pe(),ye(T,1,1,(()=>{T=null})),ge());const f={};93126097&o[0]|2048&o[2]&&(f.$$scope={dirty:o,ctx:e}),!p&&524288&o[0]&&(p=!0,f.open=e[19],le((()=>p=!1))),m.$set(f),e[20]?M?(M.p(e,o),1048576&o[0]&&we(M,1)):(M=Hn(e),M.c(),we(M,1),M.m(w.parentNode,w)):M&&(pe(),ye(M,1,1,(()=>{M=null})),ge())},i(e){y||(we(n.$$.fragment,e),we(l),we(T),we(m.$$.fragment,e),we(M),y=!0)},o(e){ye(n.$$.fragment,e),ye(l),ye(T),ye(m.$$.fragment,e),ye(M),y=!1},d(e){e&&D(t),be(n),~a&&A[a].d(),T&&T.d(),e&&D(f),be(m,e),e&&D(g),M&&M.d(e),e&&D(w),v=!1,_()}}}(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,t){e[72]&&r.p(e,t)},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Mn(e){let t,n,r,i,o;return n=new it({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-jox15l")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[43]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Bn(e){let t,n,r,i,o;return n=new Tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-jox15l")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=[L(t,"click",e[37](!0)),L(t,"choose",e[40])],i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,$(o)}}}function Pn(e){let t,n,r,i,o;return n=new tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 pointer svelte-jox15l")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[42]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ln(e){let t,n,r,i;const o=[Vn,Fn],s=[];function a(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function Fn(e){let t,n;return t=new mn({props:{title:e[6].designation,newAllowed:e[23],prevEventId:e[11],schema:e[18],filter:e[33],query:e[35](),record:e[7],recID:e[0],isOpening:e[19],filterForReady:e[24],refStatus:e[6].refStatus,selectionFields:e[14],deList:e[15],praefix:e[13],shouldBlock:e[26],inputSearch:e[39]()}}),t.$on("choose",e[40]),t.$on("back",e[41]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.title=e[6].designation),8388608&n[0]&&(r.newAllowed=e[23]),2048&n[0]&&(r.prevEventId=e[11]),262144&n[0]&&(r.schema=e[18]),128&n[0]&&(r.record=e[7]),1&n[0]&&(r.recID=e[0]),524288&n[0]&&(r.isOpening=e[19]),16777216&n[0]&&(r.filterForReady=e[24]),64&n[0]&&(r.refStatus=e[6].refStatus),16384&n[0]&&(r.selectionFields=e[14]),32768&n[0]&&(r.deList=e[15]),8192&n[0]&&(r.praefix=e[13]),67108864&n[0]&&(r.shouldBlock=e[26]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Vn(e){let t,n;return t=new Dn({props:{item:e[6],className:e[18].class,classId:e[10],rowId:e[0],recordId:e[12],viewName:e[4],viewValue:"",multiValues:e[8]}}),t.$on("choose",e[40]),t.$on("back",e[41]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.item=e[6]),262144&n[0]&&(r.className=e[18].class),1024&n[0]&&(r.classId=e[10]),1&n[0]&&(r.rowId=e[0]),4096&n[0]&&(r.recordId=e[12]),16&n[0]&&(r.viewName=e[4]),256&n[0]&&(r.multiValues=e[8]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Un(e){let t,n,r=e[19]&&Ln(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[19]?r?(r.p(e,n),524288&n[0]&&we(r,1)):(r=Ln(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Hn(e){let t,n,r;function i(t){e[58](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[zn]},$$scope:{ctx:e}};return void 0!==e[20]&&(o.open=e[20]),t=new e[28]({props:o}),ee.push((()=>$e(t,"open",i))),{c(){Ee(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};2359297&r[0]|2048&r[2]&&(i.$$scope={dirty:r,ctx:e}),!n&&1048576&r[0]&&(n=!0,i.open=e[20],le((()=>n=!1))),t.$set(i)},i(e){r||(we(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){be(t,e)}}}function Wn(e){let t,n;return t=new wh({props:{schema:e[18],recID:e[0],readonly:!0}}),t.$on("back",e[41]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};262144&n[0]&&(r.schema=e[18]),1&n[0]&&(r.recID=e[0]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function zn(e){let t,n;return t=new e[27]({props:{title:e[21],$$slots:{default:[Wn]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2097152&n[0]&&(r.title=e[21]),262145&n[0]|2048&n[2]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function qn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function jn(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:qn,then:xn,catch:On,value:72,blocks:[,,,]};return ve(e[36](),r),{c(){t=P(),r.block.c()},m(e,i){R(e,t,i),r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(t,n){_e(r,e=t,n)},i(e){n||(we(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ye(r.blocks[e])}n=!1},d(e){e&&D(t),r.block.d(e),r.token=null,r=null}}}function Gn(e,n,r){let o,s,a,l;b(e,i,(e=>r(54,o=e)));const d=K(),{Dialog:h,Modal:f}=c,{currentTasks:m,environment:p,loggedIn:g}=u;b(e,m,(e=>r(60,s=e))),b(e,p,(e=>r(62,l=e))),b(e,g,(e=>r(61,a=e)));let{id:y}=n,{item:v}=n,{fullRecord:_}=n,{value:I=""}=n,{multiValues:C}=n,{desc:$=""}=n,{noForm:E=!1}=n,{classId:A}=n,{eventId:S}=n,{recordId:T}=n,{withRefValue:N=!1}=n,{refValue:R=""}=n,{shortEdit:D}=n,{required:k}=n,{disabled:O}=n,{readonly:x}=n,{praefix:M}=n,{selectionFields:B}=n,{formnovalidate:P}=n,{selection:L}=n,{deList:F}=n,{isTemplate:V}=n,{noList:U=!1}=n,{multi:H=!1}=n,{initFinished:W}=n;const z="comment_"+y,q=v.filter;let j,G,X,Y,Z,Q,J=!1,ee=!0,te=!0,ne=!0,re=!1,ie="";x||=T&&v.asInput,O||=x,!L&&v.selection&&1===v.selection.split(":").length&&(L=v.selection);const oe=x||O||v.lookup||L&&!v.constraint?"":"Suchbegriff ⏎",se=()=>{v.refItem&&v.refItem.startsWith("owner")&&(r(46,R=l.owner[v.refClass]),R||r(46,R=((e,t)=>{try{return e.split(".").reduce(((e,t)=>e[t]),t)}catch(e){return""}})(v.refItem,l)),R&&(r(45,N=!0),d("change",{value:R})))},ae=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{d("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},le=async e=>{const n=()=>{r(19,J=!0)};if(9==e.which)return;if(I)return e.preventDefault();if(13!=e.which)return;e.preventDefault();const i=X.items.find((e=>e.properties?.search));if(!i)return n();const o=e.srcElement.value,{name:s,checkOn:a,refClass:l,properties:c}=i;let{search:d}=c;!0===d&&(d={}),"number"==typeof d&&(d={min:d});const{min:u=3,start:h=!1,end:f=!1}=d;if(o.length<u)return n();const m=(h?"^":"")+o+(f?"$":"");let p={[s]:{$regex:m,$options:"i"}};a&&(p=[{$lookup:{from:l,localField:s,foreignField:"_id",as:l}},{$match:{[l+"."+a]:{$regex:m,$options:"i"}}}]);const g=await t.getSectionView(X.class,p);1!==g?.length?n():r(0,I=g[0]._id)},ce=e=>{e&&(r(53,ie=r(1,$=w(X,e))),d("setRefDesc",$.split(" •")[0]),d("change",{value:I,description:$}),d("task",{row:e,eventId:X.id}))},de=()=>{r(19,J=!1),r(20,j=!1)};return e.$$set=e=>{"id"in e&&r(5,y=e.id),"item"in e&&r(6,v=e.item),"fullRecord"in e&&r(7,_=e.fullRecord),"value"in e&&r(0,I=e.value),"multiValues"in e&&r(8,C=e.multiValues),"desc"in e&&r(1,$=e.desc),"noForm"in e&&r(9,E=e.noForm),"classId"in e&&r(10,A=e.classId),"eventId"in e&&r(11,S=e.eventId),"recordId"in e&&r(12,T=e.recordId),"withRefValue"in e&&r(45,N=e.withRefValue),"refValue"in e&&r(46,R=e.refValue),"shortEdit"in e&&r(49,D=e.shortEdit),"required"in e&&r(2,k=e.required),"disabled"in e&&r(3,O=e.disabled),"readonly"in e&&r(48,x=e.readonly),"praefix"in e&&r(13,M=e.praefix),"selectionFields"in e&&r(14,B=e.selectionFields),"formnovalidate"in e&&r(50,P=e.formnovalidate),"selection"in e&&r(4,L=e.selection),"deList"in e&&r(15,F=e.deList),"isTemplate"in e&&r(16,V=e.isTemplate),"noList"in e&&r(51,U=e.noList),"multi"in e&&r(17,H=e.multi),"initFinished"in e&&r(47,W=e.initFinished)},e.$$.update=()=>{if(4&e.$$.dirty[0]|524288&e.$$.dirty[1]&&r(2,k=k&&!P),49152&e.$$.dirty[1]&&N&&r(0,I=R),3&e.$$.dirty[0]|4194304&e.$$.dirty[1]&&!$&&I&&ie&&r(1,$=ie),268353&e.$$.dirty[0]|1114112&e.$$.dirty[1]&&I&&X){let e=!1;if(!Array.isArray(I)){const t=v.properties?.prefetch?500:0;if(T||v.asInput||v.upate||!1!==v.refItem||!1===v.refItem&&W)if(t){const t="p$"+v.refClass+"$"+S,n=lh(t);n?n.then((t=>{const n=t.find((({_id:e})=>e===I));n?ce(n):e=!0})):e=!0}else e=!0;e&&dh(v.refClass,X.id,I,!!v.lookup||U).then(ce),r(47,W=!0)}}if(65&e.$$.dirty[0]|10485760&e.$$.dirty[1]&&I&&Y&&v.name===Y.input?.at(0)&&Y.inputLookup?.length){const{domain:e}=Y.inputLookup[0]||{};"user"===e&&(o.some((e=>Y.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,O=!0))}262145&e.$$.dirty[0]&&!I&&X&&ce({})},[I,$,k,O,L,y,v,_,C,E,A,S,T,M,B,F,V,H,X,J,j,G,Z,ee,te,ne,re,h,f,m,p,g,z,q,oe,()=>{if(!v.query)return;const[e,t]=v.query.split(".");if(!_[t])return;let n=[{$lookup:{from:e,localField:e,foreignField:"_id",as:"__"+e}},{$unwind:{path:"$__"+e,preserveNullAndEmptyArrays:!0}},{$match:{["__"+e+"."+t]:_[t]}}];return v.refStatus&&(n=n.concat([{$addFields:{_docId:{$toString:"$_id"}}},{$lookup:{from:"_task",localField:"_docId",foreignField:"docId",as:"_task"}},{$unwind:{path:"$_task",preserveNullAndEmptyArrays:!0}},{$match:{"_task.status":v.refStatus}}])),n},async()=>{try{const e=await t.getEvent(S);if(Q="report"===e.output.type,r(24,te=!v.asInput),r(23,ee=e.output?.class[0].name!==v.refClass),r(18,X=await t.getSchemaByClass(v.refClass)),X?.blocked)return d("initFail",!0),!1;if(Q||r(26,re=((e,t)=>{let n=t.items.find((e=>!!e.properties?.blocking));if(!n)return!1;if(e.input?.class?.find((e=>e.name===t.class)))return n.name;const r=e.output?.class.at(0)?.list||[];for(const e of r){const t=e.item.find((e=>e.name===v.name));if(t?.properties?.blocking)return n.name}return!1})(e,X)),ae(X),r(22,Z=(e=>!s?.length||!!s.find((t=>t===e)))(X.id)),r(52,Y=await t.getSchema(S)),S&&T&&I&&!O&&Y.input?.find((e=>e===v.refClass))&&r(3,O=!0),e.input?.class&&e.input.class[0]&&(e.input.class[0].name===v.refClass&&e.input.class[0].readonly&&r(3,O=!0),T&&e.input.class[0].name===v.refClass&&e.input.class[0].writeState)){(await t.getTaskByDocId(T,!0)).status===e.input.class[0].writeState&&r(3,O=r(48,x=!1))}if(v.properties?.query?.lookup){const{domain:e,value:n}=v.properties.query.lookup;if("user"===e){const e=a.user,i={[n]:e},s=await t.getSectionView(v.refClass,i);if(s?.length){const[{_id:e}]=s;e&&(r(46,R=e),r(45,N=!0),d("change",{value:R}))}o.some((e=>X.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,O=!0)}}else se();if(!R&&v.filter&&(""===M||void 0===M)){const e=v.filter,n=!0;e.startsWith("!")&&(n=!1,e=e.slice(1));const i=await t.getOneAndOnly(v.refClass,{[v.filter]:n});i&&(r(46,R=i._id),r(45,N=!0),d("change",{value:R}))}return r(21,G=X.identity.designation),!0}catch{return d("initFail",!0),!1}},e=>t=>{if(t.stopPropagation(),!0===e&&r(19,J=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(v.lookup||L&&!v.constraint||I)&&r(19,J=!0)},le,()=>{if(I)return"";const e=document.getElementById(z);return r(1,$=""),e?.value||""},({detail:e})=>{r(0,I=e.row._id),de()},de,()=>{(Q||Z)&&(H?d("change",{value:I,delete:!0}):(r(0,I=""),r(1,$=""),r(25,ne=!0),d("change",{value:I,description:$}),d("task",{row:{_task:{event:X.id,_id:!1}}})))},async()=>{if(!I)return;let e=await dh(v.refClass,X.id,I);e._task||(e={_task:await t.getTaskByDocId(I,!0)});const n=e._task.task_id||e._task._id,r=`/task/${e._task.event}/${n}/task?view=standalone`;window.open(r)},e=>{I||$&&le({which:13,preventDefault:()=>{},srcElement:{value:$}})},N,R,W,x,D,P,U,Y,ie,o,function(e){$=e,r(1,$),r(0,I),r(53,ie),r(45,N),r(46,R)},function(e){ne=e,r(25,ne)},function(e){J=e,r(19,J)},function(e){j=e,r(20,j)}]}class Xn extends Te{constructor(e){var t;super(),kn.getElementById("svelte-jox15l-style")||((t=O("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",N(kn.head,t)),Se(this,e,Gn,jn,A,{id:5,item:6,fullRecord:7,value:0,multiValues:8,desc:1,noForm:9,classId:10,eventId:11,recordId:12,withRefValue:45,refValue:46,shortEdit:49,required:2,disabled:3,readonly:48,praefix:13,selectionFields:14,formnovalidate:50,selection:4,deList:15,isTemplate:16,noList:51,multi:17,initFinished:47},[-1,-1,-1])}}function Yn(e,t,n){const r=e.slice();return r[40]=t[n],r[42]=n,r}function Zn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Kn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[er]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8191&n[0]|4096&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Qn(e){let t,n,r,i,o;return n=new ft({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",(function(){E(e[22](e[0]))&&e[22](e[0]).apply(this,arguments)})),i=!0)},p(t,n){e=t},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Jn(e){let t,n;return t=new Xn({props:{classId:e[6],eventId:e[7],required:e[9],disabled:e[1],formnovalidate:e[12],readonly:e[10],id:e[2]+"."+e[42],item:e[3],desc:e[4],value:e[40],noForm:e[5],praefix:e[11],recordId:e[8],multi:!0}}),t.$on("change",e[24]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.classId=e[6]),128&n[0]&&(r.eventId=e[7]),512&n[0]&&(r.required=e[9]),2&n[0]&&(r.disabled=e[1]),4096&n[0]&&(r.formnovalidate=e[12]),1024&n[0]&&(r.readonly=e[10]),4&n[0]&&(r.id=e[2]+"."+e[42]),8&n[0]&&(r.item=e[3]),16&n[0]&&(r.desc=e[4]),1&n[0]&&(r.value=e[40]),32&n[0]&&(r.noForm=e[5]),2048&n[0]&&(r.praefix=e[11]),256&n[0]&&(r.recordId=e[8]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function er(e){let t,n,r,i=!e[10]&&Qn(e),o=[].concat(e[0]),s=[];for(let t=0;t<o.length;t+=1)s[t]=Jn(Yn(e,o,t));const a=e=>ye(s[e],1,1,(()=>{s[e]=null}));return{c(){i&&i.c(),t=B();for(let e=0;e<s.length;e+=1)s[e].c();n=P()},m(e,o){i&&i.m(e,o),R(e,t,o);for(let t=0;t<s.length;t+=1)s[t].m(e,o);R(e,n,o),r=!0},p(e,r){if(e[10]?i&&(pe(),ye(i,1,1,(()=>{i=null})),ge()):i?(i.p(e,r),1024&r[0]&&we(i,1)):(i=Qn(e),i.c(),we(i,1),i.m(t.parentNode,t)),16785407&r[0]){let t;for(o=[].concat(e[0]),t=0;t<o.length;t+=1){const i=Yn(e,o,t);s[t]?(s[t].p(i,r),we(s[t],1)):(s[t]=Jn(i),s[t].c(),we(s[t],1),s[t].m(n.parentNode,n))}for(pe(),t=o.length;t<s.length;t+=1)a(t);ge()}},i(e){if(!r){we(i);for(let e=0;e<o.length;e+=1)we(s[e]);r=!0}},o(e){ye(i),s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)ye(s[e]);r=!1},d(e){i&&i.d(e),e&&D(t),k(s,e),e&&D(n)}}}function tr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function nr(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[ir]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[0]&&(r.title=e[14].designation),49480&n[0]|4096&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function rr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function ir(e){let t,n,r,i,o;return n=new e[19]({props:{outline:!0,$$slots:{default:[rr]},$$scope:{ctx:e}}}),n.$on("click",e[25]),i=new Zt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),i.$on("choose",e[23]),i.$on("back",e[25]),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),Ee(i.$$.fragment),U(t,"class","form--buttons")},m(e,s){R(e,t,s),Ae(n,t,null),R(e,r,s),Ae(i,e,s),o=!0},p(e,t){const r={};4096&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const o={};8&t[0]&&(o.item=e[3]),16384&t[0]&&(o.className=e[14].class),64&t[0]&&(o.classId=e[6]),32768&t[0]&&(o.rowId=e[15]),256&t[0]&&(o.recordId=e[8]),i.$set(o)},i(e){o||(we(n.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(n.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){e&&D(t),be(n),e&&D(r),be(i,e)}}}function or(e){let t,n,r=e[13]&&nr(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[13]?r?(r.p(e,n),8192&n[0]&&we(r,1)):(r=nr(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function sr(e){let t,n,r,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:tr,then:Kn,catch:Zn,value:39,blocks:[,,,]};function s(t){e[34](t)}ve(e[20](),o);let a={class:"tModal",noClickaway:!0,$$slots:{default:[or]},$$scope:{ctx:e}};return void 0!==e[13]&&(a.open=e[13]),n=new e[17]({props:a}),ee.push((()=>$e(n,"open",s))),{c(){o.block.c(),t=B(),Ee(n.$$.fragment)},m(e,r){o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,R(e,t,r),Ae(n,e,r),i=!0},p(t,i){_e(o,e=t,i);const s={};57672&i[0]|4096&i[1]&&(s.$$scope={dirty:i,ctx:e}),!r&&8192&i[0]&&(r=!0,s.open=e[13],le((()=>r=!1))),n.$set(s)},i(e){i||(we(o.block),we(n.$$.fragment,e),i=!0)},o(e){for(let e=0;e<3;e+=1){ye(o.blocks[e])}ye(n.$$.fragment,e),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&D(t),be(n,e)}}}function ar(e,n,r){const i=K(),{Card:o,Modal:s,Dialog:a,Button:l}=c;let d,u,{id:h}=n,{item:f}=n,{record:m}=n,{values:p=[]}=n,{desc:g=""}=n,{noForm:w=!1}=n,{classId:y}=n,{eventId:v}=n,{recordId:_}=n,{withRefValue:I=!1}=n,{refValue:C=""}=n,{required:$}=n,{disabled:E}=n,{readonly:A}=n,{praefix:b}=n,{selectionFields:S}=n,{formnovalidate:T}=n,{selection:N}=n,{deList:R}=n,{isTemplate:D}=n,{noList:k=!1}=n,O=!1;const{lookup:x,filter:M,constraint:B}=f.properties.multi;E=!0;const P=()=>{r(13,O=!1)};return e.$$set=e=>{"id"in e&&r(2,h=e.id),"item"in e&&r(3,f=e.item),"record"in e&&r(26,m=e.record),"values"in e&&r(0,p=e.values),"desc"in e&&r(4,g=e.desc),"noForm"in e&&r(5,w=e.noForm),"classId"in e&&r(6,y=e.classId),"eventId"in e&&r(7,v=e.eventId),"recordId"in e&&r(8,_=e.recordId),"withRefValue"in e&&r(27,I=e.withRefValue),"refValue"in e&&r(28,C=e.refValue),"required"in e&&r(9,$=e.required),"disabled"in e&&r(1,E=e.disabled),"readonly"in e&&r(10,A=e.readonly),"praefix"in e&&r(11,b=e.praefix),"selectionFields"in e&&r(29,S=e.selectionFields),"formnovalidate"in e&&r(12,T=e.formnovalidate),"selection"in e&&r(30,N=e.selection),"deList"in e&&r(31,R=e.deList),"isTemplate"in e&&r(32,D=e.isTemplate),"noList"in e&&r(33,k=e.noList)},[p,E,h,f,g,w,y,v,_,$,A,b,T,O,d,u,o,s,a,l,async()=>{r(0,p=[].concat(p)),r(14,d=await t.getSchemaByClass(f.refClass))},async()=>{let e=await ch(d.class,d.id);if(!e?.length)return[];if(x&&(e=e.filter((e=>m[x]===e[x]))),B&&e?.length){const{refClass:n,refStatus:r}=B,i=[{$match:{[d.class]:{$in:e.map((({_id:e})=>e))}}},{$addFields:{_docId:{$toString:"$_id"}}},{$lookup:{from:"_task",localField:"_docId",foreignField:"docId",as:"_task"}},{$unwind:{path:"$_task",preserveNullAndEmptyArrays:!0}},{$match:{"_task.status":r}}],o=await t.getSectionView(n,i);e=e.filter((e=>!!o.find((t=>t.project==e._id))))}if(M)for(const t in M)e=e.filter((e=>{let[n,r]=t.split(".");if(r||(r=n,n=""),n){if(e[n][0]&&e[n][0][r].length)return!0}else if(e[r])return!0;return!1}));return e},e=>()=>{A||(e=[].concat(e),r(13,O=!0),r(15,u=e))},({detail:e})=>{const t=e.row._id;r(0,p=[].concat(p)),Array.isArray(p)&&!p.find((e=>e===t))&&r(0,p=p.concat(e.row._id)),P()},({detail:e})=>{r(0,p=[].concat(p)),e.delete&&r(0,p=p.filter((t=>t!==e.value))),e.value=p,i("change",e),i("multi",{lookup:x,filter:M,name:f.name,value:p})},P,m,I,C,S,N,R,D,k,function(e){O=e,r(13,O)}]}class lr extends Te{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=O("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",N(document.head,t)),Se(this,e,ar,sr,A,{id:2,item:3,record:26,values:0,desc:4,noForm:5,classId:6,eventId:7,recordId:8,withRefValue:27,refValue:28,required:9,disabled:1,readonly:10,praefix:11,selectionFields:29,formnovalidate:12,selection:30,deList:31,isTemplate:32,noList:33},[-1,-1])}}const cr=/\d+/g,dr=/%[HMSpPdmyY%]/g;function ur(e,t,n){const r=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const o=t.split(dr);let s=0,a=0;const l=new Date(0);for(const c of o){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(a!==t.length)return n;break}if("%"!==t[a+c.length])break;if(a+=c.length+1,"%"===t[a]){if("%"!==e[s])return n;s++}else if("p"===t[a].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)i=!1,l.getHours()>=12&&l.setHours(l.getHours()-12);else{if("PM"!==t)return n;i=!0,l.getHours()<12&&l.setHours(l.getHours()+12)}}else{cr.lastIndex=s;const o=cr.exec(e);if(null==o)return n;switch(t[a]){case"H":l.setHours(parseInt(o[0])+12*i);break;case"M":l.setMinutes(o[0]);break;case"S":l.setSeconds(o[0]);break;case"d":l.setDate(o[0]);break;case"m":l.setMonth(o[0]-1);break;case"y":l.setFullYear(100*r+parseInt(o[0]));break;case"Y":l.setFullYear(o[0])}s+=o[0].length}a++}return isNaN(l.valueOf())?n:l}function hr(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:fr}=Ie;function mr(e,t,n){const r=e.slice();return r[17]=t[n],r}function pr(e,t,n){const r=e.slice();return r[20]=t[n],r}function gr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function wr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m=e[0].items,p=[];for(let t=0;t<m.length;t+=1)p[t]=vr(pr(e,m,t));const g=e=>ye(p[e],1,1,(()=>{p[e]=null}));let w=e[0].list&&_r(e);return l=new e[5]({props:{outline:!0,$$slots:{default:[Cr]},$$scope:{ctx:e}}}),l.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[$r]},$$scope:{ctx:e}}}),{c(){t=O("form"),n=O("input"),i=B();for(let e=0;e<p.length;e+=1)p[e].c();o=B(),w&&w.c(),s=B(),a=O("div"),Ee(l.$$.fragment),c=B(),Ee(d.$$.fragment),U(n,"class",S(e[6])+" svelte-1phofh5"),U(n,"name","_id"),U(n,"type","hidden"),n.value=r=e[1]._id||"",U(t,"class","fTask svelte-1phofh5"),U(t,"id",e[6]),U(a,"class","form--buttons svelte-1phofh5")},m(r,m){R(r,t,m),N(t,n),N(t,i);for(let e=0;e<p.length;e+=1)p[e].m(t,null);N(t,o),w&&w.m(t,null),R(r,s,m),R(r,a,m),Ae(l,a,null),N(a,c),Ae(d,a,null),u=!0,h||(f=[L(t,"keydown",e[8]),L(t,"submit",F(e[10]))],h=!0)},p(e,i){if((!u||2&i&&r!==(r=e[1]._id||""))&&(n.value=r),75&i){let n;for(m=e[0].items,n=0;n<m.length;n+=1){const r=pr(e,m,n);p[n]?(p[n].p(r,i),we(p[n],1)):(p[n]=vr(r),p[n].c(),we(p[n],1),p[n].m(t,o))}for(pe(),n=m.length;n<p.length;n+=1)g(n);ge()}e[0].list?w?(w.p(e,i),1&i&&we(w,1)):(w=_r(e),w.c(),we(w,1),w.m(t,null)):w&&(pe(),ye(w,1,1,(()=>{w=null})),ge());const s={};8388608&i&&(s.$$scope={dirty:i,ctx:e}),l.$set(s);const a={};4&i&&(a.disabled=e[2]),8388608&i&&(a.$$scope={dirty:i,ctx:e}),d.$set(a)},i(e){if(!u){for(let e=0;e<m.length;e+=1)we(p[e]);we(w),we(l.$$.fragment,e),we(d.$$.fragment,e),u=!0}},o(e){p=p.filter(Boolean);for(let e=0;e<p.length;e+=1)ye(p[e]);ye(w),ye(l.$$.fragment,e),ye(d.$$.fragment,e),u=!1},d(e){e&&D(t),k(p,e),w&&w.d(),e&&D(s),e&&D(a),be(l),be(d),h=!1,$(f)}}}function yr(e){let t,n;return t=new Ll({props:{classId:e[6],item:e[20],selection:e[20].selection,record:e[1],disabled:e[3],eventId:e[0].id,required:!1,isTemplate:!0}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.item=e[20]),1&n&&(r.selection=e[20].selection),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),1&n&&(r.eventId=e[0].id),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function vr(e){let t,n,r=br(!0,e[20]),i=r&&yr(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){1&n&&(r=br(!0,e[20])),r?i?(i.p(e,n),1&n&&we(i,1)):(i=yr(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function _r(e){let t,n,r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=Ir(mr(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(75&n){let s;for(r=e[0].list,s=0;s<r.length;s+=1){const o=mr(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=Ir(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}function Ir(e){let t,n,r,i;return t=new e[4]({props:{text:e[17].designation}}),r=new Lr({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){Ee(t.$$.fragment),n=B(),Ee(r.$$.fragment)},m(e,o){Ae(t,e,o),R(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const o={};1&n&&(o.list=e[17]),1&n&&(o.eventId=e[0].id),1&n&&(o.schema=e[17].item),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),r.$set(o)},i(e){i||(we(t.$$.fragment,e),we(r.$$.fragment,e),i=!0)},o(e){ye(t.$$.fragment,e),ye(r.$$.fragment,e),i=!1},d(e){be(t,e),e&&D(n),be(r,e)}}}function Cr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function $r(e){let t;return{c(){t=M("Speichern")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Er(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Ar(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Er,then:wr,catch:gr,value:16,blocks:[,,,]};return ve(e[7](),i),{c(){t=B(),n=O("section"),i.block.c(),fr.title="Vorgaben",U(n,"class","sTask svelte-1phofh5")},m(e,o){R(e,t,o),R(e,n,o),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,r=!0},p(t,[n]){_e(i,e=t,n)},i(e){r||(we(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}r=!1},d(e){e&&D(t),e&&D(n),i.block.d(),i.token=null,i=null}}}const br=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Sr(e,r,o){let l,d,u;b(e,a,(e=>o(11,d=e))),b(e,i,(e=>o(12,u=e)));const{Divider:h,Button:f,FormField:m}=c,p=JSON.parse(n.getItem("Locale"));let{schema:g}=r,{record:w}=r,y="template-"+g.class+Math.floor(9e3*Math.random()+1e3).toString(),v=!1;const _=()=>window.history.back(),I=(e,t,n=!1)=>{const r=t.id,i=e.find((e=>e.name===r));let o=t.value;if(!n&&i&&i.properties?.multi&&(o=w[r]),o&&i&&i.type.startsWith("date"))try{return ur(o,"%d.%m.%Y").toISOString()}catch{return new Date(o).toISOString()}if(i&&"boolean"===i.type&&(o=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(p.id).substring(1,2);try{o=Number(o.replace(e,".")).toString()}catch{}}return o};return e.$$set=e=>{"schema"in e&&o(0,g=e.schema),"record"in e&&o(1,w=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,l=v)},[g,w,v,l,h,f,y,async()=>{const e=await t.getEvent(g.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,v=!0),d.role?.length&&g.authorization?.length){const e=g.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,v||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},_,async e=>{const n={};Array.from(document.querySelectorAll("form#"+y+" ."+y)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[r,i]=t.split("."),o=g.list.find((e=>e.name===r));n[t]=I(o.item,e)}else n[t]=I(g.items,e)})),await t.saveTemplate(g.class,n),s.success("Die Vorgaben wurden gespeichert.",2e3),_()}]}const{document:Tr}=Ie;function Nr(e,t,n){const r=e.slice();return r[28]=t[n],r}function Rr(e){let t,n;return t=new Ll({props:{classId:e[2],item:e[28],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5],currency:e[8]}}),t.$on("notify",e[14]),t.$on("defPrep",e[16]),t.$on("task",e[21]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),2&n[0]&&(r.item=e[28]),2&n[0]&&(r.listName=e[1].name),8&n[0]&&(r.eventId=e[3]),1&n[0]&&(r.record=e[0]),16&n[0]&&(r.disabled=e[4]),32&n[0]&&(r.required=e[5]),256&n[0]&&(r.currency=e[8]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Dr(e){let t,n,r=br(e[7],e[28]),i=r&&Rr(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){130&n[0]&&(r=br(e[7],e[28])),r?i?(i.p(e,n),130&n[0]&&we(i,1)):(i=Rr(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function kr(e){let t,n,r,i=e[1].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=Dr(Nr(e,i,t));const s=e=>ye(o[e],1,1,(()=>{o[e]=null}));return{c(){t=O("div");for(let e=0;e<o.length;e+=1)o[e].c();U(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){R(e,t,n);for(let e=0;e<o.length;e+=1)o[e].m(t,null);r=!0},p(e,a){if(82367&a[0]){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const r=Nr(e,i,n);o[n]?(o[n].p(r,a),we(o[n],1)):(o[n]=Dr(r),o[n].c(),we(o[n],1),o[n].m(t,null))}for(pe(),n=i.length;n<o.length;n+=1)s(n);ge()}(!r||6&a[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&U(t,"id",n)},i(e){if(!r){for(let e=0;e<i.length;e+=1)we(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)ye(o[e]);r=!1},d(e){e&&D(t),k(o,e)}}}function Or(e){let t,n,r=e[13](e[9])+"";return{c(){t=O("span"),n=M(r)},m(e,r){R(e,t,r),N(t,n)},p(e,t){512&t[0]&&r!==(r=e[13](e[9])+"")&&H(n,r)},d(e){e&&D(t)}}}function xr(e){let t,n,r;return n=new e[10]({props:{$$slots:{default:[Or]},$$scope:{ctx:e}}}),n.$on("click",(function(){E(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=O("div"),Ee(n.$$.fragment),U(t,"class","accordion svelte-148ktt9"),U(t,"slot","handle")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(t,r){e=t;const i={};512&r[0]|1&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Mr(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[xr,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[kr,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.open=e[6]),134218687&n[0]|1&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Br(e){let t,n,r;return n=new e[11]({props:{$$slots:{default:[Mr]},$$scope:{ctx:e}}}),{c(){t=O("div"),Ee(n.$$.fragment),U(t,"class","formList")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1023&t[0]|1&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Pr(e,n,r){const{Button:i,Accordion:o,AccordionSection:s}=c;let{list:a}=n,{schema:l}=n,{record:d}=n,{classId:u}=n,{eventId:h}=n,{disabled:f}=n,{required:w}=n,{open:y=!1}=n,{template:v={}}=n,{isTemplate:_=!1}=n,{currency:I}=n,{update:C=!1}=n,$=new Map;const E={};let A=d[a.name]||{};d[a.name]=A;const b=e=>E[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),S=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&r(1,a=e.list),"schema"in e&&r(18,l=e.schema),"record"in e&&r(0,d=e.record),"classId"in e&&r(2,u=e.classId),"eventId"in e&&r(3,h=e.eventId),"disabled"in e&&r(4,f=e.disabled),"required"in e&&r(5,w=e.required),"open"in e&&r(6,y=e.open),"template"in e&&r(19,v=e.template),"isTemplate"in e&&r(7,_=e.isTemplate),"currency"in e&&r(8,I=e.currency),"update"in e&&r(20,C=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&C&&d&&r(9,A=d[a.name]||{})},[d,a,u,h,f,w,y,_,I,A,i,o,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?b(t.name):"boolean"===t.type?g(e[t.name]):"date"===t.type?m(e[t.name]):"datetime"===t.type?p(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(E[n]=e.desc);const i=d[t];r(0,d[t]={...i,[n]:e.value},d),r(9,A=d[t])},e=>t=>{(()=>{const e=v[a.name]||{};for(const t in e)v[a.name][t]&&!d[a.name][t]&&r(0,d[a.name][t]=v[a.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${a.name} > div.form-field:last-child`,i=document.querySelector(n);se().then((()=>{const e=`#accordion-content-${u}-${a.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(S)})).then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:r}})=>{if($.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===className+"."+a.name))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&$.set(e,o[0])},()=>{setTimeout((()=>{Array.from($).forEach((([e,t])=>{d[a.name][e]||r(0,d[a.name][e]=t._id,d)}))}),500)},l,v,C,function(t){Q(e,t)}]}class Lr extends Te{constructor(e){var t;super(),Tr.getElementById("svelte-148ktt9-style")||((t=O("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",N(Tr.head,t)),Se(this,e,Pr,Br,A,{list:1,schema:18,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:19,isTemplate:7,currency:8,update:20},[-1,-1])}}const{document:Fr}=Ie;function Vr(e){e[0]=e[23].list,e[22]=e[23].items}function Ur(e,t,n){const r=e.slice();return r[24]=t[n],r}function Hr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Wr(e,t,n){const r=e.slice();return r[27]=t[n],r}function zr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function qr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y;function v(t){e[19](t)}Vr(e),n=new e[7]({props:{outline:!0,$$slots:{default:[jr]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let _={id:e[8]};void 0!==e[1]&&(_.value=e[1]),s=new e[6]({props:_}),ee.push((()=>$e(s,"value",v))),s.$on("input",e[12]),d=new tt({props:{size:"18"}});let I=e[22]?.length&&function(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Gr(Wr(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();U(n,"class","svelte-14hcfjl"),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[22],o=0;o<r.length;o+=1){const s=Wr(e,r,o);i[o]?i[o].p(s,t):(i[o]=Gr(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&D(t),k(i,e)}}}(e),C=e[0]?.length&&function(e){let t,n=e[0],r=[];for(let t=0;t<n.length;t+=1)r[t]=Zr(Ur(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=P()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);R(e,t,n)},p(e,i){if(11778&i[0]){let o;for(n=e[0],o=0;o<n.length;o+=1){const s=Ur(e,n,o);r[o]?r[o].p(s,i):(r[o]=Zr(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){k(r,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),i=O("div"),o=M("Suchen: "),Ee(s.$$.fragment),l=B(),c=O("span"),Ee(d.$$.fragment),u=B(),h=O("div"),f=O("table"),I&&I.c(),m=B(),p=O("tbody"),C&&C.c(),U(t,"class","form--buttons svelte-14hcfjl"),U(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),U(f,"striped",""),U(f,"class","svelte-14hcfjl"),U(h,"class","eList svelte-14hcfjl")},m(a,v){R(a,t,v),Ae(n,t,null),R(a,r,v),R(a,i,v),N(i,o),Ae(s,i,null),N(i,l),N(i,c),Ae(d,c,null),R(a,u,v),R(a,h,v),N(h,f),I&&I.m(f,null),N(f,m),N(f,p),C&&C.m(p,null),g=!0,w||(y=L(c,"click",e[14]),w=!0)},p(e,t){Vr(e);const r={};2&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],le((()=>a=!1))),s.$set(i),e[22]?.length&&I.p(e,t),e[0]?.length&&C.p(e,t)},i(e){g||(we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),g=!0)},o(e){ye(n.$$.fragment,e),ye(s.$$.fragment,e),ye(d.$$.fragment,e),g=!1},d(e){e&&D(t),be(n),e&&D(r),e&&D(i),be(s),be(d),e&&D(u),e&&D(h),I&&I.d(),C&&C.d(),w=!1,y()}}}function jr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Gr(e){let t,n,r=e[27]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function Xr(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Yr(Hr(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=B(),U(t,"class","pointer svelte-14hcfjl")},m(e,r){R(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);N(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[22],s=0;s<r.length;s+=1){const a=Hr(e,r,s);i[s]?i[s].p(a,o):(i[s]=Yr(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(e){e&&D(t),k(i,e)}}}function Yr(e){let t,n,r,i,o=e[9](e[24],e[27])+"";return{c(){t=O("td"),n=M(o),U(t,"class","svelte-14hcfjl")},m(o,s){R(o,t,s),N(t,n),r||(i=L(t,"click",V(e[10](e[24]))),r=!0)},p(t,n){e=t},d(e){e&&D(t),r=!1,i()}}}function Zr(e){let t,n=e[13](e[24],e[22],e[1]),r=n&&Xr(e);return{c(){r&&r.c(),t=P()},m(e,n){r&&r.m(e,n),R(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[24],e[22],e[1])),n?r?r.p(e,i):(r=Xr(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&D(t)}}}function Kr(e){let t,n;return t=new e[5]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Qr(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Kr,then:qr,catch:zr,value:23,blocks:[,,,]};return ve(e[11](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function Jr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Qr]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ei(e,n,r){const i=K(),{Dialog:o,Divider:s,Loading:a,TextField:l,Button:d}=c;let{item:u}=n,{className:h}=n,{classId:f}=n,{list:p}=n,w="",y=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const v=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?g(n):m(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(y)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&r(15,u=e.item),"className"in e&&r(16,h=e.className),"classId"in e&&r(17,f=e.classId),"list"in e&&r(0,p=e.list)},[p,w,i,o,s,a,l,d,y,v,e=>()=>i("choose",{row:e}),async()=>{const e=await _,t=e.display;let n=await Xt(t,e,p);return{list:p,items:n}},({detail:{value:e}})=>{r(1,w=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(v(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,w="")},u,h,f,()=>i("back"),function(e){w=e,r(1,w)}]}class ti extends Te{constructor(e){var t;super(),Fr.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",N(Fr.head,t)),Se(this,e,ei,Jr,A,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:ni}=Ie;function ri(e,t,n){const r=e.slice();return r[11]=t[n],r}function ii(e,t,n){const r=e.slice();return r[3]=t[n],r}function oi(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function si(e){let t,n,r,i=e[7].items,o=[];for(let t=0;t<i.length;t+=1)o[t]=ui(ii(e,i,t));const s=e=>ye(o[e],1,1,(()=>{o[e]=null}));let a=e[7].list&&hi(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=B(),a&&a.c(),n=P()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);R(e,t,i),a&&a.m(e,i),R(e,n,i),r=!0},p(e,r){if(30327783&r[0]){let n;for(i=e[7].items,n=0;n<i.length;n+=1){const s=ii(e,i,n);o[n]?(o[n].p(s,r),we(o[n],1)):(o[n]=ui(s),o[n].c(),we(o[n],1),o[n].m(t.parentNode,t))}for(pe(),n=i.length;n<o.length;n+=1)s(n);ge()}e[7].list?a?(a.p(e,r),128&r[0]&&we(a,1)):(a=hi(e),a.c(),we(a,1),a.m(n.parentNode,n)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge())},i(e){if(!r){for(let e=0;e<i.length;e+=1)we(o[e]);we(a),r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)ye(o[e]);ye(a),r=!1},d(e){k(o,e),e&&D(t),a&&a.d(e),e&&D(n)}}}function ai(e){let t,n,r,i;const o=[ci,li],s=[];function a(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=P()},m(e,n){~t&&s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){~t&&s[t].d(e),e&&D(r)}}}function li(e){let t,n;return t=new Ll({props:{classId:e[8],item:e[3],record:e[6],disabled:e[3].name===e[14]&&e[15]||e[0],eventId:e[5],currency:e[2],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.item=e[3]),64&n[0]&&(r.record=e[6]),129&n[0]&&(r.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(r.eventId=e[5]),4&n[0]&&(r.currency=e[2]),512&n[0]&&(r.changeValue=e[9]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ci(e){let t,n,r,i;n=new Ll({props:{classId:e[8],item:e[3],record:e[6],disabled:e[0]||!!e[1],required:!0,eventId:e[5],currency:e[2],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]),n.$on("record",e[23]),n.$on("objRecord",e[24]);let o=e[1]&&di(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),z(t,"padding-top",".25em"),z(t,"background-color","lightyellow"),z(t,"position","relative")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};256&r[0]&&(i.classId=e[8]),128&r[0]&&(i.item=e[3]),64&r[0]&&(i.record=e[6]),3&r[0]&&(i.disabled=e[0]||!!e[1]),32&r[0]&&(i.eventId=e[5]),4&r[0]&&(i.currency=e[2]),512&r[0]&&(i.changeValue=e[9]),n.$set(i),e[1]?o?(o.p(e,r),2&r[0]&&we(o,1)):(o=di(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function di(e){let t,n,r,i,o;return n=new tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 pointer svelte-16mo2c")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[22]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function ui(e){let t,n,r="list"!==e[3].type&&ai(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){"list"!==e[3].type?r?(r.p(e,n),128&n[0]&&we(r,1)):(r=ai(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function hi(e){let t,n,r=e[7].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=mi(ri(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(485&n[0]){let s;for(r=e[7].list,s=0;s<r.length;s+=1){const o=ri(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=mi(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}function fi(e){let t,n,r,i;return t=new e[12]({props:{text:e[11].designation}}),r=new Lr({props:{classId:e[8],list:e[11],eventId:e[5],schema:e[11].item,record:e[6],disabled:e[0],currency:e[2],update:!0}}),{c(){Ee(t.$$.fragment),n=B(),Ee(r.$$.fragment)},m(e,o){Ae(t,e,o),R(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};128&n[0]&&(i.text=e[11].designation),t.$set(i);const o={};256&n[0]&&(o.classId=e[8]),128&n[0]&&(o.list=e[11]),32&n[0]&&(o.eventId=e[5]),128&n[0]&&(o.schema=e[11].item),64&n[0]&&(o.record=e[6]),1&n[0]&&(o.disabled=e[0]),4&n[0]&&(o.currency=e[2]),r.$set(o)},i(e){i||(we(t.$$.fragment,e),we(r.$$.fragment,e),i=!0)},o(e){ye(t.$$.fragment,e),ye(r.$$.fragment,e),i=!1},d(e){be(t,e),e&&D(n),be(r,e)}}}function mi(e){let t,n,r="array"!==e[11].type&&fi(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){"array"!==e[11].type?r?(r.p(e,n),128&n[0]&&we(r,1)):(r=fi(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function pi(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function gi(e){let t,n;return t=new ti({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n[0]&&(r.item=e[3]),16&n[0]&&(r.className=e[4]),256&n[0]&&(r.classId=e[8]),2048&n[0]&&(r.list=e[11]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function wi(e){let t,n,r=e[10]&&gi(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[10]?r?(r.p(e,n),1024&n[0]&&we(r,1)):(r=gi(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function yi(e){let t,n,r,i,o,s,a={ctx:e,current:null,token:null,hasCatch:!1,pending:pi,then:si,catch:oi,value:54,blocks:[,,,]};function l(t){e[30](t)}ve(e[16](),a),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[wi]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),i=new e[13]({props:c}),ee.push((()=>$e(i,"open",l))),{c(){a.block.c(),t=B(),Ee(n.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,o){a.block.m(e,a.anchor=o),a.mount=()=>t.parentNode,a.anchor=t,R(e,t,o),Ae(n,e,o),R(e,r,o),Ae(i,e,o),s=!0},p(t,n){_e(a,e=t,n);const r={};3352&n[0]|268435456&n[1]&&(r.$$scope={dirty:n,ctx:e}),!o&&1024&n[0]&&(o=!0,r.open=e[10],le((()=>o=!1))),i.$set(r)},i(e){s||(we(a.block),we(n.$$.fragment,e),we(i.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){ye(a.blocks[e])}ye(n.$$.fragment,e),ye(i.$$.fragment,e),s=!1},d(e){a.block.d(e),a.token=null,a=null,e&&D(t),be(n,e),e&&D(r),be(i,e)}}}function vi(e,n,r){const{Divider:i,FormField:o,Modal:s}=c,a=K();let l,d,u,h,f,{required:m}=n,{disabled:p}=n,{readonly:g}=n,{id:w}=n,{item:y}=n,{value:v}=n,{refValue:_}=n,{currency:I}=n,C={},$=[],E=[],A={},b=new Map,S=!1,T="";const N=y.checkOn,R=v,D=e=>{l.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[r,i]=n.split(".");$.push({action:e,itemName:t.name,refObj:r,refName:i,op:t.properties[e].invert?"!":""})}))},k=()=>{l.items.filter((e=>e.lookup)).forEach((e=>{E.push({name:e.name,lookup:e.lookup})})),l.items.filter((e=>e.properties?.lookup)).forEach((e=>{E.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},O=async e=>{const t=$.filter((t=>t.refObj===e));if(t?.length){r(9,A={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:s}=e;if(!n)break;let a,l,c=!i&&C[n];const u=C[n];u&&i&&(c=(await fh(n,u))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{a=`#${d} .form-field.${t} .field textarea`,l=document.querySelector(a),l||(a=`#${d} .form-field.${t} .field input`,l=document.querySelector(a)),l&&c&&l.setAttribute(s,""),l&&!c&&l.removeAttribute(s)}),0)),"hidden"===s&&(a=`#${d} .form-field.${t}`,l=document.querySelector(a),l?.classList?.toggle("hidden",!!c),c&&r(9,A[t]="",A))}}};Y((()=>{x()}));const x=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(d))&&++n<20;)await e(50);t&&((()=>{if(recID)return;const e=new Set;for(const t of $)e.add(t.refObj||u);Array.from(e).forEach((e=>O(e)))})(),M())},M=()=>{setTimeout((()=>{Array.from(b).forEach((([e,t])=>{C[e]||r(6,C[e]=t._id,C)}))}),250)},B=async e=>{if(!e.value)return void L();const n={[e.itemName]:{$regex:`(?i)${e.value}`}},i=await t.getSectionView(u,n);i?.length?(r(11,T=i),r(10,S=!0)):(r(1,v=""),r(25,_=""),a("setRefValue",_))},P=()=>{r(10,S=!1)},L=()=>{r(1,v=""),r(25,_=v),r(6,C={}),a("setRefValue",_)};return e.$$set=e=>{"required"in e&&r(26,m=e.required),"disabled"in e&&r(0,p=e.disabled),"readonly"in e&&r(27,g=e.readonly),"id"in e&&r(28,w=e.id),"item"in e&&r(3,y=e.item),"value"in e&&r(1,v=e.value),"refValue"in e&&r(25,_=e.refValue),"currency"in e&&r(2,I=e.currency)},e.$$.update=()=>{134217729&e.$$.dirty[0]&&r(0,p=p||g),536871024&e.$$.dirty[0]&&C&&a("safeReference",{record:C,class:u,event:h,taskId:f})},[p,v,I,y,u,h,C,l,d,A,S,T,i,s,N,R,async()=>{try{if(v){const e=await t.getTask(y.refClass,v);delete e._task,r(6,C=e),r(29,f=(await t.getTaskByDocId(e._id,!0))._id)}else r(6,C={})}catch{}return r(7,l=await t.getSchemaByClass(y.refClass)),r(8,d="form-"+l.class+Math.floor(9e3*Math.random()+1e3).toString()),r(4,u=l.class),l.identity.designation,r(5,h=l.id),["readonly","hidden","required"].map(D),k(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(r(6,C[t]=n,C),t===N)return B(e);O(t)},async({detail:e})=>{if(!(l.input?.length&&l.input.length>1))return;if(prevSchema?.class!==l.input[0])return;const{value:n,lookup:i,view:o}=e,[s]=i.split(":"),a=(await t.getSectionView(s,{[o]:{$in:n}})).map((e=>e._id));for(const e of l.input.slice(1)){r(6,C[e]=[],C);const n=await t.getSchemaByClass(e);n.id;let i=await t.getTasks(n.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&a.includes(e[s]))),i?.length){const n=i.map((e=>e._id)),o=await t.getSectionView(e,{_id:{$in:n}});for(const t of o)t[e]=t._id;r(6,C[e]=o,C)}}},async({detail:{className:e,itemName:n,value:r}})=>{if(b.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===u))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&b.set(e,o[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(r(1,v=n[0]._id),r(25,_=v),a("setRefValue",_),r(6,C=n[0])),P()},P,L,({detail:e})=>{r(6,C[e.itemName]=e.value,C)},({detail:e})=>{for(const t of e.items)r(6,C[e.listName][t.name]=t.value,C)},_,m,g,w,f,function(e){S=e,r(10,S)}]}class _i extends Te{constructor(e){var t;super(),ni.getElementById("svelte-16mo2c-style")||((t=O("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",N(ni.head,t)),Se(this,e,vi,yi,A,{required:26,disabled:0,readonly:27,id:28,item:3,value:1,refValue:25,currency:2},[-1,-1])}}function Ii(e){let t,n;return{c(){t=O("span"),n=M(e[4]),U(t,"class","item")},m(e,r){R(e,t,r),N(t,n)},p(e,t){16&t[0]&&H(n,e[4])},d(e){e&&D(t)}}}function Ci(e){let t,n,r,i=e[6]&&Ii(e),o=e[14]&&function(e){let t,n,r,i,o;return n=new Pe({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Übernehmen"),U(t,"class","pointer feather svelte-1fuww0c")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[17]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}(e);return{c(){i&&i.c(),t=B(),o&&o.c(),n=P()},m(e,s){i&&i.m(e,s),R(e,t,s),o&&o.m(e,s),R(e,n,s),r=!0},p(e,n){e[6]?i?i.p(e,n):(i=Ii(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),e[14]&&o.p(e,n)},i(e){r||(we(o),r=!0)},o(e){ye(o),r=!1},d(e){i&&i.d(e),e&&D(t),o&&o.d(e),e&&D(n)}}}function $i(e){let t,n,r;return n=new e[10]({props:{withItem:!0,itemLeft:!0,lang:e[11].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[9],step:e[12],pattern:e[7],placeholder:e[13],readonly:e[8],disabled:e[3],required:e[5],$$slots:{default:[Ci]},$$scope:{ctx:e}}}),n.$on("change",e[15]),n.$on("focus",e[16]),{c(){t=O("div"),Ee(n.$$.fragment),z(t,"position","relative"),z(t,"max-width","10em")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};6&t[0]&&(r.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(r.id=e[0]),1&t[0]&&(r.name=e[0]),512&t[0]&&(r.value=e[9]),128&t[0]&&(r.pattern=e[7]),256&t[0]&&(r.readonly=e[8]),8&t[0]&&(r.disabled=e[3]),32&t[0]&&(r.required=e[5]),80&t[0]|32&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Ei(e,t,r){const i=K(),{TextField:o}=c;let{id:s}=t,{item:a}=t,{value:l}=t,{noForm:d=!1}=t,{classId:u}=t,{disabled:h}=t,{formnovalidate:f}=t,{currency:m}=t,{praefix:p}=t,{notifyList:g}=t;const w=JSON.parse(n.getItem("Locale"));let y=["price","amount","amountValue","taxValue","total","__total"].find((e=>e===a.name?.split("-")[0]))||a.properties?.currency;!1===a.properties?.currency&&(y=!1);const v=Number("1.1").toLocaleString(w.id).substring(1,2),{properties:_={}}=a;let{min:I,max:C,step:$,pattern:E,decimals:A=0,unit:b="",placeholder:S,hint:T,readonly:N,negative:R,required:D=!1,transfer:k}=_,O="";l=l?Number(l.toString().replace(",",".")):0,N=!0===N||void 0;const x=e=>Number(e.toString()).toFixed(A).toString().replace(".",v);E||(E=A?`[0-9]+([${v}][0-9]{1,${A}})?`:"[0-9]*"),R&&(E="-?"+E);return e.$$set=e=>{"id"in e&&r(0,s=e.id),"item"in e&&r(19,a=e.item),"value"in e&&r(18,l=e.value),"noForm"in e&&r(1,d=e.noForm),"classId"in e&&r(2,u=e.classId),"disabled"in e&&r(3,h=e.disabled),"formnovalidate"in e&&r(20,f=e.formnovalidate),"currency"in e&&r(4,m=e.currency),"praefix"in e&&r(21,p=e.praefix),"notifyList"in e&&r(22,g=e.notifyList)},e.$$.update=()=>{1048608&e.$$.dirty[0]&&r(5,D=D&&!f),262144&e.$$.dirty[0]&&(e=>{r(9,O=x(e.toString().replace(",",".")))})(l),4194304&e.$$.dirty[0]&&(async()=>{const e=a.properties?.value?.formula;if(e)void 0!==p&&""!==p?e?.operator?.multiply&&i("formula",{item:a}):e?.operator&&i("formula",{item:a})})()},[s,d,u,h,m,D,y,E,N,O,o,w,$,S,k,({detail:e})=>i("blur",{value:x(e.value)}),({detail:e})=>{N||+l||r(9,O="")},({detail:e})=>{const t=[].concat(k.target);for(const e of t)i("record",{itemName:e,value:l}),i("listRecord",{itemName:e,decimals:a.properties?.decimals,value:l})},l,a,f,p,g]}class Ai extends Te{constructor(e){var t;super(),document.getElementById("svelte-1fuww0c-style")||((t=O("style")).id="svelte-1fuww0c-style",t.textContent=".feather.svelte-1fuww0c{position:absolute;top:0.75em;right:-1em;color:#4300b0}",N(document.head,t)),Se(this,e,Ei,$i,A,{id:0,item:19,value:18,noForm:1,classId:2,disabled:3,formnovalidate:20,currency:4,praefix:21,notifyList:22},[-1,-1])}}const{document:bi}=Ie;function Si(e){e[34]=e[36].list,e[35]=e[36].items}function Ti(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function Ni(e,t,n){const r=e.slice();return r[40]=t[n],r[42]=n,r}function Ri(e,t,n){const r=e.slice();return r[40]=t[n],r}function Di(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function ki(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y,v;Si(e),n=new e[9]({props:{outline:!0,$$slots:{default:[Oi]},$$scope:{ctx:e}}}),n.$on("click",e[31]);let _=!e[2]&&xi(e);function I(t){e[32](t)}let C={id:e[12]};void 0!==e[3]&&(C.value=e[3]),a=new e[7]({props:C}),ee.push((()=>$e(a,"value",I))),a.$on("input",e[15]),u=new tt({props:{size:"18"}});let $=e[35]?.length&&function(e){let t,n,r,i,o=!e[2]&&Bi(e),s=e[35],a=[];for(let t=0;t<s.length;t+=1)a[t]=Pi(Ri(e,s,t));return{c(){t=O("thead"),n=O("tr"),o&&o.c(),r=B();for(let e=0;e<a.length;e+=1)a[e].c();U(n,"class","svelte-1m010ne"),U(t,"class","svelte-1m010ne")},m(e,s){R(e,t,s),N(t,n),o&&o.m(n,null),N(n,r);for(let e=0;e<a.length;e+=1)a[e].m(n,null);i=!0},p(e,t){if(e[2]?o&&(pe(),ye(o,1,1,(()=>{o=null})),ge()):o?(o.p(e,t),4&t[0]&&we(o,1)):(o=Bi(e),o.c(),we(o,1),o.m(n,r)),16384&t[0]){let r;for(s=e[35],r=0;r<s.length;r+=1){const i=Ri(e,s,r);a[r]?a[r].p(i,t):(a[r]=Pi(i),a[r].c(),a[r].m(n,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=s.length}},i(e){i||(we(o),i=!0)},o(e){ye(o),i=!1},d(e){e&&D(t),o&&o.d(),k(a,e)}}}(e),E=e[34]?.length&&function(e){let t,n,r=e[34],i=[];for(let t=0;t<r.length;t+=1)i[t]=Hi(Ti(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(1138717&n[0]){let s;for(r=e[34],s=0;s<r.length;s+=1){const o=Ti(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=Hi(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),_&&_.c(),i=B(),o=O("div"),s=M("Suchen: "),Ee(a.$$.fragment),c=B(),d=O("span"),Ee(u.$$.fragment),h=B(),f=O("div"),m=O("table"),$&&$.c(),p=B(),g=O("tbody"),E&&E.c(),U(t,"class","form--buttons svelte-1m010ne"),U(d,"class","feather pointer svelte-1m010ne"),z(o,"margin-bottom","1em"),z(o,"position","relative"),U(m,"striped",""),U(m,"class","svelte-1m010ne"),U(f,"class","eList svelte-1m010ne")},m(l,I){R(l,t,I),Ae(n,t,null),N(t,r),_&&_.m(t,null),R(l,i,I),R(l,o,I),N(o,s),Ae(a,o,null),N(o,c),N(o,d),Ae(u,d,null),R(l,h,I),R(l,f,I),N(f,m),$&&$.m(m,null),N(m,p),N(m,g),E&&E.m(g,null),w=!0,y||(v=L(d,"click",e[17]),y=!0)},p(e,r){Si(e);const i={};16384&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[2]?_&&(pe(),ye(_,1,1,(()=>{_=null})),ge()):_?(_.p(e,r),4&r[0]&&we(_,1)):(_=xi(e),_.c(),we(_,1),_.m(t,null));const o={};!l&&8&r[0]&&(l=!0,o.value=e[3],le((()=>l=!1))),a.$set(o),e[35]?.length&&$.p(e,r),e[34]?.length&&E.p(e,r)},i(e){w||(we(n.$$.fragment,e),we(_),we(a.$$.fragment,e),we(u.$$.fragment,e),we($),we(E),w=!0)},o(e){ye(n.$$.fragment,e),ye(_),ye(a.$$.fragment,e),ye(u.$$.fragment,e),ye($),ye(E),w=!1},d(e){e&&D(t),be(n),_&&_.d(),e&&D(i),e&&D(o),be(a),be(u),e&&D(h),e&&D(f),$&&$.d(),E&&E.d(),y=!1,v()}}}function Oi(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function xi(e){let t,n;return t=new e[9]({props:{disabled:!e[34].length,filled:!0,$$slots:{default:[Mi]},$$scope:{ctx:e}}}),t.$on("click",e[18](e[34])),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Mi(e){let t;return{c(){t=M("Bestätigen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Bi(e){let t,n,r,i,o;return n=new je({props:{size:"20"}}),{c(){t=O("th"),Ee(n.$$.fragment),U(t,"class","svelte-1m010ne")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[19](e[34])),i=!0)},p(t,n){e=t},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Pi(e){let t,n,r=e[40]+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-1m010ne")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function Li(e){let t,n,r,i,o,s,a,l=e[0],c=Vi(e),d=e[35],u=[];for(let t=0;t<d.length;t+=1)u[t]=Ui(Ni(e,d,t));return{c(){t=O("tr"),c.c(),n=B();for(let e=0;e<u.length;e+=1)u[e].c();r=B(),U(t,"style",i=e[2]?"cursor: default;":"cursor: zoom-in;"),U(t,"title","übernimmt den Wert direkt"),U(t,"class","svelte-1m010ne"),q(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},m(i,l){R(i,t,l),c.m(t,null),N(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);N(t,r),o=!0,s||(a=L(t,"click",e[20](e[37])),s=!0)},p(s,a){if(e=s,1&a[0]&&A(l,l=e[0])?(pe(),ye(c,1,1,_),ge(),c=Vi(e),c.c(),we(c),c.m(t,n)):c.p(e,a),16400&a[0]){let n;for(d=e[35],n=0;n<d.length;n+=1){const i=Ni(e,d,n);u[n]?u[n].p(i,a):(u[n]=Ui(i),u[n].c(),u[n].m(t,r))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!o||4&a[0]&&i!==(i=e[2]?"cursor: default;":"cursor: zoom-in;"))&&U(t,"style",i),16385&a[0]&&q(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},i(e){o||(we(c),o=!0)},o(e){ye(c),o=!1},d(e){e&&D(t),c.d(e),k(u,e),s=!1,a()}}}function Fi(e){let t,n,r;return n=new e[11]({props:{name:e[13],data:e[39],checked:e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]),round:!0}}),{c(){t=O("td"),Ee(n.$$.fragment),U(t,"title","Wählt den Wert aus"),U(t,"class","svelte-1m010ne")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1&t[0]&&(r.checked=e[0].includes(Array.isArray(e[37])?e[37][0]:e[37])),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Vi(e){let t,n,r=!e[2]&&Fi(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[2]?r&&(pe(),ye(r,1,1,(()=>{r=null})),ge()):r?(r.p(e,n),4&n[0]&&we(r,1)):(r=Fi(e),r.c(),we(r,1),r.m(t.parentNode,t))},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Ui(e){let t,n,r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"";return{c(){t=O("td"),n=M(r),U(t,"class","svelte-1m010ne")},m(e,r){R(e,t,r),N(t,n)},p(e,t){16&t[0]&&r!==(r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"")&&H(n,r)},d(e){e&&D(t)}}}function Hi(e){let t,n,r=e[16](e[37],e[3]),i=r&&Li(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){8&n[0]&&(r=e[16](e[37],e[3])),r?i?(i.p(e,n),8&n[0]&&we(i,1)):(i=Li(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function Wi(e){let t,n;return t=new e[6]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function zi(e){let t,n,r,i;t=new e[10]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Wi,then:ki,catch:Di,value:36,blocks:[,,,]};return ve(e[14](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function qi(e){let t,n;return t=new e[8]({props:{title:e[1]||"Auswahl",class:"eList",$$slots:{default:[zi]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]&&(r.title=e[1]||"Auswahl"),29&n[0]|16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ji(e,n,r){const i=K(),{Loading:o,TextField:s,Dialog:a,Button:l,Divider:d,Checkbox:u}=c;let{classId:h}=n,{id:f}=n,{designation:m}=n,{selection:p}=n,{refDoc:g}=n,{tableName:w}=n,{idName:y}=n,{target:v}=n,{view:_}=n,{unique:I}=n,{uniqueView:C}=n,{status:$}=n,{single:E}=n;p||=[];let A="",b=h+Math.floor(9e3*Math.random()+1e3).toString()+"search",S=[];const T=w+y+v+"checkbox",N=(e,t)=>e>t?1:t>e?-1:0;Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(b)?.focus()}),200)}));return e.$$set=e=>{"classId"in e&&r(22,h=e.classId),"id"in e&&r(23,f=e.id),"designation"in e&&r(1,m=e.designation),"selection"in e&&r(0,p=e.selection),"refDoc"in e&&r(24,g=e.refDoc),"tableName"in e&&r(25,w=e.tableName),"idName"in e&&r(26,y=e.idName),"target"in e&&r(21,v=e.target),"view"in e&&r(27,_=e.view),"unique"in e&&r(28,I=e.unique),"uniqueView"in e&&r(29,C=e.uniqueView),"status"in e&&r(30,$=e.status),"single"in e&&r(2,E=e.single)},[p,m,E,A,S,i,o,s,a,l,d,u,b,T,async()=>{let e=[],n=[],i={};if(r(4,S=[]),y)if(_){if(f){const n=h.split("-")[1].slice(0,-4),r="input."+h+"[name='_id']",o=document.querySelector(r).value;i={[y]:f},$&&(i.$or=[{status:!0},{[n]:o}]),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const r=e=>(e[n]||"z").toString()+e[v];return N(r(e),r(t))}))}}else C?f&&(i={[y]:f,status:!0},Object.entries(C).map((([e,t])=>{t?.length&&(i[e]={$in:t}),n.push(e)})),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return N(n(e),n(t))})),r(4,S=e.map((e=>{const t=[e[v]];return n.map((n=>t.push(e[n]))),t})))):I?(e=await t.getSection(w,y,f,I),e=e.sort(((e,t)=>N(e,t)))):(e=await t.getSection(w,y,f,!1,$),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return N(n(e),n(t))})));else i={},f&&!Array.isArray(f)&&(i._id=f),e=await t.getSectionView(w,i);const o=await t.getSchemaByClass(w),s=[];if(g){const t=o.items[0].name,n=o.items[1].name,i=o.list[0].name,s=e.find((e=>e[t]===g));e=s?s[i]:[],r(21,v=n)}let a;return e.map((e=>{let t=e[v];if(t||w!==v||(r(21,v=o.items[0].name),t=e[v]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),s.push(t||[])}else g&&(t=o.list[0].item.map((t=>e[t.name]||""))),s.push(t||[])})),a=g?o.list[0].item.map((e=>e.designation)):[o.items.find((e=>e.name===v))?.designation],n=n.map((e=>o.items.find((t=>t.name===e))?.designation)),{list:g?s:s.flat(),items:[...a,...n]}},({detail:{value:e}})=>{r(3,A=e)},(e,t)=>{if(!t)return!0;return!!(Array.isArray(e)?e.join(" "):e).toLowerCase().includes(t.toLowerCase())},()=>{r(3,A="")},e=>()=>{const t=document.getElementsByName(T),n=[];t.forEach(((t,r)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(T).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{if("TD"===t.target?.nodeName){const t=Array.isArray(e)?e[0]:e;E?i("choose",{list:[].concat(t)}):(r(0,p=p.includes(t)?p.filter((e=>e!==t)):p.concat(t)),i("choose",{list:p}))}},v,h,f,g,w,y,_,I,C,$,()=>i("back"),function(e){A=e,r(3,A)}]}class Gi extends Te{constructor(e){var t;super(),bi.getElementById("svelte-1m010ne-style")||((t=O("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",N(bi.head,t)),Se(this,e,ji,qi,A,{classId:22,id:23,designation:1,selection:0,refDoc:24,tableName:25,idName:26,target:21,view:27,unique:28,uniqueView:29,status:30,single:2},[-1,-1])}}const{document:Xi}=Ie;function Yi(e){let t,n,r,i,o,s=e[7].length+"";return{c(){t=O("span"),n=M("("),r=M(s),i=M(")"),U(t,"class",o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&H(r,s),2&n[0]&&o!==(o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&U(t,"class",o)},d(e){e&&D(t)}}}function Zi(e){let t;return{c(){t=O("div"),U(t,"class","load-more-options"),U(t,"slot","load-more-options-message")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Ki(e){let t,n,r,i;const o=[eo,Ji,Qi],s=[];function a(e,t){return!e[16].single&&e[7]?.length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=P()},m(e,n){~t&&s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){~t&&s[t].d(e),e&&D(r)}}}function Qi(e){let t,n,r,i,o;return n=new Pe({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Übernehmen"),U(t,"class","feather pointer svelte-1rbaejz")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[26]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ji(e){let t,n,r,i,o;return n=new Ye({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title",e[17].title||"Generieren"),U(t,"class","feather pointer svelte-1rbaejz")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[25]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function eo(e){let t,n,r,i,o;return n=new tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Löschen"),U(t,"class","feather pointer svelte-1rbaejz")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[27]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function to(e){let t,n,r;function i(t){e[37](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[no]},$$scope:{ctx:e}};return void 0!==e[10]&&(o.open=e[10]),t=new e[11]({props:o}),ee.push((()=>$e(t,"open",i))),{c(){Ee(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};53&r[0]|32768&r[1]&&(i.$$scope={dirty:r,ctx:e}),!n&&1024&r[0]&&(n=!0,i.open=e[10],le((()=>n=!1))),t.$set(i)},i(e){r||(we(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){be(t,e)}}}function no(e){let t,n;return t=new Gi({props:{classId:e[2],selection:e[0],refDoc:e[19],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[21]||e[20]],tableName:e[20],idName:e[21],designation:e[4].designation,target:e[4].name,single:e[16].single}}),t.$on("choose",e[24]),t.$on("back",e[23]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),1&n[0]&&(r.selection=e[0]),16&n[0]&&(r.unique=e[16].unique&&e[4].name),32&n[0]&&(r.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(r.id=e[5][e[21]||e[20]]),16&n[0]&&(r.designation=e[4].designation),16&n[0]&&(r.target=e[4].name),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ro(e){let t,n,r,i,o,s,a,l,c,d=!e[16].single&&e[7]?.length&&Yi(e);function u(t){e[35](t)}function h(t){e[36](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:io,minSearchLength:"3",$$slots:{"load-more-options-message":[Zi]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),r=new e[12]({props:f}),ee.push((()=>$e(r,"selection",u))),ee.push((()=>$e(r,"maxOptions",h))),r.$on("change",e[22]);let m=!e[1]&&Ki(e),p=e[10]&&to(e);return{c(){t=O("div"),d&&d.c(),n=B(),Ee(r.$$.fragment),s=B(),m&&m.c(),a=B(),p&&p.c(),l=P(),z(t,"position","relative")},m(e,i){R(e,t,i),d&&d.m(t,null),N(t,n),Ae(r,t,null),N(t,s),m&&m.m(t,null),R(e,a,i),p&&p.m(e,i),R(e,l,i),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Yi(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const a={};8&s[0]&&(a.id=e[3]),8&s[0]&&(a.name=e[3]),8&s[0]&&(a.class=e[3]),2&s[0]&&(a.disabled=e[1]),64&s[0]&&(a.required=e[6]),256&s[0]&&(a.placeholder=e[8]),32768&s[1]&&(a.$$scope={dirty:s,ctx:e}),!i&&128&s[0]&&(i=!0,a.selection=e[7],le((()=>i=!1))),!o&&512&s[0]&&(o=!0,a.maxOptions=e[9],le((()=>o=!1))),r.$set(a),e[1]?m&&(pe(),ye(m,1,1,(()=>{m=null})),ge()):m?(m.p(e,s),2&s[0]&&we(m,1)):(m=Ki(e),m.c(),we(m,1),m.m(t,null)),e[10]?p?(p.p(e,s),1024&s[0]&&we(p,1)):(p=to(e),p.c(),we(p,1),p.m(l.parentNode,l)):p&&(pe(),ye(p,1,1,(()=>{p=null})),ge())},i(e){c||(we(r.$$.fragment,e),we(m),we(p),c=!0)},o(e){ye(r.$$.fragment,e),ye(m),ye(p),c=!1},d(e){e&&D(t),d&&d.d(),be(r),m&&m.d(),e&&D(a),p&&p.d(e),e&&D(l)}}}async function*io(e){yield[{name:e}]}function oo(e,n,r){const i=K(),{Modal:o,Autocomplete:s}=c;let{classId:a}=n,{id:l}=n,{item:d}=n,{record:u}=n,{value:h}=n,{noForm:f=!1}=n,{disabled:m}=n,{formnovalidate:p}=n,{numberInput:g}=n,{praefix:w}=n,{toDelete:y}=n,{reqQuantity:v}=n,{notifyList:_}=n;const{properties:I={}}=d;let{placeholder:C,hint:$,readonly:E,required:A=!1,lookup:b="",view:S=!1,multi:T,max:N=1e3,generate:R=!1,status:D=!0,refDoc:k}=I;const[O,x]=b.split(":");let M=!1,B=h.map&&h.map((e=>({name:e})))||[];m||=E,m&&(C="");const P=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),r(7,B=t.map((e=>({name:e.trim()}))));const n=B.map((e=>e.name));i("blur",{value:n}),i("multi",{view:T.view,lookup:b,name:d.name,value:n})};Y((async()=>{i("multi",{view:T.view,lookup:b,name:d.name,value:h});const e=document.getElementById(l);e.classList.add(a),!E&&b&&e.addEventListener("focus",L)}));const L=()=>{if(b){document.getElementById(l).blur();const e=v||N;(T.unique||B.length<e)&&r(10,M=!0)}},F=()=>{r(10,M&&=!1)},V=({detail:e})=>{const t=e.list.map((e=>Array.isArray(e)?e[0]:e));r(7,B=t.map((e=>({name:e})))),i("blur",{value:t}),i("multi",{view:T.view,lookup:b,name:d.name,value:t}),F()},U=async()=>{const e={[x]:u[x]},n=await t.getSectionView(O,e),r=Array.from({length:n.length},((e,t)=>n[t][d.name]));V({detail:{name:d.name,list:r}})},H=(e=!1)=>{if(m||!T.required)return;const t=T.maxItem;if(!t||T.unique)return;r(9,N=!1!==e?e:v||u[t]||0);const n=B?.length!=N,o=document.getElementById(l);o?.classList?.toggle("invalid",n),i("invalid",{idx:w,value:n})};return e.$$set=e=>{"classId"in e&&r(2,a=e.classId),"id"in e&&r(3,l=e.id),"item"in e&&r(4,d=e.item),"record"in e&&r(5,u=e.record),"value"in e&&r(0,h=e.value),"noForm"in e&&r(28,f=e.noForm),"disabled"in e&&r(1,m=e.disabled),"formnovalidate"in e&&r(29,p=e.formnovalidate),"numberInput"in e&&r(30,g=e.numberInput),"praefix"in e&&r(31,w=e.praefix),"toDelete"in e&&r(32,y=e.toDelete),"reqQuantity"in e&&r(33,v=e.reqQuantity),"notifyList"in e&&r(34,_=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&r(7,B=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&r(7,B=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&y&&y===d.name&&r(7,B=[]),128&e.$$.dirty[0]&&B&&(r(0,h=B.map&&B.map((e=>e.name))||[]),H()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:r}=e;void 0!==w&&w!==r||t&&t.name===T.maxItem&&H(n)})(g),536870976&e.$$.dirty[0]&&r(6,A=A&&!p),8&e.$$.dirty[1]&&(async e=>{if(void 0===w)return;const{itemName:n,value:o}=e||{};if(o){if(d.refItem&&d.refItem?.split(".")[0]===n){let[e,n]=d.refItem.split(".");if(Array.isArray(o)){if(e=e.slice(0,-1),!o.length)return i("record",{itemName:"quantity",value:0}),void r(7,B=[]);const s={_id:{$in:o}},a=await t.getSectionView(e,s);let l=[];for(const e of a)e[n]&&(l=l.concat(e[n][0][d.name]));if(!l.length)return;i("record",{itemName:"quantity",value:l.length}),r(7,B=l.map((e=>({name:e})))),P({detail:{value:B}})}else{const s=await t.getTask(e,o);if(!s||!s[n])return;const a=s[n];if(!Array.isArray(a)&&!a.length)return;const l=a[w][d.name];i("record",{itemName:"quantity",value:l?.length||0}),r(7,B=l&&l.map((e=>({name:e}))))}}if(d.refItem2&&d.refItem2?.split(".")[0]===n){let[e,n]=d.refItem2.split(".");if(Array.isArray(o))if(Array.isArray(o)){if(e=e.slice(0,-1),!o.length)return i("record",{itemName:"quantity",value:0}),void r(7,B=[]);const s={_id:{$in:o}},a=await t.getSectionView(e,s);let l=[];for(const e of a)e[n]&&(l=l.concat(e[n][0][d.name]));if(!l.length)return;i("record",{itemName:"quantity",value:l.length}),r(7,B=l.map((e=>({name:e})))),P({detail:{value:B}})}else{const s=await t.getTask(e,o);if(!s||!s[n])return;const a=s[n];if(!Array.isArray(a)&&!a.length)return;const l=a[w][d.name];i("record",{itemName:"quantity",value:l?.length||0}),r(7,B=l&&l.map((e=>({name:e}))))}}setTimeout(H,250)}})(_)},[h,m,a,l,d,u,A,B,C,N,M,o,s,E,b,S,T,R,D,k,O,x,P,F,V,()=>{const e=u[R.itemQuantity]||v;if(!e)return;const t=R.prefix||"",n=u[R.variable]||"",r=R.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(r,"0")));V({detail:{name:d.name,list:i}})},async()=>{if(!0===S)return U();const e=v||u[T.maxItem];if(!e)return;let n={};x&&(n={[x]:u[x]}),D&&(n.status=!0);const r=[].concat(u[T.view]||[]);r.length&&(n[T.view]={$in:r});const i=await t.getSectionView(O,n),o=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));V({detail:{name:d.name,list:o}})},()=>{V({detail:{name:d.name,list:[]}})},f,p,g,w,y,v,_,function(e){B=e,r(7,B),r(5,u),r(4,d),r(32,y)},function(e){N=e,r(9,N)},function(e){M=e,r(10,M)}]}class so extends Te{constructor(e){var t;super(),Xi.getElementById("svelte-1rbaejz-style")||((t=O("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",N(Xi.head,t)),Se(this,e,oo,ro,A,{classId:2,id:3,item:4,record:5,value:0,noForm:28,disabled:1,formnovalidate:29,numberInput:30,praefix:31,toDelete:32,reqQuantity:33,notifyList:34},[-1,-1])}}function ao(e){let t,n,r;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function lo(e){let t,n,r,i,o;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[9]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function co(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const a=[lo,ao],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}const uo=e("getMapLink",(async e=>{const{street:n,houseNo:r,postcode:i,location:o,country:s}=e,a=[n&&r?n+" "+r:n,i&&o?i+" "+o:i||o||"",s&&(await t.getTask("country",s)).designation].filter((e=>!!e)).join(", ");return"https://bing.com/maps/default.aspx?where1="+encodeURIComponent(a)}));function ho(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{record:f}=t,{item:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"record"in e&&n(10,f=e.record),"item"in e&&n(11,m=e.item)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;const e=u.includes(".")?f[u.split(".")[0]]:f,t=await uo(e);window.open(t,"_blank")},f,m,function(t){Q(e,t)}]}class fo extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,ho,co,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}const{document:mo}=Ie;function po(e){let t;return{c(){t=O("div"),U(t,"class","load-more-options"),U(t,"slot","load-more-options-message")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function go(e){let t,n,r;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-wpjws5")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function wo(e){let t,n,r,i,o;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-wpjws5")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[8]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function yo(e){let t,n,r,i,o,s,a;function l(t){e[17](t)}function c(t){e[18](t)}function d(t){e[19](t)}let u={id:e[1],name:e[1],class:e[1],minSearchLength:"1",maxOptions:"1",getOptions:e[7],$$slots:{"load-more-options-message":[po]},$$scope:{ctx:e}};void 0!==e[0]&&(u.value=e[0]),void 0!==e[2]&&(u.selection=e[2]),void 0!==e[3]&&(u.searchQuery=e[3]),n=new e[4]({props:u}),ee.push((()=>$e(n,"value",l))),ee.push((()=>$e(n,"selection",c))),ee.push((()=>$e(n,"searchQuery",d))),n.$on("change",e[6]);let h=e[5]&&function(e){let t,n,r,i;const o=[wo,go],s=[];function a(e,t){return e[0]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),s=B(),h&&h.c(),z(t,"position","relative"),U(t,"class","inputAutoComplete")},m(e,r){R(e,t,r),Ae(n,t,null),N(t,s),h&&h.m(t,null),a=!0},p(e,t){const s={};2&t[0]&&(s.id=e[1]),2&t[0]&&(s.name=e[1]),2&t[0]&&(s.class=e[1]),16&t[1]&&(s.$$scope={dirty:t,ctx:e}),!r&&1&t[0]&&(r=!0,s.value=e[0],le((()=>r=!1))),!i&&4&t[0]&&(i=!0,s.selection=e[2],le((()=>i=!1))),!o&&8&t[0]&&(o=!0,s.searchQuery=e[3],le((()=>o=!1))),n.$set(s),e[5]&&h.p(e,t)},i(e){a||(we(n.$$.fragment,e),we(h),a=!0)},o(e){ye(n.$$.fragment,e),ye(h),a=!1},d(e){e&&D(t),be(n),h&&h.d()}}}function vo(e,t,n){const{Autocomplete:r}=c,i=K();let{classId:o}=t,{id:s}=t,{item:a}=t,{name:l}=t,{listName:d}=t,{record:u}=t,{value:h}=t,{noForm:f=!1}=t,{disabled:m}=t,{formnovalidate:p}=t;const{autocomplete:{input:g,min:w,url:y,output:v},format:_}=a.properties,I=[].concat(g),{name:C}=v,$="map"===_;let E,A=h,b=!1;Y((()=>{const e=document.querySelector("."+a.name+" .autocomplete input");e&&(e.addEventListener("focus",N),e.addEventListener("keyup",T),e.addEventListener("keydown",S));const t=document.getElementById(s);t&&t.classList.add(o)}));const S=e=>{b=8===e.keyCode||32===e.keyCode},T=e=>{8===e.keyCode&&""===A&&n(0,h="")},N=async()=>{if(w){const e=I[0].name;if((d?u[d][e]:u[e]).length!==w)return}const e=await R();if(e?.length)if(1===e.length){if(h.startsWith(e[0].name))return;n(3,A=n(0,h=e[0].name)),k(h)}else e.find((e=>(A||"").startsWith(e.name)))||h||n(3,A=" ");else h||n(3,A="")},R=async(e="")=>{const t=await fetch(y+"?"+D()+"&name=%5E"+e.trim());if(!t.ok)return;const n=t.headers.get("Content-Type").split(";")[0];let r=[];try{if("text/json"===n){const e=await t.text();r=JSON.parse(e||[])}else"application/json"===n&&(r=await t.json())}catch{}return r.map((e=>({name:e[C]})))},D=()=>I.map((({name:e,refItem:t})=>`${t}=${(d?u[d][e]:u[e]).split(" ")[0]}`)).join("&"),k=e=>{i("blur",{value:e})};return e.$$set=e=>{"classId"in e&&n(9,o=e.classId),"id"in e&&n(1,s=e.id),"item"in e&&n(10,a=e.item),"name"in e&&n(11,l=e.name),"listName"in e&&n(12,d=e.listName),"record"in e&&n(13,u=e.record),"value"in e&&n(0,h=e.value),"noForm"in e&&n(14,f=e.noForm),"disabled"in e&&n(15,m=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},[h,s,E,A,r,$,({detail:{value:e}})=>{e.length&&n(3,A=n(0,h=e[0].name)),n(2,E=[]),k(h)},async function*(e){if(b||h&&e.startsWith(h))return n(0,h=e),void k(h);const t=await R(e);if(!t?.length)return n(0,h=e),void k(h);1===t.length?(n(3,A=n(0,h=t[0].name)),n(2,E=[]),k(h)):yield t},async()=>{if(!h)return;const e=l.includes(".")?u[l.split(".")[0]]:u,t=await uo(e);window.open(t,"_blank")},o,a,l,d,u,f,m,p,function(e){h=e,n(0,h)},function(e){E=e,n(2,E)},function(e){A=e,n(3,A)}]}class _o extends Te{constructor(e){var t;super(),mo.getElementById("svelte-wpjws5-style")||((t=O("style")).id="svelte-wpjws5-style",t.textContent=".feather.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:light-gray;margin-left:-2em}.inputAutoComplete .autocomplete .chip,.inputAutoComplete .autocomplete .shown-on-focus{display:none !important}",N(mo.head,t)),Se(this,e,vo,yo,A,{classId:9,id:1,item:10,name:11,listName:12,record:13,value:0,noForm:14,disabled:15,formnovalidate:16},[-1,-1])}}const{document:Io}=Ie;function Co(e){e[26]=e[28].list,e[27]=e[28].items}function $o(e,t,n){const r=e.slice();return r[29]=t[n],r}function Eo(e,t,n){const r=e.slice();return r[32]=t[n],r}function Ao(e,t,n){const r=e.slice();return r[32]=t[n],r}function bo(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function So(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y;function v(t){e[23](t)}Co(e),n=new e[7]({props:{outline:!0,$$slots:{default:[To]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let _={id:e[8]};void 0!==e[1]&&(_.value=e[1]),s=new e[6]({props:_}),ee.push((()=>$e(s,"value",v))),s.$on("input",e[12]),d=new tt({props:{size:"18"}});let I=e[27]?.length&&function(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=No(Ao(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();U(n,"class","svelte-14hcfjl"),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[27],o=0;o<r.length;o+=1){const s=Ao(e,r,o);i[o]?i[o].p(s,t):(i[o]=No(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&D(t),k(i,e)}}}(e),C=e[26]?.length&&function(e){let t,n=e[26],r=[];for(let t=0;t<n.length;t+=1)r[t]=ko($o(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=P()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);R(e,t,n)},p(e,i){if(11779&i[0]){let o;for(n=e[26],o=0;o<n.length;o+=1){const s=$o(e,n,o);r[o]?r[o].p(s,i):(r[o]=ko(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){k(r,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),i=O("div"),o=M("Suchen: "),Ee(s.$$.fragment),l=B(),c=O("span"),Ee(d.$$.fragment),u=B(),h=O("div"),f=O("table"),I&&I.c(),m=B(),p=O("tbody"),C&&C.c(),U(t,"class","form--buttons svelte-14hcfjl"),U(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),U(f,"striped",""),U(f,"class","svelte-14hcfjl"),U(h,"class","eList svelte-14hcfjl")},m(a,v){R(a,t,v),Ae(n,t,null),R(a,r,v),R(a,i,v),N(i,o),Ae(s,i,null),N(i,l),N(i,c),Ae(d,c,null),R(a,u,v),R(a,h,v),N(h,f),I&&I.m(f,null),N(f,m),N(f,p),C&&C.m(p,null),g=!0,w||(y=L(c,"click",e[14]),w=!0)},p(e,t){Co(e);const r={};64&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],le((()=>a=!1))),s.$set(i),e[27]?.length&&I.p(e,t),e[26]?.length&&C.p(e,t)},i(e){g||(we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),g=!0)},o(e){ye(n.$$.fragment,e),ye(s.$$.fragment,e),ye(d.$$.fragment,e),g=!1},d(e){e&&D(t),be(n),e&&D(r),e&&D(i),be(s),be(d),e&&D(u),e&&D(h),I&&I.d(),C&&C.d(),w=!1,y()}}}function To(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function No(e){let t,n,r=e[32]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function Ro(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=Do(Eo(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=B(),U(t,"class","pointer svelte-14hcfjl"),q(t,"active",e[29]._id===e[0])},m(e,r){R(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);N(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[27],s=0;s<r.length;s+=1){const a=Eo(e,r,s);i[s]?i[s].p(a,o):(i[s]=Do(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}2049&o[0]&&q(t,"active",e[29]._id===e[0])},d(e){e&&D(t),k(i,e)}}}function Do(e){let t,n,r,i,o=e[9](e[29],e[32])+"";return{c(){t=O("td"),n=M(o),U(t,"class","svelte-14hcfjl")},m(o,s){R(o,t,s),N(t,n),r||(i=L(t,"click",V(e[10](e[29]))),r=!0)},p(t,n){e=t},d(e){e&&D(t),r=!1,i()}}}function ko(e){let t,n=e[13](e[29],e[27],e[1]),r=n&&Ro(e);return{c(){r&&r.c(),t=P()},m(e,n){r&&r.m(e,n),R(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?r?r.p(e,i):(r=Ro(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&D(t)}}}function Oo(e){let t,n;return t=new e[5]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function xo(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Oo,then:So,catch:bo,value:28,blocks:[,,,]};return ve(e[11](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function Mo(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[xo]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|64&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Bo(e,n,i){const o=K(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{className:f}=n,{classId:p}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:v}=n,{recordId:_}=n,{filter:I}=n,C="",$=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const E=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?g(n):m(e[`_${t.name}`]||e[t.name]||"")},A=t.getSchemaByClass(f);Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById($)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await A;e.eventId===t.id&&mh(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,h=e.item),"className"in e&&i(16,f=e.className),"classId"in e&&i(17,p=e.classId),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(18,y=e.viewName),"viewValue"in e&&i(19,v=e.viewValue),"recordId"in e&&i(20,_=e.recordId),"filter"in e&&i(21,I=e.filter)},[w,C,o,s,a,l,d,u,$,E,e=>()=>o("choose",{row:e}),async()=>{const e=await A,n="."+p+"#"+y;document.querySelector(n);let r={[y]:v},i=[];r[y]&&(i=await t.getSectionView(e.class,r,!0)),I&&(i=i.filter((e=>e._id!=I)));const o=e.display;return{list:i,items:await Xt(o,e,i)}},({detail:{value:e}})=>{i(1,C=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(E(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,C="")},h,f,p,y,v,_,I,()=>o("back"),function(e){C=e,i(1,C)}]}class Po extends Te{constructor(e){var t;super(),Io.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",N(Io.head,t)),Se(this,e,Bo,Mo,A,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function Lo(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Fo(e){let t,n,r,i,o;function s(t){e[21](t)}let a={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(a.value=e[0]),n=new e[10]({props:a}),ee.push((()=>$e(n,"value",s)));let l=!e[6]&&Vo(e);return{c(){t=O("div"),Ee(n.$$.fragment),i=B(),l&&l.c(),z(t,"position","relative")},m(e,r){R(e,t,r),Ae(n,t,null),N(t,i),l&&l.m(t,null),o=!0},p(e,i){const o={};4&i&&(o.id=e[2]),8&i&&(o.name=e[3].name),34&i&&(o.inputClass=e[5]||e[1]),64&i&&(o.disabled=e[6]),128&i&&(o.formnovalidate=e[7]),!r&&1&i&&(r=!0,o.value=e[0],le((()=>r=!1))),n.$set(o),e[6]?l&&(pe(),ye(l,1,1,(()=>{l=null})),ge()):l?(l.p(e,i),64&i&&we(l,1)):(l=Vo(e),l.c(),we(l,1),l.m(t,null))},i(e){o||(we(n.$$.fragment,e),we(l),o=!0)},o(e){ye(n.$$.fragment,e),ye(l),o=!1},d(e){e&&D(t),be(n),l&&l.d()}}}function Vo(e){let t,n,r,i,o;return n=new Tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-wbrqzu")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[17]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Uo(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Ho(e){let t,n,r;function i(t){e[22](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Wo]},$$scope:{ctx:e}};return void 0!==e[8]&&(o.open=e[8]),t=new e[11]({props:o}),ee.push((()=>$e(t,"open",i))),{c(){Ee(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};268435994&r&&(i.$$scope={dirty:r,ctx:e}),!n&&256&r&&(n=!0,i.open=e[8],le((()=>n=!1))),t.$set(i)},i(e){r||(we(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){be(t,e)}}}function Wo(e){let t,n;return t=new Po({props:{item:e[3],className:e[3].refClass,classId:e[1],rowId:"",recordId:e[4]._id,viewName:e[15].selection,viewValue:e[9],filter:e[4]._id}}),t.$on("choose",e[18]),t.$on("back",e[19]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n&&(r.item=e[3]),8&n&&(r.className=e[3].refClass),2&n&&(r.classId=e[1]),16&n&&(r.recordId=e[4]._id),512&n&&(r.viewValue=e[9]),16&n&&(r.filter=e[4]._id),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function zo(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Uo,then:Fo,catch:Lo,value:27,blocks:[,,,]};ve(e[16](),i);let o=e[8]&&Ho(e);return{c(){i.block.c(),t=B(),o&&o.c(),n=P()},m(e,s){i.block.m(e,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,R(e,t,s),o&&o.m(e,s),R(e,n,s),r=!0},p(t,[r]){_e(i,e=t,r),e[8]?o?(o.p(e,r),256&r&&we(o,1)):(o=Ho(e),o.c(),we(o,1),o.m(n.parentNode,n)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){r||(we(i.block),we(o),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}ye(o),r=!1},d(e){i.block.d(e),i.token=null,i=null,e&&D(t),o&&o.d(e),e&&D(n)}}}function qo(e,t,n){const{TextField:r,Modal:i}=c;let{classId:o}=t,{id:s}=t,{item:a}=t,{record:l}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:h}=t,{formnovalidate:f}=t,{praefix:m}=t;const{properties:p={}}=a;let g,{pattern:w,placeholder:y,readonly:v,required:_=!1,view:I}=p,C=!1;const $=()=>{n(8,C=!1)};return e.$$set=e=>{"classId"in e&&n(1,o=e.classId),"id"in e&&n(2,s=e.id),"item"in e&&n(3,a=e.item),"record"in e&&n(4,l=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,h=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,m=e.praefix)},[d,o,s,a,l,u,h,f,C,g,r,i,w,v,_,I,async()=>(n(9,g=l[I.selection]),!0),()=>{n(8,C=!0)},({detail:e})=>{n(0,d=e.row[I.value?I.value:"_id"]),$()},$,m,function(e){d=e,n(0,d)},function(e){C=e,n(8,C)}]}class jo extends Te{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=O("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",N(document.head,t)),Se(this,e,qo,zo,A,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Go(e,t,n){const r=e.slice();return r[12]=t[n][0],r[13]=t[n][1],r}function Xo(e){let t;return{c(){t=O("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Yo(e){let t;return{c(){t=O("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Zo(e){let t,n,r,i,o=e[12]+"";return{c(){t=O("option"),n=M(o),t.__value=r=e[13],t.value=t.__value,t.selected=i=e[0]==e[13]},m(e,r){R(e,t,r),N(t,n)},p(e,s){64&s&&o!==(o=e[12]+"")&&H(n,o),64&s&&r!==(r=e[13])&&(t.__value=r,t.value=t.__value),65&s&&i!==(i=e[0]==e[13])&&(t.selected=i)},d(e){e&&D(t)}}}function Ko(e){let t,n,r,i,o,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Yo:Xo}let r=n(e),i=r(e);return{c(){i.c(),t=P()},m(e,n){i.m(e,n),R(e,t,n)},p(e,o){r!==(r=n(e))&&(i.d(1),i=r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i.d(e),e&&D(t)}}}(e),a=e[6],l=[];for(let t=0;t<a.length;t+=1)l[t]=Zo(Go(e,a,t));return{c(){t=O("select"),s&&s.c(),n=P();for(let e=0;e<l.length;e+=1)l[e].c();U(t,"class",r=S(e[3]||e[4])+" svelte-5xpzvo"),U(t,"id",e[2]),U(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(r,a){R(r,t,a),s&&s.m(t,null),N(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);i||(o=L(t,"change",e[9]),i=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let r;for(a=e[6],r=0;r<a.length;r+=1){const i=Go(e,a,r);l[r]?l[r].p(i,n):(l[r]=Zo(i),l[r].c(),l[r].m(t,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}24&n&&r!==(r=S(e[3]||e[4])+" svelte-5xpzvo")&&U(t,"class",r),4&n&&U(t,"id",e[2]),4&n&&U(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:_,o:_,d(e){e&&D(t),s&&s.d(),k(l,e),i=!1,o()}}}function Qo(e,t,n){const r=K();let{id:i}=t,{item:o}=t,{value:s}=t,{noForm:a=!1}=t,{classId:l}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:h,readonly:f}=o.properties;u&&(u=u.map((e=>[e,e]))),"businessMonth"===h&&(s||=1,u=[["Januar",1],["Februar",2],["März",3],["April",4],["Mai",5],["Juni",6],["Juli",7],["August",8],["September",9],["Oktober",10],["November",11],["Dezember",12]]),"financialAccounting"===h&&(s||=2024,u=[["2024/2025",2024]]),"valueAddedTax"===h&&(s||=0,u=[["0% Steuerbefreit",0],["8.1% Normalsatz",.081],["2.6% Reduzierter Satz",.026],["3.8% Beherbergung",.038]]),c||=!!f,c||(c=void 0);return e.$$set=e=>{"id"in e&&n(2,i=e.id),"item"in e&&n(10,o=e.item),"value"in e&&n(0,s=e.value),"noForm"in e&&n(3,a=e.noForm),"classId"in e&&n(4,l=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[s,c,i,a,l,d,u,h,f,e=>r("blur",{value:e.srcElement.value}),o]}class Jo extends Te{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=O("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}",N(document.head,t)),Se(this,e,Qo,Ko,A,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function es(e){let t,n,r,i,o,s,a,l,c;i=new e[8]({props:{id:"dp-"+e[1]+(e[2]?"-"+e[2]:""),value:e[0],readonly:e[5],required:e[7],disabled:e[6],noCalendar:e[9],closeOnSelection:!0}}),i.$on("change",e[11]);let d=e[10]&&function(e){let t,n,r,i,o;return n=new Pe({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Übernehmen"),U(t,"class","pointer feather")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[12]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}(e);return{c(){t=O("input"),r=B(),Ee(i.$$.fragment),o=B(),d&&d.c(),s=P(),U(t,"type","string"),U(t,"class",n=e[3]||e[4]),U(t,"id",e[1]),U(t,"name",e[1]),t.hidden=!0},m(n,u){R(n,t,u),W(t,e[0]),R(n,r,u),Ae(i,n,u),R(n,o,u),d&&d.m(n,u),R(n,s,u),a=!0,l||(c=L(t,"input",e[18]),l=!0)},p(e,[r]){(!a||24&r&&n!==(n=e[3]||e[4]))&&U(t,"class",n),(!a||2&r)&&U(t,"id",e[1]),(!a||2&r)&&U(t,"name",e[1]),1&r&&W(t,e[0]);const o={};6&r&&(o.id="dp-"+e[1]+(e[2]?"-"+e[2]:"")),1&r&&(o.value=e[0]),32&r&&(o.readonly=e[5]),128&r&&(o.required=e[7]),64&r&&(o.disabled=e[6]),i.$set(o),e[10]&&d.p(e,r)},i(e){a||(we(i.$$.fragment,e),we(d),a=!0)},o(e){ye(i.$$.fragment,e),ye(d),a=!1},d(e){e&&D(t),e&&D(r),be(i,e),e&&D(o),d&&d.d(e),e&&D(s),l=!1,c()}}}let ts=new Map;function ns(e,n,r){const i=K(),{DatePicker:o}=c;let{value:s}=n,{id:a}=n,{item:l}=n,{record:d}=n,{praefix:u}=n,{noForm:h=!1}=n,{classId:f}=n,{eventId:m}=n,{readonly:p}=n,{disabled:g}=n,{required:w}=n,{notifyList:y}=n,{dateInput:v}=n;s||(s=void 0);let _=null;const I=(void 0===u?"":u.toString())+"-"+m+"-"+l.name,C=l.properties?.noCalendar||!1,$=l.properties?.transfer,E=({detail:e})=>{try{r(0,s=hr(e.value,s)),void 0!==u&&ts.set(I,new Date(s.valueOf())),A(s)}catch{r(0,s=void 0)}},A=e=>{i("change",{value:new Date(e.valueOf())})};if(void 0!==u&&!s){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0);s=hr(t,s)}return e.$$set=e=>{"value"in e&&r(0,s=e.value),"id"in e&&r(1,a=e.id),"item"in e&&r(13,l=e.item),"record"in e&&r(14,d=e.record),"praefix"in e&&r(2,u=e.praefix),"noForm"in e&&r(3,h=e.noForm),"classId"in e&&r(4,f=e.classId),"eventId"in e&&r(15,m=e.eventId),"readonly"in e&&r(5,p=e.readonly),"disabled"in e&&r(6,g=e.disabled),"required"in e&&r(7,w=e.required),"notifyList"in e&&r(16,y=e.notifyList),"dateInput"in e&&r(17,v=e.dateInput)},e.$$.update=()=>{if(1&e.$$.dirty&&s&&!$&&ts.has(I)&&r(0,s=ts.get(I)),65536&e.$$.dirty&&(async e=>{if(null===_){const e=(await t.getEvent(m)).output.class[0].item;_=e.find((e=>e.properties?.value?.formula))}_&&_.properties.value.formula.argument[0].refItem===l.name&&(e&&e.itemName!==l.name&&!_.properties.value.formula.argument[1].value&&e.itemName!==_.properties.value.formula.argument[1].refItem.split(".")[0]||i("formula",{item:_}))})(y),131072&e.$$.dirty&&((e={})=>{let{ref:t,val:n,t:r,l:i,n:o}=e;if(o&&(n=o),!n||isNaN(new Date(n)))return;if(r)return;if(!t)return;const[s,a]=t.split(".");s===i&&a===l.name&&null!=u&&E({detail:{value:new Date(n)}})})(v),24673&e.$$.dirty&&d&&d[l.name])try{g||p||r(0,s=hr(d[l.name],s))}catch{}},[s,a,u,h,f,p,g,w,o,C,$,E,()=>{i("record",{target:$.target,value:s.toISOString()})},l,d,m,y,v,function(){s=this.value,r(0,s),r(14,d),r(13,l),r(6,g),r(5,p)}]}class rs extends Te{constructor(e){super(),Se(this,e,ns,es,A,{value:0,id:1,item:13,record:14,praefix:2,noForm:3,classId:4,eventId:15,readonly:5,disabled:6,required:7,notifyList:16,dateInput:17})}}function is(e){let t;return{c(){t=M("Stunden")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function os(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[is]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ss(e){let t;return{c(){t=M("Minuten")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function as(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[ss]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ls(e){let t;return{c(){t=M("Jetzt")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function cs(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[ls]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ds(e){let t,n,r,i,o,s,a,l,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[cs],"minutes-label":[as],"hours-label":[os]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=O("input"),r=B(),Ee(i.$$.fragment),o=B(),Ee(s.$$.fragment),U(t,"type","string"),U(t,"class",n=e[2]||e[3]),U(t,"id",e[1]),U(t,"name",e[1]),t.hidden=!0},m(n,d){R(n,t,d),W(t,e[0]),R(n,r,d),Ae(i,n,d),R(n,o,d),Ae(s,n,d),a=!0,l||(c=L(t,"input",e[9]),l=!0)},p(e,[r]){(!a||12&r&&n!==(n=e[2]||e[3]))&&U(t,"class",n),(!a||2&r)&&U(t,"id",e[1]),(!a||2&r)&&U(t,"name",e[1]),1&r&&W(t,e[0]);const o={};1&r&&(o.value=e[0]),i.$set(o);const l={};1&r&&(l.value=e[0]),4096&r&&(l.$$scope={dirty:r,ctx:e}),s.$set(l)},i(e){a||(we(i.$$.fragment,e),we(s.$$.fragment,e),a=!0)},o(e){ye(i.$$.fragment,e),ye(s.$$.fragment,e),a=!1},d(e){e&&D(t),e&&D(r),be(i,e),e&&D(o),be(s,e),l=!1,c()}}}function us(e,t,n){const r=K(),{Label:i,DatePicker:o,TimePicker:s}=c;let{value:a}=t,{id:l}=t,{noForm:d=!1}=t,{classId:u}=t;const h=e=>r("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,a=e.value),"id"in e&&n(1,l=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[a,l,d,u,i,o,s,({detail:e})=>{var t,r;n(0,(t=e.value,r=a,a=null==t||null==r?t:(r.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),r))),h(a)},({detail:e})=>{n(0,a=hr(e.value,a)),h(a)},function(){a=this.value,n(0,a)}]}class hs extends Te{constructor(e){super(),Se(this,e,us,ds,A,{value:0,id:1,noForm:2,classId:3})}}function fs(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g;return u=new e[9]({props:{format:e[5],required:e[3],disabled:e[4],value:e[7],noCalendar:e[10],closeOnSelection:!0}}),u.$on("change",e[11]),f=new e[9]({props:{format:e[6],required:e[3],disabled:e[4],value:e[8],noCalendar:e[10],class:"moveLeft",closeOnSelection:!0}}),f.$on("change",e[12]),{c(){t=O("input"),o=B(),s=O("input"),d=B(),Ee(u.$$.fragment),h=M(" /\n"),Ee(f.$$.fragment),U(t,"type","string"),U(t,"class",n=e[1]||e[2]),U(t,"id",r=e[0]+"_from"),U(t,"name",i=e[0]+"_from"),t.hidden=!0,U(s,"type","string"),U(s,"class",a=e[1]||e[2]),U(s,"id",l=e[0]+"_to"),U(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,r){R(n,t,r),W(t,e[7]),R(n,o,r),R(n,s,r),W(s,e[8]),R(n,d,r),Ae(u,n,r),R(n,h,r),Ae(f,n,r),m=!0,p||(g=[L(t,"input",e[15]),L(s,"input",e[16])],p=!0)},p(e,[o]){(!m||6&o&&n!==(n=e[1]||e[2]))&&U(t,"class",n),(!m||1&o&&r!==(r=e[0]+"_from"))&&U(t,"id",r),(!m||1&o&&i!==(i=e[0]+"_from"))&&U(t,"name",i),128&o&&W(t,e[7]),(!m||6&o&&a!==(a=e[1]||e[2]))&&U(s,"class",a),(!m||1&o&&l!==(l=e[0]+"_to"))&&U(s,"id",l),(!m||1&o&&c!==(c=e[0]+"_to"))&&U(s,"name",c),256&o&&W(s,e[8]);const d={};32&o&&(d.format=e[5]),8&o&&(d.required=e[3]),16&o&&(d.disabled=e[4]),128&o&&(d.value=e[7]),u.$set(d);const h={};64&o&&(h.format=e[6]),8&o&&(h.required=e[3]),16&o&&(h.disabled=e[4]),256&o&&(h.value=e[8]),f.$set(h)},i(e){m||(we(u.$$.fragment,e),we(f.$$.fragment,e),m=!0)},o(e){ye(u.$$.fragment,e),ye(f.$$.fragment,e),m=!1},d(e){e&&D(t),e&&D(o),e&&D(s),e&&D(d),be(u,e),e&&D(h),be(f,e),p=!1,$(g)}}}function ms(e,t,n){const r=K(),{DatePicker:i}=c;let{value:o}=t,{id:s}=t,{item:a}=t,{noForm:l=!1}=t,{classId:d}=t,{required:u}=t,{disabled:h}=t;const{noCalendar:f,preset:m}=a.properties||{};let p="%d.%m.%Y",g="%d.%m.%Y",w=o?.from,y=o?.to;if(m){const{first:e,last:t}=function(e){const t=new Date;let n=t.getFullYear();const r=t.getMonth();let i,o;switch(t.getDate(),e){case"currentMonth":i=o=r;break;case"currentYear":i=0,o=i+11;break;case"lastSemiYear":i=r<6?6:0,o=i+5,i>5&&--n;break;case"lastQuarter":i=r<3?9:r<6?0:r<9?3:6,o=i+2,i>8&&--n;break;case"lastMonth":i=o=0===r?11:r-1,11===i&&--n;break;default:i=0,o=i+11,--n}return{first:new Date(n,i,1),last:new Date(n,o+1,0)}}(m);e&&(w=e),t&&(y=t)}"Invalid Date"===w?.toString()&&(w=void 0),"Invalid Date"===y?.toString()&&(y=void 0),h&&(void 0===w&&(p=""),void 0===y&&(g=""));return e.$$set=e=>{"value"in e&&n(13,o=e.value),"id"in e&&n(0,s=e.id),"item"in e&&n(14,a=e.item),"noForm"in e&&n(1,l=e.noForm),"classId"in e&&n(2,d=e.classId),"required"in e&&n(3,u=e.required),"disabled"in e&&n(4,h=e.disabled)},[s,l,d,u,h,p,g,w,y,i,f,({detail:e})=>{n(7,w=hr(e.value,w)),y&&w&&y.valueOf()-w.valueOf()<0&&n(7,w=void 0),r("change",{value:w,range:"_from"})},({detail:e})=>{n(8,y=hr(e.value,y)),y&&w&&y.valueOf()-w.valueOf()<0&&n(8,y=void 0),r("change",{value:y,range:"_to"})},o,a,function(){w=this.value,n(7,w)},function(){y=this.value,n(8,y)}]}class ps extends Te{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=O("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",N(document.head,t)),Se(this,e,ms,fs,A,{value:13,id:0,item:14,noForm:1,classId:2,required:3,disabled:4})}}function gs(e){let t,n,r,i,o;function s(t){e[13](t)}let a={class:e[0],id:e[1],name:e[2],accept:".xml",max:"1",beforeChange:e[9]};return void 0!==e[3]&&(a.files=e[3]),t=new e[5]({props:a}),ee.push((()=>$e(t,"files",s))),t.$on("change",e[8]),i=new e[6]({props:{inputClass:e[0],hidden:!0,id:e[1],name:e[1],value:e[4]}}),{c(){Ee(t.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,n){Ae(t,e,n),R(e,r,n),Ae(i,e,n),o=!0},p(e,r){const o={};1&r&&(o.class=e[0]),2&r&&(o.id=e[1]),4&r&&(o.name=e[2]),!n&&8&r&&(n=!0,o.files=e[3],le((()=>n=!1))),t.$set(o);const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.id=e[1]),2&r&&(s.name=e[1]),16&r&&(s.value=e[4]),i.$set(s)},i(e){o||(we(t.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(t.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){be(t,e),e&&D(r),be(i,e)}}}function ws(e){let t,n;return t=new e[6]({props:{inputClass:e[0],readonly:!0,id:e[1],name:e[1],value:e[4]}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.inputClass=e[0]),2&n&&(r.id=e[1]),2&n&&(r.name=e[1]),16&n&&(r.value=e[4]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ys(e){let t,n,r,i;const o=[ws,gs],s=[];return t=function(e){return e[7]?0:1}(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,[t]){n.p(e,t)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function vs(e,t,n){const{FileDropzone:r,TextField:i}=c,o=K();let{classId:s}=t,{eventId:a}=t,{record:l}=t,{item:d}=t,{id:u}=t,{name:h}=t,f=[],m=l[d.name]||"",p=!!l._id;const g=e=>{if(!e?.length)return"";if(e.length<14)return"";const t=e.replaceAll(" ","").slice(-14),n=t.slice(-8),r=t.slice(0,4);let i="";for(let e=0;e<r.length/2;e++){const t=2*e,n=r.substring(t,t+2);i+=String.fromCharCode(n)}return i+n};return e.$$set=e=>{"classId"in e&&n(0,s=e.classId),"eventId"in e&&n(10,a=e.eventId),"record"in e&&n(11,l=e.record),"item"in e&&n(12,d=e.item),"id"in e&&n(1,u=e.id),"name"in e&&n(2,h=e.name)},[s,u,h,f,m,r,i,p,async()=>{const{list:e}=d.properties,t=f[0];if(t){n(4,m=t.name);const r=(e=>{var t={toObj:function(e){var n={};if(1==e.nodeType){if(e.attributes.length)for(var r=0;r<e.attributes.length;r++)n["@"+e.attributes[r].nodeName]=(e.attributes[r].nodeValue||"").toString();if(e.firstChild){for(var i=0,o=0,s=!1,a=e.firstChild;a;a=a.nextSibling)1==a.nodeType?s=!0:3==a.nodeType&&a.nodeValue.match(/[^ \f\n\r\t\v]/)?i++:4==a.nodeType&&o++;if(s)if(i<2&&o<2)for(t.removeWhite(e),a=e.firstChild;a;a=a.nextSibling)3==a.nodeType?n["#text"]=t.escape(a.nodeValue):4==a.nodeType?n["#cdata"]=t.escape(a.nodeValue):n[a.nodeName]?n[a.nodeName]instanceof Array?n[a.nodeName][n[a.nodeName].length]=t.toObj(a):n[a.nodeName]=[n[a.nodeName],t.toObj(a)]:n[a.nodeName]=t.toObj(a);else e.attributes.length?n["#text"]=t.escape(t.innerXml(e)):n=t.escape(t.innerXml(e));else if(i)e.attributes.length?n["#text"]=t.escape(t.innerXml(e)):n=t.escape(t.innerXml(e));else if(o)if(o>1)n=t.escape(t.innerXml(e));else for(a=e.firstChild;a;a=a.nextSibling)n["#cdata"]=t.escape(a.nodeValue)}e.attributes.length||e.firstChild||(n=null)}else 9==e.nodeType&&(n=t.toObj(e.documentElement));return n},toJson:function(e,n,r){var i=n?'"'+n+'"':"";if(e instanceof Array){for(var o=0,s=e.length;o<s;o++)e[o]=t.toJson(e[o],"",r+"\t");i+=(n?":[":"[")+(e.length>1?"\n"+r+"\t"+e.join(",\n"+r+"\t")+"\n"+r:e.join(""))+"]"}else if(null==e)i+=(n&&":")+"null";else if("object"==typeof e){var a=[];for(var l in e)a[a.length]=t.toJson(e[l],l,r+"\t");i+=(n?":{":"{")+(a.length>1?"\n"+r+"\t"+a.join(",\n"+r+"\t")+"\n"+r:a.join(""))+"}"}else i+="string"==typeof e?(n&&":")+'"'+e.toString()+'"':(n&&":")+e.toString();return i},innerXml:function(e){var t="";if("innerHTML"in e)t=e.innerHTML;else for(var n=function(e){var t="";if(1==e.nodeType){t+="<"+e.nodeName;for(var r=0;r<e.attributes.length;r++)t+=" "+e.attributes[r].nodeName+'="'+(e.attributes[r].nodeValue||"").toString()+'"';if(e.firstChild){t+=">";for(var i=e.firstChild;i;i=i.nextSibling)t+=n(i);t+="</"+e.nodeName+">"}else t+="/>"}else 3==e.nodeType?t+=e.nodeValue:4==e.nodeType&&(t+="<![CDATA["+e.nodeValue+"]]>");return t},r=e.firstChild;r;r=r.nextSibling)t+=n(r);return t},escape:function(e){return e.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(e){e.normalize();for(var n=e.firstChild;n;)if(3==n.nodeType)if(n.nodeValue.match(/[^ \f\n\r\t\v]/))n=n.nextSibling;else{var r=n.nextSibling;e.removeChild(n),n=r}else 1==n.nodeType?(t.removeWhite(n),n=n.nextSibling):n=n.nextSibling;return e}};return e=(new window.DOMParser).parseFromString(e,"text/xml"),t.toObj(t.removeWhite(e))})(await t.text()),i=[],s=r.BkToCstmrDbtCdtNtfctn.Ntfctn,a=[].concat(s.Ntry);for(const e of a){let t=[].concat(e.NtryDtls.TxDtls);for(const n of t){const t=n.RmtInf?.Strd?.CdtrRefInf?.Ref||n.Refs.EndToEndId||"",r={date:e.ValDt.Dt,branchName:n.RltdPties?.Dbtr?.Nm||"",amount:n.AmtDtls?.TxAmt?.Amt["#text"]||n.Amt["#text"],reference:t,invoiceId:g(t),information:n.RmtInf?.Ustrd||""};i.push(r)}}i.length&&o("record",{itemName:e,value:i})}},()=>{n(3,f)},a,l,d,function(e){f=e,n(3,f)}]}class _s extends Te{constructor(e){var t;super(),document.getElementById("svelte-157hlzf-style")||((t=O("style")).id="svelte-157hlzf-style",t.textContent="label.file-dropzone{margin-top:0 !important}",N(document.head,t)),Se(this,e,vs,ys,A,{classId:0,eventId:10,record:11,item:12,id:1,name:2})}}const Is=e=>{const t={},n=e.replaceAll("\r","").split("\n");return n?(t.iban=n[3],t.supplierText=n[5]+", "+n[6]+", "+n[7]+", "+n[8]+", "+n[9],t.supplier={company:{}},t.supplier.company.companyName=n[5],t.supplier.company.postcode=n[8],t.amount=n[18],t.amountOrg=n[18],t.currency={},t.currency.designation=n[19],t.reference=n[28],t.additionalInfo=n[29],t.extReference=Cs(10,n[31]),t.amountVat=$s(Cs(32,n[31]),t.amount)||$s(Cs(33,n[31]),t.amount),t):t},Cs=(e,t)=>{if(!e)return"";if(!t)return"";const n=t.split("/"+e+"/")[1];return n?.split("/")[0]||""},$s=(e,t)=>{if(!e)return"";let n=0;if(e.includes(":")){const t=e.split(";");for(const e of t)n+=e.split(":")[1]}else n=+t/(+e+100)*+e;return n},{document:Es}=Ie;function As(e){let t,n,r,i,o;function s(t){e[14](t)}let a={class:e[0],id:e[1],name:e[2],accept:"application/pdf",max:"1",beforeChange:e[10]};return void 0!==e[3]&&(a.files=e[3]),t=new e[5]({props:a}),ee.push((()=>$e(t,"files",s))),t.$on("change",e[8]),i=new e[6]({props:{inputClass:e[0],hidden:!0,id:e[1],name:e[1],value:e[4]}}),{c(){Ee(t.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,n){Ae(t,e,n),R(e,r,n),Ae(i,e,n),o=!0},p(e,r){const o={};1&r&&(o.class=e[0]),2&r&&(o.id=e[1]),4&r&&(o.name=e[2]),!n&&8&r&&(n=!0,o.files=e[3],le((()=>n=!1))),t.$set(o);const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.id=e[1]),2&r&&(s.name=e[1]),16&r&&(s.value=e[4]),i.$set(s)},i(e){o||(we(t.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(t.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){be(t,e),e&&D(r),be(i,e)}}}function bs(e){let t,n,r,i;n=new e[6]({props:{inputClass:e[0],readonly:!0,id:e[1],name:e[1],value:e[4]}});let o=e[4]&&Ss(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),z(t,"position","relative")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};1&r&&(i.inputClass=e[0]),2&r&&(i.id=e[1]),2&r&&(i.name=e[1]),16&r&&(i.value=e[4]),n.$set(i),e[4]?o?(o.p(e,r),16&r&&we(o,1)):(o=Ss(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function Ss(e){let t,n,r,i,o;return n=new De({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-o0hiko")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[9]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ts(e){let t,n,r,i;const o=[bs,As],s=[];return t=function(e){return e[7]?0:1}(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,[t]){n.p(e,t)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}let Ns;function Rs(e,n,r){const{FileDropzone:i,TextField:o}=c,s=K();let{classId:a}=n,{eventId:l}=n,{record:d}=n,{item:u}=n,{id:h}=n,{name:f}=n,m=[],p=d[u.name]||"",g=!!d._id;const w={scale:{once:!1,value:1,start:1,step:.2,stop:1.6},resultOpts:{singleCodeInPage:!0,multiCodesInPage:!1,maxCodesInPage:1},improve:!0,jsQR:{}};var y=async function(e){if(!e.success)return;const n=await t.getSchema(l),i=e.codes?.filter((e=>!!e))?.at(0);if(!i?.length)return;if(!i.startsWith("SPC"))return;const o=Is(i);for(const e in o){if(n.items.find((t=>t.name===e))){if("object"==typeof o[e]){let n={};for(const i in o[e])if("object"==typeof o[e][i])for(const s in o[e][i]){o[e][i][s]&&(n[s]=o[e][i][s]);const a=await t.getSectionView(i,n);if(a?.length){const n=await t.getSectionView(e,{[i]:a[0]._id});n?.length&&r(11,d[e]=n[0]._id,d)}}else{o[e][i]&&(n[i]=o[e][i]);const s=await t.getSectionView(e,n);s?.length&&r(11,d[e]=s[0]._id,d)}}else o[e]&&r(11,d[e]=o[e],d);s("record",{itemName:e,value:d[e]})}}};return Y((()=>{if(Ns)return;let e=document.createElement("script");e.src="/QR/pdf-qr2.js",document.head.append(e),e.onload=function(){Ns=PDF_QR_JS}})),Z((()=>{})),e.$$set=e=>{"classId"in e&&r(0,a=e.classId),"eventId"in e&&r(12,l=e.eventId),"record"in e&&r(11,d=e.record),"item"in e&&r(13,u=e.item),"id"in e&&r(1,h=e.id),"name"in e&&r(2,f=e.name)},[a,h,f,m,p,i,o,g,async e=>{const n=m[0];if(!n){s("record",{itemName:"$file",value:!1});const e=await t.getSchema(l);for(const t of e.items)s("record",{itemName:t.name,value:""});return}const i=URL.createObjectURL(n);r(4,p=n.name),s("record",{itemName:"$file",value:{fileName:p,file:n}}),Ns.decodeDocument(i,w,y)},async()=>{if(!d?._id)return;const e=await t.getTaskByDocId(d._id,!0);if(!e)return;const n=await t.getUserReports(e._id);if(!n?.length)return;let r="/viewer/doc/index.html?file="+("/api/userreport/"+n[0]._id)+"&type=pdf";window.open(r,"","popup=yes toolbar=no width=800 height=1024")},()=>{r(3,m)},d,l,u,function(e){m=e,r(3,m)}]}class Ds extends Te{constructor(e){var t;super(),Es.getElementById("svelte-o0hiko-style")||((t=O("style")).id="svelte-o0hiko-style",t.textContent=".feather.svelte-o0hiko{position:absolute;top:0.75em;left:-1.25em;color:#4300b0}label.file-dropzone{margin-top:0 !important}",N(Es.head,t)),Se(this,e,Rs,Ts,A,{classId:0,eventId:12,record:11,item:13,id:1,name:2})}}const{document:ks}=Ie;function Os(e){let t,n,r,i,o;function s(t){e[18](t)}let a={class:e[0],id:e[1],name:e[2],accept:e[3],max:"1",beforeChange:e[12]};return void 0!==e[4]&&(a.files=e[4]),t=new e[7]({props:a}),ee.push((()=>$e(t,"files",s))),t.$on("change",e[9]),i=new e[8]({props:{inputClass:e[0],hidden:!0,id:e[1],name:e[1],value:e[5]}}),{c(){Ee(t.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,n){Ae(t,e,n),R(e,r,n),Ae(i,e,n),o=!0},p(e,r){const o={};1&r&&(o.class=e[0]),2&r&&(o.id=e[1]),4&r&&(o.name=e[2]),8&r&&(o.accept=e[3]),!n&&16&r&&(n=!0,o.files=e[4],le((()=>n=!1))),t.$set(o);const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.id=e[1]),2&r&&(s.name=e[1]),32&r&&(s.value=e[5]),i.$set(s)},i(e){o||(we(t.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(t.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){be(t,e),e&&D(r),be(i,e)}}}function xs(e){let t,n,r,i;n=new e[8]({props:{inputClass:e[0],readonly:!0,id:e[1],name:e[1],value:e[5]}});let o=e[5]&&Ms(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),z(t,"position","relative")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};1&r&&(i.inputClass=e[0]),2&r&&(i.id=e[1]),2&r&&(i.name=e[1]),32&r&&(i.value=e[5]),n.$set(i),e[5]?o?(o.p(e,r),32&r&&we(o,1)):(o=Ms(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function Ms(e){let t,n,r,i,o;const s=[Ps,Bs],a=[];function l(e,n){return 32&n&&(t=!!e[5].endsWith(".mp4")),t?0:1}return n=l(e,-1),r=a[n]=s[n](e),{c(){r.c(),i=P()},m(e,t){a[n].m(e,t),R(e,i,t),o=!0},p(e,t){let o=n;n=l(e,t),n===o?a[n].p(e,t):(pe(),ye(a[o],1,1,(()=>{a[o]=null})),ge(),r=a[n],r?r.p(e,t):(r=a[n]=s[n](e),r.c()),we(r,1),r.m(i.parentNode,i))},i(e){o||(we(r),o=!0)},o(e){ye(r),o=!1},d(e){a[n].d(e),e&&D(i)}}}function Bs(e){let t,n,r,i,o;return n=new De({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-o0hiko")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[10]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ps(e){let t,n={ctx:e,current:null,token:null,hasCatch:!1,pending:Vs,then:Fs,catch:Ls,value:23};return ve(e[11](),n),{c(){t=P(),n.block.c()},m(e,r){R(e,t,r),n.block.m(e,n.anchor=r),n.mount=()=>t.parentNode,n.anchor=t},p(t,r){_e(n,e=t,r)},i:_,o:_,d(e){e&&D(t),n.block.d(e),n.token=null,n=null}}}function Ls(e){return{c:_,m:_,p:_,d:_}}function Fs(e){let t,n,r,i;return{c(){t=O("video"),n=O("source"),i=M("\n Your browser does not support HTML video."),n.src!==(r=e[23])&&U(n,"src",r),U(n,"type","video/mp4"),U(t,"width","500"),t.controls=!0,z(t,"margin-top","1em")},m(e,r){R(e,t,r),N(t,n),N(t,i)},p:_,d(e){e&&D(t)}}}function Vs(e){return{c:_,m:_,p:_,d:_}}function Us(e){let t,n,r,i;const o=[xs,Os],s=[];function a(e,t){return e[6]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,[i]){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function Hs(e,n,r){const{FileDropzone:i,TextField:o}=c,s=K();let{classId:a}=n,{eventId:l}=n,{record:d}=n,{item:u}=n,{id:h}=n,{name:f}=n,{praefix:m}=n,{recordId:p}=n,{fileType:g="application/pdf"}=n,w=[],y="",v=!1;return Y((()=>{(async()=>{if(!p)return;const e=await t.getTaskByDocId(p,!0);if(!e)return s("listRecord",{itemName:"fileName",value:"",string:!0});const n=d[u.name];if(!n)return s("listRecord",{itemName:"fileName",value:"",string:!0});const i=await t.getUserReports(e._id);if(!i?.length)return s("listRecord",{itemName:"fileName",value:"",string:!0});let o=i.find((e=>e.fileName===n));if(!o)return s("listRecord",{itemName:"fileName",value:"",string:!0});r(5,y=o.fileName),r(6,v=void 0===m?!!p:!!y)})()})),Z((()=>{})),e.$$set=e=>{"classId"in e&&r(0,a=e.classId),"eventId"in e&&r(13,l=e.eventId),"record"in e&&r(14,d=e.record),"item"in e&&r(15,u=e.item),"id"in e&&r(1,h=e.id),"name"in e&&r(2,f=e.name),"praefix"in e&&r(16,m=e.praefix),"recordId"in e&&r(17,p=e.recordId),"fileType"in e&&r(3,g=e.fileType)},[a,h,f,g,w,y,v,i,o,async e=>{const t=w[0];URL.createObjectURL(t),r(5,y=t.name),s("record",{itemName:"$file",value:{fileName:y,file:t}}),void 0!==m&&s("listRecord",{itemName:"fileName",value:y,string:!0})},async()=>{if(!p)return;let e;const n=await t.getTaskByDocId(p,!0);if(!n)return;const r=await t.getUserReports(n._id);if(!r?.length)return;let i=r.find((e=>e.fileName===y));i||(i=r[0]);e="/viewer/doc/index.html?file="+("/api/userreport/"+i._id)+"&type=pdf",window.open(e,"","popup=yes toolbar=no width=800 height=1024")},async()=>{const e=await t.getTaskByDocId(p,!0);if(!e)return"";const n=await t.getUserReports(e._id);if(!n?.length)return"";let r=n.find((e=>e.fileName===y));return r||(r=n[0]),"/api/userreport/"+r._id},()=>{r(4,w)},l,d,u,m,p,function(e){w=e,r(4,w)}]}class Ws extends Te{constructor(e){var t;super(),ks.getElementById("svelte-o0hiko-style")||((t=O("style")).id="svelte-o0hiko-style",t.textContent=".feather.svelte-o0hiko{position:absolute;top:0.75em;left:-1.25em;color:#4300b0}label.file-dropzone{margin-top:0 !important}",N(ks.head,t)),Se(this,e,Hs,Us,A,{classId:0,eventId:13,record:14,item:15,id:1,name:2,praefix:16,recordId:17,fileType:3})}}function zs(e){let t,n,r;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:qs,placeholder:js,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=O("div"),Ee(n.$$.fragment),z(t,"max-width","4em")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,[t]){const r={};4&t&&(r.inputClass=e[2]),1&t&&(r.id=e[0]),1&t&&(r.name=e[0]),2&t&&(r.value=e[1]),8&t&&(r.readonly=e[3]),16&t&&(r.disabled=e[4]),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}const qs="([01][0-9]|2[0-3]):([0-5][0-9])",js="";function Gs(e,t,n){const r=K(),{TextField:i}=c;let{id:o}=t,{item:s}=t,{value:a}=t,{inputClass:l}=t,{readonly:d}=t,{disabled:u}=t,{praefix:h}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,o=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,a=e.value),"inputClass"in e&&n(2,l=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,h=e.praefix)},[o,a,l,d,u,i,({detail:e})=>{r("blur",{value:f(e.value)}),r("checkRange",{idx:h,fieldId:o,value:e.value})},s,h]}class Xs extends Te{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=O("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",N(document.head,t)),Se(this,e,Gs,zs,A,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:Ys}=Ie;function Zs(e,t,n){const r=e.slice();return r[20]=t[n],r}function Ks(e,t,n){const r=e.slice();return r[23]=t[n],r[25]=n,r}function Qs(e){let t,n,r=e[2](e[20],e[23])+"",i=e[25]&&function(){let e;return{c(){e=M(", ")},m(t,n){R(t,e,n)},d(t){t&&D(e)}}}();return{c(){t=O("span"),i&&i.c(),n=M(r),U(t,"class","lookupValue")},m(e,r){R(e,t,r),i&&i.m(t,null),N(t,n)},p(e,t){3&t&&r!==(r=e[2](e[20],e[23])+"")&&H(n,r)},d(e){e&&D(t),i&&i.d()}}}function Js(e){let t,n,r,i,o,s,a,l,c=e[0],d=[];for(let t=0;t<c.length;t+=1)d[t]=Qs(Ks(e,c,t));return i=new it({props:{size:"18"}}),{c(){t=O("div");for(let e=0;e<d.length;e+=1)d[e].c();n=B(),r=O("span"),Ee(i.$$.fragment),o=B(),U(r,"class","feather pointer svelte-1r8jgd4"),U(t,"class","lookupItem svelte-1r8jgd4")},m(c,u){R(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);N(t,n),N(t,r),Ae(i,r,null),N(t,o),s=!0,a||(l=L(r,"click",(function(){E(e[3](e[20]._id))&&e[3](e[20]._id).apply(this,arguments)})),a=!0)},p(r,i){if(e=r,7&i){let r;for(c=e[0],r=0;r<c.length;r+=1){const o=Ks(e,c,r);d[r]?d[r].p(o,i):(d[r]=Qs(o),d[r].c(),d[r].m(t,n))}for(;r<d.length;r+=1)d[r].d(1);d.length=c.length}},i(e){s||(we(i.$$.fragment,e),s=!0)},o(e){ye(i.$$.fragment,e),s=!1},d(e){e&&D(t),k(d,e),be(i),a=!1,l()}}}function ea(e){let t,n,r=e[1],i=[];for(let t=0;t<r.length;t+=1)i[t]=Js(Zs(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){t=O("div");for(let e=0;e<i.length;e+=1)i[e].c();U(t,"class","lookup svelte-1r8jgd4")},m(e,r){R(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);n=!0},p(e,[n]){if(15&n){let s;for(r=e[1],s=0;s<r.length;s+=1){const o=Zs(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=Js(o),i[s].c(),we(i[s],1),i[s].m(t,null))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){e&&D(t),k(i,e)}}}function ta(e,n,r){let{id:i}=n,{item:o}=n,{praefix:s}=n,{record:a}=n,{notifyList:l}=n;const{refItem:c,view:d,beforeSave:u,_state:h}=o.properties;let f=d.split(","),[p,g]=c.split(":"),w=[];const[y,v]=g.split("."),_=(e,t)=>{const[n,r]=t.split(".");return r?e[n][r]:""},I=(e=!0)=>{se().then((()=>{const t=document.querySelector("div.form-field."+o.name);if(t&&(t.style.display=e?"none":"flex"),!e&&u){const e=t.querySelector("div label");e&&(e.style.color="red")}}))};return Y(I),e.$$set=e=>{"id"in e&&r(4,i=e.id),"item"in e&&r(5,o=e.item),"praefix"in e&&r(6,s=e.praefix),"record"in e&&r(7,a=e.record),"notifyList"in e&&r(8,l=e.notifyList)},e.$$.update=()=>{256&e.$$.dirty&&(async e=>{const{itemName:n,value:i}=e||{};if(n!==p)return;if(r(1,w=[]),!i)return;if(!!u==!!a._id)return I();if(!a._id&&!a[p])return I();const o=!f.some((e=>e.includes(":"))),s=v?v+"."+p:p;let l={[s]:a[p]||a._id};if(h&&(l=[{$match:l},{$addFields:{_ids:{$toString:"$_id"}}},{$lookup:{from:"_task",localField:"_ids",foreignField:"docId",as:"_task"}},{$unwind:{path:"$_task",preserveNullAndEmptyArrays:!0}},{$match:{"_task.status":h}}]),r(1,w=await t.getSectionView(y,l,o)),!o&&w.length){const e=f.find((e=>e.includes(":"))).split(":")[0];r(1,w=w.map((t=>{const n=t[e].find((t=>t[e]===a._id));return n._id=t._id,n}))),r(0,f=f.map((e=>e.split(":")[1])))}I(!w.length)})(l)},[f,w,(e,t)=>"boolean"===o.type?e[t]?"ja":"nein":"object"===o.type?"(ja)":e["_"+t]||m(e[t])||e[t]||_(e,t),e=>async()=>{const n=await t.getTaskByDocId(e,!0);if(!n)return;const r=n._id,i=`/task/${n.event}/${r}/task?view=standalone`;window.open(i)},i,o,s,a,l]}class na extends Te{constructor(e){var t;super(),Ys.getElementById("svelte-1r8jgd4-style")||((t=O("style")).id="svelte-1r8jgd4-style",t.textContent=".feather.svelte-1r8jgd4{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1r8jgd4{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1r8jgd4{position:relative;margin-left:2em;padding-bottom:0.75em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}div.field:has(div.lookup){margin-bottom:0.25em !important}",N(Ys.head,t)),Se(this,e,ta,ea,A,{id:4,item:5,praefix:6,record:7,notifyList:8})}}function ra(e){let t,n,r;return n=new dt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function ia(e){let t,n,r,i,o;return n=new dt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[9]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function oa(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[10]);const a=[ia,ra],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}function sa(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e=h;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){Q(e,t)}]}class aa extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,sa,oa,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function la(e){let t,n,r;return n=new Ct({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function ca(e){let t,n,r,i,o;return n=new Ct({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[11]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function da(e){let t,n,r,i,o,s;n=new e[10]({props:{inputClass:e[2],pattern:e[0],placeholder:e[1],disabled:e[3],formnovalidate:e[4],readonly:e[5],required:e[6],id:e[7],name:e[8],value:e[9]}}),n.$on("change",e[12]);const a=[ca,la],l=[];function c(e,t){return e[9]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};4&r&&(s.inputClass=e[2]),1&r&&(s.pattern=e[0]),2&r&&(s.placeholder=e[1]),8&r&&(s.disabled=e[3]),16&r&&(s.formnovalidate=e[4]),32&r&&(s.readonly=e[5]),64&r&&(s.required=e[6]),128&r&&(s.id=e[7]),256&r&&(s.name=e[8]),512&r&&(s.value=e[9]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}function ua(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{pattern:f}=t,{placeholder:m}=t;f||="(\\+(9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1))?\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*(\\d{1,2})$",m||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,i=e.inputClass),"disabled"in e&&n(3,o=e.disabled),"formnovalidate"in e&&n(4,s=e.formnovalidate),"readonly"in e&&n(5,a=e.readonly),"required"in e&&n(6,l=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,h=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,m=e.placeholder)},[f,m,i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e="tel:"+h;window.open(e,"_self")},function(t){Q(e,t)}]}class ha extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,ua,da,A,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function fa(e){let t,n,r;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function ma(e){let t,n,r,i,o;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[12]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function pa(e){let t,n,r,i,o,s;n=new e[11]({props:{type:"email",inputClass:e[0],pattern:e[9],placeholder:e[10],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],multiple:e[8],value:e[7]}}),n.$on("change",e[13]);const a=[ma,fa],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),512&r&&(s.pattern=e[9]),1024&r&&(s.placeholder=e[10]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),256&r&&(s.multiple=e[8]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}function ga(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{multiple:f}=t,{pattern:m}=t,{placeholder:p}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"multiple"in e&&n(8,f=e.multiple),"pattern"in e&&n(9,m=e.pattern),"placeholder"in e&&n(10,p=e.placeholder)},[i,o,s,a,l,d,u,h,f,m,p,r,async()=>{if(!h)return;let e="mailto:"+h;window.open(e,"_self")},function(t){Q(e,t)}]}class wa extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,ga,pa,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,multiple:8,pattern:9,placeholder:10})}}const ya=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","CommentChange","CompositionEnd","CompositionStart","CompositionUpdate","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","Input","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"];function va(e){let t;return{c(){t=O("textarea"),U(t,"id",e[0]),z(t,"visibility","hidden")},m(n,r){R(n,t,r),e[20](t)},p(e,n){1&n&&U(t,"id",e[0])},d(n){n&&D(t),e[20](null)}}}function _a(e){let t;return{c(){t=O("div"),U(t,"id",e[0])},m(n,r){R(n,t,r),e[19](t)},p(e,n){1&n&&U(t,"id",e[0])},d(n){n&&D(t),e[19](null)}}}function Ia(e){let t;function n(e,t){return e[1]?_a:va}let r=n(e),i=r(e);return{c(){t=O("div"),i.c(),U(t,"class",e[2])},m(n,r){R(n,t,r),i.m(t,null),e[21](t)},p(e,[o]){r===(r=n(e))&&i?i.p(e,o):(i.d(1),i=r(e),i&&(i.c(),i.m(t,null))),4&o&&U(t,"class",e[2])},i:_,o:_,d(n){n&&D(t),i.d(),e[21](null)}}}const Ca=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let $a=(()=>{let e={listeners:[],scriptId:Ca("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,r)=>{e.scriptLoaded?r():(e.listeners.push(r),e.injected||((t,n,r,i)=>{e.injected=!0;const o=n.createElement("script");o.referrerPolicy="origin",o.type="application/javascript",o.src=r,o.onload=()=>{i()},n.head&&n.head.appendChild(o)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function Ea(e,t,n){let r,i,o,{id:s=Ca("tinymce-svelte")}=t,{inline:a}=t,{disabled:l=!1}=t,{readonly:c=!1}=t,{apiKey:d="no-api-key"}=t,{licenseKey:u}=t,{channel:h="7"}=t,{scriptSrc:f}=t,{conf:m={}}=t,{modelEvents:p="change input undo redo"}=t,{value:g=""}=t,{text:w=""}=t,{cssClass:y="tinymce-wrapper"}=t,v=g,_=l,I=c;const C=(e,t)=>{var n;"function"==typeof(null===(n=e.mode)||void 0===n?void 0:n.set)&&e.mode.set(t?"readonly":"design")},$=(e,t)=>{(e=>"function"==typeof e.options.set&&e.options.isRegistered("disabled"))(e)?e.options.set("disabled",t):e.mode.set(t?"readonly":"design")},E=K(),A=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},b=()=>{var e;const t=Object.assign(Object.assign({},m),{target:i,inline:void 0!==a?a:void 0!==m.inline&&m.inline,license_key:u,setup:e=>{e.on("PreInit",(()=>{$(e,l),C(e,c)})),n(15,o=e),e.on("init",(()=>{e.setContent(g),e.on(p,(()=>{n(16,v=e.getContent()),v!==g&&(n(5,g=v),n(6,w=e.getContent({format:"text"})))}))})),((e,t)=>{ya.forEach((n=>{e.on(n,(r=>{t(n.toLowerCase(),{eventName:n,event:r,editor:e})}))}))})(e,E),"function"==typeof m.setup&&m.setup(e)}});n(4,i.style.visibility="",i),null===(e=A())||void 0===e||e.init(t)};return Y((()=>{if(null!==A())b();else{const e=f||`https://cdn.tiny.cloud/1/${d}/tinymce/${h}/tinymce.min.js`;$a.load(r.ownerDocument,e,(()=>{b()}))}})),Z((()=>{var e;o&&(null===(e=A())||void 0===e||e.remove(o))})),e.$$set=e=>{"id"in e&&n(0,s=e.id),"inline"in e&&n(1,a=e.inline),"disabled"in e&&n(7,l=e.disabled),"readonly"in e&&n(8,c=e.readonly),"apiKey"in e&&n(9,d=e.apiKey),"licenseKey"in e&&n(10,u=e.licenseKey),"channel"in e&&n(11,h=e.channel),"scriptSrc"in e&&n(12,f=e.scriptSrc),"conf"in e&&n(13,m=e.conf),"modelEvents"in e&&n(14,p=e.modelEvents),"value"in e&&n(5,g=e.value),"text"in e&&n(6,w=e.text),"cssClass"in e&&n(2,y=e.cssClass)},e.$$.update=()=>{491936&e.$$.dirty&&(o&&v!==g&&(o.setContent(g),n(6,w=o.getContent({format:"text"}))),o&&c!==I&&(n(18,I=c),C(o,c)),o&&l!==_&&(n(17,_=l),$(o,l)))},[s,a,y,r,i,g,w,l,c,d,u,h,f,m,p,o,v,_,I,function(e){ee[e?"unshift":"push"]((()=>{i=e,n(4,i)}))},function(e){ee[e?"unshift":"push"]((()=>{i=e,n(4,i)}))},function(e){ee[e?"unshift":"push"]((()=>{r=e,n(3,r)}))}]}class Aa extends Te{constructor(e){super(),Se(this,e,Ea,Ia,A,{id:0,inline:1,disabled:7,readonly:8,apiKey:9,licenseKey:10,channel:11,scriptSrc:12,conf:13,modelEvents:14,value:5,text:6,cssClass:2})}}function ba(e){let t,n,r,i,o,s,a;function l(t){e[9](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",licenseKey:"gpl",conf:e[7],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new Aa({props:c}),ee.push((()=>$e(n,"value",l))),{c(){t=O("div"),Ee(n.$$.fragment),i=B(),o=O("input"),U(o,"class",s=e[1]||e[2]),U(o,"id",e[3]),U(o,"name",e[3]),o.value=e[0],o.hidden=!0,z(t,"min-height","10em"),z(t,"margin-top","-1em")},m(e,r){R(e,t,r),Ae(n,t,null),N(t,i),N(t,o),a=!0},p(e,t){const i={};16&t&&(i.disabled=e[4]),32&t&&(i.readonly=e[5]),!r&&1&t&&(r=!0,i.value=e[0],le((()=>r=!1))),n.$set(i),(!a||6&t&&s!==(s=e[1]||e[2]))&&U(o,"class",s),(!a||8&t)&&U(o,"id",e[3]),(!a||8&t)&&U(o,"name",e[3]),(!a||1&t&&o.value!==e[0])&&(o.value=e[0])},i(e){a||(we(n.$$.fragment,e),a=!0)},o(e){ye(n.$$.fragment,e),a=!1},d(e){e&&D(t),be(n)}}}function Sa(e){let t,n,r=e[6]&&ba(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,[n]){e[6]?r?(r.p(e,n),64&n&&we(r,1)):(r=ba(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Ta(e,t,r){const i=K();let o=JSON.parse(n.getItem("Locale")).id;o=o.startsWith("fr")?"fr_FR":o.split("-")[0];let s,{value:a=""}=t,{noForm:l}=t,{classId:c}=t,{id:d}=t,{record:u}=t,{disabled:h}=t,{readonly:f}=t;const m=(e,t)=>{if(!s)return;if(!e)return;if(!e.includes("{{"))return;const n=t.employee;if(n)try{fh("employee",n).then((t=>{if(!t)return;const n=e.replace("{{employee.firstName}}",t.firstName).replace("{{employee.lastName}}",t.lastName);i("blur",{value:n})}))}catch(e){}},p={plugins:"advlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:o};return Y((()=>setTimeout((()=>{r(6,s=!0),m(a,u)}),300))),e.$$set=e=>{"value"in e&&r(0,a=e.value),"noForm"in e&&r(1,l=e.noForm),"classId"in e&&r(2,c=e.classId),"id"in e&&r(3,d=e.id),"record"in e&&r(8,u=e.record),"disabled"in e&&r(4,h=e.disabled),"readonly"in e&&r(5,f=e.readonly)},e.$$.update=()=>{257&e.$$.dirty&&(a||u)&&m(a,u)},[a,l,c,d,h,f,s,p,u,function(e){a=e,r(0,a)}]}class Na extends Te{constructor(e){var t;super(),document.getElementById("svelte-yi7lpi-style")||((t=O("style")).id="svelte-yi7lpi-style",t.textContent="div.tox-statusbar__text-container, div.tox-promotion{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",N(document.head,t)),Se(this,e,Ta,Sa,A,{value:0,noForm:1,classId:2,id:3,record:8,disabled:4,readonly:5})}}
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,r,i,o,s,a,l,c,d,u,h;return{setters:[function(e){t=e.Request,n=e.Storage,r=e.task_notification,i=e.currentRoles,o=e.TextArea,s=e.toasts,a=e.settings,l=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){h=e.taskClipboard}],execute:function(){function f(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}e("version","0.3.43");const m=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),p=e=>{try{return new Date(e).toLocaleString()}catch{return e}},g=e=>e?"(ja)":"(nein)",w=(e,t)=>{if(!e.display&&!e.items)return"";const n={...t};return(e.display?.reduce(((t,r)=>{let[i,o]=r.split(".");if(e.list?.find((({name:e})=>e===i))&&o&&void 0!==n[i]){const e=`${i}_${o}`;n[e]=n[i][o],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?g(n[e]):m(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&g(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e&&!y(e))).join(" · "))).filter((e=>!!e)).join(" • ")},y=e=>/^[0-9a-f]{24}/.test(e),v=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function _(){}function I(e){return e()}function C(){return Object.create(null)}function $(e){e.forEach(I)}function E(e){return"function"==typeof e}function A(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function b(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return _;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function S(e){return null==e?"":e}function T(e,t,n=t){return e.set(n),t}function N(e,t){e.appendChild(t)}function R(e,t,n){e.insertBefore(t,n||null)}function D(e){e.parentNode.removeChild(e)}function k(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function O(e){return document.createElement(e)}function x(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function M(e){return document.createTextNode(e)}function B(){return M(" ")}function P(){return M("")}function L(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function F(e){return function(t){return t.preventDefault(),e.call(this,t)}}function V(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function U(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function H(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function W(e,t){e.value=null==t?"":t}function z(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function q(e,t,n){e.classList[n?"add":"remove"](t)}let j;function G(e){j=e}function X(){if(!j)throw new Error("Function called outside component initialization");return j}function Y(e){X().$$.on_mount.push(e)}function Z(e){X().$$.on_destroy.push(e)}function K(){const e=X();return(t,n)=>{const r=e.$$.callbacks[t];if(r){const i=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);r.slice().forEach((t=>{t.call(e,i)}))}}}function Q(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const J=[],ee=[],te=[],ne=[],re=Promise.resolve();let ie=!1;function oe(){ie||(ie=!0,re.then(ue))}function se(){return oe(),re}function ae(e){te.push(e)}function le(e){ne.push(e)}let ce=!1;const de=new Set;function ue(){if(!ce){ce=!0;do{for(let e=0;e<J.length;e+=1){const t=J[e];G(t),he(t.$$)}for(G(null),J.length=0;ee.length;)ee.pop()();for(let e=0;e<te.length;e+=1){const t=te[e];de.has(t)||(de.add(t),t())}te.length=0}while(J.length);for(;ne.length;)ne.pop()();ie=!1,ce=!1,de.clear()}}function he(e){if(null!==e.fragment){e.update(),$(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ae)}}const fe=new Set;let me;function pe(){me={r:0,c:[],p:me}}function ge(){me.r||$(me.c),me=me.p}function we(e,t){e&&e.i&&(fe.delete(e),e.i(t))}function ye(e,t,n,r){if(e&&e.o){if(fe.has(e))return;fe.add(e),me&&me.c.push((()=>{fe.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}function ve(e,t){const n=t.token={};function r(e,r,i,o){if(t.token!==n)return;t.resolved=o;let s=t.ctx;void 0!==i&&(s=s.slice(),s[i]=o);const a=e&&(t.current=e)(s);let l=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==r&&e&&(pe(),ye(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ge())})):t.block.d(1),a.c(),we(a,1),a.m(t.mount(),t.anchor),l=!0),t.block=a,t.blocks&&(t.blocks[r]=a),l&&ue()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=X();if(e.then((e=>{G(n),r(t.then,1,t.value,e),G(null)}),(e=>{if(G(n),r(t.catch,2,t.error,e),G(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}var i}function _e(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}const Ie="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ce(e,t){ye(e,1,1,(()=>{t.delete(e.key)}))}function $e(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Ee(e){e&&e.c()}function Ae(e,t,n,r){const{fragment:i,on_mount:o,on_destroy:s,after_update:a}=e.$$;i&&i.m(t,n),r||ae((()=>{const t=o.map(I).filter(E);s?s.push(...t):$(t),e.$$.on_mount=[]})),a.forEach(ae)}function be(e,t){const n=e.$$;null!==n.fragment&&($(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Se(e,t,n,r,i,o,s=[-1]){const a=j;G(e);const l=e.$$={fragment:null,ctx:null,props:o,update:_,not_equal:i,bound:C(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:t.context||[]),callbacks:C(),dirty:s,skip_bound:!1};let c=!1;if(l.ctx=n?n(e,t.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return l.ctx&&i(l.ctx[t],l.ctx[t]=o)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](o),c&&function(e,t){-1===e.$$.dirty[0]&&(J.push(e),oe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],l.update(),c=!0,$(l.before_update),l.fragment=!!r&&r(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(D)}else l.fragment&&l.fragment.c();t.intro&&we(e.$$.fragment),Ae(e,t.target,t.anchor,t.customElement),ue()}G(a)}class Te{$destroy(){be(this,1),this.$destroy=_}$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 Ne(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("polygon"),U(n,"d","M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"),U(r,"points","12 15 17 21 7 21 12 15"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-airplay "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-airplay "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function Re(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class De extends Te{constructor(e){super(),Se(this,e,Re,Ne,A,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("path"),r=x("line"),i=x("line"),U(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"),U(r,"x1","12"),U(r,"y1","9"),U(r,"x2","12"),U(r,"y2","13"),U(i,"x1","12"),U(i,"y1","17"),U(i,"x2","12.01"),U(i,"y2","17"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-alert-triangle "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-alert-triangle "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function Oe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class xe extends Te{constructor(e){super(),Se(this,e,Oe,ke,A,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("circle"),r=x("polyline"),i=x("line"),U(n,"cx","12"),U(n,"cy","12"),U(n,"r","10"),U(r,"points","8 12 12 16 16 12"),U(i,"x1","12"),U(i,"y1","8"),U(i,"x2","12"),U(i,"y2","16"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-arrow-down-circle "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-arrow-down-circle "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function Be(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Pe extends Te{constructor(e){super(),Se(this,e,Be,Me,A,{size:0,strokeWidth:1,class:2})}}function Le(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("path"),U(n,"d","M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"),U(r,"d","M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-book-open "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-book-open "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function Fe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ve extends Te{constructor(e){super(),Se(this,e,Fe,Le,A,{size:0,strokeWidth:1,class:2})}}function Ue(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("circle"),U(n,"d","M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"),U(r,"cx","12"),U(r,"cy","13"),U(r,"r","4"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-camera "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-camera "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function He(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class We extends Te{constructor(e){super(),Se(this,e,He,Ue,A,{size:0,strokeWidth:1,class:2})}}function ze(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),U(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),U(r,"points","22 4 12 14.01 9 11.01"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function qe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class je extends Te{constructor(e){super(),Se(this,e,qe,ze,A,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,r;return{c(){t=x("svg"),n=x("path"),U(n,"d","M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",r="feather feather-command "+e[2])},m(e,r){R(e,t,r),N(t,n)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-command "+e[2])&&U(t,"class",r)},i:_,o:_,d(e){e&&D(t)}}}function Xe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ye extends Te{constructor(e){super(),Se(this,e,Xe,Ge,A,{size:0,strokeWidth:1,class:2})}}function Ze(e){let t,n,r,i;return{c(){t=x("svg"),n=x("polyline"),r=x("path"),U(n,"points","9 10 4 15 9 20"),U(r,"d","M20 4v7a4 4 0 0 1-4 4H4"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function Ke(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Qe extends Te{constructor(e){super(),Se(this,e,Ke,Ze,A,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("path"),r=x("line"),i=x("line"),U(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),U(r,"x1","18"),U(r,"y1","9"),U(r,"x2","12"),U(r,"y2","15"),U(i,"x1","12"),U(i,"y1","9"),U(i,"x2","18"),U(i,"y2","15"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-delete "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-delete "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function et(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class tt extends Te{constructor(e){super(),Se(this,e,et,Je,A,{size:0,strokeWidth:1,class:2})}}function nt(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),i=x("line"),U(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),U(r,"points","15 3 21 3 21 9"),U(i,"x1","10"),U(i,"y1","14"),U(i,"x2","21"),U(i,"y2","3"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-external-link "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-external-link "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function rt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class it extends Te{constructor(e){super(),Se(this,e,rt,nt,A,{size:0,strokeWidth:1,class:2})}}function ot(e){let t,n,r,i,o,s;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),i=x("line"),o=x("line"),U(n,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),U(r,"points","14 2 14 8 20 8"),U(i,"x1","12"),U(i,"y1","18"),U(i,"x2","12"),U(i,"y2","12"),U(o,"x1","9"),U(o,"y1","15"),U(o,"x2","15"),U(o,"y2","15"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",s="feather feather-file-plus "+e[2])},m(e,s){R(e,t,s),N(t,n),N(t,r),N(t,i),N(t,o)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-file-plus "+e[2])&&U(t,"class",s)},i:_,o:_,d(e){e&&D(t)}}}function st(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class at extends Te{constructor(e){super(),Se(this,e,st,ot,A,{size:0,strokeWidth:1,class:2})}}function lt(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("circle"),r=x("line"),i=x("path"),U(n,"cx","12"),U(n,"cy","12"),U(n,"r","10"),U(r,"x1","2"),U(r,"y1","12"),U(r,"x2","22"),U(r,"y2","12"),U(i,"d","M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-globe "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-globe "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function ct(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class dt extends Te{constructor(e){super(),Se(this,e,ct,lt,A,{size:0,strokeWidth:1,class:2})}}function ut(e){let t,n,r,i,o,s,a,l;return{c(){t=x("svg"),n=x("line"),r=x("line"),i=x("line"),o=x("line"),s=x("line"),a=x("line"),U(n,"x1","8"),U(n,"y1","6"),U(n,"x2","21"),U(n,"y2","6"),U(r,"x1","8"),U(r,"y1","12"),U(r,"x2","21"),U(r,"y2","12"),U(i,"x1","8"),U(i,"y1","18"),U(i,"x2","21"),U(i,"y2","18"),U(o,"x1","3"),U(o,"y1","6"),U(o,"x2","3.01"),U(o,"y2","6"),U(s,"x1","3"),U(s,"y1","12"),U(s,"x2","3.01"),U(s,"y2","12"),U(a,"x1","3"),U(a,"y1","18"),U(a,"x2","3.01"),U(a,"y2","18"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",l="feather feather-list "+e[2])},m(e,l){R(e,t,l),N(t,n),N(t,r),N(t,i),N(t,o),N(t,s),N(t,a)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-list "+e[2])&&U(t,"class",l)},i:_,o:_,d(e){e&&D(t)}}}function ht(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ft extends Te{constructor(e){super(),Se(this,e,ht,ut,A,{size:0,strokeWidth:1,class:2})}}function mt(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("polyline"),U(n,"d","M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"),U(r,"points","22,6 12,13 2,6"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-mail "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-mail "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function pt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class gt extends Te{constructor(e){super(),Se(this,e,pt,mt,A,{size:0,strokeWidth:1,class:2})}}function wt(e){let t,n,r,i;return{c(){t=x("svg"),n=x("path"),r=x("circle"),U(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),U(r,"cx","12"),U(r,"cy","10"),U(r,"r","3"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-map-pin "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-map-pin "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function yt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class vt extends Te{constructor(e){super(),Se(this,e,yt,wt,A,{size:0,strokeWidth:1,class:2})}}function _t(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("polyline"),r=x("line"),i=x("path"),U(n,"points","23 7 23 1 17 1"),U(r,"x1","16"),U(r,"y1","8"),U(r,"x2","23"),U(r,"y2","1"),U(i,"d","M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-phone-outgoing "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-phone-outgoing "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function It(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ct extends Te{constructor(e){super(),Se(this,e,It,_t,A,{size:0,strokeWidth:1,class:2})}}function $t(e){let t,n,r,i,o;return{c(){t=x("svg"),n=x("polyline"),r=x("path"),i=x("rect"),U(n,"points","6 9 6 2 18 2 18 9"),U(r,"d","M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"),U(i,"x","6"),U(i,"y","14"),U(i,"width","12"),U(i,"height","8"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",o="feather feather-printer "+e[2])},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-printer "+e[2])&&U(t,"class",o)},i:_,o:_,d(e){e&&D(t)}}}function Et(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class At extends Te{constructor(e){super(),Se(this,e,Et,$t,A,{size:0,strokeWidth:1,class:2})}}function bt(e){let t,n,r,i;return{c(){t=x("svg"),n=x("circle"),r=x("line"),U(n,"cx","11"),U(n,"cy","11"),U(n,"r","8"),U(r,"x1","21"),U(r,"y1","21"),U(r,"x2","16.65"),U(r,"y2","16.65"),U(t,"xmlns","http://www.w3.org/2000/svg"),U(t,"width",e[0]),U(t,"height",e[0]),U(t,"fill","none"),U(t,"viewBox","0 0 24 24"),U(t,"stroke","currentColor"),U(t,"stroke-width",e[1]),U(t,"stroke-linecap","round"),U(t,"stroke-linejoin","round"),U(t,"class",i="feather feather-search "+e[2])},m(e,i){R(e,t,i),N(t,n),N(t,r)},p(e,[n]){1&n&&U(t,"width",e[0]),1&n&&U(t,"height",e[0]),2&n&&U(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&U(t,"class",i)},i:_,o:_,d(e){e&&D(t)}}}function St(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Tt extends Te{constructor(e){super(),Se(this,e,St,bt,A,{size:0,strokeWidth:1,class:2})}}const{document:Nt}=Ie;function Rt(e){e[49]=e[50].items}function Dt(e,t,n){const r=e.slice();return r[51]=t[n],r[53]=n,r}function kt(e,t,n){const r=e.slice();return r[54]=t[n],r}function Ot(e,t,n){const r=e.slice();return r[54]=t[n],r}function xt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Mt(e){let t,n,r,i,o,s;Rt(e);let a=e[5]?.length&&Bt(e),l=e[49]?.length&&Lt(e),c=e[5]?.length&&Ut(e);return{c(){a&&a.c(),t=B(),n=O("div"),r=O("table"),l&&l.c(),i=B(),o=O("tbody"),c&&c.c(),U(r,"striped",""),U(r,"class","svelte-47aais"),U(n,"class","eList svelte-47aais")},m(e,d){a&&a.m(e,d),R(e,t,d),R(e,n,d),N(n,r),l&&l.m(r,null),N(r,i),N(r,o),c&&c.m(o,null),s=!0},p(e,n){Rt(e),e[5]?.length?a?(a.p(e,n),32&n[0]&&we(a,1)):(a=Bt(e),a.c(),we(a,1),a.m(t.parentNode,t)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge()),e[49]?.length?l?l.p(e,n):(l=Lt(e),l.c(),l.m(r,i)):l&&(l.d(1),l=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&we(c,1)):(c=Ut(e),c.c(),we(c,1),c.m(o,null)):c&&(pe(),ye(c,1,1,(()=>{c=null})),ge())},i(e){s||(we(a),we(c),s=!0)},o(e){ye(a),ye(c),s=!1},d(e){a&&a.d(e),e&&D(t),e&&D(n),l&&l.d(),c&&c.d()}}}function Bt(e){let t,n,r,i,o,s,a,l,c,d,u,h=e[6]&&Pt(e);function f(t){e[33](t)}let m={id:e[10]};return void 0!==e[3]&&(m.value=e[3]),i=new e[8]({props:m}),ee.push((()=>$e(i,"value",f))),i.$on("input",e[14]),l=new tt({props:{size:"18"}}),{c(){h&&h.c(),t=B(),n=O("div"),r=M("Suchen: "),Ee(i.$$.fragment),s=B(),a=O("span"),Ee(l.$$.fragment),U(a,"class","feather pointer svelte-47aais"),z(n,"margin-bottom","1em"),z(n,"position","relative")},m(o,f){h&&h.m(o,f),R(o,t,f),R(o,n,f),N(n,r),Ae(i,n,null),N(n,s),N(n,a),Ae(l,a,null),c=!0,d||(u=L(a,"click",e[16]),d=!0)},p(e,n){e[6]?h?64&n[0]&&we(h,1):(h=Pt(e),h.c(),we(h,1),h.m(t.parentNode,t)):h&&(pe(),ye(h,1,1,(()=>{h=null})),ge());const r={};!o&&8&n[0]&&(o=!0,r.value=e[3],le((()=>o=!1))),i.$set(r)},i(e){c||(we(h),we(i.$$.fragment,e),we(l.$$.fragment,e),c=!0)},o(e){ye(h),ye(i.$$.fragment,e),ye(l.$$.fragment,e),c=!1},d(e){h&&h.d(e),e&&D(t),e&&D(n),be(i),be(l),d=!1,u()}}}function Pt(e){let t,n;return t=new e[7]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Lt(e){let t,n,r,i=e[4]&&e[0]&&Ft(),o=e[49],s=[];for(let t=0;t<o.length;t+=1)s[t]=Vt(Ot(e,o,t));return{c(){t=O("thead"),n=O("tr"),i&&i.c(),r=B();for(let e=0;e<s.length;e+=1)s[e].c();U(n,"class","svelte-47aais"),U(t,"class","svelte-47aais")},m(e,o){R(e,t,o),N(t,n),i&&i.m(n,null),N(n,r);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Ft(),i.c(),i.m(n,r)):i&&(i.d(1),i=null),8196&t[0]){let r;for(o=e[49],r=0;r<o.length;r+=1){const i=Ot(e,o,r);s[r]?s[r].p(i,t):(s[r]=Vt(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&D(t),i&&i.d(),k(s,e)}}}function Ft(e){let t;return{c(){t=O("th"),U(t,"class","svelte-47aais")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Vt(e){let t,n,r=e[54]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-47aais")},m(e,r){R(e,t,r),N(t,n)},p(e,t){4&t[0]&&r!==(r=e[54]?.designation+"")&&H(n,r)},d(e){e&&D(t)}}}function Ut(e){let t,n,r=[],i=new Map,o=e[5];const s=e=>e[51]?._id;for(let t=0;t<o.length;t+=1){let n=Dt(e,o,t),a=s(n);i.set(a,r[t]=qt(a,n))}return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=P()},m(e,i){for(let t=0;t<r.length;t+=1)r[t].m(e,i);R(e,t,i),n=!0},p(e,n){178239&n[0]&&(o=e[5],pe(),r=function(e,t,n,r,i,o,s,a,l,c,d,u){let h=e.length,f=o.length,m=h;const p={};for(;m--;)p[e[m].key]=m;const g=[],w=new Map,y=new Map;for(m=f;m--;){const e=u(i,o,m),a=n(e);let l=s.get(a);l?r&&l.p(e,t):(l=c(a,e),l.c()),w.set(a,g[m]=l),a in p&&y.set(a,Math.abs(m-p[a]))}const v=new Set,_=new Set;function I(e){we(e,1),e.m(a,d),s.set(e.key,e),d=e.first,f--}for(;h&&f;){const t=g[f-1],n=e[h-1],r=t.key,i=n.key;t===n?(d=t.first,h--,f--):w.has(i)?!s.has(r)||v.has(r)?I(t):_.has(i)?h--:y.get(r)>y.get(i)?(_.add(r),I(t)):(v.add(i),h--):(l(n,s),h--)}for(;h--;){const t=e[h];w.has(t.key)||l(t,s)}for(;f;)I(g[f-1]);return g}(r,n,s,1,e,o,i,t.parentNode,Ce,qt,t,Dt),ge())},i(e){if(!n){for(let e=0;e<o.length;e+=1)we(r[e]);n=!0}},o(e){for(let e=0;e<r.length;e+=1)ye(r[e]);n=!1},d(e){for(let t=0;t<r.length;t+=1)r[t].d(e);e&&D(t)}}}function Ht(e){let t,n,r,i,o,s,a=e[4]&&e[0]&&Wt(e),l=e[49],c=[];for(let t=0;t<l.length;t+=1)c[t]=zt(kt(e,l,t));return{c(){t=O("tr"),a&&a.c(),n=B();for(let e=0;e<c.length;e+=1)c[e].c();r=B(),U(t,"class","pointer svelte-47aais"),q(t,"active",e[51]._id===e[1]),q(t,"blocked",!!e[51].blocked),q(t,"undeliverable",!!e[51].undeliverable)},m(l,d){R(l,t,d),a&&a.m(t,null),N(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);N(t,r),i=!0,o||(s=L(t,"click",V((function(){E(e[12](e[51],e[53]))&&e[12](e[51],e[53]).apply(this,arguments)}))),o=!0)},p(i,o){if((e=i)[4]&&e[0]?a?(a.p(e,o),17&o[0]&&we(a,1)):(a=Wt(e),a.c(),we(a,1),a.m(t,n)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge()),10276&o[0]){let n;for(l=e[49],n=0;n<l.length;n+=1){const i=kt(e,l,n);c[n]?c[n].p(i,o):(c[n]=zt(i),c[n].c(),c[n].m(t,r))}for(;n<c.length;n+=1)c[n].d(1);c.length=l.length}34&o[0]&&q(t,"active",e[51]._id===e[1]),32&o[0]&&q(t,"blocked",!!e[51].blocked),32&o[0]&&q(t,"undeliverable",!!e[51].undeliverable)},i(e){i||(we(a),i=!0)},o(e){ye(a),i=!1},d(e){e&&D(t),a&&a.d(),k(c,e),o=!1,s()}}}function Wt(e){let t,n,r,i,o;return n=new it({props:{size:"18"}}),{c(){t=O("td"),Ee(n.$$.fragment),U(t,"class","editRow svelte-47aais"),z(t,"color","#326173")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",V((function(){E(e[17](e[51]))&&e[17](e[51]).apply(this,arguments)}))),i=!0)},p(t,n){e=t},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function zt(e){let t,n,r,i=e[11](e[51],e[54])+"";return{c(){t=O("td"),n=M(i),U(t,"class",r=S(e[54].type)+" svelte-47aais")},m(e,r){R(e,t,r),N(t,n)},p(e,o){36&o[0]&&i!==(i=e[11](e[51],e[54])+"")&&H(n,i),4&o[0]&&r!==(r=S(e[54].type)+" svelte-47aais")&&U(t,"class",r)},d(e){e&&D(t)}}}function qt(e,t){let n,r,i,o=t[15](t[51],t[49],t[3]),s=o&&Ht(t);return{key:e,first:null,c(){n=P(),s&&s.c(),r=P(),this.first=n},m(e,t){R(e,n,t),s&&s.m(e,t),R(e,r,t),i=!0},p(e,n){t=e,44&n[0]&&(o=t[15](t[51],t[49],t[3])),o?s?(s.p(t,n),44&n[0]&&we(s,1)):(s=Ht(t),s.c(),we(s,1),s.m(r.parentNode,r)):s&&(pe(),ye(s,1,1,(()=>{s=null})),ge())},i(e){i||(we(s),i=!0)},o(e){ye(s),i=!1},d(e){e&&D(n),s&&s.d(e),e&&D(r)}}}function jt(e){let t,n;return t=new e[7]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Gt(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:jt,then:Mt,catch:xt,value:50,blocks:[,,,]};return ve(n=e[2]&&e[13](),i),{c(){t=P(),i.block.c()},m(e,n){R(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,4&r[0]&&n!==(n=e[2]&&e[13]())&&ve(n,i)||_e(i,e,r)},i(e){r||(we(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}r=!1},d(e){e&&D(t),i.block.d(e),i.token=null,i=null}}}const Xt=e("getDisplayItems",(async(e,n,r)=>{if(!e)return;let i=[];for(const o of e){if("_total"===o){i.push({name:"_total",designation:"Betrag",type:"number"});continue}if("__total"===o){i.push({name:"__total",designation:"Total CHF",type:"number",decimals:2});continue}const[e,s]=o.split(".");let a=n.list?.find((t=>t.name===e))?.item?.find((e=>e.name===s));if(a&&(a={...a},a.name=`${e}_${s}`,r=r.map((t=>(t[e]&&(t[a.name]=t["_"+e]?t["_"+e][s]:t[e][s]),t)))),a||(a=n.items.find((t=>t.name===e))),!a){const n=(await t.getSchemaByClass(e)).items.find((e=>e.name===s));n&&(a={name:e,designation:n.designation,type:n.type,decimals:n.properties?.decimals||0})}i.find((t=>t?.name===e))||i.push(a)}return i.length?i:n.items}));function Yt(e,i,o){let s;let a=JSON.parse(n.getItem("Locale")).id;const l=K(),{Loading:d,TextField:h}=c,{currentTasks:f}=u;b(e,f,(e=>o(37,s=e)));let p,w,y,v,{inputList:_}=i,{eventId:I}=i,{prevEventId:C}=i,{record:$}=i,{className:E}=i,{rowId:A}=i,{filterForReady:S=!1}=i,{filter:T}=i,{query:N}=i,{refStatus:R}=i,{showEdit:D=!1}=i,{praefix:k=""}=i,{selectionFields:O=!1}=i,{deList:x}=i,{stopAggregation:M=!1}=i,{shouldBlock:B}=i,{inputSearch:P=""}=i,L=!0,F=P,V=E+Math.floor(9e3*Math.random()+1e3).toString()+"search",U=!1,H=!0;const W=(e,t)=>{if(!t)return;let n=e[t.name];if("__total"===t.name&&void 0===n&&(n=1.081*e._total),!n&&t.name.includes("_")&&!t.name.startsWith("_")){const[r,i]=t.name.split("_");try{n=e[r][i]}catch{}}if(Array.isArray(n)){const e=e=>e.replaceAll(" ",String.fromCharCode(160));if(n.length&&Array.isArray(n[0].serialno)){let t=[];for(const r of n)t=t.concat(r.serialno.map(e));n=t.join(", ")}else n=n.map(e),n.length>3&&(n=n.slice(0,3),n=n.concat("...")),n=n.join(", ")}if(!n&&t.name.split("_").length>1){const[r,i]=t.name.split("_");try{n=e[r][0][i],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n||(n=e[`_${t.name}`]),n=Number(n)?Number(n).toLocaleString(a,{minimumFractionDigits:t.properties?.decimals||t.decimals||0,maximumFractionDigits:t.properties?.decimals||t.decimals||0}):""),"boolean"===t.type&&"Aktiv"===n&&(n=!1),"number"===t.type?n:"boolean"==typeof n||"boolean"===t.type?g(n):m(e[`_${t.name}`]||n||"")},z=t.getSchemaByClass(E),q=async(e,n)=>{if(!e)return[];if(T){let n;const r=T.startsWith("!");r&&(n=T.replace("!",""));const i=T.startsWith("$");if(n&&!i&&(e=e.filter((e=>i?e[n]===A:r?!e[n]:!!e[n]))),i){n=T.replace("$","");const[r,i]=n.split(".");if($[i]){const n=await t.getSectionView(r,{[i]:$[i]});e=e.filter((e=>n.find((t=>t._id==e[r]))))}else e=[]}}if(R&&!N)return o(18,R=[].concat(R)),e.filter((e=>!!R.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(C){const n=await t.getEvent(C);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===E)return"Information"===n.state.task?e.filter((e=>"Closed"!==e._task.status)):e.filter((e=>"Ready"===e._task.status))}return e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status))},j=(e,t)=>{if(e){let n,r="1";if("string"==typeof e)n=e;else{const t=Object.keys(e);n=t[0],r=t[1]}"date"===n&&(r="-1");const i=new Intl.Collator(a,{numeric:!0});return 1==r?t.sort(((e,t)=>i.compare(e[n],t[n]))):t.sort(((e,t)=>i.compare(t[n],e[n])))}return t},G=async e=>{let n,r=0;H=!1;const i=e=>new Promise((t=>setTimeout(t,e))),s=await z;for(;r++<200&&!M&&!(n=await X(e,s.id));)await i(500);o(6,U=!1),M&&t.readTasksByAggregationId(e,!0),n&&(o(5,y=j(w.displaySort,n.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),H=!0}),100))},X=async(e,n)=>await t.readTasksByAggregationId(e,!1,n),Z=async(e,t,n,r)=>{const{value:i,refClass:o}=r,[s,a]=n.split("."),l=i?.get(k),c=l&&await fh(s,l);if(!c)return e;const d=c[a];return d?.length?d.map((n=>{let r=e?.find((e=>e._id===n[t]))||{};r={...r};for(const e in r)n[e]&&(r[e]=n[e]);for(const e in n)n[e]&&(r[e]=n[e]);return uh(o+r._id.toString(),r),r})):e};Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(V)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await z;e.eventId===t.id&&(mh(t.class,e.eventId),o(2,L=!o(2,L=!1)))}));return e.$$set=e=>{"inputList"in e&&o(20,_=e.inputList),"eventId"in e&&o(21,I=e.eventId),"prevEventId"in e&&o(22,C=e.prevEventId),"record"in e&&o(23,$=e.record),"className"in e&&o(24,E=e.className),"rowId"in e&&o(1,A=e.rowId),"filterForReady"in e&&o(25,S=e.filterForReady),"filter"in e&&o(26,T=e.filter),"query"in e&&o(27,N=e.query),"refStatus"in e&&o(18,R=e.refStatus),"showEdit"in e&&o(0,D=e.showEdit),"praefix"in e&&o(28,k=e.praefix),"selectionFields"in e&&o(29,O=e.selectionFields),"deList"in e&&o(30,x=e.deList),"stopAggregation"in e&&o(19,M=e.stopAggregation),"shouldBlock"in e&&o(31,B=e.shouldBlock),"inputSearch"in e&&o(32,P=e.inputSearch)},[D,A,L,F,p,y,U,d,h,f,V,W,(e,t)=>n=>{o(19,M=!0);const r=H?e:v[t];l("choose",{row:r})},async()=>{w=await z,o(4,p=(e=>!s?.length||!!s.find((t=>t===e)))(w.id)),N&&o(5,y=v=await t.getTasksFiltered(w.class,N)),y||o(5,y=v=j(w.displaySort,await _||await ch(w.class,w.id))),500!==y?.length||N||(o(6,U=!0),t.getTasksList(w.id,!1,!0).then((({aggregationId:e})=>G(e))));let e,n=!1,r="";const i=O&&O?.find((e=>w.class===e.refClass.split(":")[0])),a=i?.value?.get&&i.value.get(k);if(a){const[s,l]=i.refClass.split(":");w.class===s&&o(5,y=await Z(y,s,l,i)),n=i.parentClass?.find((e=>"quantity"===e.name)),r=i.className,e=await t.getCountedSection(r,l.split(".")[0],a,s,"quantity")}o(0,D&&=!i),!i&&(T||S||R)&&o(5,y=await q(y,w));const{display:c}=w;let d=await Xt(c,w,y);return!D&&n?(d=d.concat([{name:"quantity",designation:"h-Soll",type:"number",decimals:2},{name:"ist",designation:"h-Ist",type:"number",decimals:2}]),o(5,y=y.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!y.find((t=>t._id===e._id))){const t=v.find((t=>t._id===e._id));t&&(t.ist=e.quantity.$numberDecimal),y.push(t)}})),l("init",y)):x&&o(5,y=y.filter((e=>!x.find((t=>t?._id===e._id))))),B&&o(5,y=y.filter((e=>!e[B]))),{items:d}},({detail:{value:e}})=>{o(3,F=e)},(e,t,n)=>{if(!e)return!1;if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let r=!1;for(const i of t){const t=W(e,i).toLowerCase();!r&&t.includes(n)&&(r=!0)}return r},()=>{o(3,F="")},async e=>{let t=e._task;t||(t=await dh(E,"",e._id,!0),t=t._task),window.open(`/task/${t.event}/${t.task_id||t._id}/task?view=standalone`,"_blank")},R,M,_,I,C,$,E,S,T,N,k,O,x,B,P,function(e){F=e,o(3,F)}]}class Zt extends Te{constructor(e){var t;super(),Nt.getElementById("svelte-47aais-style")||((t=O("style")).id="svelte-47aais-style",t.textContent=".feather.svelte-47aais.svelte-47aais{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-47aais.svelte-47aais{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-47aais .editRow.svelte-47aais{width:1em}.eList.svelte-47aais table.svelte-47aais{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-47aais table thead.svelte-47aais{position:sticky;top:0;background:#326173;color:white}.eList.svelte-47aais table thead tr.svelte-47aais{height:2.3em}.eList.svelte-47aais table tbody tr.svelte-47aais{height:2.75em !important}th.svelte-47aais.svelte-47aais,td.svelte-47aais.svelte-47aais{padding-left:0.4em;padding-right:0.4em}td.number.svelte-47aais.svelte-47aais{text-align:end}tr.pointer.svelte-47aais.svelte-47aais:hover{background-color:#DAE1E5}tr.active.svelte-47aais.svelte-47aais{color:#326173;background-color:#fcebd5}tr.blocked.svelte-47aais.svelte-47aais{color:red !important}tr.undeliverable.svelte-47aais.svelte-47aais{color:orange}",N(Nt.head,t)),Se(this,e,Yt,Gt,A,{inputList:20,eventId:21,prevEventId:22,record:23,className:24,rowId:1,filterForReady:25,filter:26,query:27,refStatus:18,showEdit:0,praefix:28,selectionFields:29,deList:30,stopAggregation:19,shouldBlock:31,inputSearch:32},[-1,-1])}}function Kt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Qt(e){let t,n,r=e[45]&&Jt(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[45]?r?(r.p(e,n),16&n[0]&&we(r,1)):(r=Jt(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Jt(e){let t,n;return t=new e[25]({props:{title:e[20]?"Auswahl":e[0],class:"eList "+(e[18]?"form":""),$$slots:{default:[dn]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1048577&n[0]&&(r.title=e[20]?"Auswahl":e[0]),262144&n[0]&&(r.class="eList "+(e[18]?"form":"")),33554430&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function en(e){let t,n;return t=new wh({props:{schema:e[2],recID:e[1],readonly:e[19]}}),t.$on("choose",(function(){E(e[34](e[45]))&&e[34](e[45]).apply(this,arguments)})),t.$on("back",e[31]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(n,r){e=n;const i={};4&r[0]&&(i.schema=e[2]),2&r[0]&&(i.recID=e[1]),524288&r[0]&&(i.readonly=e[19]),t.$set(i)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function tn(e){let t,n,r,i,o,s,a;t=new e[26]({props:{text:e[20]?"Zusätzliche Auswahl":""}});const l=[rn,nn],c=[];function d(e,t){return e[20]?0:1}return r=d(e),i=c[r]=l[r](e),s=new Zt({props:{inputSearch:e[15],record:e[3],eventId:e[2].id,className:e[2].class,prevEventId:e[14],filterForReady:e[5],filter:e[6],query:e[7],refStatus:e[8],praefix:e[9],selectionFields:e[10],rowId:e[1],shouldBlock:e[16],deList:e[12],stopAggregation:e[24],showEdit:e[11]}}),s.$on("edit",e[35]),s.$on("choose",e[38]),s.$on("init",e[36]),{c(){Ee(t.$$.fragment),n=B(),i.c(),o=B(),Ee(s.$$.fragment)},m(e,i){Ae(t,e,i),R(e,n,i),c[r].m(e,i),R(e,o,i),Ae(s,e,i),a=!0},p(e,n){const a={};1048576&n[0]&&(a.text=e[20]?"Zusätzliche Auswahl":""),t.$set(a);let u=r;r=d(e),r===u?c[r].p(e,n):(pe(),ye(c[u],1,1,(()=>{c[u]=null})),ge(),i=c[r],i?i.p(e,n):(i=c[r]=l[r](e),i.c()),we(i,1),i.m(o.parentNode,o));const h={};32768&n[0]&&(h.inputSearch=e[15]),8&n[0]&&(h.record=e[3]),4&n[0]&&(h.eventId=e[2].id),4&n[0]&&(h.className=e[2].class),16384&n[0]&&(h.prevEventId=e[14]),32&n[0]&&(h.filterForReady=e[5]),64&n[0]&&(h.filter=e[6]),128&n[0]&&(h.query=e[7]),256&n[0]&&(h.refStatus=e[8]),512&n[0]&&(h.praefix=e[9]),1024&n[0]&&(h.selectionFields=e[10]),2&n[0]&&(h.rowId=e[1]),65536&n[0]&&(h.shouldBlock=e[16]),4096&n[0]&&(h.deList=e[12]),16777216&n[0]&&(h.stopAggregation=e[24]),2048&n[0]&&(h.showEdit=e[11]),s.$set(h)},i(e){a||(we(t.$$.fragment,e),we(i),we(s.$$.fragment,e),a=!0)},o(e){ye(t.$$.fragment,e),ye(i),ye(s.$$.fragment,e),a=!1},d(e){be(t,e),e&&D(n),c[r].d(e),e&&D(o),be(s,e)}}}function nn(e){let t,n,r,i;n=new e[27]({props:{outline:!0,$$slots:{default:[on]},$$scope:{ctx:e}}}),n.$on("click",e[32]);let o=e[29]&&e[13]&&sn(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),U(t,"class","form--buttons svelte-jb5mrh")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};32768&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[29]&&e[13]?o?(o.p(e,r),8192&r[0]&&we(o,1)):(o=sn(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function rn(e){let t,n,r,i,o,s,a=e[23]&&ln(e);return r=new e[27]({props:{outline:!0,$$slots:{default:[cn]},$$scope:{ctx:e}}}),r.$on("click",e[32]),o=new e[26]({props:{text:"Liste aus "+e[17]}}),{c(){a&&a.c(),t=B(),n=O("div"),Ee(r.$$.fragment),i=B(),Ee(o.$$.fragment),U(n,"class","form--buttons svelte-jb5mrh")},m(e,l){a&&a.m(e,l),R(e,t,l),R(e,n,l),Ae(r,n,null),R(e,i,l),Ae(o,e,l),s=!0},p(e,n){e[23]?a?(a.p(e,n),8388608&n[0]&&we(a,1)):(a=ln(e),a.c(),we(a,1),a.m(t.parentNode,t)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge());const i={};32768&n[1]&&(i.$$scope={dirty:n,ctx:e}),r.$set(i);const s={};131072&n[0]&&(s.text="Liste aus "+e[17]),o.$set(s)},i(e){s||(we(a),we(r.$$.fragment,e),we(o.$$.fragment,e),s=!0)},o(e){ye(a),ye(r.$$.fragment,e),ye(o.$$.fragment,e),s=!1},d(e){a&&a.d(e),e&&D(t),e&&D(n),be(r),e&&D(i),be(o,e)}}}function on(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function sn(e){let t,n;return t=new e[27]({props:{filled:!0,$$slots:{default:[an]},$$scope:{ctx:e}}}),t.$on("click",e[33]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};32768&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function an(e){let t;return{c(){t=M("Neu")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function ln(e){let t,n;return t=new Ll({props:{item:e[21],record:{_id:"",[e[21].name]:""},noForm:"true",classId:"sel_"+e[21].name,eventId:e[22],required:!1,hidden:!1,readonly:!1,deList:e[23]}}),t.$on("notify",e[37]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2097152&n[0]&&(r.item=e[21]),2097152&n[0]&&(r.record={_id:"",[e[21].name]:""}),2097152&n[0]&&(r.classId="sel_"+e[21].name),4194304&n[0]&&(r.eventId=e[22]),8388608&n[0]&&(r.deList=e[23]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function cn(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function dn(e){let t,n,r,i;const o=[tn,en],s=[];function a(e,t){return e[45].length&&!e[18]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function un(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function hn(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:un,then:Qt,catch:Kt,value:45,blocks:[,,,]};return ve(n=e[30](e[4]),i),{c(){t=P(),i.block.c()},m(e,n){R(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,16&r[0]&&n!==(n=e[30](e[4]))&&ve(n,i)||_e(i,e,r)},i(e){r||(we(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}r=!1},d(e){e&&D(t),i.block.d(e),i.token=null,i=null}}}function fn(e,n,r){let i;const{Dialog:o,Divider:s,Button:a}=c,l=K(),{currentTasks:d}=u;b(e,d,(e=>r(41,i=e)));let{title:h}=n,{schema:f}=n,{record:m}=n,{recID:p}=n,{isOpening:g=!0}=n,{filterForReady:w=!1}=n,{filter:y}=n,{query:v}=n,{refStatus:_}=n,{praefix:I=""}=n,{selectionFields:C=!1}=n,{showEdit:$=!0}=n,{deList:E}=n,{newAllowed:A=!0}=n,{prevEventId:S}=n,{inputSearch:T}=n,{shouldBlock:N}=n,R=f.id;f.class;let D,k,O,x,M,B,P,L="",F=!1,V=!1;h??=f.identity.designation;const U=!i?.length||i.find((e=>e===R));return e.$$set=e=>{"title"in e&&r(0,h=e.title),"schema"in e&&r(2,f=e.schema),"record"in e&&r(3,m=e.record),"recID"in e&&r(1,p=e.recID),"isOpening"in e&&r(4,g=e.isOpening),"filterForReady"in e&&r(5,w=e.filterForReady),"filter"in e&&r(6,y=e.filter),"query"in e&&r(7,v=e.query),"refStatus"in e&&r(8,_=e.refStatus),"praefix"in e&&r(9,I=e.praefix),"selectionFields"in e&&r(10,C=e.selectionFields),"showEdit"in e&&r(11,$=e.showEdit),"deList"in e&&r(12,E=e.deList),"newAllowed"in e&&r(13,A=e.newAllowed),"prevEventId"in e&&r(14,S=e.prevEventId),"inputSearch"in e&&r(15,T=e.inputSearch),"shouldBlock"in e&&r(16,N=e.shouldBlock)},[h,p,f,m,g,w,y,v,_,I,C,$,E,A,S,T,N,L,F,D,O,M,B,P,V,o,s,a,d,U,async e=>{if(!e)return!1;const n=await ch(f.class,f.id);if(k=C&&C?.find((e=>f.class===e.refClass.split(":")[0])),r(20,O=k?.value?.get&&k.value.get(I)),O){x=k.refClass;const[e,n]=x.split(":"),[i]=n.split(".");r(21,M=k.parentClass.find((t=>t.name===e)));const o=await t.getSchemaByClass(M.refClass);r(22,B=o.id),r(17,L=k.parentClass.find((e=>e.name===i)).designation)}return n},()=>{r(18,F=!1),p||l("back"),$||l("back")},()=>{r(24,V=!0),r(18,F=!1),l("back")},()=>{r(24,V=!0),r(1,p=!1),r(19,D=!1),r(18,F=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,r]=t.split(".");let i=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===r));if(i){e[`${n}_${r}`]=e[n][r]}})),l("choose",{row:e})},({detail:e})=>{r(19,D=!!e._task.visum||"Closed"===e._task.status),r(1,p=e._docId),r(18,F=!0)},({detail:e})=>{O&&r(23,P=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};l("choose",{row:t})},function(t){Q(e,t)}]}class mn extends Te{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=O("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",N(document.head,t)),Se(this,e,fn,hn,A,{title:0,schema:2,record:3,recID:1,isOpening:4,filterForReady:5,filter:6,query:7,refStatus:8,praefix:9,selectionFields:10,showEdit:11,deList:12,newAllowed:13,prevEventId:14,inputSearch:15,shouldBlock:16},[-1,-1])}}const{document:pn}=Ie;function gn(e){e[28]=e[30].list,e[29]=e[30].items}function wn(e,t,n){const r=e.slice();return r[31]=t[n],r}function yn(e,t,n){const r=e.slice();return r[34]=t[n],r}function vn(e,t,n){const r=e.slice();return r[34]=t[n],r}function _n(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function In(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y;function v(t){e[25](t)}gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Cn]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let _={id:e[8]};void 0!==e[1]&&(_.value=e[1]),s=new e[6]({props:_}),ee.push((()=>$e(s,"value",v))),s.$on("input",e[12]),d=new tt({props:{size:"18"}});let I=e[29]?.length&&function(e){let t,n,r,i,o=e[29],s=[];for(let t=0;t<o.length;t+=1)s[t]=$n(vn(e,o,t));return{c(){t=O("thead"),n=O("tr"),r=O("th"),i=B();for(let e=0;e<s.length;e+=1)s[e].c();U(r,"class","svelte-14hcfjl"),U(n,"class","svelte-14hcfjl"),U(t,"class","svelte-14hcfjl")},m(e,o){R(e,t,o),N(t,n),N(n,r),N(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(o=e[29],r=0;r<o.length;r+=1){const i=vn(e,o,r);s[r]?s[r].p(i,t):(s[r]=$n(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&D(t),k(s,e)}}}(e),C=e[28]?.length&&function(e){let t,n,r=e[28],i=[];for(let t=0;t<r.length;t+=1)i[t]=bn(wn(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(44547&n[0]){let s;for(r=e[28],s=0;s<r.length;s+=1){const o=wn(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=bn(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),i=O("div"),o=M("Suchen: "),Ee(s.$$.fragment),l=B(),c=O("span"),Ee(d.$$.fragment),u=B(),h=O("div"),f=O("table"),I&&I.c(),m=B(),p=O("tbody"),C&&C.c(),U(t,"class","form--buttons svelte-14hcfjl"),U(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),U(f,"striped",""),U(f,"class","svelte-14hcfjl"),U(h,"class","eList svelte-14hcfjl")},m(a,v){R(a,t,v),Ae(n,t,null),R(a,r,v),R(a,i,v),N(i,o),Ae(s,i,null),N(i,l),N(i,c),Ae(d,c,null),R(a,u,v),R(a,h,v),N(h,f),I&&I.m(f,null),N(f,m),N(f,p),C&&C.m(p,null),g=!0,w||(y=L(c,"click",e[14]),w=!0)},p(e,t){gn(e);const r={};256&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],le((()=>a=!1))),s.$set(i),e[29]?.length&&I.p(e,t),e[28]?.length&&C.p(e,t)},i(e){g||(we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),we(C),g=!0)},o(e){ye(n.$$.fragment,e),ye(s.$$.fragment,e),ye(d.$$.fragment,e),ye(C),g=!1},d(e){e&&D(t),be(n),e&&D(r),e&&D(i),be(s),be(d),e&&D(u),e&&D(h),I&&I.d(),C&&C.d(),w=!1,y()}}}function Cn(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function $n(e){let t,n,r=e[34]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function En(e){let t,n,r,i,o,s,a,l;r=new it({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=An(yn(e,c,t));return{c(){t=O("tr"),n=O("td"),Ee(r.$$.fragment),i=B();for(let e=0;e<d.length;e+=1)d[e].c();o=B(),U(n,"class","editRow svelte-14hcfjl"),U(t,"class","pointer svelte-14hcfjl"),q(t,"active",e[31]._id===e[0])},m(c,u){R(c,t,u),N(t,n),Ae(r,n,null),N(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);N(t,o),s=!0,a||(l=L(n,"click",e[15](e[31])),a=!0)},p(n,r){if(e=n,3584&r[0]){let n;for(c=e[29],n=0;n<c.length;n+=1){const i=yn(e,c,n);d[n]?d[n].p(i,r):(d[n]=An(i),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&r[0]&&q(t,"active",e[31]._id===e[0])},i(e){s||(we(r.$$.fragment,e),s=!0)},o(e){ye(r.$$.fragment,e),s=!1},d(e){e&&D(t),be(r),k(d,e),a=!1,l()}}}function An(e){let t,n,r,i,o=e[9](e[31],e[34])+"";return{c(){t=O("td"),n=M(o),U(t,"class","svelte-14hcfjl")},m(o,s){R(o,t,s),N(t,n),r||(i=L(t,"click",V(e[10](e[31]))),r=!0)},p(t,n){e=t},d(e){e&&D(t),r=!1,i()}}}function bn(e){let t,n,r=e[13](e[31],e[29],e[1]),i=r&&En(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){2&n[0]&&(r=e[13](e[31],e[29],e[1])),r?i?(i.p(e,n),2&n[0]&&we(i,1)):(i=En(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function Sn(e){let t,n;return t=new e[5]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Tn(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Sn,then:In,catch:_n,value:30,blocks:[,,,]};return ve(e[11](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function Nn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Tn]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|256&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Rn(e,n,i){const o=K(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{classId:f}=n,{className:p}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:v}=n,{recordId:_}=n,{filter:I}=n,{multiValues:C}=n,$="",E=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const A=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?g(n):m(e[`_${t.name}`]||e[t.name]||"")},b=t.getSchemaByClass(p);Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(E)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await b;e.eventId===t.id&&mh(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(16,h=e.item),"classId"in e&&i(17,f=e.classId),"className"in e&&i(18,p=e.className),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(19,y=e.viewName),"viewValue"in e&&i(20,v=e.viewValue),"recordId"in e&&i(21,_=e.recordId),"filter"in e&&i(22,I=e.filter),"multiValues"in e&&i(23,C=e.multiValues)},[w,$,o,s,a,l,d,u,E,A,e=>()=>o("choose",{row:e}),async()=>{const e=await b;let n=[];if(h.lookup){const r="."+f+"#"+h.lookup,i=document.querySelector(r);let o=i?.value||_;if(C.has(h.lookup)){const r=C.get(h.lookup)[0];n=r?await t.getSectionView(h.name,{[h.lookup]:r},!0):await ch(h.name,e.id)}else if(o&&24===o.toString().length){const e=await fh(h.lookup,o);if(e){const r=e[h.name]?.map((e=>e[h.name]));r&&(n=await t.getSectionView(h.name,{_id:{$in:r}},!0))}}}else{const r="."+f+"#"+y.split(":")[0],i=document.querySelector(r);let o={[y]:i?.value||_};if(h.refItem){const e="."+f+"#"+h.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[h.refItem]:t.value},{[h.refItem]:{$exists:!0,$eq:""}}]};o={...o,...e}}}catch{}}o[y]&&(n=await t.getSectionView(e.class,o,!0)),I&&(n=n.filter((e=>e._id!=I)))}const r=e.display;return{list:n,items:await Xt(r,e,n)}},({detail:{value:e}})=>{i(1,$=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(A(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,$="")},e=>async()=>{const n=await t.getTaskByDocId(e._id,!0),r=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(r)},h,f,p,y,v,_,I,C,()=>o("back"),function(e){$=e,i(1,$)}]}class Dn extends Te{constructor(e){var t;super(),pn.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl .editRow.svelte-14hcfjl{width:1em}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",N(pn.head,t)),Se(this,e,Rn,Nn,A,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:kn}=Ie;function On(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function xn(e){let t,n,r=e[72]&&function(e){let t,n,r,i,s,a,l,c,d,u,h,f,m,p,g,w,y,v,_;function I(t){e[55](t)}function C(t){e[56](t)}let $={class:"full-width",id:e[32],rows:"1",required:e[2],disabled:e[3],placeholder:e[34],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[1]&&($.value=e[1]);void 0!==e[25]&&($.overwrite=e[25]);n=new o({props:$}),ee.push((()=>$e(n,"value",I))),ee.push((()=>$e(n,"overwrite",C))),n.$on("click",e[37]()),n.$on("blur",e[44]);const E=[Bn,Mn],A=[];function b(e,t){return!e[3]||e[16]?0:e[22]&&e[0]?1:-1}~(a=b(e))&&(l=A[a]=E[a](e));let T=(!e[3]||e[16]||e[17])&&Pn(e);function k(t){e[57](t)}let x={class:"tModal",noClickaway:!0,$$slots:{default:[Un]},$$scope:{ctx:e}};void 0!==e[19]&&(x.open=e[19]);m=new e[28]({props:x}),ee.push((()=>$e(m,"open",k)));let M=e[20]&&Hn(e);return{c(){t=O("div"),Ee(n.$$.fragment),s=B(),l&&l.c(),c=B(),d=O("input"),h=B(),T&&T.c(),f=B(),Ee(m.$$.fragment),g=B(),M&&M.c(),w=P(),U(d,"class",u=S(e[9]||e[10])+" svelte-jox15l"),U(d,"id",e[5]),U(d,"name",e[5]),d.value=e[0],d.hidden=!0,z(t,"position","relative")},m(r,i){R(r,t,i),Ae(n,t,null),N(t,s),~a&&A[a].m(t,null),N(t,c),N(t,d),N(t,h),T&&T.m(t,null),R(r,f,i),Ae(m,r,i),R(r,g,i),M&&M.m(r,i),R(r,w,i),y=!0,v||(_=L(t,"keydown",e[38]),v=!0)},p(e,o){const s={};4&o[0]&&(s.required=e[2]),8&o[0]&&(s.disabled=e[3]),!r&&2&o[0]&&(r=!0,s.value=e[1],le((()=>r=!1))),!i&&33554432&o[0]&&(i=!0,s.overwrite=e[25],le((()=>i=!1))),n.$set(s);let h=a;a=b(e),a===h?~a&&A[a].p(e,o):(l&&(pe(),ye(A[h],1,1,(()=>{A[h]=null})),ge()),~a?(l=A[a],l?l.p(e,o):(l=A[a]=E[a](e),l.c()),we(l,1),l.m(t,c)):l=null),(!y||1536&o[0]&&u!==(u=S(e[9]||e[10])+" svelte-jox15l"))&&U(d,"class",u),(!y||32&o[0])&&U(d,"id",e[5]),(!y||32&o[0])&&U(d,"name",e[5]),(!y||1&o[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[16]||e[17]?T?(T.p(e,o),196616&o[0]&&we(T,1)):(T=Pn(e),T.c(),we(T,1),T.m(t,null)):T&&(pe(),ye(T,1,1,(()=>{T=null})),ge());const f={};93126097&o[0]|2048&o[2]&&(f.$$scope={dirty:o,ctx:e}),!p&&524288&o[0]&&(p=!0,f.open=e[19],le((()=>p=!1))),m.$set(f),e[20]?M?(M.p(e,o),1048576&o[0]&&we(M,1)):(M=Hn(e),M.c(),we(M,1),M.m(w.parentNode,w)):M&&(pe(),ye(M,1,1,(()=>{M=null})),ge())},i(e){y||(we(n.$$.fragment,e),we(l),we(T),we(m.$$.fragment,e),we(M),y=!0)},o(e){ye(n.$$.fragment,e),ye(l),ye(T),ye(m.$$.fragment,e),ye(M),y=!1},d(e){e&&D(t),be(n),~a&&A[a].d(),T&&T.d(),e&&D(f),be(m,e),e&&D(g),M&&M.d(e),e&&D(w),v=!1,_()}}}(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,t){e[72]&&r.p(e,t)},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Mn(e){let t,n,r,i,o;return n=new it({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-jox15l")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[43]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Bn(e){let t,n,r,i,o;return n=new Tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-jox15l")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=[L(t,"click",e[37](!0)),L(t,"choose",e[40])],i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,$(o)}}}function Pn(e){let t,n,r,i,o;return n=new tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 pointer svelte-jox15l")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[42]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ln(e){let t,n,r,i;const o=[Vn,Fn],s=[];function a(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function Fn(e){let t,n;return t=new mn({props:{title:e[6].designation,newAllowed:e[23],prevEventId:e[11],schema:e[18],filter:e[33],query:e[35](),record:e[7],recID:e[0],isOpening:e[19],filterForReady:e[24],refStatus:e[6].refStatus,selectionFields:e[14],deList:e[15],praefix:e[13],shouldBlock:e[26],inputSearch:e[39]()}}),t.$on("choose",e[40]),t.$on("back",e[41]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.title=e[6].designation),8388608&n[0]&&(r.newAllowed=e[23]),2048&n[0]&&(r.prevEventId=e[11]),262144&n[0]&&(r.schema=e[18]),128&n[0]&&(r.record=e[7]),1&n[0]&&(r.recID=e[0]),524288&n[0]&&(r.isOpening=e[19]),16777216&n[0]&&(r.filterForReady=e[24]),64&n[0]&&(r.refStatus=e[6].refStatus),16384&n[0]&&(r.selectionFields=e[14]),32768&n[0]&&(r.deList=e[15]),8192&n[0]&&(r.praefix=e[13]),67108864&n[0]&&(r.shouldBlock=e[26]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Vn(e){let t,n;return t=new Dn({props:{item:e[6],className:e[18].class,classId:e[10],rowId:e[0],recordId:e[12],viewName:e[4],viewValue:"",multiValues:e[8]}}),t.$on("choose",e[40]),t.$on("back",e[41]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.item=e[6]),262144&n[0]&&(r.className=e[18].class),1024&n[0]&&(r.classId=e[10]),1&n[0]&&(r.rowId=e[0]),4096&n[0]&&(r.recordId=e[12]),16&n[0]&&(r.viewName=e[4]),256&n[0]&&(r.multiValues=e[8]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Un(e){let t,n,r=e[19]&&Ln(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[19]?r?(r.p(e,n),524288&n[0]&&we(r,1)):(r=Ln(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Hn(e){let t,n,r;function i(t){e[58](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[zn]},$$scope:{ctx:e}};return void 0!==e[20]&&(o.open=e[20]),t=new e[28]({props:o}),ee.push((()=>$e(t,"open",i))),{c(){Ee(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};2359297&r[0]|2048&r[2]&&(i.$$scope={dirty:r,ctx:e}),!n&&1048576&r[0]&&(n=!0,i.open=e[20],le((()=>n=!1))),t.$set(i)},i(e){r||(we(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){be(t,e)}}}function Wn(e){let t,n;return t=new wh({props:{schema:e[18],recID:e[0],readonly:!0}}),t.$on("back",e[41]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};262144&n[0]&&(r.schema=e[18]),1&n[0]&&(r.recID=e[0]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function zn(e){let t,n;return t=new e[27]({props:{title:e[21],$$slots:{default:[Wn]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2097152&n[0]&&(r.title=e[21]),262145&n[0]|2048&n[2]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function qn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function jn(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:qn,then:xn,catch:On,value:72,blocks:[,,,]};return ve(e[36](),r),{c(){t=P(),r.block.c()},m(e,i){R(e,t,i),r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(t,n){_e(r,e=t,n)},i(e){n||(we(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ye(r.blocks[e])}n=!1},d(e){e&&D(t),r.block.d(e),r.token=null,r=null}}}function Gn(e,n,r){let o,s,a,l;b(e,i,(e=>r(54,o=e)));const d=K(),{Dialog:h,Modal:f}=c,{currentTasks:m,environment:p,loggedIn:g}=u;b(e,m,(e=>r(60,s=e))),b(e,p,(e=>r(62,l=e))),b(e,g,(e=>r(61,a=e)));let{id:y}=n,{item:v}=n,{fullRecord:_}=n,{value:I=""}=n,{multiValues:C}=n,{desc:$=""}=n,{noForm:E=!1}=n,{classId:A}=n,{eventId:S}=n,{recordId:T}=n,{withRefValue:N=!1}=n,{refValue:R=""}=n,{shortEdit:D}=n,{required:k}=n,{disabled:O}=n,{readonly:x}=n,{praefix:M}=n,{selectionFields:B}=n,{formnovalidate:P}=n,{selection:L}=n,{deList:F}=n,{isTemplate:V}=n,{noList:U=!1}=n,{multi:H=!1}=n,{initFinished:W}=n;const z="comment_"+y,q=v.filter;let j,G,X,Y,Z,Q,J=!1,ee=!0,te=!0,ne=!0,re=!1,ie="";x||=T&&v.asInput,O||=x,!L&&v.selection&&1===v.selection.split(":").length&&(L=v.selection);const oe=x||O||v.lookup||L&&!v.constraint?"":"Suchbegriff ⏎",se=()=>{v.refItem&&v.refItem.startsWith("owner")&&(r(46,R=l.owner[v.refClass]),R||r(46,R=((e,t)=>{try{return e.split(".").reduce(((e,t)=>e[t]),t)}catch(e){return""}})(v.refItem,l)),R&&(r(45,N=!0),d("change",{value:R})))},ae=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{d("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},le=async e=>{const n=()=>{r(19,J=!0)};if(9==e.which)return;if(I)return e.preventDefault();if(13!=e.which)return;e.preventDefault();const i=X.items.find((e=>e.properties?.search));if(!i)return n();const o=e.srcElement.value,{name:s,checkOn:a,refClass:l,properties:c}=i;let{search:d}=c;!0===d&&(d={}),"number"==typeof d&&(d={min:d});const{min:u=3,start:h=!1,end:f=!1}=d;if(o.length<u)return n();const m=(h?"^":"")+o+(f?"$":"");let p={[s]:{$regex:m,$options:"i"}};a&&(p=[{$lookup:{from:l,localField:s,foreignField:"_id",as:l}},{$match:{[l+"."+a]:{$regex:m,$options:"i"}}}]);const g=await t.getSectionView(X.class,p);1!==g?.length?n():r(0,I=g[0]._id)},ce=e=>{e&&(r(53,ie=r(1,$=w(X,e))),d("setRefDesc",$.split(" •")[0]),d("change",{value:I,description:$}),d("task",{row:e,eventId:X.id}))},de=()=>{r(19,J=!1),r(20,j=!1)};return e.$$set=e=>{"id"in e&&r(5,y=e.id),"item"in e&&r(6,v=e.item),"fullRecord"in e&&r(7,_=e.fullRecord),"value"in e&&r(0,I=e.value),"multiValues"in e&&r(8,C=e.multiValues),"desc"in e&&r(1,$=e.desc),"noForm"in e&&r(9,E=e.noForm),"classId"in e&&r(10,A=e.classId),"eventId"in e&&r(11,S=e.eventId),"recordId"in e&&r(12,T=e.recordId),"withRefValue"in e&&r(45,N=e.withRefValue),"refValue"in e&&r(46,R=e.refValue),"shortEdit"in e&&r(49,D=e.shortEdit),"required"in e&&r(2,k=e.required),"disabled"in e&&r(3,O=e.disabled),"readonly"in e&&r(48,x=e.readonly),"praefix"in e&&r(13,M=e.praefix),"selectionFields"in e&&r(14,B=e.selectionFields),"formnovalidate"in e&&r(50,P=e.formnovalidate),"selection"in e&&r(4,L=e.selection),"deList"in e&&r(15,F=e.deList),"isTemplate"in e&&r(16,V=e.isTemplate),"noList"in e&&r(51,U=e.noList),"multi"in e&&r(17,H=e.multi),"initFinished"in e&&r(47,W=e.initFinished)},e.$$.update=()=>{if(4&e.$$.dirty[0]|524288&e.$$.dirty[1]&&r(2,k=k&&!P),49152&e.$$.dirty[1]&&N&&r(0,I=R),3&e.$$.dirty[0]|4194304&e.$$.dirty[1]&&!$&&I&&ie&&r(1,$=ie),399425&e.$$.dirty[0]|1114112&e.$$.dirty[1]&&I&&X){let e=!1;if(!Array.isArray(I)){const t=v.properties?.prefetch?500:0;if(T||v.asInput||v.upate||!1!==v.refItem||!0===H||!1===v.refItem&&W)if(t){const t="p$"+v.refClass+"$"+S,n=lh(t);n?n.then((t=>{const n=t.find((({_id:e})=>e===I));n?ce(n):e=!0})):e=!0}else e=!0;e&&dh(v.refClass,X.id,I,!!v.lookup||U).then(ce),r(47,W=!0)}}if(65&e.$$.dirty[0]|10485760&e.$$.dirty[1]&&I&&Y&&v.name===Y.input?.at(0)&&Y.inputLookup?.length){const{domain:e}=Y.inputLookup[0]||{};"user"===e&&(o.some((e=>Y.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,O=!0))}262145&e.$$.dirty[0]&&!I&&X&&ce({})},[I,$,k,O,L,y,v,_,C,E,A,S,T,M,B,F,V,H,X,J,j,G,Z,ee,te,ne,re,h,f,m,p,g,z,q,oe,()=>{if(!v.query)return;const[e,t]=v.query.split(".");if(!_[t])return;let n=[{$lookup:{from:e,localField:e,foreignField:"_id",as:"__"+e}},{$unwind:{path:"$__"+e,preserveNullAndEmptyArrays:!0}},{$match:{["__"+e+"."+t]:_[t]}}];return v.refStatus&&(n=n.concat([{$addFields:{_docId:{$toString:"$_id"}}},{$lookup:{from:"_task",localField:"_docId",foreignField:"docId",as:"_task"}},{$unwind:{path:"$_task",preserveNullAndEmptyArrays:!0}},{$match:{"_task.status":v.refStatus}}])),n},async()=>{try{const e=await t.getEvent(S);if(Q="report"===e.output.type,r(24,te=!v.asInput),r(23,ee=e.output?.class[0].name!==v.refClass),r(18,X=await t.getSchemaByClass(v.refClass)),X?.blocked)return d("initFail",!0),!1;if(Q||r(26,re=((e,t)=>{let n=t.items.find((e=>!!e.properties?.blocking));if(!n)return!1;if(e.input?.class?.find((e=>e.name===t.class)))return n.name;const r=e.output?.class.at(0)?.list||[];for(const e of r){const t=e.item.find((e=>e.name===v.name));if(t?.properties?.blocking)return n.name}return!1})(e,X)),ae(X),r(22,Z=(e=>!s?.length||!!s.find((t=>t===e)))(X.id)),r(52,Y=await t.getSchema(S)),S&&T&&I&&!O&&Y.input?.find((e=>e===v.refClass))&&r(3,O=!0),e.input?.class&&e.input.class[0]&&(e.input.class[0].name===v.refClass&&e.input.class[0].readonly&&r(3,O=!0),T&&e.input.class[0].name===v.refClass&&e.input.class[0].writeState)){(await t.getTaskByDocId(T,!0)).status===e.input.class[0].writeState&&r(3,O=r(48,x=!1))}if(v.properties?.query?.lookup){const{domain:e,value:n}=v.properties.query.lookup;if("user"===e){const e=a.user,i={[n]:e},s=await t.getSectionView(v.refClass,i);if(s?.length){const[{_id:e}]=s;e&&(r(46,R=e),r(45,N=!0),d("change",{value:R}))}o.some((e=>X.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,O=!0)}}else se();if(!R&&v.filter&&(""===M||void 0===M)){const e=v.filter,n=!0;e.startsWith("!")&&(n=!1,e=e.slice(1));const i=await t.getOneAndOnly(v.refClass,{[v.filter]:n});i&&(r(46,R=i._id),r(45,N=!0),d("change",{value:R}))}return r(21,G=X.identity.designation),!0}catch{return d("initFail",!0),!1}},e=>t=>{if(t.stopPropagation(),!0===e&&r(19,J=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(v.lookup||L&&!v.constraint||I)&&r(19,J=!0)},le,()=>{if(I)return"";const e=document.getElementById(z);return r(1,$=""),e?.value||""},({detail:e})=>{r(0,I=e.row._id),de()},de,()=>{(Q||Z)&&(H?d("change",{value:I,delete:!0}):(r(0,I=""),r(1,$=""),r(25,ne=!0),d("change",{value:I,description:$}),d("task",{row:{_task:{event:X.id,_id:!1}}})))},async()=>{if(!I)return;let e=await dh(v.refClass,X.id,I);e._task||(e={_task:await t.getTaskByDocId(I,!0)});const n=e._task.task_id||e._task._id,r=`/task/${e._task.event}/${n}/task?view=standalone`;window.open(r)},e=>{I||$&&le({which:13,preventDefault:()=>{},srcElement:{value:$}})},N,R,W,x,D,P,U,Y,ie,o,function(e){$=e,r(1,$),r(0,I),r(53,ie),r(45,N),r(46,R)},function(e){ne=e,r(25,ne)},function(e){J=e,r(19,J)},function(e){j=e,r(20,j)}]}class Xn extends Te{constructor(e){var t;super(),kn.getElementById("svelte-jox15l-style")||((t=O("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",N(kn.head,t)),Se(this,e,Gn,jn,A,{id:5,item:6,fullRecord:7,value:0,multiValues:8,desc:1,noForm:9,classId:10,eventId:11,recordId:12,withRefValue:45,refValue:46,shortEdit:49,required:2,disabled:3,readonly:48,praefix:13,selectionFields:14,formnovalidate:50,selection:4,deList:15,isTemplate:16,noList:51,multi:17,initFinished:47},[-1,-1,-1])}}function Yn(e,t,n){const r=e.slice();return r[40]=t[n],r[42]=n,r}function Zn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Kn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[er]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8191&n[0]|4096&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Qn(e){let t,n,r,i,o;return n=new ft({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",(function(){E(e[22](e[0]))&&e[22](e[0]).apply(this,arguments)})),i=!0)},p(t,n){e=t},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Jn(e){let t,n;return t=new Xn({props:{classId:e[6],eventId:e[7],required:e[9],disabled:e[1],formnovalidate:e[12],readonly:e[10],id:e[2]+"."+e[42],item:e[3],desc:e[4],value:e[40],noForm:e[5],praefix:e[11],recordId:e[8],multi:!0}}),t.$on("change",e[24]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.classId=e[6]),128&n[0]&&(r.eventId=e[7]),512&n[0]&&(r.required=e[9]),2&n[0]&&(r.disabled=e[1]),4096&n[0]&&(r.formnovalidate=e[12]),1024&n[0]&&(r.readonly=e[10]),4&n[0]&&(r.id=e[2]+"."+e[42]),8&n[0]&&(r.item=e[3]),16&n[0]&&(r.desc=e[4]),1&n[0]&&(r.value=e[40]),32&n[0]&&(r.noForm=e[5]),2048&n[0]&&(r.praefix=e[11]),256&n[0]&&(r.recordId=e[8]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function er(e){let t,n,r,i=!e[10]&&Qn(e),o=[].concat(e[0]),s=[];for(let t=0;t<o.length;t+=1)s[t]=Jn(Yn(e,o,t));const a=e=>ye(s[e],1,1,(()=>{s[e]=null}));return{c(){i&&i.c(),t=B();for(let e=0;e<s.length;e+=1)s[e].c();n=P()},m(e,o){i&&i.m(e,o),R(e,t,o);for(let t=0;t<s.length;t+=1)s[t].m(e,o);R(e,n,o),r=!0},p(e,r){if(e[10]?i&&(pe(),ye(i,1,1,(()=>{i=null})),ge()):i?(i.p(e,r),1024&r[0]&&we(i,1)):(i=Qn(e),i.c(),we(i,1),i.m(t.parentNode,t)),16785407&r[0]){let t;for(o=[].concat(e[0]),t=0;t<o.length;t+=1){const i=Yn(e,o,t);s[t]?(s[t].p(i,r),we(s[t],1)):(s[t]=Jn(i),s[t].c(),we(s[t],1),s[t].m(n.parentNode,n))}for(pe(),t=o.length;t<s.length;t+=1)a(t);ge()}},i(e){if(!r){we(i);for(let e=0;e<o.length;e+=1)we(s[e]);r=!0}},o(e){ye(i),s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)ye(s[e]);r=!1},d(e){i&&i.d(e),e&&D(t),k(s,e),e&&D(n)}}}function tr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function nr(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[ir]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[0]&&(r.title=e[14].designation),49480&n[0]|4096&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function rr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function ir(e){let t,n,r,i,o;return n=new e[19]({props:{outline:!0,$$slots:{default:[rr]},$$scope:{ctx:e}}}),n.$on("click",e[25]),i=new Zt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),i.$on("choose",e[23]),i.$on("back",e[25]),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),Ee(i.$$.fragment),U(t,"class","form--buttons")},m(e,s){R(e,t,s),Ae(n,t,null),R(e,r,s),Ae(i,e,s),o=!0},p(e,t){const r={};4096&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const o={};8&t[0]&&(o.item=e[3]),16384&t[0]&&(o.className=e[14].class),64&t[0]&&(o.classId=e[6]),32768&t[0]&&(o.rowId=e[15]),256&t[0]&&(o.recordId=e[8]),i.$set(o)},i(e){o||(we(n.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(n.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){e&&D(t),be(n),e&&D(r),be(i,e)}}}function or(e){let t,n,r=e[13]&&nr(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[13]?r?(r.p(e,n),8192&n[0]&&we(r,1)):(r=nr(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function sr(e){let t,n,r,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:tr,then:Kn,catch:Zn,value:39,blocks:[,,,]};function s(t){e[34](t)}ve(e[20](),o);let a={class:"tModal",noClickaway:!0,$$slots:{default:[or]},$$scope:{ctx:e}};return void 0!==e[13]&&(a.open=e[13]),n=new e[17]({props:a}),ee.push((()=>$e(n,"open",s))),{c(){o.block.c(),t=B(),Ee(n.$$.fragment)},m(e,r){o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,R(e,t,r),Ae(n,e,r),i=!0},p(t,i){_e(o,e=t,i);const s={};57672&i[0]|4096&i[1]&&(s.$$scope={dirty:i,ctx:e}),!r&&8192&i[0]&&(r=!0,s.open=e[13],le((()=>r=!1))),n.$set(s)},i(e){i||(we(o.block),we(n.$$.fragment,e),i=!0)},o(e){for(let e=0;e<3;e+=1){ye(o.blocks[e])}ye(n.$$.fragment,e),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&D(t),be(n,e)}}}function ar(e,n,r){const i=K(),{Card:o,Modal:s,Dialog:a,Button:l}=c;let d,u,{id:h}=n,{item:f}=n,{record:m}=n,{values:p=[]}=n,{desc:g=""}=n,{noForm:w=!1}=n,{classId:y}=n,{eventId:v}=n,{recordId:_}=n,{withRefValue:I=!1}=n,{refValue:C=""}=n,{required:$}=n,{disabled:E}=n,{readonly:A}=n,{praefix:b}=n,{selectionFields:S}=n,{formnovalidate:T}=n,{selection:N}=n,{deList:R}=n,{isTemplate:D}=n,{noList:k=!1}=n,O=!1;const{lookup:x,filter:M,constraint:B}=f.properties.multi;E=!0;const P=()=>{r(13,O=!1)};return e.$$set=e=>{"id"in e&&r(2,h=e.id),"item"in e&&r(3,f=e.item),"record"in e&&r(26,m=e.record),"values"in e&&r(0,p=e.values),"desc"in e&&r(4,g=e.desc),"noForm"in e&&r(5,w=e.noForm),"classId"in e&&r(6,y=e.classId),"eventId"in e&&r(7,v=e.eventId),"recordId"in e&&r(8,_=e.recordId),"withRefValue"in e&&r(27,I=e.withRefValue),"refValue"in e&&r(28,C=e.refValue),"required"in e&&r(9,$=e.required),"disabled"in e&&r(1,E=e.disabled),"readonly"in e&&r(10,A=e.readonly),"praefix"in e&&r(11,b=e.praefix),"selectionFields"in e&&r(29,S=e.selectionFields),"formnovalidate"in e&&r(12,T=e.formnovalidate),"selection"in e&&r(30,N=e.selection),"deList"in e&&r(31,R=e.deList),"isTemplate"in e&&r(32,D=e.isTemplate),"noList"in e&&r(33,k=e.noList)},[p,E,h,f,g,w,y,v,_,$,A,b,T,O,d,u,o,s,a,l,async()=>{r(0,p=[].concat(p)),r(14,d=await t.getSchemaByClass(f.refClass))},async()=>{let e=await ch(d.class,d.id);if(!e?.length)return[];if(x&&(e=e.filter((e=>m[x]===e[x]))),B&&e?.length){const{refClass:n,refStatus:r}=B,i=[{$match:{[d.class]:{$in:e.map((({_id:e})=>e))}}},{$addFields:{_docId:{$toString:"$_id"}}},{$lookup:{from:"_task",localField:"_docId",foreignField:"docId",as:"_task"}},{$unwind:{path:"$_task",preserveNullAndEmptyArrays:!0}},{$match:{"_task.status":r}}],o=await t.getSectionView(n,i);e=e.filter((e=>!!o.find((t=>t.project==e._id))))}if(M)for(const t in M)e=e.filter((e=>{let[n,r]=t.split(".");if(r||(r=n,n=""),n){if(e[n][0]&&e[n][0][r].length)return!0}else if(e[r])return!0;return!1}));return e},e=>()=>{A||(e=[].concat(e),r(13,O=!0),r(15,u=e))},({detail:e})=>{const t=e.row._id;r(0,p=[].concat(p)),Array.isArray(p)&&!p.find((e=>e===t))&&r(0,p=p.concat(e.row._id)),P()},({detail:e})=>{r(0,p=[].concat(p)),e.delete&&r(0,p=p.filter((t=>t!==e.value))),e.value=p,i("change",e),i("multi",{lookup:x,filter:M,name:f.name,value:p})},P,m,I,C,S,N,R,D,k,function(e){O=e,r(13,O)}]}class lr extends Te{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=O("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",N(document.head,t)),Se(this,e,ar,sr,A,{id:2,item:3,record:26,values:0,desc:4,noForm:5,classId:6,eventId:7,recordId:8,withRefValue:27,refValue:28,required:9,disabled:1,readonly:10,praefix:11,selectionFields:29,formnovalidate:12,selection:30,deList:31,isTemplate:32,noList:33},[-1,-1])}}const cr=/\d+/g,dr=/%[HMSpPdmyY%]/g;function ur(e,t,n){const r=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const o=t.split(dr);let s=0,a=0;const l=new Date(0);for(const c of o){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(a!==t.length)return n;break}if("%"!==t[a+c.length])break;if(a+=c.length+1,"%"===t[a]){if("%"!==e[s])return n;s++}else if("p"===t[a].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)i=!1,l.getHours()>=12&&l.setHours(l.getHours()-12);else{if("PM"!==t)return n;i=!0,l.getHours()<12&&l.setHours(l.getHours()+12)}}else{cr.lastIndex=s;const o=cr.exec(e);if(null==o)return n;switch(t[a]){case"H":l.setHours(parseInt(o[0])+12*i);break;case"M":l.setMinutes(o[0]);break;case"S":l.setSeconds(o[0]);break;case"d":l.setDate(o[0]);break;case"m":l.setMonth(o[0]-1);break;case"y":l.setFullYear(100*r+parseInt(o[0]));break;case"Y":l.setFullYear(o[0])}s+=o[0].length}a++}return isNaN(l.valueOf())?n:l}function hr(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:fr}=Ie;function mr(e,t,n){const r=e.slice();return r[17]=t[n],r}function pr(e,t,n){const r=e.slice();return r[20]=t[n],r}function gr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function wr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m=e[0].items,p=[];for(let t=0;t<m.length;t+=1)p[t]=vr(pr(e,m,t));const g=e=>ye(p[e],1,1,(()=>{p[e]=null}));let w=e[0].list&&_r(e);return l=new e[5]({props:{outline:!0,$$slots:{default:[Cr]},$$scope:{ctx:e}}}),l.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[$r]},$$scope:{ctx:e}}}),{c(){t=O("form"),n=O("input"),i=B();for(let e=0;e<p.length;e+=1)p[e].c();o=B(),w&&w.c(),s=B(),a=O("div"),Ee(l.$$.fragment),c=B(),Ee(d.$$.fragment),U(n,"class",S(e[6])+" svelte-1phofh5"),U(n,"name","_id"),U(n,"type","hidden"),n.value=r=e[1]._id||"",U(t,"class","fTask svelte-1phofh5"),U(t,"id",e[6]),U(a,"class","form--buttons svelte-1phofh5")},m(r,m){R(r,t,m),N(t,n),N(t,i);for(let e=0;e<p.length;e+=1)p[e].m(t,null);N(t,o),w&&w.m(t,null),R(r,s,m),R(r,a,m),Ae(l,a,null),N(a,c),Ae(d,a,null),u=!0,h||(f=[L(t,"keydown",e[8]),L(t,"submit",F(e[10]))],h=!0)},p(e,i){if((!u||2&i&&r!==(r=e[1]._id||""))&&(n.value=r),75&i){let n;for(m=e[0].items,n=0;n<m.length;n+=1){const r=pr(e,m,n);p[n]?(p[n].p(r,i),we(p[n],1)):(p[n]=vr(r),p[n].c(),we(p[n],1),p[n].m(t,o))}for(pe(),n=m.length;n<p.length;n+=1)g(n);ge()}e[0].list?w?(w.p(e,i),1&i&&we(w,1)):(w=_r(e),w.c(),we(w,1),w.m(t,null)):w&&(pe(),ye(w,1,1,(()=>{w=null})),ge());const s={};8388608&i&&(s.$$scope={dirty:i,ctx:e}),l.$set(s);const a={};4&i&&(a.disabled=e[2]),8388608&i&&(a.$$scope={dirty:i,ctx:e}),d.$set(a)},i(e){if(!u){for(let e=0;e<m.length;e+=1)we(p[e]);we(w),we(l.$$.fragment,e),we(d.$$.fragment,e),u=!0}},o(e){p=p.filter(Boolean);for(let e=0;e<p.length;e+=1)ye(p[e]);ye(w),ye(l.$$.fragment,e),ye(d.$$.fragment,e),u=!1},d(e){e&&D(t),k(p,e),w&&w.d(),e&&D(s),e&&D(a),be(l),be(d),h=!1,$(f)}}}function yr(e){let t,n;return t=new Ll({props:{classId:e[6],item:e[20],selection:e[20].selection,record:e[1],disabled:e[3],eventId:e[0].id,required:!1,isTemplate:!0}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.item=e[20]),1&n&&(r.selection=e[20].selection),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),1&n&&(r.eventId=e[0].id),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function vr(e){let t,n,r=br(!0,e[20]),i=r&&yr(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){1&n&&(r=br(!0,e[20])),r?i?(i.p(e,n),1&n&&we(i,1)):(i=yr(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function _r(e){let t,n,r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=Ir(mr(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(75&n){let s;for(r=e[0].list,s=0;s<r.length;s+=1){const o=mr(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=Ir(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}function Ir(e){let t,n,r,i;return t=new e[4]({props:{text:e[17].designation}}),r=new Lr({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){Ee(t.$$.fragment),n=B(),Ee(r.$$.fragment)},m(e,o){Ae(t,e,o),R(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const o={};1&n&&(o.list=e[17]),1&n&&(o.eventId=e[0].id),1&n&&(o.schema=e[17].item),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),r.$set(o)},i(e){i||(we(t.$$.fragment,e),we(r.$$.fragment,e),i=!0)},o(e){ye(t.$$.fragment,e),ye(r.$$.fragment,e),i=!1},d(e){be(t,e),e&&D(n),be(r,e)}}}function Cr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function $r(e){let t;return{c(){t=M("Speichern")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Er(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Ar(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Er,then:wr,catch:gr,value:16,blocks:[,,,]};return ve(e[7](),i),{c(){t=B(),n=O("section"),i.block.c(),fr.title="Vorgaben",U(n,"class","sTask svelte-1phofh5")},m(e,o){R(e,t,o),R(e,n,o),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,r=!0},p(t,[n]){_e(i,e=t,n)},i(e){r||(we(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}r=!1},d(e){e&&D(t),e&&D(n),i.block.d(),i.token=null,i=null}}}const br=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Sr(e,r,o){let l,d,u;b(e,a,(e=>o(11,d=e))),b(e,i,(e=>o(12,u=e)));const{Divider:h,Button:f,FormField:m}=c,p=JSON.parse(n.getItem("Locale"));let{schema:g}=r,{record:w}=r,y="template-"+g.class+Math.floor(9e3*Math.random()+1e3).toString(),v=!1;const _=()=>window.history.back(),I=(e,t,n=!1)=>{const r=t.id,i=e.find((e=>e.name===r));let o=t.value;if(!n&&i&&i.properties?.multi&&(o=w[r]),o&&i&&i.type.startsWith("date"))try{return ur(o,"%d.%m.%Y").toISOString()}catch{return new Date(o).toISOString()}if(i&&"boolean"===i.type&&(o=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(p.id).substring(1,2);try{o=Number(o.replace(e,".")).toString()}catch{}}return o};return e.$$set=e=>{"schema"in e&&o(0,g=e.schema),"record"in e&&o(1,w=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,l=v)},[g,w,v,l,h,f,y,async()=>{const e=await t.getEvent(g.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,v=!0),d.role?.length&&g.authorization?.length){const e=g.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,v||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},_,async e=>{const n={};Array.from(document.querySelectorAll("form#"+y+" ."+y)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[r,i]=t.split("."),o=g.list.find((e=>e.name===r));n[t]=I(o.item,e)}else n[t]=I(g.items,e)})),await t.saveTemplate(g.class,n),s.success("Die Vorgaben wurden gespeichert.",2e3),_()}]}const{document:Tr}=Ie;function Nr(e,t,n){const r=e.slice();return r[28]=t[n],r}function Rr(e){let t,n;return t=new Ll({props:{classId:e[2],item:e[28],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5],currency:e[8]}}),t.$on("notify",e[14]),t.$on("defPrep",e[16]),t.$on("task",e[21]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),2&n[0]&&(r.item=e[28]),2&n[0]&&(r.listName=e[1].name),8&n[0]&&(r.eventId=e[3]),1&n[0]&&(r.record=e[0]),16&n[0]&&(r.disabled=e[4]),32&n[0]&&(r.required=e[5]),256&n[0]&&(r.currency=e[8]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Dr(e){let t,n,r=br(e[7],e[28]),i=r&&Rr(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){130&n[0]&&(r=br(e[7],e[28])),r?i?(i.p(e,n),130&n[0]&&we(i,1)):(i=Rr(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function kr(e){let t,n,r,i=e[1].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=Dr(Nr(e,i,t));const s=e=>ye(o[e],1,1,(()=>{o[e]=null}));return{c(){t=O("div");for(let e=0;e<o.length;e+=1)o[e].c();U(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){R(e,t,n);for(let e=0;e<o.length;e+=1)o[e].m(t,null);r=!0},p(e,a){if(82367&a[0]){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const r=Nr(e,i,n);o[n]?(o[n].p(r,a),we(o[n],1)):(o[n]=Dr(r),o[n].c(),we(o[n],1),o[n].m(t,null))}for(pe(),n=i.length;n<o.length;n+=1)s(n);ge()}(!r||6&a[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&U(t,"id",n)},i(e){if(!r){for(let e=0;e<i.length;e+=1)we(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)ye(o[e]);r=!1},d(e){e&&D(t),k(o,e)}}}function Or(e){let t,n,r=e[13](e[9])+"";return{c(){t=O("span"),n=M(r)},m(e,r){R(e,t,r),N(t,n)},p(e,t){512&t[0]&&r!==(r=e[13](e[9])+"")&&H(n,r)},d(e){e&&D(t)}}}function xr(e){let t,n,r;return n=new e[10]({props:{$$slots:{default:[Or]},$$scope:{ctx:e}}}),n.$on("click",(function(){E(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=O("div"),Ee(n.$$.fragment),U(t,"class","accordion svelte-148ktt9"),U(t,"slot","handle")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(t,r){e=t;const i={};512&r[0]|1&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Mr(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[xr,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[kr,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.open=e[6]),134218687&n[0]|1&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Br(e){let t,n,r;return n=new e[11]({props:{$$slots:{default:[Mr]},$$scope:{ctx:e}}}),{c(){t=O("div"),Ee(n.$$.fragment),U(t,"class","formList")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1023&t[0]|1&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Pr(e,n,r){const{Button:i,Accordion:o,AccordionSection:s}=c;let{list:a}=n,{schema:l}=n,{record:d}=n,{classId:u}=n,{eventId:h}=n,{disabled:f}=n,{required:w}=n,{open:y=!1}=n,{template:v={}}=n,{isTemplate:_=!1}=n,{currency:I}=n,{update:C=!1}=n,$=new Map;const E={};let A=d[a.name]||{};d[a.name]=A;const b=e=>E[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),S=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&r(1,a=e.list),"schema"in e&&r(18,l=e.schema),"record"in e&&r(0,d=e.record),"classId"in e&&r(2,u=e.classId),"eventId"in e&&r(3,h=e.eventId),"disabled"in e&&r(4,f=e.disabled),"required"in e&&r(5,w=e.required),"open"in e&&r(6,y=e.open),"template"in e&&r(19,v=e.template),"isTemplate"in e&&r(7,_=e.isTemplate),"currency"in e&&r(8,I=e.currency),"update"in e&&r(20,C=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&C&&d&&r(9,A=d[a.name]||{})},[d,a,u,h,f,w,y,_,I,A,i,o,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?b(t.name):"boolean"===t.type?g(e[t.name]):"date"===t.type?m(e[t.name]):"datetime"===t.type?p(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(E[n]=e.desc);const i=d[t];r(0,d[t]={...i,[n]:e.value},d),r(9,A=d[t])},e=>t=>{(()=>{const e=v[a.name]||{};for(const t in e)v[a.name][t]&&!d[a.name][t]&&r(0,d[a.name][t]=v[a.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${a.name} > div.form-field:last-child`,i=document.querySelector(n);se().then((()=>{const e=`#accordion-content-${u}-${a.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(S)})).then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:r}})=>{if($.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===className+"."+a.name))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&$.set(e,o[0])},()=>{setTimeout((()=>{Array.from($).forEach((([e,t])=>{d[a.name][e]||r(0,d[a.name][e]=t._id,d)}))}),500)},l,v,C,function(t){Q(e,t)}]}class Lr extends Te{constructor(e){var t;super(),Tr.getElementById("svelte-148ktt9-style")||((t=O("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",N(Tr.head,t)),Se(this,e,Pr,Br,A,{list:1,schema:18,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:19,isTemplate:7,currency:8,update:20},[-1,-1])}}const{document:Fr}=Ie;function Vr(e){e[0]=e[23].list,e[22]=e[23].items}function Ur(e,t,n){const r=e.slice();return r[24]=t[n],r}function Hr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Wr(e,t,n){const r=e.slice();return r[27]=t[n],r}function zr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function qr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y;function v(t){e[19](t)}Vr(e),n=new e[7]({props:{outline:!0,$$slots:{default:[jr]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let _={id:e[8]};void 0!==e[1]&&(_.value=e[1]),s=new e[6]({props:_}),ee.push((()=>$e(s,"value",v))),s.$on("input",e[12]),d=new tt({props:{size:"18"}});let I=e[22]?.length&&function(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Gr(Wr(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();U(n,"class","svelte-14hcfjl"),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[22],o=0;o<r.length;o+=1){const s=Wr(e,r,o);i[o]?i[o].p(s,t):(i[o]=Gr(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&D(t),k(i,e)}}}(e),C=e[0]?.length&&function(e){let t,n=e[0],r=[];for(let t=0;t<n.length;t+=1)r[t]=Zr(Ur(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=P()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);R(e,t,n)},p(e,i){if(11778&i[0]){let o;for(n=e[0],o=0;o<n.length;o+=1){const s=Ur(e,n,o);r[o]?r[o].p(s,i):(r[o]=Zr(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){k(r,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),i=O("div"),o=M("Suchen: "),Ee(s.$$.fragment),l=B(),c=O("span"),Ee(d.$$.fragment),u=B(),h=O("div"),f=O("table"),I&&I.c(),m=B(),p=O("tbody"),C&&C.c(),U(t,"class","form--buttons svelte-14hcfjl"),U(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),U(f,"striped",""),U(f,"class","svelte-14hcfjl"),U(h,"class","eList svelte-14hcfjl")},m(a,v){R(a,t,v),Ae(n,t,null),R(a,r,v),R(a,i,v),N(i,o),Ae(s,i,null),N(i,l),N(i,c),Ae(d,c,null),R(a,u,v),R(a,h,v),N(h,f),I&&I.m(f,null),N(f,m),N(f,p),C&&C.m(p,null),g=!0,w||(y=L(c,"click",e[14]),w=!0)},p(e,t){Vr(e);const r={};2&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],le((()=>a=!1))),s.$set(i),e[22]?.length&&I.p(e,t),e[0]?.length&&C.p(e,t)},i(e){g||(we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),g=!0)},o(e){ye(n.$$.fragment,e),ye(s.$$.fragment,e),ye(d.$$.fragment,e),g=!1},d(e){e&&D(t),be(n),e&&D(r),e&&D(i),be(s),be(d),e&&D(u),e&&D(h),I&&I.d(),C&&C.d(),w=!1,y()}}}function jr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Gr(e){let t,n,r=e[27]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function Xr(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Yr(Hr(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=B(),U(t,"class","pointer svelte-14hcfjl")},m(e,r){R(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);N(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[22],s=0;s<r.length;s+=1){const a=Hr(e,r,s);i[s]?i[s].p(a,o):(i[s]=Yr(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(e){e&&D(t),k(i,e)}}}function Yr(e){let t,n,r,i,o=e[9](e[24],e[27])+"";return{c(){t=O("td"),n=M(o),U(t,"class","svelte-14hcfjl")},m(o,s){R(o,t,s),N(t,n),r||(i=L(t,"click",V(e[10](e[24]))),r=!0)},p(t,n){e=t},d(e){e&&D(t),r=!1,i()}}}function Zr(e){let t,n=e[13](e[24],e[22],e[1]),r=n&&Xr(e);return{c(){r&&r.c(),t=P()},m(e,n){r&&r.m(e,n),R(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[24],e[22],e[1])),n?r?r.p(e,i):(r=Xr(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&D(t)}}}function Kr(e){let t,n;return t=new e[5]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Qr(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Kr,then:qr,catch:zr,value:23,blocks:[,,,]};return ve(e[11](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function Jr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Qr]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ei(e,n,r){const i=K(),{Dialog:o,Divider:s,Loading:a,TextField:l,Button:d}=c;let{item:u}=n,{className:h}=n,{classId:f}=n,{list:p}=n,w="",y=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const v=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?g(n):m(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(y)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&r(15,u=e.item),"className"in e&&r(16,h=e.className),"classId"in e&&r(17,f=e.classId),"list"in e&&r(0,p=e.list)},[p,w,i,o,s,a,l,d,y,v,e=>()=>i("choose",{row:e}),async()=>{const e=await _,t=e.display;let n=await Xt(t,e,p);return{list:p,items:n}},({detail:{value:e}})=>{r(1,w=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(v(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,w="")},u,h,f,()=>i("back"),function(e){w=e,r(1,w)}]}class ti extends Te{constructor(e){var t;super(),Fr.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",N(Fr.head,t)),Se(this,e,ei,Jr,A,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:ni}=Ie;function ri(e,t,n){const r=e.slice();return r[11]=t[n],r}function ii(e,t,n){const r=e.slice();return r[3]=t[n],r}function oi(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function si(e){let t,n,r,i=e[7].items,o=[];for(let t=0;t<i.length;t+=1)o[t]=ui(ii(e,i,t));const s=e=>ye(o[e],1,1,(()=>{o[e]=null}));let a=e[7].list&&hi(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=B(),a&&a.c(),n=P()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);R(e,t,i),a&&a.m(e,i),R(e,n,i),r=!0},p(e,r){if(30327783&r[0]){let n;for(i=e[7].items,n=0;n<i.length;n+=1){const s=ii(e,i,n);o[n]?(o[n].p(s,r),we(o[n],1)):(o[n]=ui(s),o[n].c(),we(o[n],1),o[n].m(t.parentNode,t))}for(pe(),n=i.length;n<o.length;n+=1)s(n);ge()}e[7].list?a?(a.p(e,r),128&r[0]&&we(a,1)):(a=hi(e),a.c(),we(a,1),a.m(n.parentNode,n)):a&&(pe(),ye(a,1,1,(()=>{a=null})),ge())},i(e){if(!r){for(let e=0;e<i.length;e+=1)we(o[e]);we(a),r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)ye(o[e]);ye(a),r=!1},d(e){k(o,e),e&&D(t),a&&a.d(e),e&&D(n)}}}function ai(e){let t,n,r,i;const o=[ci,li],s=[];function a(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=P()},m(e,n){~t&&s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){~t&&s[t].d(e),e&&D(r)}}}function li(e){let t,n;return t=new Ll({props:{classId:e[8],item:e[3],record:e[6],disabled:e[3].name===e[14]&&e[15]||e[0],eventId:e[5],currency:e[2],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.item=e[3]),64&n[0]&&(r.record=e[6]),129&n[0]&&(r.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(r.eventId=e[5]),4&n[0]&&(r.currency=e[2]),512&n[0]&&(r.changeValue=e[9]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ci(e){let t,n,r,i;n=new Ll({props:{classId:e[8],item:e[3],record:e[6],disabled:e[0]||!!e[1],required:!0,eventId:e[5],currency:e[2],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]),n.$on("record",e[23]),n.$on("objRecord",e[24]);let o=e[1]&&di(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),z(t,"padding-top",".25em"),z(t,"background-color","lightyellow"),z(t,"position","relative")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};256&r[0]&&(i.classId=e[8]),128&r[0]&&(i.item=e[3]),64&r[0]&&(i.record=e[6]),3&r[0]&&(i.disabled=e[0]||!!e[1]),32&r[0]&&(i.eventId=e[5]),4&r[0]&&(i.currency=e[2]),512&r[0]&&(i.changeValue=e[9]),n.$set(i),e[1]?o?(o.p(e,r),2&r[0]&&we(o,1)):(o=di(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function di(e){let t,n,r,i,o;return n=new tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 pointer svelte-16mo2c")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[22]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function ui(e){let t,n,r="list"!==e[3].type&&ai(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){"list"!==e[3].type?r?(r.p(e,n),128&n[0]&&we(r,1)):(r=ai(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function hi(e){let t,n,r=e[7].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=mi(ri(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(485&n[0]){let s;for(r=e[7].list,s=0;s<r.length;s+=1){const o=ri(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=mi(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}function fi(e){let t,n,r,i;return t=new e[12]({props:{text:e[11].designation}}),r=new Lr({props:{classId:e[8],list:e[11],eventId:e[5],schema:e[11].item,record:e[6],disabled:e[0],currency:e[2],update:!0}}),{c(){Ee(t.$$.fragment),n=B(),Ee(r.$$.fragment)},m(e,o){Ae(t,e,o),R(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};128&n[0]&&(i.text=e[11].designation),t.$set(i);const o={};256&n[0]&&(o.classId=e[8]),128&n[0]&&(o.list=e[11]),32&n[0]&&(o.eventId=e[5]),128&n[0]&&(o.schema=e[11].item),64&n[0]&&(o.record=e[6]),1&n[0]&&(o.disabled=e[0]),4&n[0]&&(o.currency=e[2]),r.$set(o)},i(e){i||(we(t.$$.fragment,e),we(r.$$.fragment,e),i=!0)},o(e){ye(t.$$.fragment,e),ye(r.$$.fragment,e),i=!1},d(e){be(t,e),e&&D(n),be(r,e)}}}function mi(e){let t,n,r="array"!==e[11].type&&fi(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){"array"!==e[11].type?r?(r.p(e,n),128&n[0]&&we(r,1)):(r=fi(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function pi(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function gi(e){let t,n;return t=new ti({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n[0]&&(r.item=e[3]),16&n[0]&&(r.className=e[4]),256&n[0]&&(r.classId=e[8]),2048&n[0]&&(r.list=e[11]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function wi(e){let t,n,r=e[10]&&gi(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[10]?r?(r.p(e,n),1024&n[0]&&we(r,1)):(r=gi(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function yi(e){let t,n,r,i,o,s,a={ctx:e,current:null,token:null,hasCatch:!1,pending:pi,then:si,catch:oi,value:54,blocks:[,,,]};function l(t){e[30](t)}ve(e[16](),a),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[wi]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),i=new e[13]({props:c}),ee.push((()=>$e(i,"open",l))),{c(){a.block.c(),t=B(),Ee(n.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,o){a.block.m(e,a.anchor=o),a.mount=()=>t.parentNode,a.anchor=t,R(e,t,o),Ae(n,e,o),R(e,r,o),Ae(i,e,o),s=!0},p(t,n){_e(a,e=t,n);const r={};3352&n[0]|268435456&n[1]&&(r.$$scope={dirty:n,ctx:e}),!o&&1024&n[0]&&(o=!0,r.open=e[10],le((()=>o=!1))),i.$set(r)},i(e){s||(we(a.block),we(n.$$.fragment,e),we(i.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){ye(a.blocks[e])}ye(n.$$.fragment,e),ye(i.$$.fragment,e),s=!1},d(e){a.block.d(e),a.token=null,a=null,e&&D(t),be(n,e),e&&D(r),be(i,e)}}}function vi(e,n,r){const{Divider:i,FormField:o,Modal:s}=c,a=K();let l,d,u,h,f,{required:m}=n,{disabled:p}=n,{readonly:g}=n,{id:w}=n,{item:y}=n,{value:v}=n,{refValue:_}=n,{currency:I}=n,C={},$=[],E=[],A={},b=new Map,S=!1,T="";const N=y.checkOn,R=v,D=e=>{l.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[r,i]=n.split(".");$.push({action:e,itemName:t.name,refObj:r,refName:i,op:t.properties[e].invert?"!":""})}))},k=()=>{l.items.filter((e=>e.lookup)).forEach((e=>{E.push({name:e.name,lookup:e.lookup})})),l.items.filter((e=>e.properties?.lookup)).forEach((e=>{E.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},O=async e=>{const t=$.filter((t=>t.refObj===e));if(t?.length){r(9,A={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:s}=e;if(!n)break;let a,l,c=!i&&C[n];const u=C[n];u&&i&&(c=(await fh(n,u))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{a=`#${d} .form-field.${t} .field textarea`,l=document.querySelector(a),l||(a=`#${d} .form-field.${t} .field input`,l=document.querySelector(a)),l&&c&&l.setAttribute(s,""),l&&!c&&l.removeAttribute(s)}),0)),"hidden"===s&&(a=`#${d} .form-field.${t}`,l=document.querySelector(a),l?.classList?.toggle("hidden",!!c),c&&r(9,A[t]="",A))}}};Y((()=>{x()}));const x=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(d))&&++n<20;)await e(50);t&&((()=>{if(recID)return;const e=new Set;for(const t of $)e.add(t.refObj||u);Array.from(e).forEach((e=>O(e)))})(),M())},M=()=>{setTimeout((()=>{Array.from(b).forEach((([e,t])=>{C[e]||r(6,C[e]=t._id,C)}))}),250)},B=async e=>{if(!e.value)return void L();const n={[e.itemName]:{$regex:`(?i)${e.value}`}},i=await t.getSectionView(u,n);i?.length?(r(11,T=i),r(10,S=!0)):(r(1,v=""),r(25,_=""),a("setRefValue",_))},P=()=>{r(10,S=!1)},L=()=>{r(1,v=""),r(25,_=v),r(6,C={}),a("setRefValue",_)};return e.$$set=e=>{"required"in e&&r(26,m=e.required),"disabled"in e&&r(0,p=e.disabled),"readonly"in e&&r(27,g=e.readonly),"id"in e&&r(28,w=e.id),"item"in e&&r(3,y=e.item),"value"in e&&r(1,v=e.value),"refValue"in e&&r(25,_=e.refValue),"currency"in e&&r(2,I=e.currency)},e.$$.update=()=>{134217729&e.$$.dirty[0]&&r(0,p=p||g),536871024&e.$$.dirty[0]&&C&&a("safeReference",{record:C,class:u,event:h,taskId:f})},[p,v,I,y,u,h,C,l,d,A,S,T,i,s,N,R,async()=>{try{if(v){const e=await t.getTask(y.refClass,v);delete e._task,r(6,C=e),r(29,f=(await t.getTaskByDocId(e._id,!0))._id)}else r(6,C={})}catch{}return r(7,l=await t.getSchemaByClass(y.refClass)),r(8,d="form-"+l.class+Math.floor(9e3*Math.random()+1e3).toString()),r(4,u=l.class),l.identity.designation,r(5,h=l.id),["readonly","hidden","required"].map(D),k(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(r(6,C[t]=n,C),t===N)return B(e);O(t)},async({detail:e})=>{if(!(l.input?.length&&l.input.length>1))return;if(prevSchema?.class!==l.input[0])return;const{value:n,lookup:i,view:o}=e,[s]=i.split(":"),a=(await t.getSectionView(s,{[o]:{$in:n}})).map((e=>e._id));for(const e of l.input.slice(1)){r(6,C[e]=[],C);const n=await t.getSchemaByClass(e);n.id;let i=await t.getTasks(n.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&a.includes(e[s]))),i?.length){const n=i.map((e=>e._id)),o=await t.getSectionView(e,{_id:{$in:n}});for(const t of o)t[e]=t._id;r(6,C[e]=o,C)}}},async({detail:{className:e,itemName:n,value:r}})=>{if(b.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===u))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&b.set(e,o[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(r(1,v=n[0]._id),r(25,_=v),a("setRefValue",_),r(6,C=n[0])),P()},P,L,({detail:e})=>{r(6,C[e.itemName]=e.value,C)},({detail:e})=>{for(const t of e.items)r(6,C[e.listName][t.name]=t.value,C)},_,m,g,w,f,function(e){S=e,r(10,S)}]}class _i extends Te{constructor(e){var t;super(),ni.getElementById("svelte-16mo2c-style")||((t=O("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",N(ni.head,t)),Se(this,e,vi,yi,A,{required:26,disabled:0,readonly:27,id:28,item:3,value:1,refValue:25,currency:2},[-1,-1])}}function Ii(e){let t,n;return{c(){t=O("span"),n=M(e[4]),U(t,"class","item")},m(e,r){R(e,t,r),N(t,n)},p(e,t){16&t[0]&&H(n,e[4])},d(e){e&&D(t)}}}function Ci(e){let t,n,r,i=e[6]&&Ii(e),o=e[14]&&function(e){let t,n,r,i,o;return n=new Pe({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Übernehmen"),U(t,"class","pointer feather svelte-1fuww0c")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[17]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}(e);return{c(){i&&i.c(),t=B(),o&&o.c(),n=P()},m(e,s){i&&i.m(e,s),R(e,t,s),o&&o.m(e,s),R(e,n,s),r=!0},p(e,n){e[6]?i?i.p(e,n):(i=Ii(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),e[14]&&o.p(e,n)},i(e){r||(we(o),r=!0)},o(e){ye(o),r=!1},d(e){i&&i.d(e),e&&D(t),o&&o.d(e),e&&D(n)}}}function $i(e){let t,n,r;return n=new e[10]({props:{withItem:!0,itemLeft:!0,lang:e[11].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[9],step:e[12],pattern:e[7],placeholder:e[13],readonly:e[8],disabled:e[3],required:e[5],$$slots:{default:[Ci]},$$scope:{ctx:e}}}),n.$on("change",e[15]),n.$on("focus",e[16]),{c(){t=O("div"),Ee(n.$$.fragment),z(t,"position","relative"),z(t,"max-width","10em")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};6&t[0]&&(r.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(r.id=e[0]),1&t[0]&&(r.name=e[0]),512&t[0]&&(r.value=e[9]),128&t[0]&&(r.pattern=e[7]),256&t[0]&&(r.readonly=e[8]),8&t[0]&&(r.disabled=e[3]),32&t[0]&&(r.required=e[5]),80&t[0]|32&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Ei(e,t,r){const i=K(),{TextField:o}=c;let{id:s}=t,{item:a}=t,{value:l}=t,{noForm:d=!1}=t,{classId:u}=t,{disabled:h}=t,{formnovalidate:f}=t,{currency:m}=t,{praefix:p}=t,{notifyList:g}=t;const w=JSON.parse(n.getItem("Locale"));let y=["price","amount","amountValue","taxValue","total","__total"].find((e=>e===a.name?.split("-")[0]))||a.properties?.currency;!1===a.properties?.currency&&(y=!1);const v=Number("1.1").toLocaleString(w.id).substring(1,2),{properties:_={}}=a;let{min:I,max:C,step:$,pattern:E,decimals:A=0,unit:b="",placeholder:S,hint:T,readonly:N,negative:R,required:D=!1,transfer:k}=_,O="";l=l?Number(l.toString().replace(",",".")):0,N=!0===N||void 0;const x=e=>Number(e.toString()).toFixed(A).toString().replace(".",v);E||(E=A?`[0-9]+([${v}][0-9]{1,${A}})?`:"[0-9]*"),R&&(E="-?"+E);return e.$$set=e=>{"id"in e&&r(0,s=e.id),"item"in e&&r(19,a=e.item),"value"in e&&r(18,l=e.value),"noForm"in e&&r(1,d=e.noForm),"classId"in e&&r(2,u=e.classId),"disabled"in e&&r(3,h=e.disabled),"formnovalidate"in e&&r(20,f=e.formnovalidate),"currency"in e&&r(4,m=e.currency),"praefix"in e&&r(21,p=e.praefix),"notifyList"in e&&r(22,g=e.notifyList)},e.$$.update=()=>{1048608&e.$$.dirty[0]&&r(5,D=D&&!f),262144&e.$$.dirty[0]&&(e=>{r(9,O=x(e.toString().replace(",",".")))})(l),4194304&e.$$.dirty[0]&&(async()=>{const e=a.properties?.value?.formula;if(e)void 0!==p&&""!==p?e?.operator?.multiply&&i("formula",{item:a}):e?.operator&&i("formula",{item:a})})()},[s,d,u,h,m,D,y,E,N,O,o,w,$,S,k,({detail:e})=>i("blur",{value:x(e.value)}),({detail:e})=>{N||+l||r(9,O="")},({detail:e})=>{const t=[].concat(k.target);for(const e of t)i("record",{itemName:e,value:l}),i("listRecord",{itemName:e,decimals:a.properties?.decimals,value:l})},l,a,f,p,g]}class Ai extends Te{constructor(e){var t;super(),document.getElementById("svelte-1fuww0c-style")||((t=O("style")).id="svelte-1fuww0c-style",t.textContent=".feather.svelte-1fuww0c{position:absolute;top:0.75em;right:-1em;color:#4300b0}",N(document.head,t)),Se(this,e,Ei,$i,A,{id:0,item:19,value:18,noForm:1,classId:2,disabled:3,formnovalidate:20,currency:4,praefix:21,notifyList:22},[-1,-1])}}const{document:bi}=Ie;function Si(e){e[34]=e[36].list,e[35]=e[36].items}function Ti(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function Ni(e,t,n){const r=e.slice();return r[40]=t[n],r[42]=n,r}function Ri(e,t,n){const r=e.slice();return r[40]=t[n],r}function Di(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function ki(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y,v;Si(e),n=new e[9]({props:{outline:!0,$$slots:{default:[Oi]},$$scope:{ctx:e}}}),n.$on("click",e[31]);let _=!e[2]&&xi(e);function I(t){e[32](t)}let C={id:e[12]};void 0!==e[3]&&(C.value=e[3]),a=new e[7]({props:C}),ee.push((()=>$e(a,"value",I))),a.$on("input",e[15]),u=new tt({props:{size:"18"}});let $=e[35]?.length&&function(e){let t,n,r,i,o=!e[2]&&Bi(e),s=e[35],a=[];for(let t=0;t<s.length;t+=1)a[t]=Pi(Ri(e,s,t));return{c(){t=O("thead"),n=O("tr"),o&&o.c(),r=B();for(let e=0;e<a.length;e+=1)a[e].c();U(n,"class","svelte-1m010ne"),U(t,"class","svelte-1m010ne")},m(e,s){R(e,t,s),N(t,n),o&&o.m(n,null),N(n,r);for(let e=0;e<a.length;e+=1)a[e].m(n,null);i=!0},p(e,t){if(e[2]?o&&(pe(),ye(o,1,1,(()=>{o=null})),ge()):o?(o.p(e,t),4&t[0]&&we(o,1)):(o=Bi(e),o.c(),we(o,1),o.m(n,r)),16384&t[0]){let r;for(s=e[35],r=0;r<s.length;r+=1){const i=Ri(e,s,r);a[r]?a[r].p(i,t):(a[r]=Pi(i),a[r].c(),a[r].m(n,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=s.length}},i(e){i||(we(o),i=!0)},o(e){ye(o),i=!1},d(e){e&&D(t),o&&o.d(),k(a,e)}}}(e),E=e[34]?.length&&function(e){let t,n,r=e[34],i=[];for(let t=0;t<r.length;t+=1)i[t]=Hi(Ti(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=P()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);R(e,t,r),n=!0},p(e,n){if(1138717&n[0]){let s;for(r=e[34],s=0;s<r.length;s+=1){const o=Ti(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=Hi(o),i[s].c(),we(i[s],1),i[s].m(t.parentNode,t))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){k(i,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),_&&_.c(),i=B(),o=O("div"),s=M("Suchen: "),Ee(a.$$.fragment),c=B(),d=O("span"),Ee(u.$$.fragment),h=B(),f=O("div"),m=O("table"),$&&$.c(),p=B(),g=O("tbody"),E&&E.c(),U(t,"class","form--buttons svelte-1m010ne"),U(d,"class","feather pointer svelte-1m010ne"),z(o,"margin-bottom","1em"),z(o,"position","relative"),U(m,"striped",""),U(m,"class","svelte-1m010ne"),U(f,"class","eList svelte-1m010ne")},m(l,I){R(l,t,I),Ae(n,t,null),N(t,r),_&&_.m(t,null),R(l,i,I),R(l,o,I),N(o,s),Ae(a,o,null),N(o,c),N(o,d),Ae(u,d,null),R(l,h,I),R(l,f,I),N(f,m),$&&$.m(m,null),N(m,p),N(m,g),E&&E.m(g,null),w=!0,y||(v=L(d,"click",e[17]),y=!0)},p(e,r){Si(e);const i={};16384&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[2]?_&&(pe(),ye(_,1,1,(()=>{_=null})),ge()):_?(_.p(e,r),4&r[0]&&we(_,1)):(_=xi(e),_.c(),we(_,1),_.m(t,null));const o={};!l&&8&r[0]&&(l=!0,o.value=e[3],le((()=>l=!1))),a.$set(o),e[35]?.length&&$.p(e,r),e[34]?.length&&E.p(e,r)},i(e){w||(we(n.$$.fragment,e),we(_),we(a.$$.fragment,e),we(u.$$.fragment,e),we($),we(E),w=!0)},o(e){ye(n.$$.fragment,e),ye(_),ye(a.$$.fragment,e),ye(u.$$.fragment,e),ye($),ye(E),w=!1},d(e){e&&D(t),be(n),_&&_.d(),e&&D(i),e&&D(o),be(a),be(u),e&&D(h),e&&D(f),$&&$.d(),E&&E.d(),y=!1,v()}}}function Oi(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function xi(e){let t,n;return t=new e[9]({props:{disabled:!e[34].length,filled:!0,$$slots:{default:[Mi]},$$scope:{ctx:e}}}),t.$on("click",e[18](e[34])),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Mi(e){let t;return{c(){t=M("Bestätigen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Bi(e){let t,n,r,i,o;return n=new je({props:{size:"20"}}),{c(){t=O("th"),Ee(n.$$.fragment),U(t,"class","svelte-1m010ne")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[19](e[34])),i=!0)},p(t,n){e=t},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Pi(e){let t,n,r=e[40]+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-1m010ne")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function Li(e){let t,n,r,i,o,s,a,l=e[0],c=Vi(e),d=e[35],u=[];for(let t=0;t<d.length;t+=1)u[t]=Ui(Ni(e,d,t));return{c(){t=O("tr"),c.c(),n=B();for(let e=0;e<u.length;e+=1)u[e].c();r=B(),U(t,"style",i=e[2]?"cursor: default;":"cursor: zoom-in;"),U(t,"title","übernimmt den Wert direkt"),U(t,"class","svelte-1m010ne"),q(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},m(i,l){R(i,t,l),c.m(t,null),N(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);N(t,r),o=!0,s||(a=L(t,"click",e[20](e[37])),s=!0)},p(s,a){if(e=s,1&a[0]&&A(l,l=e[0])?(pe(),ye(c,1,1,_),ge(),c=Vi(e),c.c(),we(c),c.m(t,n)):c.p(e,a),16400&a[0]){let n;for(d=e[35],n=0;n<d.length;n+=1){const i=Ni(e,d,n);u[n]?u[n].p(i,a):(u[n]=Ui(i),u[n].c(),u[n].m(t,r))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!o||4&a[0]&&i!==(i=e[2]?"cursor: default;":"cursor: zoom-in;"))&&U(t,"style",i),16385&a[0]&&q(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},i(e){o||(we(c),o=!0)},o(e){ye(c),o=!1},d(e){e&&D(t),c.d(e),k(u,e),s=!1,a()}}}function Fi(e){let t,n,r;return n=new e[11]({props:{name:e[13],data:e[39],checked:e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]),round:!0}}),{c(){t=O("td"),Ee(n.$$.fragment),U(t,"title","Wählt den Wert aus"),U(t,"class","svelte-1m010ne")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1&t[0]&&(r.checked=e[0].includes(Array.isArray(e[37])?e[37][0]:e[37])),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function Vi(e){let t,n,r=!e[2]&&Fi(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,n){e[2]?r&&(pe(),ye(r,1,1,(()=>{r=null})),ge()):r?(r.p(e,n),4&n[0]&&we(r,1)):(r=Fi(e),r.c(),we(r,1),r.m(t.parentNode,t))},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Ui(e){let t,n,r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"";return{c(){t=O("td"),n=M(r),U(t,"class","svelte-1m010ne")},m(e,r){R(e,t,r),N(t,n)},p(e,t){16&t[0]&&r!==(r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"")&&H(n,r)},d(e){e&&D(t)}}}function Hi(e){let t,n,r=e[16](e[37],e[3]),i=r&&Li(e);return{c(){i&&i.c(),t=P()},m(e,r){i&&i.m(e,r),R(e,t,r),n=!0},p(e,n){8&n[0]&&(r=e[16](e[37],e[3])),r?i?(i.p(e,n),8&n[0]&&we(i,1)):(i=Li(e),i.c(),we(i,1),i.m(t.parentNode,t)):i&&(pe(),ye(i,1,1,(()=>{i=null})),ge())},i(e){n||(we(i),n=!0)},o(e){ye(i),n=!1},d(e){i&&i.d(e),e&&D(t)}}}function Wi(e){let t,n;return t=new e[6]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function zi(e){let t,n,r,i;t=new e[10]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Wi,then:ki,catch:Di,value:36,blocks:[,,,]};return ve(e[14](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function qi(e){let t,n;return t=new e[8]({props:{title:e[1]||"Auswahl",class:"eList",$$slots:{default:[zi]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]&&(r.title=e[1]||"Auswahl"),29&n[0]|16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ji(e,n,r){const i=K(),{Loading:o,TextField:s,Dialog:a,Button:l,Divider:d,Checkbox:u}=c;let{classId:h}=n,{id:f}=n,{designation:m}=n,{selection:p}=n,{refDoc:g}=n,{tableName:w}=n,{idName:y}=n,{target:v}=n,{view:_}=n,{unique:I}=n,{uniqueView:C}=n,{status:$}=n,{single:E}=n;p||=[];let A="",b=h+Math.floor(9e3*Math.random()+1e3).toString()+"search",S=[];const T=w+y+v+"checkbox",N=(e,t)=>e>t?1:t>e?-1:0;Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(b)?.focus()}),200)}));return e.$$set=e=>{"classId"in e&&r(22,h=e.classId),"id"in e&&r(23,f=e.id),"designation"in e&&r(1,m=e.designation),"selection"in e&&r(0,p=e.selection),"refDoc"in e&&r(24,g=e.refDoc),"tableName"in e&&r(25,w=e.tableName),"idName"in e&&r(26,y=e.idName),"target"in e&&r(21,v=e.target),"view"in e&&r(27,_=e.view),"unique"in e&&r(28,I=e.unique),"uniqueView"in e&&r(29,C=e.uniqueView),"status"in e&&r(30,$=e.status),"single"in e&&r(2,E=e.single)},[p,m,E,A,S,i,o,s,a,l,d,u,b,T,async()=>{let e=[],n=[],i={};if(r(4,S=[]),y)if(_){if(f){const n=h.split("-")[1].slice(0,-4),r="input."+h+"[name='_id']",o=document.querySelector(r).value;i={[y]:f},$&&(i.$or=[{status:!0},{[n]:o}]),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const r=e=>(e[n]||"z").toString()+e[v];return N(r(e),r(t))}))}}else C?f&&(i={[y]:f,status:!0},Object.entries(C).map((([e,t])=>{t?.length&&(i[e]={$in:t}),n.push(e)})),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return N(n(e),n(t))})),r(4,S=e.map((e=>{const t=[e[v]];return n.map((n=>t.push(e[n]))),t})))):I?(e=await t.getSection(w,y,f,I),e=e.sort(((e,t)=>N(e,t)))):(e=await t.getSection(w,y,f,!1,$),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return N(n(e),n(t))})));else i={},f&&!Array.isArray(f)&&(i._id=f),e=await t.getSectionView(w,i);const o=await t.getSchemaByClass(w),s=[];if(g){const t=o.items[0].name,n=o.items[1].name,i=o.list[0].name,s=e.find((e=>e[t]===g));e=s?s[i]:[],r(21,v=n)}let a;return e.map((e=>{let t=e[v];if(t||w!==v||(r(21,v=o.items[0].name),t=e[v]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),s.push(t||[])}else g&&(t=o.list[0].item.map((t=>e[t.name]||""))),s.push(t||[])})),a=g?o.list[0].item.map((e=>e.designation)):[o.items.find((e=>e.name===v))?.designation],n=n.map((e=>o.items.find((t=>t.name===e))?.designation)),{list:g?s:s.flat(),items:[...a,...n]}},({detail:{value:e}})=>{r(3,A=e)},(e,t)=>{if(!t)return!0;return!!(Array.isArray(e)?e.join(" "):e).toLowerCase().includes(t.toLowerCase())},()=>{r(3,A="")},e=>()=>{const t=document.getElementsByName(T),n=[];t.forEach(((t,r)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(T).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{if("TD"===t.target?.nodeName){const t=Array.isArray(e)?e[0]:e;E?i("choose",{list:[].concat(t)}):(r(0,p=p.includes(t)?p.filter((e=>e!==t)):p.concat(t)),i("choose",{list:p}))}},v,h,f,g,w,y,_,I,C,$,()=>i("back"),function(e){A=e,r(3,A)}]}class Gi extends Te{constructor(e){var t;super(),bi.getElementById("svelte-1m010ne-style")||((t=O("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",N(bi.head,t)),Se(this,e,ji,qi,A,{classId:22,id:23,designation:1,selection:0,refDoc:24,tableName:25,idName:26,target:21,view:27,unique:28,uniqueView:29,status:30,single:2},[-1,-1])}}const{document:Xi}=Ie;function Yi(e){let t,n,r,i,o,s=e[7].length+"";return{c(){t=O("span"),n=M("("),r=M(s),i=M(")"),U(t,"class",o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,o){R(e,t,o),N(t,n),N(t,r),N(t,i)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&H(r,s),2&n[0]&&o!==(o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&U(t,"class",o)},d(e){e&&D(t)}}}function Zi(e){let t;return{c(){t=O("div"),U(t,"class","load-more-options"),U(t,"slot","load-more-options-message")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Ki(e){let t,n,r,i;const o=[eo,Ji,Qi],s=[];function a(e,t){return!e[16].single&&e[7]?.length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=P()},m(e,n){~t&&s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){~t&&s[t].d(e),e&&D(r)}}}function Qi(e){let t,n,r,i,o;return n=new Pe({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Übernehmen"),U(t,"class","feather pointer svelte-1rbaejz")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[26]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ji(e){let t,n,r,i,o;return n=new Ye({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title",e[17].title||"Generieren"),U(t,"class","feather pointer svelte-1rbaejz")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[25]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function eo(e){let t,n,r,i,o;return n=new tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Löschen"),U(t,"class","feather pointer svelte-1rbaejz")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[27]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function to(e){let t,n,r;function i(t){e[37](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[no]},$$scope:{ctx:e}};return void 0!==e[10]&&(o.open=e[10]),t=new e[11]({props:o}),ee.push((()=>$e(t,"open",i))),{c(){Ee(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};53&r[0]|32768&r[1]&&(i.$$scope={dirty:r,ctx:e}),!n&&1024&r[0]&&(n=!0,i.open=e[10],le((()=>n=!1))),t.$set(i)},i(e){r||(we(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){be(t,e)}}}function no(e){let t,n;return t=new Gi({props:{classId:e[2],selection:e[0],refDoc:e[19],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[21]||e[20]],tableName:e[20],idName:e[21],designation:e[4].designation,target:e[4].name,single:e[16].single}}),t.$on("choose",e[24]),t.$on("back",e[23]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),1&n[0]&&(r.selection=e[0]),16&n[0]&&(r.unique=e[16].unique&&e[4].name),32&n[0]&&(r.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(r.id=e[5][e[21]||e[20]]),16&n[0]&&(r.designation=e[4].designation),16&n[0]&&(r.target=e[4].name),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ro(e){let t,n,r,i,o,s,a,l,c,d=!e[16].single&&e[7]?.length&&Yi(e);function u(t){e[35](t)}function h(t){e[36](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:io,minSearchLength:"3",$$slots:{"load-more-options-message":[Zi]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),r=new e[12]({props:f}),ee.push((()=>$e(r,"selection",u))),ee.push((()=>$e(r,"maxOptions",h))),r.$on("change",e[22]);let m=!e[1]&&Ki(e),p=e[10]&&to(e);return{c(){t=O("div"),d&&d.c(),n=B(),Ee(r.$$.fragment),s=B(),m&&m.c(),a=B(),p&&p.c(),l=P(),z(t,"position","relative")},m(e,i){R(e,t,i),d&&d.m(t,null),N(t,n),Ae(r,t,null),N(t,s),m&&m.m(t,null),R(e,a,i),p&&p.m(e,i),R(e,l,i),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Yi(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const a={};8&s[0]&&(a.id=e[3]),8&s[0]&&(a.name=e[3]),8&s[0]&&(a.class=e[3]),2&s[0]&&(a.disabled=e[1]),64&s[0]&&(a.required=e[6]),256&s[0]&&(a.placeholder=e[8]),32768&s[1]&&(a.$$scope={dirty:s,ctx:e}),!i&&128&s[0]&&(i=!0,a.selection=e[7],le((()=>i=!1))),!o&&512&s[0]&&(o=!0,a.maxOptions=e[9],le((()=>o=!1))),r.$set(a),e[1]?m&&(pe(),ye(m,1,1,(()=>{m=null})),ge()):m?(m.p(e,s),2&s[0]&&we(m,1)):(m=Ki(e),m.c(),we(m,1),m.m(t,null)),e[10]?p?(p.p(e,s),1024&s[0]&&we(p,1)):(p=to(e),p.c(),we(p,1),p.m(l.parentNode,l)):p&&(pe(),ye(p,1,1,(()=>{p=null})),ge())},i(e){c||(we(r.$$.fragment,e),we(m),we(p),c=!0)},o(e){ye(r.$$.fragment,e),ye(m),ye(p),c=!1},d(e){e&&D(t),d&&d.d(),be(r),m&&m.d(),e&&D(a),p&&p.d(e),e&&D(l)}}}async function*io(e){yield[{name:e}]}function oo(e,n,r){const i=K(),{Modal:o,Autocomplete:s}=c;let{classId:a}=n,{id:l}=n,{item:d}=n,{record:u}=n,{value:h}=n,{noForm:f=!1}=n,{disabled:m}=n,{formnovalidate:p}=n,{numberInput:g}=n,{praefix:w}=n,{toDelete:y}=n,{reqQuantity:v}=n,{notifyList:_}=n;const{properties:I={}}=d;let{placeholder:C,hint:$,readonly:E,required:A=!1,lookup:b="",view:S=!1,multi:T,max:N=1e3,generate:R=!1,status:D=!0,refDoc:k}=I;const[O,x]=b.split(":");let M=!1,B=h.map&&h.map((e=>({name:e})))||[];m||=E,m&&(C="");const P=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),r(7,B=t.map((e=>({name:e.trim()}))));const n=B.map((e=>e.name));i("blur",{value:n}),i("multi",{view:T.view,lookup:b,name:d.name,value:n})};Y((async()=>{i("multi",{view:T.view,lookup:b,name:d.name,value:h});const e=document.getElementById(l);e.classList.add(a),!E&&b&&e.addEventListener("focus",L)}));const L=()=>{if(b){document.getElementById(l).blur();const e=v||N;(T.unique||B.length<e)&&r(10,M=!0)}},F=()=>{r(10,M&&=!1)},V=({detail:e})=>{const t=e.list.map((e=>Array.isArray(e)?e[0]:e));r(7,B=t.map((e=>({name:e})))),i("blur",{value:t}),i("multi",{view:T.view,lookup:b,name:d.name,value:t}),F()},U=async()=>{const e={[x]:u[x]},n=await t.getSectionView(O,e),r=Array.from({length:n.length},((e,t)=>n[t][d.name]));V({detail:{name:d.name,list:r}})},H=(e=!1)=>{if(m||!T.required)return;const t=T.maxItem;if(!t||T.unique)return;r(9,N=!1!==e?e:v||u[t]||0);const n=B?.length!=N,o=document.getElementById(l);o?.classList?.toggle("invalid",n),i("invalid",{idx:w,value:n})};return e.$$set=e=>{"classId"in e&&r(2,a=e.classId),"id"in e&&r(3,l=e.id),"item"in e&&r(4,d=e.item),"record"in e&&r(5,u=e.record),"value"in e&&r(0,h=e.value),"noForm"in e&&r(28,f=e.noForm),"disabled"in e&&r(1,m=e.disabled),"formnovalidate"in e&&r(29,p=e.formnovalidate),"numberInput"in e&&r(30,g=e.numberInput),"praefix"in e&&r(31,w=e.praefix),"toDelete"in e&&r(32,y=e.toDelete),"reqQuantity"in e&&r(33,v=e.reqQuantity),"notifyList"in e&&r(34,_=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&r(7,B=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&r(7,B=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&y&&y===d.name&&r(7,B=[]),128&e.$$.dirty[0]&&B&&(r(0,h=B.map&&B.map((e=>e.name))||[]),H()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:r}=e;void 0!==w&&w!==r||t&&t.name===T.maxItem&&H(n)})(g),536870976&e.$$.dirty[0]&&r(6,A=A&&!p),8&e.$$.dirty[1]&&(async e=>{if(void 0===w)return;const{itemName:n,value:o}=e||{};if(o){if(d.refItem&&d.refItem?.split(".")[0]===n){let[e,n]=d.refItem.split(".");if(Array.isArray(o)){if(e=e.slice(0,-1),!o.length)return i("record",{itemName:"quantity",value:0}),void r(7,B=[]);const s={_id:{$in:o}},a=await t.getSectionView(e,s);let l=[];for(const e of a)e[n]&&(l=l.concat(e[n][0][d.name]));if(!l.length)return;i("record",{itemName:"quantity",value:l.length}),r(7,B=l.map((e=>({name:e})))),P({detail:{value:B}})}else{const s=await t.getTask(e,o);if(!s||!s[n])return;const a=s[n];if(!Array.isArray(a)&&!a.length)return;const l=a[w][d.name];i("record",{itemName:"quantity",value:l?.length||0}),r(7,B=l&&l.map((e=>({name:e}))))}}if(d.refItem2&&d.refItem2?.split(".")[0]===n){let[e,n]=d.refItem2.split(".");if(Array.isArray(o))if(Array.isArray(o)){if(e=e.slice(0,-1),!o.length)return i("record",{itemName:"quantity",value:0}),void r(7,B=[]);const s={_id:{$in:o}},a=await t.getSectionView(e,s);let l=[];for(const e of a)e[n]&&(l=l.concat(e[n][0][d.name]));if(!l.length)return;i("record",{itemName:"quantity",value:l.length}),r(7,B=l.map((e=>({name:e})))),P({detail:{value:B}})}else{const s=await t.getTask(e,o);if(!s||!s[n])return;const a=s[n];if(!Array.isArray(a)&&!a.length)return;const l=a[w][d.name];i("record",{itemName:"quantity",value:l?.length||0}),r(7,B=l&&l.map((e=>({name:e}))))}}setTimeout(H,250)}})(_)},[h,m,a,l,d,u,A,B,C,N,M,o,s,E,b,S,T,R,D,k,O,x,P,F,V,()=>{const e=u[R.itemQuantity]||v;if(!e)return;const t=R.prefix||"",n=u[R.variable]||"",r=R.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(r,"0")));V({detail:{name:d.name,list:i}})},async()=>{if(!0===S)return U();const e=v||u[T.maxItem];if(!e)return;let n={};x&&(n={[x]:u[x]}),D&&(n.status=!0);const r=[].concat(u[T.view]||[]);r.length&&(n[T.view]={$in:r});const i=await t.getSectionView(O,n),o=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));V({detail:{name:d.name,list:o}})},()=>{V({detail:{name:d.name,list:[]}})},f,p,g,w,y,v,_,function(e){B=e,r(7,B),r(5,u),r(4,d),r(32,y)},function(e){N=e,r(9,N)},function(e){M=e,r(10,M)}]}class so extends Te{constructor(e){var t;super(),Xi.getElementById("svelte-1rbaejz-style")||((t=O("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",N(Xi.head,t)),Se(this,e,oo,ro,A,{classId:2,id:3,item:4,record:5,value:0,noForm:28,disabled:1,formnovalidate:29,numberInput:30,praefix:31,toDelete:32,reqQuantity:33,notifyList:34},[-1,-1])}}function ao(e){let t,n,r;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function lo(e){let t,n,r,i,o;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[9]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function co(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const a=[lo,ao],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}const uo=e("getMapLink",(async e=>{const{street:n,houseNo:r,postcode:i,location:o,country:s}=e,a=[n&&r?n+" "+r:n,i&&o?i+" "+o:i||o||"",s&&(await t.getTask("country",s)).designation].filter((e=>!!e)).join(", ");return"https://bing.com/maps/default.aspx?where1="+encodeURIComponent(a)}));function ho(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{record:f}=t,{item:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"record"in e&&n(10,f=e.record),"item"in e&&n(11,m=e.item)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;const e=u.includes(".")?f[u.split(".")[0]]:f,t=await uo(e);window.open(t,"_blank")},f,m,function(t){Q(e,t)}]}class fo extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,ho,co,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}const{document:mo}=Ie;function po(e){let t;return{c(){t=O("div"),U(t,"class","load-more-options"),U(t,"slot","load-more-options-message")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function go(e){let t,n,r;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-wpjws5")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function wo(e){let t,n,r,i,o;return n=new vt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-wpjws5")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[8]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function yo(e){let t,n,r,i,o,s,a;function l(t){e[17](t)}function c(t){e[18](t)}function d(t){e[19](t)}let u={id:e[1],name:e[1],class:e[1],minSearchLength:"1",maxOptions:"1",getOptions:e[7],$$slots:{"load-more-options-message":[po]},$$scope:{ctx:e}};void 0!==e[0]&&(u.value=e[0]),void 0!==e[2]&&(u.selection=e[2]),void 0!==e[3]&&(u.searchQuery=e[3]),n=new e[4]({props:u}),ee.push((()=>$e(n,"value",l))),ee.push((()=>$e(n,"selection",c))),ee.push((()=>$e(n,"searchQuery",d))),n.$on("change",e[6]);let h=e[5]&&function(e){let t,n,r,i;const o=[wo,go],s=[];function a(e,t){return e[0]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),s=B(),h&&h.c(),z(t,"position","relative"),U(t,"class","inputAutoComplete")},m(e,r){R(e,t,r),Ae(n,t,null),N(t,s),h&&h.m(t,null),a=!0},p(e,t){const s={};2&t[0]&&(s.id=e[1]),2&t[0]&&(s.name=e[1]),2&t[0]&&(s.class=e[1]),16&t[1]&&(s.$$scope={dirty:t,ctx:e}),!r&&1&t[0]&&(r=!0,s.value=e[0],le((()=>r=!1))),!i&&4&t[0]&&(i=!0,s.selection=e[2],le((()=>i=!1))),!o&&8&t[0]&&(o=!0,s.searchQuery=e[3],le((()=>o=!1))),n.$set(s),e[5]&&h.p(e,t)},i(e){a||(we(n.$$.fragment,e),we(h),a=!0)},o(e){ye(n.$$.fragment,e),ye(h),a=!1},d(e){e&&D(t),be(n),h&&h.d()}}}function vo(e,t,n){const{Autocomplete:r}=c,i=K();let{classId:o}=t,{id:s}=t,{item:a}=t,{name:l}=t,{listName:d}=t,{record:u}=t,{value:h}=t,{noForm:f=!1}=t,{disabled:m}=t,{formnovalidate:p}=t;const{autocomplete:{input:g,min:w,url:y,output:v},format:_}=a.properties,I=[].concat(g),{name:C}=v,$="map"===_;let E,A=h,b=!1;Y((()=>{const e=document.querySelector("."+a.name+" .autocomplete input");e&&(e.addEventListener("focus",N),e.addEventListener("keyup",T),e.addEventListener("keydown",S));const t=document.getElementById(s);t&&t.classList.add(o)}));const S=e=>{b=8===e.keyCode||32===e.keyCode},T=e=>{8===e.keyCode&&""===A&&n(0,h="")},N=async()=>{if(w){const e=I[0].name;if((d?u[d][e]:u[e]).length!==w)return}const e=await R();if(e?.length)if(1===e.length){if(h.startsWith(e[0].name))return;n(3,A=n(0,h=e[0].name)),k(h)}else e.find((e=>(A||"").startsWith(e.name)))||h||n(3,A=" ");else h||n(3,A="")},R=async(e="")=>{const t=await fetch(y+"?"+D()+"&name=%5E"+e.trim());if(!t.ok)return;const n=t.headers.get("Content-Type").split(";")[0];let r=[];try{if("text/json"===n){const e=await t.text();r=JSON.parse(e||[])}else"application/json"===n&&(r=await t.json())}catch{}return r.map((e=>({name:e[C]})))},D=()=>I.map((({name:e,refItem:t})=>`${t}=${(d?u[d][e]:u[e]).split(" ")[0]}`)).join("&"),k=e=>{i("blur",{value:e})};return e.$$set=e=>{"classId"in e&&n(9,o=e.classId),"id"in e&&n(1,s=e.id),"item"in e&&n(10,a=e.item),"name"in e&&n(11,l=e.name),"listName"in e&&n(12,d=e.listName),"record"in e&&n(13,u=e.record),"value"in e&&n(0,h=e.value),"noForm"in e&&n(14,f=e.noForm),"disabled"in e&&n(15,m=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},[h,s,E,A,r,$,({detail:{value:e}})=>{e.length&&n(3,A=n(0,h=e[0].name)),n(2,E=[]),k(h)},async function*(e){if(b||h&&e.startsWith(h))return n(0,h=e),void k(h);const t=await R(e);if(!t?.length)return n(0,h=e),void k(h);1===t.length?(n(3,A=n(0,h=t[0].name)),n(2,E=[]),k(h)):yield t},async()=>{if(!h)return;const e=l.includes(".")?u[l.split(".")[0]]:u,t=await uo(e);window.open(t,"_blank")},o,a,l,d,u,f,m,p,function(e){h=e,n(0,h)},function(e){E=e,n(2,E)},function(e){A=e,n(3,A)}]}class _o extends Te{constructor(e){var t;super(),mo.getElementById("svelte-wpjws5-style")||((t=O("style")).id="svelte-wpjws5-style",t.textContent=".feather.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:light-gray;margin-left:-2em}.inputAutoComplete .autocomplete .chip,.inputAutoComplete .autocomplete .shown-on-focus{display:none !important}",N(mo.head,t)),Se(this,e,vo,yo,A,{classId:9,id:1,item:10,name:11,listName:12,record:13,value:0,noForm:14,disabled:15,formnovalidate:16},[-1,-1])}}const{document:Io}=Ie;function Co(e){e[26]=e[28].list,e[27]=e[28].items}function $o(e,t,n){const r=e.slice();return r[29]=t[n],r}function Eo(e,t,n){const r=e.slice();return r[32]=t[n],r}function Ao(e,t,n){const r=e.slice();return r[32]=t[n],r}function bo(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function So(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g,w,y;function v(t){e[23](t)}Co(e),n=new e[7]({props:{outline:!0,$$slots:{default:[To]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let _={id:e[8]};void 0!==e[1]&&(_.value=e[1]),s=new e[6]({props:_}),ee.push((()=>$e(s,"value",v))),s.$on("input",e[12]),d=new tt({props:{size:"18"}});let I=e[27]?.length&&function(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=No(Ao(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();U(n,"class","svelte-14hcfjl"),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[27],o=0;o<r.length;o+=1){const s=Ao(e,r,o);i[o]?i[o].p(s,t):(i[o]=No(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&D(t),k(i,e)}}}(e),C=e[26]?.length&&function(e){let t,n=e[26],r=[];for(let t=0;t<n.length;t+=1)r[t]=ko($o(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=P()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);R(e,t,n)},p(e,i){if(11779&i[0]){let o;for(n=e[26],o=0;o<n.length;o+=1){const s=$o(e,n,o);r[o]?r[o].p(s,i):(r[o]=ko(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){k(r,e),e&&D(t)}}}(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),i=O("div"),o=M("Suchen: "),Ee(s.$$.fragment),l=B(),c=O("span"),Ee(d.$$.fragment),u=B(),h=O("div"),f=O("table"),I&&I.c(),m=B(),p=O("tbody"),C&&C.c(),U(t,"class","form--buttons svelte-14hcfjl"),U(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),U(f,"striped",""),U(f,"class","svelte-14hcfjl"),U(h,"class","eList svelte-14hcfjl")},m(a,v){R(a,t,v),Ae(n,t,null),R(a,r,v),R(a,i,v),N(i,o),Ae(s,i,null),N(i,l),N(i,c),Ae(d,c,null),R(a,u,v),R(a,h,v),N(h,f),I&&I.m(f,null),N(f,m),N(f,p),C&&C.m(p,null),g=!0,w||(y=L(c,"click",e[14]),w=!0)},p(e,t){Co(e);const r={};64&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],le((()=>a=!1))),s.$set(i),e[27]?.length&&I.p(e,t),e[26]?.length&&C.p(e,t)},i(e){g||(we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),g=!0)},o(e){ye(n.$$.fragment,e),ye(s.$$.fragment,e),ye(d.$$.fragment,e),g=!1},d(e){e&&D(t),be(n),e&&D(r),e&&D(i),be(s),be(d),e&&D(u),e&&D(h),I&&I.d(),C&&C.d(),w=!1,y()}}}function To(e){let t;return{c(){t=M("Abbrechen")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function No(e){let t,n,r=e[32]?.designation+"";return{c(){t=O("th"),n=M(r),U(t,"class","svelte-14hcfjl")},m(e,r){R(e,t,r),N(t,n)},p:_,d(e){e&&D(t)}}}function Ro(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=Do(Eo(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=B(),U(t,"class","pointer svelte-14hcfjl"),q(t,"active",e[29]._id===e[0])},m(e,r){R(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);N(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[27],s=0;s<r.length;s+=1){const a=Eo(e,r,s);i[s]?i[s].p(a,o):(i[s]=Do(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}2049&o[0]&&q(t,"active",e[29]._id===e[0])},d(e){e&&D(t),k(i,e)}}}function Do(e){let t,n,r,i,o=e[9](e[29],e[32])+"";return{c(){t=O("td"),n=M(o),U(t,"class","svelte-14hcfjl")},m(o,s){R(o,t,s),N(t,n),r||(i=L(t,"click",V(e[10](e[29]))),r=!0)},p(t,n){e=t},d(e){e&&D(t),r=!1,i()}}}function ko(e){let t,n=e[13](e[29],e[27],e[1]),r=n&&Ro(e);return{c(){r&&r.c(),t=P()},m(e,n){r&&r.m(e,n),R(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?r?r.p(e,i):(r=Ro(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&D(t)}}}function Oo(e){let t,n;return t=new e[5]({}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function xo(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Oo,then:So,catch:bo,value:28,blocks:[,,,]};return ve(e[11](),o),{c(){Ee(t.$$.fragment),n=B(),r=P(),o.block.c()},m(e,s){Ae(t,e,s),R(e,n,s),R(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){_e(o,e=t,n)},i(e){i||(we(t.$$.fragment,e),we(o.block),i=!0)},o(e){ye(t.$$.fragment,e);for(let e=0;e<3;e+=1){ye(o.blocks[e])}i=!1},d(e){be(t,e),e&&D(n),e&&D(r),o.block.d(e),o.token=null,o=null}}}function Mo(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[xo]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|64&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function Bo(e,n,i){const o=K(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{className:f}=n,{classId:p}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:v}=n,{recordId:_}=n,{filter:I}=n,C="",$=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const E=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?g(n):m(e[`_${t.name}`]||e[t.name]||"")},A=t.getSchemaByClass(f);Y((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById($)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await A;e.eventId===t.id&&mh(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,h=e.item),"className"in e&&i(16,f=e.className),"classId"in e&&i(17,p=e.classId),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(18,y=e.viewName),"viewValue"in e&&i(19,v=e.viewValue),"recordId"in e&&i(20,_=e.recordId),"filter"in e&&i(21,I=e.filter)},[w,C,o,s,a,l,d,u,$,E,e=>()=>o("choose",{row:e}),async()=>{const e=await A,n="."+p+"#"+y;document.querySelector(n);let r={[y]:v},i=[];r[y]&&(i=await t.getSectionView(e.class,r,!0)),I&&(i=i.filter((e=>e._id!=I)));const o=e.display;return{list:i,items:await Xt(o,e,i)}},({detail:{value:e}})=>{i(1,C=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(E(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,C="")},h,f,p,y,v,_,I,()=>o("back"),function(e){C=e,i(1,C)}]}class Po extends Te{constructor(e){var t;super(),Io.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",N(Io.head,t)),Se(this,e,Bo,Mo,A,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function Lo(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Fo(e){let t,n,r,i,o;function s(t){e[21](t)}let a={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(a.value=e[0]),n=new e[10]({props:a}),ee.push((()=>$e(n,"value",s)));let l=!e[6]&&Vo(e);return{c(){t=O("div"),Ee(n.$$.fragment),i=B(),l&&l.c(),z(t,"position","relative")},m(e,r){R(e,t,r),Ae(n,t,null),N(t,i),l&&l.m(t,null),o=!0},p(e,i){const o={};4&i&&(o.id=e[2]),8&i&&(o.name=e[3].name),34&i&&(o.inputClass=e[5]||e[1]),64&i&&(o.disabled=e[6]),128&i&&(o.formnovalidate=e[7]),!r&&1&i&&(r=!0,o.value=e[0],le((()=>r=!1))),n.$set(o),e[6]?l&&(pe(),ye(l,1,1,(()=>{l=null})),ge()):l?(l.p(e,i),64&i&&we(l,1)):(l=Vo(e),l.c(),we(l,1),l.m(t,null))},i(e){o||(we(n.$$.fragment,e),we(l),o=!0)},o(e){ye(n.$$.fragment,e),ye(l),o=!1},d(e){e&&D(t),be(n),l&&l.d()}}}function Vo(e){let t,n,r,i,o;return n=new Tt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-wbrqzu")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[17]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Uo(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Ho(e){let t,n,r;function i(t){e[22](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Wo]},$$scope:{ctx:e}};return void 0!==e[8]&&(o.open=e[8]),t=new e[11]({props:o}),ee.push((()=>$e(t,"open",i))),{c(){Ee(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};268435994&r&&(i.$$scope={dirty:r,ctx:e}),!n&&256&r&&(n=!0,i.open=e[8],le((()=>n=!1))),t.$set(i)},i(e){r||(we(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){be(t,e)}}}function Wo(e){let t,n;return t=new Po({props:{item:e[3],className:e[3].refClass,classId:e[1],rowId:"",recordId:e[4]._id,viewName:e[15].selection,viewValue:e[9],filter:e[4]._id}}),t.$on("choose",e[18]),t.$on("back",e[19]),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n&&(r.item=e[3]),8&n&&(r.className=e[3].refClass),2&n&&(r.classId=e[1]),16&n&&(r.recordId=e[4]._id),512&n&&(r.viewValue=e[9]),16&n&&(r.filter=e[4]._id),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function zo(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Uo,then:Fo,catch:Lo,value:27,blocks:[,,,]};ve(e[16](),i);let o=e[8]&&Ho(e);return{c(){i.block.c(),t=B(),o&&o.c(),n=P()},m(e,s){i.block.m(e,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,R(e,t,s),o&&o.m(e,s),R(e,n,s),r=!0},p(t,[r]){_e(i,e=t,r),e[8]?o?(o.p(e,r),256&r&&we(o,1)):(o=Ho(e),o.c(),we(o,1),o.m(n.parentNode,n)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){r||(we(i.block),we(o),r=!0)},o(e){for(let e=0;e<3;e+=1){ye(i.blocks[e])}ye(o),r=!1},d(e){i.block.d(e),i.token=null,i=null,e&&D(t),o&&o.d(e),e&&D(n)}}}function qo(e,t,n){const{TextField:r,Modal:i}=c;let{classId:o}=t,{id:s}=t,{item:a}=t,{record:l}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:h}=t,{formnovalidate:f}=t,{praefix:m}=t;const{properties:p={}}=a;let g,{pattern:w,placeholder:y,readonly:v,required:_=!1,view:I}=p,C=!1;const $=()=>{n(8,C=!1)};return e.$$set=e=>{"classId"in e&&n(1,o=e.classId),"id"in e&&n(2,s=e.id),"item"in e&&n(3,a=e.item),"record"in e&&n(4,l=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,h=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,m=e.praefix)},[d,o,s,a,l,u,h,f,C,g,r,i,w,v,_,I,async()=>(n(9,g=l[I.selection]),!0),()=>{n(8,C=!0)},({detail:e})=>{n(0,d=e.row[I.value?I.value:"_id"]),$()},$,m,function(e){d=e,n(0,d)},function(e){C=e,n(8,C)}]}class jo extends Te{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=O("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",N(document.head,t)),Se(this,e,qo,zo,A,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Go(e,t,n){const r=e.slice();return r[12]=t[n][0],r[13]=t[n][1],r}function Xo(e){let t;return{c(){t=O("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Yo(e){let t;return{c(){t=O("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function Zo(e){let t,n,r,i,o=e[12]+"";return{c(){t=O("option"),n=M(o),t.__value=r=e[13],t.value=t.__value,t.selected=i=e[0]==e[13]},m(e,r){R(e,t,r),N(t,n)},p(e,s){64&s&&o!==(o=e[12]+"")&&H(n,o),64&s&&r!==(r=e[13])&&(t.__value=r,t.value=t.__value),65&s&&i!==(i=e[0]==e[13])&&(t.selected=i)},d(e){e&&D(t)}}}function Ko(e){let t,n,r,i,o,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Yo:Xo}let r=n(e),i=r(e);return{c(){i.c(),t=P()},m(e,n){i.m(e,n),R(e,t,n)},p(e,o){r!==(r=n(e))&&(i.d(1),i=r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i.d(e),e&&D(t)}}}(e),a=e[6],l=[];for(let t=0;t<a.length;t+=1)l[t]=Zo(Go(e,a,t));return{c(){t=O("select"),s&&s.c(),n=P();for(let e=0;e<l.length;e+=1)l[e].c();U(t,"class",r=S(e[3]||e[4])+" svelte-5xpzvo"),U(t,"id",e[2]),U(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(r,a){R(r,t,a),s&&s.m(t,null),N(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);i||(o=L(t,"change",e[9]),i=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let r;for(a=e[6],r=0;r<a.length;r+=1){const i=Go(e,a,r);l[r]?l[r].p(i,n):(l[r]=Zo(i),l[r].c(),l[r].m(t,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}24&n&&r!==(r=S(e[3]||e[4])+" svelte-5xpzvo")&&U(t,"class",r),4&n&&U(t,"id",e[2]),4&n&&U(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:_,o:_,d(e){e&&D(t),s&&s.d(),k(l,e),i=!1,o()}}}function Qo(e,t,n){const r=K();let{id:i}=t,{item:o}=t,{value:s}=t,{noForm:a=!1}=t,{classId:l}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:h,readonly:f}=o.properties;u&&(u=u.map((e=>[e,e]))),"businessMonth"===h&&(s||=1,u=[["Januar",1],["Februar",2],["März",3],["April",4],["Mai",5],["Juni",6],["Juli",7],["August",8],["September",9],["Oktober",10],["November",11],["Dezember",12]]),"financialAccounting"===h&&(s||=2024,u=[["2024/2025",2024]]),"valueAddedTax"===h&&(s||=0,u=[["0% Steuerbefreit",0],["8.1% Normalsatz",.081],["2.6% Reduzierter Satz",.026],["3.8% Beherbergung",.038]]),c||=!!f,c||(c=void 0);return e.$$set=e=>{"id"in e&&n(2,i=e.id),"item"in e&&n(10,o=e.item),"value"in e&&n(0,s=e.value),"noForm"in e&&n(3,a=e.noForm),"classId"in e&&n(4,l=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[s,c,i,a,l,d,u,h,f,e=>r("blur",{value:e.srcElement.value}),o]}class Jo extends Te{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=O("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}",N(document.head,t)),Se(this,e,Qo,Ko,A,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function es(e){let t,n,r,i,o,s,a,l,c;i=new e[8]({props:{id:"dp-"+e[1]+(e[2]?"-"+e[2]:""),value:e[0],readonly:e[5],required:e[7],disabled:e[6],noCalendar:e[9],closeOnSelection:!0}}),i.$on("change",e[11]);let d=e[10]&&function(e){let t,n,r,i,o;return n=new Pe({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"title","Übernehmen"),U(t,"class","pointer feather")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[12]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}(e);return{c(){t=O("input"),r=B(),Ee(i.$$.fragment),o=B(),d&&d.c(),s=P(),U(t,"type","string"),U(t,"class",n=e[3]||e[4]),U(t,"id",e[1]),U(t,"name",e[1]),t.hidden=!0},m(n,u){R(n,t,u),W(t,e[0]),R(n,r,u),Ae(i,n,u),R(n,o,u),d&&d.m(n,u),R(n,s,u),a=!0,l||(c=L(t,"input",e[18]),l=!0)},p(e,[r]){(!a||24&r&&n!==(n=e[3]||e[4]))&&U(t,"class",n),(!a||2&r)&&U(t,"id",e[1]),(!a||2&r)&&U(t,"name",e[1]),1&r&&W(t,e[0]);const o={};6&r&&(o.id="dp-"+e[1]+(e[2]?"-"+e[2]:"")),1&r&&(o.value=e[0]),32&r&&(o.readonly=e[5]),128&r&&(o.required=e[7]),64&r&&(o.disabled=e[6]),i.$set(o),e[10]&&d.p(e,r)},i(e){a||(we(i.$$.fragment,e),we(d),a=!0)},o(e){ye(i.$$.fragment,e),ye(d),a=!1},d(e){e&&D(t),e&&D(r),be(i,e),e&&D(o),d&&d.d(e),e&&D(s),l=!1,c()}}}let ts=new Map;function ns(e,n,r){const i=K(),{DatePicker:o}=c;let{value:s}=n,{id:a}=n,{item:l}=n,{record:d}=n,{praefix:u}=n,{noForm:h=!1}=n,{classId:f}=n,{eventId:m}=n,{readonly:p}=n,{disabled:g}=n,{required:w}=n,{notifyList:y}=n,{dateInput:v}=n;s||(s=void 0);let _=null;const I=(void 0===u?"":u.toString())+"-"+m+"-"+l.name,C=l.properties?.noCalendar||!1,$=l.properties?.transfer,E=({detail:e})=>{try{r(0,s=hr(e.value,s)),void 0!==u&&ts.set(I,new Date(s.valueOf())),A(s)}catch{r(0,s=void 0)}},A=e=>{i("change",{value:new Date(e.valueOf())})};if(void 0!==u&&!s){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0);s=hr(t,s)}return e.$$set=e=>{"value"in e&&r(0,s=e.value),"id"in e&&r(1,a=e.id),"item"in e&&r(13,l=e.item),"record"in e&&r(14,d=e.record),"praefix"in e&&r(2,u=e.praefix),"noForm"in e&&r(3,h=e.noForm),"classId"in e&&r(4,f=e.classId),"eventId"in e&&r(15,m=e.eventId),"readonly"in e&&r(5,p=e.readonly),"disabled"in e&&r(6,g=e.disabled),"required"in e&&r(7,w=e.required),"notifyList"in e&&r(16,y=e.notifyList),"dateInput"in e&&r(17,v=e.dateInput)},e.$$.update=()=>{if(1&e.$$.dirty&&s&&!$&&ts.has(I)&&r(0,s=ts.get(I)),65536&e.$$.dirty&&(async e=>{if(null===_){const e=(await t.getEvent(m)).output.class[0].item;_=e.find((e=>e.properties?.value?.formula))}_&&_.properties.value.formula.argument[0].refItem===l.name&&(e&&e.itemName!==l.name&&!_.properties.value.formula.argument[1].value&&e.itemName!==_.properties.value.formula.argument[1].refItem.split(".")[0]||i("formula",{item:_}))})(y),131072&e.$$.dirty&&((e={})=>{let{ref:t,val:n,t:r,l:i,n:o}=e;if(o&&(n=o),!n||isNaN(new Date(n)))return;if(r)return;if(!t)return;const[s,a]=t.split(".");s===i&&a===l.name&&null!=u&&E({detail:{value:new Date(n)}})})(v),24673&e.$$.dirty&&d&&d[l.name])try{g||p||r(0,s=hr(d[l.name],s))}catch{}},[s,a,u,h,f,p,g,w,o,C,$,E,()=>{i("record",{target:$.target,value:s.toISOString()})},l,d,m,y,v,function(){s=this.value,r(0,s),r(14,d),r(13,l),r(6,g),r(5,p)}]}class rs extends Te{constructor(e){super(),Se(this,e,ns,es,A,{value:0,id:1,item:13,record:14,praefix:2,noForm:3,classId:4,eventId:15,readonly:5,disabled:6,required:7,notifyList:16,dateInput:17})}}function is(e){let t;return{c(){t=M("Stunden")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function os(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[is]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ss(e){let t;return{c(){t=M("Minuten")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function as(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[ss]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ls(e){let t;return{c(){t=M("Jetzt")},m(e,n){R(e,t,n)},d(e){e&&D(t)}}}function cs(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[ls]},$$scope:{ctx:e}}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ds(e){let t,n,r,i,o,s,a,l,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[cs],"minutes-label":[as],"hours-label":[os]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=O("input"),r=B(),Ee(i.$$.fragment),o=B(),Ee(s.$$.fragment),U(t,"type","string"),U(t,"class",n=e[2]||e[3]),U(t,"id",e[1]),U(t,"name",e[1]),t.hidden=!0},m(n,d){R(n,t,d),W(t,e[0]),R(n,r,d),Ae(i,n,d),R(n,o,d),Ae(s,n,d),a=!0,l||(c=L(t,"input",e[9]),l=!0)},p(e,[r]){(!a||12&r&&n!==(n=e[2]||e[3]))&&U(t,"class",n),(!a||2&r)&&U(t,"id",e[1]),(!a||2&r)&&U(t,"name",e[1]),1&r&&W(t,e[0]);const o={};1&r&&(o.value=e[0]),i.$set(o);const l={};1&r&&(l.value=e[0]),4096&r&&(l.$$scope={dirty:r,ctx:e}),s.$set(l)},i(e){a||(we(i.$$.fragment,e),we(s.$$.fragment,e),a=!0)},o(e){ye(i.$$.fragment,e),ye(s.$$.fragment,e),a=!1},d(e){e&&D(t),e&&D(r),be(i,e),e&&D(o),be(s,e),l=!1,c()}}}function us(e,t,n){const r=K(),{Label:i,DatePicker:o,TimePicker:s}=c;let{value:a}=t,{id:l}=t,{noForm:d=!1}=t,{classId:u}=t;const h=e=>r("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,a=e.value),"id"in e&&n(1,l=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[a,l,d,u,i,o,s,({detail:e})=>{var t,r;n(0,(t=e.value,r=a,a=null==t||null==r?t:(r.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),r))),h(a)},({detail:e})=>{n(0,a=hr(e.value,a)),h(a)},function(){a=this.value,n(0,a)}]}class hs extends Te{constructor(e){super(),Se(this,e,us,ds,A,{value:0,id:1,noForm:2,classId:3})}}function fs(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,p,g;return u=new e[9]({props:{format:e[5],required:e[3],disabled:e[4],value:e[7],noCalendar:e[10],closeOnSelection:!0}}),u.$on("change",e[11]),f=new e[9]({props:{format:e[6],required:e[3],disabled:e[4],value:e[8],noCalendar:e[10],class:"moveLeft",closeOnSelection:!0}}),f.$on("change",e[12]),{c(){t=O("input"),o=B(),s=O("input"),d=B(),Ee(u.$$.fragment),h=M(" /\n"),Ee(f.$$.fragment),U(t,"type","string"),U(t,"class",n=e[1]||e[2]),U(t,"id",r=e[0]+"_from"),U(t,"name",i=e[0]+"_from"),t.hidden=!0,U(s,"type","string"),U(s,"class",a=e[1]||e[2]),U(s,"id",l=e[0]+"_to"),U(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,r){R(n,t,r),W(t,e[7]),R(n,o,r),R(n,s,r),W(s,e[8]),R(n,d,r),Ae(u,n,r),R(n,h,r),Ae(f,n,r),m=!0,p||(g=[L(t,"input",e[15]),L(s,"input",e[16])],p=!0)},p(e,[o]){(!m||6&o&&n!==(n=e[1]||e[2]))&&U(t,"class",n),(!m||1&o&&r!==(r=e[0]+"_from"))&&U(t,"id",r),(!m||1&o&&i!==(i=e[0]+"_from"))&&U(t,"name",i),128&o&&W(t,e[7]),(!m||6&o&&a!==(a=e[1]||e[2]))&&U(s,"class",a),(!m||1&o&&l!==(l=e[0]+"_to"))&&U(s,"id",l),(!m||1&o&&c!==(c=e[0]+"_to"))&&U(s,"name",c),256&o&&W(s,e[8]);const d={};32&o&&(d.format=e[5]),8&o&&(d.required=e[3]),16&o&&(d.disabled=e[4]),128&o&&(d.value=e[7]),u.$set(d);const h={};64&o&&(h.format=e[6]),8&o&&(h.required=e[3]),16&o&&(h.disabled=e[4]),256&o&&(h.value=e[8]),f.$set(h)},i(e){m||(we(u.$$.fragment,e),we(f.$$.fragment,e),m=!0)},o(e){ye(u.$$.fragment,e),ye(f.$$.fragment,e),m=!1},d(e){e&&D(t),e&&D(o),e&&D(s),e&&D(d),be(u,e),e&&D(h),be(f,e),p=!1,$(g)}}}function ms(e,t,n){const r=K(),{DatePicker:i}=c;let{value:o}=t,{id:s}=t,{item:a}=t,{noForm:l=!1}=t,{classId:d}=t,{required:u}=t,{disabled:h}=t;const{noCalendar:f,preset:m}=a.properties||{};let p="%d.%m.%Y",g="%d.%m.%Y",w=o?.from,y=o?.to;if(m){const{first:e,last:t}=function(e){const t=new Date;let n=t.getFullYear();const r=t.getMonth();let i,o;switch(t.getDate(),e){case"currentMonth":i=o=r;break;case"currentYear":i=0,o=i+11;break;case"lastSemiYear":i=r<6?6:0,o=i+5,i>5&&--n;break;case"lastQuarter":i=r<3?9:r<6?0:r<9?3:6,o=i+2,i>8&&--n;break;case"lastMonth":i=o=0===r?11:r-1,11===i&&--n;break;default:i=0,o=i+11,--n}return{first:new Date(n,i,1),last:new Date(n,o+1,0)}}(m);e&&(w=e),t&&(y=t)}"Invalid Date"===w?.toString()&&(w=void 0),"Invalid Date"===y?.toString()&&(y=void 0),h&&(void 0===w&&(p=""),void 0===y&&(g=""));return e.$$set=e=>{"value"in e&&n(13,o=e.value),"id"in e&&n(0,s=e.id),"item"in e&&n(14,a=e.item),"noForm"in e&&n(1,l=e.noForm),"classId"in e&&n(2,d=e.classId),"required"in e&&n(3,u=e.required),"disabled"in e&&n(4,h=e.disabled)},[s,l,d,u,h,p,g,w,y,i,f,({detail:e})=>{n(7,w=hr(e.value,w)),y&&w&&y.valueOf()-w.valueOf()<0&&n(7,w=void 0),r("change",{value:w,range:"_from"})},({detail:e})=>{n(8,y=hr(e.value,y)),y&&w&&y.valueOf()-w.valueOf()<0&&n(8,y=void 0),r("change",{value:y,range:"_to"})},o,a,function(){w=this.value,n(7,w)},function(){y=this.value,n(8,y)}]}class ps extends Te{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=O("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",N(document.head,t)),Se(this,e,ms,fs,A,{value:13,id:0,item:14,noForm:1,classId:2,required:3,disabled:4})}}function gs(e){let t,n,r,i,o;function s(t){e[13](t)}let a={class:e[0],id:e[1],name:e[2],accept:".xml",max:"1",beforeChange:e[9]};return void 0!==e[3]&&(a.files=e[3]),t=new e[5]({props:a}),ee.push((()=>$e(t,"files",s))),t.$on("change",e[8]),i=new e[6]({props:{inputClass:e[0],hidden:!0,id:e[1],name:e[1],value:e[4]}}),{c(){Ee(t.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,n){Ae(t,e,n),R(e,r,n),Ae(i,e,n),o=!0},p(e,r){const o={};1&r&&(o.class=e[0]),2&r&&(o.id=e[1]),4&r&&(o.name=e[2]),!n&&8&r&&(n=!0,o.files=e[3],le((()=>n=!1))),t.$set(o);const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.id=e[1]),2&r&&(s.name=e[1]),16&r&&(s.value=e[4]),i.$set(s)},i(e){o||(we(t.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(t.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){be(t,e),e&&D(r),be(i,e)}}}function ws(e){let t,n;return t=new e[6]({props:{inputClass:e[0],readonly:!0,id:e[1],name:e[1],value:e[4]}}),{c(){Ee(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.inputClass=e[0]),2&n&&(r.id=e[1]),2&n&&(r.name=e[1]),16&n&&(r.value=e[4]),t.$set(r)},i(e){n||(we(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){be(t,e)}}}function ys(e){let t,n,r,i;const o=[ws,gs],s=[];return t=function(e){return e[7]?0:1}(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,[t]){n.p(e,t)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function vs(e,t,n){const{FileDropzone:r,TextField:i}=c,o=K();let{classId:s}=t,{eventId:a}=t,{record:l}=t,{item:d}=t,{id:u}=t,{name:h}=t,f=[],m=l[d.name]||"",p=!!l._id;const g=e=>{if(!e?.length)return"";if(e.length<14)return"";const t=e.replaceAll(" ","").slice(-14),n=t.slice(-8),r=t.slice(0,4);let i="";for(let e=0;e<r.length/2;e++){const t=2*e,n=r.substring(t,t+2);i+=String.fromCharCode(n)}return i+n};return e.$$set=e=>{"classId"in e&&n(0,s=e.classId),"eventId"in e&&n(10,a=e.eventId),"record"in e&&n(11,l=e.record),"item"in e&&n(12,d=e.item),"id"in e&&n(1,u=e.id),"name"in e&&n(2,h=e.name)},[s,u,h,f,m,r,i,p,async()=>{const{list:e}=d.properties,t=f[0];if(t){n(4,m=t.name);const r=(e=>{var t={toObj:function(e){var n={};if(1==e.nodeType){if(e.attributes.length)for(var r=0;r<e.attributes.length;r++)n["@"+e.attributes[r].nodeName]=(e.attributes[r].nodeValue||"").toString();if(e.firstChild){for(var i=0,o=0,s=!1,a=e.firstChild;a;a=a.nextSibling)1==a.nodeType?s=!0:3==a.nodeType&&a.nodeValue.match(/[^ \f\n\r\t\v]/)?i++:4==a.nodeType&&o++;if(s)if(i<2&&o<2)for(t.removeWhite(e),a=e.firstChild;a;a=a.nextSibling)3==a.nodeType?n["#text"]=t.escape(a.nodeValue):4==a.nodeType?n["#cdata"]=t.escape(a.nodeValue):n[a.nodeName]?n[a.nodeName]instanceof Array?n[a.nodeName][n[a.nodeName].length]=t.toObj(a):n[a.nodeName]=[n[a.nodeName],t.toObj(a)]:n[a.nodeName]=t.toObj(a);else e.attributes.length?n["#text"]=t.escape(t.innerXml(e)):n=t.escape(t.innerXml(e));else if(i)e.attributes.length?n["#text"]=t.escape(t.innerXml(e)):n=t.escape(t.innerXml(e));else if(o)if(o>1)n=t.escape(t.innerXml(e));else for(a=e.firstChild;a;a=a.nextSibling)n["#cdata"]=t.escape(a.nodeValue)}e.attributes.length||e.firstChild||(n=null)}else 9==e.nodeType&&(n=t.toObj(e.documentElement));return n},toJson:function(e,n,r){var i=n?'"'+n+'"':"";if(e instanceof Array){for(var o=0,s=e.length;o<s;o++)e[o]=t.toJson(e[o],"",r+"\t");i+=(n?":[":"[")+(e.length>1?"\n"+r+"\t"+e.join(",\n"+r+"\t")+"\n"+r:e.join(""))+"]"}else if(null==e)i+=(n&&":")+"null";else if("object"==typeof e){var a=[];for(var l in e)a[a.length]=t.toJson(e[l],l,r+"\t");i+=(n?":{":"{")+(a.length>1?"\n"+r+"\t"+a.join(",\n"+r+"\t")+"\n"+r:a.join(""))+"}"}else i+="string"==typeof e?(n&&":")+'"'+e.toString()+'"':(n&&":")+e.toString();return i},innerXml:function(e){var t="";if("innerHTML"in e)t=e.innerHTML;else for(var n=function(e){var t="";if(1==e.nodeType){t+="<"+e.nodeName;for(var r=0;r<e.attributes.length;r++)t+=" "+e.attributes[r].nodeName+'="'+(e.attributes[r].nodeValue||"").toString()+'"';if(e.firstChild){t+=">";for(var i=e.firstChild;i;i=i.nextSibling)t+=n(i);t+="</"+e.nodeName+">"}else t+="/>"}else 3==e.nodeType?t+=e.nodeValue:4==e.nodeType&&(t+="<![CDATA["+e.nodeValue+"]]>");return t},r=e.firstChild;r;r=r.nextSibling)t+=n(r);return t},escape:function(e){return e.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(e){e.normalize();for(var n=e.firstChild;n;)if(3==n.nodeType)if(n.nodeValue.match(/[^ \f\n\r\t\v]/))n=n.nextSibling;else{var r=n.nextSibling;e.removeChild(n),n=r}else 1==n.nodeType?(t.removeWhite(n),n=n.nextSibling):n=n.nextSibling;return e}};return e=(new window.DOMParser).parseFromString(e,"text/xml"),t.toObj(t.removeWhite(e))})(await t.text()),i=[],s=r.BkToCstmrDbtCdtNtfctn.Ntfctn,a=[].concat(s.Ntry);for(const e of a){let t=[].concat(e.NtryDtls.TxDtls);for(const n of t){const t=n.RmtInf?.Strd?.CdtrRefInf?.Ref||n.Refs.EndToEndId||"",r={date:e.ValDt.Dt,branchName:n.RltdPties?.Dbtr?.Nm||"",amount:n.AmtDtls?.TxAmt?.Amt["#text"]||n.Amt["#text"],reference:t,invoiceId:g(t),information:n.RmtInf?.Ustrd||""};i.push(r)}}i.length&&o("record",{itemName:e,value:i})}},()=>{n(3,f)},a,l,d,function(e){f=e,n(3,f)}]}class _s extends Te{constructor(e){var t;super(),document.getElementById("svelte-157hlzf-style")||((t=O("style")).id="svelte-157hlzf-style",t.textContent="label.file-dropzone{margin-top:0 !important}",N(document.head,t)),Se(this,e,vs,ys,A,{classId:0,eventId:10,record:11,item:12,id:1,name:2})}}const Is=e=>{const t={},n=e.replaceAll("\r","").split("\n");return n?(t.iban=n[3],t.supplierText=n[5]+", "+n[6]+", "+n[7]+", "+n[8]+", "+n[9],t.supplier={company:{}},t.supplier.company.companyName=n[5],t.supplier.company.postcode=n[8],t.amount=n[18],t.amountOrg=n[18],t.currency={},t.currency.designation=n[19],t.reference=n[28],t.additionalInfo=n[29],t.extReference=Cs(10,n[31]),t.amountVat=$s(Cs(32,n[31]),t.amount)||$s(Cs(33,n[31]),t.amount),t):t},Cs=(e,t)=>{if(!e)return"";if(!t)return"";const n=t.split("/"+e+"/")[1];return n?.split("/")[0]||""},$s=(e,t)=>{if(!e)return"";let n=0;if(e.includes(":")){const t=e.split(";");for(const e of t)n+=e.split(":")[1]}else n=+t/(+e+100)*+e;return n},{document:Es}=Ie;function As(e){let t,n,r,i,o;function s(t){e[14](t)}let a={class:e[0],id:e[1],name:e[2],accept:"application/pdf",max:"1",beforeChange:e[10]};return void 0!==e[3]&&(a.files=e[3]),t=new e[5]({props:a}),ee.push((()=>$e(t,"files",s))),t.$on("change",e[8]),i=new e[6]({props:{inputClass:e[0],hidden:!0,id:e[1],name:e[1],value:e[4]}}),{c(){Ee(t.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,n){Ae(t,e,n),R(e,r,n),Ae(i,e,n),o=!0},p(e,r){const o={};1&r&&(o.class=e[0]),2&r&&(o.id=e[1]),4&r&&(o.name=e[2]),!n&&8&r&&(n=!0,o.files=e[3],le((()=>n=!1))),t.$set(o);const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.id=e[1]),2&r&&(s.name=e[1]),16&r&&(s.value=e[4]),i.$set(s)},i(e){o||(we(t.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(t.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){be(t,e),e&&D(r),be(i,e)}}}function bs(e){let t,n,r,i;n=new e[6]({props:{inputClass:e[0],readonly:!0,id:e[1],name:e[1],value:e[4]}});let o=e[4]&&Ss(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),z(t,"position","relative")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};1&r&&(i.inputClass=e[0]),2&r&&(i.id=e[1]),2&r&&(i.name=e[1]),16&r&&(i.value=e[4]),n.$set(i),e[4]?o?(o.p(e,r),16&r&&we(o,1)):(o=Ss(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function Ss(e){let t,n,r,i,o;return n=new De({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-o0hiko")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[9]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ts(e){let t,n,r,i;const o=[bs,As],s=[];return t=function(e){return e[7]?0:1}(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,[t]){n.p(e,t)},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}let Ns;function Rs(e,n,r){const{FileDropzone:i,TextField:o}=c,s=K();let{classId:a}=n,{eventId:l}=n,{record:d}=n,{item:u}=n,{id:h}=n,{name:f}=n,m=[],p=d[u.name]||"",g=!!d._id;const w={scale:{once:!1,value:1,start:1,step:.2,stop:1.6},resultOpts:{singleCodeInPage:!0,multiCodesInPage:!1,maxCodesInPage:1},improve:!0,jsQR:{}};var y=async function(e){if(!e.success)return;const n=await t.getSchema(l),i=e.codes?.filter((e=>!!e))?.at(0);if(!i?.length)return;if(!i.startsWith("SPC"))return;const o=Is(i);for(const e in o){if(n.items.find((t=>t.name===e))){if("object"==typeof o[e]){let n={};for(const i in o[e])if("object"==typeof o[e][i])for(const s in o[e][i]){o[e][i][s]&&(n[s]=o[e][i][s]);const a=await t.getSectionView(i,n);if(a?.length){const n=await t.getSectionView(e,{[i]:a[0]._id});n?.length&&r(11,d[e]=n[0]._id,d)}}else{o[e][i]&&(n[i]=o[e][i]);const s=await t.getSectionView(e,n);s?.length&&r(11,d[e]=s[0]._id,d)}}else o[e]&&r(11,d[e]=o[e],d);s("record",{itemName:e,value:d[e]})}}};return Y((()=>{if(Ns)return;let e=document.createElement("script");e.src="/QR/pdf-qr2.js",document.head.append(e),e.onload=function(){Ns=PDF_QR_JS}})),Z((()=>{})),e.$$set=e=>{"classId"in e&&r(0,a=e.classId),"eventId"in e&&r(12,l=e.eventId),"record"in e&&r(11,d=e.record),"item"in e&&r(13,u=e.item),"id"in e&&r(1,h=e.id),"name"in e&&r(2,f=e.name)},[a,h,f,m,p,i,o,g,async e=>{const n=m[0];if(!n){s("record",{itemName:"$file",value:!1});const e=await t.getSchema(l);for(const t of e.items)s("record",{itemName:t.name,value:""});return}const i=URL.createObjectURL(n);r(4,p=n.name),s("record",{itemName:"$file",value:{fileName:p,file:n}}),Ns.decodeDocument(i,w,y)},async()=>{if(!d?._id)return;const e=await t.getTaskByDocId(d._id,!0);if(!e)return;const n=await t.getUserReports(e._id);if(!n?.length)return;let r="/viewer/doc/index.html?file="+("/api/userreport/"+n[0]._id)+"&type=pdf";window.open(r,"","popup=yes toolbar=no width=800 height=1024")},()=>{r(3,m)},d,l,u,function(e){m=e,r(3,m)}]}class Ds extends Te{constructor(e){var t;super(),Es.getElementById("svelte-o0hiko-style")||((t=O("style")).id="svelte-o0hiko-style",t.textContent=".feather.svelte-o0hiko{position:absolute;top:0.75em;left:-1.25em;color:#4300b0}label.file-dropzone{margin-top:0 !important}",N(Es.head,t)),Se(this,e,Rs,Ts,A,{classId:0,eventId:12,record:11,item:13,id:1,name:2})}}const{document:ks}=Ie;function Os(e){let t,n,r,i,o;function s(t){e[18](t)}let a={class:e[0],id:e[1],name:e[2],accept:e[3],max:"1",beforeChange:e[12]};return void 0!==e[4]&&(a.files=e[4]),t=new e[7]({props:a}),ee.push((()=>$e(t,"files",s))),t.$on("change",e[9]),i=new e[8]({props:{inputClass:e[0],hidden:!0,id:e[1],name:e[1],value:e[5]}}),{c(){Ee(t.$$.fragment),r=B(),Ee(i.$$.fragment)},m(e,n){Ae(t,e,n),R(e,r,n),Ae(i,e,n),o=!0},p(e,r){const o={};1&r&&(o.class=e[0]),2&r&&(o.id=e[1]),4&r&&(o.name=e[2]),8&r&&(o.accept=e[3]),!n&&16&r&&(n=!0,o.files=e[4],le((()=>n=!1))),t.$set(o);const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.id=e[1]),2&r&&(s.name=e[1]),32&r&&(s.value=e[5]),i.$set(s)},i(e){o||(we(t.$$.fragment,e),we(i.$$.fragment,e),o=!0)},o(e){ye(t.$$.fragment,e),ye(i.$$.fragment,e),o=!1},d(e){be(t,e),e&&D(r),be(i,e)}}}function xs(e){let t,n,r,i;n=new e[8]({props:{inputClass:e[0],readonly:!0,id:e[1],name:e[1],value:e[5]}});let o=e[5]&&Ms(e);return{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o&&o.c(),z(t,"position","relative")},m(e,s){R(e,t,s),Ae(n,t,null),N(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};1&r&&(i.inputClass=e[0]),2&r&&(i.id=e[1]),2&r&&(i.name=e[1]),32&r&&(i.value=e[5]),n.$set(i),e[5]?o?(o.p(e,r),32&r&&we(o,1)):(o=Ms(e),o.c(),we(o,1),o.m(t,null)):o&&(pe(),ye(o,1,1,(()=>{o=null})),ge())},i(e){i||(we(n.$$.fragment,e),we(o),i=!0)},o(e){ye(n.$$.fragment,e),ye(o),i=!1},d(e){e&&D(t),be(n),o&&o.d()}}}function Ms(e){let t,n,r,i,o;const s=[Ps,Bs],a=[];function l(e,n){return 32&n&&(t=!!e[5].endsWith(".mp4")),t?0:1}return n=l(e,-1),r=a[n]=s[n](e),{c(){r.c(),i=P()},m(e,t){a[n].m(e,t),R(e,i,t),o=!0},p(e,t){let o=n;n=l(e,t),n===o?a[n].p(e,t):(pe(),ye(a[o],1,1,(()=>{a[o]=null})),ge(),r=a[n],r?r.p(e,t):(r=a[n]=s[n](e),r.c()),we(r,1),r.m(i.parentNode,i))},i(e){o||(we(r),o=!0)},o(e){ye(r),o=!1},d(e){a[n].d(e),e&&D(i)}}}function Bs(e){let t,n,r,i,o;return n=new De({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-o0hiko")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[10]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function Ps(e){let t,n={ctx:e,current:null,token:null,hasCatch:!1,pending:Vs,then:Fs,catch:Ls,value:23};return ve(e[11](),n),{c(){t=P(),n.block.c()},m(e,r){R(e,t,r),n.block.m(e,n.anchor=r),n.mount=()=>t.parentNode,n.anchor=t},p(t,r){_e(n,e=t,r)},i:_,o:_,d(e){e&&D(t),n.block.d(e),n.token=null,n=null}}}function Ls(e){return{c:_,m:_,p:_,d:_}}function Fs(e){let t,n,r,i;return{c(){t=O("video"),n=O("source"),i=M("\n Your browser does not support HTML video."),n.src!==(r=e[23])&&U(n,"src",r),U(n,"type","video/mp4"),U(t,"width","500"),t.controls=!0,z(t,"margin-top","1em")},m(e,r){R(e,t,r),N(t,n),N(t,i)},p:_,d(e){e&&D(t)}}}function Vs(e){return{c:_,m:_,p:_,d:_}}function Us(e){let t,n,r,i;const o=[xs,Os],s=[];function a(e,t){return e[6]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=P()},m(e,n){s[t].m(e,n),R(e,r,n),i=!0},p(e,[i]){let l=t;t=a(e),t===l?s[t].p(e,i):(pe(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),we(n,1),n.m(r.parentNode,r))},i(e){i||(we(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&D(r)}}}function Hs(e,n,r){const{FileDropzone:i,TextField:o}=c,s=K();let{classId:a}=n,{eventId:l}=n,{record:d}=n,{item:u}=n,{id:h}=n,{name:f}=n,{praefix:m}=n,{recordId:p}=n,{fileType:g="application/pdf"}=n,w=[],y="",v=!1;return Y((()=>{(async()=>{if(!p)return;const e=await t.getTaskByDocId(p,!0);if(!e)return s("listRecord",{itemName:"fileName",value:"",string:!0});const n=d[u.name];if(!n)return s("listRecord",{itemName:"fileName",value:"",string:!0});const i=await t.getUserReports(e._id);if(!i?.length)return s("listRecord",{itemName:"fileName",value:"",string:!0});let o=i.find((e=>e.fileName===n));if(!o)return s("listRecord",{itemName:"fileName",value:"",string:!0});r(5,y=o.fileName),r(6,v=void 0===m?!!p:!!y)})()})),Z((()=>{})),e.$$set=e=>{"classId"in e&&r(0,a=e.classId),"eventId"in e&&r(13,l=e.eventId),"record"in e&&r(14,d=e.record),"item"in e&&r(15,u=e.item),"id"in e&&r(1,h=e.id),"name"in e&&r(2,f=e.name),"praefix"in e&&r(16,m=e.praefix),"recordId"in e&&r(17,p=e.recordId),"fileType"in e&&r(3,g=e.fileType)},[a,h,f,g,w,y,v,i,o,async e=>{const t=w[0];URL.createObjectURL(t),r(5,y=t.name),s("record",{itemName:"$file",value:{fileName:y,file:t}}),void 0!==m&&s("listRecord",{itemName:"fileName",value:y,string:!0})},async()=>{if(!p)return;let e;const n=await t.getTaskByDocId(p,!0);if(!n)return;const r=await t.getUserReports(n._id);if(!r?.length)return;let i=r.find((e=>e.fileName===y));i||(i=r[0]);e="/viewer/doc/index.html?file="+("/api/userreport/"+i._id)+"&type=pdf",window.open(e,"","popup=yes toolbar=no width=800 height=1024")},async()=>{const e=await t.getTaskByDocId(p,!0);if(!e)return"";const n=await t.getUserReports(e._id);if(!n?.length)return"";let r=n.find((e=>e.fileName===y));return r||(r=n[0]),"/api/userreport/"+r._id},()=>{r(4,w)},l,d,u,m,p,function(e){w=e,r(4,w)}]}class Ws extends Te{constructor(e){var t;super(),ks.getElementById("svelte-o0hiko-style")||((t=O("style")).id="svelte-o0hiko-style",t.textContent=".feather.svelte-o0hiko{position:absolute;top:0.75em;left:-1.25em;color:#4300b0}label.file-dropzone{margin-top:0 !important}",N(ks.head,t)),Se(this,e,Hs,Us,A,{classId:0,eventId:13,record:14,item:15,id:1,name:2,praefix:16,recordId:17,fileType:3})}}function zs(e){let t,n,r;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:qs,placeholder:js,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=O("div"),Ee(n.$$.fragment),z(t,"max-width","4em")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p(e,[t]){const r={};4&t&&(r.inputClass=e[2]),1&t&&(r.id=e[0]),1&t&&(r.name=e[0]),2&t&&(r.value=e[1]),8&t&&(r.readonly=e[3]),16&t&&(r.disabled=e[4]),n.$set(r)},i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}const qs="([01][0-9]|2[0-3]):([0-5][0-9])",js="";function Gs(e,t,n){const r=K(),{TextField:i}=c;let{id:o}=t,{item:s}=t,{value:a}=t,{inputClass:l}=t,{readonly:d}=t,{disabled:u}=t,{praefix:h}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,o=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,a=e.value),"inputClass"in e&&n(2,l=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,h=e.praefix)},[o,a,l,d,u,i,({detail:e})=>{r("blur",{value:f(e.value)}),r("checkRange",{idx:h,fieldId:o,value:e.value})},s,h]}class Xs extends Te{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=O("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",N(document.head,t)),Se(this,e,Gs,zs,A,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:Ys}=Ie;function Zs(e,t,n){const r=e.slice();return r[20]=t[n],r}function Ks(e,t,n){const r=e.slice();return r[23]=t[n],r[25]=n,r}function Qs(e){let t,n,r=e[2](e[20],e[23])+"",i=e[25]&&function(){let e;return{c(){e=M(", ")},m(t,n){R(t,e,n)},d(t){t&&D(e)}}}();return{c(){t=O("span"),i&&i.c(),n=M(r),U(t,"class","lookupValue")},m(e,r){R(e,t,r),i&&i.m(t,null),N(t,n)},p(e,t){3&t&&r!==(r=e[2](e[20],e[23])+"")&&H(n,r)},d(e){e&&D(t),i&&i.d()}}}function Js(e){let t,n,r,i,o,s,a,l,c=e[0],d=[];for(let t=0;t<c.length;t+=1)d[t]=Qs(Ks(e,c,t));return i=new it({props:{size:"18"}}),{c(){t=O("div");for(let e=0;e<d.length;e+=1)d[e].c();n=B(),r=O("span"),Ee(i.$$.fragment),o=B(),U(r,"class","feather pointer svelte-1r8jgd4"),U(t,"class","lookupItem svelte-1r8jgd4")},m(c,u){R(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);N(t,n),N(t,r),Ae(i,r,null),N(t,o),s=!0,a||(l=L(r,"click",(function(){E(e[3](e[20]._id))&&e[3](e[20]._id).apply(this,arguments)})),a=!0)},p(r,i){if(e=r,7&i){let r;for(c=e[0],r=0;r<c.length;r+=1){const o=Ks(e,c,r);d[r]?d[r].p(o,i):(d[r]=Qs(o),d[r].c(),d[r].m(t,n))}for(;r<d.length;r+=1)d[r].d(1);d.length=c.length}},i(e){s||(we(i.$$.fragment,e),s=!0)},o(e){ye(i.$$.fragment,e),s=!1},d(e){e&&D(t),k(d,e),be(i),a=!1,l()}}}function ea(e){let t,n,r=e[1],i=[];for(let t=0;t<r.length;t+=1)i[t]=Js(Zs(e,r,t));const o=e=>ye(i[e],1,1,(()=>{i[e]=null}));return{c(){t=O("div");for(let e=0;e<i.length;e+=1)i[e].c();U(t,"class","lookup svelte-1r8jgd4")},m(e,r){R(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);n=!0},p(e,[n]){if(15&n){let s;for(r=e[1],s=0;s<r.length;s+=1){const o=Zs(e,r,s);i[s]?(i[s].p(o,n),we(i[s],1)):(i[s]=Js(o),i[s].c(),we(i[s],1),i[s].m(t,null))}for(pe(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)we(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ye(i[e]);n=!1},d(e){e&&D(t),k(i,e)}}}function ta(e,n,r){let{id:i}=n,{item:o}=n,{praefix:s}=n,{record:a}=n,{notifyList:l}=n;const{refItem:c,view:d,beforeSave:u,_state:h}=o.properties;let f=d.split(","),[p,g]=c.split(":"),w=[];const[y,v]=g.split("."),_=(e,t)=>{const[n,r]=t.split(".");return r?e[n][r]:""},I=(e=!0)=>{se().then((()=>{const t=document.querySelector("div.form-field."+o.name);if(t&&(t.style.display=e?"none":"flex"),!e&&u){const e=t.querySelector("div label");e&&(e.style.color="red")}}))};return Y(I),e.$$set=e=>{"id"in e&&r(4,i=e.id),"item"in e&&r(5,o=e.item),"praefix"in e&&r(6,s=e.praefix),"record"in e&&r(7,a=e.record),"notifyList"in e&&r(8,l=e.notifyList)},e.$$.update=()=>{256&e.$$.dirty&&(async e=>{const{itemName:n,value:i}=e||{};if(n!==p)return;if(r(1,w=[]),!i)return;if(!!u==!!a._id)return I();if(!a._id&&!a[p])return I();const o=!f.some((e=>e.includes(":"))),s=v?v+"."+p:p;let l={[s]:a[p]||a._id};if(h&&(l=[{$match:l},{$addFields:{_ids:{$toString:"$_id"}}},{$lookup:{from:"_task",localField:"_ids",foreignField:"docId",as:"_task"}},{$unwind:{path:"$_task",preserveNullAndEmptyArrays:!0}},{$match:{"_task.status":h}}]),r(1,w=await t.getSectionView(y,l,o)),!o&&w.length){const e=f.find((e=>e.includes(":"))).split(":")[0];r(1,w=w.map((t=>{const n=t[e].find((t=>t[e]===a._id));return n._id=t._id,n}))),r(0,f=f.map((e=>e.split(":")[1])))}I(!w.length)})(l)},[f,w,(e,t)=>"boolean"===o.type?e[t]?"ja":"nein":"object"===o.type?"(ja)":e["_"+t]||m(e[t])||e[t]||_(e,t),e=>async()=>{const n=await t.getTaskByDocId(e,!0);if(!n)return;const r=n._id,i=`/task/${n.event}/${r}/task?view=standalone`;window.open(i)},i,o,s,a,l]}class na extends Te{constructor(e){var t;super(),Ys.getElementById("svelte-1r8jgd4-style")||((t=O("style")).id="svelte-1r8jgd4-style",t.textContent=".feather.svelte-1r8jgd4{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1r8jgd4{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1r8jgd4{position:relative;margin-left:2em;padding-bottom:0.75em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}div.field:has(div.lookup){margin-bottom:0.25em !important}",N(Ys.head,t)),Se(this,e,ta,ea,A,{id:4,item:5,praefix:6,record:7,notifyList:8})}}function ra(e){let t,n,r;return n=new dt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function ia(e){let t,n,r,i,o;return n=new dt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[9]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function oa(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[10]);const a=[ia,ra],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}function sa(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e=h;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){Q(e,t)}]}class aa extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,sa,oa,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function la(e){let t,n,r;return n=new Ct({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function ca(e){let t,n,r,i,o;return n=new Ct({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[11]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function da(e){let t,n,r,i,o,s;n=new e[10]({props:{inputClass:e[2],pattern:e[0],placeholder:e[1],disabled:e[3],formnovalidate:e[4],readonly:e[5],required:e[6],id:e[7],name:e[8],value:e[9]}}),n.$on("change",e[12]);const a=[ca,la],l=[];function c(e,t){return e[9]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};4&r&&(s.inputClass=e[2]),1&r&&(s.pattern=e[0]),2&r&&(s.placeholder=e[1]),8&r&&(s.disabled=e[3]),16&r&&(s.formnovalidate=e[4]),32&r&&(s.readonly=e[5]),64&r&&(s.required=e[6]),128&r&&(s.id=e[7]),256&r&&(s.name=e[8]),512&r&&(s.value=e[9]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}function ua(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{pattern:f}=t,{placeholder:m}=t;f||="(\\+(9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1))?\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*\\d\\W*(\\d{1,2})$",m||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,i=e.inputClass),"disabled"in e&&n(3,o=e.disabled),"formnovalidate"in e&&n(4,s=e.formnovalidate),"readonly"in e&&n(5,a=e.readonly),"required"in e&&n(6,l=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,h=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,m=e.placeholder)},[f,m,i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e="tel:"+h;window.open(e,"_self")},function(t){Q(e,t)}]}class ha extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,ua,da,A,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function fa(e){let t,n,r;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather2 svelte-9up2nn")},m(e,i){R(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n)}}}function ma(e){let t,n,r,i,o;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ee(n.$$.fragment),U(t,"class","feather pointer svelte-9up2nn")},m(s,a){R(s,t,a),Ae(n,t,null),r=!0,i||(o=L(t,"click",e[12]),i=!0)},p:_,i(e){r||(we(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&D(t),be(n),i=!1,o()}}}function pa(e){let t,n,r,i,o,s;n=new e[11]({props:{type:"email",inputClass:e[0],pattern:e[9],placeholder:e[10],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],multiple:e[8],value:e[7]}}),n.$on("change",e[13]);const a=[ma,fa],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ee(n.$$.fragment),r=B(),o.c(),z(t,"position","relative")},m(e,o){R(e,t,o),Ae(n,t,null),N(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),512&r&&(s.pattern=e[9]),1024&r&&(s.placeholder=e[10]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),256&r&&(s.multiple=e[8]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(pe(),ye(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),we(o,1),o.m(t,null))},i(e){s||(we(n.$$.fragment,e),we(o),s=!0)},o(e){ye(n.$$.fragment,e),ye(o),s=!1},d(e){e&&D(t),be(n),l[i].d()}}}function ga(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{multiple:f}=t,{pattern:m}=t,{placeholder:p}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"multiple"in e&&n(8,f=e.multiple),"pattern"in e&&n(9,m=e.pattern),"placeholder"in e&&n(10,p=e.placeholder)},[i,o,s,a,l,d,u,h,f,m,p,r,async()=>{if(!h)return;let e="mailto:"+h;window.open(e,"_self")},function(t){Q(e,t)}]}class wa extends Te{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",N(document.head,t)),Se(this,e,ga,pa,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,multiple:8,pattern:9,placeholder:10})}}const ya=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","CommentChange","CompositionEnd","CompositionStart","CompositionUpdate","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","Input","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"];function va(e){let t;return{c(){t=O("textarea"),U(t,"id",e[0]),z(t,"visibility","hidden")},m(n,r){R(n,t,r),e[20](t)},p(e,n){1&n&&U(t,"id",e[0])},d(n){n&&D(t),e[20](null)}}}function _a(e){let t;return{c(){t=O("div"),U(t,"id",e[0])},m(n,r){R(n,t,r),e[19](t)},p(e,n){1&n&&U(t,"id",e[0])},d(n){n&&D(t),e[19](null)}}}function Ia(e){let t;function n(e,t){return e[1]?_a:va}let r=n(e),i=r(e);return{c(){t=O("div"),i.c(),U(t,"class",e[2])},m(n,r){R(n,t,r),i.m(t,null),e[21](t)},p(e,[o]){r===(r=n(e))&&i?i.p(e,o):(i.d(1),i=r(e),i&&(i.c(),i.m(t,null))),4&o&&U(t,"class",e[2])},i:_,o:_,d(n){n&&D(t),i.d(),e[21](null)}}}const Ca=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let $a=(()=>{let e={listeners:[],scriptId:Ca("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,r)=>{e.scriptLoaded?r():(e.listeners.push(r),e.injected||((t,n,r,i)=>{e.injected=!0;const o=n.createElement("script");o.referrerPolicy="origin",o.type="application/javascript",o.src=r,o.onload=()=>{i()},n.head&&n.head.appendChild(o)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function Ea(e,t,n){let r,i,o,{id:s=Ca("tinymce-svelte")}=t,{inline:a}=t,{disabled:l=!1}=t,{readonly:c=!1}=t,{apiKey:d="no-api-key"}=t,{licenseKey:u}=t,{channel:h="7"}=t,{scriptSrc:f}=t,{conf:m={}}=t,{modelEvents:p="change input undo redo"}=t,{value:g=""}=t,{text:w=""}=t,{cssClass:y="tinymce-wrapper"}=t,v=g,_=l,I=c;const C=(e,t)=>{var n;"function"==typeof(null===(n=e.mode)||void 0===n?void 0:n.set)&&e.mode.set(t?"readonly":"design")},$=(e,t)=>{(e=>"function"==typeof e.options.set&&e.options.isRegistered("disabled"))(e)?e.options.set("disabled",t):e.mode.set(t?"readonly":"design")},E=K(),A=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},b=()=>{var e;const t=Object.assign(Object.assign({},m),{target:i,inline:void 0!==a?a:void 0!==m.inline&&m.inline,license_key:u,setup:e=>{e.on("PreInit",(()=>{$(e,l),C(e,c)})),n(15,o=e),e.on("init",(()=>{e.setContent(g),e.on(p,(()=>{n(16,v=e.getContent()),v!==g&&(n(5,g=v),n(6,w=e.getContent({format:"text"})))}))})),((e,t)=>{ya.forEach((n=>{e.on(n,(r=>{t(n.toLowerCase(),{eventName:n,event:r,editor:e})}))}))})(e,E),"function"==typeof m.setup&&m.setup(e)}});n(4,i.style.visibility="",i),null===(e=A())||void 0===e||e.init(t)};return Y((()=>{if(null!==A())b();else{const e=f||`https://cdn.tiny.cloud/1/${d}/tinymce/${h}/tinymce.min.js`;$a.load(r.ownerDocument,e,(()=>{b()}))}})),Z((()=>{var e;o&&(null===(e=A())||void 0===e||e.remove(o))})),e.$$set=e=>{"id"in e&&n(0,s=e.id),"inline"in e&&n(1,a=e.inline),"disabled"in e&&n(7,l=e.disabled),"readonly"in e&&n(8,c=e.readonly),"apiKey"in e&&n(9,d=e.apiKey),"licenseKey"in e&&n(10,u=e.licenseKey),"channel"in e&&n(11,h=e.channel),"scriptSrc"in e&&n(12,f=e.scriptSrc),"conf"in e&&n(13,m=e.conf),"modelEvents"in e&&n(14,p=e.modelEvents),"value"in e&&n(5,g=e.value),"text"in e&&n(6,w=e.text),"cssClass"in e&&n(2,y=e.cssClass)},e.$$.update=()=>{491936&e.$$.dirty&&(o&&v!==g&&(o.setContent(g),n(6,w=o.getContent({format:"text"}))),o&&c!==I&&(n(18,I=c),C(o,c)),o&&l!==_&&(n(17,_=l),$(o,l)))},[s,a,y,r,i,g,w,l,c,d,u,h,f,m,p,o,v,_,I,function(e){ee[e?"unshift":"push"]((()=>{i=e,n(4,i)}))},function(e){ee[e?"unshift":"push"]((()=>{i=e,n(4,i)}))},function(e){ee[e?"unshift":"push"]((()=>{r=e,n(3,r)}))}]}class Aa extends Te{constructor(e){super(),Se(this,e,Ea,Ia,A,{id:0,inline:1,disabled:7,readonly:8,apiKey:9,licenseKey:10,channel:11,scriptSrc:12,conf:13,modelEvents:14,value:5,text:6,cssClass:2})}}function ba(e){let t,n,r,i,o,s,a;function l(t){e[9](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",licenseKey:"gpl",conf:e[7],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new Aa({props:c}),ee.push((()=>$e(n,"value",l))),{c(){t=O("div"),Ee(n.$$.fragment),i=B(),o=O("input"),U(o,"class",s=e[1]||e[2]),U(o,"id",e[3]),U(o,"name",e[3]),o.value=e[0],o.hidden=!0,z(t,"min-height","10em"),z(t,"margin-top","-1em")},m(e,r){R(e,t,r),Ae(n,t,null),N(t,i),N(t,o),a=!0},p(e,t){const i={};16&t&&(i.disabled=e[4]),32&t&&(i.readonly=e[5]),!r&&1&t&&(r=!0,i.value=e[0],le((()=>r=!1))),n.$set(i),(!a||6&t&&s!==(s=e[1]||e[2]))&&U(o,"class",s),(!a||8&t)&&U(o,"id",e[3]),(!a||8&t)&&U(o,"name",e[3]),(!a||1&t&&o.value!==e[0])&&(o.value=e[0])},i(e){a||(we(n.$$.fragment,e),a=!0)},o(e){ye(n.$$.fragment,e),a=!1},d(e){e&&D(t),be(n)}}}function Sa(e){let t,n,r=e[6]&&ba(e);return{c(){r&&r.c(),t=P()},m(e,i){r&&r.m(e,i),R(e,t,i),n=!0},p(e,[n]){e[6]?r?(r.p(e,n),64&n&&we(r,1)):(r=ba(e),r.c(),we(r,1),r.m(t.parentNode,t)):r&&(pe(),ye(r,1,1,(()=>{r=null})),ge())},i(e){n||(we(r),n=!0)},o(e){ye(r),n=!1},d(e){r&&r.d(e),e&&D(t)}}}function Ta(e,t,r){const i=K();let o=JSON.parse(n.getItem("Locale")).id;o=o.startsWith("fr")?"fr_FR":o.split("-")[0];let s,{value:a=""}=t,{noForm:l}=t,{classId:c}=t,{id:d}=t,{record:u}=t,{disabled:h}=t,{readonly:f}=t;const m=(e,t)=>{if(!s)return;if(!e)return;if(!e.includes("{{"))return;const n=t.employee;if(n)try{fh("employee",n).then((t=>{if(!t)return;const n=e.replace("{{employee.firstName}}",t.firstName).replace("{{employee.lastName}}",t.lastName);i("blur",{value:n})}))}catch(e){}},p={plugins:"advlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:o};return Y((()=>setTimeout((()=>{r(6,s=!0),m(a,u)}),300))),e.$$set=e=>{"value"in e&&r(0,a=e.value),"noForm"in e&&r(1,l=e.noForm),"classId"in e&&r(2,c=e.classId),"id"in e&&r(3,d=e.id),"record"in e&&r(8,u=e.record),"disabled"in e&&r(4,h=e.disabled),"readonly"in e&&r(5,f=e.readonly)},e.$$.update=()=>{257&e.$$.dirty&&(a||u)&&m(a,u)},[a,l,c,d,h,f,s,p,u,function(e){a=e,r(0,a)}]}class Na extends Te{constructor(e){var t;super(),document.getElementById("svelte-yi7lpi-style")||((t=O("style")).id="svelte-yi7lpi-style",t.textContent="div.tox-statusbar__text-container, div.tox-promotion{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",N(document.head,t)),Se(this,e,Ta,Sa,A,{value:0,noForm:1,classId:2,id:3,record:8,disabled:4,readonly:5})}}
|
|
2
2
|
/*!
|
|
3
3
|
* Signature Pad v5.0.7 | https://github.com/szimek/signature_pad
|
|
4
4
|
* (c) 2025 Szymon Nowak | Released under the MIT license
|