@enablerr-ui/detail 0.2.334 → 0.2.336
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,r,i,l,s,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.Storage,r=e.TextArea,i=e.toasts,l=e.settings,s=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.334");const d=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(" · "))),u=e=>{try{return new Date(e).toLocaleString()}catch{return e}},m=e=>e?"(ja)":"(nein)",f=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[r,i]=o.split(".");if(e.list?.find((({name:e})=>e===r))&&i&&void 0!==n[r]){const e=`${r}_${i}`;n[e]=n[r][i],r=e}return t.find((e=>e===r))||t.push(r),t}),[]).map((e=>"boolean"==typeof n[e]?m(n[e]):d(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&m(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function p(){}function $(e){return e()}function h(){return Object.create(null)}function g(e){e.forEach($)}function v(e){return"function"==typeof e}function b(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function w(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return p;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function y(e){return null==e?"":e}function x(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function I(e){e.parentNode.removeChild(e)}function F(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function N(e){return document.createElement(e)}function j(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function _(e){return document.createTextNode(e)}function q(){return _(" ")}function C(){return _("")}function S(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function L(e){return function(t){return t.preventDefault(),e.call(this,t)}}function E(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function z(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function T(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function D(e,t){e.value=null==t?"":t}function O(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function B(e,t,n){e.classList[n?"add":"remove"](t)}let M;function A(e){M=e}function V(){if(!M)throw new Error("Function called outside component initialization");return M}function P(e){V().$$.on_mount.push(e)}function W(){const e=V();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,r)}))}}}function R(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const H=[],Y=[],G=[],J=[],U=Promise.resolve();let Z=!1;function Q(){Z||(Z=!0,U.then(oe))}function K(){return Q(),U}function X(e){G.push(e)}function ee(e){J.push(e)}let te=!1;const ne=new Set;function oe(){if(!te){te=!0;do{for(let e=0;e<H.length;e+=1){const t=H[e];A(t),re(t.$$)}for(A(null),H.length=0;Y.length;)Y.pop()();for(let e=0;e<G.length;e+=1){const t=G[e];ne.has(t)||(ne.add(t),t())}G.length=0}while(H.length);for(;J.length;)J.pop()();Z=!1,te=!1,ne.clear()}}function re(e){if(null!==e.fragment){e.update(),g(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(X)}}const ie=new Set;let le;function se(){le={r:0,c:[],p:le}}function ae(){le.r||g(le.c),le=le.p}function ce(e,t){e&&e.i&&(ie.delete(e),e.i(t))}function de(e,t,n,o){if(e&&e.o){if(ie.has(e))return;ie.add(e),le&&le.c.push((()=>{ie.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ue(e,t){const n=t.token={};function o(e,o,r,i){if(t.token!==n)return;t.resolved=i;let l=t.ctx;void 0!==r&&(l=l.slice(),l[r]=i);const s=e&&(t.current=e)(l);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(se(),de(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ae())})):t.block.d(1),s.c(),ce(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[o]=s),a&&oe()}if((r=e)&&"object"==typeof r&&"function"==typeof r.then){const n=V();if(e.then((e=>{A(n),o(t.then,1,t.value,e),A(null)}),(e=>{if(A(n),o(t.catch,2,t.error,e),A(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var r}function me(e,t,n){const o=t.slice(),{resolved:r}=e;e.current===e.then&&(o[e.value]=r),e.current===e.catch&&(o[e.error]=r),e.block.p(o,n)}const fe="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function pe(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function $e(e){e&&e.c()}function he(e,t,n,o){const{fragment:r,on_mount:i,on_destroy:l,after_update:s}=e.$$;r&&r.m(t,n),o||X((()=>{const t=i.map($).filter(v);l?l.push(...t):g(t),e.$$.on_mount=[]})),s.forEach(X)}function ge(e,t){const n=e.$$;null!==n.fragment&&(g(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ve(e,t,n,o,r,i,l=[-1]){const s=M;A(e);const a=e.$$={fragment:null,ctx:null,props:i,update:p,not_equal:r,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:h(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=i)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](i),c&&function(e,t){-1===e.$$.dirty[0]&&(H.push(e),Q(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,g(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(I)}else a.fragment&&a.fragment.c();t.intro&&ce(e.$$.fragment),he(e,t.target,t.anchor,t.customElement),oe()}A(s)}class be{$destroy(){ge(this,1),this.$destroy=p}$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 we(e){let t,n,o,r,i;return{c(){t=j("svg"),n=j("circle"),o=j("polyline"),r=j("line"),z(n,"cx","12"),z(n,"cy","12"),z(n,"r","10"),z(o,"points","8 12 12 16 16 12"),z(r,"x1","12"),z(r,"y1","8"),z(r,"x2","12"),z(r,"y2","16"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-arrow-down-circle "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-arrow-down-circle "+e[2])&&z(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function ye(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class xe extends be{constructor(e){super(),ve(this,e,ye,we,b,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,r;return{c(){t=j("svg"),n=j("path"),o=j("polyline"),z(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),z(o,"points","22 4 12 14.01 9 11.01"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",r="feather feather-check-circle "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-check-circle "+e[2])&&z(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Ie(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Fe extends be{constructor(e){super(),ve(this,e,Ie,ke,b,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,o;return{c(){t=j("svg"),n=j("path"),z(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"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",o="feather feather-command "+e[2])},m(e,o){k(e,t,o),x(t,n)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&z(t,"class",o)},i:p,o:p,d(e){e&&I(t)}}}function je(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class _e extends be{constructor(e){super(),ve(this,e,je,Ne,b,{size:0,strokeWidth:1,class:2})}}function qe(e){let t,n,o,r;return{c(){t=j("svg"),n=j("polyline"),o=j("path"),z(n,"points","9 10 4 15 9 20"),z(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",r="feather feather-corner-down-left "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-corner-down-left "+e[2])&&z(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Ce(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Se extends be{constructor(e){super(),ve(this,e,Ce,qe,b,{size:0,strokeWidth:1,class:2})}}function Le(e){let t,n,o,r,i;return{c(){t=j("svg"),n=j("path"),o=j("line"),r=j("line"),z(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),z(o,"x1","18"),z(o,"y1","9"),z(o,"x2","12"),z(o,"y2","15"),z(r,"x1","12"),z(r,"y1","9"),z(r,"x2","18"),z(r,"y2","15"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-delete "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-delete "+e[2])&&z(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function Ee(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class ze extends be{constructor(e){super(),ve(this,e,Ee,Le,b,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,o,r,i;return{c(){t=j("svg"),n=j("path"),o=j("polyline"),r=j("line"),z(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),z(o,"points","15 3 21 3 21 9"),z(r,"x1","10"),z(r,"y1","14"),z(r,"x2","21"),z(r,"y2","3"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-external-link "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-external-link "+e[2])&&z(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function De(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Oe extends be{constructor(e){super(),ve(this,e,De,Te,b,{size:0,strokeWidth:1,class:2})}}function Be(e){let t,n,o,r;return{c(){t=j("svg"),n=j("circle"),o=j("line"),z(n,"cx","11"),z(n,"cy","11"),z(n,"r","8"),z(o,"x1","21"),z(o,"y1","21"),z(o,"x2","16.65"),z(o,"y2","16.65"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",r="feather feather-search "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-search "+e[2])&&z(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Me(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ae extends be{constructor(e){super(),ve(this,e,Me,Be,b,{size:0,strokeWidth:1,class:2})}}const{document:Ve}=fe;function Pe(e){e[25]=e[27].list,e[26]=e[27].items}function We(e,t,n){const o=e.slice();return o[28]=t[n],o}function Re(e,t,n){const o=e.slice();return o[31]=t[n],o}function He(e,t,n){const o=e.slice();return o[31]=t[n],o}function Ye(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ge(e){let t,n,o,r,i,l;Pe(e);let s=e[25]?.length&&Je(e),a=e[26]?.length&&Ue(e),c=e[25]?.length&&Ke(e);return{c(){s&&s.c(),t=q(),n=N("div"),o=N("table"),a&&a.c(),r=q(),i=N("tbody"),c&&c.c(),z(o,"striped",""),z(o,"class","svelte-btngop"),z(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),k(e,t,d),k(e,n,d),x(n,o),a&&a.m(o,null),x(o,r),x(o,i),c&&c.m(i,null),l=!0},p(e,n){Pe(e),e[25]?.length?s?(s.p(e,n),4&n[0]&&ce(s,1)):(s=Je(e),s.c(),ce(s,1),s.m(t.parentNode,t)):s&&(se(),de(s,1,1,(()=>{s=null})),ae()),e[26]?.length?a?a.p(e,n):(a=Ue(e),a.c(),a.m(o,r)):a&&(a.d(1),a=null),e[25]?.length?c?(c.p(e,n),4&n[0]&&ce(c,1)):(c=Ke(e),c.c(),ce(c,1),c.m(i,null)):c&&(se(),de(c,1,1,(()=>{c=null})),ae())},i(e){l||(ce(s),ce(c),l=!0)},o(e){de(s),de(c),l=!1},d(e){s&&s.d(e),e&&I(t),e&&I(n),a&&a.d(),c&&c.d()}}}function Je(e){let t,n,o,r,i,l,s,a,c,d;function u(t){e[19](t)}let m={id:e[6]};return void 0!==e[3]&&(m.value=e[3]),o=new e[5]({props:m}),Y.push((()=>pe(o,"value",u))),o.$on("input",e[10]),s=new ze({props:{size:"18"}}),{c(){t=N("div"),n=_("Suchen: "),$e(o.$$.fragment),i=q(),l=N("span"),$e(s.$$.fragment),z(l,"class","feather pointer svelte-btngop"),O(t,"margin-bottom","1em"),O(t,"position","relative")},m(r,u){k(r,t,u),x(t,n),he(o,t,null),x(t,i),x(t,l),he(s,l,null),a=!0,c||(d=S(l,"click",e[13]),c=!0)},p(e,t){const n={};!r&&8&t[0]&&(r=!0,n.value=e[3],ee((()=>r=!1))),o.$set(n)},i(e){a||(ce(o.$$.fragment,e),ce(s.$$.fragment,e),a=!0)},o(e){de(o.$$.fragment,e),de(s.$$.fragment,e),a=!1},d(e){e&&I(t),ge(o),ge(s),c=!1,d()}}}function Ue(e){let t,n,o,r=e[0]&&Ze(),i=e[26],l=[];for(let t=0;t<i.length;t+=1)l[t]=Qe(He(e,i,t));return{c(){t=N("thead"),n=N("tr"),r&&r.c(),o=q();for(let e=0;e<l.length;e+=1)l[e].c();z(n,"class","svelte-btngop"),z(t,"class","svelte-btngop")},m(e,i){k(e,t,i),x(t,n),r&&r.m(n,null),x(n,o);for(let e=0;e<l.length;e+=1)l[e].m(n,null)},p(e,t){if(e[0]?r||(r=Ze(),r.c(),r.m(n,o)):r&&(r.d(1),r=null),516&t[0]){let o;for(i=e[26],o=0;o<i.length;o+=1){const r=He(e,i,o);l[o]?l[o].p(r,t):(l[o]=Qe(r),l[o].c(),l[o].m(n,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=i.length}},d(e){e&&I(t),r&&r.d(),F(l,e)}}}function Ze(e){let t;return{c(){t=N("th"),z(t,"class","svelte-btngop")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Qe(e){let t,n,o=e[31]?.designation+"";return{c(){t=N("th"),n=_(o),z(t,"class","svelte-btngop")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t[0]&&o!==(o=e[31]?.designation+"")&&T(n,o)},d(e){e&&I(t)}}}function Ke(e){let t,n,o=e[25],r=[];for(let t=0;t<o.length;t+=1)r[t]=nt(We(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(7055&n[0]){let l;for(o=e[25],l=0;l<o.length;l+=1){const i=We(e,o,l);r[l]?(r[l].p(i,n),ce(r[l],1)):(r[l]=nt(i),r[l].c(),ce(r[l],1),r[l].m(t.parentNode,t))}for(se(),l=o.length;l<r.length;l+=1)i(l);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function Xe(e){let t,n,o,r,i=e[0]&&et(e),l=e[26],s=[];for(let t=0;t<l.length;t+=1)s[t]=tt(Re(e,l,t));return{c(){t=N("tr"),i&&i.c(),n=q();for(let e=0;e<s.length;e+=1)s[e].c();o=q(),z(t,"class","pointer svelte-btngop"),B(t,"active",e[28]._id===e[1])},m(e,l){k(e,t,l),i&&i.m(t,null),x(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);x(t,o),r=!0},p(e,r){if(e[0]?i?(i.p(e,r),1&r[0]&&ce(i,1)):(i=et(e),i.c(),ce(i,1),i.m(t,n)):i&&(se(),de(i,1,1,(()=>{i=null})),ae()),900&r[0]){let n;for(l=e[26],n=0;n<l.length;n+=1){const i=Re(e,l,n);s[n]?s[n].p(i,r):(s[n]=tt(i),s[n].c(),s[n].m(t,o))}for(;n<s.length;n+=1)s[n].d(1);s.length=l.length}518&r[0]&&B(t,"active",e[28]._id===e[1])},i(e){r||(ce(i),r=!0)},o(e){de(i),r=!1},d(e){e&&I(t),i&&i.d(),F(s,e)}}}function et(e){let t,n,o,r,i;return o=new Oe({props:{size:"18"}}),{c(){t=N("td"),n=N("a"),$e(o.$$.fragment),z(n,"href",r=e[12](e[28])),z(n,"target","_blank"),z(t,"class","editRow svelte-btngop")},m(e,r){k(e,t,r),x(t,n),he(o,n,null),i=!0},p(e,t){(!i||4&t[0]&&r!==(r=e[12](e[28])))&&z(n,"href",r)},i(e){i||(ce(o.$$.fragment,e),i=!0)},o(e){de(o.$$.fragment,e),i=!1},d(e){e&&I(t),ge(o)}}}function tt(e){let t,n,o,r,i=e[7](e[28],e[31])+"";return{c(){t=N("td"),n=_(i),z(t,"class","svelte-btngop")},m(i,l){k(i,t,l),x(t,n),o||(r=S(t,"click",E((function(){v(e[8](e[28]))&&e[8](e[28]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&i!==(i=e[7](e[28],e[31])+"")&&T(n,i)},d(e){e&&I(t),o=!1,r()}}}function nt(e){let t,n,o=e[11](e[28],e[26],e[3]),r=o&&Xe(e);return{c(){r&&r.c(),t=C()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[11](e[28],e[26],e[3])),o?r?(r.p(e,n),12&n[0]&&ce(r,1)):(r=Xe(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(se(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function ot(e){let t,n;return t=new e[4]({}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function rt(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ot,then:Ge,catch:Ye,value:27,blocks:[,,,]};return ue(n=e[2]&&e[9](),r),{c(){t=C(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[2]&&e[9]())&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function it(e,o,r){const i=W(),{Loading:l,TextField:s}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:f=!1}=o,{showEdit:p=!1}=o,{praefix:$=""}=o,{selectionFields:h=!1}=o,{deList:g}=o,v=!0,b="",w=a+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?m(n):d(e[`_${t.name}`]||e[t.name]||"")},x=t.getSchemaByClass(a),k=async(e,t,n,o)=>{const{value:r,refClass:i}=o,[l,s]=n.split("."),a=r?.get($),c=a&&await qi(l,a);if(!c)return e;const d=c[s];return d?.length?d.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return ji(i+o._id.toString(),o),o})):e};P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(w)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await x;e.eventId===t.id&&(Ci(t.class,e.eventId),r(2,v=!r(2,v=!1)))}));return e.$$set=e=>{"className"in e&&r(14,a=e.className),"rowId"in e&&r(1,u=e.rowId),"filterForReady"in e&&r(15,f=e.filterForReady),"showEdit"in e&&r(0,p=e.showEdit),"praefix"in e&&r(16,$=e.praefix),"selectionFields"in e&&r(17,h=e.selectionFields),"deList"in e&&r(18,g=e.deList)},[p,u,v,b,l,s,w,y,e=>()=>i("choose",{row:e}),async()=>{const e=await x;let n,o,l=n=await Fi(e.class,e.id),s=!1,a="";const c=h&&h?.find((t=>e.class===t.refClass.split(":")[0])),d=c?.value?.get&&c.value.get($);if(d){const[n,r]=c.refClass.split(":");e.class===n&&(l=await k(l,n,r,c)),s=c.parentClass?.find((e=>"quantity"===e.name)),a=c.className,o=await t.getCountedSection(a,r.split(".")[0],d,n,"quantity")}r(0,p&&=!c),!c&&f&&(l=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(l,e));let u=[],m=e.display;return m&&m.length?m.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,l=l.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),u.find((e=>e?.name===n))||u.push(r)})):u=e.items,!p&&s?(u=u.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),l=l.map((e=>{const t=o.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e})),o.map((e=>{if(!l.find((t=>t._id===e._id))){const t=n.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,l.push(t)}})),i("init",l)):g&&(l=l.filter((e=>!g.find((t=>t._id===e._id))))),{list:l,items:u}},({detail:{value:e}})=>{r(3,b=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(y(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{r(3,b="")},a,f,$,h,g,function(e){b=e,r(3,b)}]}class lt extends be{constructor(e){var t;super(),Ve.getElementById("svelte-btngop-style")||((t=N("style")).id="svelte-btngop-style",t.textContent=".feather.svelte-btngop.svelte-btngop{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-btngop.svelte-btngop{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-btngop .editRow.svelte-btngop{width:1em}.eList.svelte-btngop table.svelte-btngop{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-btngop table thead.svelte-btngop{position:sticky;top:0;background:#326173;color:white}.eList.svelte-btngop table thead tr.svelte-btngop{height:2.3em}.eList.svelte-btngop table tbody tr.svelte-btngop{height:2.75em !important}th.svelte-btngop.svelte-btngop,td.svelte-btngop.svelte-btngop{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-btngop.svelte-btngop:hover{background-color:#DAE1E5}tr.active.svelte-btngop.svelte-btngop{color:#326173;background-color:#fcebd5}",x(Ve.head,t)),ve(this,e,it,rt,b,{className:14,rowId:1,filterForReady:15,showEdit:0,praefix:16,selectionFields:17,deList:18},[-1,-1])}}function st(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[3],required:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=N("div"),$e(n.$$.fragment),O(t,"position","relative"),O(t,"max-width","10em")},m(e,r){k(e,t,r),he(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),8&t&&(o.disabled=e[3]),16&t&&(o.required=e[4]),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n)}}}function at(e,t,n){let r;const i=W(),{TextField:l}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(o.getItem("Locale")),h=Number("1.1").toLocaleString($.id).substring(1,2),{properties:g={}}=a;let{min:v,max:b,step:w,pattern:y,decimals:x=0,unit:k="",placeholder:I,hint:F,readonly:N,negative:j,required:_=!1}=g;y||(y=x?`[0-9]+([${h}][0-9]{1,${x}})?`:"[0-9]*"),j&&(y="-?"+y);return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(14,a=e.item),"value"in e&&n(15,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},e.$$.update=()=>{65552&e.$$.dirty&&n(4,_=_&&!p),32768&e.$$.dirty&&n(6,r=Number(d.toString().replace(h,".")).toFixed(x).toString().replace(".",h))},[s,u,m,f,_,y,r,l,$,w,I,N,({detail:e})=>i("blur",{value:e.value}),({detail:e})=>{N||Number(d.toString().replace(h,"."))||n(6,r="")},a,d,p]}class ct extends be{constructor(e){super(),ve(this,e,at,st,b,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:dt}=fe;function ut(e){e[29]=e[31].list,e[30]=e[31].items}function mt(e,t,n){const o=e.slice();return o[32]=t[n],o[34]=n,o}function ft(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function pt(e,t,n){const o=e.slice();return o[35]=t[n],o}function $t(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function ht(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,g,v,b,w;function y(t){e[27](t)}ut(e),n=new e[7]({props:{outline:!0,$$slots:{default:[gt]},$$scope:{ctx:e}}}),n.$on("click",e[26]),r=new e[7]({props:{disabled:!e[29].length,filled:!0,$$slots:{default:[vt]},$$scope:{ctx:e}}}),r.$on("click",e[16](e[29]));let j={id:e[10]};void 0!==e[1]&&(j.value=e[1]),a=new e[5]({props:j}),Y.push((()=>pe(a,"value",y))),a.$on("input",e[13]),m=new ze({props:{size:"18"}});let L=e[30]?.length&&function(e){let t,n,o,r,i,l;r=new Fe({props:{size:"20"}});let s=e[30],a=[];for(let t=0;t<s.length;t+=1)a[t]=bt(pt(e,s,t));return{c(){t=N("thead"),n=N("tr"),o=N("th"),$e(r.$$.fragment),i=q();for(let e=0;e<a.length;e+=1)a[e].c();z(o,"class","svelte-1m010ne"),z(n,"class","svelte-1m010ne"),z(t,"class","svelte-1m010ne")},m(e,s){k(e,t,s),x(t,n),x(n,o),he(r,o,null),x(n,i);for(let e=0;e<a.length;e+=1)a[e].m(n,null);l=!0},p(e,t){if(4096&t[0]){let o;for(s=e[30],o=0;o<s.length;o+=1){const r=pt(e,s,o);a[o]?a[o].p(r,t):(a[o]=bt(r),a[o].c(),a[o].m(n,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=s.length}},i(e){l||(ce(r.$$.fragment,e),l=!0)},o(e){de(r.$$.fragment,e),l=!1},d(e){e&&I(t),ge(r),F(a,e)}}}(e),E=e[29]?.length&&function(e){let t,n,o=e[29],r=[];for(let t=0;t<o.length;t+=1)r[t]=kt(mt(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(153607&n[0]){let l;for(o=e[29],l=0;l<o.length;l+=1){const i=mt(e,o,l);r[l]?(r[l].p(i,n),ce(r[l],1)):(r[l]=kt(i),r[l].c(),ce(r[l],1),r[l].m(t.parentNode,t))}for(se(),l=o.length;l<r.length;l+=1)i(l);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}(e);return{c(){t=N("div"),$e(n.$$.fragment),o=q(),$e(r.$$.fragment),i=q(),l=N("div"),s=_("Suchen: "),$e(a.$$.fragment),d=q(),u=N("span"),$e(m.$$.fragment),f=q(),p=N("div"),$=N("table"),L&&L.c(),h=q(),g=N("tbody"),E&&E.c(),z(t,"class","form--buttons svelte-1m010ne"),z(u,"class","feather pointer svelte-1m010ne"),O(l,"margin-bottom","1em"),O(l,"position","relative"),z($,"striped",""),z($,"class","svelte-1m010ne"),z(p,"class","eList svelte-1m010ne")},m(c,y){k(c,t,y),he(n,t,null),x(t,o),he(r,t,null),k(c,i,y),k(c,l,y),x(l,s),he(a,l,null),x(l,d),x(l,u),he(m,u,null),k(c,f,y),k(c,p,y),x(p,$),L&&L.m($,null),x($,h),x($,g),E&&E.m(g,null),v=!0,b||(w=S(u,"click",e[15]),b=!0)},p(e,t){ut(e);const o={};512&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i);const l={};!c&&2&t[0]&&(c=!0,l.value=e[1],ee((()=>c=!1))),a.$set(l),e[30]?.length&&L.p(e,t),e[29]?.length&&E.p(e,t)},i(e){v||(ce(n.$$.fragment,e),ce(r.$$.fragment,e),ce(a.$$.fragment,e),ce(m.$$.fragment,e),ce(L),ce(E),v=!0)},o(e){de(n.$$.fragment,e),de(r.$$.fragment,e),de(a.$$.fragment,e),de(m.$$.fragment,e),de(L),de(E),v=!1},d(e){e&&I(t),ge(n),ge(r),e&&I(i),e&&I(l),ge(a),ge(m),e&&I(f),e&&I(p),L&&L.d(),E&&E.d(),b=!1,w()}}}function gt(e){let t;return{c(){t=_("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function vt(e){let t;return{c(){t=_("Bestätigen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function bt(e){let t,n,o=e[35]+"";return{c(){t=N("th"),n=_(o),z(t,"class","svelte-1m010ne")},m(e,o){k(e,t,o),x(t,n)},p:p,d(e){e&&I(t)}}}function wt(e){let t,n,o,r,i,l,s=e[0],a=yt(e),c=e[30],d=[];for(let t=0;t<c.length;t+=1)d[t]=xt(ft(e,c,t));return{c(){t=N("tr"),a.c(),n=q();for(let e=0;e<d.length;e+=1)d[e].c();o=q(),O(t,"cursor","zoom-in"),z(t,"title","übernimmt den Wert direkt"),z(t,"class","svelte-1m010ne"),B(t,"active",e[0].includes(e[32]))},m(s,c){k(s,t,c),a.m(t,null),x(t,n);for(let e=0;e<d.length;e+=1)d[e].m(t,null);x(t,o),r=!0,i||(l=S(t,"click",e[17](e[32])),i=!0)},p(r,i){if(e=r,1&i[0]&&b(s,s=e[0])?(se(),de(a,1,1,p),ae(),a=yt(e),a.c(),ce(a),a.m(t,n)):a.p(e,i),4100&i[0]){let n;for(c=e[30],n=0;n<c.length;n+=1){const r=ft(e,c,n);d[n]?d[n].p(r,i):(d[n]=xt(r),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}4097&i[0]&&B(t,"active",e[0].includes(e[32]))},i(e){r||(ce(a),r=!0)},o(e){de(a),r=!1},d(e){e&&I(t),a.d(e),F(d,e),i=!1,l()}}}function yt(e){let t,n,o;return n=new e[9]({props:{name:e[11],data:e[34],checked:e[0].includes(e[32]),round:!0}}),{c(){t=N("td"),$e(n.$$.fragment),z(t,"title","Wählt den Wert aus"),z(t,"class","svelte-1m010ne")},m(e,r){k(e,t,r),he(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[32])),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n)}}}function xt(e){let t,n,o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"";return{c(){t=N("td"),n=_(o),z(t,"class","svelte-1m010ne")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t[0]&&o!==(o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"")&&T(n,o)},d(e){e&&I(t)}}}function kt(e){let t,n,o=e[14](e[32],e[1]),r=o&&wt(e);return{c(){r&&r.c(),t=C()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){2&n[0]&&(o=e[14](e[32],e[1])),o?r?(r.p(e,n),2&n[0]&&ce(r,1)):(r=wt(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(se(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function It(e){let t,n;return t=new e[4]({}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Ft(e){let t,n,o,r;t=new e[8]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:It,then:ht,catch:$t,value:31,blocks:[,,,]};return ue(e[12](),i),{c(){$e(t.$$.fragment),n=q(),o=C(),i.block.c()},m(e,l){he(t,e,l),k(e,n,l),k(e,o,l),i.block.m(e,i.anchor=l),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){me(i,e=t,n)},i(e){r||(ce(t.$$.fragment,e),ce(i.block),r=!0)},o(e){de(t.$$.fragment,e);for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){ge(t,e),e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}function Nt(e){let t,n;return t=new e[6]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Ft]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};7&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function jt(e,n,o){const r=W(),{Loading:i,TextField:l,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:h}=n,{target:g}=n,{view:v}=n,{unique:b}=n,{uniqueView:w}=n;p||=[];let y="",x=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",k=[];const I=$+h+g+"checkbox",F=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(18,m=e.classId),"id"in e&&o(19,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(20,$=e.tableName),"idName"in e&&o(21,h=e.idName),"target"in e&&o(22,g=e.target),"view"in e&&o(23,v=e.view),"unique"in e&&o(24,b=e.unique),"uniqueView"in e&&o(25,w=e.uniqueView)},[p,y,k,r,i,l,s,a,d,u,x,I,async()=>{let e,n=[];if(o(2,k=[]),v){const n=m.split("-")[1].slice(0,-4),o="input."+m+"[name='_id']",r=document.querySelector(o).value,i={[h]:f,$or:[{status:!0},{[n]:r}]};e=await t.getSectionView($,i),e=e.sort(((e,t)=>{const o=e=>(e[n]||"z").toString()+e[g];return F(o(e),o(t))}))}else if(w){const r={[h]:f,status:!0};Object.entries(w).map((([e,t])=>{t?.length&&(r[e]={$in:t}),n.push(e)})),e=await t.getSectionView($,r),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return F(n(e),n(t))})),o(2,k=e.map((e=>{const t=[e[g]];return n.map((n=>t.push(e[n]))),t})))}else b?(e=await t.getSection($,h,f,b),e=e.sort(((e,t)=>F(e,t)))):(e=await t.getSection($,h,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return F(n(e),n(t))})));const r=[];e.map((e=>r.push(e[g])));const i=await t.getSchemaByClass($),l=i.items.find((e=>e.name===g))?.designation;return n=n.map((e=>i.items.find((t=>t.name===e))?.designation)),{list:r.flat(),items:[l,...n]}},({detail:{value:e}})=>{o(1,y=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(1,y="")},e=>()=>{const t=document.getElementsByName(I),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),r("choose",{list:n})},e=>t=>{"TD"===t.originalTarget?.tagName&&(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),r("choose",{list:p}))},m,f,$,h,g,v,b,w,()=>r("back"),function(e){y=e,o(1,y)}]}class _t extends be{constructor(e){var t;super(),dt.getElementById("svelte-1m010ne-style")||((t=N("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}",x(dt.head,t)),ve(this,e,jt,Nt,b,{classId:18,id:19,selection:0,tableName:20,idName:21,target:22,view:23,unique:24,uniqueView:25},[-1,-1])}}const{document:qt}=fe;function Ct(e){let t,n,o,r,i,l=e[7].length+"";return{c(){t=N("span"),n=_("("),o=_(l),r=_(")"),z(t,"class",i=y(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,n){128&n[0]&&l!==(l=e[7].length+"")&&T(o,l),2&n[0]&&i!==(i=y(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&z(t,"class",i)},d(e){e&&I(t)}}}function St(e){let t;return{c(){t=N("div"),z(t,"class","load-more-options"),z(t,"slot","load-more-options-message slot")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Lt(e){let t,n,o,r;const i=[Tt,zt,Et],l=[];function s(e,t){return e[7].length?0:e[17]?1:e[14]&&e[16].view?2:-1}return~(t=s(e))&&(n=l[t]=i[t](e)),{c(){n&&n.c(),o=C()},m(e,n){~t&&l[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?~t&&l[t].p(e,r):(n&&(se(),de(l[a],1,1,(()=>{l[a]=null})),ae()),~t?(n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o)):n=null)},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){~t&&l[t].d(e),e&&I(o)}}}function Et(e){let t,n,o,r,i;return n=new xe({props:{size:"18"}}),{c(){t=N("span"),$e(n.$$.fragment),z(t,"title","Übernehmen"),z(t,"class","feather pointer svelte-1rbaejz")},m(l,s){k(l,t,s),he(n,t,null),o=!0,r||(i=S(t,"click",e[24]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n),r=!1,i()}}}function zt(e){let t,n,o,r,i;return n=new _e({props:{size:"18"}}),{c(){t=N("span"),$e(n.$$.fragment),z(t,"title",e[17].title||"Generieren"),z(t,"class","feather pointer svelte-1rbaejz")},m(l,s){k(l,t,s),he(n,t,null),o=!0,r||(i=S(t,"click",e[23]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n),r=!1,i()}}}function Tt(e){let t,n,o,r,i;return n=new ze({props:{size:"18"}}),{c(){t=N("span"),$e(n.$$.fragment),z(t,"title","Löschen"),z(t,"class","feather pointer svelte-1rbaejz")},m(l,s){k(l,t,s),he(n,t,null),o=!0,r||(i=S(t,"click",e[25]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n),r=!1,i()}}}function Dt(e){let t,n,o;function r(t){e[32](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Ot]},$$scope:{ctx:e}};return void 0!==e[10]&&(i.open=e[10]),t=new e[11]({props:i}),Y.push((()=>pe(t,"open",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};53&o[0]|256&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,r.open=e[10],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function Ot(e){let t,n;return t=new _t({props:{classId:e[2],selection:e[0],view:e[15],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[19]],tableName:e[18],idName:e[19],target:e[4].name}}),t.$on("choose",e[22]),t.$on("back",e[21]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};4&n[0]&&(o.classId=e[2]),1&n[0]&&(o.selection=e[0]),16&n[0]&&(o.unique=e[16].unique&&e[4].name),32&n[0]&&(o.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(o.id=e[5][e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Bt(e){let t,n,o,r,i,l,s,a,c,d=e[7].length&&Ct(e);function u(t){e[30](t)}function m(t){e[31](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:Mt,minSearchLength:"3",$$slots:{"load-more-options-message slot":[St]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),o=new e[12]({props:f}),Y.push((()=>pe(o,"selection",u))),Y.push((()=>pe(o,"maxOptions",m))),o.$on("change",e[20]);let p=!e[1]&&Lt(e),$=e[10]&&Dt(e);return{c(){t=N("div"),d&&d.c(),n=q(),$e(o.$$.fragment),l=q(),p&&p.c(),s=q(),$&&$.c(),a=C(),O(t,"position","relative")},m(e,r){k(e,t,r),d&&d.m(t,null),x(t,n),he(o,t,null),x(t,l),p&&p.m(t,null),k(e,s,r),$&&$.m(e,r),k(e,a,r),c=!0},p(e,l){e[7].length?d?d.p(e,l):(d=Ct(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&l[0]&&(s.id=e[3]),8&l[0]&&(s.name=e[3]),8&l[0]&&(s.class=e[3]),2&l[0]&&(s.disabled=e[1]),64&l[0]&&(s.required=e[6]),256&l[0]&&(s.placeholder=e[8]),256&l[1]&&(s.$$scope={dirty:l,ctx:e}),!r&&128&l[0]&&(r=!0,s.selection=e[7],ee((()=>r=!1))),!i&&512&l[0]&&(i=!0,s.maxOptions=e[9],ee((()=>i=!1))),o.$set(s),e[1]?p&&(se(),de(p,1,1,(()=>{p=null})),ae()):p?(p.p(e,l),2&l[0]&&ce(p,1)):(p=Lt(e),p.c(),ce(p,1),p.m(t,null)),e[10]?$?($.p(e,l),1024&l[0]&&ce($,1)):($=Dt(e),$.c(),ce($,1),$.m(a.parentNode,a)):$&&(se(),de($,1,1,(()=>{$=null})),ae())},i(e){c||(ce(o.$$.fragment,e),ce(p),ce($),c=!0)},o(e){de(o.$$.fragment,e),de(p),de($),c=!1},d(e){e&&I(t),d&&d.d(),ge(o),p&&p.d(),e&&I(s),$&&$.d(e),e&&I(a)}}}async function*Mt(e){yield[{name:e}]}function At(e,n,o){const r=W(),{Modal:i,Autocomplete:l}=c;let{classId:s}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:h}=n,{praefix:g}=n;const{properties:v={}}=d;let{placeholder:b,hint:w,readonly:y,required:x=!1,lookup:k="",view:I=!1,multi:F,max:N=1e3,generate:j=!1}=v;const[_,q]=k.split(":");let C=!1,S=m.map&&m.map((e=>({name:e})))||[];p||=y,p&&(b="");P((async()=>{const e=document.getElementById(a);e.classList.add(s),!y&&k&&e.addEventListener("focus",L)}));const L=()=>{if(k){document.getElementById(a).blur(),(F.unique||S.length<N)&&o(10,C=!0)}},E=()=>{o(10,C&&=!1)},z=({detail:e})=>{o(7,S=e.list.map((e=>({name:e})))),r("blur",{value:e.list}),E()},T=(e=!1)=>{if(p||!F.required)return;const t=F.maxItem;if(!t||F.unique)return;o(9,N=!1!==e?e:u[t]||0);const n=S.length!=N,i=document.getElementById(a);i?.classList?.toggle("invalid",n),r("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&o(2,s=e.classId),"id"in e&&o(3,a=e.id),"item"in e&&o(4,d=e.item),"record"in e&&o(5,u=e.record),"value"in e&&o(0,m=e.value),"noForm"in e&&o(26,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(27,$=e.formnovalidate),"numberInput"in e&&o(28,h=e.numberInput),"praefix"in e&&o(29,g=e.praefix)},e.$$.update=()=>{128&e.$$.dirty[0]&&S&&(o(0,m=S.map&&S.map((e=>e.name))||[]),T()),268435456&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==g&&g!==o||t&&t.name===F.maxItem&&T(n)})(h),134217792&e.$$.dirty[0]&&o(6,x=x&&!$)},[m,p,s,a,d,u,x,S,b,N,C,i,l,y,k,I,F,j,_,q,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),o(7,S=t.map((e=>({name:e.trim()})))),r("blur",{value:S.map((e=>e.name))})},E,z,()=>{const e=u[j.itemQuantity];if(!e)return;const t=j.prefix||"",n=u[j.variable]||"",o=j.len||5,r=Array.from({length:e},((e,r)=>t+n+"-"+r.toString().padStart(o,"0")));z({detail:{list:r}})},async()=>{const e=u[F.maxItem];if(!e)return;const n={[q]:u[q],status:!0},o=[].concat(u[F.view]||[]);o.length&&(n[F.view]={$in:o});const r=await t.getSectionView(_,n),i=Array.from({length:e<r.length?e:r.length},((e,t)=>r[t][d.name]));z({detail:{list:i}})},()=>{z({detail:{list:[]}})},f,$,h,g,function(e){S=e,o(7,S)},function(e){N=e,o(9,N)},function(e){C=e,o(10,C)}]}class Vt extends be{constructor(e){var t;super(),qt.getElementById("svelte-1rbaejz-style")||((t=N("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}",x(qt.head,t)),ve(this,e,At,Bt,b,{classId:2,id:3,item:4,record:5,value:0,noForm:26,disabled:1,formnovalidate:27,numberInput:28,praefix:29},[-1,-1])}}const{document:Pt}=fe;function Wt(e){e[26]=e[28].list,e[27]=e[28].items}function Rt(e,t,n){const o=e.slice();return o[29]=t[n],o}function Ht(e,t,n){const o=e.slice();return o[32]=t[n],o}function Yt(e,t,n){const o=e.slice();return o[32]=t[n],o}function Gt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Jt(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}Wt(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Ut]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),l=new e[6]({props:w}),Y.push((()=>pe(l,"value",b))),l.$on("input",e[12]),d=new ze({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=Zt(Yt(e,o,t));return{c(){t=N("thead"),n=N("tr");for(let e=0;e<r.length;e+=1)r[e].c();z(n,"class","svelte-14hcfjl"),z(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(o=e[27],i=0;i<o.length;i+=1){const l=Yt(e,o,i);r[i]?r[i].p(l,t):(r[i]=Zt(l),r[i].c(),r[i].m(n,null))}for(;i<r.length;i+=1)r[i].d(1);r.length=o.length}},d(e){e&&I(t),F(r,e)}}}(e),j=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=Xt(Rt(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=C()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);k(e,t,n)},p(e,r){if(11779&r[0]){let i;for(n=e[26],i=0;i<n.length;i+=1){const l=Rt(e,n,i);o[i]?o[i].p(l,r):(o[i]=Xt(l),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},d(e){F(o,e),e&&I(t)}}}(e);return{c(){t=N("div"),$e(n.$$.fragment),o=q(),r=N("div"),i=_("Suchen: "),$e(l.$$.fragment),a=q(),c=N("span"),$e(d.$$.fragment),u=q(),m=N("div"),f=N("table"),y&&y.c(),p=q(),$=N("tbody"),j&&j.c(),z(t,"class","form--buttons svelte-14hcfjl"),z(c,"class","feather pointer svelte-14hcfjl"),O(r,"margin-bottom","1em"),O(r,"position","relative"),z(f,"striped",""),z(f,"class","svelte-14hcfjl"),z(m,"class","eList svelte-14hcfjl")},m(s,b){k(s,t,b),he(n,t,null),k(s,o,b),k(s,r,b),x(r,i),he(l,r,null),x(r,a),x(r,c),he(d,c,null),k(s,u,b),k(s,m,b),x(m,f),y&&y.m(f,null),x(f,p),x(f,$),j&&j.m($,null),h=!0,g||(v=S(c,"click",e[14]),g=!0)},p(e,t){Wt(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const r={};!s&&2&t[0]&&(s=!0,r.value=e[1],ee((()=>s=!1))),l.$set(r),e[27]?.length&&y.p(e,t),e[26]?.length&&j.p(e,t)},i(e){h||(ce(n.$$.fragment,e),ce(l.$$.fragment,e),ce(d.$$.fragment,e),h=!0)},o(e){de(n.$$.fragment,e),de(l.$$.fragment,e),de(d.$$.fragment,e),h=!1},d(e){e&&I(t),ge(n),e&&I(o),e&&I(r),ge(l),ge(d),e&&I(u),e&&I(m),y&&y.d(),j&&j.d(),g=!1,v()}}}function Ut(e){let t;return{c(){t=_("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Zt(e){let t,n,o=e[32]?.designation+"";return{c(){t=N("th"),n=_(o),z(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n)},p:p,d(e){e&&I(t)}}}function Qt(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=Kt(Ht(e,o,t));return{c(){t=N("tr");for(let e=0;e<r.length;e+=1)r[e].c();n=q(),z(t,"class","pointer svelte-14hcfjl"),B(t,"active",e[29]._id===e[0])},m(e,o){k(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);x(t,n)},p(e,i){if(3584&i[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const s=Ht(e,o,l);r[l]?r[l].p(s,i):(r[l]=Kt(s),r[l].c(),r[l].m(t,n))}for(;l<r.length;l+=1)r[l].d(1);r.length=o.length}2049&i[0]&&B(t,"active",e[29]._id===e[0])},d(e){e&&I(t),F(r,e)}}}function Kt(e){let t,n,o,r,i=e[9](e[29],e[32])+"";return{c(){t=N("td"),n=_(i),z(t,"class","svelte-14hcfjl")},m(i,l){k(i,t,l),x(t,n),o||(r=S(t,"click",E(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&I(t),o=!1,r()}}}function Xt(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&Qt(e);return{c(){o&&o.c(),t=C()},m(e,n){o&&o.m(e,n),k(e,t,n)},p(e,r){2&r[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,r):(o=Qt(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&I(t)}}}function en(e){let t,n;return t=new e[5]({}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function tn(e){let t,n,o,r;t=new e[4]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:en,then:Jt,catch:Gt,value:28,blocks:[,,,]};return ue(e[11](),i),{c(){$e(t.$$.fragment),n=q(),o=C(),i.block.c()},m(e,l){he(t,e,l),k(e,n,l),k(e,o,l),i.block.m(e,i.anchor=l),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){me(i,e=t,n)},i(e){r||(ce(t.$$.fragment,e),ce(i.block),r=!0)},o(e){de(t.$$.fragment,e);for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){ge(t,e),e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}function nn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[tn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function on(e,o,r){const i=W(),{Dialog:l,Divider:s,Loading:a,TextField:u,Button:f}=c;let{item:p}=o,{className:$}=o,{classId:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?m(n):d(e[`_${t.name}`]||e[t.name]||"")},F=t.getSchemaByClass($);P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await F;e.eventId===t.id&&Ci(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&r(15,p=e.item),"className"in e&&r(16,$=e.className),"classId"in e&&r(17,h=e.classId),"rowId"in e&&r(0,g=e.rowId),"viewName"in e&&r(18,v=e.viewName),"viewValue"in e&&r(19,b=e.viewValue),"recordId"in e&&r(20,w=e.recordId),"filter"in e&&r(21,y=e.filter)},[g,x,i,l,s,a,u,f,k,I,e=>()=>i("choose",{row:e}),async()=>{const e=await F,n="."+h+"#"+v;document.querySelector(n);let o={[v]:b},r=[];o[v]&&(r=await t.getSectionView(e.class,o,!0)),y&&(r=r.filter((e=>e._id!=y)));let i=[],l=e.display;return l&&l.length?l.map((t=>{const[n,o]=t.split(".");let l=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));l&&(l={...l},l.name=`${n}_${o}`,r=r.map((e=>(e[n]&&(e[l.name]=e[n][o]),e)))),l||(l=e.items.find((e=>e.name===n))),i.find((e=>e?.name===n))||i.push(l)})):i=e.items,{list:r,items:i}},({detail:{value:e}})=>{r(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,x="")},p,$,h,v,b,w,y,()=>i("back"),function(e){x=e,r(1,x)}]}class rn extends be{constructor(e){var t;super(),Pt.getElementById("svelte-14hcfjl-style")||((t=N("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}",x(Pt.head,t)),ve(this,e,on,nn,b,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function ln(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function sn(e){let t,n,o,r,i;function l(t){e[21](t)}let s={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]&&(s.value=e[0]),n=new e[10]({props:s}),Y.push((()=>pe(n,"value",l)));let a=!e[6]&&an(e);return{c(){t=N("div"),$e(n.$$.fragment),r=q(),a&&a.c(),O(t,"position","relative")},m(e,o){k(e,t,o),he(n,t,null),x(t,r),a&&a.m(t,null),i=!0},p(e,r){const i={};4&r&&(i.id=e[2]),8&r&&(i.name=e[3].name),34&r&&(i.inputClass=e[5]||e[1]),64&r&&(i.disabled=e[6]),128&r&&(i.formnovalidate=e[7]),!o&&1&r&&(o=!0,i.value=e[0],ee((()=>o=!1))),n.$set(i),e[6]?a&&(se(),de(a,1,1,(()=>{a=null})),ae()):a?(a.p(e,r),64&r&&ce(a,1)):(a=an(e),a.c(),ce(a,1),a.m(t,null))},i(e){i||(ce(n.$$.fragment,e),ce(a),i=!0)},o(e){de(n.$$.fragment,e),de(a),i=!1},d(e){e&&I(t),ge(n),a&&a.d()}}}function an(e){let t,n,o,r,i;return n=new Ae({props:{size:"18"}}),{c(){t=N("span"),$e(n.$$.fragment),z(t,"class","feather pointer svelte-wbrqzu")},m(l,s){k(l,t,s),he(n,t,null),o=!0,r||(i=S(t,"click",e[17]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n),r=!1,i()}}}function cn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function dn(e){let t,n,o;function r(t){e[22](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[un]},$$scope:{ctx:e}};return void 0!==e[8]&&(i.open=e[8]),t=new e[11]({props:i}),Y.push((()=>pe(t,"open",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};268435994&o&&(r.$$scope={dirty:o,ctx:e}),!n&&256&o&&(n=!0,r.open=e[8],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function un(e){let t,n;return t=new rn({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(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.item=e[3]),8&n&&(o.className=e[3].refClass),2&n&&(o.classId=e[1]),16&n&&(o.recordId=e[4]._id),512&n&&(o.viewValue=e[9]),16&n&&(o.filter=e[4]._id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function mn(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:cn,then:sn,catch:ln,value:27,blocks:[,,,]};ue(e[16](),r);let i=e[8]&&dn(e);return{c(){r.block.c(),t=q(),i&&i.c(),n=C()},m(e,l){r.block.m(e,r.anchor=l),r.mount=()=>t.parentNode,r.anchor=t,k(e,t,l),i&&i.m(e,l),k(e,n,l),o=!0},p(t,[o]){me(r,e=t,o),e[8]?i?(i.p(e,o),256&o&&ce(i,1)):(i=dn(e),i.c(),ce(i,1),i.m(n.parentNode,n)):i&&(se(),de(i,1,1,(()=>{i=null})),ae())},i(e){o||(ce(r.block),ce(i),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}de(i),o=!1},d(e){r.block.d(e),r.token=null,r=null,e&&I(t),i&&i.d(e),e&&I(n)}}}function fn(e,t,n){const{TextField:o,Modal:r}=c;let{classId:i}=t,{id:l}=t,{item:s}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:$={}}=s;let h,{pattern:g,placeholder:v,readonly:b,required:w=!1,view:y}=$,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,i=e.classId),"id"in e&&n(2,l=e.id),"item"in e&&n(3,s=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,i,l,s,a,u,m,f,x,h,o,r,g,b,w,y,async()=>(n(9,h=a[y.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[y.value?y.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class pn extends be{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=N("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",x(document.head,t)),ve(this,e,fn,mn,b,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function $n(e,t,n){const o=e.slice();return o[10]=t[n],o}function hn(e){let t,n,o,r=e[10]+"";return{c(){t=N("option"),n=_(r),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],z(t,"class","svelte-5xpzvo")},m(e,o){k(e,t,o),x(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&I(t)}}}function gn(e){let t,n,o,r,i,l=e[4],s=[];for(let t=0;t<l.length;t+=1)s[t]=hn($n(e,l,t));return{c(){t=N("select"),n=N("option");for(let e=0;e<s.length;e+=1)s[e].c();n.__value="",n.value=n.__value,z(n,"class","svelte-5xpzvo"),z(t,"class",o=y(e[2]||e[3])+" svelte-5xpzvo"),z(t,"id",e[0]),z(t,"name",e[0]),z(t,"readonly",e[5])},m(o,l){k(o,t,l),x(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);r||(i=S(t,"change",e[6]),r=!0)},p(e,[n]){if(18&n){let o;for(l=e[4],o=0;o<l.length;o+=1){const r=$n(e,l,o);s[o]?s[o].p(r,n):(s[o]=hn(r),s[o].c(),s[o].m(t,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=l.length}12&n&&o!==(o=y(e[2]||e[3])+" svelte-5xpzvo")&&z(t,"class",o),1&n&&z(t,"id",e[0]),1&n&&z(t,"name",e[0])},i:p,o:p,d(e){e&&I(t),F(s,e),r=!1,i()}}}function vn(e,t,n){const o=W();let{id:r}=t,{item:i}=t,{value:l}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=i.properties,u=c||i.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,i=e.item),"value"in e&&n(1,l=e.value),"noForm"in e&&n(2,s=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[r,l,s,a,d,u,e=>o("blur",{value:e.srcElement.value}),i,c]}class bn extends be{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=N("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.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.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",x(document.head,t)),ve(this,e,vn,gn,b,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const wn=/\d+/g,yn=/%[HMSpPdmyY%]/g;function xn(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let r=!1;if(""===e)return null;const i=t.split(yn);let l=0,s=0;const a=new Date(0);for(const c of i){if(!e.startsWith(c,l))return n;if(l+=c.length,l===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[l])return n;l++}else if("p"===t[s].toLowerCase()){const t=e.substr(l,2).toUpperCase();if("AM"===t)r=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;r=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{wn.lastIndex=l;const i=wn.exec(e);if(null==i)return n;switch(t[s]){case"H":a.setHours(parseInt(i[0])+12*r);break;case"M":a.setMinutes(i[0]);break;case"S":a.setSeconds(i[0]);break;case"d":a.setDate(i[0]);break;case"m":a.setMonth(i[0]-1);break;case"y":a.setFullYear(100*o+parseInt(i[0]));break;case"Y":a.setFullYear(i[0])}l+=i[0].length}s++}return isNaN(a.valueOf())?n:a}function kn(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}function In(e){let t;return{c(){t=_("Stunden")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Fn(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[In]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Nn(e){let t;return{c(){t=_("Minuten")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function jn(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Nn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function _n(e){let t;return{c(){t=_("Jetzt")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function qn(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[_n]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Cn(e){let t,n,o,r,i,l,s,a,c;return r=new e[5]({props:{value:e[0],closeOnSelection:!0}}),r.$on("change",e[8]),l=new e[6]({props:{value:e[0],$$slots:{"now-label":[qn],"minutes-label":[jn],"hours-label":[Fn]},$$scope:{ctx:e}}}),l.$on("change",e[7]),{c(){t=N("input"),o=q(),$e(r.$$.fragment),i=q(),$e(l.$$.fragment),z(t,"type","string"),z(t,"class",n=e[2]||e[3]),z(t,"id",e[1]),z(t,"name",e[1]),t.hidden=!0},m(n,d){k(n,t,d),D(t,e[0]),k(n,o,d),he(r,n,d),k(n,i,d),he(l,n,d),s=!0,a||(c=S(t,"input",e[9]),a=!0)},p(e,[o]){(!s||12&o&&n!==(n=e[2]||e[3]))&&z(t,"class",n),(!s||2&o)&&z(t,"id",e[1]),(!s||2&o)&&z(t,"name",e[1]),1&o&&D(t,e[0]);const i={};1&o&&(i.value=e[0]),r.$set(i);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),l.$set(a)},i(e){s||(ce(r.$$.fragment,e),ce(l.$$.fragment,e),s=!0)},o(e){de(r.$$.fragment,e),de(l.$$.fragment,e),s=!1},d(e){e&&I(t),e&&I(o),ge(r,e),e&&I(i),ge(l,e),a=!1,c()}}}function Sn(e,t,n){const o=W(),{Label:r,DatePicker:i,TimePicker:l}=c;let{value:s}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,s=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[s,a,d,u,r,i,l,({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(s)},({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(s)},function(){s=this.value,n(0,s)}]}class Ln extends be{constructor(e){super(),ve(this,e,Sn,Cn,b,{value:0,id:1,noForm:2,classId:3})}}function En(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:zn,placeholder:Tn,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=N("div"),$e(n.$$.fragment),O(t,"max-width","4em")},m(e,r){k(e,t,r),he(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n)}}}const zn="([01][0-9]|2[0-3]):([0-5][0-9])",Tn="";function Dn(e,t,n){const o=W(),{TextField:r}=c;let{id:i}=t,{item:l}=t,{value:s}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t,{praefix:f}=t;const p=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,i=e.id),"item"in e&&n(8,l=e.item),"value"in e&&n(1,s=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled),"praefix"in e&&n(9,f=e.praefix)},[i,s,a,d,u,m,r,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:i,value:e.value})},l,f]}class On extends be{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=N("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",x(document.head,t)),ve(this,e,Dn,En,b,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function Bn(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],pattern:e[22],required:e[2],id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Mn(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],required:e[2],type:"email",id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function An(e){let t,n;return t=new On({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[14],required:e[2],id:e[24],item:e[1],value:e[16](),praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("checkRange",e[33]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Vn(e){let t,n;return t=new Ln({props:{classId:e[5],id:e[24],disabled:e[7],required:e[2],value:e[25](),noForm:e[4]}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Pn(e){let t,n;return t=new e[20]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[24],name:e[23],value:e[25](),closeOnSelection:!0}}),t.$on("change",e[26](!0)),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Wn(e){let t,n;return t=new e[21]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[14],required:e[2],id:e[24],name:e[23],checked:e[16]()}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),16512&n[0]&&(o.disabled=e[7]||e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.checked=e[16]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Rn(e){let t,n;return t=new pn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[32]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Hn(e){let t,n;return t=new Vt({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[31]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Yn(e){let t,n;return t=new bn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Gn(e){let t,n;return t=new ct({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[14],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Jn(e){let t,n;return t=new r({props:{classId:e[5],disabled:e[7],readonly:e[14],id:e[24],name:e[1].name,value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.name=e[1].name),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Un(e){let t,n;return t=new Xo({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[14],id:e[24],item:e[1],desc:e[17],value:e[16](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[30]),t.$on("change",e[26]()),t.$on("initFail",e[27]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),131072&n[0]&&(o.desc=e[17]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Zn(e){let t,n,o,r;const i=[Un,Jn,Gn,Yn,Hn,Rn,Wn,Pn,Vn,An,Mn,Bn],l=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=C()},m(e,n){l[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(se(),de(l[a],1,1,(()=>{l[a]=null})),ae(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){l[t].d(e),e&&I(o)}}}function Qn(e){let t,n;return t=new e[18]({props:{id:e[28](e[24]),class:e[1].name+(e[15]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Zn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32770&n[0]&&(o.class=e[1].name+(e[15]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),229375&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Kn(e,t,n){let o,r,i;const l=W(),{FormField:s,TextField:a,DatePicker:u,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:N}=t,{required:j}=t,{isTemplate:_}=t,{required:q,readonly:C,hidden:S,pattern:L}=$.properties||{};if(S=!0===S,void 0!==C&&(C=!0===C),void 0===j&&(j=q),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const E=(h?h+".":"")+$.name,z=E+(""!==p?"-"+p:""),T=(e,t=E)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(29,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,w=e.eventId),"disabled"in e&&n(7,y=e.disabled),"selectionFields"in e&&n(8,x=e.selectionFields),"formnovalidate"in e&&n(9,k=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,F=e.numberInput),"deList"in e&&n(12,N=e.deList),"required"in e&&n(2,j=e.required),"isTemplate"in e&&n(13,_=e.isTemplate)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(16,o=(e=E)=>{let t=T(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=T(g))},n(17,r=((e=E)=>{let t=g["_"+e];return t=d(t),void 0===t?"":t})()),[g,$,j,p,v,b,w,y,x,k,I,F,N,_,C,S,o,r,s,a,u,f,L,E,z,(e=E)=>{let t=T(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,g[E]=e?kn(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;l("notify",{oldValue:i,value:o,add:s,itemName:E,desc:t.description})},()=>n(15,S=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)}]}class Xn extends be{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=N("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",x(document.head,t)),ve(this,e,Kn,Qn,b,{praefix:3,item:1,listName:29,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13},[-1,-1])}}function eo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function to(e){let t,n,o=e[32]&&no(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[32]?o?(o.p(e,n),4&n[0]&&ce(o,1)):(o=no(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(se(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function no(e){let t,n;return t=new e[15]({props:{title:e[11]?"Auswahl":e[18],class:"eList "+(e[9]?"form":""),$$slots:{default:[mo]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]?"Auswahl":e[18]),512&n[0]&&(o.class="eList "+(e[9]?"form":"")),32767&n[0]|4&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function oo(e){let t,n;return t=new zi({props:{schema:e[1],recID:e[0],readonly:e[10]}}),t.$on("choose",(function(){v(e[23](e[32]))&&e[23](e[32]).apply(this,arguments)})),t.$on("back",e[20]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.schema=e[1]),1&o[0]&&(r.recID=e[0]),1024&o[0]&&(r.readonly=e[10]),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function ro(e){let t,n,o,r,i,l,s;t=new e[16]({props:{text:e[11]?"Zusätzliche Auswahl":""}});const a=[lo,io],c=[];function d(e,t){return e[11]?0:1}return o=d(e),r=c[o]=a[o](e),l=new lt({props:{className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),l.$on("edit",e[24]),l.$on("choose",e[27]),l.$on("init",e[25]),{c(){$e(t.$$.fragment),n=q(),r.c(),i=q(),$e(l.$$.fragment)},m(e,r){he(t,e,r),k(e,n,r),c[o].m(e,r),k(e,i,r),he(l,e,r),s=!0},p(e,n){const s={};2048&n[0]&&(s.text=e[11]?"Zusätzliche Auswahl":""),t.$set(s);let u=o;o=d(e),o===u?c[o].p(e,n):(se(),de(c[u],1,1,(()=>{c[u]=null})),ae(),r=c[o],r?r.p(e,n):(r=c[o]=a[o](e),r.c()),ce(r,1),r.m(i.parentNode,i));const m={};2&n[0]&&(m.className=e[1].class),8&n[0]&&(m.filterForReady=e[3]),16&n[0]&&(m.praefix=e[4]),32&n[0]&&(m.selectionFields=e[5]),1&n[0]&&(m.rowId=e[0]),128&n[0]&&(m.deList=e[7]),64&n[0]&&(m.showEdit=e[6]),l.$set(m)},i(e){s||(ce(t.$$.fragment,e),ce(r),ce(l.$$.fragment,e),s=!0)},o(e){de(t.$$.fragment,e),de(r),de(l.$$.fragment,e),s=!1},d(e){ge(t,e),e&&I(n),c[o].d(e),e&&I(i),ge(l,e)}}}function io(e){let t,n,o,r,i;return n=new e[17]({props:{outline:!0,$$slots:{default:[so]},$$scope:{ctx:e}}}),n.$on("click",e[21]),r=new e[17]({props:{filled:!0,$$slots:{default:[ao]},$$scope:{ctx:e}}}),r.$on("click",e[22]),{c(){t=N("div"),$e(n.$$.fragment),o=q(),$e(r.$$.fragment),z(t,"class","form--buttons svelte-jb5mrh")},m(e,l){k(e,t,l),he(n,t,null),x(t,o),he(r,t,null),i=!0},p(e,t){const o={};4&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};4&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i)},i(e){i||(ce(n.$$.fragment,e),ce(r.$$.fragment,e),i=!0)},o(e){de(n.$$.fragment,e),de(r.$$.fragment,e),i=!1},d(e){e&&I(t),ge(n),ge(r)}}}function lo(e){let t,n,o,r,i,l,s=e[14]&&co(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[uo]},$$scope:{ctx:e}}}),o.$on("click",e[21]),i=new e[16]({props:{text:"Liste aus "+e[8]}}),{c(){s&&s.c(),t=q(),n=N("div"),$e(o.$$.fragment),r=q(),$e(i.$$.fragment),z(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),k(e,t,a),k(e,n,a),he(o,n,null),k(e,r,a),he(i,e,a),l=!0},p(e,n){e[14]?s?(s.p(e,n),16384&n[0]&&ce(s,1)):(s=co(e),s.c(),ce(s,1),s.m(t.parentNode,t)):s&&(se(),de(s,1,1,(()=>{s=null})),ae());const r={};4&n[1]&&(r.$$scope={dirty:n,ctx:e}),o.$set(r);const l={};256&n[0]&&(l.text="Liste aus "+e[8]),i.$set(l)},i(e){l||(ce(s),ce(o.$$.fragment,e),ce(i.$$.fragment,e),l=!0)},o(e){de(s),de(o.$$.fragment,e),de(i.$$.fragment,e),l=!1},d(e){s&&s.d(e),e&&I(t),e&&I(n),ge(o),e&&I(r),ge(i,e)}}}function so(e){let t;return{c(){t=_("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function ao(e){let t;return{c(){t=_("Neu")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function co(e){let t,n;return t=new Xn({props:{item:e[12],record:{_id:"",[e[12].name]:""},noForm:"true",classId:"sel_"+e[12].name,eventId:e[13],deList:e[14]}}),t.$on("notify",e[26]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};4096&n[0]&&(o.item=e[12]),4096&n[0]&&(o.record={_id:"",[e[12].name]:""}),4096&n[0]&&(o.classId="sel_"+e[12].name),8192&n[0]&&(o.eventId=e[13]),16384&n[0]&&(o.deList=e[14]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function uo(e){let t;return{c(){t=_("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function mo(e){let t,n,o,r;const i=[ro,oo],l=[];function s(e,t){return e[32].length&&!e[9]?0:1}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=C()},m(e,n){l[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(se(),de(l[a],1,1,(()=>{l[a]=null})),ae(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){l[t].d(e),e&&I(o)}}}function fo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function po(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:fo,then:to,catch:eo,value:32,blocks:[,,,]};return ue(n=e[19](e[2]),r),{c(){t=C(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[19](e[2]))&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function $o(e,n,o){const{Dialog:r,Divider:i,Button:l}=c,s=W();let{schema:a}=n,{recID:d}=n,{isOpening:u=!0}=n,{filterForReady:m=!1}=n,{praefix:f=""}=n,{selectionFields:p=!1}=n,{showEdit:$=!0}=n,{deList:h}=n,g=a.identity.designation;a.class;let v,b,w,y,x,k,I,F="",N=!1;return e.$$set=e=>{"schema"in e&&o(1,a=e.schema),"recID"in e&&o(0,d=e.recID),"isOpening"in e&&o(2,u=e.isOpening),"filterForReady"in e&&o(3,m=e.filterForReady),"praefix"in e&&o(4,f=e.praefix),"selectionFields"in e&&o(5,p=e.selectionFields),"showEdit"in e&&o(6,$=e.showEdit),"deList"in e&&o(7,h=e.deList)},[d,a,u,m,f,p,$,h,F,N,v,w,x,k,I,r,i,l,g,async e=>{if(!e)return!1;const n=await Fi(a.class,a.id);if(b=p&&p?.find((e=>a.class===e.refClass.split(":")[0])),o(11,w=b?.value?.get&&b.value.get(f)),w){y=b.refClass;const[e,n]=y.split(":"),[r]=n.split(".");o(12,x=b.parentClass.find((t=>t.name===e)));const i=await t.getSchemaByClass(x.refClass);o(13,k=i.id),o(8,F=b.parentClass.find((e=>e.name===r)).designation)}return n},()=>{o(9,N=!1),d||s("back"),$||s("back")},()=>{o(9,N=!1),s("back")},()=>{o(0,d=!1),o(10,v=!1),o(9,N=!0)},e=>({detail:{row:e}})=>{let t=a.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let r=a.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(r){e[`${n}_${o}`]=e[n][o]}})),s("choose",{row:e})},({detail:e})=>{o(10,v=!!e._task.visum||"Closed"===e._task.status),o(0,d=e._docId),o(9,N=!0)},({detail:e})=>{w&&o(14,I=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};s("choose",{row:t})},function(t){R(e,t)}]}class ho extends be{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=N("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}",x(document.head,t)),ve(this,e,$o,po,b,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:go}=fe;function vo(e){e[26]=e[28].list,e[27]=e[28].items}function bo(e,t,n){const o=e.slice();return o[29]=t[n],o}function wo(e,t,n){const o=e.slice();return o[32]=t[n],o}function yo(e,t,n){const o=e.slice();return o[32]=t[n],o}function xo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function ko(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}vo(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Io]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),l=new e[6]({props:w}),Y.push((()=>pe(l,"value",b))),l.$on("input",e[12]),d=new ze({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=Fo(yo(e,o,t));return{c(){t=N("thead"),n=N("tr");for(let e=0;e<r.length;e+=1)r[e].c();z(n,"class","svelte-14hcfjl"),z(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(o=e[27],i=0;i<o.length;i+=1){const l=yo(e,o,i);r[i]?r[i].p(l,t):(r[i]=Fo(l),r[i].c(),r[i].m(n,null))}for(;i<r.length;i+=1)r[i].d(1);r.length=o.length}},d(e){e&&I(t),F(r,e)}}}(e),j=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=_o(bo(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=C()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);k(e,t,n)},p(e,r){if(11779&r[0]){let i;for(n=e[26],i=0;i<n.length;i+=1){const l=bo(e,n,i);o[i]?o[i].p(l,r):(o[i]=_o(l),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},d(e){F(o,e),e&&I(t)}}}(e);return{c(){t=N("div"),$e(n.$$.fragment),o=q(),r=N("div"),i=_("Suchen: "),$e(l.$$.fragment),a=q(),c=N("span"),$e(d.$$.fragment),u=q(),m=N("div"),f=N("table"),y&&y.c(),p=q(),$=N("tbody"),j&&j.c(),z(t,"class","form--buttons svelte-14hcfjl"),z(c,"class","feather pointer svelte-14hcfjl"),O(r,"margin-bottom","1em"),O(r,"position","relative"),z(f,"striped",""),z(f,"class","svelte-14hcfjl"),z(m,"class","eList svelte-14hcfjl")},m(s,b){k(s,t,b),he(n,t,null),k(s,o,b),k(s,r,b),x(r,i),he(l,r,null),x(r,a),x(r,c),he(d,c,null),k(s,u,b),k(s,m,b),x(m,f),y&&y.m(f,null),x(f,p),x(f,$),j&&j.m($,null),h=!0,g||(v=S(c,"click",e[14]),g=!0)},p(e,t){vo(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const r={};!s&&2&t[0]&&(s=!0,r.value=e[1],ee((()=>s=!1))),l.$set(r),e[27]?.length&&y.p(e,t),e[26]?.length&&j.p(e,t)},i(e){h||(ce(n.$$.fragment,e),ce(l.$$.fragment,e),ce(d.$$.fragment,e),h=!0)},o(e){de(n.$$.fragment,e),de(l.$$.fragment,e),de(d.$$.fragment,e),h=!1},d(e){e&&I(t),ge(n),e&&I(o),e&&I(r),ge(l),ge(d),e&&I(u),e&&I(m),y&&y.d(),j&&j.d(),g=!1,v()}}}function Io(e){let t;return{c(){t=_("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Fo(e){let t,n,o=e[32]?.designation+"";return{c(){t=N("th"),n=_(o),z(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n)},p:p,d(e){e&&I(t)}}}function No(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=jo(wo(e,o,t));return{c(){t=N("tr");for(let e=0;e<r.length;e+=1)r[e].c();n=q(),z(t,"class","pointer svelte-14hcfjl"),B(t,"active",e[29]._id===e[0])},m(e,o){k(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);x(t,n)},p(e,i){if(3584&i[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const s=wo(e,o,l);r[l]?r[l].p(s,i):(r[l]=jo(s),r[l].c(),r[l].m(t,n))}for(;l<r.length;l+=1)r[l].d(1);r.length=o.length}2049&i[0]&&B(t,"active",e[29]._id===e[0])},d(e){e&&I(t),F(r,e)}}}function jo(e){let t,n,o,r,i=e[9](e[29],e[32])+"";return{c(){t=N("td"),n=_(i),z(t,"class","svelte-14hcfjl")},m(i,l){k(i,t,l),x(t,n),o||(r=S(t,"click",E(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&I(t),o=!1,r()}}}function _o(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&No(e);return{c(){o&&o.c(),t=C()},m(e,n){o&&o.m(e,n),k(e,t,n)},p(e,r){2&r[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,r):(o=No(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&I(t)}}}function qo(e){let t,n;return t=new e[5]({}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Co(e){let t,n,o,r;t=new e[4]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:qo,then:ko,catch:xo,value:28,blocks:[,,,]};return ue(e[11](),i),{c(){$e(t.$$.fragment),n=q(),o=C(),i.block.c()},m(e,l){he(t,e,l),k(e,n,l),k(e,o,l),i.block.m(e,i.anchor=l),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){me(i,e=t,n)},i(e){r||(ce(t.$$.fragment,e),ce(i.block),r=!0)},o(e){de(t.$$.fragment,e);for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){ge(t,e),e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}function So(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Co]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Lo(e,o,r){const i=W(),{Dialog:l,Divider:s,Loading:a,TextField:u,Button:f}=c;let{item:p}=o,{classId:$}=o,{className:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?m(n):d(e[`_${t.name}`]||e[t.name]||"")},F=t.getSchemaByClass(h);P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await F;e.eventId===t.id&&Ci(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&r(15,p=e.item),"classId"in e&&r(16,$=e.classId),"className"in e&&r(17,h=e.className),"rowId"in e&&r(0,g=e.rowId),"viewName"in e&&r(18,v=e.viewName),"viewValue"in e&&r(19,b=e.viewValue),"recordId"in e&&r(20,w=e.recordId),"filter"in e&&r(21,y=e.filter)},[g,x,i,l,s,a,u,f,k,I,e=>()=>i("choose",{row:e}),async()=>{const e=await F,n="."+$+"#"+v,o=document.querySelector(n);let r={[v]:o?.value||w};if(p.refItem){const e="."+$+"#"+p.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[p.refItem]:t.value},{[p.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}catch{}}let i=[];r[v]&&(i=await t.getSectionView(e.class,r,!0)),y&&(i=i.filter((e=>e._id!=y)));let l=[],s=e.display;return s&&s.length?s.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,i=i.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),l.find((e=>e?.name===n))||l.push(r)})):l=e.items,{list:i,items:l}},({detail:{value:e}})=>{r(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,x="")},p,$,h,v,b,w,y,()=>i("back"),function(e){x=e,r(1,x)}]}class Eo extends be{constructor(e){var t;super(),go.getElementById("svelte-14hcfjl-style")||((t=N("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}",x(go.head,t)),ve(this,e,Lo,So,b,{item:15,classId:16,className:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}const{document:zo}=fe;function To(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Do(e){let t,n,o=e[36]&&function(e){let t,n,o,i,l,s,a,c,d,u,m,f,p,$,h;n=new r({props:{class:"full-width",id:e[20],value:e[2],rows:"1",required:e[1],disabled:e[3],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}}),n.$on("click",e[22]()),n.$on("onFocus",e[22](e[20]));const g=[Bo,Oo],v=[];function b(e,t){return!e[3]||e[13]?0:e[0]?1:-1}~(i=b(e))&&(l=v[i]=g[i](e));let w=(!e[3]||e[13])&&Po(e);function F(t){e[30](t)}let j={class:"tModal",noClickaway:!0,$$slots:{default:[Yo]},$$scope:{ctx:e}};void 0!==e[15]&&(j.open=e[15]);m=new e[19]({props:j}),Y.push((()=>pe(m,"open",F)));let _=e[16]&&Go(e);return{c(){t=N("div"),$e(n.$$.fragment),o=q(),l&&l.c(),s=q(),a=N("input"),d=q(),w&&w.c(),u=q(),$e(m.$$.fragment),p=q(),_&&_.c(),$=C(),z(a,"class",c=y(e[6]||e[7])+" svelte-jox15l"),z(a,"id",e[4]),z(a,"name",e[4]),a.value=e[0],a.hidden=!0,O(t,"position","relative")},m(e,r){k(e,t,r),he(n,t,null),x(t,o),~i&&v[i].m(t,null),x(t,s),x(t,a),x(t,d),w&&w.m(t,null),k(e,u,r),he(m,e,r),k(e,p,r),_&&_.m(e,r),k(e,$,r),h=!0},p(e,o){const r={};4&o[0]&&(r.value=e[2]),2&o[0]&&(r.required=e[1]),8&o[0]&&(r.disabled=e[3]),n.$set(r);let d=i;i=b(e),i===d?~i&&v[i].p(e,o):(l&&(se(),de(v[d],1,1,(()=>{v[d]=null})),ae()),~i?(l=v[i],l?l.p(e,o):(l=v[i]=g[i](e),l.c()),ce(l,1),l.m(t,s)):l=null),(!h||192&o[0]&&c!==(c=y(e[6]||e[7])+" svelte-jox15l"))&&z(a,"class",c),(!h||16&o[0])&&z(a,"id",e[4]),(!h||16&o[0])&&z(a,"name",e[4]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[13]?w?(w.p(e,o),8200&o[0]&&ce(w,1)):(w=Po(e),w.c(),ce(w,1),w.m(t,null)):w&&(se(),de(w,1,1,(()=>{w=null})),ae());const u={};57249&o[0]|128&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&32768&o[0]&&(f=!0,u.open=e[15],ee((()=>f=!1))),m.$set(u),e[16]?_?(_.p(e,o),65536&o[0]&&ce(_,1)):(_=Go(e),_.c(),ce(_,1),_.m($.parentNode,$)):_&&(se(),de(_,1,1,(()=>{_=null})),ae())},i(e){h||(ce(n.$$.fragment,e),ce(l),ce(w),ce(m.$$.fragment,e),ce(_),h=!0)},o(e){de(n.$$.fragment,e),de(l),de(w),de(m.$$.fragment,e),de(_),h=!1},d(e){e&&I(t),ge(n),~i&&v[i].d(),w&&w.d(),e&&I(u),ge(m,e),e&&I(p),_&&_.d(e),e&&I($)}}}(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,t){e[36]&&o.p(e,t)},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Oo(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Vo,then:Ao,catch:Mo,value:37,blocks:[,,,]};return ue(e[26](),o),{c(){t=C(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){me(o,e=t,n)},i(e){n||(ce(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){de(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function Bo(e){let t,n,o,r,i;return n=new Ae({props:{size:"18"}}),{c(){t=N("span"),$e(n.$$.fragment),z(t,"class","feather pointer svelte-jox15l")},m(l,s){k(l,t,s),he(n,t,null),o=!0,r||(i=[S(t,"click",e[22]()),S(t,"choose",e[23])],r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n),r=!1,g(i)}}}function Mo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ao(e){let t,n,o,r;return o=new Oe({props:{size:"18"}}),{c(){t=N("span"),n=N("a"),$e(o.$$.fragment),z(n,"href",e[37]),z(n,"target","_blank"),z(t,"class","feather pointer svelte-jox15l")},m(e,i){k(e,t,i),x(t,n),he(o,n,null),r=!0},p:p,i(e){r||(ce(o.$$.fragment,e),r=!0)},o(e){de(o.$$.fragment,e),r=!1},d(e){e&&I(t),ge(o)}}}function Vo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Po(e){let t,n,o,r,i;return n=new ze({props:{size:"18"}}),{c(){t=N("span"),$e(n.$$.fragment),z(t,"class","feather2 pointer svelte-jox15l")},m(l,s){k(l,t,s),he(n,t,null),o=!0,r||(i=S(t,"click",e[25]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n),r=!1,i()}}}function Wo(e){let t,n,o,r;const i=[Ho,Ro],l=[];function s(e,t){return e[11]?0:1}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=C()},m(e,n){l[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(se(),de(l[a],1,1,(()=>{l[a]=null})),ae(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){l[t].d(e),e&&I(o)}}}function Ro(e){let t,n;return t=new ho({props:{schema:e[14],recID:e[0],isOpening:e[15],filterForReady:"true",selectionFields:e[10],deList:e[12],praefix:e[9]}}),t.$on("choose",e[23]),t.$on("back",e[24]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),32768&n[0]&&(o.isOpening=e[15]),1024&n[0]&&(o.selectionFields=e[10]),4096&n[0]&&(o.deList=e[12]),512&n[0]&&(o.praefix=e[9]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Ho(e){let t,n;return t=new Eo({props:{item:e[5],className:e[14].class,classId:e[7],rowId:e[0],recordId:e[8],viewName:e[11],viewValue:""}}),t.$on("choose",e[23]),t.$on("back",e[24]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.item=e[5]),16384&n[0]&&(o.className=e[14].class),128&n[0]&&(o.classId=e[7]),1&n[0]&&(o.rowId=e[0]),256&n[0]&&(o.recordId=e[8]),2048&n[0]&&(o.viewName=e[11]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Yo(e){let t,n,o=e[15]&&Wo(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[15]?o?(o.p(e,n),32768&n[0]&&ce(o,1)):(o=Wo(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(se(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Go(e){let t,n,o;function r(t){e[31](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Uo]},$$scope:{ctx:e}};return void 0!==e[16]&&(i.open=e[16]),t=new e[19]({props:i}),Y.push((()=>pe(t,"open",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};147457&o[0]|128&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&65536&o[0]&&(n=!0,r.open=e[16],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function Jo(e){let t,n;return t=new zi({props:{schema:e[14],recID:e[0],readonly:!0}}),t.$on("back",e[24]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Uo(e){let t,n;return t=new e[18]({props:{title:e[17],$$slots:{default:[Jo]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};131072&n[0]&&(o.title=e[17]),16385&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Zo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Qo(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Zo,then:Do,catch:To,value:36,blocks:[,,,]};return ue(e[21](),o),{c(){t=C(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){me(o,e=t,n)},i(e){n||(ce(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){de(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function Ko(e,n,o){const r=W(),{Dialog:i,Modal:l}=c;let{id:s}=n,{item:a}=n,{value:d=""}=n,{desc:u=""}=n,{noForm:m=!1}=n,{classId:p}=n,{eventId:$}=n,{recordId:h}=n,{required:g}=n,{disabled:v}=n,{readonly:b}=n,{praefix:w}=n,{selectionFields:y}=n,{formnovalidate:x}=n,{selection:k}=n,{deList:I}=n,{isTemplate:F}=n;const N="comment_"+s;let j,_,q,C=!1;b||=h&&a.asInput,v||=b;const S=e=>{e&&(o(2,u=f(q,e)),r("change",{value:d,description:u}),r("task",{row:e}))},L=()=>{o(15,C=!1),o(16,j=!1)};return e.$$set=e=>{"id"in e&&o(4,s=e.id),"item"in e&&o(5,a=e.item),"value"in e&&o(0,d=e.value),"desc"in e&&o(2,u=e.desc),"noForm"in e&&o(6,m=e.noForm),"classId"in e&&o(7,p=e.classId),"eventId"in e&&o(28,$=e.eventId),"recordId"in e&&o(8,h=e.recordId),"required"in e&&o(1,g=e.required),"disabled"in e&&o(3,v=e.disabled),"readonly"in e&&o(27,b=e.readonly),"praefix"in e&&o(9,w=e.praefix),"selectionFields"in e&&o(10,y=e.selectionFields),"formnovalidate"in e&&o(29,x=e.formnovalidate),"selection"in e&&o(11,k=e.selection),"deList"in e&&o(12,I=e.deList),"isTemplate"in e&&o(13,F=e.isTemplate)},e.$$.update=()=>{536870914&e.$$.dirty[0]&&o(1,g=g&&!x),16417&e.$$.dirty[0]&&d&&q&&Promise.resolve(Ni(a.refClass,q.id,d)).then((e=>S(e))),16385&e.$$.dirty[0]&&!d&&q&&S({})},[d,g,u,v,s,a,m,p,h,w,y,k,I,F,q,C,j,_,i,l,N,async()=>{try{if(o(14,q=await t.getSchemaByClass(a.refClass)),$&&h&&d&&!v){const e=await t.getSchema($);e.input?.find((e=>e===a.refClass))&&o(3,v=!0)}return o(17,_=q.identity.designation),!0}catch{return r("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(15,C=!0)},({detail:e})=>{o(0,d=e.row._id),L()},L,()=>{o(0,d=o(2,u="")),r("change",{value:d,description:u}),r("task",{row:{_task:{event:q.id,_id:!1}}})},async()=>{if(!d)return;const e=await Ni(a.refClass,q.id,d),t=e._task._id;return`/task/${e._task.event}/${t}/task?view=standalone`},b,$,x,function(e){C=e,o(15,C)},function(e){j=e,o(16,j)}]}class Xo extends be{constructor(e){var t;super(),zo.getElementById("svelte-jox15l-style")||((t=N("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}",x(zo.head,t)),ve(this,e,Ko,Qo,b,{id:4,item:5,value:0,desc:2,noForm:6,classId:7,eventId:28,recordId:8,required:1,disabled:3,readonly:27,praefix:9,selectionFields:10,formnovalidate:29,selection:11,deList:12,isTemplate:13},[-1,-1])}}function er(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],pattern:e[22],required:e[2],id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function tr(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],required:e[2],type:"email",id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function nr(e){let t,n;return t=new On({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[14],required:e[2],id:e[24],item:e[1],value:e[16](),praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("checkRange",e[33]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function or(e){let t,n;return t=new Ln({props:{classId:e[5],id:e[24],disabled:e[7],required:e[2],value:e[25](),noForm:e[4]}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function rr(e){let t,n;return t=new e[20]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[24],name:e[23],value:e[25](),closeOnSelection:!0}}),t.$on("change",e[26](!0)),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function ir(e){let t,n;return t=new e[21]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[14],required:e[2],id:e[24],name:e[23],checked:e[16]()}}),t.$on("change",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),16512&n[0]&&(o.disabled=e[7]||e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.checked=e[16]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function lr(e){let t,n;return t=new pn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[32]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function sr(e){let t,n;return t=new Vt({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[31]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function ar(e){let t,n;return t=new bn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function cr(e){let t,n;return t=new ct({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[14],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function dr(e){let t,n;return t=new r({props:{classId:e[5],disabled:e[7],readonly:e[14],id:e[24],name:e[1].name,value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.name=e[1].name),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function ur(e){let t,n;return t=new Xo({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[14],id:e[24],item:e[1],desc:e[17],value:e[16](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[30]),t.$on("change",e[26]()),t.$on("initFail",e[27]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),131072&n[0]&&(o.desc=e[17]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function mr(e){let t,n,o,r;const i=[ur,dr,cr,ar,sr,lr,ir,rr,or,nr,tr,er],l=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=C()},m(e,n){l[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(se(),de(l[a],1,1,(()=>{l[a]=null})),ae(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){l[t].d(e),e&&I(o)}}}function fr(e){let t,n;return t=new e[18]({props:{id:e[28](e[24]),class:e[1].name+(e[15]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[mr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32770&n[0]&&(o.class=e[1].name+(e[15]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),229375&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function pr(e,t,n){let o,r,i;const l=W(),{FormField:s,TextField:a,DatePicker:u,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:N}=t,{required:j}=t,{isTemplate:_}=t,{required:q,readonly:C,hidden:S,pattern:L}=$.properties||{};if(S=!0===S,void 0!==C&&(C=!0===C),void 0===j&&(j=q),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const E=(h?h+".":"")+$.name,z=E+(""!==p?"-"+p:""),T=(e,t=E)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(29,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,w=e.eventId),"disabled"in e&&n(7,y=e.disabled),"selectionFields"in e&&n(8,x=e.selectionFields),"formnovalidate"in e&&n(9,k=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,F=e.numberInput),"deList"in e&&n(12,N=e.deList),"required"in e&&n(2,j=e.required),"isTemplate"in e&&n(13,_=e.isTemplate)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(16,o=(e=E)=>{let t=T(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=T(g))},n(17,r=((e=E)=>{let t=g["_"+e];return t=d(t),void 0===t?"":t})()),[g,$,j,p,v,b,w,y,x,k,I,F,N,_,C,S,o,r,s,a,u,f,L,E,z,(e=E)=>{let t=T(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,g[E]=e?kn(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;l("notify",{oldValue:i,value:o,add:s,itemName:E,desc:t.description})},()=>n(15,S=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)}]}class $r extends be{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=N("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",x(document.head,t)),ve(this,e,pr,fr,b,{praefix:3,item:1,listName:29,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13},[-1,-1])}}const{document:hr}=fe;function gr(e,t,n){const o=e.slice();return o[69]=t[n],o[71]=n,o}function vr(e,t,n){const o=e.slice();return o[78]=t[n],o}function br(e,t,n){const o=e.slice();return o[73]=t[n].title,o[74]=t[n].toDelete,o[75]=t[n].icon,o}function wr(e){let t,n;return t=new e[13]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[yr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function yr(e){let t,n,o;function r(t){e[40](t)}let i={item:e[23],disabled:!0};return void 0!==e[6]&&(i.value=e[6]),t=new ct({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};!n&&64&o[0]&&(n=!0,r.value=e[6],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function xr(e){let t,n;return t=new e[13]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[kr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};512&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function kr(e){let t,n,o;function r(t){e[41](t)}let i={item:e[21],disabled:!0};return void 0!==e[9]&&(i.value=e[9]),t=new ct({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};!n&&512&o[0]&&(n=!0,r.value=e[9],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function Ir(e){let t,n;return t=new e[13]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[Fr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};32&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Fr(e){let t,n,o;function r(t){e[42](t)}let i={item:e[19],disabled:!0};return void 0!==e[5]&&(i.value=e[5]),t=new ct({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};!n&&32&o[0]&&(n=!0,r.value=e[5],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function Nr(e){let t,n;return t=new e[16]({props:{class:e[10][e[71]],$$slots:{handle:[zr,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]],default:[Cr,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){v(e[68])&&e[68].apply(this,arguments)})),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(n,o){e=n;const r={};1024&o[0]&&(r.class=e[10][e[71]]),6543&o[0]|525312&o[2]&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function jr(e){let t,n;return t=new $r({props:{praefix:e[71],item:e[78],eventId:e[3],record:e[69],noForm:Mr,classId:e[2],disabled:e[0],required:e[17],selectionFields:e[24],numberInput:e[12],formnovalidate:e[71]===e[7].length-1||e[7][e[71]]._delete}}),t.$on("notify",(function(){v(e[26](e[78],e[71]))&&e[26](e[78],e[71]).apply(this,arguments)})),t.$on("task",e[43]),t.$on("invalid",e[27]),t.$on("checkRange",e[28]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.item=e[78]),8&o[0]&&(r.eventId=e[3]),128&o[0]&&(r.record=e[69]),4&o[0]&&(r.classId=e[2]),1&o[0]&&(r.disabled=e[0]),4096&o[0]&&(r.numberInput=e[12]),128&o[0]&&(r.formnovalidate=e[71]===e[7].length-1||e[7][e[71]]._delete),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function _r(e){let t,n,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=jr(vr(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(486674575&n[0]){let l;for(o=e[1].item,l=0;l<o.length;l+=1){const i=vr(e,o,l);r[l]?(r[l].p(i,n),ce(r[l],1)):(r[l]=jr(i),r[l].c(),ce(r[l],1),r[l].m(t.parentNode,t))}for(se(),l=o.length;l<r.length;l+=1)i(l);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function qr(e){let t,n,o=e[7][e[71]]._delete,r=_r(e);return{c(){r.c(),t=C()},m(e,o){r.m(e,o),k(e,t,o),n=!0},p(e,n){128&n[0]&&b(o,o=e[7][e[71]]._delete)?(se(),de(r,1,1,p),ae(),r=_r(e),r.c(),ce(r),r.m(t.parentNode,t)):r.p(e,n)},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){e&&I(t),r.d(e)}}}function Cr(e){let t,n,o,r,i=e[7].length,l=qr(e);return{c(){t=N("div"),l.c(),o=q(),z(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`)},m(e,n){k(e,t,n),l.m(t,null),k(e,o,n),r=!0},p(e,o){128&o[0]&&b(i,i=e[7].length)?(se(),de(l,1,1,p),ae(),l=qr(e),l.c(),ce(l),l.m(t,null)):l.p(e,o),(!r||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`))&&z(t,"id",n)},i(e){r||(ce(l),r=!0)},o(e){de(l),r=!1},d(e){e&&I(t),l.d(e),e&&I(o)}}}function Sr(e){let t,n,o,r,i,l=e[25](e[8],e[71])+"";return{c(){t=N("div"),n=_(l),z(t,"class",o=y("draggableListItem "+e[1].name)+" svelte-1es1ap1"),z(t,"draggable",!0),B(t,"delete",e[69]._delete),B(t,"is-active-top",e[11]?.top===e[71]),B(t,"is-active-bottom",e[11]?.bottom===e[71])},m(o,l){k(o,t,l),x(t,n),r||(i=[S(t,"dragover",e[34]),S(t,"dragleave",e[35](e[71])),S(t,"dragstart",e[32](e[71])),S(t,"drop",L(e[31](e[71]))),S(t,"dragenter",e[33](e[71]))],r=!0)},p(r,i){e=r,256&i[0]&&l!==(l=e[25](e[8],e[71])+"")&&T(n,l),2&i[0]&&o!==(o=y("draggableListItem "+e[1].name)+" svelte-1es1ap1")&&z(t,"class",o),130&i[0]&&B(t,"delete",e[69]._delete),2050&i[0]&&B(t,"is-active-top",e[11]?.top===e[71]),2050&i[0]&&B(t,"is-active-bottom",e[11]?.bottom===e[71])},d(e){e&&I(t),r=!1,g(i)}}}function Lr(e){let t,n,o;var r=e[75];return r&&(t=new r({props:{size:"20"}})),{c(){t&&$e(t.$$.fragment),n=C()},m(e,r){t&&he(t,e,r),k(e,n,r),o=!0},p(e,o){if(r!==(r=e[75])){if(t){se();const e=t;de(e.$$.fragment,1,0,(()=>{ge(e,1)})),ae()}r?(t=new r({props:{size:"20"}}),$e(t.$$.fragment),ce(t.$$.fragment,1),he(t,n.parentNode,n)):t=null}},i(e){o||(t&&ce(t.$$.fragment,e),o=!0)},o(e){t&&de(t.$$.fragment,e),o=!1},d(e){e&&I(n),t&&ge(t,e)}}}function Er(e){let t,n,o,r,i,l=!e[0]&&Lr(e);return{c(){t=N("span"),l&&l.c(),z(t,"class","pointer icon svelte-1es1ap1"),z(t,"title",e[73]),t.hidden=n=e[71]===e[7].length-1||!(e[69]._delete^e[74])},m(n,s){k(n,t,s),l&&l.m(t,null),o=!0,r||(i=S(t,"click",e[30](e[71])),r=!0)},p(r,i){(e=r)[0]?l&&(se(),de(l,1,1,(()=>{l=null})),ae()):l?(l.p(e,i),1&i[0]&&ce(l,1)):(l=Lr(e),l.c(),ce(l,1),l.m(t,null)),(!o||128&i[0]&&n!==(n=e[71]===e[7].length-1||!(e[69]._delete^e[74])))&&(t.hidden=n)},i(e){o||(ce(l),o=!0)},o(e){de(l),o=!1},d(e){e&&I(t),l&&l.d(),r=!1,i()}}}function zr(e){let t,n,o,r,i,l;n=new e[14]({props:{$$slots:{default:[Sr]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[29](e[72],e[71]))&&e[29](e[72],e[71]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Se}],a=[];for(let t=0;t<2;t+=1)a[t]=Er(br(e,s,t));const c=e=>de(a[e],1,1,(()=>{a[e]=null}));return{c(){t=N("div"),$e(n.$$.fragment),o=q();for(let e=0;e<2;e+=1)a[e].c();r=q(),z(t,"class",i=y("accordion "+e[1].name)+" svelte-1es1ap1"),z(t,"slot","handle")},m(e,i){k(e,t,i),he(n,t,null),x(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);x(t,r),l=!0},p(o,d){e=o;const u={};if(2434&d[0]|524288&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),1073741953&d[0]){let n;for(s=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Se}],n=0;n<2;n+=1){const o=br(e,s,n);a[n]?(a[n].p(o,d),ce(a[n],1)):(a[n]=Er(o),a[n].c(),ce(a[n],1),a[n].m(t,r))}for(se(),n=2;n<2;n+=1)c(n);ae()}(!l||2&d[0]&&i!==(i=y("accordion "+e[1].name)+" svelte-1es1ap1"))&&z(t,"class",i)},i(e){if(!l){ce(n.$$.fragment,e);for(let e=0;e<2;e+=1)ce(a[e]);l=!0}},o(e){de(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)de(a[e]);l=!1},d(e){e&&I(t),ge(n),F(a,e)}}}function Tr(e){let t,n,o=(!e[4]&&!e[0]||e[71]<e[7].length-1)&&Nr(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){!e[4]&&!e[0]||e[71]<e[7].length-1?o?(o.p(e,n),145&n[0]&&ce(o,1)):(o=Nr(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(se(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Dr(e){let t,n,o=e[7],r=[];for(let t=0;t<o.length;t+=1)r[t]=Tr(gr(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(2130845087&n[0]|31&n[1]|1088&n[2]){let l;for(o=e[7],l=0;l<o.length;l+=1){const i=gr(e,o,l);r[l]?(r[l].p(i,n),ce(r[l],1)):(r[l]=Tr(i),r[l].c(),ce(r[l],1),r[l].m(t.parentNode,t))}for(se(),l=o.length;l<r.length;l+=1)i(l);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function Or(e){let t,n,o,r,i,l,s=e[22]&&0!=e[6]&&wr(e),a=e[20]&&0!=e[9]&&xr(e),c=e[18]&&0!=e[5]&&Ir(e);return i=new e[15]({props:{$$slots:{default:[Dr,({closeOtherPanels:e})=>({68:e}),({closeOtherPanels:e})=>[0,0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=N("div"),s&&s.c(),n=q(),a&&a.c(),o=q(),c&&c.c(),r=q(),$e(i.$$.fragment),z(t,"class","formList")},m(e,d){k(e,t,d),s&&s.m(t,null),x(t,n),a&&a.m(t,null),x(t,o),c&&c.m(t,null),x(t,r),he(i,t,null),l=!0},p(e,l){e[22]&&0!=e[6]?s?(s.p(e,l),64&l[0]&&ce(s,1)):(s=wr(e),s.c(),ce(s,1),s.m(t,n)):s&&(se(),de(s,1,1,(()=>{s=null})),ae()),e[20]&&0!=e[9]?a?(a.p(e,l),512&l[0]&&ce(a,1)):(a=xr(e),a.c(),ce(a,1),a.m(t,o)):a&&(se(),de(a,1,1,(()=>{a=null})),ae()),e[18]&&0!=e[5]?c?(c.p(e,l),32&l[0]&&ce(c,1)):(c=Ir(e),c.c(),ce(c,1),c.m(t,r)):c&&(se(),de(c,1,1,(()=>{c=null})),ae());const d={};7583&l[0]|524352&l[2]&&(d.$$scope={dirty:l,ctx:e}),i.$set(d)},i(e){l||(ce(s),ce(a),ce(c),ce(i.$$.fragment,e),l=!0)},o(e){de(s),de(a),de(c),de(i.$$.fragment,e),l=!1},d(e){e&&I(t),s&&s.d(),a&&a.d(),c&&c.d(),ge(i)}}}let Br=new Map;const Mr=!0,Ar="pos/target";function Vr(e,t,n){let o,r;const{FormField:i,TextField:l,Button:s,Accordion:a,AccordionSection:f,Divider:p}=c,$=W();let{list:h}=t,{schema:g}=t,{record:v}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{fixed:x}=t,{template:k={}}=t;const I=g.find((e=>"price"===e.name&&!e.properties?.hidden)),F=I&&g.find((e=>"quantity"===e.name));let N=0;const j=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let _=0;const q=g.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",C=!!q;let S=0;const L={};let E=g.properties?.readonly,z=b.split("form-")[1].slice(0,-4);y||=E;let T,D,O=[],B=[],M=!1,A={},V=[];g.filter((e=>e.selection)).map((e=>O.push({className:z,parentClass:g,refClass:e.selection,value:""})));["readonly","hidden","required"].map((e=>{g.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[o,r]=n.split(".");r||(r=o,o=void 0),V.push({action:e,itemName:t.name,refObj:o,refName:r,op:t.properties[e].invert?"!":""})}))}));const P=async(e,t)=>{const o=V.filter((e=>(e.refObj||z)===t));if(o?.length)for(const t of o){const{action:o,itemName:r,refObj:i,refName:l,op:s}=t;let a,c,d=!1,u=!1;if(i){const t=T[e][i];i===z&&l?d=v:t&&(d=await qi(i,t))}!i&&l&&(d=T[e]),d&&(u=d[l],"!"===s&&(u=!u)),"required"!==o&&"readonly"!==o||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${r} .field textarea`,c=document.querySelector(a),c||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${r} .field input`,c=document.querySelector(a)),c&&u&&c.setAttribute(o,"true"),c&&!u&&c.removeAttribute(o)),"hidden"===o&&(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${r}`,c=document.querySelector(a),c?.classList?.toggle("hidden",u),u&&n(7,T[e][r]="",T))}},H=(e,t)=>{let o=`#accordion-content-${b}-${h.name}-${e} .form-field .field :required`;const r=document.querySelectorAll(o);let i=!1;r.forEach((e=>{""===e.value&&(i=!0)})),void 0===t&&(o=`#accordion-content-${b}-${h.name}-${e} .form-field .field input.invalid`,document.querySelector(o)&&(t=!0)),n(10,B[e]=i||t?"invalid":"",B)},Y=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},G=(e,t)=>{if(!t)return;const o=g.find((e=>e.name===t)),r=o.properties.value.formula,{operator:i,argument:l}=r,s=l.map((t=>T[e][t.refItem]));let a=0;"$add"===i&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===i&&(a=s.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[r,i]=t.split(":");return r?e-=i?(+r+ +i/60).toFixed(2):+r:0}))),n(7,T[e][t]=(a||0).toFixed(o.properties.decimals||0),T),n(12,A={item:o,value:a,idx:e})};D=g.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=g.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[r]=o.split(".");r&&e.push({refClass:r,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const J=async(e,t,o,r)=>{const i=(await D).find((e=>e.refClass===t.refClass));if(!i)return;const{refClass:l,items:s,selection:a}=i;return o?Promise.all(s.map((i=>{let c="";const{refInput:d}=t;if(d&&T[e]){const[t,n]=d.split(".");c=n?T[e][n]:v[t]}if(a&&o!==r)s.map((t=>{n(7,T[e][t]="",T)}));else if(d&&!c||U(e,i)){const o=g.find((e=>e.refClass===l)),r=T[e][o.name];if(t.selection){const o=_i(t.selection+r.toString());if(o)return Promise.resolve(o).then((t=>n(7,T[e][i]=t[i],T)))}return Promise.resolve(qi(o.refClass,r)).then((t=>n(7,T[e][i]=t[i],T)))}}))):Promise.resolve(s.map((t=>{n(7,T[e][t]="",T)})))},U=(e,t)=>{let n=T[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},Z=e=>!(!x&&e>=T.length-1),Q=(e,t=!1)=>{const[n,o]=e.split(";");return h.name===o&&(!!Z(t)&&((!1===t||t!=n)&&parseInt(n)))};return g.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=g.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&n(1,h=e.list),"schema"in e&&n(36,g=e.schema),"record"in e&&n(37,v=e.record),"classId"in e&&n(2,b=e.classId),"eventId"in e&&n(3,w=e.eventId),"disabled"in e&&n(0,y=e.disabled),"fixed"in e&&n(4,x=e.fixed),"template"in e&&n(38,k=e.template)},e.$$.update=()=>{2&e.$$.dirty[0]|64&e.$$.dirty[1]&&v&&n(7,T=(v[h.name]||[]).concat({})),128&e.$$.dirty[0]&&n(8,o=T),482&e.$$.dirty[0]&&o&&((()=>{if(j)n(9,_=T?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(C)n(6,S=T?.reduce(((e,t)=>e+(t._delete?0:+(t[q]||0))),0)||0)})(),(()=>{if(I)n(5,N=T?.reduce(((e,t)=>{if(t.price){const n=(F?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:h.name,value:T,amountValue:N,weeksValue:S})),256&e.$$.dirty[1]&&(r=e=>L[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,h,b,w,x,N,S,T,o,_,B,M,A,i,s,a,f,undefined,I,{name:"amountValue",properties:{decimals:2}},j,{name:"hoursValue",properties:{decimals:2}},C,{name:"weeksValue",properties:{decimals:1}},O,(e,t)=>{const n=e[t];return n&&g.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):"boolean"===e.type?m(n[e.name]):"date"===e.type?d(n[e.name]):"datetime"===e.type?u(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:r})=>{const{oldValue:i,value:l,add:s,desc:a}=r;P(t,e.name),G(t,e._formulaActor);const c=O?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,l)),l&&T.length===t+1&&n(7,T=T.concat({})),a&&n(39,L[l]=a,L),await J(t,e,l,i),n(8,o=T),"number"===e.type&&n(12,A={item:e,value:l,idx:t}),H(t)},({detail:e})=>{const{idx:t,value:n}=e;H(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const r=Y(o);let i=!1;T.forEach(((e,n)=>{if(t===n)return;const{start:o,end:l}=T[n];o&&l&&r>Y(o)&&r<Y(l)&&(i=!0)}));const l=document.getElementById(n);l?.classList?.toggle("invalid",i)},(e,t)=>o=>{(e=>{const t=k[h.name]||{};for(const o in t)k[h.name][o]&&!T[e][o]&&n(7,T[e][o]=k[h.name][o],T)})(t),e(o);const r=`#accordion-content-${b}-${h.name}-${t} > div.form-field:not(.hidden)`,i=document.querySelectorAll(r),l=i[i.length-1];K().then((()=>l.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(7,T[e]._delete=!T[e]._delete,T)},e=>t=>{t.preventDefault(),n(11,M=!1);const o=Q(t.dataTransfer.getData(Ar),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const r=[...T].map(((e,t)=>(e._index=t,e)));o<e?(r.splice(e+1,0,r[o]),r.splice(o,1)):(r.splice(e,0,r[o]),r.splice(o+1,1)),r.map(((e,t)=>{return n=e._index,o=t,void Br.set(o,n);var n,o}));let i=[];B.map(((e,t)=>{i[t]=B[(e=>{const t=Br.get(e);return void 0===t?e:t})(t)]})),n(10,B=i),n(7,T=r.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!Z(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(Ar,e+";"+h.name)},e=>t=>{const o=Q(t.dataTransfer.getData(Ar),e);return!1===o||o===e?n(11,M=!1):void n(11,M={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(11,M=!1)},g,v,k,L,function(e){S=e,n(6,S)},function(e){_=e,n(9,_)},function(e){N=e,n(5,N)},function(t){R(e,t)}]}class Pr extends be{constructor(e){var t;super(),hr.getElementById("svelte-1es1ap1-style")||((t=N("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",x(hr.head,t)),ve(this,e,Vr,Or,b,{list:1,schema:36,record:37,classId:2,eventId:3,disabled:0,fixed:4,template:38},[-1,-1,-1])}}const{document:Wr}=fe;function Rr(e,t,n){const o=e.slice();return o[22]=t[n],o}function Hr(e){let t,n;return t=new $r({props:{classId:e[2],item:e[22],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5]}}),t.$on("notify",e[12]),t.$on("task",e[17]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[22]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),32&n&&(o.required=e[5]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Yr(e){let t,n,o=e[14](e[5],e[22]),r=o&&Hr(e);return{c(){r&&r.c(),t=C()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){34&n&&(o=e[14](e[5],e[22])),o?r?(r.p(e,n),34&n&&ce(r,1)):(r=Hr(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(se(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function Gr(e){let t,n,o,r=e[1].item,i=[];for(let t=0;t<r.length;t+=1)i[t]=Yr(Rr(e,r,t));const l=e=>de(i[e],1,1,(()=>{i[e]=null}));return{c(){t=N("div");for(let e=0;e<i.length;e+=1)i[e].c();z(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){k(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null);o=!0},p(e,s){if(20543&s){let n;for(r=e[1].item,n=0;n<r.length;n+=1){const o=Rr(e,r,n);i[n]?(i[n].p(o,s),ce(i[n],1)):(i[n]=Yr(o),i[n].c(),ce(i[n],1),i[n].m(t,null))}for(se(),n=r.length;n<i.length;n+=1)l(n);ae()}(!o||6&s&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&z(t,"id",n)},i(e){if(!o){for(let e=0;e<r.length;e+=1)ce(i[e]);o=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)de(i[e]);o=!1},d(e){e&&I(t),F(i,e)}}}function Jr(e){let t,n,o=e[11](e[7])+"";return{c(){t=N("span"),n=_(o)},m(e,o){k(e,t,o),x(t,n)},p(e,t){128&t&&o!==(o=e[11](e[7])+"")&&T(n,o)},d(e){e&&I(t)}}}function Ur(e){let t,n,o;return n=new e[8]({props:{$$slots:{default:[Jr]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[13](e[21]))&&e[13](e[21]).apply(this,arguments)})),{c(){t=N("div"),$e(n.$$.fragment),z(t,"class","accordion svelte-148ktt9"),z(t,"slot","handle")},m(e,r){k(e,t,r),he(n,t,null),o=!0},p(t,o){e=t;const r={};33554560&o&&(r.$$scope={dirty:o,ctx:e}),n.$set(r)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n)}}}function Zr(e){let t,n;return t=new e[10]({props:{open:e[6],$$slots:{handle:[Ur,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0],default:[Gr,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.open=e[6]),35651775&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Qr(e){let t,n,o;return n=new e[9]({props:{$$slots:{default:[Zr]},$$scope:{ctx:e}}}),{c(){t=N("div"),$e(n.$$.fragment),z(t,"class","formList")},m(e,r){k(e,t,r),he(n,t,null),o=!0},p(e,[t]){const o={};33554687&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),ge(n)}}}function Kr(e,t,n){const{Button:o,Accordion:r,AccordionSection:i}=c;let{list:l}=t,{schema:s}=t,{record:a}=t,{classId:f}=t,{eventId:p}=t,{disabled:$}=t,{required:h}=t,{open:g=!1}=t,{template:v={}}=t;const b={};let w=a[l.name]||{};a[l.name]=w;const y=e=>b[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,l=e.list),"schema"in e&&n(15,s=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,f=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled),"required"in e&&n(5,h=e.required),"open"in e&&n(6,g=e.open),"template"in e&&n(16,v=e.template)},[a,l,f,p,$,h,g,w,o,r,i,e=>s.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?y(t.name):"boolean"===t.type?m(e[t.name]):"date"===t.type?d(e[t.name]):"datetime"===t.type?u(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(b[o]=e.desc);const r=a[t];n(0,a[t]={...r,[o]:e.value},a),n(7,w=a[t])},e=>t=>{(()=>{const e=v[l.name]||{};for(const t in e)v[l.name][t]&&!a[l.name][t]&&n(0,a[l.name][t]=v[l.name][t],a)})(),e(t);const o=`#accordion-content-${f}-${l.name} > div.form-field:last-child`,r=document.querySelector(o);K().then((()=>r.scrollIntoView({behavior:"smooth",block:"end"})))},(e,t)=>{let n=t.type;return"time"===t.properties?.format&&(n="time"),!1!==e||!["date","datetime","time"].includes(n)},s,v,function(t){R(e,t)}]}class Xr extends be{constructor(e){var t;super(),Wr.getElementById("svelte-148ktt9-style")||((t=N("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}}",x(Wr.head,t)),ve(this,e,Kr,Qr,b,{list:1,schema:15,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:16})}}const{Boolean:ei,document:ti}=fe;function ni(e,t,n){const o=e.slice();return o[72]=t[n],o}function oi(e,t,n){const o=e.slice();return o[75]=t[n],o}function ri(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function ii(e){let t,n,o=e[71]&&function(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,v,b,w=e[0].items,j=[];for(let t=0;t<w.length;t+=1)j[t]=si(oi(e,w,t));const _=e=>de(j[e],1,1,(()=>{j[e]=null}));let C=e[0].list&&ai(e);m=new e[9]({props:{outline:!0,$$slots:{default:[hi]},$$scope:{ctx:e}}}),m.$on("click",e[20]),p=new e[9]({props:{class:"close",disabled:e[6],form:e[11],filled:!0,type:"submit",$$slots:{default:[gi]},$$scope:{ctx:e}}});let E=e[1]&&!e[6]&&vi(e);return{c(){t=N("section"),n=N("form"),o=N("input"),i=q();for(let e=0;e<j.length;e+=1)j[e].c();l=q(),C&&C.c(),s=q(),a=N("div"),c=N("small"),c.textContent=`${Li}`,d=q(),u=N("div"),$e(m.$$.fragment),f=q(),$e(p.$$.fragment),$=q(),E&&E.c(),z(o,"class",y(e[11])+" svelte-1dh1s6w"),z(o,"name","_id"),z(o,"type","hidden"),o.value=r=e[2]._id||"",z(n,"class",y(e[12])+" svelte-1dh1s6w"),z(n,"id",e[11]),z(a,"class","comment svelte-1dh1s6w"),z(u,"class","form--buttons svelte-1dh1s6w"),z(t,"class",y(e[13])+" svelte-1dh1s6w")},m(r,g){k(r,t,g),x(t,n),x(n,o),x(n,i);for(let e=0;e<j.length;e+=1)j[e].m(n,null);x(n,l),C&&C.m(n,null),x(t,s),x(t,a),x(a,c),x(t,d),x(t,u),he(m,u,null),x(u,f),he(p,u,null),x(u,$),E&&E.m(u,null),h=!0,v||(b=[S(n,"keydown",e[24]),S(n,"submit",L(e[19]))],v=!0)},p(e,t){if((!h||4&t[0]&&r!==(r=e[2]._id||""))&&(o.value=r),39848005&t[0]){let o;for(w=e[0].items,o=0;o<w.length;o+=1){const r=oi(e,w,o);j[o]?(j[o].p(r,t),ce(j[o],1)):(j[o]=si(r),j[o].c(),ce(j[o],1),j[o].m(n,l))}for(se(),o=w.length;o<j.length;o+=1)_(o);ae()}e[0].list?C?(C.p(e,t),1&t[0]&&ce(C,1)):(C=ai(e),C.c(),ce(C,1),C.m(n,null)):C&&(se(),de(C,1,1,(()=>{C=null})),ae());const i={};65536&t[2]&&(i.$$scope={dirty:t,ctx:e}),m.$set(i);const s={};64&t[0]&&(s.disabled=e[6]),65536&t[2]&&(s.$$scope={dirty:t,ctx:e}),p.$set(s),e[1]&&!e[6]?E?(E.p(e,t),66&t[0]&&ce(E,1)):(E=vi(e),E.c(),ce(E,1),E.m(u,null)):E&&(se(),de(E,1,1,(()=>{E=null})),ae())},i(e){if(!h){for(let e=0;e<w.length;e+=1)ce(j[e]);ce(C),ce(m.$$.fragment,e),ce(p.$$.fragment,e),ce(E),h=!0}},o(e){j=j.filter(ei);for(let e=0;e<j.length;e+=1)de(j[e]);de(C),de(m.$$.fragment,e),de(p.$$.fragment,e),de(E),h=!1},d(e){e&&I(t),F(j,e),C&&C.d(),ge(m),ge(p),E&&E.d(),v=!1,g(b)}}}(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,t){e[71]&&o.p(e,t)},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function li(e){let t,n;return t=new $r({props:{classId:e[11],item:e[75],selection:e[75].selection,record:e[2],disabled:e[6],eventId:e[0].id}}),t.$on("task",e[21]),t.$on("notify",e[22]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[75]),1&n[0]&&(o.selection=e[75].selection),4&n[0]&&(o.record=e[2]),64&n[0]&&(o.disabled=e[6]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function si(e){let t,n,o="list"!==e[75].type&&e[25](!0,e[75].name),r=o&&li(e);return{c(){r&&r.c(),t=C()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){1&n[0]&&(o="list"!==e[75].type&&e[25](!0,e[75].name)),o?r?(r.p(e,n),1&n[0]&&ce(r,1)):(r=li(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(se(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function ai(e){let t,n,o,r,i=e[15]&&0!=e[3]&&ci(e),l=e[16]&&0!=e[4]&&ui(e),s=e[0].list,a=[];for(let t=0;t<s.length;t+=1)a[t]=$i(ni(e,s,t));const c=e=>de(a[e],1,1,(()=>{a[e]=null}));return{c(){i&&i.c(),t=q(),l&&l.c(),n=q();for(let e=0;e<a.length;e+=1)a[e].c();o=C()},m(e,s){i&&i.m(e,s),k(e,t,s),l&&l.m(e,s),k(e,n,s);for(let t=0;t<a.length;t+=1)a[t].m(e,s);k(e,o,s),r=!0},p(e,r){if(e[15]&&0!=e[3]?i?(i.p(e,r),8&r[0]&&ce(i,1)):(i=ci(e),i.c(),ce(i,1),i.m(t.parentNode,t)):i&&(se(),de(i,1,1,(()=>{i=null})),ae()),e[16]&&0!=e[4]?l?(l.p(e,r),16&r[0]&&ce(l,1)):(l=ui(e),l.c(),ce(l,1),l.m(n.parentNode,n)):l&&(se(),de(l,1,1,(()=>{l=null})),ae()),8390757&r[0]){let t;for(s=e[0].list,t=0;t<s.length;t+=1){const n=ni(e,s,t);a[t]?(a[t].p(n,r),ce(a[t],1)):(a[t]=$i(n),a[t].c(),ce(a[t],1),a[t].m(o.parentNode,o))}for(se(),t=s.length;t<a.length;t+=1)c(t);ae()}},i(e){if(!r){ce(i),ce(l);for(let e=0;e<s.length;e+=1)ce(a[e]);r=!0}},o(e){de(i),de(l),a=a.filter(ei);for(let e=0;e<a.length;e+=1)de(a[e]);r=!1},d(e){i&&i.d(e),e&&I(t),l&&l.d(e),e&&I(n),F(a,e),e&&I(o)}}}function ci(e){let t,n;return t=new e[10]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[di]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};8&n[0]|65536&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function di(e){let t,n,o;function r(t){e[35](t)}let i={item:e[14],disabled:!0};return void 0!==e[3]&&(i.value=e[3]),t=new ct({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};!n&&8&o[0]&&(n=!0,r.value=e[3],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function ui(e){let t,n;return t=new e[10]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[mi]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};16&n[0]|65536&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function mi(e){let t,n,o;function r(t){e[36](t)}let i={item:e[17],disabled:!0};return void 0!==e[4]&&(i.value=e[4]),t=new ct({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};!n&&16&o[0]&&(n=!0,r.value=e[4],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function fi(e){let t,n;return t=new Xr({props:{classId:e[11],list:e[72],template:e[5],eventId:e[0].id,schema:e[72].item,record:e[2],disabled:e[6]}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[72]),32&n[0]&&(o.template=e[5]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[72].item),4&n[0]&&(o.record=e[2]),64&n[0]&&(o.disabled=e[6]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function pi(e){let t,n;return t=new Pr({props:{classId:e[11],list:e[72],template:e[5],eventId:e[0].id,schema:e[72].item,record:e[2],disabled:e[6],fixed:e[72].fixed}}),t.$on("save",e[23]),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[72]),32&n[0]&&(o.template=e[5]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[72].item),4&n[0]&&(o.record=e[2]),64&n[0]&&(o.disabled=e[6]),1&n[0]&&(o.fixed=e[72].fixed),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function $i(e){let t,n,o,r,i,l;t=new e[8]({props:{text:e[72].designation}});const s=[pi,fi],a=[];function c(e,t){return"array"===e[72].type?0:1}return o=c(e),r=a[o]=s[o](e),{c(){$e(t.$$.fragment),n=q(),r.c(),i=C()},m(e,r){he(t,e,r),k(e,n,r),a[o].m(e,r),k(e,i,r),l=!0},p(e,n){const l={};1&n[0]&&(l.text=e[72].designation),t.$set(l);let d=o;o=c(e),o===d?a[o].p(e,n):(se(),de(a[d],1,1,(()=>{a[d]=null})),ae(),r=a[o],r?r.p(e,n):(r=a[o]=s[o](e),r.c()),ce(r,1),r.m(i.parentNode,i))},i(e){l||(ce(t.$$.fragment,e),ce(r),l=!0)},o(e){de(t.$$.fragment,e),de(r),l=!1},d(e){ge(t,e),e&&I(n),a[o].d(e),e&&I(i)}}}function hi(e){let t;return{c(){t=_("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function gi(e){let t;return{c(){t=_("Speichern und schliessen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function vi(e){let t,n;return t=new e[9]({props:{form:e[11],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[bi]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};65536&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function bi(e){let t;return{c(){t=_("Speichern")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function wi(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function yi(e){let t,n,o,r;ti.title=t=e[7];let i={ctx:e,current:null,token:null,hasCatch:!1,pending:wi,then:ii,catch:ri,value:71,blocks:[,,,]};return ue(e[18](),i),{c(){n=q(),o=C(),i.block.c()},m(e,t){k(e,n,t),k(e,o,t),i.block.m(e,i.anchor=t),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(n,o){e=n,(!r||128&o[0])&&t!==(t=e[7])&&(ti.title=t),me(i,e,o)},i(e){r||(ce(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}let xi=new Map,ki=new Map,Ii=new Map;const Fi=(e,n)=>{const o=n;return xi.has(o)||xi.set(o,t.getTasksList(n).then((({data:e})=>e))),xi.get(o)},Ni=(e,n,o)=>ki.get(o)||Fi(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(ki.set(o,e),e))),ji=(e,t)=>{Ii.set(e,t)},_i=e=>Ii.get(e),qi=(e,n)=>Ii.get(n)||t.getTask(e,n).then((e=>(Ii.set(n,e),e))),Ci=(e,n)=>{if(!xi.get(n))return;const o=n;xi.set(o,t.getTasksList(n).then((({data:e})=>e)))},Si=()=>{xi=new Map,ki=new Map,Ii=new Map};let Li="";function Ei(e,r,a){let d,u,m,p;w(e,l,(e=>a(43,m=e))),w(e,s,(e=>a(44,p=e)));const{Divider:$,Button:h,FormField:g}=c,v=JSON.parse(o.getItem("Locale")),b=W();let y,x,{schema:k}=r,{recID:I}=r,{prevEventID:F=!1}=r,{prev:N=!1}=r,{taskId:j=!1}=r,{description:_=""}=r,{root:q=!1}=r,{readonly:C}=r,{isStandalone:S}=r,L={},E={},z="form-"+k.class+Math.floor(9e3*Math.random()+1e3).toString();const T=q?"fEmbedded":"fTask",D=q?"sEmbedded":"sTask";let O=0,B=0,M=1;const A={},V=k.items.find((e=>"price"===e.name&&!e.properties?.hidden)),R=k.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),H=!!V,Y=k.list?.filter((e=>"array"===e.type))?.length>1||H,G=k.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,J=!!G,U=k.list?.filter((e=>"array"===e.type))?.length>1||J,Z={};let Q,K=0,X=0,ee=[];k.class;["readonly","hidden","required"].map((e=>{k.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[o,r]=n.split(".");ee.push({action:e,itemName:t.name,refObj:o,refName:r,op:t.properties[e].invert?"!":""})}))}));const te=async()=>{if(!k.input)return;if(!k.input.length)return;if(k.input.length<2)return;const e=await t.getEvent(k.id),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,r=e.input.class[1].destination?.split(".")[0];if(!o||!r)return;const i=k.list?.find((e=>e.name===o));if(!i)return;const l=await t.getSchemaByClass(n),s=(await t.getTasks(l.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of i.item)n.name===r?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,L[o]=c,L)},ne=()=>{for(const e of k.items)e.properties?.value?.concatenation&&oe(e)},oe=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await ie(e.refItemNext));a(2,L[e.name]=n,L)},re=async e=>{const t=ee.filter((t=>t.refObj===e));if(t?.length)for(const e of t){const{action:t,itemName:n,refObj:o,refName:r,op:i}=e;if(!o)break;let l,s,c=!1;const d=L[o];c=r?(await qi(o,d))[r]:d,"!"===i&&(c=!c),"required"!==t&&"readonly"!==t||(l=`#${z} .form-field.${n} .field textarea`,s=document.querySelector(l),s||(l=`#${z} .form-field.${n} .field input`,s=document.querySelector(l)),s&&c&&s.setAttribute(t,"true"),s&&!c&&s.removeAttribute(t)),"hidden"===t&&(l=`#${z} .form-field.${n}`,s=document.querySelector(l),console.log("elem",l,s),s?.classList?.toggle("hidden",c),c&&a(2,L[n]="",L))}},ie=async e=>{const[n,o]=e.offset?.split(",")||[0,0],r=+e.base||0,i=+e.step||1;e.type;const l=e.refItem,s=await t.getLastId(k.class,l);if(!s?.length)return(r+i).toString().padStart(o,"0");const a=s[0][l];return((+a?.substring(n,n+o)||r)+i).toString().padStart(o,"0")},le=(e,t,n=!1)=>{const o=t.name,r=e.find((e=>e.name===o));let i=t.value;if(!n&&r&&r.properties?.multi&&(i=L[o]),i&&r&&r.type.startsWith("date"))try{return xn(i,"%d.%m.%Y").toISOString()}catch{return new Date(i).toISOString()}if(r&&"boolean"===r.type&&(i=!!t.checked),r&&"number"===r.type){const e=Number("1.1").toLocaleString(v.id).substring(1,2);try{i=Number(i.replace(e,".")).toString()}catch{}}return i},se=()=>S?window.close():q?window.singleSpaNavigate("/"):b("back"),ae=async(e,n)=>{if(k.input?.length>1){if(k.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,k.id);a(2,L={...L,...o})}else{const e=k.input.slice(1);for(const t of e)a(2,L[t]=[],L)}}},ce=()=>{let e=0;if(V){let t=1;R&&(t=M),e=B*t}let t=0;for(const e in A)t+=A[e];a(3,O=t+e)},de=()=>{let e=0;for(const t in Z)e+=Z[t];a(4,K=e+ +X)};n.subscribe((async e=>{if(!e)return;if(!xi.get(e.eventId))return;const n=await t.getTaskList(k.class,e.taskId);((e,t,n)=>{if(!xi.get(e))return;const o=t;ki.set(o,n)})(e.eventId,e.taskId,n)})),P(Si);return e.$$set=e=>{"schema"in e&&a(0,k=e.schema),"recID"in e&&a(30,I=e.recID),"prevEventID"in e&&a(28,F=e.prevEventID),"prev"in e&&a(31,N=e.prev),"taskId"in e&&a(29,j=e.taskId),"description"in e&&a(26,_=e.description),"root"in e&&a(1,q=e.root),"readonly"in e&&a(27,C=e.readonly),"isStandalone"in e&&a(32,S=e.isStandalone)},e.$$.update=()=>{134217728&e.$$.dirty[0]&&a(6,d=C),1&e.$$.dirty[0]|12&e.$$.dirty[1]&&x&&y&&k.items.map((({name:e,type:t})=>{const n=y.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;x[e]&&a(2,L[e]=x[e],L),x[o]&&a(2,L[o]=x[o],L)})),67108866&e.$$.dirty[0]&&a(7,u=q?_||"enablerr - Form":document.title)},[k,q,L,O,K,Q,d,u,$,h,g,z,T,D,{name:"amountValue",properties:{decimals:2}},Y,U,{name:"weekValue",properties:{decimals:1}},async()=>{if(I||a(5,Q=await t.getTemplate(k.class)),I&&(a(2,L=await t.getTask(k.class,I)),a(26,_=f(k,L))),F){a(27,C=!1),a(33,y=await t.getSchema(F)),"string"==typeof N&&a(34,x=await t.getTask(y.class,N));const e=k.items.find((e=>e.refClass===y.class));a(2,L[e.name]=x._id,L)}U&&(X=L[G]||0);const e=await t.getEvent(k.id);if(e.trigger?.startOn&&!e.trigger.startOn.some((e=>"Manual"===e.type))&&a(27,C=!0),m.role?.length&&k.authorization?.length){const e=k.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(27,C||=!e)}return I||(ne(),te()),!0},async e=>{I||a(6,d=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+z+" ."+z)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),r=k.list.find((e=>e.name===t));o[e.name]=le(r.item,e)}else o[e.name]=le(k.items,e)})),k.list&&k.list.map((e=>{"array"===e.type&&E[e.name]&&(o[e.name]=E[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=le(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=k.id,o._prevEventId=F,o._taskId=j;const{id:r,task:l,error:s}=await t.saveData(k.class,o);if(s?.text){const e=s.field?" in "+s.field+": "+s.value:"";return i.failed(`${s.text} ${e}`,3e3),void a(6,d=!1)}i.success("Die Daten wurden gespeichert.",2e3),o._id=r;const c=await t.getTaskList(k.class,r);return b("choose",{row:c}),n?se():I?void 0:window.singleSpaNavigate(`/task/${k.id}/${l}/task`)},()=>F?window.history.back():se(),async({detail:{row:e}})=>{if((()=>{if(I)for(const e of ee)e.refName||re(e.itemName)})(),I)return;if(await(async()=>{for(const e of k.items)if(e.refItem&&L[e.refItem]){const n=await t.getTask(e.refItem,L[e.refItem]);n&&a(2,L[e.name]=n[e.name],L)}for(const e of k.list||[])if(e.refItem&&L[e.refItem]){const n=await t.getTask(e.refItem,L[e.refItem]),o=[];for(const t of n[e.name]){const n={};for(const o of e.item)t[o.name]&&(n[o.name]=t[o.name]);o.push(n)}a(2,L[e.name]=o,L)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),r=await t.getEvent(k.id);if(!r.output?.class?.length)return;const i=r.output.class[0]?.item.find((e=>(e.refClass||e.name)===o.output.class[0]?.name));(r.input?.class?.length&&r.input.class[0].name===o.output.class[0]?.name||i?.asInput)&&(a(33,y=await t.getSchema(n)),a(28,F=n),a(29,j=e._task._id),a(34,x=!!j&&await t.getTask(y.class,e._task.docId)),ae(y.class,e?._task?.docId))},({detail:e})=>{if(re(e.itemName),U&&(e.itemName===G&&(X=+e.value),de()),H){if(e.itemName===V?.name)B=e.value;else{if(e.itemName!==R?.name)return;M=e.value}ce()}},({detail:e})=>{E[e.listName]=e.value,Y&&(A[e.listName]=e.amountValue,ce()),U&&(Z[e.listName]=e.weeksValue||0,de())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},(e,t)=>Q?(void 0!==Q[t]&&a(2,L[t]=Q[t],L),e):e,_,C,F,j,I,N,S,y,x,function(e){O=e,a(3,O)},function(e){K=e,a(4,K)}]}class zi extends be{constructor(e){var t;super(),ti.getElementById("svelte-1dh1s6w-style")||((t=N("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",x(ti.head,t)),ve(this,e,Ei,yi,b,{schema:0,recID:30,prevEventID:28,prev:31,taskId:29,description:26,root:1,readonly:27,isStandalone:32},[-1,-1,-1])}}function Ti(e){let t,n,o;function r(t){e[4](t)}let i={schema:e[5],recID:e[6]};return void 0!==e[0]&&(i.description=e[0]),t=new zi({props:i}),Y.push((()=>pe(t,"description",r))),t.$on("back",e[2]),{c(){$e(t.$$.fragment)},m(e,n){he(t,e,n),o=!0},p(e,o){const r={};32&o&&(r.schema=e[5]),64&o&&(r.recID=e[6]),!n&&1&o&&(n=!0,r.description=e[0],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){ge(t,e)}}}function Di(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Ti,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.description=e[0]),353&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Oi(e,n,o){let r,{refresh:i}=n;return e.$$set=e=>{"refresh"in e&&o(3,i=e.refresh)},[r,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},i,function(e){r=e,o(0,r)}]}const{document:Bi}=fe;function Mi(e,t,n){const o=e.slice();return o[17]=t[n],o}function Ai(e,t,n){const o=e.slice();return o[20]=t[n],o}function Vi(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Pi(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=Ri(Ai(e,p,t));const h=e=>de($[e],1,1,(()=>{$[e]=null}));let v=e[0].list&&Hi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Gi]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[Ji]},$$scope:{ctx:e}}}),{c(){t=N("form"),n=N("input"),r=q();for(let e=0;e<$.length;e+=1)$[e].c();i=q(),v&&v.c(),l=q(),s=N("div"),$e(a.$$.fragment),c=q(),$e(d.$$.fragment),z(n,"class",y(e[6])+" svelte-1phofh5"),z(n,"name","_id"),z(n,"type","hidden"),n.value=o=e[1]._id||"",z(t,"class","fTask svelte-1phofh5"),z(t,"id",e[6]),z(s,"class","form--buttons svelte-1phofh5")},m(o,p){k(o,t,p),x(t,n),x(t,r);for(let e=0;e<$.length;e+=1)$[e].m(t,null);x(t,i),v&&v.m(t,null),k(o,l,p),k(o,s,p),he(a,s,null),x(s,c),he(d,s,null),u=!0,m||(f=[S(t,"keydown",e[8]),S(t,"submit",L(e[10]))],m=!0)},p(e,r){if((!u||2&r&&o!==(o=e[1]._id||""))&&(n.value=o),75&r){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const o=Ai(e,p,n);$[n]?($[n].p(o,r),ce($[n],1)):($[n]=Ri(o),$[n].c(),ce($[n],1),$[n].m(t,i))}for(se(),n=p.length;n<$.length;n+=1)h(n);ae()}e[0].list?v?(v.p(e,r),1&r&&ce(v,1)):(v=Hi(e),v.c(),ce(v,1),v.m(t,null)):v&&(se(),de(v,1,1,(()=>{v=null})),ae());const l={};8388608&r&&(l.$$scope={dirty:r,ctx:e}),a.$set(l);const s={};4&r&&(s.disabled=e[2]),8388608&r&&(s.$$scope={dirty:r,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)ce($[e]);ce(v),ce(a.$$.fragment,e),ce(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)de($[e]);de(v),de(a.$$.fragment,e),de(d.$$.fragment,e),u=!1},d(e){e&&I(t),F($,e),v&&v.d(),e&&I(l),e&&I(s),ge(a),ge(d),m=!1,g(f)}}}function Wi(e){let t,n;return t=new $r({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(){$e(t.$$.fragment)},m(e,o){he(t,e,o),n=!0},p(e,n){const o={};1&n&&(o.item=e[20]),1&n&&(o.selection=e[20].selection),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),1&n&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){ge(t,e)}}}function Ri(e){let t,n,o="list"!==e[20].type&&"date"!==e[20].type&&Wi(e);return{c(){o&&o.c(),t=C()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){"list"!==e[20].type&&"date"!==e[20].type?o?(o.p(e,n),1&n&&ce(o,1)):(o=Wi(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(se(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Hi(e){let t,n,o=e[0].list,r=[];for(let t=0;t<o.length;t+=1)r[t]=Yi(Mi(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=C()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(75&n){let l;for(o=e[0].list,l=0;l<o.length;l+=1){const i=Mi(e,o,l);r[l]?(r[l].p(i,n),ce(r[l],1)):(r[l]=Yi(i),r[l].c(),ce(r[l],1),r[l].m(t.parentNode,t))}for(se(),l=o.length;l<r.length;l+=1)i(l);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function Yi(e){let t,n,o,r;return t=new e[4]({props:{text:e[17].designation}}),o=new Xr({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}}),{c(){$e(t.$$.fragment),n=q(),$e(o.$$.fragment)},m(e,i){he(t,e,i),k(e,n,i),he(o,e,i),r=!0},p(e,n){const r={};1&n&&(r.text=e[17].designation),t.$set(r);const i={};1&n&&(i.list=e[17]),1&n&&(i.eventId=e[0].id),1&n&&(i.schema=e[17].item),2&n&&(i.record=e[1]),8&n&&(i.disabled=e[3]),o.$set(i)},i(e){r||(ce(t.$$.fragment,e),ce(o.$$.fragment,e),r=!0)},o(e){de(t.$$.fragment,e),de(o.$$.fragment,e),r=!1},d(e){ge(t,e),e&&I(n),ge(o,e)}}}function Gi(e){let t;return{c(){t=_("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Ji(e){let t;return{c(){t=_("Speichern")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Ui(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Zi(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ui,then:Pi,catch:Vi,value:16,blocks:[,,,]};return ue(e[7](),r),{c(){t=q(),n=N("section"),r.block.c(),Bi.title="Vorgaben",z(n,"class","sTask svelte-1phofh5")},m(e,i){k(e,t,i),k(e,n,i),r.block.m(n,r.anchor=null),r.mount=()=>n,r.anchor=null,o=!0},p(t,[n]){me(r,e=t,n)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),e&&I(n),r.block.d(),r.token=null,r=null}}}function Qi(e,n,r){let a,d,u;w(e,l,(e=>r(11,d=e))),w(e,s,(e=>r(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(o.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),b=!1;const y=()=>window.history.back(),x=(e,t,n=!1)=>{const o=t.id,r=e.find((e=>e.name===o));let i=t.value;if(!n&&r&&r.properties?.multi&&(i=g[o]),i&&r&&r.type.startsWith("date"))try{return xn(i,"%d.%m.%Y").toISOString()}catch{return new Date(i).toISOString()}if(r&&"boolean"===r.type&&(i=!!t.checked),r&&"number"===r.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{i=Number(i.replace(e,".")).toString()}catch{}}return i};return e.$$set=e=>{"schema"in e&&r(0,h=e.schema),"record"in e&&r(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&r(3,a=b)},[h,g,b,a,m,f,v,async()=>{const e=await t.getEvent(h.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&r(2,b=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));r(2,b||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},y,async e=>{const n={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[o,r]=t.split("."),i=h.list.find((e=>e.name===o));n[t]=x(i.item,e)}else n[t]=x(h.items,e)})),await t.saveTemplate(h.class,n),i.success("Die Vorgaben wurden gespeichert.",2e3),y()}]}function Ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xi,el,tl=(Xi=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==i(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},l),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:s.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var l={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(l),i=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),l=r();t.instance=new e.component(o(o({},i),{},{target:l,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},Xi(el={exports:{}},el.exports),el.exports);const nl=Ki(tl)({component:class extends be{constructor(e){super(),ve(this,e,Oi,Di,b,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ol,mount:rl,unmount:il}=nl;e({bootstrap:ol,mount:rl,unmount:il});e("Form",zi),e("List",lt),e("Template",class extends be{constructor(e){var t;super(),Bi.getElementById("svelte-1phofh5-style")||((t=N("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",x(Bi.head,t)),ve(this,e,Qi,Zi,b,{schema:0,record:1})}})}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth"],(function(e){"use strict";var t,n,o,r,i,l,s,a,c,d;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.Storage,r=e.TextArea,i=e.toasts,l=e.settings,s=e.currentRoles,a=e.Page},function(e){c=e.getAttractions},function(e){d=e.user}],execute:function(){e("version","0.2.336");const u=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(" · "))),m=e=>{try{return new Date(e).toLocaleString()}catch{return e}},f=e=>e?"(ja)":"(nein)",p=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[r,i]=o.split(".");if(e.list?.find((({name:e})=>e===r))&&i&&void 0!==n[r]){const e=`${r}_${i}`;n[e]=n[r][i],r=e}return t.find((e=>e===r))||t.push(r),t}),[]).map((e=>"boolean"==typeof n[e]?f(n[e]):u(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&f(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function $(){}function h(e){return e()}function g(){return Object.create(null)}function v(e){e.forEach(h)}function b(e){return"function"==typeof e}function w(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function y(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 x(e){return null==e?"":e}function k(e,t){e.appendChild(t)}function I(e,t,n){e.insertBefore(t,n||null)}function F(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function j(e){return document.createElement(e)}function _(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function q(e){return document.createTextNode(e)}function C(){return q(" ")}function S(){return q("")}function L(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function E(e){return function(t){return t.preventDefault(),e.call(this,t)}}function z(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function T(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function D(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function O(e,t){e.value=null==t?"":t}function B(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function M(e,t,n){e.classList[n?"add":"remove"](t)}let A;function V(e){A=e}function P(){if(!A)throw new Error("Function called outside component initialization");return A}function W(e){P().$$.on_mount.push(e)}function R(){const e=P();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,r)}))}}}function H(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Y=[],G=[],J=[],U=[],Z=Promise.resolve();let Q=!1;function K(){Q||(Q=!0,Z.then(re))}function X(){return K(),Z}function ee(e){J.push(e)}function te(e){U.push(e)}let ne=!1;const oe=new Set;function re(){if(!ne){ne=!0;do{for(let e=0;e<Y.length;e+=1){const t=Y[e];V(t),ie(t.$$)}for(V(null),Y.length=0;G.length;)G.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];oe.has(t)||(oe.add(t),t())}J.length=0}while(Y.length);for(;U.length;)U.pop()();Q=!1,ne=!1,oe.clear()}}function ie(e){if(null!==e.fragment){e.update(),v(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}const le=new Set;let se;function ae(){se={r:0,c:[],p:se}}function ce(){se.r||v(se.c),se=se.p}function de(e,t){e&&e.i&&(le.delete(e),e.i(t))}function ue(e,t,n,o){if(e&&e.o){if(le.has(e))return;le.add(e),se&&se.c.push((()=>{le.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function me(e,t){const n=t.token={};function o(e,o,r,i){if(t.token!==n)return;t.resolved=i;let l=t.ctx;void 0!==r&&(l=l.slice(),l[r]=i);const s=e&&(t.current=e)(l);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ae(),ue(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ce())})):t.block.d(1),s.c(),de(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[o]=s),a&&re()}if((r=e)&&"object"==typeof r&&"function"==typeof r.then){const n=P();if(e.then((e=>{V(n),o(t.then,1,t.value,e),V(null)}),(e=>{if(V(n),o(t.catch,2,t.error,e),V(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var r}function fe(e,t,n){const o=t.slice(),{resolved:r}=e;e.current===e.then&&(o[e.value]=r),e.current===e.catch&&(o[e.error]=r),e.block.p(o,n)}const pe="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function $e(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function he(e){e&&e.c()}function ge(e,t,n,o){const{fragment:r,on_mount:i,on_destroy:l,after_update:s}=e.$$;r&&r.m(t,n),o||ee((()=>{const t=i.map(h).filter(b);l?l.push(...t):v(t),e.$$.on_mount=[]})),s.forEach(ee)}function ve(e,t){const n=e.$$;null!==n.fragment&&(v(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function be(e,t,n,o,r,i,l=[-1]){const s=A;V(e);const a=e.$$={fragment:null,ctx:null,props:i,update:$,not_equal:r,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:g(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=i)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](i),c&&function(e,t){-1===e.$$.dirty[0]&&(Y.push(e),K(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,v(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(F)}else a.fragment&&a.fragment.c();t.intro&&de(e.$$.fragment),ge(e,t.target,t.anchor,t.customElement),re()}V(s)}class we{$destroy(){ve(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 ye(e){let t,n,o,r,i;return{c(){t=_("svg"),n=_("circle"),o=_("polyline"),r=_("line"),T(n,"cx","12"),T(n,"cy","12"),T(n,"r","10"),T(o,"points","8 12 12 16 16 12"),T(r,"x1","12"),T(r,"y1","8"),T(r,"x2","12"),T(r,"y2","16"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-arrow-down-circle "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o),k(t,r)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-arrow-down-circle "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&F(t)}}}function xe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class ke extends we{constructor(e){super(),be(this,e,xe,ye,w,{size:0,strokeWidth:1,class:2})}}function Ie(e){let t,n,o,r;return{c(){t=_("svg"),n=_("path"),o=_("polyline"),T(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),T(o,"points","22 4 12 14.01 9 11.01"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",r="feather feather-check-circle "+e[2])},m(e,r){I(e,t,r),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-check-circle "+e[2])&&T(t,"class",r)},i:$,o:$,d(e){e&&F(t)}}}function Fe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ne extends we{constructor(e){super(),be(this,e,Fe,Ie,w,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,o;return{c(){t=_("svg"),n=_("path"),T(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"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",o="feather feather-command "+e[2])},m(e,o){I(e,t,o),k(t,n)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&T(t,"class",o)},i:$,o:$,d(e){e&&F(t)}}}function _e(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class qe extends we{constructor(e){super(),be(this,e,_e,je,w,{size:0,strokeWidth:1,class:2})}}function Ce(e){let t,n,o,r;return{c(){t=_("svg"),n=_("polyline"),o=_("path"),T(n,"points","9 10 4 15 9 20"),T(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",r="feather feather-corner-down-left "+e[2])},m(e,r){I(e,t,r),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-corner-down-left "+e[2])&&T(t,"class",r)},i:$,o:$,d(e){e&&F(t)}}}function Se(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Le extends we{constructor(e){super(),be(this,e,Se,Ce,w,{size:0,strokeWidth:1,class:2})}}function Ee(e){let t,n,o,r,i;return{c(){t=_("svg"),n=_("path"),o=_("line"),r=_("line"),T(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),T(o,"x1","18"),T(o,"y1","9"),T(o,"x2","12"),T(o,"y2","15"),T(r,"x1","12"),T(r,"y1","9"),T(r,"x2","18"),T(r,"y2","15"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-delete "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o),k(t,r)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-delete "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&F(t)}}}function ze(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Te extends we{constructor(e){super(),be(this,e,ze,Ee,w,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,o,r,i;return{c(){t=_("svg"),n=_("path"),o=_("polyline"),r=_("line"),T(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),T(o,"points","15 3 21 3 21 9"),T(r,"x1","10"),T(r,"y1","14"),T(r,"x2","21"),T(r,"y2","3"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-external-link "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o),k(t,r)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-external-link "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&F(t)}}}function Oe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Be extends we{constructor(e){super(),be(this,e,Oe,De,w,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,o,r;return{c(){t=_("svg"),n=_("circle"),o=_("line"),T(n,"cx","11"),T(n,"cy","11"),T(n,"r","8"),T(o,"x1","21"),T(o,"y1","21"),T(o,"x2","16.65"),T(o,"y2","16.65"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",r="feather feather-search "+e[2])},m(e,r){I(e,t,r),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-search "+e[2])&&T(t,"class",r)},i:$,o:$,d(e){e&&F(t)}}}function Ae(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ve extends we{constructor(e){super(),be(this,e,Ae,Me,w,{size:0,strokeWidth:1,class:2})}}const{document:Pe}=pe;function We(e){e[25]=e[27].list,e[26]=e[27].items}function Re(e,t,n){const o=e.slice();return o[28]=t[n],o}function He(e,t,n){const o=e.slice();return o[31]=t[n],o}function Ye(e,t,n){const o=e.slice();return o[31]=t[n],o}function Ge(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Je(e){let t,n,o,r,i,l;We(e);let s=e[25]?.length&&Ue(e),a=e[26]?.length&&Ze(e),c=e[25]?.length&&Xe(e);return{c(){s&&s.c(),t=C(),n=j("div"),o=j("table"),a&&a.c(),r=C(),i=j("tbody"),c&&c.c(),T(o,"striped",""),T(o,"class","svelte-btngop"),T(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),I(e,t,d),I(e,n,d),k(n,o),a&&a.m(o,null),k(o,r),k(o,i),c&&c.m(i,null),l=!0},p(e,n){We(e),e[25]?.length?s?(s.p(e,n),4&n[0]&&de(s,1)):(s=Ue(e),s.c(),de(s,1),s.m(t.parentNode,t)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce()),e[26]?.length?a?a.p(e,n):(a=Ze(e),a.c(),a.m(o,r)):a&&(a.d(1),a=null),e[25]?.length?c?(c.p(e,n),4&n[0]&&de(c,1)):(c=Xe(e),c.c(),de(c,1),c.m(i,null)):c&&(ae(),ue(c,1,1,(()=>{c=null})),ce())},i(e){l||(de(s),de(c),l=!0)},o(e){ue(s),ue(c),l=!1},d(e){s&&s.d(e),e&&F(t),e&&F(n),a&&a.d(),c&&c.d()}}}function Ue(e){let t,n,o,r,i,l,s,a,c,d;function u(t){e[19](t)}let m={id:e[6]};return void 0!==e[3]&&(m.value=e[3]),o=new e[5]({props:m}),G.push((()=>$e(o,"value",u))),o.$on("input",e[10]),s=new Te({props:{size:"18"}}),{c(){t=j("div"),n=q("Suchen: "),he(o.$$.fragment),i=C(),l=j("span"),he(s.$$.fragment),T(l,"class","feather pointer svelte-btngop"),B(t,"margin-bottom","1em"),B(t,"position","relative")},m(r,u){I(r,t,u),k(t,n),ge(o,t,null),k(t,i),k(t,l),ge(s,l,null),a=!0,c||(d=L(l,"click",e[13]),c=!0)},p(e,t){const n={};!r&&8&t[0]&&(r=!0,n.value=e[3],te((()=>r=!1))),o.$set(n)},i(e){a||(de(o.$$.fragment,e),de(s.$$.fragment,e),a=!0)},o(e){ue(o.$$.fragment,e),ue(s.$$.fragment,e),a=!1},d(e){e&&F(t),ve(o),ve(s),c=!1,d()}}}function Ze(e){let t,n,o,r=e[0]&&Qe(),i=e[26],l=[];for(let t=0;t<i.length;t+=1)l[t]=Ke(Ye(e,i,t));return{c(){t=j("thead"),n=j("tr"),r&&r.c(),o=C();for(let e=0;e<l.length;e+=1)l[e].c();T(n,"class","svelte-btngop"),T(t,"class","svelte-btngop")},m(e,i){I(e,t,i),k(t,n),r&&r.m(n,null),k(n,o);for(let e=0;e<l.length;e+=1)l[e].m(n,null)},p(e,t){if(e[0]?r||(r=Qe(),r.c(),r.m(n,o)):r&&(r.d(1),r=null),516&t[0]){let o;for(i=e[26],o=0;o<i.length;o+=1){const r=Ye(e,i,o);l[o]?l[o].p(r,t):(l[o]=Ke(r),l[o].c(),l[o].m(n,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=i.length}},d(e){e&&F(t),r&&r.d(),N(l,e)}}}function Qe(e){let t;return{c(){t=j("th"),T(t,"class","svelte-btngop")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function Ke(e){let t,n,o=e[31]?.designation+"";return{c(){t=j("th"),n=q(o),T(t,"class","svelte-btngop")},m(e,o){I(e,t,o),k(t,n)},p(e,t){4&t[0]&&o!==(o=e[31]?.designation+"")&&D(n,o)},d(e){e&&F(t)}}}function Xe(e){let t,n,o=e[25],r=[];for(let t=0;t<o.length;t+=1)r[t]=ot(Re(e,o,t));const i=e=>ue(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(7055&n[0]){let l;for(o=e[25],l=0;l<o.length;l+=1){const i=Re(e,o,l);r[l]?(r[l].p(i,n),de(r[l],1)):(r[l]=ot(i),r[l].c(),de(r[l],1),r[l].m(t.parentNode,t))}for(ae(),l=o.length;l<r.length;l+=1)i(l);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ue(r[e]);n=!1},d(e){N(r,e),e&&F(t)}}}function et(e){let t,n,o,r,i=e[0]&&tt(e),l=e[26],s=[];for(let t=0;t<l.length;t+=1)s[t]=nt(He(e,l,t));return{c(){t=j("tr"),i&&i.c(),n=C();for(let e=0;e<s.length;e+=1)s[e].c();o=C(),T(t,"class","pointer svelte-btngop"),M(t,"active",e[28]._id===e[1])},m(e,l){I(e,t,l),i&&i.m(t,null),k(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);k(t,o),r=!0},p(e,r){if(e[0]?i?(i.p(e,r),1&r[0]&&de(i,1)):(i=tt(e),i.c(),de(i,1),i.m(t,n)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce()),900&r[0]){let n;for(l=e[26],n=0;n<l.length;n+=1){const i=He(e,l,n);s[n]?s[n].p(i,r):(s[n]=nt(i),s[n].c(),s[n].m(t,o))}for(;n<s.length;n+=1)s[n].d(1);s.length=l.length}518&r[0]&&M(t,"active",e[28]._id===e[1])},i(e){r||(de(i),r=!0)},o(e){ue(i),r=!1},d(e){e&&F(t),i&&i.d(),N(s,e)}}}function tt(e){let t,n,o,r,i;return o=new Be({props:{size:"18"}}),{c(){t=j("td"),n=j("a"),he(o.$$.fragment),T(n,"href",r=e[12](e[28])),T(n,"target","_blank"),T(t,"class","editRow svelte-btngop")},m(e,r){I(e,t,r),k(t,n),ge(o,n,null),i=!0},p(e,t){(!i||4&t[0]&&r!==(r=e[12](e[28])))&&T(n,"href",r)},i(e){i||(de(o.$$.fragment,e),i=!0)},o(e){ue(o.$$.fragment,e),i=!1},d(e){e&&F(t),ve(o)}}}function nt(e){let t,n,o,r,i=e[7](e[28],e[31])+"";return{c(){t=j("td"),n=q(i),T(t,"class","svelte-btngop")},m(i,l){I(i,t,l),k(t,n),o||(r=L(t,"click",z((function(){b(e[8](e[28]))&&e[8](e[28]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&i!==(i=e[7](e[28],e[31])+"")&&D(n,i)},d(e){e&&F(t),o=!1,r()}}}function ot(e){let t,n,o=e[11](e[28],e[26],e[3]),r=o&&et(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),I(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[11](e[28],e[26],e[3])),o?r?(r.p(e,n),12&n[0]&&de(r,1)):(r=et(e),r.c(),de(r,1),r.m(t.parentNode,t)):r&&(ae(),ue(r,1,1,(()=>{r=null})),ce())},i(e){n||(de(r),n=!0)},o(e){ue(r),n=!1},d(e){r&&r.d(e),e&&F(t)}}}function rt(e){let t,n;return t=new e[4]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function it(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:rt,then:Je,catch:Ge,value:27,blocks:[,,,]};return me(n=e[2]&&e[9](),r),{c(){t=S(),r.block.c()},m(e,n){I(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[2]&&e[9]())&&me(n,r)||fe(r,e,o)},i(e){o||(de(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(r.blocks[e])}o=!1},d(e){e&&F(t),r.block.d(e),r.token=null,r=null}}}function lt(e,o,r){const i=R(),{Loading:l,TextField:s}=c;let{className:a}=o,{rowId:d}=o,{filterForReady:m=!1}=o,{showEdit:p=!1}=o,{praefix:$=""}=o,{selectionFields:h=!1}=o,{deList:g}=o,v=!0,b="",w=a+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},x=t.getSchemaByClass(a),k=async(e,t,n,o)=>{const{value:r,refClass:i}=o,[l,s]=n.split("."),a=r?.get($),c=a&&await Ci(l,a);if(!c)return e;const d=c[s];return d?.length?d.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return _i(i+o._id.toString(),o),o})):e};W((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(w)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await x;e.eventId===t.id&&(Si(t.class,e.eventId),r(2,v=!r(2,v=!1)))}));return e.$$set=e=>{"className"in e&&r(14,a=e.className),"rowId"in e&&r(1,d=e.rowId),"filterForReady"in e&&r(15,m=e.filterForReady),"showEdit"in e&&r(0,p=e.showEdit),"praefix"in e&&r(16,$=e.praefix),"selectionFields"in e&&r(17,h=e.selectionFields),"deList"in e&&r(18,g=e.deList)},[p,d,v,b,l,s,w,y,e=>()=>i("choose",{row:e}),async()=>{const e=await x;let n,o,l=n=await Ni(e.class,e.id),s=!1,a="";const c=h&&h?.find((t=>e.class===t.refClass.split(":")[0])),d=c?.value?.get&&c.value.get($);if(d){const[n,r]=c.refClass.split(":");e.class===n&&(l=await k(l,n,r,c)),s=c.parentClass?.find((e=>"quantity"===e.name)),a=c.className,o=await t.getCountedSection(a,r.split(".")[0],d,n,"quantity")}r(0,p&&=!c),!c&&m&&(l=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(l,e));let u=[],f=e.display;return f&&f.length?f.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,l=l.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),u.find((e=>e?.name===n))||u.push(r)})):u=e.items,!p&&s?(u=u.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),l=l.map((e=>{const t=o.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e})),o.map((e=>{if(!l.find((t=>t._id===e._id))){const t=n.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,l.push(t)}})),i("init",l)):g&&(l=l.filter((e=>!g.find((t=>t._id===e._id))))),{list:l,items:u}},({detail:{value:e}})=>{r(3,b=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(y(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{r(3,b="")},a,m,$,h,g,function(e){b=e,r(3,b)}]}class st extends we{constructor(e){var t;super(),Pe.getElementById("svelte-btngop-style")||((t=j("style")).id="svelte-btngop-style",t.textContent=".feather.svelte-btngop.svelte-btngop{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-btngop.svelte-btngop{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-btngop .editRow.svelte-btngop{width:1em}.eList.svelte-btngop table.svelte-btngop{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-btngop table thead.svelte-btngop{position:sticky;top:0;background:#326173;color:white}.eList.svelte-btngop table thead tr.svelte-btngop{height:2.3em}.eList.svelte-btngop table tbody tr.svelte-btngop{height:2.75em !important}th.svelte-btngop.svelte-btngop,td.svelte-btngop.svelte-btngop{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-btngop.svelte-btngop:hover{background-color:#DAE1E5}tr.active.svelte-btngop.svelte-btngop{color:#326173;background-color:#fcebd5}",k(Pe.head,t)),be(this,e,lt,it,w,{className:14,rowId:1,filterForReady:15,showEdit:0,praefix:16,selectionFields:17,deList:18},[-1,-1])}}function at(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[3],required:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=j("div"),he(n.$$.fragment),B(t,"position","relative"),B(t,"max-width","10em")},m(e,r){I(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),8&t&&(o.disabled=e[3]),16&t&&(o.required=e[4]),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n)}}}function ct(e,t,n){let r;const i=R(),{TextField:l}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(o.getItem("Locale")),h=Number("1.1").toLocaleString($.id).substring(1,2),{properties:g={}}=a;let{min:v,max:b,step:w,pattern:y,decimals:x=0,unit:k="",placeholder:I,hint:F,readonly:N,negative:j,required:_=!1}=g;y||(y=x?`[0-9]+([${h}][0-9]{1,${x}})?`:"[0-9]*"),j&&(y="-?"+y);return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(14,a=e.item),"value"in e&&n(15,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},e.$$.update=()=>{65552&e.$$.dirty&&n(4,_=_&&!p),32768&e.$$.dirty&&n(6,r=Number(d.toString().replace(h,".")).toFixed(x).toString().replace(".",h))},[s,u,m,f,_,y,r,l,$,w,I,N,({detail:e})=>i("blur",{value:e.value}),({detail:e})=>{N||Number(d.toString().replace(h,"."))||n(6,r="")},a,d,p]}class dt extends we{constructor(e){super(),be(this,e,ct,at,w,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:ut}=pe;function mt(e){e[29]=e[31].list,e[30]=e[31].items}function ft(e,t,n){const o=e.slice();return o[32]=t[n],o[34]=n,o}function pt(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function $t(e,t,n){const o=e.slice();return o[35]=t[n],o}function ht(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function gt(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,g,v,b,w;function y(t){e[27](t)}mt(e),n=new e[7]({props:{outline:!0,$$slots:{default:[vt]},$$scope:{ctx:e}}}),n.$on("click",e[26]),r=new e[7]({props:{disabled:!e[29].length,filled:!0,$$slots:{default:[bt]},$$scope:{ctx:e}}}),r.$on("click",e[16](e[29]));let x={id:e[10]};void 0!==e[1]&&(x.value=e[1]),a=new e[5]({props:x}),G.push((()=>$e(a,"value",y))),a.$on("input",e[13]),m=new Te({props:{size:"18"}});let _=e[30]?.length&&function(e){let t,n,o,r,i,l;r=new Ne({props:{size:"20"}});let s=e[30],a=[];for(let t=0;t<s.length;t+=1)a[t]=wt($t(e,s,t));return{c(){t=j("thead"),n=j("tr"),o=j("th"),he(r.$$.fragment),i=C();for(let e=0;e<a.length;e+=1)a[e].c();T(o,"class","svelte-1m010ne"),T(n,"class","svelte-1m010ne"),T(t,"class","svelte-1m010ne")},m(e,s){I(e,t,s),k(t,n),k(n,o),ge(r,o,null),k(n,i);for(let e=0;e<a.length;e+=1)a[e].m(n,null);l=!0},p(e,t){if(4096&t[0]){let o;for(s=e[30],o=0;o<s.length;o+=1){const r=$t(e,s,o);a[o]?a[o].p(r,t):(a[o]=wt(r),a[o].c(),a[o].m(n,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=s.length}},i(e){l||(de(r.$$.fragment,e),l=!0)},o(e){ue(r.$$.fragment,e),l=!1},d(e){e&&F(t),ve(r),N(a,e)}}}(e),E=e[29]?.length&&function(e){let t,n,o=e[29],r=[];for(let t=0;t<o.length;t+=1)r[t]=It(ft(e,o,t));const i=e=>ue(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(153607&n[0]){let l;for(o=e[29],l=0;l<o.length;l+=1){const i=ft(e,o,l);r[l]?(r[l].p(i,n),de(r[l],1)):(r[l]=It(i),r[l].c(),de(r[l],1),r[l].m(t.parentNode,t))}for(ae(),l=o.length;l<r.length;l+=1)i(l);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ue(r[e]);n=!1},d(e){N(r,e),e&&F(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),he(r.$$.fragment),i=C(),l=j("div"),s=q("Suchen: "),he(a.$$.fragment),d=C(),u=j("span"),he(m.$$.fragment),f=C(),p=j("div"),$=j("table"),_&&_.c(),h=C(),g=j("tbody"),E&&E.c(),T(t,"class","form--buttons svelte-1m010ne"),T(u,"class","feather pointer svelte-1m010ne"),B(l,"margin-bottom","1em"),B(l,"position","relative"),T($,"striped",""),T($,"class","svelte-1m010ne"),T(p,"class","eList svelte-1m010ne")},m(c,y){I(c,t,y),ge(n,t,null),k(t,o),ge(r,t,null),I(c,i,y),I(c,l,y),k(l,s),ge(a,l,null),k(l,d),k(l,u),ge(m,u,null),I(c,f,y),I(c,p,y),k(p,$),_&&_.m($,null),k($,h),k($,g),E&&E.m(g,null),v=!0,b||(w=L(u,"click",e[15]),b=!0)},p(e,t){mt(e);const o={};512&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i);const l={};!c&&2&t[0]&&(c=!0,l.value=e[1],te((()=>c=!1))),a.$set(l),e[30]?.length&&_.p(e,t),e[29]?.length&&E.p(e,t)},i(e){v||(de(n.$$.fragment,e),de(r.$$.fragment,e),de(a.$$.fragment,e),de(m.$$.fragment,e),de(_),de(E),v=!0)},o(e){ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(a.$$.fragment,e),ue(m.$$.fragment,e),ue(_),ue(E),v=!1},d(e){e&&F(t),ve(n),ve(r),e&&F(i),e&&F(l),ve(a),ve(m),e&&F(f),e&&F(p),_&&_.d(),E&&E.d(),b=!1,w()}}}function vt(e){let t;return{c(){t=q("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function bt(e){let t;return{c(){t=q("Bestätigen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function wt(e){let t,n,o=e[35]+"";return{c(){t=j("th"),n=q(o),T(t,"class","svelte-1m010ne")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&F(t)}}}function yt(e){let t,n,o,r,i,l,s=e[0],a=xt(e),c=e[30],d=[];for(let t=0;t<c.length;t+=1)d[t]=kt(pt(e,c,t));return{c(){t=j("tr"),a.c(),n=C();for(let e=0;e<d.length;e+=1)d[e].c();o=C(),B(t,"cursor","zoom-in"),T(t,"title","übernimmt den Wert direkt"),T(t,"class","svelte-1m010ne"),M(t,"active",e[0].includes(e[32]))},m(s,c){I(s,t,c),a.m(t,null),k(t,n);for(let e=0;e<d.length;e+=1)d[e].m(t,null);k(t,o),r=!0,i||(l=L(t,"click",e[17](e[32])),i=!0)},p(r,i){if(e=r,1&i[0]&&w(s,s=e[0])?(ae(),ue(a,1,1,$),ce(),a=xt(e),a.c(),de(a),a.m(t,n)):a.p(e,i),4100&i[0]){let n;for(c=e[30],n=0;n<c.length;n+=1){const r=pt(e,c,n);d[n]?d[n].p(r,i):(d[n]=kt(r),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}4097&i[0]&&M(t,"active",e[0].includes(e[32]))},i(e){r||(de(a),r=!0)},o(e){ue(a),r=!1},d(e){e&&F(t),a.d(e),N(d,e),i=!1,l()}}}function xt(e){let t,n,o;return n=new e[9]({props:{name:e[11],data:e[34],checked:e[0].includes(e[32]),round:!0}}),{c(){t=j("td"),he(n.$$.fragment),T(t,"title","Wählt den Wert aus"),T(t,"class","svelte-1m010ne")},m(e,r){I(e,t,r),ge(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[32])),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n)}}}function kt(e){let t,n,o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"";return{c(){t=j("td"),n=q(o),T(t,"class","svelte-1m010ne")},m(e,o){I(e,t,o),k(t,n)},p(e,t){4&t[0]&&o!==(o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"")&&D(n,o)},d(e){e&&F(t)}}}function It(e){let t,n,o=e[14](e[32],e[1]),r=o&&yt(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),I(e,t,o),n=!0},p(e,n){2&n[0]&&(o=e[14](e[32],e[1])),o?r?(r.p(e,n),2&n[0]&&de(r,1)):(r=yt(e),r.c(),de(r,1),r.m(t.parentNode,t)):r&&(ae(),ue(r,1,1,(()=>{r=null})),ce())},i(e){n||(de(r),n=!0)},o(e){ue(r),n=!1},d(e){r&&r.d(e),e&&F(t)}}}function Ft(e){let t,n;return t=new e[4]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Nt(e){let t,n,o,r;t=new e[8]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ft,then:gt,catch:ht,value:31,blocks:[,,,]};return me(e[12](),i),{c(){he(t.$$.fragment),n=C(),o=S(),i.block.c()},m(e,l){ge(t,e,l),I(e,n,l),I(e,o,l),i.block.m(e,i.anchor=l),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){fe(i,e=t,n)},i(e){r||(de(t.$$.fragment,e),de(i.block),r=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(i.blocks[e])}r=!1},d(e){ve(t,e),e&&F(n),e&&F(o),i.block.d(e),i.token=null,i=null}}}function jt(e){let t,n;return t=new e[6]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Nt]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};7&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function _t(e,n,o){const r=R(),{Loading:i,TextField:l,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:h}=n,{target:g}=n,{view:v}=n,{unique:b}=n,{uniqueView:w}=n;p||=[];let y="",x=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",k=[];const I=$+h+g+"checkbox",F=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(18,m=e.classId),"id"in e&&o(19,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(20,$=e.tableName),"idName"in e&&o(21,h=e.idName),"target"in e&&o(22,g=e.target),"view"in e&&o(23,v=e.view),"unique"in e&&o(24,b=e.unique),"uniqueView"in e&&o(25,w=e.uniqueView)},[p,y,k,r,i,l,s,a,d,u,x,I,async()=>{let e,n=[];if(o(2,k=[]),v){const n=m.split("-")[1].slice(0,-4),o="input."+m+"[name='_id']",r=document.querySelector(o).value,i={[h]:f,$or:[{status:!0},{[n]:r}]};e=await t.getSectionView($,i),e=e.sort(((e,t)=>{const o=e=>(e[n]||"z").toString()+e[g];return F(o(e),o(t))}))}else if(w){const r={[h]:f,status:!0};Object.entries(w).map((([e,t])=>{t?.length&&(r[e]={$in:t}),n.push(e)})),e=await t.getSectionView($,r),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return F(n(e),n(t))})),o(2,k=e.map((e=>{const t=[e[g]];return n.map((n=>t.push(e[n]))),t})))}else b?(e=await t.getSection($,h,f,b),e=e.sort(((e,t)=>F(e,t)))):(e=await t.getSection($,h,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return F(n(e),n(t))})));const r=[];e.map((e=>r.push(e[g])));const i=await t.getSchemaByClass($),l=i.items.find((e=>e.name===g))?.designation;return n=n.map((e=>i.items.find((t=>t.name===e))?.designation)),{list:r.flat(),items:[l,...n]}},({detail:{value:e}})=>{o(1,y=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(1,y="")},e=>()=>{const t=document.getElementsByName(I),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),r("choose",{list:n})},e=>t=>{"TD"===t.originalTarget?.tagName&&(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),r("choose",{list:p}))},m,f,$,h,g,v,b,w,()=>r("back"),function(e){y=e,o(1,y)}]}class qt extends we{constructor(e){var t;super(),ut.getElementById("svelte-1m010ne-style")||((t=j("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}",k(ut.head,t)),be(this,e,_t,jt,w,{classId:18,id:19,selection:0,tableName:20,idName:21,target:22,view:23,unique:24,uniqueView:25},[-1,-1])}}const{document:Ct}=pe;function St(e){let t,n,o,r,i,l=e[7].length+"";return{c(){t=j("span"),n=q("("),o=q(l),r=q(")"),T(t,"class",i=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,i){I(e,t,i),k(t,n),k(t,o),k(t,r)},p(e,n){128&n[0]&&l!==(l=e[7].length+"")&&D(o,l),2&n[0]&&i!==(i=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&T(t,"class",i)},d(e){e&&F(t)}}}function Lt(e){let t;return{c(){t=j("div"),T(t,"class","load-more-options"),T(t,"slot","load-more-options-message slot")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function Et(e){let t,n,o,r;const i=[Dt,Tt,zt],l=[];function s(e,t){return e[7].length?0:e[17]?1:e[14]&&e[16].view?2:-1}return~(t=s(e))&&(n=l[t]=i[t](e)),{c(){n&&n.c(),o=S()},m(e,n){~t&&l[t].m(e,n),I(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?~t&&l[t].p(e,r):(n&&(ae(),ue(l[a],1,1,(()=>{l[a]=null})),ce()),~t?(n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),de(n,1),n.m(o.parentNode,o)):n=null)},i(e){r||(de(n),r=!0)},o(e){ue(n),r=!1},d(e){~t&&l[t].d(e),e&&F(o)}}}function zt(e){let t,n,o,r,i;return n=new ke({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title","Übernehmen"),T(t,"class","feather pointer svelte-1rbaejz")},m(l,s){I(l,t,s),ge(n,t,null),o=!0,r||(i=L(t,"click",e[24]),r=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n),r=!1,i()}}}function Tt(e){let t,n,o,r,i;return n=new qe({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title",e[17].title||"Generieren"),T(t,"class","feather pointer svelte-1rbaejz")},m(l,s){I(l,t,s),ge(n,t,null),o=!0,r||(i=L(t,"click",e[23]),r=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n),r=!1,i()}}}function Dt(e){let t,n,o,r,i;return n=new Te({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title","Löschen"),T(t,"class","feather pointer svelte-1rbaejz")},m(l,s){I(l,t,s),ge(n,t,null),o=!0,r||(i=L(t,"click",e[25]),r=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n),r=!1,i()}}}function Ot(e){let t,n,o;function r(t){e[32](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Bt]},$$scope:{ctx:e}};return void 0!==e[10]&&(i.open=e[10]),t=new e[11]({props:i}),G.push((()=>$e(t,"open",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};53&o[0]|256&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,r.open=e[10],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function Bt(e){let t,n;return t=new qt({props:{classId:e[2],selection:e[0],view:e[15],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[19]],tableName:e[18],idName:e[19],target:e[4].name}}),t.$on("choose",e[22]),t.$on("back",e[21]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4&n[0]&&(o.classId=e[2]),1&n[0]&&(o.selection=e[0]),16&n[0]&&(o.unique=e[16].unique&&e[4].name),32&n[0]&&(o.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(o.id=e[5][e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mt(e){let t,n,o,r,i,l,s,a,c,d=e[7].length&&St(e);function u(t){e[30](t)}function m(t){e[31](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:At,minSearchLength:"3",$$slots:{"load-more-options-message slot":[Lt]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),o=new e[12]({props:f}),G.push((()=>$e(o,"selection",u))),G.push((()=>$e(o,"maxOptions",m))),o.$on("change",e[20]);let p=!e[1]&&Et(e),$=e[10]&&Ot(e);return{c(){t=j("div"),d&&d.c(),n=C(),he(o.$$.fragment),l=C(),p&&p.c(),s=C(),$&&$.c(),a=S(),B(t,"position","relative")},m(e,r){I(e,t,r),d&&d.m(t,null),k(t,n),ge(o,t,null),k(t,l),p&&p.m(t,null),I(e,s,r),$&&$.m(e,r),I(e,a,r),c=!0},p(e,l){e[7].length?d?d.p(e,l):(d=St(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&l[0]&&(s.id=e[3]),8&l[0]&&(s.name=e[3]),8&l[0]&&(s.class=e[3]),2&l[0]&&(s.disabled=e[1]),64&l[0]&&(s.required=e[6]),256&l[0]&&(s.placeholder=e[8]),256&l[1]&&(s.$$scope={dirty:l,ctx:e}),!r&&128&l[0]&&(r=!0,s.selection=e[7],te((()=>r=!1))),!i&&512&l[0]&&(i=!0,s.maxOptions=e[9],te((()=>i=!1))),o.$set(s),e[1]?p&&(ae(),ue(p,1,1,(()=>{p=null})),ce()):p?(p.p(e,l),2&l[0]&&de(p,1)):(p=Et(e),p.c(),de(p,1),p.m(t,null)),e[10]?$?($.p(e,l),1024&l[0]&&de($,1)):($=Ot(e),$.c(),de($,1),$.m(a.parentNode,a)):$&&(ae(),ue($,1,1,(()=>{$=null})),ce())},i(e){c||(de(o.$$.fragment,e),de(p),de($),c=!0)},o(e){ue(o.$$.fragment,e),ue(p),ue($),c=!1},d(e){e&&F(t),d&&d.d(),ve(o),p&&p.d(),e&&F(s),$&&$.d(e),e&&F(a)}}}async function*At(e){yield[{name:e}]}function Vt(e,n,o){const r=R(),{Modal:i,Autocomplete:l}=c;let{classId:s}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:h}=n,{praefix:g}=n;const{properties:v={}}=d;let{placeholder:b,hint:w,readonly:y,required:x=!1,lookup:k="",view:I=!1,multi:F,max:N=1e3,generate:j=!1}=v;const[_,q]=k.split(":");let C=!1,S=m.map&&m.map((e=>({name:e})))||[];p||=y,p&&(b="");W((async()=>{const e=document.getElementById(a);e.classList.add(s),!y&&k&&e.addEventListener("focus",L)}));const L=()=>{if(k){document.getElementById(a).blur(),(F.unique||S.length<N)&&o(10,C=!0)}},E=()=>{o(10,C&&=!1)},z=({detail:e})=>{o(7,S=e.list.map((e=>({name:e})))),r("blur",{value:e.list}),E()},T=(e=!1)=>{if(p||!F.required)return;const t=F.maxItem;if(!t||F.unique)return;o(9,N=!1!==e?e:u[t]||0);const n=S.length!=N,i=document.getElementById(a);i?.classList?.toggle("invalid",n),r("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&o(2,s=e.classId),"id"in e&&o(3,a=e.id),"item"in e&&o(4,d=e.item),"record"in e&&o(5,u=e.record),"value"in e&&o(0,m=e.value),"noForm"in e&&o(26,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(27,$=e.formnovalidate),"numberInput"in e&&o(28,h=e.numberInput),"praefix"in e&&o(29,g=e.praefix)},e.$$.update=()=>{128&e.$$.dirty[0]&&S&&(o(0,m=S.map&&S.map((e=>e.name))||[]),T()),268435456&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==g&&g!==o||t&&t.name===F.maxItem&&T(n)})(h),134217792&e.$$.dirty[0]&&o(6,x=x&&!$)},[m,p,s,a,d,u,x,S,b,N,C,i,l,y,k,I,F,j,_,q,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),o(7,S=t.map((e=>({name:e.trim()})))),r("blur",{value:S.map((e=>e.name))})},E,z,()=>{const e=u[j.itemQuantity];if(!e)return;const t=j.prefix||"",n=u[j.variable]||"",o=j.len||5,r=Array.from({length:e},((e,r)=>t+n+"-"+r.toString().padStart(o,"0")));z({detail:{list:r}})},async()=>{const e=u[F.maxItem];if(!e)return;const n={[q]:u[q],status:!0},o=[].concat(u[F.view]||[]);o.length&&(n[F.view]={$in:o});const r=await t.getSectionView(_,n),i=Array.from({length:e<r.length?e:r.length},((e,t)=>r[t][d.name]));z({detail:{list:i}})},()=>{z({detail:{list:[]}})},f,$,h,g,function(e){S=e,o(7,S)},function(e){N=e,o(9,N)},function(e){C=e,o(10,C)}]}class Pt extends we{constructor(e){var t;super(),Ct.getElementById("svelte-1rbaejz-style")||((t=j("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}",k(Ct.head,t)),be(this,e,Vt,Mt,w,{classId:2,id:3,item:4,record:5,value:0,noForm:26,disabled:1,formnovalidate:27,numberInput:28,praefix:29},[-1,-1])}}const{document:Wt}=pe;function Rt(e){e[26]=e[28].list,e[27]=e[28].items}function Ht(e,t,n){const o=e.slice();return o[29]=t[n],o}function Yt(e,t,n){const o=e.slice();return o[32]=t[n],o}function Gt(e,t,n){const o=e.slice();return o[32]=t[n],o}function Jt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Ut(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}Rt(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Zt]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),l=new e[6]({props:w}),G.push((()=>$e(l,"value",b))),l.$on("input",e[12]),d=new Te({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=Qt(Gt(e,o,t));return{c(){t=j("thead"),n=j("tr");for(let e=0;e<r.length;e+=1)r[e].c();T(n,"class","svelte-14hcfjl"),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(o=e[27],i=0;i<o.length;i+=1){const l=Gt(e,o,i);r[i]?r[i].p(l,t):(r[i]=Qt(l),r[i].c(),r[i].m(n,null))}for(;i<r.length;i+=1)r[i].d(1);r.length=o.length}},d(e){e&&F(t),N(r,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=en(Ht(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=S()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);I(e,t,n)},p(e,r){if(11779&r[0]){let i;for(n=e[26],i=0;i<n.length;i+=1){const l=Ht(e,n,i);o[i]?o[i].p(l,r):(o[i]=en(l),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},d(e){N(o,e),e&&F(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),r=j("div"),i=q("Suchen: "),he(l.$$.fragment),a=C(),c=j("span"),he(d.$$.fragment),u=C(),m=j("div"),f=j("table"),y&&y.c(),p=C(),$=j("tbody"),x&&x.c(),T(t,"class","form--buttons svelte-14hcfjl"),T(c,"class","feather pointer svelte-14hcfjl"),B(r,"margin-bottom","1em"),B(r,"position","relative"),T(f,"striped",""),T(f,"class","svelte-14hcfjl"),T(m,"class","eList svelte-14hcfjl")},m(s,b){I(s,t,b),ge(n,t,null),I(s,o,b),I(s,r,b),k(r,i),ge(l,r,null),k(r,a),k(r,c),ge(d,c,null),I(s,u,b),I(s,m,b),k(m,f),y&&y.m(f,null),k(f,p),k(f,$),x&&x.m($,null),h=!0,g||(v=L(c,"click",e[14]),g=!0)},p(e,t){Rt(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const r={};!s&&2&t[0]&&(s=!0,r.value=e[1],te((()=>s=!1))),l.$set(r),e[27]?.length&&y.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(de(n.$$.fragment,e),de(l.$$.fragment,e),de(d.$$.fragment,e),h=!0)},o(e){ue(n.$$.fragment,e),ue(l.$$.fragment,e),ue(d.$$.fragment,e),h=!1},d(e){e&&F(t),ve(n),e&&F(o),e&&F(r),ve(l),ve(d),e&&F(u),e&&F(m),y&&y.d(),x&&x.d(),g=!1,v()}}}function Zt(e){let t;return{c(){t=q("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function Qt(e){let t,n,o=e[32]?.designation+"";return{c(){t=j("th"),n=q(o),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&F(t)}}}function Kt(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=Xt(Yt(e,o,t));return{c(){t=j("tr");for(let e=0;e<r.length;e+=1)r[e].c();n=C(),T(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){I(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);k(t,n)},p(e,i){if(3584&i[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const s=Yt(e,o,l);r[l]?r[l].p(s,i):(r[l]=Xt(s),r[l].c(),r[l].m(t,n))}for(;l<r.length;l+=1)r[l].d(1);r.length=o.length}2049&i[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&F(t),N(r,e)}}}function Xt(e){let t,n,o,r,i=e[9](e[29],e[32])+"";return{c(){t=j("td"),n=q(i),T(t,"class","svelte-14hcfjl")},m(i,l){I(i,t,l),k(t,n),o||(r=L(t,"click",z(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&F(t),o=!1,r()}}}function en(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&Kt(e);return{c(){o&&o.c(),t=S()},m(e,n){o&&o.m(e,n),I(e,t,n)},p(e,r){2&r[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,r):(o=Kt(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&F(t)}}}function tn(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function nn(e){let t,n,o,r;t=new e[4]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:tn,then:Ut,catch:Jt,value:28,blocks:[,,,]};return me(e[11](),i),{c(){he(t.$$.fragment),n=C(),o=S(),i.block.c()},m(e,l){ge(t,e,l),I(e,n,l),I(e,o,l),i.block.m(e,i.anchor=l),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){fe(i,e=t,n)},i(e){r||(de(t.$$.fragment,e),de(i.block),r=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(i.blocks[e])}r=!1},d(e){ve(t,e),e&&F(n),e&&F(o),i.block.d(e),i.token=null,i=null}}}function on(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[nn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function rn(e,o,r){const i=R(),{Dialog:l,Divider:s,Loading:a,TextField:d,Button:m}=c;let{item:p}=o,{className:$}=o,{classId:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},F=t.getSchemaByClass($);W((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await F;e.eventId===t.id&&Si(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&r(15,p=e.item),"className"in e&&r(16,$=e.className),"classId"in e&&r(17,h=e.classId),"rowId"in e&&r(0,g=e.rowId),"viewName"in e&&r(18,v=e.viewName),"viewValue"in e&&r(19,b=e.viewValue),"recordId"in e&&r(20,w=e.recordId),"filter"in e&&r(21,y=e.filter)},[g,x,i,l,s,a,d,m,k,I,e=>()=>i("choose",{row:e}),async()=>{const e=await F,n="."+h+"#"+v;document.querySelector(n);let o={[v]:b},r=[];o[v]&&(r=await t.getSectionView(e.class,o,!0)),y&&(r=r.filter((e=>e._id!=y)));let i=[],l=e.display;return l&&l.length?l.map((t=>{const[n,o]=t.split(".");let l=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));l&&(l={...l},l.name=`${n}_${o}`,r=r.map((e=>(e[n]&&(e[l.name]=e[n][o]),e)))),l||(l=e.items.find((e=>e.name===n))),i.find((e=>e?.name===n))||i.push(l)})):i=e.items,{list:r,items:i}},({detail:{value:e}})=>{r(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,x="")},p,$,h,v,b,w,y,()=>i("back"),function(e){x=e,r(1,x)}]}class ln extends we{constructor(e){var t;super(),Wt.getElementById("svelte-14hcfjl-style")||((t=j("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}",k(Wt.head,t)),be(this,e,rn,on,w,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function sn(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function an(e){let t,n,o,r,i;function l(t){e[21](t)}let s={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]&&(s.value=e[0]),n=new e[10]({props:s}),G.push((()=>$e(n,"value",l)));let a=!e[6]&&cn(e);return{c(){t=j("div"),he(n.$$.fragment),r=C(),a&&a.c(),B(t,"position","relative")},m(e,o){I(e,t,o),ge(n,t,null),k(t,r),a&&a.m(t,null),i=!0},p(e,r){const i={};4&r&&(i.id=e[2]),8&r&&(i.name=e[3].name),34&r&&(i.inputClass=e[5]||e[1]),64&r&&(i.disabled=e[6]),128&r&&(i.formnovalidate=e[7]),!o&&1&r&&(o=!0,i.value=e[0],te((()=>o=!1))),n.$set(i),e[6]?a&&(ae(),ue(a,1,1,(()=>{a=null})),ce()):a?(a.p(e,r),64&r&&de(a,1)):(a=cn(e),a.c(),de(a,1),a.m(t,null))},i(e){i||(de(n.$$.fragment,e),de(a),i=!0)},o(e){ue(n.$$.fragment,e),ue(a),i=!1},d(e){e&&F(t),ve(n),a&&a.d()}}}function cn(e){let t,n,o,r,i;return n=new Ve({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather pointer svelte-wbrqzu")},m(l,s){I(l,t,s),ge(n,t,null),o=!0,r||(i=L(t,"click",e[17]),r=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n),r=!1,i()}}}function dn(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function un(e){let t,n,o;function r(t){e[22](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[mn]},$$scope:{ctx:e}};return void 0!==e[8]&&(i.open=e[8]),t=new e[11]({props:i}),G.push((()=>$e(t,"open",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};268435994&o&&(r.$$scope={dirty:o,ctx:e}),!n&&256&o&&(n=!0,r.open=e[8],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function mn(e){let t,n;return t=new ln({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(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.item=e[3]),8&n&&(o.className=e[3].refClass),2&n&&(o.classId=e[1]),16&n&&(o.recordId=e[4]._id),512&n&&(o.viewValue=e[9]),16&n&&(o.filter=e[4]._id),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function fn(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:dn,then:an,catch:sn,value:27,blocks:[,,,]};me(e[16](),r);let i=e[8]&&un(e);return{c(){r.block.c(),t=C(),i&&i.c(),n=S()},m(e,l){r.block.m(e,r.anchor=l),r.mount=()=>t.parentNode,r.anchor=t,I(e,t,l),i&&i.m(e,l),I(e,n,l),o=!0},p(t,[o]){fe(r,e=t,o),e[8]?i?(i.p(e,o),256&o&&de(i,1)):(i=un(e),i.c(),de(i,1),i.m(n.parentNode,n)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){o||(de(r.block),de(i),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(r.blocks[e])}ue(i),o=!1},d(e){r.block.d(e),r.token=null,r=null,e&&F(t),i&&i.d(e),e&&F(n)}}}function pn(e,t,n){const{TextField:o,Modal:r}=c;let{classId:i}=t,{id:l}=t,{item:s}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:$={}}=s;let h,{pattern:g,placeholder:v,readonly:b,required:w=!1,view:y}=$,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,i=e.classId),"id"in e&&n(2,l=e.id),"item"in e&&n(3,s=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,i,l,s,a,u,m,f,x,h,o,r,g,b,w,y,async()=>(n(9,h=a[y.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[y.value?y.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class $n extends we{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=j("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",k(document.head,t)),be(this,e,pn,fn,w,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function hn(e,t,n){const o=e.slice();return o[10]=t[n],o}function gn(e){let t,n,o,r=e[10]+"";return{c(){t=j("option"),n=q(r),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],T(t,"class","svelte-5xpzvo")},m(e,o){I(e,t,o),k(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&F(t)}}}function vn(e){let t,n,o,r,i,l=e[4],s=[];for(let t=0;t<l.length;t+=1)s[t]=gn(hn(e,l,t));return{c(){t=j("select"),n=j("option");for(let e=0;e<s.length;e+=1)s[e].c();n.__value="",n.value=n.__value,T(n,"class","svelte-5xpzvo"),T(t,"class",o=x(e[2]||e[3])+" svelte-5xpzvo"),T(t,"id",e[0]),T(t,"name",e[0]),T(t,"readonly",e[5])},m(o,l){I(o,t,l),k(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);r||(i=L(t,"change",e[6]),r=!0)},p(e,[n]){if(18&n){let o;for(l=e[4],o=0;o<l.length;o+=1){const r=hn(e,l,o);s[o]?s[o].p(r,n):(s[o]=gn(r),s[o].c(),s[o].m(t,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=l.length}12&n&&o!==(o=x(e[2]||e[3])+" svelte-5xpzvo")&&T(t,"class",o),1&n&&T(t,"id",e[0]),1&n&&T(t,"name",e[0])},i:$,o:$,d(e){e&&F(t),N(s,e),r=!1,i()}}}function bn(e,t,n){const o=R();let{id:r}=t,{item:i}=t,{value:l}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=i.properties,u=c||i.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,i=e.item),"value"in e&&n(1,l=e.value),"noForm"in e&&n(2,s=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[r,l,s,a,d,u,e=>o("blur",{value:e.srcElement.value}),i,c]}class wn extends we{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=j("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.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.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",k(document.head,t)),be(this,e,bn,vn,w,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const yn=/\d+/g,xn=/%[HMSpPdmyY%]/g;function kn(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let r=!1;if(""===e)return null;const i=t.split(xn);let l=0,s=0;const a=new Date(0);for(const c of i){if(!e.startsWith(c,l))return n;if(l+=c.length,l===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[l])return n;l++}else if("p"===t[s].toLowerCase()){const t=e.substr(l,2).toUpperCase();if("AM"===t)r=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;r=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{yn.lastIndex=l;const i=yn.exec(e);if(null==i)return n;switch(t[s]){case"H":a.setHours(parseInt(i[0])+12*r);break;case"M":a.setMinutes(i[0]);break;case"S":a.setSeconds(i[0]);break;case"d":a.setDate(i[0]);break;case"m":a.setMonth(i[0]-1);break;case"y":a.setFullYear(100*o+parseInt(i[0]));break;case"Y":a.setFullYear(i[0])}l+=i[0].length}s++}return isNaN(a.valueOf())?n:a}function In(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}function Fn(e){let t;return{c(){t=q("Stunden")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function Nn(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Fn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function jn(e){let t;return{c(){t=q("Minuten")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function _n(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[jn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function qn(e){let t;return{c(){t=q("Jetzt")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function Cn(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[qn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Sn(e){let t,n,o,r,i,l,s,a,c;return r=new e[5]({props:{value:e[0],closeOnSelection:!0}}),r.$on("change",e[8]),l=new e[6]({props:{value:e[0],$$slots:{"now-label":[Cn],"minutes-label":[_n],"hours-label":[Nn]},$$scope:{ctx:e}}}),l.$on("change",e[7]),{c(){t=j("input"),o=C(),he(r.$$.fragment),i=C(),he(l.$$.fragment),T(t,"type","string"),T(t,"class",n=e[2]||e[3]),T(t,"id",e[1]),T(t,"name",e[1]),t.hidden=!0},m(n,d){I(n,t,d),O(t,e[0]),I(n,o,d),ge(r,n,d),I(n,i,d),ge(l,n,d),s=!0,a||(c=L(t,"input",e[9]),a=!0)},p(e,[o]){(!s||12&o&&n!==(n=e[2]||e[3]))&&T(t,"class",n),(!s||2&o)&&T(t,"id",e[1]),(!s||2&o)&&T(t,"name",e[1]),1&o&&O(t,e[0]);const i={};1&o&&(i.value=e[0]),r.$set(i);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),l.$set(a)},i(e){s||(de(r.$$.fragment,e),de(l.$$.fragment,e),s=!0)},o(e){ue(r.$$.fragment,e),ue(l.$$.fragment,e),s=!1},d(e){e&&F(t),e&&F(o),ve(r,e),e&&F(i),ve(l,e),a=!1,c()}}}function Ln(e,t,n){const o=R(),{Label:r,DatePicker:i,TimePicker:l}=c;let{value:s}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,s=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[s,a,d,u,r,i,l,({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(s)},({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(s)},function(){s=this.value,n(0,s)}]}class En extends we{constructor(e){super(),be(this,e,Ln,Sn,w,{value:0,id:1,noForm:2,classId:3})}}function zn(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:Tn,placeholder:Dn,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=j("div"),he(n.$$.fragment),B(t,"max-width","4em")},m(e,r){I(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n)}}}const Tn="([01][0-9]|2[0-3]):([0-5][0-9])",Dn="";function On(e,t,n){const o=R(),{TextField:r}=c;let{id:i}=t,{item:l}=t,{value:s}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t,{praefix:f}=t;const p=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,i=e.id),"item"in e&&n(8,l=e.item),"value"in e&&n(1,s=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled),"praefix"in e&&n(9,f=e.praefix)},[i,s,a,d,u,m,r,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:i,value:e.value})},l,f]}class Bn extends we{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=j("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",k(document.head,t)),be(this,e,On,zn,w,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function Mn(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],pattern:e[22],required:e[2],id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function An(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],required:e[2],type:"email",id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Vn(e){let t,n;return t=new Bn({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[14],required:e[2],id:e[24],item:e[1],value:e[16](),praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("checkRange",e[33]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Pn(e){let t,n;return t=new En({props:{classId:e[5],id:e[24],disabled:e[7],required:e[2],value:e[25](),noForm:e[4]}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wn(e){let t,n;return t=new e[20]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[24],name:e[23],value:e[25](),closeOnSelection:!0}}),t.$on("change",e[26](!0)),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Rn(e){let t,n;return t=new e[21]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[14],required:e[2],id:e[24],name:e[23],checked:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),16512&n[0]&&(o.disabled=e[7]||e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.checked=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Hn(e){let t,n;return t=new $n({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[32]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Yn(e){let t,n;return t=new Pt({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[31]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Gn(e){let t,n;return t=new wn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Jn(e){let t,n;return t=new dt({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[14],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Un(e){let t,n;return t=new r({props:{classId:e[5],disabled:e[7],readonly:e[14],id:e[24],name:e[1].name,value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.name=e[1].name),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Zn(e){let t,n;return t=new er({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[14],id:e[24],item:e[1],desc:e[17],value:e[16](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[30]),t.$on("change",e[26]()),t.$on("initFail",e[27]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),131072&n[0]&&(o.desc=e[17]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Qn(e){let t,n,o,r;const i=[Zn,Un,Jn,Gn,Yn,Hn,Rn,Wn,Pn,Vn,An,Mn],l=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),I(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(ae(),ue(l[a],1,1,(()=>{l[a]=null})),ce(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){r||(de(n),r=!0)},o(e){ue(n),r=!1},d(e){l[t].d(e),e&&F(o)}}}function Kn(e){let t,n;return t=new e[18]({props:{id:e[28](e[24]),class:e[1].name+(e[15]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Qn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32770&n[0]&&(o.class=e[1].name+(e[15]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),229375&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Xn(e,t,n){let o,r,i;const l=R(),{FormField:s,TextField:a,DatePicker:d,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:N}=t,{required:j}=t,{isTemplate:_}=t,{required:q,readonly:C,hidden:S,pattern:L}=$.properties||{};if(S=!0===S,void 0!==C&&(C=!0===C),void 0===j&&(j=q),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const E=(h?h+".":"")+$.name,z=E+(""!==p?"-"+p:""),T=(e,t=E)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(29,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,w=e.eventId),"disabled"in e&&n(7,y=e.disabled),"selectionFields"in e&&n(8,x=e.selectionFields),"formnovalidate"in e&&n(9,k=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,F=e.numberInput),"deList"in e&&n(12,N=e.deList),"required"in e&&n(2,j=e.required),"isTemplate"in e&&n(13,_=e.isTemplate)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(16,o=(e=E)=>{let t=T(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=T(g))},n(17,r=((e=E)=>{let t=g["_"+e];return t=u(t),void 0===t?"":t})()),[g,$,j,p,v,b,w,y,x,k,I,F,N,_,C,S,o,r,s,a,d,f,L,E,z,(e=E)=>{let t=T(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,g[E]=e?In(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;l("notify",{oldValue:i,value:o,add:s,itemName:E,desc:t.description})},()=>n(15,S=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)}]}class eo extends we{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=j("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",k(document.head,t)),be(this,e,Xn,Kn,w,{praefix:3,item:1,listName:29,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13},[-1,-1])}}function to(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function no(e){let t,n,o=e[32]&&oo(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),I(e,t,r),n=!0},p(e,n){e[32]?o?(o.p(e,n),4&n[0]&&de(o,1)):(o=oo(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&F(t)}}}function oo(e){let t,n;return t=new e[15]({props:{title:e[11]?"Auswahl":e[18],class:"eList "+(e[9]?"form":""),$$slots:{default:[fo]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]?"Auswahl":e[18]),512&n[0]&&(o.class="eList "+(e[9]?"form":"")),32767&n[0]|4&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ro(e){let t,n;return t=new Ti({props:{schema:e[1],recID:e[0],readonly:e[10]}}),t.$on("choose",(function(){b(e[23](e[32]))&&e[23](e[32]).apply(this,arguments)})),t.$on("back",e[20]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.schema=e[1]),1&o[0]&&(r.recID=e[0]),1024&o[0]&&(r.readonly=e[10]),t.$set(r)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function io(e){let t,n,o,r,i,l,s;t=new e[16]({props:{text:e[11]?"Zusätzliche Auswahl":""}});const a=[so,lo],c=[];function d(e,t){return e[11]?0:1}return o=d(e),r=c[o]=a[o](e),l=new st({props:{className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),l.$on("edit",e[24]),l.$on("choose",e[27]),l.$on("init",e[25]),{c(){he(t.$$.fragment),n=C(),r.c(),i=C(),he(l.$$.fragment)},m(e,r){ge(t,e,r),I(e,n,r),c[o].m(e,r),I(e,i,r),ge(l,e,r),s=!0},p(e,n){const s={};2048&n[0]&&(s.text=e[11]?"Zusätzliche Auswahl":""),t.$set(s);let u=o;o=d(e),o===u?c[o].p(e,n):(ae(),ue(c[u],1,1,(()=>{c[u]=null})),ce(),r=c[o],r?r.p(e,n):(r=c[o]=a[o](e),r.c()),de(r,1),r.m(i.parentNode,i));const m={};2&n[0]&&(m.className=e[1].class),8&n[0]&&(m.filterForReady=e[3]),16&n[0]&&(m.praefix=e[4]),32&n[0]&&(m.selectionFields=e[5]),1&n[0]&&(m.rowId=e[0]),128&n[0]&&(m.deList=e[7]),64&n[0]&&(m.showEdit=e[6]),l.$set(m)},i(e){s||(de(t.$$.fragment,e),de(r),de(l.$$.fragment,e),s=!0)},o(e){ue(t.$$.fragment,e),ue(r),ue(l.$$.fragment,e),s=!1},d(e){ve(t,e),e&&F(n),c[o].d(e),e&&F(i),ve(l,e)}}}function lo(e){let t,n,o,r,i;return n=new e[17]({props:{outline:!0,$$slots:{default:[ao]},$$scope:{ctx:e}}}),n.$on("click",e[21]),r=new e[17]({props:{filled:!0,$$slots:{default:[co]},$$scope:{ctx:e}}}),r.$on("click",e[22]),{c(){t=j("div"),he(n.$$.fragment),o=C(),he(r.$$.fragment),T(t,"class","form--buttons svelte-jb5mrh")},m(e,l){I(e,t,l),ge(n,t,null),k(t,o),ge(r,t,null),i=!0},p(e,t){const o={};4&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};4&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i)},i(e){i||(de(n.$$.fragment,e),de(r.$$.fragment,e),i=!0)},o(e){ue(n.$$.fragment,e),ue(r.$$.fragment,e),i=!1},d(e){e&&F(t),ve(n),ve(r)}}}function so(e){let t,n,o,r,i,l,s=e[14]&&uo(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[mo]},$$scope:{ctx:e}}}),o.$on("click",e[21]),i=new e[16]({props:{text:"Liste aus "+e[8]}}),{c(){s&&s.c(),t=C(),n=j("div"),he(o.$$.fragment),r=C(),he(i.$$.fragment),T(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),I(e,t,a),I(e,n,a),ge(o,n,null),I(e,r,a),ge(i,e,a),l=!0},p(e,n){e[14]?s?(s.p(e,n),16384&n[0]&&de(s,1)):(s=uo(e),s.c(),de(s,1),s.m(t.parentNode,t)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce());const r={};4&n[1]&&(r.$$scope={dirty:n,ctx:e}),o.$set(r);const l={};256&n[0]&&(l.text="Liste aus "+e[8]),i.$set(l)},i(e){l||(de(s),de(o.$$.fragment,e),de(i.$$.fragment,e),l=!0)},o(e){ue(s),ue(o.$$.fragment,e),ue(i.$$.fragment,e),l=!1},d(e){s&&s.d(e),e&&F(t),e&&F(n),ve(o),e&&F(r),ve(i,e)}}}function ao(e){let t;return{c(){t=q("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function co(e){let t;return{c(){t=q("Neu")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function uo(e){let t,n;return t=new eo({props:{item:e[12],record:{_id:"",[e[12].name]:""},noForm:"true",classId:"sel_"+e[12].name,eventId:e[13],deList:e[14]}}),t.$on("notify",e[26]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n[0]&&(o.item=e[12]),4096&n[0]&&(o.record={_id:"",[e[12].name]:""}),4096&n[0]&&(o.classId="sel_"+e[12].name),8192&n[0]&&(o.eventId=e[13]),16384&n[0]&&(o.deList=e[14]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function mo(e){let t;return{c(){t=q("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function fo(e){let t,n,o,r;const i=[io,ro],l=[];function s(e,t){return e[32].length&&!e[9]?0:1}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),I(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(ae(),ue(l[a],1,1,(()=>{l[a]=null})),ce(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){r||(de(n),r=!0)},o(e){ue(n),r=!1},d(e){l[t].d(e),e&&F(o)}}}function po(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function $o(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:po,then:no,catch:to,value:32,blocks:[,,,]};return me(n=e[19](e[2]),r),{c(){t=S(),r.block.c()},m(e,n){I(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[19](e[2]))&&me(n,r)||fe(r,e,o)},i(e){o||(de(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(r.blocks[e])}o=!1},d(e){e&&F(t),r.block.d(e),r.token=null,r=null}}}function ho(e,n,o){const{Dialog:r,Divider:i,Button:l}=c,s=R();let{schema:a}=n,{recID:d}=n,{isOpening:u=!0}=n,{filterForReady:m=!1}=n,{praefix:f=""}=n,{selectionFields:p=!1}=n,{showEdit:$=!0}=n,{deList:h}=n,g=a.identity.designation;a.class;let v,b,w,y,x,k,I,F="",N=!1;return e.$$set=e=>{"schema"in e&&o(1,a=e.schema),"recID"in e&&o(0,d=e.recID),"isOpening"in e&&o(2,u=e.isOpening),"filterForReady"in e&&o(3,m=e.filterForReady),"praefix"in e&&o(4,f=e.praefix),"selectionFields"in e&&o(5,p=e.selectionFields),"showEdit"in e&&o(6,$=e.showEdit),"deList"in e&&o(7,h=e.deList)},[d,a,u,m,f,p,$,h,F,N,v,w,x,k,I,r,i,l,g,async e=>{if(!e)return!1;const n=await Ni(a.class,a.id);if(b=p&&p?.find((e=>a.class===e.refClass.split(":")[0])),o(11,w=b?.value?.get&&b.value.get(f)),w){y=b.refClass;const[e,n]=y.split(":"),[r]=n.split(".");o(12,x=b.parentClass.find((t=>t.name===e)));const i=await t.getSchemaByClass(x.refClass);o(13,k=i.id),o(8,F=b.parentClass.find((e=>e.name===r)).designation)}return n},()=>{o(9,N=!1),d||s("back"),$||s("back")},()=>{o(9,N=!1),s("back")},()=>{o(0,d=!1),o(10,v=!1),o(9,N=!0)},e=>({detail:{row:e}})=>{let t=a.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let r=a.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(r){e[`${n}_${o}`]=e[n][o]}})),s("choose",{row:e})},({detail:e})=>{o(10,v=!!e._task.visum||"Closed"===e._task.status),o(0,d=e._docId),o(9,N=!0)},({detail:e})=>{w&&o(14,I=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};s("choose",{row:t})},function(t){H(e,t)}]}class go extends we{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=j("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}",k(document.head,t)),be(this,e,ho,$o,w,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:vo}=pe;function bo(e){e[26]=e[28].list,e[27]=e[28].items}function wo(e,t,n){const o=e.slice();return o[29]=t[n],o}function yo(e,t,n){const o=e.slice();return o[32]=t[n],o}function xo(e,t,n){const o=e.slice();return o[32]=t[n],o}function ko(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Io(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}bo(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Fo]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),l=new e[6]({props:w}),G.push((()=>$e(l,"value",b))),l.$on("input",e[12]),d=new Te({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=No(xo(e,o,t));return{c(){t=j("thead"),n=j("tr");for(let e=0;e<r.length;e+=1)r[e].c();T(n,"class","svelte-14hcfjl"),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(o=e[27],i=0;i<o.length;i+=1){const l=xo(e,o,i);r[i]?r[i].p(l,t):(r[i]=No(l),r[i].c(),r[i].m(n,null))}for(;i<r.length;i+=1)r[i].d(1);r.length=o.length}},d(e){e&&F(t),N(r,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=qo(wo(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=S()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);I(e,t,n)},p(e,r){if(11779&r[0]){let i;for(n=e[26],i=0;i<n.length;i+=1){const l=wo(e,n,i);o[i]?o[i].p(l,r):(o[i]=qo(l),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},d(e){N(o,e),e&&F(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),r=j("div"),i=q("Suchen: "),he(l.$$.fragment),a=C(),c=j("span"),he(d.$$.fragment),u=C(),m=j("div"),f=j("table"),y&&y.c(),p=C(),$=j("tbody"),x&&x.c(),T(t,"class","form--buttons svelte-14hcfjl"),T(c,"class","feather pointer svelte-14hcfjl"),B(r,"margin-bottom","1em"),B(r,"position","relative"),T(f,"striped",""),T(f,"class","svelte-14hcfjl"),T(m,"class","eList svelte-14hcfjl")},m(s,b){I(s,t,b),ge(n,t,null),I(s,o,b),I(s,r,b),k(r,i),ge(l,r,null),k(r,a),k(r,c),ge(d,c,null),I(s,u,b),I(s,m,b),k(m,f),y&&y.m(f,null),k(f,p),k(f,$),x&&x.m($,null),h=!0,g||(v=L(c,"click",e[14]),g=!0)},p(e,t){bo(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const r={};!s&&2&t[0]&&(s=!0,r.value=e[1],te((()=>s=!1))),l.$set(r),e[27]?.length&&y.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(de(n.$$.fragment,e),de(l.$$.fragment,e),de(d.$$.fragment,e),h=!0)},o(e){ue(n.$$.fragment,e),ue(l.$$.fragment,e),ue(d.$$.fragment,e),h=!1},d(e){e&&F(t),ve(n),e&&F(o),e&&F(r),ve(l),ve(d),e&&F(u),e&&F(m),y&&y.d(),x&&x.d(),g=!1,v()}}}function Fo(e){let t;return{c(){t=q("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function No(e){let t,n,o=e[32]?.designation+"";return{c(){t=j("th"),n=q(o),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&F(t)}}}function jo(e){let t,n,o=e[27],r=[];for(let t=0;t<o.length;t+=1)r[t]=_o(yo(e,o,t));return{c(){t=j("tr");for(let e=0;e<r.length;e+=1)r[e].c();n=C(),T(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){I(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);k(t,n)},p(e,i){if(3584&i[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const s=yo(e,o,l);r[l]?r[l].p(s,i):(r[l]=_o(s),r[l].c(),r[l].m(t,n))}for(;l<r.length;l+=1)r[l].d(1);r.length=o.length}2049&i[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&F(t),N(r,e)}}}function _o(e){let t,n,o,r,i=e[9](e[29],e[32])+"";return{c(){t=j("td"),n=q(i),T(t,"class","svelte-14hcfjl")},m(i,l){I(i,t,l),k(t,n),o||(r=L(t,"click",z(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&F(t),o=!1,r()}}}function qo(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&jo(e);return{c(){o&&o.c(),t=S()},m(e,n){o&&o.m(e,n),I(e,t,n)},p(e,r){2&r[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,r):(o=jo(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&F(t)}}}function Co(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function So(e){let t,n,o,r;t=new e[4]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:Co,then:Io,catch:ko,value:28,blocks:[,,,]};return me(e[11](),i),{c(){he(t.$$.fragment),n=C(),o=S(),i.block.c()},m(e,l){ge(t,e,l),I(e,n,l),I(e,o,l),i.block.m(e,i.anchor=l),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){fe(i,e=t,n)},i(e){r||(de(t.$$.fragment,e),de(i.block),r=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(i.blocks[e])}r=!1},d(e){ve(t,e),e&&F(n),e&&F(o),i.block.d(e),i.token=null,i=null}}}function Lo(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[So]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Eo(e,o,r){const i=R(),{Dialog:l,Divider:s,Loading:a,TextField:d,Button:m}=c;let{item:p}=o,{classId:$}=o,{className:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},F=t.getSchemaByClass(h);W((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await F;e.eventId===t.id&&Si(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&r(15,p=e.item),"classId"in e&&r(16,$=e.classId),"className"in e&&r(17,h=e.className),"rowId"in e&&r(0,g=e.rowId),"viewName"in e&&r(18,v=e.viewName),"viewValue"in e&&r(19,b=e.viewValue),"recordId"in e&&r(20,w=e.recordId),"filter"in e&&r(21,y=e.filter)},[g,x,i,l,s,a,d,m,k,I,e=>()=>i("choose",{row:e}),async()=>{const e=await F,n="."+$+"#"+v,o=document.querySelector(n);let r={[v]:o?.value||w};if(p.refItem){const e="."+$+"#"+p.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[p.refItem]:t.value},{[p.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}catch{}}let i=[];r[v]&&(i=await t.getSectionView(e.class,r,!0)),y&&(i=i.filter((e=>e._id!=y)));let l=[],s=e.display;return s&&s.length?s.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,i=i.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),l.find((e=>e?.name===n))||l.push(r)})):l=e.items,{list:i,items:l}},({detail:{value:e}})=>{r(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,x="")},p,$,h,v,b,w,y,()=>i("back"),function(e){x=e,r(1,x)}]}class zo extends we{constructor(e){var t;super(),vo.getElementById("svelte-14hcfjl-style")||((t=j("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}",k(vo.head,t)),be(this,e,Eo,Lo,w,{item:15,classId:16,className:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}const{document:To}=pe;function Do(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Oo(e){let t,n,o=e[36]&&function(e){let t,n,o,i,l,s,a,c,d,u,m,f,p,$,h;n=new r({props:{class:"full-width",id:e[20],value:e[2],rows:"1",required:e[1],disabled:e[3],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}}),n.$on("click",e[22]()),n.$on("onFocus",e[22](e[20]));const g=[Mo,Bo],v=[];function b(e,t){return!e[3]||e[13]?0:e[0]?1:-1}~(i=b(e))&&(l=v[i]=g[i](e));let w=(!e[3]||e[13])&&Wo(e);function y(t){e[30](t)}let N={class:"tModal",noClickaway:!0,$$slots:{default:[Go]},$$scope:{ctx:e}};void 0!==e[15]&&(N.open=e[15]);m=new e[19]({props:N}),G.push((()=>$e(m,"open",y)));let _=e[16]&&Jo(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),l&&l.c(),s=C(),a=j("input"),d=C(),w&&w.c(),u=C(),he(m.$$.fragment),p=C(),_&&_.c(),$=S(),T(a,"class",c=x(e[6]||e[7])+" svelte-jox15l"),T(a,"id",e[4]),T(a,"name",e[4]),a.value=e[0],a.hidden=!0,B(t,"position","relative")},m(e,r){I(e,t,r),ge(n,t,null),k(t,o),~i&&v[i].m(t,null),k(t,s),k(t,a),k(t,d),w&&w.m(t,null),I(e,u,r),ge(m,e,r),I(e,p,r),_&&_.m(e,r),I(e,$,r),h=!0},p(e,o){const r={};4&o[0]&&(r.value=e[2]),2&o[0]&&(r.required=e[1]),8&o[0]&&(r.disabled=e[3]),n.$set(r);let d=i;i=b(e),i===d?~i&&v[i].p(e,o):(l&&(ae(),ue(v[d],1,1,(()=>{v[d]=null})),ce()),~i?(l=v[i],l?l.p(e,o):(l=v[i]=g[i](e),l.c()),de(l,1),l.m(t,s)):l=null),(!h||192&o[0]&&c!==(c=x(e[6]||e[7])+" svelte-jox15l"))&&T(a,"class",c),(!h||16&o[0])&&T(a,"id",e[4]),(!h||16&o[0])&&T(a,"name",e[4]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[13]?w?(w.p(e,o),8200&o[0]&&de(w,1)):(w=Wo(e),w.c(),de(w,1),w.m(t,null)):w&&(ae(),ue(w,1,1,(()=>{w=null})),ce());const u={};57249&o[0]|128&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&32768&o[0]&&(f=!0,u.open=e[15],te((()=>f=!1))),m.$set(u),e[16]?_?(_.p(e,o),65536&o[0]&&de(_,1)):(_=Jo(e),_.c(),de(_,1),_.m($.parentNode,$)):_&&(ae(),ue(_,1,1,(()=>{_=null})),ce())},i(e){h||(de(n.$$.fragment,e),de(l),de(w),de(m.$$.fragment,e),de(_),h=!0)},o(e){ue(n.$$.fragment,e),ue(l),ue(w),ue(m.$$.fragment,e),ue(_),h=!1},d(e){e&&F(t),ve(n),~i&&v[i].d(),w&&w.d(),e&&F(u),ve(m,e),e&&F(p),_&&_.d(e),e&&F($)}}}(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),I(e,t,r),n=!0},p(e,t){e[36]&&o.p(e,t)},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&F(t)}}}function Bo(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Po,then:Vo,catch:Ao,value:37,blocks:[,,,]};return me(e[26](),o),{c(){t=S(),o.block.c()},m(e,r){I(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){fe(o,e=t,n)},i(e){n||(de(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ue(o.blocks[e])}n=!1},d(e){e&&F(t),o.block.d(e),o.token=null,o=null}}}function Mo(e){let t,n,o,r,i;return n=new Ve({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather pointer svelte-jox15l")},m(l,s){I(l,t,s),ge(n,t,null),o=!0,r||(i=[L(t,"click",e[22]()),L(t,"choose",e[23])],r=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n),r=!1,v(i)}}}function Ao(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Vo(e){let t,n,o,r;return o=new Be({props:{size:"18"}}),{c(){t=j("span"),n=j("a"),he(o.$$.fragment),T(n,"href",e[37]),T(n,"target","_blank"),T(t,"class","feather pointer svelte-jox15l")},m(e,i){I(e,t,i),k(t,n),ge(o,n,null),r=!0},p:$,i(e){r||(de(o.$$.fragment,e),r=!0)},o(e){ue(o.$$.fragment,e),r=!1},d(e){e&&F(t),ve(o)}}}function Po(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Wo(e){let t,n,o,r,i;return n=new Te({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather2 pointer svelte-jox15l")},m(l,s){I(l,t,s),ge(n,t,null),o=!0,r||(i=L(t,"click",e[25]),r=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n),r=!1,i()}}}function Ro(e){let t,n,o,r;const i=[Yo,Ho],l=[];function s(e,t){return e[11]?0:1}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),I(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(ae(),ue(l[a],1,1,(()=>{l[a]=null})),ce(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){r||(de(n),r=!0)},o(e){ue(n),r=!1},d(e){l[t].d(e),e&&F(o)}}}function Ho(e){let t,n;return t=new go({props:{schema:e[14],recID:e[0],isOpening:e[15],filterForReady:"true",selectionFields:e[10],deList:e[12],praefix:e[9]}}),t.$on("choose",e[23]),t.$on("back",e[24]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),32768&n[0]&&(o.isOpening=e[15]),1024&n[0]&&(o.selectionFields=e[10]),4096&n[0]&&(o.deList=e[12]),512&n[0]&&(o.praefix=e[9]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Yo(e){let t,n;return t=new zo({props:{item:e[5],className:e[14].class,classId:e[7],rowId:e[0],recordId:e[8],viewName:e[11],viewValue:""}}),t.$on("choose",e[23]),t.$on("back",e[24]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.item=e[5]),16384&n[0]&&(o.className=e[14].class),128&n[0]&&(o.classId=e[7]),1&n[0]&&(o.rowId=e[0]),256&n[0]&&(o.recordId=e[8]),2048&n[0]&&(o.viewName=e[11]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Go(e){let t,n,o=e[15]&&Ro(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),I(e,t,r),n=!0},p(e,n){e[15]?o?(o.p(e,n),32768&n[0]&&de(o,1)):(o=Ro(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&F(t)}}}function Jo(e){let t,n,o;function r(t){e[31](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Zo]},$$scope:{ctx:e}};return void 0!==e[16]&&(i.open=e[16]),t=new e[19]({props:i}),G.push((()=>$e(t,"open",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};147457&o[0]|128&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&65536&o[0]&&(n=!0,r.open=e[16],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function Uo(e){let t,n;return t=new Ti({props:{schema:e[14],recID:e[0],readonly:!0}}),t.$on("back",e[24]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Zo(e){let t,n;return t=new e[18]({props:{title:e[17],$$slots:{default:[Uo]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};131072&n[0]&&(o.title=e[17]),16385&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Qo(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Ko(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Qo,then:Oo,catch:Do,value:36,blocks:[,,,]};return me(e[21](),o),{c(){t=S(),o.block.c()},m(e,r){I(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){fe(o,e=t,n)},i(e){n||(de(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ue(o.blocks[e])}n=!1},d(e){e&&F(t),o.block.d(e),o.token=null,o=null}}}function Xo(e,n,o){const r=R(),{Dialog:i,Modal:l}=c;let{id:s}=n,{item:a}=n,{value:d=""}=n,{desc:u=""}=n,{noForm:m=!1}=n,{classId:f}=n,{eventId:$}=n,{recordId:h}=n,{required:g}=n,{disabled:v}=n,{readonly:b}=n,{praefix:w}=n,{selectionFields:y}=n,{formnovalidate:x}=n,{selection:k}=n,{deList:I}=n,{isTemplate:F}=n;const N="comment_"+s;let j,_,q,C=!1;b||=h&&a.asInput,v||=b;const S=e=>{e&&(o(2,u=p(q,e)),r("change",{value:d,description:u}),r("task",{row:e}))},L=()=>{o(15,C=!1),o(16,j=!1)};return e.$$set=e=>{"id"in e&&o(4,s=e.id),"item"in e&&o(5,a=e.item),"value"in e&&o(0,d=e.value),"desc"in e&&o(2,u=e.desc),"noForm"in e&&o(6,m=e.noForm),"classId"in e&&o(7,f=e.classId),"eventId"in e&&o(28,$=e.eventId),"recordId"in e&&o(8,h=e.recordId),"required"in e&&o(1,g=e.required),"disabled"in e&&o(3,v=e.disabled),"readonly"in e&&o(27,b=e.readonly),"praefix"in e&&o(9,w=e.praefix),"selectionFields"in e&&o(10,y=e.selectionFields),"formnovalidate"in e&&o(29,x=e.formnovalidate),"selection"in e&&o(11,k=e.selection),"deList"in e&&o(12,I=e.deList),"isTemplate"in e&&o(13,F=e.isTemplate)},e.$$.update=()=>{536870914&e.$$.dirty[0]&&o(1,g=g&&!x),16417&e.$$.dirty[0]&&d&&q&&Promise.resolve(ji(a.refClass,q.id,d)).then((e=>S(e))),16385&e.$$.dirty[0]&&!d&&q&&S({})},[d,g,u,v,s,a,m,f,h,w,y,k,I,F,q,C,j,_,i,l,N,async()=>{try{if(o(14,q=await t.getSchemaByClass(a.refClass)),$&&h&&d&&!v){const e=await t.getSchema($);e.input?.find((e=>e===a.refClass))&&o(3,v=!0)}return o(17,_=q.identity.designation),!0}catch{return r("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(15,C=!0)},({detail:e})=>{o(0,d=e.row._id),L()},L,()=>{o(0,d=o(2,u="")),r("change",{value:d,description:u}),r("task",{row:{_task:{event:q.id,_id:!1}}})},async()=>{if(!d)return;const e=await ji(a.refClass,q.id,d),t=e._task._id;return`/task/${e._task.event}/${t}/task?view=standalone`},b,$,x,function(e){C=e,o(15,C)},function(e){j=e,o(16,j)}]}class er extends we{constructor(e){var t;super(),To.getElementById("svelte-jox15l-style")||((t=j("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}",k(To.head,t)),be(this,e,Xo,Ko,w,{id:4,item:5,value:0,desc:2,noForm:6,classId:7,eventId:28,recordId:8,required:1,disabled:3,readonly:27,praefix:9,selectionFields:10,formnovalidate:29,selection:11,deList:12,isTemplate:13},[-1,-1])}}function tr(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],pattern:e[22],required:e[2],id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function nr(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],required:e[2],type:"email",id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function or(e){let t,n;return t=new Bn({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[14],required:e[2],id:e[24],item:e[1],value:e[16](),praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("checkRange",e[33]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function rr(e){let t,n;return t=new En({props:{classId:e[5],id:e[24],disabled:e[7],required:e[2],value:e[25](),noForm:e[4]}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ir(e){let t,n;return t=new e[20]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[24],name:e[23],value:e[25](),closeOnSelection:!0}}),t.$on("change",e[26](!0)),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function lr(e){let t,n;return t=new e[21]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[14],required:e[2],id:e[24],name:e[23],checked:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),16512&n[0]&&(o.disabled=e[7]||e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.checked=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function sr(e){let t,n;return t=new $n({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[32]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ar(e){let t,n;return t=new Pt({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[31]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function cr(e){let t,n;return t=new wn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function dr(e){let t,n;return t=new dt({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[14],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ur(e){let t,n;return t=new r({props:{classId:e[5],disabled:e[7],readonly:e[14],id:e[24],name:e[1].name,value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.name=e[1].name),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function mr(e){let t,n;return t=new er({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[14],id:e[24],item:e[1],desc:e[17],value:e[16](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[30]),t.$on("change",e[26]()),t.$on("initFail",e[27]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),131072&n[0]&&(o.desc=e[17]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function fr(e){let t,n,o,r;const i=[mr,ur,dr,cr,ar,sr,lr,ir,rr,or,nr,tr],l=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=l[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),I(e,o,n),r=!0},p(e,r){let a=t;t=s(e),t===a?l[t].p(e,r):(ae(),ue(l[a],1,1,(()=>{l[a]=null})),ce(),n=l[t],n?n.p(e,r):(n=l[t]=i[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){r||(de(n),r=!0)},o(e){ue(n),r=!1},d(e){l[t].d(e),e&&F(o)}}}function pr(e){let t,n;return t=new e[18]({props:{id:e[28](e[24]),class:e[1].name+(e[15]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[fr]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32770&n[0]&&(o.class=e[1].name+(e[15]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),229375&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function $r(e,t,n){let o,r,i;const l=R(),{FormField:s,TextField:a,DatePicker:d,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:N}=t,{required:j}=t,{isTemplate:_}=t,{required:q,readonly:C,hidden:S,pattern:L}=$.properties||{};if(S=!0===S,void 0!==C&&(C=!0===C),void 0===j&&(j=q),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const E=(h?h+".":"")+$.name,z=E+(""!==p?"-"+p:""),T=(e,t=E)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(29,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,w=e.eventId),"disabled"in e&&n(7,y=e.disabled),"selectionFields"in e&&n(8,x=e.selectionFields),"formnovalidate"in e&&n(9,k=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,F=e.numberInput),"deList"in e&&n(12,N=e.deList),"required"in e&&n(2,j=e.required),"isTemplate"in e&&n(13,_=e.isTemplate)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(16,o=(e=E)=>{let t=T(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=T(g))},n(17,r=((e=E)=>{let t=g["_"+e];return t=u(t),void 0===t?"":t})()),[g,$,j,p,v,b,w,y,x,k,I,F,N,_,C,S,o,r,s,a,d,f,L,E,z,(e=E)=>{let t=T(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,g[E]=e?In(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;l("notify",{oldValue:i,value:o,add:s,itemName:E,desc:t.description})},()=>n(15,S=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)}]}class hr extends we{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=j("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",k(document.head,t)),be(this,e,$r,pr,w,{praefix:3,item:1,listName:29,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13},[-1,-1])}}const{document:gr}=pe;function vr(e,t,n){const o=e.slice();return o[69]=t[n],o[71]=n,o}function br(e,t,n){const o=e.slice();return o[78]=t[n],o}function wr(e,t,n){const o=e.slice();return o[73]=t[n].title,o[74]=t[n].toDelete,o[75]=t[n].icon,o}function yr(e){let t,n;return t=new e[13]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[xr]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function xr(e){let t,n,o;function r(t){e[40](t)}let i={item:e[23],disabled:!0};return void 0!==e[6]&&(i.value=e[6]),t=new dt({props:i}),G.push((()=>$e(t,"value",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&64&o[0]&&(n=!0,r.value=e[6],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function kr(e){let t,n;return t=new e[13]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};512&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ir(e){let t,n,o;function r(t){e[41](t)}let i={item:e[21],disabled:!0};return void 0!==e[9]&&(i.value=e[9]),t=new dt({props:i}),G.push((()=>$e(t,"value",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&512&o[0]&&(n=!0,r.value=e[9],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function Fr(e){let t,n;return t=new e[13]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[Nr]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Nr(e){let t,n,o;function r(t){e[42](t)}let i={item:e[19],disabled:!0};return void 0!==e[5]&&(i.value=e[5]),t=new dt({props:i}),G.push((()=>$e(t,"value",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&32&o[0]&&(n=!0,r.value=e[5],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function jr(e){let t,n;return t=new e[16]({props:{class:e[10][e[71]],$$slots:{handle:[Tr,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]],default:[Sr,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){b(e[68])&&e[68].apply(this,arguments)})),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};1024&o[0]&&(r.class=e[10][e[71]]),6543&o[0]|525312&o[2]&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function _r(e){let t,n;return t=new hr({props:{praefix:e[71],item:e[78],eventId:e[3],record:e[69],noForm:Ar,classId:e[2],disabled:e[0],required:e[17],selectionFields:e[24],numberInput:e[12],formnovalidate:e[71]===e[7].length-1||e[7][e[71]]._delete}}),t.$on("notify",(function(){b(e[26](e[78],e[71]))&&e[26](e[78],e[71]).apply(this,arguments)})),t.$on("task",e[43]),t.$on("invalid",e[27]),t.$on("checkRange",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.item=e[78]),8&o[0]&&(r.eventId=e[3]),128&o[0]&&(r.record=e[69]),4&o[0]&&(r.classId=e[2]),1&o[0]&&(r.disabled=e[0]),4096&o[0]&&(r.numberInput=e[12]),128&o[0]&&(r.formnovalidate=e[71]===e[7].length-1||e[7][e[71]]._delete),t.$set(r)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function qr(e){let t,n,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=_r(br(e,o,t));const i=e=>ue(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(486674575&n[0]){let l;for(o=e[1].item,l=0;l<o.length;l+=1){const i=br(e,o,l);r[l]?(r[l].p(i,n),de(r[l],1)):(r[l]=_r(i),r[l].c(),de(r[l],1),r[l].m(t.parentNode,t))}for(ae(),l=o.length;l<r.length;l+=1)i(l);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ue(r[e]);n=!1},d(e){N(r,e),e&&F(t)}}}function Cr(e){let t,n,o=e[7][e[71]]._delete,r=qr(e);return{c(){r.c(),t=S()},m(e,o){r.m(e,o),I(e,t,o),n=!0},p(e,n){128&n[0]&&w(o,o=e[7][e[71]]._delete)?(ae(),ue(r,1,1,$),ce(),r=qr(e),r.c(),de(r),r.m(t.parentNode,t)):r.p(e,n)},i(e){n||(de(r),n=!0)},o(e){ue(r),n=!1},d(e){e&&F(t),r.d(e)}}}function Sr(e){let t,n,o,r,i=e[7].length,l=Cr(e);return{c(){t=j("div"),l.c(),o=C(),T(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`)},m(e,n){I(e,t,n),l.m(t,null),I(e,o,n),r=!0},p(e,o){128&o[0]&&w(i,i=e[7].length)?(ae(),ue(l,1,1,$),ce(),l=Cr(e),l.c(),de(l),l.m(t,null)):l.p(e,o),(!r||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`))&&T(t,"id",n)},i(e){r||(de(l),r=!0)},o(e){ue(l),r=!1},d(e){e&&F(t),l.d(e),e&&F(o)}}}function Lr(e){let t,n,o,r,i,l=e[25](e[8],e[71])+"";return{c(){t=j("div"),n=q(l),T(t,"class",o=x("draggableListItem "+e[1].name)+" svelte-1es1ap1"),T(t,"draggable",!0),M(t,"delete",e[69]._delete),M(t,"is-active-top",e[11]?.top===e[71]),M(t,"is-active-bottom",e[11]?.bottom===e[71])},m(o,l){I(o,t,l),k(t,n),r||(i=[L(t,"dragover",e[34]),L(t,"dragleave",e[35](e[71])),L(t,"dragstart",e[32](e[71])),L(t,"drop",E(e[31](e[71]))),L(t,"dragenter",e[33](e[71]))],r=!0)},p(r,i){e=r,256&i[0]&&l!==(l=e[25](e[8],e[71])+"")&&D(n,l),2&i[0]&&o!==(o=x("draggableListItem "+e[1].name)+" svelte-1es1ap1")&&T(t,"class",o),130&i[0]&&M(t,"delete",e[69]._delete),2050&i[0]&&M(t,"is-active-top",e[11]?.top===e[71]),2050&i[0]&&M(t,"is-active-bottom",e[11]?.bottom===e[71])},d(e){e&&F(t),r=!1,v(i)}}}function Er(e){let t,n,o;var r=e[75];return r&&(t=new r({props:{size:"20"}})),{c(){t&&he(t.$$.fragment),n=S()},m(e,r){t&&ge(t,e,r),I(e,n,r),o=!0},p(e,o){if(r!==(r=e[75])){if(t){ae();const e=t;ue(e.$$.fragment,1,0,(()=>{ve(e,1)})),ce()}r?(t=new r({props:{size:"20"}}),he(t.$$.fragment),de(t.$$.fragment,1),ge(t,n.parentNode,n)):t=null}},i(e){o||(t&&de(t.$$.fragment,e),o=!0)},o(e){t&&ue(t.$$.fragment,e),o=!1},d(e){e&&F(n),t&&ve(t,e)}}}function zr(e){let t,n,o,r,i,l=!e[0]&&Er(e);return{c(){t=j("span"),l&&l.c(),T(t,"class","pointer icon svelte-1es1ap1"),T(t,"title",e[73]),t.hidden=n=e[71]===e[7].length-1||!(e[69]._delete^e[74])},m(n,s){I(n,t,s),l&&l.m(t,null),o=!0,r||(i=L(t,"click",e[30](e[71])),r=!0)},p(r,i){(e=r)[0]?l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()):l?(l.p(e,i),1&i[0]&&de(l,1)):(l=Er(e),l.c(),de(l,1),l.m(t,null)),(!o||128&i[0]&&n!==(n=e[71]===e[7].length-1||!(e[69]._delete^e[74])))&&(t.hidden=n)},i(e){o||(de(l),o=!0)},o(e){ue(l),o=!1},d(e){e&&F(t),l&&l.d(),r=!1,i()}}}function Tr(e){let t,n,o,r,i,l;n=new e[14]({props:{$$slots:{default:[Lr]},$$scope:{ctx:e}}}),n.$on("click",(function(){b(e[29](e[72],e[71]))&&e[29](e[72],e[71]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:Te},{title:"undo",toDelete:!1,icon:Le}],a=[];for(let t=0;t<2;t+=1)a[t]=zr(wr(e,s,t));const c=e=>ue(a[e],1,1,(()=>{a[e]=null}));return{c(){t=j("div"),he(n.$$.fragment),o=C();for(let e=0;e<2;e+=1)a[e].c();r=C(),T(t,"class",i=x("accordion "+e[1].name)+" svelte-1es1ap1"),T(t,"slot","handle")},m(e,i){I(e,t,i),ge(n,t,null),k(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);k(t,r),l=!0},p(o,d){e=o;const u={};if(2434&d[0]|524288&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),1073741953&d[0]){let n;for(s=[{title:"löschen",toDelete:!0,icon:Te},{title:"undo",toDelete:!1,icon:Le}],n=0;n<2;n+=1){const o=wr(e,s,n);a[n]?(a[n].p(o,d),de(a[n],1)):(a[n]=zr(o),a[n].c(),de(a[n],1),a[n].m(t,r))}for(ae(),n=2;n<2;n+=1)c(n);ce()}(!l||2&d[0]&&i!==(i=x("accordion "+e[1].name)+" svelte-1es1ap1"))&&T(t,"class",i)},i(e){if(!l){de(n.$$.fragment,e);for(let e=0;e<2;e+=1)de(a[e]);l=!0}},o(e){ue(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)ue(a[e]);l=!1},d(e){e&&F(t),ve(n),N(a,e)}}}function Dr(e){let t,n,o=(!e[4]&&!e[0]||e[71]<e[7].length-1)&&jr(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),I(e,t,r),n=!0},p(e,n){!e[4]&&!e[0]||e[71]<e[7].length-1?o?(o.p(e,n),145&n[0]&&de(o,1)):(o=jr(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&F(t)}}}function Or(e){let t,n,o=e[7],r=[];for(let t=0;t<o.length;t+=1)r[t]=Dr(vr(e,o,t));const i=e=>ue(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(2130845087&n[0]|31&n[1]|1088&n[2]){let l;for(o=e[7],l=0;l<o.length;l+=1){const i=vr(e,o,l);r[l]?(r[l].p(i,n),de(r[l],1)):(r[l]=Dr(i),r[l].c(),de(r[l],1),r[l].m(t.parentNode,t))}for(ae(),l=o.length;l<r.length;l+=1)i(l);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ue(r[e]);n=!1},d(e){N(r,e),e&&F(t)}}}function Br(e){let t,n,o,r,i,l,s=e[22]&&0!=e[6]&&yr(e),a=e[20]&&0!=e[9]&&kr(e),c=e[18]&&0!=e[5]&&Fr(e);return i=new e[15]({props:{$$slots:{default:[Or,({closeOtherPanels:e})=>({68:e}),({closeOtherPanels:e})=>[0,0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=j("div"),s&&s.c(),n=C(),a&&a.c(),o=C(),c&&c.c(),r=C(),he(i.$$.fragment),T(t,"class","formList")},m(e,d){I(e,t,d),s&&s.m(t,null),k(t,n),a&&a.m(t,null),k(t,o),c&&c.m(t,null),k(t,r),ge(i,t,null),l=!0},p(e,l){e[22]&&0!=e[6]?s?(s.p(e,l),64&l[0]&&de(s,1)):(s=yr(e),s.c(),de(s,1),s.m(t,n)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce()),e[20]&&0!=e[9]?a?(a.p(e,l),512&l[0]&&de(a,1)):(a=kr(e),a.c(),de(a,1),a.m(t,o)):a&&(ae(),ue(a,1,1,(()=>{a=null})),ce()),e[18]&&0!=e[5]?c?(c.p(e,l),32&l[0]&&de(c,1)):(c=Fr(e),c.c(),de(c,1),c.m(t,r)):c&&(ae(),ue(c,1,1,(()=>{c=null})),ce());const d={};7583&l[0]|524352&l[2]&&(d.$$scope={dirty:l,ctx:e}),i.$set(d)},i(e){l||(de(s),de(a),de(c),de(i.$$.fragment,e),l=!0)},o(e){ue(s),ue(a),ue(c),ue(i.$$.fragment,e),l=!1},d(e){e&&F(t),s&&s.d(),a&&a.d(),c&&c.d(),ve(i)}}}let Mr=new Map;const Ar=!0,Vr="pos/target";function Pr(e,t,n){let o,r;const{FormField:i,TextField:l,Button:s,Accordion:a,AccordionSection:d,Divider:p}=c,$=R();let{list:h}=t,{schema:g}=t,{record:v}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{fixed:x}=t,{template:k={}}=t;const I=g.find((e=>"price"===e.name&&!e.properties?.hidden)),F=I&&g.find((e=>"quantity"===e.name));let N=0;const j=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let _=0;const q=g.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",C=!!q;let S=0;const L={};let E=g.properties?.readonly,z=b.split("form-")[1].slice(0,-4);y||=E;let T,D,O=[],B=[],M=!1,A={},V=[];g.filter((e=>e.selection)).map((e=>O.push({className:z,parentClass:g,refClass:e.selection,value:""})));["readonly","hidden","required"].map((e=>{g.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[o,r]=n.split(".");r||(r=o,o=void 0),V.push({action:e,itemName:t.name,refObj:o,refName:r,op:t.properties[e].invert?"!":""})}))}));const P=async(e,t)=>{const o=V.filter((e=>(e.refObj||z)===t));if(o?.length)for(const t of o){const{action:o,itemName:r,refObj:i,refName:l,op:s}=t;let a,c,d=!1,u=!1;if(i){const t=T[e][i];i===z&&l?d=v:t&&(d=await Ci(i,t))}!i&&l&&(d=T[e]),d&&(u=d[l],"!"===s&&(u=!u)),"required"!==o&&"readonly"!==o||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${r} .field textarea`,c=document.querySelector(a),c||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${r} .field input`,c=document.querySelector(a)),c&&u&&c.setAttribute(o,"true"),c&&!u&&c.removeAttribute(o)),"hidden"===o&&(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${r}`,c=document.querySelector(a),c?.classList?.toggle("hidden",u),u&&n(7,T[e][r]="",T))}},W=(e,t)=>{let o=`#accordion-content-${b}-${h.name}-${e} .form-field .field :required`;const r=document.querySelectorAll(o);let i=!1;r.forEach((e=>{""===e.value&&(i=!0)})),void 0===t&&(o=`#accordion-content-${b}-${h.name}-${e} .form-field .field input.invalid`,document.querySelector(o)&&(t=!0)),n(10,B[e]=i||t?"invalid":"",B)},Y=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},G=(e,t)=>{if(!t)return;const o=g.find((e=>e.name===t)),r=o.properties.value.formula,{operator:i,argument:l}=r,s=l.map((t=>T[e][t.refItem]));let a=0;"$add"===i&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===i&&(a=s.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[r,i]=t.split(":");return r?e-=i?(+r+ +i/60).toFixed(2):+r:0}))),n(7,T[e][t]=(a||0).toFixed(o.properties.decimals||0),T),n(12,A={item:o,value:a,idx:e})};D=g.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=g.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[r]=o.split(".");r&&e.push({refClass:r,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const J=async(e,t,o,r)=>{const i=(await D).find((e=>e.refClass===t.refClass));if(!i)return;const{refClass:l,items:s,selection:a}=i;return o?Promise.all(s.map((i=>{let c="";const{refInput:d}=t;if(d&&T[e]){const[t,n]=d.split(".");c=n?T[e][n]:v[t]}if(a&&o!==r)s.map((t=>{n(7,T[e][t]="",T)}));else if(d&&!c||U(e,i)){const o=g.find((e=>e.refClass===l)),r=T[e][o.name];if(t.selection){const o=qi(t.selection+r.toString());if(o)return Promise.resolve(o).then((t=>n(7,T[e][i]=t[i],T)))}return Promise.resolve(Ci(o.refClass,r)).then((t=>n(7,T[e][i]=t[i],T)))}}))):Promise.resolve(s.map((t=>{n(7,T[e][t]="",T)})))},U=(e,t)=>{let n=T[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},Z=e=>!(!x&&e>=T.length-1),Q=(e,t=!1)=>{const[n,o]=e.split(";");return h.name===o&&(!!Z(t)&&((!1===t||t!=n)&&parseInt(n)))};return g.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=g.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&n(1,h=e.list),"schema"in e&&n(36,g=e.schema),"record"in e&&n(37,v=e.record),"classId"in e&&n(2,b=e.classId),"eventId"in e&&n(3,w=e.eventId),"disabled"in e&&n(0,y=e.disabled),"fixed"in e&&n(4,x=e.fixed),"template"in e&&n(38,k=e.template)},e.$$.update=()=>{2&e.$$.dirty[0]|64&e.$$.dirty[1]&&v&&n(7,T=(v[h.name]||[]).concat({})),128&e.$$.dirty[0]&&n(8,o=T),482&e.$$.dirty[0]&&o&&((()=>{if(j)n(9,_=T?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(C)n(6,S=T?.reduce(((e,t)=>e+(t._delete?0:+(t[q]||0))),0)||0)})(),(()=>{if(I)n(5,N=T?.reduce(((e,t)=>{if(t.price){const n=(F?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:h.name,value:T,amountValue:N,weeksValue:S})),256&e.$$.dirty[1]&&(r=e=>L[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,h,b,w,x,N,S,T,o,_,B,M,A,i,s,a,d,undefined,I,{name:"amountValue",properties:{decimals:2}},j,{name:"hoursValue",properties:{decimals:2}},C,{name:"weeksValue",properties:{decimals:1}},O,(e,t)=>{const n=e[t];return n&&g.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):"boolean"===e.type?f(n[e.name]):"date"===e.type?u(n[e.name]):"datetime"===e.type?m(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:r})=>{const{oldValue:i,value:l,add:s,desc:a}=r;P(t,e.name),G(t,e._formulaActor);const c=O?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,l)),l&&T.length===t+1&&n(7,T=T.concat({})),a&&n(39,L[l]=a,L),await J(t,e,l,i),n(8,o=T),"number"===e.type&&n(12,A={item:e,value:l,idx:t}),W(t)},({detail:e})=>{const{idx:t,value:n}=e;W(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const r=Y(o);let i=!1;T.forEach(((e,n)=>{if(t===n)return;const{start:o,end:l}=T[n];o&&l&&r>Y(o)&&r<Y(l)&&(i=!0)}));const l=document.getElementById(n);l?.classList?.toggle("invalid",i)},(e,t)=>o=>{(e=>{const t=k[h.name]||{};for(const o in t)k[h.name][o]&&!T[e][o]&&n(7,T[e][o]=k[h.name][o],T)})(t),e(o);const r=`#accordion-content-${b}-${h.name}-${t} > div.form-field:not(.hidden)`,i=document.querySelectorAll(r),l=i[i.length-1];X().then((()=>l.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(7,T[e]._delete=!T[e]._delete,T)},e=>t=>{t.preventDefault(),n(11,M=!1);const o=Q(t.dataTransfer.getData(Vr),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const r=[...T].map(((e,t)=>(e._index=t,e)));o<e?(r.splice(e+1,0,r[o]),r.splice(o,1)):(r.splice(e,0,r[o]),r.splice(o+1,1)),r.map(((e,t)=>{return n=e._index,o=t,void Mr.set(o,n);var n,o}));let i=[];B.map(((e,t)=>{i[t]=B[(e=>{const t=Mr.get(e);return void 0===t?e:t})(t)]})),n(10,B=i),n(7,T=r.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!Z(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(Vr,e+";"+h.name)},e=>t=>{const o=Q(t.dataTransfer.getData(Vr),e);return!1===o||o===e?n(11,M=!1):void n(11,M={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(11,M=!1)},g,v,k,L,function(e){S=e,n(6,S)},function(e){_=e,n(9,_)},function(e){N=e,n(5,N)},function(t){H(e,t)}]}class Wr extends we{constructor(e){var t;super(),gr.getElementById("svelte-1es1ap1-style")||((t=j("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",k(gr.head,t)),be(this,e,Pr,Br,w,{list:1,schema:36,record:37,classId:2,eventId:3,disabled:0,fixed:4,template:38},[-1,-1,-1])}}const{document:Rr}=pe;function Hr(e,t,n){const o=e.slice();return o[22]=t[n],o}function Yr(e){let t,n;return t=new hr({props:{classId:e[2],item:e[22],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5]}}),t.$on("notify",e[12]),t.$on("task",e[17]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[22]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),32&n&&(o.required=e[5]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Gr(e){let t,n,o=e[14](e[5],e[22]),r=o&&Yr(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),I(e,t,o),n=!0},p(e,n){34&n&&(o=e[14](e[5],e[22])),o?r?(r.p(e,n),34&n&&de(r,1)):(r=Yr(e),r.c(),de(r,1),r.m(t.parentNode,t)):r&&(ae(),ue(r,1,1,(()=>{r=null})),ce())},i(e){n||(de(r),n=!0)},o(e){ue(r),n=!1},d(e){r&&r.d(e),e&&F(t)}}}function Jr(e){let t,n,o,r=e[1].item,i=[];for(let t=0;t<r.length;t+=1)i[t]=Gr(Hr(e,r,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){t=j("div");for(let e=0;e<i.length;e+=1)i[e].c();T(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){I(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null);o=!0},p(e,s){if(20543&s){let n;for(r=e[1].item,n=0;n<r.length;n+=1){const o=Hr(e,r,n);i[n]?(i[n].p(o,s),de(i[n],1)):(i[n]=Gr(o),i[n].c(),de(i[n],1),i[n].m(t,null))}for(ae(),n=r.length;n<i.length;n+=1)l(n);ce()}(!o||6&s&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&T(t,"id",n)},i(e){if(!o){for(let e=0;e<r.length;e+=1)de(i[e]);o=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);o=!1},d(e){e&&F(t),N(i,e)}}}function Ur(e){let t,n,o=e[11](e[7])+"";return{c(){t=j("span"),n=q(o)},m(e,o){I(e,t,o),k(t,n)},p(e,t){128&t&&o!==(o=e[11](e[7])+"")&&D(n,o)},d(e){e&&F(t)}}}function Zr(e){let t,n,o;return n=new e[8]({props:{$$slots:{default:[Ur]},$$scope:{ctx:e}}}),n.$on("click",(function(){b(e[13](e[21]))&&e[13](e[21]).apply(this,arguments)})),{c(){t=j("div"),he(n.$$.fragment),T(t,"class","accordion svelte-148ktt9"),T(t,"slot","handle")},m(e,r){I(e,t,r),ge(n,t,null),o=!0},p(t,o){e=t;const r={};33554560&o&&(r.$$scope={dirty:o,ctx:e}),n.$set(r)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n)}}}function Qr(e){let t,n;return t=new e[10]({props:{open:e[6],$$slots:{handle:[Zr,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0],default:[Jr,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.open=e[6]),35651775&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Kr(e){let t,n,o;return n=new e[9]({props:{$$slots:{default:[Qr]},$$scope:{ctx:e}}}),{c(){t=j("div"),he(n.$$.fragment),T(t,"class","formList")},m(e,r){I(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};33554687&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&F(t),ve(n)}}}function Xr(e,t,n){const{Button:o,Accordion:r,AccordionSection:i}=c;let{list:l}=t,{schema:s}=t,{record:a}=t,{classId:d}=t,{eventId:p}=t,{disabled:$}=t,{required:h}=t,{open:g=!1}=t,{template:v={}}=t;const b={};let w=a[l.name]||{};a[l.name]=w;const y=e=>b[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,l=e.list),"schema"in e&&n(15,s=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,d=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled),"required"in e&&n(5,h=e.required),"open"in e&&n(6,g=e.open),"template"in e&&n(16,v=e.template)},[a,l,d,p,$,h,g,w,o,r,i,e=>s.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?y(t.name):"boolean"===t.type?f(e[t.name]):"date"===t.type?u(e[t.name]):"datetime"===t.type?m(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(b[o]=e.desc);const r=a[t];n(0,a[t]={...r,[o]:e.value},a),n(7,w=a[t])},e=>t=>{(()=>{const e=v[l.name]||{};for(const t in e)v[l.name][t]&&!a[l.name][t]&&n(0,a[l.name][t]=v[l.name][t],a)})(),e(t);const o=`#accordion-content-${d}-${l.name} > div.form-field:last-child`,r=document.querySelector(o);X().then((()=>r.scrollIntoView({behavior:"smooth",block:"end"})))},(e,t)=>{let n=t.type;return"time"===t.properties?.format&&(n="time"),!1!==e||!["date","datetime","time"].includes(n)},s,v,function(t){H(e,t)}]}class ei extends we{constructor(e){var t;super(),Rr.getElementById("svelte-148ktt9-style")||((t=j("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}}",k(Rr.head,t)),be(this,e,Xr,Kr,w,{list:1,schema:15,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:16})}}const{Boolean:ti,document:ni}=pe;function oi(e,t,n){const o=e.slice();return o[75]=t[n],o}function ri(e,t,n){const o=e.slice();return o[78]=t[n],o}function ii(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function li(e){let t,n,o=e[74]&&function(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p,$,h,g,b,w=e[0].items,y=[];for(let t=0;t<w.length;t+=1)y[t]=ai(ri(e,w,t));const _=e=>ue(y[e],1,1,(()=>{y[e]=null}));let q=e[0].list&&ci(e);m=new e[9]({props:{outline:!0,$$slots:{default:[gi]},$$scope:{ctx:e}}}),m.$on("click",e[21]),p=new e[9]({props:{class:"close",disabled:e[6],form:e[12],filled:!0,type:"submit",$$slots:{default:[vi]},$$scope:{ctx:e}}});let S=e[1]&&!e[6]&&bi(e);return{c(){t=j("section"),n=j("form"),o=j("input"),i=C();for(let e=0;e<y.length;e+=1)y[e].c();l=C(),q&&q.c(),s=C(),a=j("div"),c=j("small"),c.textContent=`${Ei}`,d=C(),u=j("div"),he(m.$$.fragment),f=C(),he(p.$$.fragment),$=C(),S&&S.c(),T(o,"class",x(e[12])+" svelte-1dh1s6w"),T(o,"name","_id"),T(o,"type","hidden"),o.value=r=e[2]._id||"",T(n,"class",x(e[13])+" svelte-1dh1s6w"),T(n,"id",e[12]),T(a,"class","comment svelte-1dh1s6w"),T(u,"class","form--buttons svelte-1dh1s6w"),T(t,"class",x(e[14])+" svelte-1dh1s6w")},m(r,v){I(r,t,v),k(t,n),k(n,o),k(n,i);for(let e=0;e<y.length;e+=1)y[e].m(n,null);k(n,l),q&&q.m(n,null),k(t,s),k(t,a),k(a,c),k(t,d),k(t,u),ge(m,u,null),k(u,f),ge(p,u,null),k(u,$),S&&S.m(u,null),h=!0,g||(b=[L(n,"keydown",e[25]),L(n,"submit",E(e[20]))],g=!0)},p(e,t){if((!h||4&t[0]&&r!==(r=e[2]._id||""))&&(o.value=r),79695941&t[0]){let o;for(w=e[0].items,o=0;o<w.length;o+=1){const r=ri(e,w,o);y[o]?(y[o].p(r,t),de(y[o],1)):(y[o]=ai(r),y[o].c(),de(y[o],1),y[o].m(n,l))}for(ae(),o=w.length;o<y.length;o+=1)_(o);ce()}e[0].list?q?(q.p(e,t),1&t[0]&&de(q,1)):(q=ci(e),q.c(),de(q,1),q.m(n,null)):q&&(ae(),ue(q,1,1,(()=>{q=null})),ce());const i={};524288&t[2]&&(i.$$scope={dirty:t,ctx:e}),m.$set(i);const s={};64&t[0]&&(s.disabled=e[6]),524288&t[2]&&(s.$$scope={dirty:t,ctx:e}),p.$set(s),e[1]&&!e[6]?S?(S.p(e,t),66&t[0]&&de(S,1)):(S=bi(e),S.c(),de(S,1),S.m(u,null)):S&&(ae(),ue(S,1,1,(()=>{S=null})),ce())},i(e){if(!h){for(let e=0;e<w.length;e+=1)de(y[e]);de(q),de(m.$$.fragment,e),de(p.$$.fragment,e),de(S),h=!0}},o(e){y=y.filter(ti);for(let e=0;e<y.length;e+=1)ue(y[e]);ue(q),ue(m.$$.fragment,e),ue(p.$$.fragment,e),ue(S),h=!1},d(e){e&&F(t),N(y,e),q&&q.d(),ve(m),ve(p),S&&S.d(),g=!1,v(b)}}}(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),I(e,t,r),n=!0},p(e,t){e[74]&&o.p(e,t)},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&F(t)}}}function si(e){let t,n;return t=new hr({props:{classId:e[12],item:e[78],selection:e[78].selection,record:e[2],disabled:e[6],eventId:e[0].id}}),t.$on("task",e[22]),t.$on("notify",e[23]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[78]),1&n[0]&&(o.selection=e[78].selection),4&n[0]&&(o.record=e[2]),64&n[0]&&(o.disabled=e[6]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ai(e){let t,n,o="list"!==e[78].type&&e[26](!0,e[78].name),r=o&&si(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),I(e,t,o),n=!0},p(e,n){1&n[0]&&(o="list"!==e[78].type&&e[26](!0,e[78].name)),o?r?(r.p(e,n),1&n[0]&&de(r,1)):(r=si(e),r.c(),de(r,1),r.m(t.parentNode,t)):r&&(ae(),ue(r,1,1,(()=>{r=null})),ce())},i(e){n||(de(r),n=!0)},o(e){ue(r),n=!1},d(e){r&&r.d(e),e&&F(t)}}}function ci(e){let t,n,o,r,i=e[16]&&0!=e[3]&&di(e),l=e[17]&&0!=e[4]&&mi(e),s=e[0].list,a=[];for(let t=0;t<s.length;t+=1)a[t]=hi(oi(e,s,t));const c=e=>ue(a[e],1,1,(()=>{a[e]=null}));return{c(){i&&i.c(),t=C(),l&&l.c(),n=C();for(let e=0;e<a.length;e+=1)a[e].c();o=S()},m(e,s){i&&i.m(e,s),I(e,t,s),l&&l.m(e,s),I(e,n,s);for(let t=0;t<a.length;t+=1)a[t].m(e,s);I(e,o,s),r=!0},p(e,r){if(e[16]&&0!=e[3]?i?(i.p(e,r),8&r[0]&&de(i,1)):(i=di(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce()),e[17]&&0!=e[4]?l?(l.p(e,r),16&r[0]&&de(l,1)):(l=mi(e),l.c(),de(l,1),l.m(n.parentNode,n)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()),16781413&r[0]){let t;for(s=e[0].list,t=0;t<s.length;t+=1){const n=oi(e,s,t);a[t]?(a[t].p(n,r),de(a[t],1)):(a[t]=hi(n),a[t].c(),de(a[t],1),a[t].m(o.parentNode,o))}for(ae(),t=s.length;t<a.length;t+=1)c(t);ce()}},i(e){if(!r){de(i),de(l);for(let e=0;e<s.length;e+=1)de(a[e]);r=!0}},o(e){ue(i),ue(l),a=a.filter(ti);for(let e=0;e<a.length;e+=1)ue(a[e]);r=!1},d(e){i&&i.d(e),e&&F(t),l&&l.d(e),e&&F(n),N(a,e),e&&F(o)}}}function di(e){let t,n;return t=new e[10]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[ui]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ui(e){let t,n,o;function r(t){e[36](t)}let i={item:e[15],disabled:!0};return void 0!==e[3]&&(i.value=e[3]),t=new dt({props:i}),G.push((()=>$e(t,"value",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&8&o[0]&&(n=!0,r.value=e[3],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function mi(e){let t,n;return t=new e[10]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[fi]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function fi(e){let t,n,o;function r(t){e[37](t)}let i={item:e[18],disabled:!0};return void 0!==e[4]&&(i.value=e[4]),t=new dt({props:i}),G.push((()=>$e(t,"value",r))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&16&o[0]&&(n=!0,r.value=e[4],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function pi(e){let t,n;return t=new ei({props:{classId:e[12],list:e[75],template:e[5],eventId:e[0].id,schema:e[75].item,record:e[2],disabled:e[6]}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[75]),32&n[0]&&(o.template=e[5]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[75].item),4&n[0]&&(o.record=e[2]),64&n[0]&&(o.disabled=e[6]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function $i(e){let t,n;return t=new Wr({props:{classId:e[12],list:e[75],template:e[5],eventId:e[0].id,schema:e[75].item,record:e[2],disabled:e[6],fixed:e[75].fixed}}),t.$on("save",e[24]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[75]),32&n[0]&&(o.template=e[5]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[75].item),4&n[0]&&(o.record=e[2]),64&n[0]&&(o.disabled=e[6]),1&n[0]&&(o.fixed=e[75].fixed),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function hi(e){let t,n,o,r,i,l;t=new e[8]({props:{text:e[75].designation}});const s=[$i,pi],a=[];function c(e,t){return"array"===e[75].type?0:1}return o=c(e),r=a[o]=s[o](e),{c(){he(t.$$.fragment),n=C(),r.c(),i=S()},m(e,r){ge(t,e,r),I(e,n,r),a[o].m(e,r),I(e,i,r),l=!0},p(e,n){const l={};1&n[0]&&(l.text=e[75].designation),t.$set(l);let d=o;o=c(e),o===d?a[o].p(e,n):(ae(),ue(a[d],1,1,(()=>{a[d]=null})),ce(),r=a[o],r?r.p(e,n):(r=a[o]=s[o](e),r.c()),de(r,1),r.m(i.parentNode,i))},i(e){l||(de(t.$$.fragment,e),de(r),l=!0)},o(e){ue(t.$$.fragment,e),ue(r),l=!1},d(e){ve(t,e),e&&F(n),a[o].d(e),e&&F(i)}}}function gi(e){let t;return{c(){t=q("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function vi(e){let t;return{c(){t=q("Speichern und schliessen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function bi(e){let t,n;return t=new e[9]({props:{form:e[12],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[wi]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function wi(e){let t;return{c(){t=q("Speichern")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function yi(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function xi(e){let t,n,o,r;ni.title=t=e[7];let i={ctx:e,current:null,token:null,hasCatch:!1,pending:yi,then:li,catch:ii,value:74,blocks:[,,,]};return me(e[19](),i),{c(){n=C(),o=S(),i.block.c()},m(e,t){I(e,n,t),I(e,o,t),i.block.m(e,i.anchor=t),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(n,o){e=n,(!r||128&o[0])&&t!==(t=e[7])&&(ni.title=t),fe(i,e,o)},i(e){r||(de(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}r=!1},d(e){e&&F(n),e&&F(o),i.block.d(e),i.token=null,i=null}}}let ki=new Map,Ii=new Map,Fi=new Map;const Ni=(e,n)=>{const o=n;return ki.has(o)||ki.set(o,t.getTasksList(n).then((({data:e})=>e))),ki.get(o)},ji=(e,n,o)=>Ii.get(o)||Ni(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(Ii.set(o,e),e))),_i=(e,t)=>{Fi.set(e,t)},qi=e=>Fi.get(e),Ci=(e,n)=>Fi.get(n)||t.getTask(e,n).then((e=>(Fi.set(n,e),e))),Si=(e,n)=>{if(!ki.get(n))return;const o=n;ki.set(o,t.getTasksList(n).then((({data:e})=>e)))},Li=()=>{ki=new Map,Ii=new Map,Fi=new Map};let Ei="";function zi(e,r,a){let u,m,f,$,h;y(e,l,(e=>a(44,f=e))),y(e,s,(e=>a(45,$=e)));const{Divider:g,Button:v,FormField:b}=c,{loggedIn:w}=d;y(e,w,(e=>a(46,h=e)));const x=JSON.parse(o.getItem("Locale")),k=R();let I,F,{schema:N}=r,{recID:j}=r,{prevEventID:_=!1}=r,{prev:q=!1}=r,{taskId:C=!1}=r,{description:S=""}=r,{root:L=!1}=r,{readonly:E}=r,{isStandalone:z}=r,T={},D={},O="form-"+N.class+Math.floor(9e3*Math.random()+1e3).toString();const B=L?"fEmbedded":"fTask",M=L?"sEmbedded":"sTask";let A=0,V=0,P=1;const H={},Y=N.items.find((e=>"price"===e.name&&!e.properties?.hidden)),G=N.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),J=!!Y,U=N.list?.filter((e=>"array"===e.type))?.length>1||J,Z=N.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,Q=!!Z,K=N.list?.filter((e=>"array"===e.type))?.length>1||Q,X={};let ee,te=0,ne=0,oe=[];N.class;["readonly","hidden","required"].map((e=>{N.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[o,r]=n.split(".");oe.push({action:e,itemName:t.name,refObj:o,refName:r,op:t.properties[e].invert?"!":""})}))}));const re=async e=>{if(e?.length)for(const n of e){if(!n.lookup)break;const{name:e}=n,{domain:o,value:r}=n.lookup;if("user"===o&&r){const n={[r]:h.user},o=await t.getSectionView(e,n);if(o?.length){const t=o[0]._id;t&&a(2,T[e]=t,T)}}}},ie=async()=>{if(!N.input)return;if(!N.input.length)return;if(N.input.length<2)return;const e=await t.getEvent(N.id),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,r=e.input.class[1].destination?.split(".")[0];if(!o||!r)return;const i=N.list?.find((e=>e.name===o));if(!i)return;const l=await t.getSchemaByClass(n),s=(await t.getTasks(l.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of i.item)n.name===r?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,T[o]=c,T)},le=()=>{for(const e of N.items)e.properties?.value?.concatenation&&se(e)},se=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await ce(e.refItemNext));a(2,T[e.name]=n,T)},ae=async e=>{const t=oe.filter((t=>t.refObj===e));if(t?.length)for(const e of t){const{action:t,itemName:n,refObj:o,refName:r,op:i}=e;if(!o)break;let l,s,c=!1;const d=T[o];c=r?(await Ci(o,d))[r]:d,"!"===i&&(c=!c),"required"!==t&&"readonly"!==t||(l=`#${O} .form-field.${n} .field textarea`,s=document.querySelector(l),s||(l=`#${O} .form-field.${n} .field input`,s=document.querySelector(l)),s&&c&&s.setAttribute(t,"true"),s&&!c&&s.removeAttribute(t)),"hidden"===t&&(l=`#${O} .form-field.${n}`,s=document.querySelector(l),s?.classList?.toggle("hidden",c),c&&a(2,T[n]="",T))}},ce=async e=>{const[n,o]=e.offset?.split(",")||[0,0],r=+e.base||0,i=+e.step||1;e.type;const l=e.refItem,s=await t.getLastId(N.class,l);if(!s?.length)return(r+i).toString().padStart(o,"0");const a=s[0][l];return((+a?.substring(n,n+o)||r)+i).toString().padStart(o,"0")},de=(e,t,n=!1)=>{const o=t.name,r=e.find((e=>e.name===o));let i=t.value;if(!n&&r&&r.properties?.multi&&(i=T[o]),i&&r&&r.type.startsWith("date"))try{return kn(i,"%d.%m.%Y").toISOString()}catch{return new Date(i).toISOString()}if(r&&"boolean"===r.type&&(i=!!t.checked),r&&"number"===r.type){const e=Number("1.1").toLocaleString(x.id).substring(1,2);try{i=Number(i.replace(e,".")).toString()}catch{}}return i},ue=()=>z?window.close():L?window.singleSpaNavigate("/"):k("back"),me=async(e,n)=>{if(N.input?.length>1){if(N.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,N.id);a(2,T={...T,...o})}else{const e=N.input.slice(1);for(const t of e)a(2,T[t]=[],T)}}},fe=()=>{let e=0;if(Y){let t=1;G&&(t=P),e=V*t}let t=0;for(const e in H)t+=H[e];a(3,A=t+e)},pe=()=>{let e=0;for(const t in X)e+=X[t];a(4,te=e+ +ne)};n.subscribe((async e=>{if(!e)return;if(!ki.get(e.eventId))return;const n=await t.getTaskList(N.class,e.taskId);((e,t,n)=>{if(!ki.get(e))return;const o=t;Ii.set(o,n)})(e.eventId,e.taskId,n)})),W(Li);return e.$$set=e=>{"schema"in e&&a(0,N=e.schema),"recID"in e&&a(31,j=e.recID),"prevEventID"in e&&a(29,_=e.prevEventID),"prev"in e&&a(32,q=e.prev),"taskId"in e&&a(30,C=e.taskId),"description"in e&&a(27,S=e.description),"root"in e&&a(1,L=e.root),"readonly"in e&&a(28,E=e.readonly),"isStandalone"in e&&a(33,z=e.isStandalone)},e.$$.update=()=>{268435456&e.$$.dirty[0]&&a(6,u=E),1&e.$$.dirty[0]|24&e.$$.dirty[1]&&F&&I&&N.items.map((({name:e,type:t})=>{const n=I.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;F[e]&&a(2,T[e]=F[e],T),F[o]&&a(2,T[o]=F[o],T)})),134217730&e.$$.dirty[0]&&a(7,m=L?S||"enablerr - Form":document.title)},[N,L,T,A,te,ee,u,m,g,v,b,w,O,B,M,{name:"amountValue",properties:{decimals:2}},U,K,{name:"weekValue",properties:{decimals:1}},async()=>{if(j||a(5,ee=await t.getTemplate(N.class)),j&&(a(2,T=await t.getTask(N.class,j)),a(27,S=p(N,T))),_){a(28,E=!1),a(34,I=await t.getSchema(_)),"string"==typeof q&&a(35,F=await t.getTask(I.class,q));const e=N.items.find((e=>e.refClass===I.class));a(2,T[e.name]=F._id,T)}K&&(ne=T[Z]||0);const e=await t.getEvent(N.id);if(e.trigger?.startOn&&!e.trigger.startOn.some((e=>"Manual"===e.type))&&a(28,E=!0),f.role?.length&&N.authorization?.length){const e=N.authorization.some((e=>$?.find((t=>t===e.role&&"edit"===e.activity))));a(28,E||=!e)}return j||(re(e.input?.class),le(),ie()),!0},async e=>{j||a(6,u=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+O+" ."+O)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),r=N.list.find((e=>e.name===t));o[e.name]=de(r.item,e)}else o[e.name]=de(N.items,e)})),N.list&&N.list.map((e=>{"array"===e.type&&D[e.name]&&(o[e.name]=D[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=de(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=N.id,o._prevEventId=_,o._taskId=C;const{id:r,task:l,error:s}=await t.saveData(N.class,o);if(s?.text){const e=s.field?" in "+s.field+": "+s.value:"";return i.failed(`${s.text} ${e}`,3e3),void a(6,u=!1)}i.success("Die Daten wurden gespeichert.",2e3),o._id=r;const c=await t.getTaskList(N.class,r);return k("choose",{row:c}),n?ue():j?void 0:window.singleSpaNavigate(`/task/${N.id}/${l}/task`)},()=>_?window.history.back():ue(),async({detail:{row:e}})=>{if((()=>{if(j)for(const e of oe)e.refName||ae(e.itemName)})(),j)return;if(await(async()=>{for(const e of N.items)if(e.refItem&&T[e.refItem]){const n=await t.getTask(e.refItem,T[e.refItem]);n&&a(2,T[e.name]=n[e.name],T)}for(const e of N.list||[])if(e.refItem&&T[e.refItem]){const n=await t.getTask(e.refItem,T[e.refItem]),o=[];for(const t of n[e.name]){const n={};for(const o of e.item)t[o.name]&&(n[o.name]=t[o.name]);o.push(n)}a(2,T[e.name]=o,T)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),r=await t.getEvent(N.id);if(!r.output?.class?.length)return;const i=r.output.class[0]?.item.find((e=>(e.refClass||e.name)===o.output.class[0]?.name));(r.input?.class?.length&&r.input.class[0].name===o.output.class[0]?.name||i?.asInput)&&(a(34,I=await t.getSchema(n)),a(29,_=n),a(30,C=e._task._id),a(35,F=!!C&&await t.getTask(I.class,e._task.docId)),me(I.class,e?._task?.docId))},({detail:e})=>{if(ae(e.itemName),K&&(e.itemName===Z&&(ne=+e.value),pe()),J){if(e.itemName===Y?.name)V=e.value;else{if(e.itemName!==G?.name)return;P=e.value}fe()}},({detail:e})=>{D[e.listName]=e.value,U&&(H[e.listName]=e.amountValue,fe()),K&&(X[e.listName]=e.weeksValue||0,pe())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},(e,t)=>ee?(void 0!==ee[t]&&a(2,T[t]=ee[t],T),e):e,S,E,_,C,j,q,z,I,F,function(e){A=e,a(3,A)},function(e){te=e,a(4,te)}]}class Ti extends we{constructor(e){var t;super(),ni.getElementById("svelte-1dh1s6w-style")||((t=j("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",k(ni.head,t)),be(this,e,zi,xi,w,{schema:0,recID:31,prevEventID:29,prev:32,taskId:30,description:27,root:1,readonly:28,isStandalone:33},[-1,-1,-1])}}function Di(e){let t,n,o;function r(t){e[4](t)}let i={schema:e[5],recID:e[6]};return void 0!==e[0]&&(i.description=e[0]),t=new Ti({props:i}),G.push((()=>$e(t,"description",r))),t.$on("back",e[2]),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};32&o&&(r.schema=e[5]),64&o&&(r.recID=e[6]),!n&&1&o&&(n=!0,r.description=e[0],te((()=>n=!1))),t.$set(r)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function Oi(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Di,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.description=e[0]),353&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Bi(e,n,o){let r,{refresh:i}=n;return e.$$set=e=>{"refresh"in e&&o(3,i=e.refresh)},[r,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},i,function(e){r=e,o(0,r)}]}const{document:Mi}=pe;function Ai(e,t,n){const o=e.slice();return o[17]=t[n],o}function Vi(e,t,n){const o=e.slice();return o[20]=t[n],o}function Pi(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Wi(e){let t,n,o,r,i,l,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=Hi(Vi(e,p,t));const h=e=>ue($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&Yi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Ji]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[Ui]},$$scope:{ctx:e}}}),{c(){t=j("form"),n=j("input"),r=C();for(let e=0;e<$.length;e+=1)$[e].c();i=C(),g&&g.c(),l=C(),s=j("div"),he(a.$$.fragment),c=C(),he(d.$$.fragment),T(n,"class",x(e[6])+" svelte-1phofh5"),T(n,"name","_id"),T(n,"type","hidden"),n.value=o=e[1]._id||"",T(t,"class","fTask svelte-1phofh5"),T(t,"id",e[6]),T(s,"class","form--buttons svelte-1phofh5")},m(o,p){I(o,t,p),k(t,n),k(t,r);for(let e=0;e<$.length;e+=1)$[e].m(t,null);k(t,i),g&&g.m(t,null),I(o,l,p),I(o,s,p),ge(a,s,null),k(s,c),ge(d,s,null),u=!0,m||(f=[L(t,"keydown",e[8]),L(t,"submit",E(e[10]))],m=!0)},p(e,r){if((!u||2&r&&o!==(o=e[1]._id||""))&&(n.value=o),75&r){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const o=Vi(e,p,n);$[n]?($[n].p(o,r),de($[n],1)):($[n]=Hi(o),$[n].c(),de($[n],1),$[n].m(t,i))}for(ae(),n=p.length;n<$.length;n+=1)h(n);ce()}e[0].list?g?(g.p(e,r),1&r&&de(g,1)):(g=Yi(e),g.c(),de(g,1),g.m(t,null)):g&&(ae(),ue(g,1,1,(()=>{g=null})),ce());const l={};8388608&r&&(l.$$scope={dirty:r,ctx:e}),a.$set(l);const s={};4&r&&(s.disabled=e[2]),8388608&r&&(s.$$scope={dirty:r,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)de($[e]);de(g),de(a.$$.fragment,e),de(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)ue($[e]);ue(g),ue(a.$$.fragment,e),ue(d.$$.fragment,e),u=!1},d(e){e&&F(t),N($,e),g&&g.d(),e&&F(l),e&&F(s),ve(a),ve(d),m=!1,v(f)}}}function Ri(e){let t,n;return t=new hr({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(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n&&(o.item=e[20]),1&n&&(o.selection=e[20].selection),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),1&n&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Hi(e){let t,n,o="list"!==e[20].type&&"date"!==e[20].type&&Ri(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),I(e,t,r),n=!0},p(e,n){"list"!==e[20].type&&"date"!==e[20].type?o?(o.p(e,n),1&n&&de(o,1)):(o=Ri(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&F(t)}}}function Yi(e){let t,n,o=e[0].list,r=[];for(let t=0;t<o.length;t+=1)r[t]=Gi(Ai(e,o,t));const i=e=>ue(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(75&n){let l;for(o=e[0].list,l=0;l<o.length;l+=1){const i=Ai(e,o,l);r[l]?(r[l].p(i,n),de(r[l],1)):(r[l]=Gi(i),r[l].c(),de(r[l],1),r[l].m(t.parentNode,t))}for(ae(),l=o.length;l<r.length;l+=1)i(l);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ue(r[e]);n=!1},d(e){N(r,e),e&&F(t)}}}function Gi(e){let t,n,o,r;return t=new e[4]({props:{text:e[17].designation}}),o=new ei({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}}),{c(){he(t.$$.fragment),n=C(),he(o.$$.fragment)},m(e,i){ge(t,e,i),I(e,n,i),ge(o,e,i),r=!0},p(e,n){const r={};1&n&&(r.text=e[17].designation),t.$set(r);const i={};1&n&&(i.list=e[17]),1&n&&(i.eventId=e[0].id),1&n&&(i.schema=e[17].item),2&n&&(i.record=e[1]),8&n&&(i.disabled=e[3]),o.$set(i)},i(e){r||(de(t.$$.fragment,e),de(o.$$.fragment,e),r=!0)},o(e){ue(t.$$.fragment,e),ue(o.$$.fragment,e),r=!1},d(e){ve(t,e),e&&F(n),ve(o,e)}}}function Ji(e){let t;return{c(){t=q("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function Ui(e){let t;return{c(){t=q("Speichern")},m(e,n){I(e,t,n)},d(e){e&&F(t)}}}function Zi(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Qi(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Zi,then:Wi,catch:Pi,value:16,blocks:[,,,]};return me(e[7](),r),{c(){t=C(),n=j("section"),r.block.c(),Mi.title="Vorgaben",T(n,"class","sTask svelte-1phofh5")},m(e,i){I(e,t,i),I(e,n,i),r.block.m(n,r.anchor=null),r.mount=()=>n,r.anchor=null,o=!0},p(t,[n]){fe(r,e=t,n)},i(e){o||(de(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(r.blocks[e])}o=!1},d(e){e&&F(t),e&&F(n),r.block.d(),r.token=null,r=null}}}function Ki(e,n,r){let a,d,u;y(e,l,(e=>r(11,d=e))),y(e,s,(e=>r(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(o.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),b=!1;const w=()=>window.history.back(),x=(e,t,n=!1)=>{const o=t.id,r=e.find((e=>e.name===o));let i=t.value;if(!n&&r&&r.properties?.multi&&(i=g[o]),i&&r&&r.type.startsWith("date"))try{return kn(i,"%d.%m.%Y").toISOString()}catch{return new Date(i).toISOString()}if(r&&"boolean"===r.type&&(i=!!t.checked),r&&"number"===r.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{i=Number(i.replace(e,".")).toString()}catch{}}return i};return e.$$set=e=>{"schema"in e&&r(0,h=e.schema),"record"in e&&r(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&r(3,a=b)},[h,g,b,a,m,f,v,async()=>{const e=await t.getEvent(h.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&r(2,b=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));r(2,b||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},w,async e=>{const n={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[o,r]=t.split("."),i=h.list.find((e=>e.name===o));n[t]=x(i.item,e)}else n[t]=x(h.items,e)})),await t.saveTemplate(h.class,n),i.success("Die Vorgaben wurden gespeichert.",2e3),w()}]}function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var el,tl,nl=(el=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==i(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},l),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:s.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var l={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(l),i=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),l=r();t.instance=new e.component(o(o({},i),{},{target:l,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},el(tl={exports:{}},tl.exports),tl.exports);const ol=Xi(nl)({component:class extends we{constructor(e){super(),be(this,e,Bi,Oi,w,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:rl,mount:il,unmount:ll}=ol;e({bootstrap:rl,mount:il,unmount:ll});e("Form",Ti),e("List",st),e("Template",class extends we{constructor(e){var t;super(),Mi.getElementById("svelte-1phofh5-style")||((t=j("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",k(Mi.head,t)),be(this,e,Ki,Qi,w,{schema:0,record:1})}})}}}));
|