@enablerr-ui/detail 0.2.762 → 0.2.764
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,r,i,o,s,a,l,c,d,u,h;return{setters:[function(e){t=e.Request,n=e.Storage,r=e.task_notification,i=e.currentRoles,o=e.TextArea,s=e.toasts,a=e.settings,l=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){h=e.taskClipboard}],execute:function(){function f(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}e("version","0.2.762");const m=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),g=e=>{try{return new Date(e).toLocaleString()}catch{return e}},p=e=>e?"(ja)":"(nein)",w=(e,t)=>{const n={...t};return(e.display?.reduce(((t,r)=>{let[i,o]=r.split(".");if(e.list?.find((({name:e})=>e===i))&&o&&void 0!==n[i]){const e=`${i}_${o}`;n[e]=n[i][o],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?p(n[e]):m(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&p(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")},y=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function C(){}function E(e){return e()}function _(){return Object.create(null)}function v(e){e.forEach(E)}function I(e){return"function"==typeof e}function A(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function $(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return C;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function S(e){return null==e?"":e}function b(e,t,n=t){return e.set(n),t}function T(e,t){e.appendChild(t)}function N(e,t,n){e.insertBefore(t,n||null)}function R(e){e.parentNode.removeChild(e)}function D(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function O(e){return document.createElement(e)}function M(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function x(){return k(" ")}function B(){return k("")}function P(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function L(e){return function(t){return t.preventDefault(),e.call(this,t)}}function F(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function V(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function U(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function H(e,t){e.value=null==t?"":t}function z(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function W(e,t,n){e.classList[n?"add":"remove"](t)}let G;function j(e){G=e}function X(){if(!G)throw new Error("Function called outside component initialization");return G}function q(e){X().$$.on_mount.push(e)}function Y(e){X().$$.on_destroy.push(e)}function Z(){const e=X();return(t,n)=>{const r=e.$$.callbacks[t];if(r){const i=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);r.slice().forEach((t=>{t.call(e,i)}))}}}function K(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Q=[],J=[],ee=[],te=[],ne=Promise.resolve();let re=!1;function ie(){re||(re=!0,ne.then(de))}function oe(){return ie(),ne}function se(e){ee.push(e)}function ae(e){te.push(e)}let le=!1;const ce=new Set;function de(){if(!le){le=!0;do{for(let e=0;e<Q.length;e+=1){const t=Q[e];j(t),ue(t.$$)}for(j(null),Q.length=0;J.length;)J.pop()();for(let e=0;e<ee.length;e+=1){const t=ee[e];ce.has(t)||(ce.add(t),t())}ee.length=0}while(Q.length);for(;te.length;)te.pop()();re=!1,le=!1,ce.clear()}}function ue(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(se)}}const he=new Set;let fe;function me(){fe={r:0,c:[],p:fe}}function ge(){fe.r||v(fe.c),fe=fe.p}function pe(e,t){e&&e.i&&(he.delete(e),e.i(t))}function we(e,t,n,r){if(e&&e.o){if(he.has(e))return;he.add(e),fe&&fe.c.push((()=>{he.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}function ye(e,t){const n=t.token={};function r(e,r,i,o){if(t.token!==n)return;t.resolved=o;let s=t.ctx;void 0!==i&&(s=s.slice(),s[i]=o);const a=e&&(t.current=e)(s);let l=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==r&&e&&(me(),we(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ge())})):t.block.d(1),a.c(),pe(a,1),a.m(t.mount(),t.anchor),l=!0),t.block=a,t.blocks&&(t.blocks[r]=a),l&&de()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=X();if(e.then((e=>{j(n),r(t.then,1,t.value,e),j(null)}),(e=>{if(j(n),r(t.catch,2,t.error,e),j(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}var i}function Ce(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}const Ee="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function _e(e,t){we(e,1,1,(()=>{t.delete(e.key)}))}function ve(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Ie(e){e&&e.c()}function Ae(e,t,n,r){const{fragment:i,on_mount:o,on_destroy:s,after_update:a}=e.$$;i&&i.m(t,n),r||se((()=>{const t=o.map(E).filter(I);s?s.push(...t):v(t),e.$$.on_mount=[]})),a.forEach(se)}function $e(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 Se(e,t,n,r,i,o,s=[-1]){const a=G;j(e);const l=e.$$={fragment:null,ctx:null,props:o,update:C,not_equal:i,bound:_(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:t.context||[]),callbacks:_(),dirty:s,skip_bound:!1};let c=!1;if(l.ctx=n?n(e,t.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return l.ctx&&i(l.ctx[t],l.ctx[t]=o)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](o),c&&function(e,t){-1===e.$$.dirty[0]&&(Q.push(e),ie(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],l.update(),c=!0,v(l.before_update),l.fragment=!!r&&r(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(R)}else l.fragment&&l.fragment.c();t.intro&&pe(e.$$.fragment),Ae(e,t.target,t.anchor,t.customElement),de()}j(a)}class be{$destroy(){$e(this,1),this.$destroy=C}$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 Te(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("path"),r=M("line"),i=M("line"),V(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),V(r,"x1","12"),V(r,"y1","9"),V(r,"x2","12"),V(r,"y2","13"),V(i,"x1","12"),V(i,"y1","17"),V(i,"x2","12.01"),V(i,"y2","17"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-alert-triangle "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-alert-triangle "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Ne(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Re extends be{constructor(e){super(),Se(this,e,Ne,Te,A,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("circle"),r=M("polyline"),i=M("line"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(r,"points","8 12 12 16 16 12"),V(i,"x1","12"),V(i,"y1","8"),V(i,"x2","12"),V(i,"y2","16"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-arrow-down-circle "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-arrow-down-circle "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Oe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Me extends be{constructor(e){super(),Se(this,e,Oe,De,A,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("path"),V(n,"d","M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"),V(r,"d","M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-book-open "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-book-open "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function xe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Be extends be{constructor(e){super(),Se(this,e,xe,ke,A,{size:0,strokeWidth:1,class:2})}}function Pe(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("circle"),V(n,"d","M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"),V(r,"cx","12"),V(r,"cy","13"),V(r,"r","4"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-camera "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-camera "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Le(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Fe extends be{constructor(e){super(),Se(this,e,Le,Pe,A,{size:0,strokeWidth:1,class:2})}}function Ve(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("polyline"),V(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),V(r,"points","22 4 12 14.01 9 11.01"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Ue(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class He extends be{constructor(e){super(),Se(this,e,Ue,Ve,A,{size:0,strokeWidth:1,class:2})}}function ze(e){let t,n,r;return{c(){t=M("svg"),n=M("path"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-command "+e[2])},m(e,r){N(e,t,r),T(t,n)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-command "+e[2])&&V(t,"class",r)},i:C,o:C,d(e){e&&R(t)}}}function We(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ge extends be{constructor(e){super(),Se(this,e,We,ze,A,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,r,i;return{c(){t=M("svg"),n=M("polyline"),r=M("path"),V(n,"points","9 10 4 15 9 20"),V(r,"d","M20 4v7a4 4 0 0 1-4 4H4"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Xe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class qe extends be{constructor(e){super(),Se(this,e,Xe,je,A,{size:0,strokeWidth:1,class:2})}}function Ye(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("path"),r=M("line"),i=M("line"),V(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),V(r,"x1","18"),V(r,"y1","9"),V(r,"x2","12"),V(r,"y2","15"),V(i,"x1","12"),V(i,"y1","9"),V(i,"x2","18"),V(i,"y2","15"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-delete "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-delete "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Ze(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ke extends be{constructor(e){super(),Se(this,e,Ze,Ye,A,{size:0,strokeWidth:1,class:2})}}function Qe(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("path"),r=M("polyline"),i=M("line"),V(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),V(r,"points","15 3 21 3 21 9"),V(i,"x1","10"),V(i,"y1","14"),V(i,"x2","21"),V(i,"y2","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-external-link "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-external-link "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Je(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class et extends be{constructor(e){super(),Se(this,e,Je,Qe,A,{size:0,strokeWidth:1,class:2})}}function tt(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("circle"),r=M("line"),i=M("path"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(r,"x1","2"),V(r,"y1","12"),V(r,"x2","22"),V(r,"y2","12"),V(i,"d","M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-globe "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-globe "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function nt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class rt extends be{constructor(e){super(),Se(this,e,nt,tt,A,{size:0,strokeWidth:1,class:2})}}function it(e){let t,n,r,i,o,s,a,l;return{c(){t=M("svg"),n=M("line"),r=M("line"),i=M("line"),o=M("line"),s=M("line"),a=M("line"),V(n,"x1","8"),V(n,"y1","6"),V(n,"x2","21"),V(n,"y2","6"),V(r,"x1","8"),V(r,"y1","12"),V(r,"x2","21"),V(r,"y2","12"),V(i,"x1","8"),V(i,"y1","18"),V(i,"x2","21"),V(i,"y2","18"),V(o,"x1","3"),V(o,"y1","6"),V(o,"x2","3.01"),V(o,"y2","6"),V(s,"x1","3"),V(s,"y1","12"),V(s,"x2","3.01"),V(s,"y2","12"),V(a,"x1","3"),V(a,"y1","18"),V(a,"x2","3.01"),V(a,"y2","18"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",l="feather feather-list "+e[2])},m(e,l){N(e,t,l),T(t,n),T(t,r),T(t,i),T(t,o),T(t,s),T(t,a)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-list "+e[2])&&V(t,"class",l)},i:C,o:C,d(e){e&&R(t)}}}function ot(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class st extends be{constructor(e){super(),Se(this,e,ot,it,A,{size:0,strokeWidth:1,class:2})}}function at(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("polyline"),V(n,"d","M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"),V(r,"points","22,6 12,13 2,6"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-mail "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-mail "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function lt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ct extends be{constructor(e){super(),Se(this,e,lt,at,A,{size:0,strokeWidth:1,class:2})}}function dt(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("circle"),V(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),V(r,"cx","12"),V(r,"cy","10"),V(r,"r","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-map-pin "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-map-pin "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function ut(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ht extends be{constructor(e){super(),Se(this,e,ut,dt,A,{size:0,strokeWidth:1,class:2})}}function ft(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("polyline"),r=M("line"),i=M("path"),V(n,"points","23 7 23 1 17 1"),V(r,"x1","16"),V(r,"y1","8"),V(r,"x2","23"),V(r,"y2","1"),V(i,"d","M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-phone-outgoing "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-phone-outgoing "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function mt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class gt extends be{constructor(e){super(),Se(this,e,mt,ft,A,{size:0,strokeWidth:1,class:2})}}function pt(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("polyline"),r=M("path"),i=M("rect"),V(n,"points","6 9 6 2 18 2 18 9"),V(r,"d","M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"),V(i,"x","6"),V(i,"y","14"),V(i,"width","12"),V(i,"height","8"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-printer "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-printer "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function wt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class yt extends be{constructor(e){super(),Se(this,e,wt,pt,A,{size:0,strokeWidth:1,class:2})}}function Ct(e){let t,n,r,i;return{c(){t=M("svg"),n=M("circle"),r=M("line"),V(n,"cx","11"),V(n,"cy","11"),V(n,"r","8"),V(r,"x1","21"),V(r,"y1","21"),V(r,"x2","16.65"),V(r,"y2","16.65"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-search "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Et(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class _t extends be{constructor(e){super(),Se(this,e,Et,Ct,A,{size:0,strokeWidth:1,class:2})}}const{document:vt}=Ee;function It(e){e[45]=e[46].items}function At(e,t,n){const r=e.slice();return r[47]=t[n],r[49]=n,r}function $t(e,t,n){const r=e.slice();return r[50]=t[n],r}function St(e,t,n){const r=e.slice();return r[50]=t[n],r}function bt(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Tt(e){let t,n,r,i,o,s;It(e);let a=e[5]?.length&&Nt(e),l=e[45]?.length&&Dt(e),c=e[5]?.length&&kt(e);return{c(){a&&a.c(),t=x(),n=O("div"),r=O("table"),l&&l.c(),i=x(),o=O("tbody"),c&&c.c(),V(r,"striped",""),V(r,"class","svelte-v0ogws"),V(n,"class","eList svelte-v0ogws")},m(e,d){a&&a.m(e,d),N(e,t,d),N(e,n,d),T(n,r),l&&l.m(r,null),T(r,i),T(r,o),c&&c.m(o,null),s=!0},p(e,n){It(e),e[5]?.length?a?(a.p(e,n),32&n[0]&&pe(a,1)):(a=Nt(e),a.c(),pe(a,1),a.m(t.parentNode,t)):a&&(me(),we(a,1,1,(()=>{a=null})),ge()),e[45]?.length?l?l.p(e,n):(l=Dt(e),l.c(),l.m(r,i)):l&&(l.d(1),l=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&pe(c,1)):(c=kt(e),c.c(),pe(c,1),c.m(o,null)):c&&(me(),we(c,1,1,(()=>{c=null})),ge())},i(e){s||(pe(a),pe(c),s=!0)},o(e){we(a),we(c),s=!1},d(e){a&&a.d(e),e&&R(t),e&&R(n),l&&l.d(),c&&c.d()}}}function Nt(e){let t,n,r,i,o,s,a,l,c,d,u,h=e[6]&&Rt(e);function f(t){e[29](t)}let m={id:e[10]};return void 0!==e[3]&&(m.value=e[3]),i=new e[8]({props:m}),J.push((()=>ve(i,"value",f))),i.$on("input",e[14]),l=new Ke({props:{size:"18"}}),{c(){h&&h.c(),t=x(),n=O("div"),r=k("Suchen: "),Ie(i.$$.fragment),s=x(),a=O("span"),Ie(l.$$.fragment),V(a,"class","feather pointer svelte-v0ogws"),z(n,"margin-bottom","1em"),z(n,"position","relative")},m(o,f){h&&h.m(o,f),N(o,t,f),N(o,n,f),T(n,r),Ae(i,n,null),T(n,s),T(n,a),Ae(l,a,null),c=!0,d||(u=P(a,"click",e[16]),d=!0)},p(e,n){e[6]?h?64&n[0]&&pe(h,1):(h=Rt(e),h.c(),pe(h,1),h.m(t.parentNode,t)):h&&(me(),we(h,1,1,(()=>{h=null})),ge());const r={};!o&&8&n[0]&&(o=!0,r.value=e[3],ae((()=>o=!1))),i.$set(r)},i(e){c||(pe(h),pe(i.$$.fragment,e),pe(l.$$.fragment,e),c=!0)},o(e){we(h),we(i.$$.fragment,e),we(l.$$.fragment,e),c=!1},d(e){h&&h.d(e),e&&R(t),e&&R(n),$e(i),$e(l),d=!1,u()}}}function Rt(e){let t,n;return t=new e[7]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Dt(e){let t,n,r,i=e[4]&&e[0]&&Ot(),o=e[45],s=[];for(let t=0;t<o.length;t+=1)s[t]=Mt(St(e,o,t));return{c(){t=O("thead"),n=O("tr"),i&&i.c(),r=x();for(let e=0;e<s.length;e+=1)s[e].c();V(n,"class","svelte-v0ogws"),V(t,"class","svelte-v0ogws")},m(e,o){N(e,t,o),T(t,n),i&&i.m(n,null),T(n,r);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Ot(),i.c(),i.m(n,r)):i&&(i.d(1),i=null),8196&t[0]){let r;for(o=e[45],r=0;r<o.length;r+=1){const i=St(e,o,r);s[r]?s[r].p(i,t):(s[r]=Mt(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&R(t),i&&i.d(),D(s,e)}}}function Ot(e){let t;return{c(){t=O("th"),V(t,"class","svelte-v0ogws")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Mt(e){let t,n,r=e[50]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-v0ogws")},m(e,r){N(e,t,r),T(t,n)},p(e,t){4&t[0]&&r!==(r=e[50]?.designation+"")&&U(n,r)},d(e){e&&R(t)}}}function kt(e){let t,n,r=[],i=new Map,o=e[5];const s=e=>e[47]._id;for(let t=0;t<o.length;t+=1){let n=At(e,o,t),a=s(n);i.set(a,r[t]=Lt(a,n))}return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=B()},m(e,i){for(let t=0;t<r.length;t+=1)r[t].m(e,i);N(e,t,i),n=!0},p(e,n){178239&n[0]&&(o=e[5],me(),r=function(e,t,n,r,i,o,s,a,l,c,d,u){let h=e.length,f=o.length,m=h;const g={};for(;m--;)g[e[m].key]=m;const p=[],w=new Map,y=new Map;for(m=f;m--;){const e=u(i,o,m),a=n(e);let l=s.get(a);l?r&&l.p(e,t):(l=c(a,e),l.c()),w.set(a,p[m]=l),a in g&&y.set(a,Math.abs(m-g[a]))}const C=new Set,E=new Set;function _(e){pe(e,1),e.m(a,d),s.set(e.key,e),d=e.first,f--}for(;h&&f;){const t=p[f-1],n=e[h-1],r=t.key,i=n.key;t===n?(d=t.first,h--,f--):w.has(i)?!s.has(r)||C.has(r)?_(t):E.has(i)?h--:y.get(r)>y.get(i)?(E.add(r),_(t)):(C.add(i),h--):(l(n,s),h--)}for(;h--;){const t=e[h];w.has(t.key)||l(t,s)}for(;f;)_(p[f-1]);return p}(r,n,s,1,e,o,i,t.parentNode,_e,Lt,t,At),ge())},i(e){if(!n){for(let e=0;e<o.length;e+=1)pe(r[e]);n=!0}},o(e){for(let e=0;e<r.length;e+=1)we(r[e]);n=!1},d(e){for(let t=0;t<r.length;t+=1)r[t].d(e);e&&R(t)}}}function xt(e){let t,n,r,i,o,s,a=e[4]&&e[0]&&Bt(e),l=e[45],c=[];for(let t=0;t<l.length;t+=1)c[t]=Pt($t(e,l,t));return{c(){t=O("tr"),a&&a.c(),n=x();for(let e=0;e<c.length;e+=1)c[e].c();r=x(),V(t,"class","pointer svelte-v0ogws"),W(t,"active",e[47]._id===e[1])},m(l,d){N(l,t,d),a&&a.m(t,null),T(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);T(t,r),i=!0,o||(s=P(t,"click",F((function(){I(e[12](e[47],e[49]))&&e[12](e[47],e[49]).apply(this,arguments)}))),o=!0)},p(i,o){if((e=i)[4]&&e[0]?a?(a.p(e,o),17&o[0]&&pe(a,1)):(a=Bt(e),a.c(),pe(a,1),a.m(t,n)):a&&(me(),we(a,1,1,(()=>{a=null})),ge()),10276&o[0]){let n;for(l=e[45],n=0;n<l.length;n+=1){const i=$t(e,l,n);c[n]?c[n].p(i,o):(c[n]=Pt(i),c[n].c(),c[n].m(t,r))}for(;n<c.length;n+=1)c[n].d(1);c.length=l.length}34&o[0]&&W(t,"active",e[47]._id===e[1])},i(e){i||(pe(a),i=!0)},o(e){we(a),i=!1},d(e){e&&R(t),a&&a.d(),D(c,e),o=!1,s()}}}function Bt(e){let t,n,r,i,o;return n=new et({props:{size:"18"}}),{c(){t=O("td"),Ie(n.$$.fragment),V(t,"class","editRow svelte-v0ogws"),z(t,"color","#326173")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",F((function(){I(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),i=!0)},p(t,n){e=t},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Pt(e){let t,n,r,i=e[11](e[47],e[50])+"";return{c(){t=O("td"),n=k(i),V(t,"class",r=S(e[50].type)+" svelte-v0ogws")},m(e,r){N(e,t,r),T(t,n)},p(e,o){36&o[0]&&i!==(i=e[11](e[47],e[50])+"")&&U(n,i),4&o[0]&&r!==(r=S(e[50].type)+" svelte-v0ogws")&&V(t,"class",r)},d(e){e&&R(t)}}}function Lt(e,t){let n,r,i,o=t[15](t[47],t[45],t[3]),s=o&&xt(t);return{key:e,first:null,c(){n=B(),s&&s.c(),r=B(),this.first=n},m(e,t){N(e,n,t),s&&s.m(e,t),N(e,r,t),i=!0},p(e,n){t=e,44&n[0]&&(o=t[15](t[47],t[45],t[3])),o?s?(s.p(t,n),44&n[0]&&pe(s,1)):(s=xt(t),s.c(),pe(s,1),s.m(r.parentNode,r)):s&&(me(),we(s,1,1,(()=>{s=null})),ge())},i(e){i||(pe(s),i=!0)},o(e){we(s),i=!1},d(e){e&&R(n),s&&s.d(e),e&&R(r)}}}function Ft(e){let t,n;return t=new e[7]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Vt(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ft,then:Tt,catch:bt,value:46,blocks:[,,,]};return ye(n=e[2]&&e[13](),i),{c(){t=B(),i.block.c()},m(e,n){N(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,4&r[0]&&n!==(n=e[2]&&e[13]())&&ye(n,i)||Ce(i,e,r)},i(e){r||(pe(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}r=!1},d(e){e&&R(t),i.block.d(e),i.token=null,i=null}}}const Ut=e("getDisplayItems",(async(e,n,r)=>{if(!e)return;let i=[];for(const o of e){if("_total"===o){i.push({name:"_total",designation:"Betrag",type:"number"});continue}const[e,s]=o.split(".");let a=n.list?.find((t=>t.name===e))?.item.find((e=>e.name===s));if(a&&(a={...a},a.name=`${e}_${s}`,r=r.map((t=>(t[e]&&(t[a.name]=t["_"+e]?t["_"+e][s]:t[e][s]),t)))),a||(a=n.items.find((t=>t.name===e))),!a){const n=(await t.getSchemaByClass(e)).items.find((e=>e.name===s));n&&(a={name:e,designation:n.designation,type:n.type,decimals:n.properties?.decimals||0})}i.find((t=>t?.name===e))||i.push(a)}return i.length?i:n.items}));function Ht(e,i,o){let s;let a=JSON.parse(n.getItem("Locale")).id;const l=Z(),{Loading:d,TextField:h}=c,{currentTasks:f}=u;$(e,f,(e=>o(33,s=e)));let g,w,y,C,{inputList:E}=i,{eventId:_}=i,{prevEventId:v}=i,{className:I}=i,{rowId:A}=i,{filterForReady:S=!1}=i,{refStatus:b}=i,{showEdit:T=!1}=i,{praefix:N=""}=i,{selectionFields:R=!1}=i,{deList:D}=i,{stopAggregation:O=!1}=i,{inputSearch:M=""}=i,k=!0,x=M,B=I+Math.floor(9e3*Math.random()+1e3).toString()+"search",P=!1,L=!0;const F=(e,t)=>{if(!t)return;let n=e[t.name];if(Array.isArray(n)){const e=e=>e.replaceAll(" ",String.fromCharCode(160));if(n.length&&Array.isArray(n[0].serialno)){let t=[];for(const r of n)t=t.concat(r.serialno.map(e));n=t.join(", ")}else n=n.map(e),n.length>3&&(n=n.slice(0,3),n=n.concat("...")),n=n.join(", ")}if(!n&&t.name.split("_").length>1){const[r,i]=t.name.split("_");try{n=e[r][0][i],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n||(n=e[`_${t.name}`]),n=Number(n)?Number(n).toLocaleString(a,{minimumFractionDigits:t.properties?.decimals||t.decimals||0,maximumFractionDigits:t.properties?.decimals||t.decimals||0}):""),"number"===t.type?n:"boolean"==typeof n?p(n):m(e[`_${t.name}`]||n||"")},V=t.getSchemaByClass(I),U=async(e,n)=>{if(b)return o(18,b=[].concat(b)),e.filter((e=>!!b.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(v){const n=await t.getEvent(v);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===I)return"Information"===n.state.task?e.filter((e=>"Closed"!==e._task.status)):e.filter((e=>"Ready"===e._task.status))}return e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status))},H=(e,t)=>{if(e){const n="string"==typeof e?e:Object.keys(e)[0],r=new Intl.Collator(a,{numeric:!0});return t.sort(((e,t)=>r.compare(e[n],t[n])))}return t},z=async e=>{let n,r=0;L=!1;const i=e=>new Promise((t=>setTimeout(t,e)));for(;r++<200&&!O&&!(n=await W(e));)await i(500);o(6,P=!1),O&&t.readTasksByAggregationId(e,!0),n&&(o(5,y=H(w.displaySort,n.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),L=!0}),100))},W=async e=>await t.readTasksByAggregationId(e),G=async(e,t,n,r)=>{const{value:i,refClass:o}=r,[s,a]=n.split("."),l=i?.get(N),c=l&&await Gd(s,l);if(!c)return e;const d=c[a];return d?.length?d.map((n=>{let r=e?.find((e=>e._id===n[t]))||{};r={...r};for(const e in r)n[e]&&(r[e]=n[e]);for(const e in n)n[e]&&(r[e]=n[e]);return zd(o+r._id.toString(),r),r})):e};q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(B)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await V;e.eventId===t.id&&(jd(t.class,e.eventId),o(2,k=!o(2,k=!1)))}));return e.$$set=e=>{"inputList"in e&&o(20,E=e.inputList),"eventId"in e&&o(21,_=e.eventId),"prevEventId"in e&&o(22,v=e.prevEventId),"className"in e&&o(23,I=e.className),"rowId"in e&&o(1,A=e.rowId),"filterForReady"in e&&o(24,S=e.filterForReady),"refStatus"in e&&o(18,b=e.refStatus),"showEdit"in e&&o(0,T=e.showEdit),"praefix"in e&&o(25,N=e.praefix),"selectionFields"in e&&o(26,R=e.selectionFields),"deList"in e&&o(27,D=e.deList),"stopAggregation"in e&&o(19,O=e.stopAggregation),"inputSearch"in e&&o(28,M=e.inputSearch)},[T,A,k,x,g,y,P,d,h,f,B,F,(e,t)=>n=>{o(19,O=!0);const r=L?e:C[t];l("choose",{row:r})},async()=>{w=await V,o(4,g=(e=>!s?.length||!!s.find((t=>t===e)))(w.id)),o(5,y=C=H(w.displaySort,await E||await Ud(w.class,w.id))),500===y?.length&&(o(6,P=!0),t.getTasksList(w.id,!1,!0).then((({aggregationId:e})=>z(e))));let e,n=!1,r="";const i=R&&R?.find((e=>w.class===e.refClass.split(":")[0])),a=i?.value?.get&&i.value.get(N);if(a){const[s,l]=i.refClass.split(":");w.class===s&&o(5,y=await G(y,s,l,i)),n=i.parentClass?.find((e=>"quantity"===e.name)),r=i.className,e=await t.getCountedSection(r,l.split(".")[0],a,s,"quantity")}o(0,T&&=!i),i||!S&&!b||o(5,y=await U(y,w));const{display:c}=w;let d=await Ut(c,w,y);return!T&&n?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),o(5,y=y.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!y.find((t=>t._id===e._id))){const t=C.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,y.push(t)}})),l("init",y)):D&&o(5,y=y.filter((e=>!D.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{o(3,x=e)},(e,t,n)=>{if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let r=!1;for(const i of t){const t=F(e,i).toLowerCase();!r&&t.includes(n)&&(r=!0)}return r},()=>{o(3,x="")},e=>{window.open(`/task/${e._task.event}/${e._task._id}/task?view=standalone`,"_blank")},b,O,E,_,v,I,S,N,R,D,M,function(e){x=e,o(3,x)}]}class zt extends be{constructor(e){var t;super(),vt.getElementById("svelte-v0ogws-style")||((t=O("style")).id="svelte-v0ogws-style",t.textContent=".feather.svelte-v0ogws.svelte-v0ogws{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-v0ogws.svelte-v0ogws{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-v0ogws .editRow.svelte-v0ogws{width:1em}.eList.svelte-v0ogws table.svelte-v0ogws{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-v0ogws table thead.svelte-v0ogws{position:sticky;top:0;background:#326173;color:white}.eList.svelte-v0ogws table thead tr.svelte-v0ogws{height:2.3em}.eList.svelte-v0ogws table tbody tr.svelte-v0ogws{height:2.75em !important}th.svelte-v0ogws.svelte-v0ogws,td.svelte-v0ogws.svelte-v0ogws{padding-left:0.4em;padding-right:0.4em}td.number.svelte-v0ogws.svelte-v0ogws{text-align:end}tr.pointer.svelte-v0ogws.svelte-v0ogws:hover{background-color:#DAE1E5}tr.active.svelte-v0ogws.svelte-v0ogws{color:#326173;background-color:#fcebd5}",T(vt.head,t)),Se(this,e,Ht,Vt,A,{inputList:20,eventId:21,prevEventId:22,className:23,rowId:1,filterForReady:24,refStatus:18,showEdit:0,praefix:25,selectionFields:26,deList:27,stopAggregation:19,inputSearch:28},[-1,-1])}}function Wt(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Gt(e){let t,n,r=e[41]&&jt(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[41]?r?(r.p(e,n),8&n[0]&&pe(r,1)):(r=jt(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function jt(e){let t,n;return t=new e[21]({props:{title:e[16]?"Auswahl":e[0],class:"eList "+(e[14]?"form":""),$$slots:{default:[nn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};65537&n[0]&&(r.title=e[16]?"Auswahl":e[0]),16384&n[0]&&(r.class="eList "+(e[14]?"form":"")),2097150&n[0]|2048&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Xt(e){let t,n;return t=new qd({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){I(e[30](e[41]))&&e[30](e[41]).apply(this,arguments)})),t.$on("back",e[27]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(n,r){e=n;const i={};4&r[0]&&(i.schema=e[2]),2&r[0]&&(i.recID=e[1]),32768&r[0]&&(i.readonly=e[15]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function qt(e){let t,n,r,i,o,s,a;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const l=[Zt,Yt],c=[];function d(e,t){return e[16]?0:1}return r=d(e),i=c[r]=l[r](e),s=new zt({props:{inputSearch:e[12],eventId:e[2].id,className:e[2].class,prevEventId:e[11],filterForReady:e[4],refStatus:e[5],praefix:e[6],selectionFields:e[7],rowId:e[1],deList:e[9],stopAggregation:e[20],showEdit:e[8]}}),s.$on("edit",e[31]),s.$on("choose",e[34]),s.$on("init",e[32]),{c(){Ie(t.$$.fragment),n=x(),i.c(),o=x(),Ie(s.$$.fragment)},m(e,i){Ae(t,e,i),N(e,n,i),c[r].m(e,i),N(e,o,i),Ae(s,e,i),a=!0},p(e,n){const a={};65536&n[0]&&(a.text=e[16]?"Zusätzliche Auswahl":""),t.$set(a);let u=r;r=d(e),r===u?c[r].p(e,n):(me(),we(c[u],1,1,(()=>{c[u]=null})),ge(),i=c[r],i?i.p(e,n):(i=c[r]=l[r](e),i.c()),pe(i,1),i.m(o.parentNode,o));const h={};4096&n[0]&&(h.inputSearch=e[12]),4&n[0]&&(h.eventId=e[2].id),4&n[0]&&(h.className=e[2].class),2048&n[0]&&(h.prevEventId=e[11]),16&n[0]&&(h.filterForReady=e[4]),32&n[0]&&(h.refStatus=e[5]),64&n[0]&&(h.praefix=e[6]),128&n[0]&&(h.selectionFields=e[7]),2&n[0]&&(h.rowId=e[1]),512&n[0]&&(h.deList=e[9]),1048576&n[0]&&(h.stopAggregation=e[20]),256&n[0]&&(h.showEdit=e[8]),s.$set(h)},i(e){a||(pe(t.$$.fragment,e),pe(i),pe(s.$$.fragment,e),a=!0)},o(e){we(t.$$.fragment,e),we(i),we(s.$$.fragment,e),a=!1},d(e){$e(t,e),e&&R(n),c[r].d(e),e&&R(o),$e(s,e)}}}function Yt(e){let t,n,r,i;n=new e[23]({props:{outline:!0,$$slots:{default:[Kt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let o=e[25]&&e[10]&&Qt(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o&&o.c(),V(t,"class","form--buttons svelte-jb5mrh")},m(e,s){N(e,t,s),Ae(n,t,null),T(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};2048&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[25]&&e[10]?o?(o.p(e,r),1024&r[0]&&pe(o,1)):(o=Qt(e),o.c(),pe(o,1),o.m(t,null)):o&&(me(),we(o,1,1,(()=>{o=null})),ge())},i(e){i||(pe(n.$$.fragment,e),pe(o),i=!0)},o(e){we(n.$$.fragment,e),we(o),i=!1},d(e){e&&R(t),$e(n),o&&o.d()}}}function Zt(e){let t,n,r,i,o,s,a=e[19]&&en(e);return r=new e[23]({props:{outline:!0,$$slots:{default:[tn]},$$scope:{ctx:e}}}),r.$on("click",e[28]),o=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){a&&a.c(),t=x(),n=O("div"),Ie(r.$$.fragment),i=x(),Ie(o.$$.fragment),V(n,"class","form--buttons svelte-jb5mrh")},m(e,l){a&&a.m(e,l),N(e,t,l),N(e,n,l),Ae(r,n,null),N(e,i,l),Ae(o,e,l),s=!0},p(e,n){e[19]?a?(a.p(e,n),524288&n[0]&&pe(a,1)):(a=en(e),a.c(),pe(a,1),a.m(t.parentNode,t)):a&&(me(),we(a,1,1,(()=>{a=null})),ge());const i={};2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),r.$set(i);const s={};8192&n[0]&&(s.text="Liste aus "+e[13]),o.$set(s)},i(e){s||(pe(a),pe(r.$$.fragment,e),pe(o.$$.fragment,e),s=!0)},o(e){we(a),we(r.$$.fragment,e),we(o.$$.fragment,e),s=!1},d(e){a&&a.d(e),e&&R(t),e&&R(n),$e(r),e&&R(i),$e(o,e)}}}function Kt(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Qt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Jt]},$$scope:{ctx:e}}}),t.$on("click",e[29]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2048&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Jt(e){let t;return{c(){t=k("Neu")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function en(e){let t,n;return t=new qa({props:{item:e[17],record:{_id:"",[e[17].name]:""},noForm:"true",classId:"sel_"+e[17].name,eventId:e[18],required:!1,hidden:!1,readonly:!1,deList:e[19]}}),t.$on("notify",e[33]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};131072&n[0]&&(r.item=e[17]),131072&n[0]&&(r.record={_id:"",[e[17].name]:""}),131072&n[0]&&(r.classId="sel_"+e[17].name),262144&n[0]&&(r.eventId=e[18]),524288&n[0]&&(r.deList=e[19]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function tn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function nn(e){let t,n,r,i;const o=[qt,Xt],s=[];function a(e,t){return e[41].length&&!e[14]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=B()},m(e,n){s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(me(),we(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r))},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){s[t].d(e),e&&R(r)}}}function rn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function on(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:rn,then:Gt,catch:Wt,value:41,blocks:[,,,]};return ye(n=e[26](e[3]),i),{c(){t=B(),i.block.c()},m(e,n){N(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,8&r[0]&&n!==(n=e[26](e[3]))&&ye(n,i)||Ce(i,e,r)},i(e){r||(pe(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}r=!1},d(e){e&&R(t),i.block.d(e),i.token=null,i=null}}}function sn(e,n,r){let i;const{Dialog:o,Divider:s,Button:a}=c,l=Z(),{currentTasks:d}=u;$(e,d,(e=>r(37,i=e)));let{title:h}=n,{schema:f}=n,{recID:m}=n,{isOpening:g=!0}=n,{filterForReady:p=!1}=n,{refStatus:w}=n,{praefix:y=""}=n,{selectionFields:C=!1}=n,{showEdit:E=!0}=n,{deList:_}=n,{newAllowed:v=!0}=n,{prevEventId:I}=n,{inputSearch:A}=n,S=f.id;f.class;let b,T,N,R,D,O,M,k="",x=!1,B=!1;h??=f.identity.designation;const P=!i?.length||i.find((e=>e===S));return e.$$set=e=>{"title"in e&&r(0,h=e.title),"schema"in e&&r(2,f=e.schema),"recID"in e&&r(1,m=e.recID),"isOpening"in e&&r(3,g=e.isOpening),"filterForReady"in e&&r(4,p=e.filterForReady),"refStatus"in e&&r(5,w=e.refStatus),"praefix"in e&&r(6,y=e.praefix),"selectionFields"in e&&r(7,C=e.selectionFields),"showEdit"in e&&r(8,E=e.showEdit),"deList"in e&&r(9,_=e.deList),"newAllowed"in e&&r(10,v=e.newAllowed),"prevEventId"in e&&r(11,I=e.prevEventId),"inputSearch"in e&&r(12,A=e.inputSearch)},[h,m,f,g,p,w,y,C,E,_,v,I,A,k,x,b,N,D,O,M,B,o,s,a,d,P,async e=>{if(!e)return!1;const n=await Ud(f.class,f.id);if(T=C&&C?.find((e=>f.class===e.refClass.split(":")[0])),r(16,N=T?.value?.get&&T.value.get(y)),N){R=T.refClass;const[e,n]=R.split(":"),[i]=n.split(".");r(17,D=T.parentClass.find((t=>t.name===e)));const o=await t.getSchemaByClass(D.refClass);r(18,O=o.id),r(13,k=T.parentClass.find((e=>e.name===i)).designation)}return n},()=>{r(14,x=!1),m||l("back"),E||l("back")},()=>{r(20,B=!0),r(14,x=!1),l("back")},()=>{r(20,B=!0),r(1,m=!1),r(15,b=!1),r(14,x=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,r]=t.split(".");let i=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===r));if(i){e[`${n}_${r}`]=e[n][r]}})),l("choose",{row:e})},({detail:e})=>{r(15,b=!!e._task.visum||"Closed"===e._task.status),r(1,m=e._docId),r(14,x=!0)},({detail:e})=>{N&&r(19,M=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};l("choose",{row:t})},function(t){K(e,t)}]}class an extends be{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=O("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",T(document.head,t)),Se(this,e,sn,on,A,{title:0,schema:2,recID:1,isOpening:3,filterForReady:4,refStatus:5,praefix:6,selectionFields:7,showEdit:8,deList:9,newAllowed:10,prevEventId:11,inputSearch:12},[-1,-1])}}const{document:ln}=Ee;function cn(e){e[28]=e[30].list,e[29]=e[30].items}function dn(e,t,n){const r=e.slice();return r[31]=t[n],r}function un(e,t,n){const r=e.slice();return r[34]=t[n],r}function hn(e,t,n){const r=e.slice();return r[34]=t[n],r}function fn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function mn(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function C(t){e[25](t)}cn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[gn]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let E={id:e[8]};void 0!==e[1]&&(E.value=e[1]),s=new e[6]({props:E}),J.push((()=>ve(s,"value",C))),s.$on("input",e[12]),d=new Ke({props:{size:"18"}});let _=e[29]?.length&&function(e){let t,n,r,i,o=e[29],s=[];for(let t=0;t<o.length;t+=1)s[t]=pn(hn(e,o,t));return{c(){t=O("thead"),n=O("tr"),r=O("th"),i=x();for(let e=0;e<s.length;e+=1)s[e].c();V(r,"class","svelte-14hcfjl"),V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,o){N(e,t,o),T(t,n),T(n,r),T(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(o=e[29],r=0;r<o.length;r+=1){const i=hn(e,o,r);s[r]?s[r].p(i,t):(s[r]=pn(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&R(t),D(s,e)}}}(e),v=e[28]?.length&&function(e){let t,n,r=e[28],i=[];for(let t=0;t<r.length;t+=1)i[t]=Cn(dn(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(44547&n[0]){let s;for(r=e[28],s=0;s<r.length;s+=1){const o=dn(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=Cn(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),i=O("div"),o=k("Suchen: "),Ie(s.$$.fragment),l=x(),c=O("span"),Ie(d.$$.fragment),u=x(),h=O("div"),f=O("table"),_&&_.c(),m=x(),g=O("tbody"),v&&v.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(h,"class","eList svelte-14hcfjl")},m(a,C){N(a,t,C),Ae(n,t,null),N(a,r,C),N(a,i,C),T(i,o),Ae(s,i,null),T(i,l),T(i,c),Ae(d,c,null),N(a,u,C),N(a,h,C),T(h,f),_&&_.m(f,null),T(f,m),T(f,g),v&&v.m(g,null),p=!0,w||(y=P(c,"click",e[14]),w=!0)},p(e,t){cn(e);const r={};256&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],ae((()=>a=!1))),s.$set(i),e[29]?.length&&_.p(e,t),e[28]?.length&&v.p(e,t)},i(e){p||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(v),p=!0)},o(e){we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),we(v),p=!1},d(e){e&&R(t),$e(n),e&&R(r),e&&R(i),$e(s),$e(d),e&&R(u),e&&R(h),_&&_.d(),v&&v.d(),w=!1,y()}}}function gn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function pn(e){let t,n,r=e[34]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function wn(e){let t,n,r,i,o,s,a,l;r=new et({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=yn(un(e,c,t));return{c(){t=O("tr"),n=O("td"),Ie(r.$$.fragment),i=x();for(let e=0;e<d.length;e+=1)d[e].c();o=x(),V(n,"class","editRow svelte-14hcfjl"),V(t,"class","pointer svelte-14hcfjl"),W(t,"active",e[31]._id===e[0])},m(c,u){N(c,t,u),T(t,n),Ae(r,n,null),T(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);T(t,o),s=!0,a||(l=P(n,"click",e[15](e[31])),a=!0)},p(n,r){if(e=n,3584&r[0]){let n;for(c=e[29],n=0;n<c.length;n+=1){const i=un(e,c,n);d[n]?d[n].p(i,r):(d[n]=yn(i),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&r[0]&&W(t,"active",e[31]._id===e[0])},i(e){s||(pe(r.$$.fragment,e),s=!0)},o(e){we(r.$$.fragment,e),s=!1},d(e){e&&R(t),$e(r),D(d,e),a=!1,l()}}}function yn(e){let t,n,r,i,o=e[9](e[31],e[34])+"";return{c(){t=O("td"),n=k(o),V(t,"class","svelte-14hcfjl")},m(o,s){N(o,t,s),T(t,n),r||(i=P(t,"click",F(e[10](e[31]))),r=!0)},p(t,n){e=t},d(e){e&&R(t),r=!1,i()}}}function Cn(e){let t,n,r=e[13](e[31],e[29],e[1]),i=r&&wn(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){2&n[0]&&(r=e[13](e[31],e[29],e[1])),r?i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=wn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function En(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function _n(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:En,then:mn,catch:fn,value:30,blocks:[,,,]};return ye(e[11](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function vn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[_n]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|256&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function In(e,n,i){const o=Z(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{classId:f}=n,{className:g}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:C}=n,{recordId:E}=n,{filter:_}=n,{multiValues:v}=n,I="",A=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const $=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},S=t.getSchemaByClass(g);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(A)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&jd(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(16,h=e.item),"classId"in e&&i(17,f=e.classId),"className"in e&&i(18,g=e.className),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(19,y=e.viewName),"viewValue"in e&&i(20,C=e.viewValue),"recordId"in e&&i(21,E=e.recordId),"filter"in e&&i(22,_=e.filter),"multiValues"in e&&i(23,v=e.multiValues)},[w,I,o,s,a,l,d,u,A,$,e=>()=>o("choose",{row:e}),async()=>{const e=await S;let n=[];if(h.lookup){const r="."+f+"#"+h.lookup,i=document.querySelector(r);let o=i?.value||E;if(v.has(h.lookup)){const r=v.get(h.lookup)[0];n=r?await t.getSectionView(h.name,{[h.lookup]:r},!0):await Ud(h.name,e.id)}else if(o&&24===o.toString().length){const e=await Gd(h.lookup,o);if(e){const r=e[h.name]?.map((e=>e[h.name]));r&&(n=await t.getSectionView(h.name,{_id:{$in:r}},!0))}}}else{const r="."+f+"#"+y.split(":")[0],i=document.querySelector(r);let o={[y]:i?.value||E};if(h.refItem){const e="."+f+"#"+h.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[h.refItem]:t.value},{[h.refItem]:{$exists:!0,$eq:""}}]};o={...o,...e}}}catch{}}o[y]&&(n=await t.getSectionView(e.class,o,!0)),_&&(n=n.filter((e=>e._id!=_)))}const r=e.display;return{list:n,items:await Ut(r,e,n)}},({detail:{value:e}})=>{i(1,I=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if($(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,I="")},e=>async()=>{const n=await t.getTaskByDocId(e._id),r=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(r)},h,f,g,y,C,E,_,v,()=>o("back"),function(e){I=e,i(1,I)}]}class An extends be{constructor(e){var t;super(),ln.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl .editRow.svelte-14hcfjl{width:1em}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",T(ln.head,t)),Se(this,e,In,vn,A,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:$n}=Ee;function Sn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function bn(e){let t,n,r=e[60]&&function(e){let t,n,r,i,s,a,l,c,d,u,h,f,m,g,p,w,y,C,E;function _(t){e[47](t)}function v(t){e[48](t)}let I={class:"full-width",id:e[29],rows:"1",required:e[1],disabled:e[3],placeholder:e[30],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[2]&&(I.value=e[2]);void 0!==e[24]&&(I.overwrite=e[24]);n=new o({props:I}),J.push((()=>ve(n,"value",_))),J.push((()=>ve(n,"overwrite",v))),n.$on("click",e[32]()),n.$on("onFocus",e[32](e[29]));const A=[Nn,Tn],$=[];function b(e,t){return!e[3]||e[15]?0:e[21]&&e[0]?1:-1}~(a=b(e))&&(l=$[a]=A[a](e));let D=(!e[3]||e[15]||e[16])&&Rn(e);function M(t){e[49](t)}let k={class:"tModal",noClickaway:!0,$$slots:{default:[kn]},$$scope:{ctx:e}};void 0!==e[18]&&(k.open=e[18]);m=new e[26]({props:k}),J.push((()=>ve(m,"open",M)));let L=e[19]&&xn(e);return{c(){t=O("div"),Ie(n.$$.fragment),s=x(),l&&l.c(),c=x(),d=O("input"),h=x(),D&&D.c(),f=x(),Ie(m.$$.fragment),p=x(),L&&L.c(),w=B(),V(d,"class",u=S(e[8]||e[9])+" svelte-jox15l"),V(d,"id",e[5]),V(d,"name",e[5]),d.value=e[0],d.hidden=!0,z(t,"position","relative")},m(r,i){N(r,t,i),Ae(n,t,null),T(t,s),~a&&$[a].m(t,null),T(t,c),T(t,d),T(t,h),D&&D.m(t,null),N(r,f,i),Ae(m,r,i),N(r,p,i),L&&L.m(r,i),N(r,w,i),y=!0,C||(E=P(t,"keydown",e[33]),C=!0)},p(e,o){const s={};2&o[0]&&(s.required=e[1]),8&o[0]&&(s.disabled=e[3]),!r&&4&o[0]&&(r=!0,s.value=e[2],ae((()=>r=!1))),!i&&16777216&o[0]&&(i=!0,s.overwrite=e[24],ae((()=>i=!1))),n.$set(s);let h=a;a=b(e),a===h?~a&&$[a].p(e,o):(l&&(me(),we($[h],1,1,(()=>{$[h]=null})),ge()),~a?(l=$[a],l?l.p(e,o):(l=$[a]=A[a](e),l.c()),pe(l,1),l.m(t,c)):l=null),(!y||768&o[0]&&u!==(u=S(e[8]||e[9])+" svelte-jox15l"))&&V(d,"class",u),(!y||32&o[0])&&V(d,"id",e[5]),(!y||32&o[0])&&V(d,"name",e[5]),(!y||1&o[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[15]||e[16]?D?(D.p(e,o),98312&o[0]&&pe(D,1)):(D=Rn(e),D.c(),pe(D,1),D.m(t,null)):D&&(me(),we(D,1,1,(()=>{D=null})),ge());const f={};13008593&o[0]|1073741824&o[1]&&(f.$$scope={dirty:o,ctx:e}),!g&&262144&o[0]&&(g=!0,f.open=e[18],ae((()=>g=!1))),m.$set(f),e[19]?L?(L.p(e,o),524288&o[0]&&pe(L,1)):(L=xn(e),L.c(),pe(L,1),L.m(w.parentNode,w)):L&&(me(),we(L,1,1,(()=>{L=null})),ge())},i(e){y||(pe(n.$$.fragment,e),pe(l),pe(D),pe(m.$$.fragment,e),pe(L),y=!0)},o(e){we(n.$$.fragment,e),we(l),we(D),we(m.$$.fragment,e),we(L),y=!1},d(e){e&&R(t),$e(n),~a&&$[a].d(),D&&D.d(),e&&R(f),$e(m,e),e&&R(p),L&&L.d(e),e&&R(w),C=!1,E()}}}(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,t){e[60]&&r.p(e,t)},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Tn(e){let t,n,r,i,o;return n=new et({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[38]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Nn(e){let t,n,r,i,o;return n=new _t({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=[P(t,"click",e[32](!0)),P(t,"choose",e[35])],i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,v(o)}}}function Rn(e){let t,n,r,i,o;return n=new Ke({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 pointer svelte-jox15l")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[37]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Dn(e){let t,n,r,i;const o=[Mn,On],s=[];function a(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=B()},m(e,n){s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(me(),we(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r))},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){s[t].d(e),e&&R(r)}}}function On(e){let t,n;return t=new an({props:{title:e[6].designation,newAllowed:e[22],prevEventId:e[10],schema:e[17],recID:e[0],isOpening:e[18],filterForReady:e[23],refStatus:e[6].refStatus,selectionFields:e[13],deList:e[14],praefix:e[12],inputSearch:e[34]()}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.title=e[6].designation),4194304&n[0]&&(r.newAllowed=e[22]),1024&n[0]&&(r.prevEventId=e[10]),131072&n[0]&&(r.schema=e[17]),1&n[0]&&(r.recID=e[0]),262144&n[0]&&(r.isOpening=e[18]),8388608&n[0]&&(r.filterForReady=e[23]),64&n[0]&&(r.refStatus=e[6].refStatus),8192&n[0]&&(r.selectionFields=e[13]),16384&n[0]&&(r.deList=e[14]),4096&n[0]&&(r.praefix=e[12]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Mn(e){let t,n;return t=new An({props:{item:e[6],className:e[17].class,classId:e[9],rowId:e[0],recordId:e[11],viewName:e[4],viewValue:"",multiValues:e[7]}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.item=e[6]),131072&n[0]&&(r.className=e[17].class),512&n[0]&&(r.classId=e[9]),1&n[0]&&(r.rowId=e[0]),2048&n[0]&&(r.recordId=e[11]),16&n[0]&&(r.viewName=e[4]),128&n[0]&&(r.multiValues=e[7]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function kn(e){let t,n,r=e[18]&&Dn(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[18]?r?(r.p(e,n),262144&n[0]&&pe(r,1)):(r=Dn(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function xn(e){let t,n,r;function i(t){e[50](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}};return void 0!==e[19]&&(o.open=e[19]),t=new e[26]({props:o}),J.push((()=>ve(t,"open",i))),{c(){Ie(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};1179649&r[0]|1073741824&r[1]&&(i.$$scope={dirty:r,ctx:e}),!n&&524288&r[0]&&(n=!0,i.open=e[19],ae((()=>n=!1))),t.$set(i)},i(e){r||(pe(t.$$.fragment,e),r=!0)},o(e){we(t.$$.fragment,e),r=!1},d(e){$e(t,e)}}}function Bn(e){let t,n;return t=new qd({props:{schema:e[17],recID:e[0],readonly:!0}}),t.$on("back",e[36]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};131072&n[0]&&(r.schema=e[17]),1&n[0]&&(r.recID=e[0]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Pn(e){let t,n;return t=new e[25]({props:{title:e[20],$$slots:{default:[Bn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1048576&n[0]&&(r.title=e[20]),131073&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ln(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Fn(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ln,then:bn,catch:Sn,value:60,blocks:[,,,]};return ye(e[31](),r),{c(){t=B(),r.block.c()},m(e,i){N(e,t,i),r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(t,n){Ce(r,e=t,n)},i(e){n||(pe(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){we(r.blocks[e])}n=!1},d(e){e&&R(t),r.block.d(e),r.token=null,r=null}}}function Vn(e,n,r){let o,s,a;$(e,i,(e=>r(46,o=e)));const l=Z(),{Dialog:d,Modal:h}=c,{currentTasks:f,loggedIn:m}=u;$(e,f,(e=>r(52,s=e))),$(e,m,(e=>r(53,a=e)));let{id:g}=n,{item:p}=n,{value:y=""}=n,{multiValues:C}=n,{desc:E=""}=n,{noForm:_=!1}=n,{classId:v}=n,{eventId:I}=n,{recordId:A}=n,{withRefValue:S=!1}=n,{refValue:b=""}=n,{shortEdit:T}=n,{required:N}=n,{disabled:R}=n,{readonly:D}=n,{praefix:O}=n,{selectionFields:M}=n,{formnovalidate:k}=n,{selection:x}=n,{deList:B}=n,{isTemplate:P}=n,{noList:L=!1}=n,{multi:F=!1}=n;const V="comment_"+g;let U,H,z,W,G,j,X=!1,q=!0,Y=!0,K=!0;D||=A&&p.asInput,R||=D,!x&&p.selection&&1===p.selection.split(":").length&&(x=p.selection);const Q=D||R||p.lookup||x&&!p.constraint?"":"Suchbegriff ⏎",J=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{l("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},ee=e=>{e&&(r(2,E=w(z,e)),l("setRefDesc",E.split(" •")[0]),l("change",{value:y,description:E}),l("task",{row:e,eventId:z.id}))},te=()=>{r(18,X=!1),r(19,U=!1)};return e.$$set=e=>{"id"in e&&r(5,g=e.id),"item"in e&&r(6,p=e.item),"value"in e&&r(0,y=e.value),"multiValues"in e&&r(7,C=e.multiValues),"desc"in e&&r(2,E=e.desc),"noForm"in e&&r(8,_=e.noForm),"classId"in e&&r(9,v=e.classId),"eventId"in e&&r(10,I=e.eventId),"recordId"in e&&r(11,A=e.recordId),"withRefValue"in e&&r(39,S=e.withRefValue),"refValue"in e&&r(40,b=e.refValue),"shortEdit"in e&&r(42,T=e.shortEdit),"required"in e&&r(1,N=e.required),"disabled"in e&&r(3,R=e.disabled),"readonly"in e&&r(41,D=e.readonly),"praefix"in e&&r(12,O=e.praefix),"selectionFields"in e&&r(13,M=e.selectionFields),"formnovalidate"in e&&r(43,k=e.formnovalidate),"selection"in e&&r(4,x=e.selection),"deList"in e&&r(14,B=e.deList),"isTemplate"in e&&r(15,P=e.isTemplate),"noList"in e&&r(44,L=e.noList),"multi"in e&&r(16,F=e.multi)},e.$$.update=()=>{if(2&e.$$.dirty[0]|4096&e.$$.dirty[1]&&r(1,N=N&&!k),768&e.$$.dirty[1]&&S&&r(0,y=b),131137&e.$$.dirty[0]|8192&e.$$.dirty[1]&&y&&z&&Promise.resolve(Hd(p.refClass,z.id,y,!!p.lookup||L)).then(ee),65&e.$$.dirty[0]|49152&e.$$.dirty[1]&&y&&W&&p.name===W.input?.at(0)&&W.inputLookup?.length){const{domain:e}=W.inputLookup[0]||{};"user"===e&&(o.some((e=>W.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,R=!0))}131073&e.$$.dirty[0]&&!y&&z&&ee({})},[y,N,E,R,x,g,p,C,_,v,I,A,O,M,B,P,F,z,X,U,H,G,q,Y,K,d,h,f,m,V,Q,async()=>{try{const e=await t.getEvent(I);if(j="report"===e.output.type,r(23,Y=!p.asInput),r(22,q=e.output?.class[0].name!==p.refClass),r(17,z=await t.getSchemaByClass(p.refClass)),J(z),r(21,G=(e=>!s?.length||!!s.find((t=>t===e)))(z.id)),r(45,W=await t.getSchema(I)),I&&A&&y&&!R&&W.input?.find((e=>e===p.refClass))&&r(3,R=!0),p.properties?.query?.lookup){const{domain:e,value:n}=p.properties.query.lookup;if("user"===e){const e=a.user,i={[n]:e},s=await t.getSectionView(p.refClass,i);if(s?.length){const[{_id:e}]=s;e&&(r(40,b=e),r(39,S=!0))}o.some((e=>z.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,R=!0)}}return r(20,H=z.identity.designation),!0}catch{return l("initFail",!0),!1}},e=>t=>{if(!0===e&&r(18,X=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(p.lookup||x&&!p.constraint||y)&&r(18,X=!0)},async e=>{const n=()=>{r(18,X=!0)};if(9==e.which)return;if(y)return e.preventDefault();if(13!=e.which)return;e.preventDefault();const i=z.items.find((e=>e.properties?.search));if(!i)return n();const o=e.srcElement.value,{name:s,checkOn:a,refClass:l,properties:c}=i;let{search:d}=c;!0===d&&(d={}),"number"==typeof d&&(d={min:d});const{min:u=3,start:h=!1,end:f=!1}=d;if(o.length<u)return n();const m=(h?"^":"")+o+(f?"$":"");let g={[s]:{$regex:m,$options:"i"}};a&&(g=[{$lookup:{from:l,localField:s,foreignField:"_id",as:l}},{$match:{[l+"."+a]:{$regex:m,$options:"i"}}}]);const p=await t.getSectionView(z.class,g);1!==p?.length?n():r(0,y=p[0]._id)},()=>{if(y)return"";const e=document.getElementById(V);return e?.value||""},({detail:e})=>{r(0,y=e.row._id),te()},te,()=>{(j||G)&&(F?l("change",{value:y,delete:!0}):(r(0,y=""),r(2,E=""),r(24,K=!0),l("change",{value:y,description:E}),l("task",{row:{_task:{event:z.id,_id:!1}}})))},async()=>{if(!y)return;const e=await Hd(p.refClass,z.id,y);if(!e._task)return;const t=e._task.task_id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},S,b,D,T,k,L,W,o,function(e){E=e,r(2,E)},function(e){K=e,r(24,K)},function(e){X=e,r(18,X)},function(e){U=e,r(19,U)}]}class Un extends be{constructor(e){var t;super(),$n.getElementById("svelte-jox15l-style")||((t=O("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",T($n.head,t)),Se(this,e,Vn,Fn,A,{id:5,item:6,value:0,multiValues:7,desc:2,noForm:8,classId:9,eventId:10,recordId:11,withRefValue:39,refValue:40,shortEdit:42,required:1,disabled:3,readonly:41,praefix:12,selectionFields:13,formnovalidate:43,selection:4,deList:14,isTemplate:15,noList:44,multi:16},[-1,-1])}}function Hn(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function zn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Wn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[jn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8191&n[0]|512&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Gn(e){let t,n;return t=new Un({props:{classId:e[6],eventId:e[7],required:e[9],disabled:e[1],formnovalidate:e[12],readonly:e[10],id:e[2]+"."+e[39],item:e[3],desc:e[4],value:e[37],noForm:e[5],praefix:e[11],recordId:e[8],multi:!0}}),t.$on("change",e[24]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.classId=e[6]),128&n[0]&&(r.eventId=e[7]),512&n[0]&&(r.required=e[9]),2&n[0]&&(r.disabled=e[1]),4096&n[0]&&(r.formnovalidate=e[12]),1024&n[0]&&(r.readonly=e[10]),4&n[0]&&(r.id=e[2]+"."+e[39]),8&n[0]&&(r.item=e[3]),16&n[0]&&(r.desc=e[4]),1&n[0]&&(r.value=e[37]),32&n[0]&&(r.noForm=e[5]),2048&n[0]&&(r.praefix=e[11]),256&n[0]&&(r.recordId=e[8]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function jn(e){let t,n,r,i,o,s,a;n=new st({props:{size:"18"}});let l=e[0],c=[];for(let t=0;t<l.length;t+=1)c[t]=Gn(Hn(e,l,t));const d=e=>we(c[e],1,1,(()=>{c[e]=null}));return{c(){t=O("span"),Ie(n.$$.fragment),r=x();for(let e=0;e<c.length;e+=1)c[e].c();i=B(),V(t,"class","feather pointer")},m(l,d){N(l,t,d),Ae(n,t,null),N(l,r,d);for(let e=0;e<c.length;e+=1)c[e].m(l,d);N(l,i,d),o=!0,s||(a=P(t,"click",(function(){I(e[22](e[0]))&&e[22](e[0]).apply(this,arguments)})),s=!0)},p(t,n){if(e=t,16785407&n[0]){let t;for(l=e[0],t=0;t<l.length;t+=1){const r=Hn(e,l,t);c[t]?(c[t].p(r,n),pe(c[t],1)):(c[t]=Gn(r),c[t].c(),pe(c[t],1),c[t].m(i.parentNode,i))}for(me(),t=l.length;t<c.length;t+=1)d(t);ge()}},i(e){if(!o){pe(n.$$.fragment,e);for(let e=0;e<l.length;e+=1)pe(c[e]);o=!0}},o(e){we(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)we(c[e]);o=!1},d(e){e&&R(t),$e(n),e&&R(r),D(c,e),e&&R(i),s=!1,a()}}}function Xn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function qn(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Zn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[0]&&(r.title=e[14].designation),49480&n[0]|512&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Yn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Zn(e){let t,n,r,i,o;return n=new e[19]({props:{outline:!0,$$slots:{default:[Yn]},$$scope:{ctx:e}}}),n.$on("click",e[25]),i=new zt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),i.$on("choose",e[23]),i.$on("back",e[25]),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),Ie(i.$$.fragment),V(t,"class","form--buttons")},m(e,s){N(e,t,s),Ae(n,t,null),N(e,r,s),Ae(i,e,s),o=!0},p(e,t){const r={};512&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const o={};8&t[0]&&(o.item=e[3]),16384&t[0]&&(o.className=e[14].class),64&t[0]&&(o.classId=e[6]),32768&t[0]&&(o.rowId=e[15]),256&t[0]&&(o.recordId=e[8]),i.$set(o)},i(e){o||(pe(n.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){we(n.$$.fragment,e),we(i.$$.fragment,e),o=!1},d(e){e&&R(t),$e(n),e&&R(r),$e(i,e)}}}function Kn(e){let t,n,r=e[13]&&qn(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[13]?r?(r.p(e,n),8192&n[0]&&pe(r,1)):(r=qn(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Qn(e){let t,n,r,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Xn,then:Wn,catch:zn,value:36,blocks:[,,,]};function s(t){e[33](t)}ye(e[20](),o);let a={class:"tModal",noClickaway:!0,$$slots:{default:[Kn]},$$scope:{ctx:e}};return void 0!==e[13]&&(a.open=e[13]),n=new e[17]({props:a}),J.push((()=>ve(n,"open",s))),{c(){o.block.c(),t=x(),Ie(n.$$.fragment)},m(e,r){o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,N(e,t,r),Ae(n,e,r),i=!0},p(t,i){Ce(o,e=t,i);const s={};57672&i[0]|512&i[1]&&(s.$$scope={dirty:i,ctx:e}),!r&&8192&i[0]&&(r=!0,s.open=e[13],ae((()=>r=!1))),n.$set(s)},i(e){i||(pe(o.block),pe(n.$$.fragment,e),i=!0)},o(e){for(let e=0;e<3;e+=1){we(o.blocks[e])}we(n.$$.fragment,e),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&R(t),$e(n,e)}}}function Jn(e,n,r){const i=Z(),{Card:o,Modal:s,Dialog:a,Button:l}=c;let d,u,{id:h}=n,{item:f}=n,{values:m=[]}=n,{desc:g=""}=n,{noForm:p=!1}=n,{classId:w}=n,{eventId:y}=n,{recordId:C}=n,{withRefValue:E=!1}=n,{refValue:_=""}=n,{required:v}=n,{disabled:I}=n,{readonly:A}=n,{praefix:$}=n,{selectionFields:S}=n,{formnovalidate:b}=n,{selection:T}=n,{deList:N}=n,{isTemplate:R}=n,{noList:D=!1}=n,O=!1;const M=f.properties.multi.filter;I=!0;const k=()=>{r(13,O=!1)};return e.$$set=e=>{"id"in e&&r(2,h=e.id),"item"in e&&r(3,f=e.item),"values"in e&&r(0,m=e.values),"desc"in e&&r(4,g=e.desc),"noForm"in e&&r(5,p=e.noForm),"classId"in e&&r(6,w=e.classId),"eventId"in e&&r(7,y=e.eventId),"recordId"in e&&r(8,C=e.recordId),"withRefValue"in e&&r(26,E=e.withRefValue),"refValue"in e&&r(27,_=e.refValue),"required"in e&&r(9,v=e.required),"disabled"in e&&r(1,I=e.disabled),"readonly"in e&&r(10,A=e.readonly),"praefix"in e&&r(11,$=e.praefix),"selectionFields"in e&&r(28,S=e.selectionFields),"formnovalidate"in e&&r(12,b=e.formnovalidate),"selection"in e&&r(29,T=e.selection),"deList"in e&&r(30,N=e.deList),"isTemplate"in e&&r(31,R=e.isTemplate),"noList"in e&&r(32,D=e.noList)},[m,I,h,f,g,p,w,y,C,v,A,$,b,O,d,u,o,s,a,l,async()=>{r(14,d=await t.getSchemaByClass(f.refClass))},async()=>{let e=await Ud(d.class,d.id);if(M)for(const t in M)e=e.filter((e=>{const[n,r]=t.split(".");if(r||(r=n,n=""),n){if(e[n][0]&&e[n][0][r].length)return!0}else if(e[r])return!0;return!1}));return e},e=>()=>{r(13,O=!0),r(15,u=e)},({detail:e})=>{const t=e.row._id;m.find((e=>e===t))||r(0,m=m.concat(e.row._id)),k()},({detail:e})=>{e.delete&&r(0,m=m.filter((t=>t!==e.value))),e.value=m,i("change",e)},k,E,_,S,T,N,R,D,function(e){O=e,r(13,O)}]}class er extends be{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=O("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",T(document.head,t)),Se(this,e,Jn,Qn,A,{id:2,item:3,values:0,desc:4,noForm:5,classId:6,eventId:7,recordId:8,withRefValue:26,refValue:27,required:9,disabled:1,readonly:10,praefix:11,selectionFields:28,formnovalidate:12,selection:29,deList:30,isTemplate:31,noList:32},[-1,-1])}}const tr=/\d+/g,nr=/%[HMSpPdmyY%]/g;function rr(e,t,n){const r=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const o=t.split(nr);let s=0,a=0;const l=new Date(0);for(const c of o){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(a!==t.length)return n;break}if("%"!==t[a+c.length])break;if(a+=c.length+1,"%"===t[a]){if("%"!==e[s])return n;s++}else if("p"===t[a].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)i=!1,l.getHours()>=12&&l.setHours(l.getHours()-12);else{if("PM"!==t)return n;i=!0,l.getHours()<12&&l.setHours(l.getHours()+12)}}else{tr.lastIndex=s;const o=tr.exec(e);if(null==o)return n;switch(t[a]){case"H":l.setHours(parseInt(o[0])+12*i);break;case"M":l.setMinutes(o[0]);break;case"S":l.setSeconds(o[0]);break;case"d":l.setDate(o[0]);break;case"m":l.setMonth(o[0]-1);break;case"y":l.setFullYear(100*r+parseInt(o[0]));break;case"Y":l.setFullYear(o[0])}s+=o[0].length}a++}return isNaN(l.valueOf())?n:l}function ir(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:or}=Ee;function sr(e,t,n){const r=e.slice();return r[17]=t[n],r}function ar(e,t,n){const r=e.slice();return r[20]=t[n],r}function lr(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function cr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m=e[0].items,g=[];for(let t=0;t<m.length;t+=1)g[t]=ur(ar(e,m,t));const p=e=>we(g[e],1,1,(()=>{g[e]=null}));let w=e[0].list&&hr(e);return l=new e[5]({props:{outline:!0,$$slots:{default:[mr]},$$scope:{ctx:e}}}),l.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[gr]},$$scope:{ctx:e}}}),{c(){t=O("form"),n=O("input"),i=x();for(let e=0;e<g.length;e+=1)g[e].c();o=x(),w&&w.c(),s=x(),a=O("div"),Ie(l.$$.fragment),c=x(),Ie(d.$$.fragment),V(n,"class",S(e[6])+" svelte-1phofh5"),V(n,"name","_id"),V(n,"type","hidden"),n.value=r=e[1]._id||"",V(t,"class","fTask svelte-1phofh5"),V(t,"id",e[6]),V(a,"class","form--buttons svelte-1phofh5")},m(r,m){N(r,t,m),T(t,n),T(t,i);for(let e=0;e<g.length;e+=1)g[e].m(t,null);T(t,o),w&&w.m(t,null),N(r,s,m),N(r,a,m),Ae(l,a,null),T(a,c),Ae(d,a,null),u=!0,h||(f=[P(t,"keydown",e[8]),P(t,"submit",L(e[10]))],h=!0)},p(e,i){if((!u||2&i&&r!==(r=e[1]._id||""))&&(n.value=r),75&i){let n;for(m=e[0].items,n=0;n<m.length;n+=1){const r=ar(e,m,n);g[n]?(g[n].p(r,i),pe(g[n],1)):(g[n]=ur(r),g[n].c(),pe(g[n],1),g[n].m(t,o))}for(me(),n=m.length;n<g.length;n+=1)p(n);ge()}e[0].list?w?(w.p(e,i),1&i&&pe(w,1)):(w=hr(e),w.c(),pe(w,1),w.m(t,null)):w&&(me(),we(w,1,1,(()=>{w=null})),ge());const s={};8388608&i&&(s.$$scope={dirty:i,ctx:e}),l.$set(s);const a={};4&i&&(a.disabled=e[2]),8388608&i&&(a.$$scope={dirty:i,ctx:e}),d.$set(a)},i(e){if(!u){for(let e=0;e<m.length;e+=1)pe(g[e]);pe(w),pe(l.$$.fragment,e),pe(d.$$.fragment,e),u=!0}},o(e){g=g.filter(Boolean);for(let e=0;e<g.length;e+=1)we(g[e]);we(w),we(l.$$.fragment,e),we(d.$$.fragment,e),u=!1},d(e){e&&R(t),D(g,e),w&&w.d(),e&&R(s),e&&R(a),$e(l),$e(d),h=!1,v(f)}}}function dr(e){let t,n;return t=new qa({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(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.item=e[20]),1&n&&(r.selection=e[20].selection),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),1&n&&(r.eventId=e[0].id),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ur(e){let t,n,r=yr(!0,e[20]),i=r&&dr(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){1&n&&(r=yr(!0,e[20])),r?i?(i.p(e,n),1&n&&pe(i,1)):(i=dr(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function hr(e){let t,n,r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=fr(sr(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(75&n){let s;for(r=e[0].list,s=0;s<r.length;s+=1){const o=sr(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=fr(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}function fr(e){let t,n,r,i;return t=new e[4]({props:{text:e[17].designation}}),r=new Rr({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){Ie(t.$$.fragment),n=x(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),N(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const o={};1&n&&(o.list=e[17]),1&n&&(o.eventId=e[0].id),1&n&&(o.schema=e[17].item),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),r.$set(o)},i(e){i||(pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!0)},o(e){we(t.$$.fragment,e),we(r.$$.fragment,e),i=!1},d(e){$e(t,e),e&&R(n),$e(r,e)}}}function mr(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function gr(e){let t;return{c(){t=k("Speichern")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function pr(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function wr(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:pr,then:cr,catch:lr,value:16,blocks:[,,,]};return ye(e[7](),i),{c(){t=x(),n=O("section"),i.block.c(),or.title="Vorgaben",V(n,"class","sTask svelte-1phofh5")},m(e,o){N(e,t,o),N(e,n,o),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,r=!0},p(t,[n]){Ce(i,e=t,n)},i(e){r||(pe(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}r=!1},d(e){e&&R(t),e&&R(n),i.block.d(),i.token=null,i=null}}}const yr=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Cr(e,r,o){let l,d,u;$(e,a,(e=>o(11,d=e))),$(e,i,(e=>o(12,u=e)));const{Divider:h,Button:f,FormField:m}=c,g=JSON.parse(n.getItem("Locale"));let{schema:p}=r,{record:w}=r,y="template-"+p.class+Math.floor(9e3*Math.random()+1e3).toString(),C=!1;const E=()=>window.history.back(),_=(e,t,n=!1)=>{const r=t.id,i=e.find((e=>e.name===r));let o=t.value;if(!n&&i&&i.properties?.multi&&(o=w[r]),o&&i&&i.type.startsWith("date"))try{return rr(o,"%d.%m.%Y").toISOString()}catch{return new Date(o).toISOString()}if(i&&"boolean"===i.type&&(o=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(g.id).substring(1,2);try{o=Number(o.replace(e,".")).toString()}catch{}}return o};return e.$$set=e=>{"schema"in e&&o(0,p=e.schema),"record"in e&&o(1,w=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,l=C)},[p,w,C,l,h,f,y,async()=>{const e=await t.getEvent(p.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,C=!0),d.role?.length&&p.authorization?.length){const e=p.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,C||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},E,async e=>{const n={};Array.from(document.querySelectorAll("form#"+y+" ."+y)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[r,i]=t.split("."),o=p.list.find((e=>e.name===r));n[t]=_(o.item,e)}else n[t]=_(p.items,e)})),await t.saveTemplate(p.class,n),s.success("Die Vorgaben wurden gespeichert.",2e3),E()}]}const{document:Er}=Ee;function _r(e,t,n){const r=e.slice();return r[28]=t[n],r}function vr(e){let t,n;return t=new qa({props:{classId:e[2],item:e[28],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5],currency:e[8]}}),t.$on("notify",e[14]),t.$on("defPrep",e[16]),t.$on("task",e[21]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),2&n[0]&&(r.item=e[28]),2&n[0]&&(r.listName=e[1].name),8&n[0]&&(r.eventId=e[3]),1&n[0]&&(r.record=e[0]),16&n[0]&&(r.disabled=e[4]),32&n[0]&&(r.required=e[5]),256&n[0]&&(r.currency=e[8]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ir(e){let t,n,r=yr(e[7],e[28]),i=r&&vr(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){130&n[0]&&(r=yr(e[7],e[28])),r?i?(i.p(e,n),130&n[0]&&pe(i,1)):(i=vr(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function Ar(e){let t,n,r,i=e[1].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=Ir(_r(e,i,t));const s=e=>we(o[e],1,1,(()=>{o[e]=null}));return{c(){t=O("div");for(let e=0;e<o.length;e+=1)o[e].c();V(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){N(e,t,n);for(let e=0;e<o.length;e+=1)o[e].m(t,null);r=!0},p(e,a){if(82367&a[0]){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const r=_r(e,i,n);o[n]?(o[n].p(r,a),pe(o[n],1)):(o[n]=Ir(r),o[n].c(),pe(o[n],1),o[n].m(t,null))}for(me(),n=i.length;n<o.length;n+=1)s(n);ge()}(!r||6&a[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&V(t,"id",n)},i(e){if(!r){for(let e=0;e<i.length;e+=1)pe(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)we(o[e]);r=!1},d(e){e&&R(t),D(o,e)}}}function $r(e){let t,n,r=e[13](e[9])+"";return{c(){t=O("span"),n=k(r)},m(e,r){N(e,t,r),T(t,n)},p(e,t){512&t[0]&&r!==(r=e[13](e[9])+"")&&U(n,r)},d(e){e&&R(t)}}}function Sr(e){let t,n,r;return n=new e[10]({props:{$$slots:{default:[$r]},$$scope:{ctx:e}}}),n.$on("click",(function(){I(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=O("div"),Ie(n.$$.fragment),V(t,"class","accordion svelte-148ktt9"),V(t,"slot","handle")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(t,r){e=t;const i={};512&r[0]|1&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function br(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[Sr,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[Ar,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.open=e[6]),134218687&n[0]|1&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Tr(e){let t,n,r;return n=new e[11]({props:{$$slots:{default:[br]},$$scope:{ctx:e}}}),{c(){t=O("div"),Ie(n.$$.fragment),V(t,"class","formList")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1023&t[0]|1&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Nr(e,n,r){const{Button:i,Accordion:o,AccordionSection:s}=c;let{list:a}=n,{schema:l}=n,{record:d}=n,{classId:u}=n,{eventId:h}=n,{disabled:f}=n,{required:w}=n,{open:y=!1}=n,{template:C={}}=n,{isTemplate:E=!1}=n,{currency:_}=n,{update:v=!1}=n,I=new Map;const A={};let $=d[a.name]||{};d[a.name]=$;const S=e=>A[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),b=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&r(1,a=e.list),"schema"in e&&r(18,l=e.schema),"record"in e&&r(0,d=e.record),"classId"in e&&r(2,u=e.classId),"eventId"in e&&r(3,h=e.eventId),"disabled"in e&&r(4,f=e.disabled),"required"in e&&r(5,w=e.required),"open"in e&&r(6,y=e.open),"template"in e&&r(19,C=e.template),"isTemplate"in e&&r(7,E=e.isTemplate),"currency"in e&&r(8,_=e.currency),"update"in e&&r(20,v=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&v&&d&&r(9,$=d[a.name]||{})},[d,a,u,h,f,w,y,E,_,$,i,o,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?S(t.name):"boolean"===t.type?p(e[t.name]):"date"===t.type?m(e[t.name]):"datetime"===t.type?g(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(A[n]=e.desc);const i=d[t];r(0,d[t]={...i,[n]:e.value},d),r(9,$=d[t])},e=>t=>{(()=>{const e=C[a.name]||{};for(const t in e)C[a.name][t]&&!d[a.name][t]&&r(0,d[a.name][t]=C[a.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${a.name} > div.form-field:last-child`,i=document.querySelector(n);oe().then((()=>{const e=`#accordion-content-${u}-${a.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(b)})).then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:r}})=>{if(I.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===className+"."+a.name))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&I.set(e,o[0])},()=>{setTimeout((()=>{Array.from(I).forEach((([e,t])=>{d[a.name][e]||r(0,d[a.name][e]=t._id,d)}))}),500)},l,C,v,function(t){K(e,t)}]}class Rr extends be{constructor(e){var t;super(),Er.getElementById("svelte-148ktt9-style")||((t=O("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",T(Er.head,t)),Se(this,e,Nr,Tr,A,{list:1,schema:18,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:19,isTemplate:7,currency:8,update:20},[-1,-1])}}const{document:Dr}=Ee;function Or(e){e[0]=e[23].list,e[22]=e[23].items}function Mr(e,t,n){const r=e.slice();return r[24]=t[n],r}function kr(e,t,n){const r=e.slice();return r[27]=t[n],r}function xr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Br(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Pr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function C(t){e[19](t)}Or(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Lr]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let E={id:e[8]};void 0!==e[1]&&(E.value=e[1]),s=new e[6]({props:E}),J.push((()=>ve(s,"value",C))),s.$on("input",e[12]),d=new Ke({props:{size:"18"}});let _=e[22]?.length&&function(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Fr(xr(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[22],o=0;o<r.length;o+=1){const s=xr(e,r,o);i[o]?i[o].p(s,t):(i[o]=Fr(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&R(t),D(i,e)}}}(e),v=e[0]?.length&&function(e){let t,n=e[0],r=[];for(let t=0;t<n.length;t+=1)r[t]=Hr(Mr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=B()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);N(e,t,n)},p(e,i){if(11778&i[0]){let o;for(n=e[0],o=0;o<n.length;o+=1){const s=Mr(e,n,o);r[o]?r[o].p(s,i):(r[o]=Hr(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){D(r,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),i=O("div"),o=k("Suchen: "),Ie(s.$$.fragment),l=x(),c=O("span"),Ie(d.$$.fragment),u=x(),h=O("div"),f=O("table"),_&&_.c(),m=x(),g=O("tbody"),v&&v.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(h,"class","eList svelte-14hcfjl")},m(a,C){N(a,t,C),Ae(n,t,null),N(a,r,C),N(a,i,C),T(i,o),Ae(s,i,null),T(i,l),T(i,c),Ae(d,c,null),N(a,u,C),N(a,h,C),T(h,f),_&&_.m(f,null),T(f,m),T(f,g),v&&v.m(g,null),p=!0,w||(y=P(c,"click",e[14]),w=!0)},p(e,t){Or(e);const r={};2&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],ae((()=>a=!1))),s.$set(i),e[22]?.length&&_.p(e,t),e[0]?.length&&v.p(e,t)},i(e){p||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!0)},o(e){we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),p=!1},d(e){e&&R(t),$e(n),e&&R(r),e&&R(i),$e(s),$e(d),e&&R(u),e&&R(h),_&&_.d(),v&&v.d(),w=!1,y()}}}function Lr(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Fr(e){let t,n,r=e[27]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function Vr(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Ur(kr(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=x(),V(t,"class","pointer svelte-14hcfjl")},m(e,r){N(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);T(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[22],s=0;s<r.length;s+=1){const a=kr(e,r,s);i[s]?i[s].p(a,o):(i[s]=Ur(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(e){e&&R(t),D(i,e)}}}function Ur(e){let t,n,r,i,o=e[9](e[24],e[27])+"";return{c(){t=O("td"),n=k(o),V(t,"class","svelte-14hcfjl")},m(o,s){N(o,t,s),T(t,n),r||(i=P(t,"click",F(e[10](e[24]))),r=!0)},p(t,n){e=t},d(e){e&&R(t),r=!1,i()}}}function Hr(e){let t,n=e[13](e[24],e[22],e[1]),r=n&&Vr(e);return{c(){r&&r.c(),t=B()},m(e,n){r&&r.m(e,n),N(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[24],e[22],e[1])),n?r?r.p(e,i):(r=Vr(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&R(t)}}}function zr(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Wr(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:zr,then:Pr,catch:Br,value:23,blocks:[,,,]};return ye(e[11](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function Gr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Wr]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function jr(e,n,r){const i=Z(),{Dialog:o,Divider:s,Loading:a,TextField:l,Button:d}=c;let{item:u}=n,{className:h}=n,{classId:f}=n,{list:g}=n,w="",y=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const C=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},E=t.getSchemaByClass(h);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(y)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&r(15,u=e.item),"className"in e&&r(16,h=e.className),"classId"in e&&r(17,f=e.classId),"list"in e&&r(0,g=e.list)},[g,w,i,o,s,a,l,d,y,C,e=>()=>i("choose",{row:e}),async()=>{const e=await E,t=e.display;let n=await Ut(t,e,g);return{list:g,items:n}},({detail:{value:e}})=>{r(1,w=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(C(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,w="")},u,h,f,()=>i("back"),function(e){w=e,r(1,w)}]}class Xr extends be{constructor(e){var t;super(),Dr.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",T(Dr.head,t)),Se(this,e,jr,Gr,A,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:qr}=Ee;function Yr(e,t,n){const r=e.slice();return r[11]=t[n],r}function Zr(e,t,n){const r=e.slice();return r[3]=t[n],r}function Kr(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Qr(e){let t,n,r,i=e[7].items,o=[];for(let t=0;t<i.length;t+=1)o[t]=ri(Zr(e,i,t));const s=e=>we(o[e],1,1,(()=>{o[e]=null}));let a=e[7].list&&ii(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=x(),a&&a.c(),n=B()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);N(e,t,i),a&&a.m(e,i),N(e,n,i),r=!0},p(e,r){if(30327783&r[0]){let n;for(i=e[7].items,n=0;n<i.length;n+=1){const s=Zr(e,i,n);o[n]?(o[n].p(s,r),pe(o[n],1)):(o[n]=ri(s),o[n].c(),pe(o[n],1),o[n].m(t.parentNode,t))}for(me(),n=i.length;n<o.length;n+=1)s(n);ge()}e[7].list?a?(a.p(e,r),128&r[0]&&pe(a,1)):(a=ii(e),a.c(),pe(a,1),a.m(n.parentNode,n)):a&&(me(),we(a,1,1,(()=>{a=null})),ge())},i(e){if(!r){for(let e=0;e<i.length;e+=1)pe(o[e]);pe(a),r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)we(o[e]);we(a),r=!1},d(e){D(o,e),e&&R(t),a&&a.d(e),e&&R(n)}}}function Jr(e){let t,n,r,i;const o=[ti,ei],s=[];function a(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=B()},m(e,n){~t&&s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(me(),we(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){~t&&s[t].d(e),e&&R(r)}}}function ei(e){let t,n;return t=new qa({props:{classId:e[8],item:e[3],record:e[6],disabled:e[3].name===e[14]&&e[15]||e[0],eventId:e[5],currency:e[2],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.item=e[3]),64&n[0]&&(r.record=e[6]),129&n[0]&&(r.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(r.eventId=e[5]),4&n[0]&&(r.currency=e[2]),512&n[0]&&(r.changeValue=e[9]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ti(e){let t,n,r,i;n=new qa({props:{classId:e[8],item:e[3],record:e[6],disabled:e[0]||!!e[1],required:!0,eventId:e[5],currency:e[2],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]),n.$on("record",e[23]),n.$on("objRecord",e[24]);let o=e[1]&&ni(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o&&o.c(),z(t,"padding-top",".25em"),z(t,"background-color","lightyellow"),z(t,"position","relative")},m(e,s){N(e,t,s),Ae(n,t,null),T(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};256&r[0]&&(i.classId=e[8]),128&r[0]&&(i.item=e[3]),64&r[0]&&(i.record=e[6]),3&r[0]&&(i.disabled=e[0]||!!e[1]),32&r[0]&&(i.eventId=e[5]),4&r[0]&&(i.currency=e[2]),512&r[0]&&(i.changeValue=e[9]),n.$set(i),e[1]?o?(o.p(e,r),2&r[0]&&pe(o,1)):(o=ni(e),o.c(),pe(o,1),o.m(t,null)):o&&(me(),we(o,1,1,(()=>{o=null})),ge())},i(e){i||(pe(n.$$.fragment,e),pe(o),i=!0)},o(e){we(n.$$.fragment,e),we(o),i=!1},d(e){e&&R(t),$e(n),o&&o.d()}}}function ni(e){let t,n,r,i,o;return n=new Ke({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 pointer svelte-16mo2c")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[22]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function ri(e){let t,n,r="list"!==e[3].type&&Jr(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){"list"!==e[3].type?r?(r.p(e,n),128&n[0]&&pe(r,1)):(r=Jr(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function ii(e){let t,n,r=e[7].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=si(Yr(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(485&n[0]){let s;for(r=e[7].list,s=0;s<r.length;s+=1){const o=Yr(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=si(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}function oi(e){let t,n,r,i;return t=new e[12]({props:{text:e[11].designation}}),r=new Rr({props:{classId:e[8],list:e[11],eventId:e[5],schema:e[11].item,record:e[6],disabled:e[0],currency:e[2],update:!0}}),{c(){Ie(t.$$.fragment),n=x(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),N(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};128&n[0]&&(i.text=e[11].designation),t.$set(i);const o={};256&n[0]&&(o.classId=e[8]),128&n[0]&&(o.list=e[11]),32&n[0]&&(o.eventId=e[5]),128&n[0]&&(o.schema=e[11].item),64&n[0]&&(o.record=e[6]),1&n[0]&&(o.disabled=e[0]),4&n[0]&&(o.currency=e[2]),r.$set(o)},i(e){i||(pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!0)},o(e){we(t.$$.fragment,e),we(r.$$.fragment,e),i=!1},d(e){$e(t,e),e&&R(n),$e(r,e)}}}function si(e){let t,n,r="array"!==e[11].type&&oi(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){"array"!==e[11].type?r?(r.p(e,n),128&n[0]&&pe(r,1)):(r=oi(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function ai(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function li(e){let t,n;return t=new Xr({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n[0]&&(r.item=e[3]),16&n[0]&&(r.className=e[4]),256&n[0]&&(r.classId=e[8]),2048&n[0]&&(r.list=e[11]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ci(e){let t,n,r=e[10]&&li(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[10]?r?(r.p(e,n),1024&n[0]&&pe(r,1)):(r=li(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function di(e){let t,n,r,i,o,s,a={ctx:e,current:null,token:null,hasCatch:!1,pending:ai,then:Qr,catch:Kr,value:54,blocks:[,,,]};function l(t){e[30](t)}ye(e[16](),a),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[ci]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),i=new e[13]({props:c}),J.push((()=>ve(i,"open",l))),{c(){a.block.c(),t=x(),Ie(n.$$.fragment),r=x(),Ie(i.$$.fragment)},m(e,o){a.block.m(e,a.anchor=o),a.mount=()=>t.parentNode,a.anchor=t,N(e,t,o),Ae(n,e,o),N(e,r,o),Ae(i,e,o),s=!0},p(t,n){Ce(a,e=t,n);const r={};3352&n[0]|268435456&n[1]&&(r.$$scope={dirty:n,ctx:e}),!o&&1024&n[0]&&(o=!0,r.open=e[10],ae((()=>o=!1))),i.$set(r)},i(e){s||(pe(a.block),pe(n.$$.fragment,e),pe(i.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){we(a.blocks[e])}we(n.$$.fragment,e),we(i.$$.fragment,e),s=!1},d(e){a.block.d(e),a.token=null,a=null,e&&R(t),$e(n,e),e&&R(r),$e(i,e)}}}function ui(e,n,r){const{Divider:i,FormField:o,Modal:s}=c,a=Z();let l,d,u,h,f,{required:m}=n,{disabled:g}=n,{readonly:p}=n,{id:w}=n,{item:y}=n,{value:C}=n,{refValue:E}=n,{currency:_}=n,v={},I=[],A=[],$={},S=new Map,b=!1,T="";const N=y.checkOn,R=C,D=e=>{l.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[r,i]=n.split(".");I.push({action:e,itemName:t.name,refObj:r,refName:i,op:t.properties[e].invert?"!":""})}))},O=()=>{l.items.filter((e=>e.lookup)).forEach((e=>{A.push({name:e.name,lookup:e.lookup})})),l.items.filter((e=>e.properties?.lookup)).forEach((e=>{A.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},M=async e=>{const t=I.filter((t=>t.refObj===e));if(t?.length){r(9,$={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:s}=e;if(!n)break;let a,l,c=!i&&v[n];const u=v[n];u&&i&&(c=(await Gd(n,u))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{a=`#${d} .form-field.${t} .field textarea`,l=document.querySelector(a),l||(a=`#${d} .form-field.${t} .field input`,l=document.querySelector(a)),l&&c&&l.setAttribute(s,""),l&&!c&&l.removeAttribute(s)}),0)),"hidden"===s&&(a=`#${d} .form-field.${t}`,l=document.querySelector(a),l?.classList?.toggle("hidden",!!c),c&&r(9,$[t]="",$))}}};q((()=>{k()}));const k=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(d))&&++n<20;)await e(50);t&&((()=>{if(recID)return;const e=new Set;for(const t of I)e.add(t.refObj||u);Array.from(e).forEach((e=>M(e)))})(),x())},x=()=>{setTimeout((()=>{Array.from(S).forEach((([e,t])=>{v[e]||r(6,v[e]=t._id,v)}))}),250)},B=async e=>{if(!e.value)return void L();const n={[e.itemName]:{$regex:`(?i)${e.value}`}},i=await t.getSectionView(u,n);i?.length?(r(11,T=i),r(10,b=!0)):(r(1,C=""),r(25,E=""),a("setRefValue",E))},P=()=>{r(10,b=!1)},L=()=>{r(1,C=""),r(25,E=C),r(6,v={}),a("setRefValue",E)};return e.$$set=e=>{"required"in e&&r(26,m=e.required),"disabled"in e&&r(0,g=e.disabled),"readonly"in e&&r(27,p=e.readonly),"id"in e&&r(28,w=e.id),"item"in e&&r(3,y=e.item),"value"in e&&r(1,C=e.value),"refValue"in e&&r(25,E=e.refValue),"currency"in e&&r(2,_=e.currency)},e.$$.update=()=>{134217729&e.$$.dirty[0]&&r(0,g=g||p),536871024&e.$$.dirty[0]&&v&&a("safeReference",{record:v,class:u,event:h,taskId:f})},[g,C,_,y,u,h,v,l,d,$,b,T,i,s,N,R,async()=>{try{if(C){const e=await t.getTask(y.refClass,C);delete e._task,r(6,v=e),r(29,f=(await t.getTaskByDocId(e._id))._id)}else r(6,v={})}catch{}return r(7,l=await t.getSchemaByClass(y.refClass)),r(8,d="form-"+l.class+Math.floor(9e3*Math.random()+1e3).toString()),r(4,u=l.class),l.identity.designation,r(5,h=l.id),["readonly","hidden","required"].map(D),O(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(r(6,v[t]=n,v),t===N)return B(e);M(t)},async({detail:e})=>{if(!(l.input?.length&&l.input.length>1))return;if(prevSchema?.class!==l.input[0])return;const{value:n,lookup:i,view:o}=e,[s]=i.split(":"),a=(await t.getSectionView(s,{[o]:{$in:n}})).map((e=>e._id));for(const e of l.input.slice(1)){r(6,v[e]=[],v);const n=await t.getSchemaByClass(e);n.id;let i=await t.getTasks(n.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&a.includes(e[s]))),i?.length){const n=i.map((e=>e._id)),o=await t.getSectionView(e,{_id:{$in:n}});for(const t of o)t[e]=t._id;r(6,v[e]=o,v)}}},async({detail:{className:e,itemName:n,value:r}})=>{if(S.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===u))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&S.set(e,o[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(r(1,C=n[0]._id),r(25,E=C),a("setRefValue",E),r(6,v=n[0])),P()},P,L,({detail:e})=>{r(6,v[e.itemName]=e.value,v)},({detail:e})=>{for(const t of e.items)r(6,v[e.listName][t.name]=t.value,v)},E,m,p,w,f,function(e){b=e,r(10,b)}]}class hi extends be{constructor(e){var t;super(),qr.getElementById("svelte-16mo2c-style")||((t=O("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",T(qr.head,t)),Se(this,e,ui,di,A,{required:26,disabled:0,readonly:27,id:28,item:3,value:1,refValue:25,currency:2},[-1,-1])}}function fi(e){let t,n,r,i=e[11]&&function(e){let t,n;return{c(){t=O("span"),n=k(e[4]),V(t,"class","item")},m(e,r){N(e,t,r),T(t,n)},p(e,t){16&t[0]&&U(n,e[4])},d(e){e&&R(t)}}}(e),o=e[14]&&function(e){let t,n,r,i,o;return n=new Me({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title","Übernehmen"),V(t,"class","pointer feather svelte-1fuww0c")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[17]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}(e);return{c(){i&&i.c(),t=x(),o&&o.c(),n=B()},m(e,s){i&&i.m(e,s),N(e,t,s),o&&o.m(e,s),N(e,n,s),r=!0},p(e,t){e[11]&&i.p(e,t),e[14]&&o.p(e,t)},i(e){r||(pe(o),r=!0)},o(e){we(o),r=!1},d(e){i&&i.d(e),e&&R(t),o&&o.d(e),e&&R(n)}}}function mi(e){let t,n,r;return n=new e[9]({props:{withItem:!0,itemLeft:!0,lang:e[10].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[8],step:e[12],pattern:e[6],placeholder:e[13],readonly:e[7],disabled:e[3],required:e[5],$$slots:{default:[fi]},$$scope:{ctx:e}}}),n.$on("change",e[15]),n.$on("focus",e[16]),{c(){t=O("div"),Ie(n.$$.fragment),z(t,"position","relative"),z(t,"max-width","10em")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};6&t[0]&&(r.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(r.id=e[0]),1&t[0]&&(r.name=e[0]),256&t[0]&&(r.value=e[8]),64&t[0]&&(r.pattern=e[6]),128&t[0]&&(r.readonly=e[7]),8&t[0]&&(r.disabled=e[3]),32&t[0]&&(r.required=e[5]),16&t[0]|8&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function gi(e,t,r){let i;const o=Z(),{TextField:s}=c;let{id:a}=t,{item:l}=t,{value:d}=t,{noForm:u=!1}=t,{classId:h}=t,{disabled:f}=t,{formnovalidate:m}=t,{currency:g}=t,{praefix:p}=t,{notifyList:w}=t;const y=JSON.parse(n.getItem("Locale")),C=["price","amount","amountValue","taxValue","total","__total"].find((e=>e===l.name?.split("-")[0]))||l.properties?.currency,E=Number("1.1").toLocaleString(y.id).substring(1,2),{properties:_={}}=l;let{min:v,max:I,step:A,pattern:$,decimals:S=0,unit:b="",placeholder:T,hint:N,readonly:R,negative:D,required:O=!1,transfer:M}=_;R=!0===R||void 0;$||($=S?`[0-9]+([${E}][0-9]{1,${S}})?`:"[0-9]*"),D&&($="-?"+$);return e.$$set=e=>{"id"in e&&r(0,a=e.id),"item"in e&&r(18,l=e.item),"value"in e&&r(19,d=e.value),"noForm"in e&&r(1,u=e.noForm),"classId"in e&&r(2,h=e.classId),"disabled"in e&&r(3,f=e.disabled),"formnovalidate"in e&&r(20,m=e.formnovalidate),"currency"in e&&r(4,g=e.currency),"praefix"in e&&r(21,p=e.praefix),"notifyList"in e&&r(22,w=e.notifyList)},e.$$.update=()=>{1048608&e.$$.dirty[0]&&r(5,O=O&&!m),524288&e.$$.dirty[0]&&r(8,i=Number(d.toString().replace(E,".")).toFixed(S).toString().replace(".",E)),4194304&e.$$.dirty[0]&&(async()=>{const e=l.properties?.value?.formula;if(e)void 0!==p&&""!==p?e?.operator?.multiply&&o("formula",{item:l}):e?.operator&&o("formula",{item:l})})()},[a,u,h,f,g,O,$,R,i,s,y,C,A,T,M,({detail:e})=>o("blur",{value:e.value}),({detail:e})=>{R||Number(d.toString().replace(E,"."))||r(8,i="")},({detail:e})=>{const t=[].concat(M.target);for(const e of t)o("record",{itemName:e,value:d}),o("listRecord",{itemName:e,decimals:l.properties?.decimals,value:d})},l,d,m,p,w]}class pi extends be{constructor(e){var t;super(),document.getElementById("svelte-1fuww0c-style")||((t=O("style")).id="svelte-1fuww0c-style",t.textContent=".feather.svelte-1fuww0c{position:absolute;top:0.75em;right:-1em;color:#4300b0}",T(document.head,t)),Se(this,e,gi,mi,A,{id:0,item:18,value:19,noForm:1,classId:2,disabled:3,formnovalidate:20,currency:4,praefix:21,notifyList:22},[-1,-1])}}const{document:wi}=Ee;function yi(e){e[34]=e[36].list,e[35]=e[36].items}function Ci(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function Ei(e,t,n){const r=e.slice();return r[40]=t[n],r[42]=n,r}function _i(e,t,n){const r=e.slice();return r[40]=t[n],r}function vi(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Ii(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y,C;yi(e),n=new e[9]({props:{outline:!0,$$slots:{default:[Ai]},$$scope:{ctx:e}}}),n.$on("click",e[31]);let E=!e[2]&&$i(e);function _(t){e[32](t)}let v={id:e[12]};void 0!==e[3]&&(v.value=e[3]),a=new e[7]({props:v}),J.push((()=>ve(a,"value",_))),a.$on("input",e[15]),u=new Ke({props:{size:"18"}});let I=e[35]?.length&&function(e){let t,n,r,i,o=!e[2]&&bi(e),s=e[35],a=[];for(let t=0;t<s.length;t+=1)a[t]=Ti(_i(e,s,t));return{c(){t=O("thead"),n=O("tr"),o&&o.c(),r=x();for(let e=0;e<a.length;e+=1)a[e].c();V(n,"class","svelte-1m010ne"),V(t,"class","svelte-1m010ne")},m(e,s){N(e,t,s),T(t,n),o&&o.m(n,null),T(n,r);for(let e=0;e<a.length;e+=1)a[e].m(n,null);i=!0},p(e,t){if(e[2]?o&&(me(),we(o,1,1,(()=>{o=null})),ge()):o?(o.p(e,t),4&t[0]&&pe(o,1)):(o=bi(e),o.c(),pe(o,1),o.m(n,r)),16384&t[0]){let r;for(s=e[35],r=0;r<s.length;r+=1){const i=_i(e,s,r);a[r]?a[r].p(i,t):(a[r]=Ti(i),a[r].c(),a[r].m(n,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=s.length}},i(e){i||(pe(o),i=!0)},o(e){we(o),i=!1},d(e){e&&R(t),o&&o.d(),D(a,e)}}}(e),A=e[34]?.length&&function(e){let t,n,r=e[34],i=[];for(let t=0;t<r.length;t+=1)i[t]=Mi(Ci(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(1138717&n[0]){let s;for(r=e[34],s=0;s<r.length;s+=1){const o=Ci(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=Mi(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),E&&E.c(),i=x(),o=O("div"),s=k("Suchen: "),Ie(a.$$.fragment),c=x(),d=O("span"),Ie(u.$$.fragment),h=x(),f=O("div"),m=O("table"),I&&I.c(),g=x(),p=O("tbody"),A&&A.c(),V(t,"class","form--buttons svelte-1m010ne"),V(d,"class","feather pointer svelte-1m010ne"),z(o,"margin-bottom","1em"),z(o,"position","relative"),V(m,"striped",""),V(m,"class","svelte-1m010ne"),V(f,"class","eList svelte-1m010ne")},m(l,_){N(l,t,_),Ae(n,t,null),T(t,r),E&&E.m(t,null),N(l,i,_),N(l,o,_),T(o,s),Ae(a,o,null),T(o,c),T(o,d),Ae(u,d,null),N(l,h,_),N(l,f,_),T(f,m),I&&I.m(m,null),T(m,g),T(m,p),A&&A.m(p,null),w=!0,y||(C=P(d,"click",e[17]),y=!0)},p(e,r){yi(e);const i={};16384&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[2]?E&&(me(),we(E,1,1,(()=>{E=null})),ge()):E?(E.p(e,r),4&r[0]&&pe(E,1)):(E=$i(e),E.c(),pe(E,1),E.m(t,null));const o={};!l&&8&r[0]&&(l=!0,o.value=e[3],ae((()=>l=!1))),a.$set(o),e[35]?.length&&I.p(e,r),e[34]?.length&&A.p(e,r)},i(e){w||(pe(n.$$.fragment,e),pe(E),pe(a.$$.fragment,e),pe(u.$$.fragment,e),pe(I),pe(A),w=!0)},o(e){we(n.$$.fragment,e),we(E),we(a.$$.fragment,e),we(u.$$.fragment,e),we(I),we(A),w=!1},d(e){e&&R(t),$e(n),E&&E.d(),e&&R(i),e&&R(o),$e(a),$e(u),e&&R(h),e&&R(f),I&&I.d(),A&&A.d(),y=!1,C()}}}function Ai(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function $i(e){let t,n;return t=new e[9]({props:{disabled:!e[34].length,filled:!0,$$slots:{default:[Si]},$$scope:{ctx:e}}}),t.$on("click",e[18](e[34])),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Si(e){let t;return{c(){t=k("Bestätigen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function bi(e){let t,n,r,i,o;return n=new He({props:{size:"20"}}),{c(){t=O("th"),Ie(n.$$.fragment),V(t,"class","svelte-1m010ne")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[19](e[34])),i=!0)},p(t,n){e=t},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Ti(e){let t,n,r=e[40]+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-1m010ne")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function Ni(e){let t,n,r,i,o,s,a,l=e[0],c=Di(e),d=e[35],u=[];for(let t=0;t<d.length;t+=1)u[t]=Oi(Ei(e,d,t));return{c(){t=O("tr"),c.c(),n=x();for(let e=0;e<u.length;e+=1)u[e].c();r=x(),V(t,"style",i=e[2]?"cursor: default;":"cursor: zoom-in;"),V(t,"title","übernimmt den Wert direkt"),V(t,"class","svelte-1m010ne"),W(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},m(i,l){N(i,t,l),c.m(t,null),T(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);T(t,r),o=!0,s||(a=P(t,"click",e[20](e[37])),s=!0)},p(s,a){if(e=s,1&a[0]&&A(l,l=e[0])?(me(),we(c,1,1,C),ge(),c=Di(e),c.c(),pe(c),c.m(t,n)):c.p(e,a),16400&a[0]){let n;for(d=e[35],n=0;n<d.length;n+=1){const i=Ei(e,d,n);u[n]?u[n].p(i,a):(u[n]=Oi(i),u[n].c(),u[n].m(t,r))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!o||4&a[0]&&i!==(i=e[2]?"cursor: default;":"cursor: zoom-in;"))&&V(t,"style",i),16385&a[0]&&W(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},i(e){o||(pe(c),o=!0)},o(e){we(c),o=!1},d(e){e&&R(t),c.d(e),D(u,e),s=!1,a()}}}function Ri(e){let t,n,r;return n=new e[11]({props:{name:e[13],data:e[39],checked:e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]),round:!0}}),{c(){t=O("td"),Ie(n.$$.fragment),V(t,"title","Wählt den Wert aus"),V(t,"class","svelte-1m010ne")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1&t[0]&&(r.checked=e[0].includes(Array.isArray(e[37])?e[37][0]:e[37])),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Di(e){let t,n,r=!e[2]&&Ri(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[2]?r&&(me(),we(r,1,1,(()=>{r=null})),ge()):r?(r.p(e,n),4&n[0]&&pe(r,1)):(r=Ri(e),r.c(),pe(r,1),r.m(t.parentNode,t))},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Oi(e){let t,n,r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"";return{c(){t=O("td"),n=k(r),V(t,"class","svelte-1m010ne")},m(e,r){N(e,t,r),T(t,n)},p(e,t){16&t[0]&&r!==(r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"")&&U(n,r)},d(e){e&&R(t)}}}function Mi(e){let t,n,r=e[16](e[37],e[3]),i=r&&Ni(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){8&n[0]&&(r=e[16](e[37],e[3])),r?i?(i.p(e,n),8&n[0]&&pe(i,1)):(i=Ni(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function ki(e){let t,n;return t=new e[6]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xi(e){let t,n,r,i;t=new e[10]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:ki,then:Ii,catch:vi,value:36,blocks:[,,,]};return ye(e[14](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function Bi(e){let t,n;return t=new e[8]({props:{title:e[1]||"Auswahl",class:"eList",$$slots:{default:[xi]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]&&(r.title=e[1]||"Auswahl"),29&n[0]|16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Pi(e,n,r){const i=Z(),{Loading:o,TextField:s,Dialog:a,Button:l,Divider:d,Checkbox:u}=c;let{classId:h}=n,{id:f}=n,{designation:m}=n,{selection:g}=n,{refDoc:p}=n,{tableName:w}=n,{idName:y}=n,{target:C}=n,{view:E}=n,{unique:_}=n,{uniqueView:v}=n,{status:I}=n,{single:A}=n;g||=[];let $="",S=h+Math.floor(9e3*Math.random()+1e3).toString()+"search",b=[];const T=w+y+C+"checkbox",N=(e,t)=>e>t?1:t>e?-1:0;q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(S)?.focus()}),200)}));return e.$$set=e=>{"classId"in e&&r(22,h=e.classId),"id"in e&&r(23,f=e.id),"designation"in e&&r(1,m=e.designation),"selection"in e&&r(0,g=e.selection),"refDoc"in e&&r(24,p=e.refDoc),"tableName"in e&&r(25,w=e.tableName),"idName"in e&&r(26,y=e.idName),"target"in e&&r(21,C=e.target),"view"in e&&r(27,E=e.view),"unique"in e&&r(28,_=e.unique),"uniqueView"in e&&r(29,v=e.uniqueView),"status"in e&&r(30,I=e.status),"single"in e&&r(2,A=e.single)},[g,m,A,$,b,i,o,s,a,l,d,u,S,T,async()=>{let e=[],n=[],i={};if(r(4,b=[]),y)if(E){if(f){const n=h.split("-")[1].slice(0,-4),r="input."+h+"[name='_id']",o=document.querySelector(r).value;i={[y]:f},I&&(i.$or=[{status:!0},{[n]:o}]),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const r=e=>(e[n]||"z").toString()+e[C];return N(r(e),r(t))}))}}else v?f&&(i={[y]:f,status:!0},Object.entries(v).map((([e,t])=>{t?.length&&(i[e]={$in:t}),n.push(e)})),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const n=e=>(g.includes(e[C])?"0-":"1-")+e[C];return N(n(e),n(t))})),r(4,b=e.map((e=>{const t=[e[C]];return n.map((n=>t.push(e[n]))),t})))):_?(e=await t.getSection(w,y,f,_),e=e.sort(((e,t)=>N(e,t)))):(e=await t.getSection(w,y,f,!1,I),e=e.sort(((e,t)=>{const n=e=>(g.includes(e[C])?"0-":"1-")+e[C];return N(n(e),n(t))})));else i={},f&&!Array.isArray(f)&&(i._id=f),e=await t.getSectionView(w,i);const o=await t.getSchemaByClass(w),s=[];if(p){const t=o.items[0].name,n=o.items[1].name,i=o.list[0].name,s=e.find((e=>e[t]===p));e=s?s[i]:[],r(21,C=n)}let a;return e.map((e=>{let t=e[C];if(t||w!==C||(r(21,C=o.items[0].name),t=e[C]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),s.push(t||[])}else p&&(t=o.list[0].item.map((t=>e[t.name]||""))),s.push(t||[])})),a=p?o.list[0].item.map((e=>e.designation)):[o.items.find((e=>e.name===C))?.designation],n=n.map((e=>o.items.find((t=>t.name===e))?.designation)),{list:p?s:s.flat(),items:[...a,...n]}},({detail:{value:e}})=>{r(3,$=e)},(e,t)=>{if(!t)return!0;return!!(Array.isArray(e)?e.join(" "):e).toLowerCase().includes(t.toLowerCase())},()=>{r(3,$="")},e=>()=>{const t=document.getElementsByName(T),n=[];t.forEach(((t,r)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(T).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{if("TD"===t.target?.nodeName){const t=Array.isArray(e)?e[0]:e;A?i("choose",{list:[].concat(t)}):(r(0,g=g.includes(t)?g.filter((e=>e!==t)):g.concat(t)),i("choose",{list:g}))}},C,h,f,p,w,y,E,_,v,I,()=>i("back"),function(e){$=e,r(3,$)}]}class Li extends be{constructor(e){var t;super(),wi.getElementById("svelte-1m010ne-style")||((t=O("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",T(wi.head,t)),Se(this,e,Pi,Bi,A,{classId:22,id:23,designation:1,selection:0,refDoc:24,tableName:25,idName:26,target:21,view:27,unique:28,uniqueView:29,status:30,single:2},[-1,-1])}}const{document:Fi}=Ee;function Vi(e){let t,n,r,i,o,s=e[7].length+"";return{c(){t=O("span"),n=k("("),r=k(s),i=k(")"),V(t,"class",o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&U(r,s),2&n[0]&&o!==(o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&V(t,"class",o)},d(e){e&&R(t)}}}function Ui(e){let t;return{c(){t=O("div"),V(t,"class","load-more-options"),V(t,"slot","load-more-options-message")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Hi(e){let t,n,r,i;const o=[Gi,Wi,zi],s=[];function a(e,t){return!e[16].single&&e[7]?.length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=B()},m(e,n){~t&&s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(me(),we(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){~t&&s[t].d(e),e&&R(r)}}}function zi(e){let t,n,r,i,o;return n=new Me({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title","Übernehmen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[26]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Wi(e){let t,n,r,i,o;return n=new Ge({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title",e[17].title||"Generieren"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[25]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Gi(e){let t,n,r,i,o;return n=new Ke({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title","Löschen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[27]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function ji(e){let t,n,r;function i(t){e[37](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Xi]},$$scope:{ctx:e}};return void 0!==e[10]&&(o.open=e[10]),t=new e[11]({props:o}),J.push((()=>ve(t,"open",i))),{c(){Ie(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};53&r[0]|32768&r[1]&&(i.$$scope={dirty:r,ctx:e}),!n&&1024&r[0]&&(n=!0,i.open=e[10],ae((()=>n=!1))),t.$set(i)},i(e){r||(pe(t.$$.fragment,e),r=!0)},o(e){we(t.$$.fragment,e),r=!1},d(e){$e(t,e)}}}function Xi(e){let t,n;return t=new Li({props:{classId:e[2],selection:e[0],refDoc:e[19],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[21]||e[20]],tableName:e[20],idName:e[21],designation:e[4].designation,target:e[4].name,single:e[16].single}}),t.$on("choose",e[24]),t.$on("back",e[23]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),1&n[0]&&(r.selection=e[0]),16&n[0]&&(r.unique=e[16].unique&&e[4].name),32&n[0]&&(r.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(r.id=e[5][e[21]||e[20]]),16&n[0]&&(r.designation=e[4].designation),16&n[0]&&(r.target=e[4].name),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function qi(e){let t,n,r,i,o,s,a,l,c,d=!e[16].single&&e[7]?.length&&Vi(e);function u(t){e[35](t)}function h(t){e[36](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:Yi,minSearchLength:"3",$$slots:{"load-more-options-message":[Ui]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),r=new e[12]({props:f}),J.push((()=>ve(r,"selection",u))),J.push((()=>ve(r,"maxOptions",h))),r.$on("change",e[22]);let m=!e[1]&&Hi(e),g=e[10]&&ji(e);return{c(){t=O("div"),d&&d.c(),n=x(),Ie(r.$$.fragment),s=x(),m&&m.c(),a=x(),g&&g.c(),l=B(),z(t,"position","relative")},m(e,i){N(e,t,i),d&&d.m(t,null),T(t,n),Ae(r,t,null),T(t,s),m&&m.m(t,null),N(e,a,i),g&&g.m(e,i),N(e,l,i),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Vi(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const a={};8&s[0]&&(a.id=e[3]),8&s[0]&&(a.name=e[3]),8&s[0]&&(a.class=e[3]),2&s[0]&&(a.disabled=e[1]),64&s[0]&&(a.required=e[6]),256&s[0]&&(a.placeholder=e[8]),32768&s[1]&&(a.$$scope={dirty:s,ctx:e}),!i&&128&s[0]&&(i=!0,a.selection=e[7],ae((()=>i=!1))),!o&&512&s[0]&&(o=!0,a.maxOptions=e[9],ae((()=>o=!1))),r.$set(a),e[1]?m&&(me(),we(m,1,1,(()=>{m=null})),ge()):m?(m.p(e,s),2&s[0]&&pe(m,1)):(m=Hi(e),m.c(),pe(m,1),m.m(t,null)),e[10]?g?(g.p(e,s),1024&s[0]&&pe(g,1)):(g=ji(e),g.c(),pe(g,1),g.m(l.parentNode,l)):g&&(me(),we(g,1,1,(()=>{g=null})),ge())},i(e){c||(pe(r.$$.fragment,e),pe(m),pe(g),c=!0)},o(e){we(r.$$.fragment,e),we(m),we(g),c=!1},d(e){e&&R(t),d&&d.d(),$e(r),m&&m.d(),e&&R(a),g&&g.d(e),e&&R(l)}}}async function*Yi(e){yield[{name:e}]}function Zi(e,n,r){const i=Z(),{Modal:o,Autocomplete:s}=c;let{classId:a}=n,{id:l}=n,{item:d}=n,{record:u}=n,{value:h}=n,{noForm:f=!1}=n,{disabled:m}=n,{formnovalidate:g}=n,{numberInput:p}=n,{praefix:w}=n,{toDelete:y}=n,{reqQuantity:C}=n,{notifyList:E}=n;const{properties:_={}}=d;let{placeholder:v,hint:I,readonly:A,required:$=!1,lookup:S="",view:b=!1,multi:T,max:N=1e3,generate:R=!1,status:D=!0,refDoc:O}=_;const[M,k]=S.split(":");let x=!1,B=h.map&&h.map((e=>({name:e})))||[];m||=A,m&&(v="");const P=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),r(7,B=t.map((e=>({name:e.trim()}))));const n=B.map((e=>e.name));i("blur",{value:n}),i("multi",{view:T.view,lookup:S,name:d.name,value:n})};q((async()=>{i("multi",{view:T.view,lookup:S,name:d.name,value:h});const e=document.getElementById(l);e.classList.add(a),!A&&S&&e.addEventListener("focus",L)}));const L=()=>{if(S){document.getElementById(l).blur();const e=C||N;(T.unique||B.length<e)&&r(10,x=!0)}},F=()=>{r(10,x&&=!1)},V=({detail:e})=>{const t=e.list.map((e=>Array.isArray(e)?e[0]:e));r(7,B=t.map((e=>({name:e})))),i("blur",{value:t}),i("multi",{view:T.view,lookup:S,name:d.name,value:t}),F()},U=async()=>{const e={[k]:u[k]},n=await t.getSectionView(M,e),r=Array.from({length:n.length},((e,t)=>n[t][d.name]));V({detail:{name:d.name,list:r}})},H=(e=!1)=>{if(m||!T.required)return;const t=T.maxItem;if(!t||T.unique)return;r(9,N=!1!==e?e:C||u[t]||0);const n=B?.length!=N,o=document.getElementById(l);o?.classList?.toggle("invalid",n),i("invalid",{idx:w,value:n})};return e.$$set=e=>{"classId"in e&&r(2,a=e.classId),"id"in e&&r(3,l=e.id),"item"in e&&r(4,d=e.item),"record"in e&&r(5,u=e.record),"value"in e&&r(0,h=e.value),"noForm"in e&&r(28,f=e.noForm),"disabled"in e&&r(1,m=e.disabled),"formnovalidate"in e&&r(29,g=e.formnovalidate),"numberInput"in e&&r(30,p=e.numberInput),"praefix"in e&&r(31,w=e.praefix),"toDelete"in e&&r(32,y=e.toDelete),"reqQuantity"in e&&r(33,C=e.reqQuantity),"notifyList"in e&&r(34,E=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&r(7,B=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&r(7,B=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&y&&y===d.name&&r(7,B=[]),128&e.$$.dirty[0]&&B&&(r(0,h=B.map&&B.map((e=>e.name))||[]),H()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:r}=e;void 0!==w&&w!==r||t&&t.name===T.maxItem&&H(n)})(p),536870976&e.$$.dirty[0]&&r(6,$=$&&!g),8&e.$$.dirty[1]&&(async e=>{if(void 0===w)return;const{itemName:n,value:o}=e||{};if(!o)return;if(!d.refItem)return;if(d.refItem?.split(".")[0]!==n)return;let[s,a]=d.refItem.split(".");if(Array.isArray(o)){if(s=s.slice(0,-1),!o.length)return i("record",{itemName:"quantity",value:0}),void r(7,B=[]);const e={_id:{$in:o}},n=await t.getSectionView(s,e);let l=[];for(const e of n)e[a]&&(l=l.concat(e[a][0][d.name]));if(!l.length)return;i("record",{itemName:"quantity",value:l.length}),r(7,B=l.map((e=>({name:e})))),P({detail:{value:B}})}else{const e=await t.getTask(s,o);if(!e||!e[a])return;const n=e[a];if(!Array.isArray(n)&&!n.length)return;const l=n[w][d.name];i("record",{itemName:"quantity",value:l?.length||0}),r(7,B=l&&l.map((e=>({name:e}))))}setTimeout(H,250)})(E)},[h,m,a,l,d,u,$,B,v,N,x,o,s,A,S,b,T,R,D,O,M,k,P,F,V,()=>{const e=u[R.itemQuantity]||C;if(!e)return;const t=R.prefix||"",n=u[R.variable]||"",r=R.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(r,"0")));V({detail:{name:d.name,list:i}})},async()=>{if(!0===b)return U();const e=C||u[T.maxItem];if(!e)return;let n={};k&&(n={[k]:u[k]}),D&&(n.status=!0);const r=[].concat(u[T.view]||[]);r.length&&(n[T.view]={$in:r});const i=await t.getSectionView(M,n),o=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));V({detail:{name:d.name,list:o}})},()=>{V({detail:{name:d.name,list:[]}})},f,g,p,w,y,C,E,function(e){B=e,r(7,B),r(5,u),r(4,d),r(32,y)},function(e){N=e,r(9,N)},function(e){x=e,r(10,x)}]}class Ki extends be{constructor(e){var t;super(),Fi.getElementById("svelte-1rbaejz-style")||((t=O("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",T(Fi.head,t)),Se(this,e,Zi,qi,A,{classId:2,id:3,item:4,record:5,value:0,noForm:28,disabled:1,formnovalidate:29,numberInput:30,praefix:31,toDelete:32,reqQuantity:33,notifyList:34},[-1,-1])}}function Qi(e){let t,n,r;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Ji(e){let t,n,r,i,o;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[9]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function eo(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const a=[Ji,Qi],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}const to=e("getMapLink",(async e=>{const{street:n,houseNo:r,postcode:i,location:o,country:s}=e,a=[n&&r?n+" "+r:n,i&&o?i+" "+o:i||o||"",s&&(await t.getTask("country",s)).designation].filter((e=>!!e)).join(", ");return"https://bing.com/maps/default.aspx?where1="+encodeURIComponent(a)}));function no(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{record:f}=t,{item:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"record"in e&&n(10,f=e.record),"item"in e&&n(11,m=e.item)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;const e=u.includes(".")?f[u.split(".")[0]]:f,t=await to(e);window.open(t,"_blank")},f,m,function(t){K(e,t)}]}class ro extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,no,eo,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}const{document:io}=Ee;function oo(e){let t;return{c(){t=O("div"),V(t,"class","load-more-options"),V(t,"slot","load-more-options-message")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function so(e){let t,n,r;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-wpjws5")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function ao(e){let t,n,r,i,o;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-wpjws5")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[8]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function lo(e){let t,n,r,i,o,s,a;function l(t){e[17](t)}function c(t){e[18](t)}function d(t){e[19](t)}let u={id:e[1],name:e[1],class:e[1],minSearchLength:"1",maxOptions:"1",getOptions:e[7],$$slots:{"load-more-options-message":[oo]},$$scope:{ctx:e}};void 0!==e[0]&&(u.value=e[0]),void 0!==e[2]&&(u.selection=e[2]),void 0!==e[3]&&(u.searchQuery=e[3]),n=new e[4]({props:u}),J.push((()=>ve(n,"value",l))),J.push((()=>ve(n,"selection",c))),J.push((()=>ve(n,"searchQuery",d))),n.$on("change",e[6]);let h=e[5]&&function(e){let t,n,r,i;const o=[ao,so],s=[];function a(e,t){return e[0]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=B()},m(e,n){s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(me(),we(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r))},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){s[t].d(e),e&&R(r)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),s=x(),h&&h.c(),z(t,"position","relative"),V(t,"class","inputAutoComplete")},m(e,r){N(e,t,r),Ae(n,t,null),T(t,s),h&&h.m(t,null),a=!0},p(e,t){const s={};2&t[0]&&(s.id=e[1]),2&t[0]&&(s.name=e[1]),2&t[0]&&(s.class=e[1]),8&t[1]&&(s.$$scope={dirty:t,ctx:e}),!r&&1&t[0]&&(r=!0,s.value=e[0],ae((()=>r=!1))),!i&&4&t[0]&&(i=!0,s.selection=e[2],ae((()=>i=!1))),!o&&8&t[0]&&(o=!0,s.searchQuery=e[3],ae((()=>o=!1))),n.$set(s),e[5]&&h.p(e,t)},i(e){a||(pe(n.$$.fragment,e),pe(h),a=!0)},o(e){we(n.$$.fragment,e),we(h),a=!1},d(e){e&&R(t),$e(n),h&&h.d()}}}function co(e,t,n){const{Autocomplete:r}=c,i=Z();let{classId:o}=t,{id:s}=t,{item:a}=t,{name:l}=t,{listName:d}=t,{record:u}=t,{value:h}=t,{noForm:f=!1}=t,{disabled:m}=t,{formnovalidate:g}=t;const{autocomplete:{input:p,min:w,url:y,output:C},format:E}=a.properties,_=[].concat(p),{name:v}=C,I="map"===E;let A,$=h,S=!1;q((()=>{window.setTimeout((()=>{const e=document.querySelector("."+a.name+" .autocomplete input");e&&(e.addEventListener("focus",T),e.addEventListener("keydown",b));const t=document.getElementById(s);console.log("elem2",t),t&&t.classList.add(o)}),200)}));const b=e=>{S=8===e.keyCode||32===e.keyCode},T=async()=>{},N=async(e="")=>{const t=await fetch(y+"?"+R()+"&name=%5E"+e.trim());if(!t.ok)return;let n;try{n=await t.json()}catch{const e=await t.text();n=JSON.parse(e||[])}return n.map((e=>({name:e[v]})))},R=()=>_.map((({name:e,refItem:t})=>`${t}=${(d?u[d][e]:u[e]).split(" ")[0]}`)).join("&"),D=e=>{i("blur",{value:e})};return e.$$set=e=>{"classId"in e&&n(9,o=e.classId),"id"in e&&n(1,s=e.id),"item"in e&&n(10,a=e.item),"name"in e&&n(11,l=e.name),"listName"in e&&n(12,d=e.listName),"record"in e&&n(13,u=e.record),"value"in e&&n(0,h=e.value),"noForm"in e&&n(14,f=e.noForm),"disabled"in e&&n(15,m=e.disabled),"formnovalidate"in e&&n(16,g=e.formnovalidate)},[h,s,A,$,r,I,({detail:{value:e}})=>{},async function*(e){if(S||e.startsWith(h))return n(0,h=e),D(h),console.log("getOptions0",S,h,e,u),void(yield[]);console.log("getOptions",h,e);const t=await N(e);if(!t?.length)return n(0,h=e),D(h),console.log("getOptions2",h),void(yield[]);1===t.length?(n(3,$=n(0,h=t[0].name)),n(2,A=[]),D(h),console.log("getOptions3",h)):yield t},async()=>{if(!h)return;const e=l.includes(".")?u[l.split(".")[0]]:u,t=await to(e);window.open(t,"_blank")},o,a,l,d,u,f,m,g,function(e){h=e,n(0,h)},function(e){A=e,n(2,A)},function(e){$=e,n(3,$)}]}class uo extends be{constructor(e){var t;super(),io.getElementById("svelte-wpjws5-style")||((t=O("style")).id="svelte-wpjws5-style",t.textContent=".feather.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:light-gray;margin-left:-2em}.inputAutoComplete .autocomplete .chip,.inputAutoComplete .autocomplete .shown-on-focus{display:none !important}",T(io.head,t)),Se(this,e,co,lo,A,{classId:9,id:1,item:10,name:11,listName:12,record:13,value:0,noForm:14,disabled:15,formnovalidate:16},[-1,-1])}}const{document:ho}=Ee;function fo(e){e[26]=e[28].list,e[27]=e[28].items}function mo(e,t,n){const r=e.slice();return r[29]=t[n],r}function go(e,t,n){const r=e.slice();return r[32]=t[n],r}function po(e,t,n){const r=e.slice();return r[32]=t[n],r}function wo(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function yo(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function C(t){e[23](t)}fo(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Co]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let E={id:e[8]};void 0!==e[1]&&(E.value=e[1]),s=new e[6]({props:E}),J.push((()=>ve(s,"value",C))),s.$on("input",e[12]),d=new Ke({props:{size:"18"}});let _=e[27]?.length&&function(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=Eo(po(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[27],o=0;o<r.length;o+=1){const s=po(e,r,o);i[o]?i[o].p(s,t):(i[o]=Eo(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&R(t),D(i,e)}}}(e),v=e[26]?.length&&function(e){let t,n=e[26],r=[];for(let t=0;t<n.length;t+=1)r[t]=Io(mo(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=B()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);N(e,t,n)},p(e,i){if(11779&i[0]){let o;for(n=e[26],o=0;o<n.length;o+=1){const s=mo(e,n,o);r[o]?r[o].p(s,i):(r[o]=Io(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){D(r,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),i=O("div"),o=k("Suchen: "),Ie(s.$$.fragment),l=x(),c=O("span"),Ie(d.$$.fragment),u=x(),h=O("div"),f=O("table"),_&&_.c(),m=x(),g=O("tbody"),v&&v.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(h,"class","eList svelte-14hcfjl")},m(a,C){N(a,t,C),Ae(n,t,null),N(a,r,C),N(a,i,C),T(i,o),Ae(s,i,null),T(i,l),T(i,c),Ae(d,c,null),N(a,u,C),N(a,h,C),T(h,f),_&&_.m(f,null),T(f,m),T(f,g),v&&v.m(g,null),p=!0,w||(y=P(c,"click",e[14]),w=!0)},p(e,t){fo(e);const r={};64&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],ae((()=>a=!1))),s.$set(i),e[27]?.length&&_.p(e,t),e[26]?.length&&v.p(e,t)},i(e){p||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!0)},o(e){we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),p=!1},d(e){e&&R(t),$e(n),e&&R(r),e&&R(i),$e(s),$e(d),e&&R(u),e&&R(h),_&&_.d(),v&&v.d(),w=!1,y()}}}function Co(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Eo(e){let t,n,r=e[32]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function _o(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=vo(go(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=x(),V(t,"class","pointer svelte-14hcfjl"),W(t,"active",e[29]._id===e[0])},m(e,r){N(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);T(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[27],s=0;s<r.length;s+=1){const a=go(e,r,s);i[s]?i[s].p(a,o):(i[s]=vo(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}2049&o[0]&&W(t,"active",e[29]._id===e[0])},d(e){e&&R(t),D(i,e)}}}function vo(e){let t,n,r,i,o=e[9](e[29],e[32])+"";return{c(){t=O("td"),n=k(o),V(t,"class","svelte-14hcfjl")},m(o,s){N(o,t,s),T(t,n),r||(i=P(t,"click",F(e[10](e[29]))),r=!0)},p(t,n){e=t},d(e){e&&R(t),r=!1,i()}}}function Io(e){let t,n=e[13](e[29],e[27],e[1]),r=n&&_o(e);return{c(){r&&r.c(),t=B()},m(e,n){r&&r.m(e,n),N(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?r?r.p(e,i):(r=_o(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&R(t)}}}function Ao(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function $o(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ao,then:yo,catch:wo,value:28,blocks:[,,,]};return ye(e[11](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function So(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[$o]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|64&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function bo(e,n,i){const o=Z(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{className:f}=n,{classId:g}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:C}=n,{recordId:E}=n,{filter:_}=n,v="",I=g+Math.floor(9e3*Math.random()+1e3).toString()+"search";const A=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},$=t.getSchemaByClass(f);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(I)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await $;e.eventId===t.id&&jd(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,h=e.item),"className"in e&&i(16,f=e.className),"classId"in e&&i(17,g=e.classId),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(18,y=e.viewName),"viewValue"in e&&i(19,C=e.viewValue),"recordId"in e&&i(20,E=e.recordId),"filter"in e&&i(21,_=e.filter)},[w,v,o,s,a,l,d,u,I,A,e=>()=>o("choose",{row:e}),async()=>{const e=await $,n="."+g+"#"+y;document.querySelector(n);let r={[y]:C},i=[];r[y]&&(i=await t.getSectionView(e.class,r,!0)),_&&(i=i.filter((e=>e._id!=_)));const o=e.display;return{list:i,items:await Ut(o,e,i)}},({detail:{value:e}})=>{i(1,v=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(A(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,v="")},h,f,g,y,C,E,_,()=>o("back"),function(e){v=e,i(1,v)}]}class To extends be{constructor(e){var t;super(),ho.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",T(ho.head,t)),Se(this,e,bo,So,A,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function No(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Ro(e){let t,n,r,i,o;function s(t){e[21](t)}let a={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(a.value=e[0]),n=new e[10]({props:a}),J.push((()=>ve(n,"value",s)));let l=!e[6]&&Do(e);return{c(){t=O("div"),Ie(n.$$.fragment),i=x(),l&&l.c(),z(t,"position","relative")},m(e,r){N(e,t,r),Ae(n,t,null),T(t,i),l&&l.m(t,null),o=!0},p(e,i){const o={};4&i&&(o.id=e[2]),8&i&&(o.name=e[3].name),34&i&&(o.inputClass=e[5]||e[1]),64&i&&(o.disabled=e[6]),128&i&&(o.formnovalidate=e[7]),!r&&1&i&&(r=!0,o.value=e[0],ae((()=>r=!1))),n.$set(o),e[6]?l&&(me(),we(l,1,1,(()=>{l=null})),ge()):l?(l.p(e,i),64&i&&pe(l,1)):(l=Do(e),l.c(),pe(l,1),l.m(t,null))},i(e){o||(pe(n.$$.fragment,e),pe(l),o=!0)},o(e){we(n.$$.fragment,e),we(l),o=!1},d(e){e&&R(t),$e(n),l&&l.d()}}}function Do(e){let t,n,r,i,o;return n=new _t({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-wbrqzu")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[17]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Oo(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Mo(e){let t,n,r;function i(t){e[22](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[ko]},$$scope:{ctx:e}};return void 0!==e[8]&&(o.open=e[8]),t=new e[11]({props:o}),J.push((()=>ve(t,"open",i))),{c(){Ie(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};268435994&r&&(i.$$scope={dirty:r,ctx:e}),!n&&256&r&&(n=!0,i.open=e[8],ae((()=>n=!1))),t.$set(i)},i(e){r||(pe(t.$$.fragment,e),r=!0)},o(e){we(t.$$.fragment,e),r=!1},d(e){$e(t,e)}}}function ko(e){let t,n;return t=new To({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(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n&&(r.item=e[3]),8&n&&(r.className=e[3].refClass),2&n&&(r.classId=e[1]),16&n&&(r.recordId=e[4]._id),512&n&&(r.viewValue=e[9]),16&n&&(r.filter=e[4]._id),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xo(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Oo,then:Ro,catch:No,value:27,blocks:[,,,]};ye(e[16](),i);let o=e[8]&&Mo(e);return{c(){i.block.c(),t=x(),o&&o.c(),n=B()},m(e,s){i.block.m(e,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,N(e,t,s),o&&o.m(e,s),N(e,n,s),r=!0},p(t,[r]){Ce(i,e=t,r),e[8]?o?(o.p(e,r),256&r&&pe(o,1)):(o=Mo(e),o.c(),pe(o,1),o.m(n.parentNode,n)):o&&(me(),we(o,1,1,(()=>{o=null})),ge())},i(e){r||(pe(i.block),pe(o),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}we(o),r=!1},d(e){i.block.d(e),i.token=null,i=null,e&&R(t),o&&o.d(e),e&&R(n)}}}function Bo(e,t,n){const{TextField:r,Modal:i}=c;let{classId:o}=t,{id:s}=t,{item:a}=t,{record:l}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:h}=t,{formnovalidate:f}=t,{praefix:m}=t;const{properties:g={}}=a;let p,{pattern:w,placeholder:y,readonly:C,required:E=!1,view:_}=g,v=!1;const I=()=>{n(8,v=!1)};return e.$$set=e=>{"classId"in e&&n(1,o=e.classId),"id"in e&&n(2,s=e.id),"item"in e&&n(3,a=e.item),"record"in e&&n(4,l=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,h=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,m=e.praefix)},[d,o,s,a,l,u,h,f,v,p,r,i,w,C,E,_,async()=>(n(9,p=l[_.selection]),!0),()=>{n(8,v=!0)},({detail:e})=>{n(0,d=e.row[_.value?_.value:"_id"]),I()},I,m,function(e){d=e,n(0,d)},function(e){v=e,n(8,v)}]}class Po extends be{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=O("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",T(document.head,t)),Se(this,e,Bo,xo,A,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Lo(e,t,n){const r=e.slice();return r[12]=t[n][0],r[13]=t[n][1],r}function Fo(e){let t;return{c(){t=O("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Vo(e){let t;return{c(){t=O("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Uo(e){let t,n,r,i,o=e[12]+"";return{c(){t=O("option"),n=k(o),t.__value=r=e[13],t.value=t.__value,t.selected=i=e[0]==e[13]},m(e,r){N(e,t,r),T(t,n)},p(e,s){64&s&&o!==(o=e[12]+"")&&U(n,o),64&s&&r!==(r=e[13])&&(t.__value=r,t.value=t.__value),65&s&&i!==(i=e[0]==e[13])&&(t.selected=i)},d(e){e&&R(t)}}}function Ho(e){let t,n,r,i,o,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Vo:Fo}let r=n(e),i=r(e);return{c(){i.c(),t=B()},m(e,n){i.m(e,n),N(e,t,n)},p(e,o){r!==(r=n(e))&&(i.d(1),i=r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i.d(e),e&&R(t)}}}(e),a=e[6],l=[];for(let t=0;t<a.length;t+=1)l[t]=Uo(Lo(e,a,t));return{c(){t=O("select"),s&&s.c(),n=B();for(let e=0;e<l.length;e+=1)l[e].c();V(t,"class",r=S(e[3]||e[4])+" svelte-5xpzvo"),V(t,"id",e[2]),V(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(r,a){N(r,t,a),s&&s.m(t,null),T(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);i||(o=P(t,"change",e[9]),i=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let r;for(a=e[6],r=0;r<a.length;r+=1){const i=Lo(e,a,r);l[r]?l[r].p(i,n):(l[r]=Uo(i),l[r].c(),l[r].m(t,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}24&n&&r!==(r=S(e[3]||e[4])+" svelte-5xpzvo")&&V(t,"class",r),4&n&&V(t,"id",e[2]),4&n&&V(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:C,o:C,d(e){e&&R(t),s&&s.d(),D(l,e),i=!1,o()}}}function zo(e,t,n){const r=Z();let{id:i}=t,{item:o}=t,{value:s}=t,{noForm:a=!1}=t,{classId:l}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:h,readonly:f}=o.properties;u&&(u=u.map((e=>[e,e]))),"valueAddedTax"===h&&(s||=0,u=[["0% Steuerbefreit",0],["8.1% Normalsatz",.081],["2.6% Reduzierter Satz",.026],["3.8% Beherbergung",.038]]),c||=!!f,c||(c=void 0);return e.$$set=e=>{"id"in e&&n(2,i=e.id),"item"in e&&n(10,o=e.item),"value"in e&&n(0,s=e.value),"noForm"in e&&n(3,a=e.noForm),"classId"in e&&n(4,l=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[s,c,i,a,l,d,u,h,f,e=>r("blur",{value:e.srcElement.value}),o]}class Wo extends be{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=O("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}",T(document.head,t)),Se(this,e,zo,Ho,A,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function Go(e){let t,n,r,i,o,s,a;return i=new e[7]({props:{value:e[0],readonly:e[4],required:e[6],disabled:e[5],closeOnSelection:!0}}),i.$on("change",e[8]),{c(){t=O("input"),r=x(),Ie(i.$$.fragment),V(t,"type","string"),V(t,"class",n=e[2]||e[3]),V(t,"id",e[1]),V(t,"name",e[1]),t.hidden=!0},m(n,l){N(n,t,l),H(t,e[0]),N(n,r,l),Ae(i,n,l),o=!0,s||(a=P(t,"input",e[13]),s=!0)},p(e,[r]){(!o||12&r&&n!==(n=e[2]||e[3]))&&V(t,"class",n),(!o||2&r)&&V(t,"id",e[1]),(!o||2&r)&&V(t,"name",e[1]),1&r&&H(t,e[0]);const s={};1&r&&(s.value=e[0]),16&r&&(s.readonly=e[4]),64&r&&(s.required=e[6]),32&r&&(s.disabled=e[5]),i.$set(s)},i(e){o||(pe(i.$$.fragment,e),o=!0)},o(e){we(i.$$.fragment,e),o=!1},d(e){e&&R(t),e&&R(r),$e(i,e),s=!1,a()}}}function jo(e,n,r){const i=Z(),{DatePicker:o}=c;let{value:s}=n,{id:a}=n,{item:l}=n,{record:d}=n,{noForm:u=!1}=n,{classId:h}=n,{eventId:f}=n,{readonly:m}=n,{disabled:g}=n,{required:p}=n,{notifyList:w}=n;s||(s=void 0);let y=null;const C=e=>{i("change",{value:e})};return e.$$set=e=>{"value"in e&&r(0,s=e.value),"id"in e&&r(1,a=e.id),"item"in e&&r(9,l=e.item),"record"in e&&r(10,d=e.record),"noForm"in e&&r(2,u=e.noForm),"classId"in e&&r(3,h=e.classId),"eventId"in e&&r(11,f=e.eventId),"readonly"in e&&r(4,m=e.readonly),"disabled"in e&&r(5,g=e.disabled),"required"in e&&r(6,p=e.required),"notifyList"in e&&r(12,w=e.notifyList)},e.$$.update=()=>{if(4096&e.$$.dirty&&(async e=>{if(null===y){const e=(await t.getEvent(f)).output.class[0].item;y=e.find((e=>e.properties?.value?.formula))}y&&y.properties.value.formula.argument[0].refItem===l.name&&(e&&e.itemName!==l.name&&e.itemName!==y.properties.value.formula.argument[1].refItem.split(".")[0]||i("formula",{item:y}))})(w),1585&e.$$.dirty&&d&&d[l.name])try{g||m||r(0,s=ir(d[l.name],s))}catch{}},[s,a,u,h,m,g,p,o,({detail:e})=>{r(0,s=ir(e.value,s)),C(s)},l,d,f,w,function(){s=this.value,r(0,s),r(10,d),r(9,l),r(5,g),r(4,m)}]}class Xo extends be{constructor(e){super(),Se(this,e,jo,Go,A,{value:0,id:1,item:9,record:10,noForm:2,classId:3,eventId:11,readonly:4,disabled:5,required:6,notifyList:12})}}function qo(e){let t;return{c(){t=k("Stunden")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Yo(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[qo]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Zo(e){let t;return{c(){t=k("Minuten")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Ko(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Zo]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Qo(e){let t;return{c(){t=k("Jetzt")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Jo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Qo]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function es(e){let t,n,r,i,o,s,a,l,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[Jo],"minutes-label":[Ko],"hours-label":[Yo]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=O("input"),r=x(),Ie(i.$$.fragment),o=x(),Ie(s.$$.fragment),V(t,"type","string"),V(t,"class",n=e[2]||e[3]),V(t,"id",e[1]),V(t,"name",e[1]),t.hidden=!0},m(n,d){N(n,t,d),H(t,e[0]),N(n,r,d),Ae(i,n,d),N(n,o,d),Ae(s,n,d),a=!0,l||(c=P(t,"input",e[9]),l=!0)},p(e,[r]){(!a||12&r&&n!==(n=e[2]||e[3]))&&V(t,"class",n),(!a||2&r)&&V(t,"id",e[1]),(!a||2&r)&&V(t,"name",e[1]),1&r&&H(t,e[0]);const o={};1&r&&(o.value=e[0]),i.$set(o);const l={};1&r&&(l.value=e[0]),4096&r&&(l.$$scope={dirty:r,ctx:e}),s.$set(l)},i(e){a||(pe(i.$$.fragment,e),pe(s.$$.fragment,e),a=!0)},o(e){we(i.$$.fragment,e),we(s.$$.fragment,e),a=!1},d(e){e&&R(t),e&&R(r),$e(i,e),e&&R(o),$e(s,e),l=!1,c()}}}function ts(e,t,n){const r=Z(),{Label:i,DatePicker:o,TimePicker:s}=c;let{value:a}=t,{id:l}=t,{noForm:d=!1}=t,{classId:u}=t;const h=e=>r("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,a=e.value),"id"in e&&n(1,l=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[a,l,d,u,i,o,s,({detail:e})=>{var t,r;n(0,(t=e.value,r=a,a=null==t||null==r?t:(r.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),r))),h(a)},({detail:e})=>{n(0,a=ir(e.value,a)),h(a)},function(){a=this.value,n(0,a)}]}class ns extends be{constructor(e){super(),Se(this,e,ts,es,A,{value:0,id:1,noForm:2,classId:3})}}function rs(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p;return u=new e[9]({props:{format:e[5],required:e[3],disabled:e[4],value:e[7],closeOnSelection:!0}}),u.$on("change",e[10]),f=new e[9]({props:{format:e[6],required:e[3],disabled:e[4],value:e[8],class:"moveLeft",closeOnSelection:!0}}),f.$on("change",e[11]),{c(){t=O("input"),o=x(),s=O("input"),d=x(),Ie(u.$$.fragment),h=k(" /\n"),Ie(f.$$.fragment),V(t,"type","string"),V(t,"class",n=e[1]||e[2]),V(t,"id",r=e[0]+"_from"),V(t,"name",i=e[0]+"_from"),t.hidden=!0,V(s,"type","string"),V(s,"class",a=e[1]||e[2]),V(s,"id",l=e[0]+"_to"),V(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,r){N(n,t,r),H(t,e[7]),N(n,o,r),N(n,s,r),H(s,e[8]),N(n,d,r),Ae(u,n,r),N(n,h,r),Ae(f,n,r),m=!0,g||(p=[P(t,"input",e[13]),P(s,"input",e[14])],g=!0)},p(e,[o]){(!m||6&o&&n!==(n=e[1]||e[2]))&&V(t,"class",n),(!m||1&o&&r!==(r=e[0]+"_from"))&&V(t,"id",r),(!m||1&o&&i!==(i=e[0]+"_from"))&&V(t,"name",i),128&o&&H(t,e[7]),(!m||6&o&&a!==(a=e[1]||e[2]))&&V(s,"class",a),(!m||1&o&&l!==(l=e[0]+"_to"))&&V(s,"id",l),(!m||1&o&&c!==(c=e[0]+"_to"))&&V(s,"name",c),256&o&&H(s,e[8]);const d={};32&o&&(d.format=e[5]),8&o&&(d.required=e[3]),16&o&&(d.disabled=e[4]),128&o&&(d.value=e[7]),u.$set(d);const h={};64&o&&(h.format=e[6]),8&o&&(h.required=e[3]),16&o&&(h.disabled=e[4]),256&o&&(h.value=e[8]),f.$set(h)},i(e){m||(pe(u.$$.fragment,e),pe(f.$$.fragment,e),m=!0)},o(e){we(u.$$.fragment,e),we(f.$$.fragment,e),m=!1},d(e){e&&R(t),e&&R(o),e&&R(s),e&&R(d),$e(u,e),e&&R(h),$e(f,e),g=!1,v(p)}}}function is(e,t,n){const r=Z(),{DatePicker:i}=c;let{value:o}=t,{id:s}=t,{noForm:a=!1}=t,{classId:l}=t,{required:d}=t,{disabled:u}=t,h="%d.%m.%Y",f="%d.%m.%Y",m=o?.from,g=o?.to;"Invalid Date"===m?.toString()&&(m=void 0),"Invalid Date"===g?.toString()&&(g=void 0),u&&(void 0===m&&(h=""),void 0===g&&(f=""));return e.$$set=e=>{"value"in e&&n(12,o=e.value),"id"in e&&n(0,s=e.id),"noForm"in e&&n(1,a=e.noForm),"classId"in e&&n(2,l=e.classId),"required"in e&&n(3,d=e.required),"disabled"in e&&n(4,u=e.disabled)},[s,a,l,d,u,h,f,m,g,i,({detail:e})=>{n(7,m=ir(e.value,m)),g&&m&&g.valueOf()-m.valueOf()<0&&n(7,m=void 0),r("change",{value:m,range:"_from"})},({detail:e})=>{n(8,g=ir(e.value,g)),g&&m&&g.valueOf()-m.valueOf()<0&&n(8,g=void 0),r("change",{value:g,range:"_to"})},o,function(){m=this.value,n(7,m)},function(){g=this.value,n(8,g)}]}class os extends be{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=O("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",T(document.head,t)),Se(this,e,is,rs,A,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function ss(e){let t,n,r;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:as,placeholder:ls,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=O("div"),Ie(n.$$.fragment),z(t,"max-width","4em")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,[t]){const r={};4&t&&(r.inputClass=e[2]),1&t&&(r.id=e[0]),1&t&&(r.name=e[0]),2&t&&(r.value=e[1]),8&t&&(r.readonly=e[3]),16&t&&(r.disabled=e[4]),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}const as="([01][0-9]|2[0-3]):([0-5][0-9])",ls="";function cs(e,t,n){const r=Z(),{TextField:i}=c;let{id:o}=t,{item:s}=t,{value:a}=t,{inputClass:l}=t,{readonly:d}=t,{disabled:u}=t,{praefix:h}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,o=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,a=e.value),"inputClass"in e&&n(2,l=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,h=e.praefix)},[o,a,l,d,u,i,({detail:e})=>{r("blur",{value:f(e.value)}),r("checkRange",{idx:h,fieldId:o,value:e.value})},s,h]}class ds extends be{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=O("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",T(document.head,t)),Se(this,e,cs,ss,A,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:us}=Ee;function hs(e,t,n){const r=e.slice();return r[16]=t[n],r}function fs(e,t,n){const r=e.slice();return r[19]=t[n],r[21]=n,r}function ms(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function gs(e){let t,n,r=e[15],i=[];for(let t=0;t<r.length;t+=1)i[t]=ws(hs(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(15&n){let s;for(r=e[15],s=0;s<r.length;s+=1){const o=hs(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=ws(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}function ps(e){let t,n,r=e[2](e[16],e[19])+"",i=e[21]&&function(){let e;return{c(){e=k(", ")},m(t,n){N(t,e,n)},d(t){t&&R(e)}}}();return{c(){t=O("span"),i&&i.c(),n=k(r),V(t,"class","lookupValue")},m(e,r){N(e,t,r),i&&i.m(t,null),T(t,n)},p(e,t){1&t&&r!==(r=e[2](e[16],e[19])+"")&&U(n,r)},d(e){e&&R(t),i&&i.d()}}}function ws(e){let t,n,r,i,o,s,a,l,c=e[0],d=[];for(let t=0;t<c.length;t+=1)d[t]=ps(fs(e,c,t));return i=new et({props:{size:"18"}}),{c(){t=O("div");for(let e=0;e<d.length;e+=1)d[e].c();n=x(),r=O("span"),Ie(i.$$.fragment),o=x(),V(r,"class","feather pointer svelte-1r8jgd4"),V(t,"class","lookupItem svelte-1r8jgd4")},m(c,u){N(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);T(t,n),T(t,r),Ae(i,r,null),T(t,o),s=!0,a||(l=P(r,"click",e[3](e[16]._id)),a=!0)},p(r,i){if(e=r,7&i){let r;for(c=e[0],r=0;r<c.length;r+=1){const o=fs(e,c,r);d[r]?d[r].p(o,i):(d[r]=ps(o),d[r].c(),d[r].m(t,n))}for(;r<d.length;r+=1)d[r].d(1);d.length=c.length}},i(e){s||(pe(i.$$.fragment,e),s=!0)},o(e){we(i.$$.fragment,e),s=!1},d(e){e&&R(t),D(d,e),$e(i),a=!1,l()}}}function ys(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Cs(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ys,then:gs,catch:ms,value:15,blocks:[,,,]};return ye(e[1](),r),{c(){t=O("div"),r.block.c(),V(t,"class","lookup svelte-1r8jgd4")},m(e,i){N(e,t,i),r.block.m(t,r.anchor=null),r.mount=()=>t,r.anchor=null,n=!0},p(t,[n]){Ce(r,e=t,n)},i(e){n||(pe(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){we(r.blocks[e])}n=!1},d(e){e&&R(t),r.block.d(),r.token=null,r=null}}}function Es(e,n,r){let{id:i}=n,{item:o}=n,{praefix:s}=n,{record:a}=n;const{refItem:l,view:c}=o.properties;let d=c.split(","),[u,h]=l.split(":");const[f,g]=h.split("."),p=()=>{oe().then((()=>{const e=document.querySelector("div.form-field."+o.name);e&&(e.style.display="none")}))};return e.$$set=e=>{"id"in e&&r(4,i=e.id),"item"in e&&r(5,o=e.item),"praefix"in e&&r(6,s=e.praefix),"record"in e&&r(7,a=e.record)},[d,async()=>{let e=[];if(a._id){const n=!d.some((e=>e.includes(":")));g&&(u=g+"."+u);const i={[u]:a[u]||a._id};if(e=await t.getSectionView(f,i,n),!n){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===a._id));return n._id=e._id,n})),r(0,d=d.map((e=>e.split(":")[1])))}}return e.length||p(),e},(e,t)=>"boolean"===o.type?e[t]?"ja":"nein":"object"===o.type?"(ja)":e["_"+t]||m(e[t])||e[t],e=>async()=>{const n=await t.getTaskByDocId(e);if(!n)return;const r=n._id,i=`/task/${n.event}/${r}/task?view=standalone`;window.open(i)},i,o,s,a]}class _s extends be{constructor(e){var t;super(),us.getElementById("svelte-1r8jgd4-style")||((t=O("style")).id="svelte-1r8jgd4-style",t.textContent=".feather.svelte-1r8jgd4{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1r8jgd4{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1r8jgd4{position:relative;margin-left:2em;padding-bottom:0.75em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}div.field:has(div.lookup){margin-bottom:0.25em !important}",T(us.head,t)),Se(this,e,Es,Cs,A,{id:4,item:5,praefix:6,record:7})}}function vs(e){let t,n,r;return n=new rt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Is(e){let t,n,r,i,o;return n=new rt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[9]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function As(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[10]);const a=[Is,vs],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}function $s(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e=h;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){K(e,t)}]}class Ss extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,$s,As,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function bs(e){let t,n,r;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Ts(e){let t,n,r,i,o;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[11]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Ns(e){let t,n,r,i,o,s;n=new e[10]({props:{inputClass:e[2],pattern:e[0],placeholder:e[1],disabled:e[3],formnovalidate:e[4],readonly:e[5],required:e[6],id:e[7],name:e[8],value:e[9]}}),n.$on("change",e[12]);const a=[Ts,bs],l=[];function c(e,t){return e[9]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};4&r&&(s.inputClass=e[2]),1&r&&(s.pattern=e[0]),2&r&&(s.placeholder=e[1]),8&r&&(s.disabled=e[3]),16&r&&(s.formnovalidate=e[4]),32&r&&(s.readonly=e[5]),64&r&&(s.required=e[6]),128&r&&(s.id=e[7]),256&r&&(s.name=e[8]),512&r&&(s.value=e[9]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}function Rs(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{pattern:f}=t,{placeholder:m}=t;f||="(\\+4[1-9]\\s?)([1-9]{2}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})|(\\d{2,4}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})",m||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,i=e.inputClass),"disabled"in e&&n(3,o=e.disabled),"formnovalidate"in e&&n(4,s=e.formnovalidate),"readonly"in e&&n(5,a=e.readonly),"required"in e&&n(6,l=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,h=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,m=e.placeholder)},[f,m,i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e="tel:"+h;window.open(e,"_self")},function(t){K(e,t)}]}class Ds extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,Rs,Ns,A,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function Os(e){let t,n,r;return n=new ct({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Ms(e){let t,n,r,i,o;return n=new ct({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[11]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function ks(e){let t,n,r,i,o,s;n=new e[10]({props:{type:"email",inputClass:e[0],pattern:e[8],placeholder:e[9],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const a=[Ms,Os],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),256&r&&(s.pattern=e[8]),512&r&&(s.placeholder=e[9]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}function xs(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{pattern:f}=t,{placeholder:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"pattern"in e&&n(8,f=e.pattern),"placeholder"in e&&n(9,m=e.placeholder)},[i,o,s,a,l,d,u,h,f,m,r,async()=>{if(!h)return;let e="mailto:"+h;window.open(e,"_self")},function(t){K(e,t)}]}class Bs extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,xs,ks,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const Ps=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"];function Ls(e){let t;return{c(){t=O("textarea"),V(t,"id",e[0]),z(t,"visibility","hidden")},m(n,r){N(n,t,r),e[18](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&R(t),e[18](null)}}}function Fs(e){let t;return{c(){t=O("div"),V(t,"id",e[0])},m(n,r){N(n,t,r),e[17](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&R(t),e[17](null)}}}function Vs(e){let t;function n(e,t){return e[1]?Fs:Ls}let r=n(e),i=r(e);return{c(){t=O("div"),i.c(),V(t,"class",e[2])},m(n,r){N(n,t,r),i.m(t,null),e[19](t)},p(e,[o]){r===(r=n(e))&&i?i.p(e,o):(i.d(1),i=r(e),i&&(i.c(),i.m(t,null))),4&o&&V(t,"class",e[2])},i:C,o:C,d(n){n&&R(t),i.d(),e[19](null)}}}const Us=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let Hs=(()=>{let e={listeners:[],scriptId:Us("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,r)=>{e.scriptLoaded?r():(e.listeners.push(r),e.injected||((t,n,r,i)=>{e.injected=!0;const o=n.createElement("script");o.referrerPolicy="origin",o.type="application/javascript",o.src=r,o.onload=()=>{i()},n.head&&n.head.appendChild(o)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function zs(e,t,n){var r;let i,o,s,{id:a=Us("tinymce-svelte")}=t,{inline:l}=t,{disabled:c=!1}=t,{apiKey:d="no-api-key"}=t,{channel:u="6"}=t,{scriptSrc:h}=t,{conf:f={}}=t,{modelEvents:m="change input undo redo"}=t,{value:g=""}=t,{text:p=""}=t,{cssClass:w="tinymce-wrapper"}=t,y=g,C=c;const E=Z(),_=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},v=()=>{const e=Object.assign(Object.assign({},f),{target:o,inline:void 0!==l?l:void 0!==f.inline&&f.inline,readonly:c,setup:e=>{n(14,s=e),e.on("init",(()=>{e.setContent(g),e.on(m,(()=>{n(15,y=e.getContent()),y!==g&&(n(5,g=y),n(6,p=e.getContent({format:"text"})))}))})),((e,t)=>{Ps.forEach((n=>{e.on(n,(r=>{t(n.toLowerCase(),{eventName:n,event:r,editor:e})}))}))})(e,E),"function"==typeof f.setup&&f.setup(e)}});n(4,o.style.visibility="",o),_().init(e)};return q((()=>{if(null!==_())v();else{const e=h||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;Hs.load(i.ownerDocument,e,(()=>{v()}))}})),Y((()=>{var e;s&&(null===(e=_())||void 0===e||e.remove(s))})),e.$$set=e=>{"id"in e&&n(0,a=e.id),"inline"in e&&n(1,l=e.inline),"disabled"in e&&n(7,c=e.disabled),"apiKey"in e&&n(8,d=e.apiKey),"channel"in e&&n(9,u=e.channel),"scriptSrc"in e&&n(10,h=e.scriptSrc),"conf"in e&&n(11,f=e.conf),"modelEvents"in e&&n(12,m=e.modelEvents),"value"in e&&n(5,g=e.value),"text"in e&&n(6,p=e.text),"cssClass"in e&&n(2,w=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(s&&y!==g&&(s.setContent(g),n(6,p=s.getContent({format:"text"}))),s&&c!==C&&(n(16,C=c),"function"==typeof(null===n(13,r=s.mode)||void 0===r?void 0:r.set)?s.mode.set(c?"readonly":"design"):s.setMode(c?"readonly":"design")))},[a,l,w,i,o,g,p,c,d,u,h,f,m,r,s,y,C,function(e){J[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){J[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){J[e?"unshift":"push"]((()=>{i=e,n(3,i)}))}]}class Ws extends be{constructor(e){super(),Se(this,e,zs,Vs,A,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function Gs(e){let t,n,r,i,o,s,a;function l(t){e[8](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",conf:e[7],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new Ws({props:c}),J.push((()=>ve(n,"value",l))),{c(){t=O("div"),Ie(n.$$.fragment),i=x(),o=O("input"),V(o,"class",s=e[1]||e[2]),V(o,"id",e[3]),V(o,"name",e[3]),o.value=e[0],o.hidden=!0,z(t,"min-height","10em"),z(t,"margin-top","-1em")},m(e,r){N(e,t,r),Ae(n,t,null),T(t,i),T(t,o),a=!0},p(e,t){const i={};16&t&&(i.disabled=e[4]),32&t&&(i.readonly=e[5]),!r&&1&t&&(r=!0,i.value=e[0],ae((()=>r=!1))),n.$set(i),(!a||6&t&&s!==(s=e[1]||e[2]))&&V(o,"class",s),(!a||8&t)&&V(o,"id",e[3]),(!a||8&t)&&V(o,"name",e[3]),(!a||1&t&&o.value!==e[0])&&(o.value=e[0])},i(e){a||(pe(n.$$.fragment,e),a=!0)},o(e){we(n.$$.fragment,e),a=!1},d(e){e&&R(t),$e(n)}}}function js(e){let t,n,r=e[6]&&Gs(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,[n]){e[6]?r?(r.p(e,n),64&n&&pe(r,1)):(r=Gs(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Xs(e,t,r){let i=JSON.parse(n.getItem("Locale")).id;i=i.startsWith("fr")?"fr_FR":i.split("-")[0];let o,{value:s}=t,{noForm:a}=t,{classId:l}=t,{id:c}=t,{disabled:d}=t,{readonly:u}=t;const h={plugins:"advlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:i};return q((()=>setTimeout((()=>{r(6,o=!0)}),100))),e.$$set=e=>{"value"in e&&r(0,s=e.value),"noForm"in e&&r(1,a=e.noForm),"classId"in e&&r(2,l=e.classId),"id"in e&&r(3,c=e.id),"disabled"in e&&r(4,d=e.disabled),"readonly"in e&&r(5,u=e.readonly)},[s,a,l,c,d,u,o,h,function(e){s=e,r(0,s)}]}class qs extends be{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=O("style")).id="svelte-zemw0w-style",t.textContent="div.tox-statusbar__text-container{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",T(document.head,t)),Se(this,e,Xs,js,A,{value:0,noForm:1,classId:2,id:3,disabled:4,readonly:5})}}
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,r,i,o,s,a,l,c,d,u,h;return{setters:[function(e){t=e.Request,n=e.Storage,r=e.task_notification,i=e.currentRoles,o=e.TextArea,s=e.toasts,a=e.settings,l=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){h=e.taskClipboard}],execute:function(){function f(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}e("version","0.2.764");const m=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),g=e=>{try{return new Date(e).toLocaleString()}catch{return e}},p=e=>e?"(ja)":"(nein)",w=(e,t)=>{const n={...t};return(e.display?.reduce(((t,r)=>{let[i,o]=r.split(".");if(e.list?.find((({name:e})=>e===i))&&o&&void 0!==n[i]){const e=`${i}_${o}`;n[e]=n[i][o],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?p(n[e]):m(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&p(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")},y=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function C(){}function E(e){return e()}function _(){return Object.create(null)}function v(e){e.forEach(E)}function I(e){return"function"==typeof e}function A(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function $(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return C;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function S(e){return null==e?"":e}function b(e,t,n=t){return e.set(n),t}function T(e,t){e.appendChild(t)}function N(e,t,n){e.insertBefore(t,n||null)}function R(e){e.parentNode.removeChild(e)}function D(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function O(e){return document.createElement(e)}function M(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function x(){return k(" ")}function B(){return k("")}function P(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function L(e){return function(t){return t.preventDefault(),e.call(this,t)}}function F(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function V(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function U(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function H(e,t){e.value=null==t?"":t}function z(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function W(e,t,n){e.classList[n?"add":"remove"](t)}let G;function j(e){G=e}function X(){if(!G)throw new Error("Function called outside component initialization");return G}function q(e){X().$$.on_mount.push(e)}function Y(e){X().$$.on_destroy.push(e)}function Z(){const e=X();return(t,n)=>{const r=e.$$.callbacks[t];if(r){const i=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);r.slice().forEach((t=>{t.call(e,i)}))}}}function K(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Q=[],J=[],ee=[],te=[],ne=Promise.resolve();let re=!1;function ie(){re||(re=!0,ne.then(de))}function oe(){return ie(),ne}function se(e){ee.push(e)}function ae(e){te.push(e)}let le=!1;const ce=new Set;function de(){if(!le){le=!0;do{for(let e=0;e<Q.length;e+=1){const t=Q[e];j(t),ue(t.$$)}for(j(null),Q.length=0;J.length;)J.pop()();for(let e=0;e<ee.length;e+=1){const t=ee[e];ce.has(t)||(ce.add(t),t())}ee.length=0}while(Q.length);for(;te.length;)te.pop()();re=!1,le=!1,ce.clear()}}function ue(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(se)}}const he=new Set;let fe;function me(){fe={r:0,c:[],p:fe}}function ge(){fe.r||v(fe.c),fe=fe.p}function pe(e,t){e&&e.i&&(he.delete(e),e.i(t))}function we(e,t,n,r){if(e&&e.o){if(he.has(e))return;he.add(e),fe&&fe.c.push((()=>{he.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}function ye(e,t){const n=t.token={};function r(e,r,i,o){if(t.token!==n)return;t.resolved=o;let s=t.ctx;void 0!==i&&(s=s.slice(),s[i]=o);const a=e&&(t.current=e)(s);let l=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==r&&e&&(me(),we(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ge())})):t.block.d(1),a.c(),pe(a,1),a.m(t.mount(),t.anchor),l=!0),t.block=a,t.blocks&&(t.blocks[r]=a),l&&de()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=X();if(e.then((e=>{j(n),r(t.then,1,t.value,e),j(null)}),(e=>{if(j(n),r(t.catch,2,t.error,e),j(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}var i}function Ce(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}const Ee="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function _e(e,t){we(e,1,1,(()=>{t.delete(e.key)}))}function ve(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Ie(e){e&&e.c()}function Ae(e,t,n,r){const{fragment:i,on_mount:o,on_destroy:s,after_update:a}=e.$$;i&&i.m(t,n),r||se((()=>{const t=o.map(E).filter(I);s?s.push(...t):v(t),e.$$.on_mount=[]})),a.forEach(se)}function $e(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 Se(e,t,n,r,i,o,s=[-1]){const a=G;j(e);const l=e.$$={fragment:null,ctx:null,props:o,update:C,not_equal:i,bound:_(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:t.context||[]),callbacks:_(),dirty:s,skip_bound:!1};let c=!1;if(l.ctx=n?n(e,t.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return l.ctx&&i(l.ctx[t],l.ctx[t]=o)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](o),c&&function(e,t){-1===e.$$.dirty[0]&&(Q.push(e),ie(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],l.update(),c=!0,v(l.before_update),l.fragment=!!r&&r(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(R)}else l.fragment&&l.fragment.c();t.intro&&pe(e.$$.fragment),Ae(e,t.target,t.anchor,t.customElement),de()}j(a)}class be{$destroy(){$e(this,1),this.$destroy=C}$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 Te(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("path"),r=M("line"),i=M("line"),V(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),V(r,"x1","12"),V(r,"y1","9"),V(r,"x2","12"),V(r,"y2","13"),V(i,"x1","12"),V(i,"y1","17"),V(i,"x2","12.01"),V(i,"y2","17"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-alert-triangle "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-alert-triangle "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Ne(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Re extends be{constructor(e){super(),Se(this,e,Ne,Te,A,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("circle"),r=M("polyline"),i=M("line"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(r,"points","8 12 12 16 16 12"),V(i,"x1","12"),V(i,"y1","8"),V(i,"x2","12"),V(i,"y2","16"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-arrow-down-circle "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-arrow-down-circle "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Oe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Me extends be{constructor(e){super(),Se(this,e,Oe,De,A,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("path"),V(n,"d","M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"),V(r,"d","M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-book-open "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-book-open "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function xe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Be extends be{constructor(e){super(),Se(this,e,xe,ke,A,{size:0,strokeWidth:1,class:2})}}function Pe(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("circle"),V(n,"d","M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"),V(r,"cx","12"),V(r,"cy","13"),V(r,"r","4"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-camera "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-camera "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Le(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Fe extends be{constructor(e){super(),Se(this,e,Le,Pe,A,{size:0,strokeWidth:1,class:2})}}function Ve(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("polyline"),V(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),V(r,"points","22 4 12 14.01 9 11.01"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Ue(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class He extends be{constructor(e){super(),Se(this,e,Ue,Ve,A,{size:0,strokeWidth:1,class:2})}}function ze(e){let t,n,r;return{c(){t=M("svg"),n=M("path"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-command "+e[2])},m(e,r){N(e,t,r),T(t,n)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-command "+e[2])&&V(t,"class",r)},i:C,o:C,d(e){e&&R(t)}}}function We(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ge extends be{constructor(e){super(),Se(this,e,We,ze,A,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,r,i;return{c(){t=M("svg"),n=M("polyline"),r=M("path"),V(n,"points","9 10 4 15 9 20"),V(r,"d","M20 4v7a4 4 0 0 1-4 4H4"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Xe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class qe extends be{constructor(e){super(),Se(this,e,Xe,je,A,{size:0,strokeWidth:1,class:2})}}function Ye(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("path"),r=M("line"),i=M("line"),V(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),V(r,"x1","18"),V(r,"y1","9"),V(r,"x2","12"),V(r,"y2","15"),V(i,"x1","12"),V(i,"y1","9"),V(i,"x2","18"),V(i,"y2","15"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-delete "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-delete "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Ze(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Ke extends be{constructor(e){super(),Se(this,e,Ze,Ye,A,{size:0,strokeWidth:1,class:2})}}function Qe(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("path"),r=M("polyline"),i=M("line"),V(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),V(r,"points","15 3 21 3 21 9"),V(i,"x1","10"),V(i,"y1","14"),V(i,"x2","21"),V(i,"y2","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-external-link "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-external-link "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function Je(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class et extends be{constructor(e){super(),Se(this,e,Je,Qe,A,{size:0,strokeWidth:1,class:2})}}function tt(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("circle"),r=M("line"),i=M("path"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(r,"x1","2"),V(r,"y1","12"),V(r,"x2","22"),V(r,"y2","12"),V(i,"d","M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-globe "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-globe "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function nt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class rt extends be{constructor(e){super(),Se(this,e,nt,tt,A,{size:0,strokeWidth:1,class:2})}}function it(e){let t,n,r,i,o,s,a,l;return{c(){t=M("svg"),n=M("line"),r=M("line"),i=M("line"),o=M("line"),s=M("line"),a=M("line"),V(n,"x1","8"),V(n,"y1","6"),V(n,"x2","21"),V(n,"y2","6"),V(r,"x1","8"),V(r,"y1","12"),V(r,"x2","21"),V(r,"y2","12"),V(i,"x1","8"),V(i,"y1","18"),V(i,"x2","21"),V(i,"y2","18"),V(o,"x1","3"),V(o,"y1","6"),V(o,"x2","3.01"),V(o,"y2","6"),V(s,"x1","3"),V(s,"y1","12"),V(s,"x2","3.01"),V(s,"y2","12"),V(a,"x1","3"),V(a,"y1","18"),V(a,"x2","3.01"),V(a,"y2","18"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",l="feather feather-list "+e[2])},m(e,l){N(e,t,l),T(t,n),T(t,r),T(t,i),T(t,o),T(t,s),T(t,a)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-list "+e[2])&&V(t,"class",l)},i:C,o:C,d(e){e&&R(t)}}}function ot(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class st extends be{constructor(e){super(),Se(this,e,ot,it,A,{size:0,strokeWidth:1,class:2})}}function at(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("polyline"),V(n,"d","M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"),V(r,"points","22,6 12,13 2,6"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-mail "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-mail "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function lt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ct extends be{constructor(e){super(),Se(this,e,lt,at,A,{size:0,strokeWidth:1,class:2})}}function dt(e){let t,n,r,i;return{c(){t=M("svg"),n=M("path"),r=M("circle"),V(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),V(r,"cx","12"),V(r,"cy","10"),V(r,"r","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-map-pin "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-map-pin "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function ut(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ht extends be{constructor(e){super(),Se(this,e,ut,dt,A,{size:0,strokeWidth:1,class:2})}}function ft(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("polyline"),r=M("line"),i=M("path"),V(n,"points","23 7 23 1 17 1"),V(r,"x1","16"),V(r,"y1","8"),V(r,"x2","23"),V(r,"y2","1"),V(i,"d","M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-phone-outgoing "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-phone-outgoing "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function mt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class gt extends be{constructor(e){super(),Se(this,e,mt,ft,A,{size:0,strokeWidth:1,class:2})}}function pt(e){let t,n,r,i,o;return{c(){t=M("svg"),n=M("polyline"),r=M("path"),i=M("rect"),V(n,"points","6 9 6 2 18 2 18 9"),V(r,"d","M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"),V(i,"x","6"),V(i,"y","14"),V(i,"width","12"),V(i,"height","8"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-printer "+e[2])},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-printer "+e[2])&&V(t,"class",o)},i:C,o:C,d(e){e&&R(t)}}}function wt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class yt extends be{constructor(e){super(),Se(this,e,wt,pt,A,{size:0,strokeWidth:1,class:2})}}function Ct(e){let t,n,r,i;return{c(){t=M("svg"),n=M("circle"),r=M("line"),V(n,"cx","11"),V(n,"cy","11"),V(n,"r","8"),V(r,"x1","21"),V(r,"y1","21"),V(r,"x2","16.65"),V(r,"y2","16.65"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-search "+e[2])},m(e,i){N(e,t,i),T(t,n),T(t,r)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&V(t,"class",i)},i:C,o:C,d(e){e&&R(t)}}}function Et(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class _t extends be{constructor(e){super(),Se(this,e,Et,Ct,A,{size:0,strokeWidth:1,class:2})}}const{document:vt}=Ee;function It(e){e[45]=e[46].items}function At(e,t,n){const r=e.slice();return r[47]=t[n],r[49]=n,r}function $t(e,t,n){const r=e.slice();return r[50]=t[n],r}function St(e,t,n){const r=e.slice();return r[50]=t[n],r}function bt(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Tt(e){let t,n,r,i,o,s;It(e);let a=e[5]?.length&&Nt(e),l=e[45]?.length&&Dt(e),c=e[5]?.length&&kt(e);return{c(){a&&a.c(),t=x(),n=O("div"),r=O("table"),l&&l.c(),i=x(),o=O("tbody"),c&&c.c(),V(r,"striped",""),V(r,"class","svelte-v0ogws"),V(n,"class","eList svelte-v0ogws")},m(e,d){a&&a.m(e,d),N(e,t,d),N(e,n,d),T(n,r),l&&l.m(r,null),T(r,i),T(r,o),c&&c.m(o,null),s=!0},p(e,n){It(e),e[5]?.length?a?(a.p(e,n),32&n[0]&&pe(a,1)):(a=Nt(e),a.c(),pe(a,1),a.m(t.parentNode,t)):a&&(me(),we(a,1,1,(()=>{a=null})),ge()),e[45]?.length?l?l.p(e,n):(l=Dt(e),l.c(),l.m(r,i)):l&&(l.d(1),l=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&pe(c,1)):(c=kt(e),c.c(),pe(c,1),c.m(o,null)):c&&(me(),we(c,1,1,(()=>{c=null})),ge())},i(e){s||(pe(a),pe(c),s=!0)},o(e){we(a),we(c),s=!1},d(e){a&&a.d(e),e&&R(t),e&&R(n),l&&l.d(),c&&c.d()}}}function Nt(e){let t,n,r,i,o,s,a,l,c,d,u,h=e[6]&&Rt(e);function f(t){e[29](t)}let m={id:e[10]};return void 0!==e[3]&&(m.value=e[3]),i=new e[8]({props:m}),J.push((()=>ve(i,"value",f))),i.$on("input",e[14]),l=new Ke({props:{size:"18"}}),{c(){h&&h.c(),t=x(),n=O("div"),r=k("Suchen: "),Ie(i.$$.fragment),s=x(),a=O("span"),Ie(l.$$.fragment),V(a,"class","feather pointer svelte-v0ogws"),z(n,"margin-bottom","1em"),z(n,"position","relative")},m(o,f){h&&h.m(o,f),N(o,t,f),N(o,n,f),T(n,r),Ae(i,n,null),T(n,s),T(n,a),Ae(l,a,null),c=!0,d||(u=P(a,"click",e[16]),d=!0)},p(e,n){e[6]?h?64&n[0]&&pe(h,1):(h=Rt(e),h.c(),pe(h,1),h.m(t.parentNode,t)):h&&(me(),we(h,1,1,(()=>{h=null})),ge());const r={};!o&&8&n[0]&&(o=!0,r.value=e[3],ae((()=>o=!1))),i.$set(r)},i(e){c||(pe(h),pe(i.$$.fragment,e),pe(l.$$.fragment,e),c=!0)},o(e){we(h),we(i.$$.fragment,e),we(l.$$.fragment,e),c=!1},d(e){h&&h.d(e),e&&R(t),e&&R(n),$e(i),$e(l),d=!1,u()}}}function Rt(e){let t,n;return t=new e[7]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Dt(e){let t,n,r,i=e[4]&&e[0]&&Ot(),o=e[45],s=[];for(let t=0;t<o.length;t+=1)s[t]=Mt(St(e,o,t));return{c(){t=O("thead"),n=O("tr"),i&&i.c(),r=x();for(let e=0;e<s.length;e+=1)s[e].c();V(n,"class","svelte-v0ogws"),V(t,"class","svelte-v0ogws")},m(e,o){N(e,t,o),T(t,n),i&&i.m(n,null),T(n,r);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Ot(),i.c(),i.m(n,r)):i&&(i.d(1),i=null),8196&t[0]){let r;for(o=e[45],r=0;r<o.length;r+=1){const i=St(e,o,r);s[r]?s[r].p(i,t):(s[r]=Mt(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&R(t),i&&i.d(),D(s,e)}}}function Ot(e){let t;return{c(){t=O("th"),V(t,"class","svelte-v0ogws")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Mt(e){let t,n,r=e[50]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-v0ogws")},m(e,r){N(e,t,r),T(t,n)},p(e,t){4&t[0]&&r!==(r=e[50]?.designation+"")&&U(n,r)},d(e){e&&R(t)}}}function kt(e){let t,n,r=[],i=new Map,o=e[5];const s=e=>e[47]._id;for(let t=0;t<o.length;t+=1){let n=At(e,o,t),a=s(n);i.set(a,r[t]=Lt(a,n))}return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=B()},m(e,i){for(let t=0;t<r.length;t+=1)r[t].m(e,i);N(e,t,i),n=!0},p(e,n){178239&n[0]&&(o=e[5],me(),r=function(e,t,n,r,i,o,s,a,l,c,d,u){let h=e.length,f=o.length,m=h;const g={};for(;m--;)g[e[m].key]=m;const p=[],w=new Map,y=new Map;for(m=f;m--;){const e=u(i,o,m),a=n(e);let l=s.get(a);l?r&&l.p(e,t):(l=c(a,e),l.c()),w.set(a,p[m]=l),a in g&&y.set(a,Math.abs(m-g[a]))}const C=new Set,E=new Set;function _(e){pe(e,1),e.m(a,d),s.set(e.key,e),d=e.first,f--}for(;h&&f;){const t=p[f-1],n=e[h-1],r=t.key,i=n.key;t===n?(d=t.first,h--,f--):w.has(i)?!s.has(r)||C.has(r)?_(t):E.has(i)?h--:y.get(r)>y.get(i)?(E.add(r),_(t)):(C.add(i),h--):(l(n,s),h--)}for(;h--;){const t=e[h];w.has(t.key)||l(t,s)}for(;f;)_(p[f-1]);return p}(r,n,s,1,e,o,i,t.parentNode,_e,Lt,t,At),ge())},i(e){if(!n){for(let e=0;e<o.length;e+=1)pe(r[e]);n=!0}},o(e){for(let e=0;e<r.length;e+=1)we(r[e]);n=!1},d(e){for(let t=0;t<r.length;t+=1)r[t].d(e);e&&R(t)}}}function xt(e){let t,n,r,i,o,s,a=e[4]&&e[0]&&Bt(e),l=e[45],c=[];for(let t=0;t<l.length;t+=1)c[t]=Pt($t(e,l,t));return{c(){t=O("tr"),a&&a.c(),n=x();for(let e=0;e<c.length;e+=1)c[e].c();r=x(),V(t,"class","pointer svelte-v0ogws"),W(t,"active",e[47]._id===e[1])},m(l,d){N(l,t,d),a&&a.m(t,null),T(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);T(t,r),i=!0,o||(s=P(t,"click",F((function(){I(e[12](e[47],e[49]))&&e[12](e[47],e[49]).apply(this,arguments)}))),o=!0)},p(i,o){if((e=i)[4]&&e[0]?a?(a.p(e,o),17&o[0]&&pe(a,1)):(a=Bt(e),a.c(),pe(a,1),a.m(t,n)):a&&(me(),we(a,1,1,(()=>{a=null})),ge()),10276&o[0]){let n;for(l=e[45],n=0;n<l.length;n+=1){const i=$t(e,l,n);c[n]?c[n].p(i,o):(c[n]=Pt(i),c[n].c(),c[n].m(t,r))}for(;n<c.length;n+=1)c[n].d(1);c.length=l.length}34&o[0]&&W(t,"active",e[47]._id===e[1])},i(e){i||(pe(a),i=!0)},o(e){we(a),i=!1},d(e){e&&R(t),a&&a.d(),D(c,e),o=!1,s()}}}function Bt(e){let t,n,r,i,o;return n=new et({props:{size:"18"}}),{c(){t=O("td"),Ie(n.$$.fragment),V(t,"class","editRow svelte-v0ogws"),z(t,"color","#326173")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",F((function(){I(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),i=!0)},p(t,n){e=t},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Pt(e){let t,n,r,i=e[11](e[47],e[50])+"";return{c(){t=O("td"),n=k(i),V(t,"class",r=S(e[50].type)+" svelte-v0ogws")},m(e,r){N(e,t,r),T(t,n)},p(e,o){36&o[0]&&i!==(i=e[11](e[47],e[50])+"")&&U(n,i),4&o[0]&&r!==(r=S(e[50].type)+" svelte-v0ogws")&&V(t,"class",r)},d(e){e&&R(t)}}}function Lt(e,t){let n,r,i,o=t[15](t[47],t[45],t[3]),s=o&&xt(t);return{key:e,first:null,c(){n=B(),s&&s.c(),r=B(),this.first=n},m(e,t){N(e,n,t),s&&s.m(e,t),N(e,r,t),i=!0},p(e,n){t=e,44&n[0]&&(o=t[15](t[47],t[45],t[3])),o?s?(s.p(t,n),44&n[0]&&pe(s,1)):(s=xt(t),s.c(),pe(s,1),s.m(r.parentNode,r)):s&&(me(),we(s,1,1,(()=>{s=null})),ge())},i(e){i||(pe(s),i=!0)},o(e){we(s),i=!1},d(e){e&&R(n),s&&s.d(e),e&&R(r)}}}function Ft(e){let t,n;return t=new e[7]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Vt(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ft,then:Tt,catch:bt,value:46,blocks:[,,,]};return ye(n=e[2]&&e[13](),i),{c(){t=B(),i.block.c()},m(e,n){N(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,4&r[0]&&n!==(n=e[2]&&e[13]())&&ye(n,i)||Ce(i,e,r)},i(e){r||(pe(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}r=!1},d(e){e&&R(t),i.block.d(e),i.token=null,i=null}}}const Ut=e("getDisplayItems",(async(e,n,r)=>{if(!e)return;let i=[];for(const o of e){if("_total"===o){i.push({name:"_total",designation:"Betrag",type:"number"});continue}const[e,s]=o.split(".");let a=n.list?.find((t=>t.name===e))?.item.find((e=>e.name===s));if(a&&(a={...a},a.name=`${e}_${s}`,r=r.map((t=>(t[e]&&(t[a.name]=t["_"+e]?t["_"+e][s]:t[e][s]),t)))),a||(a=n.items.find((t=>t.name===e))),!a){const n=(await t.getSchemaByClass(e)).items.find((e=>e.name===s));n&&(a={name:e,designation:n.designation,type:n.type,decimals:n.properties?.decimals||0})}i.find((t=>t?.name===e))||i.push(a)}return i.length?i:n.items}));function Ht(e,i,o){let s;let a=JSON.parse(n.getItem("Locale")).id;const l=Z(),{Loading:d,TextField:h}=c,{currentTasks:f}=u;$(e,f,(e=>o(33,s=e)));let g,w,y,C,{inputList:E}=i,{eventId:_}=i,{prevEventId:v}=i,{className:I}=i,{rowId:A}=i,{filterForReady:S=!1}=i,{refStatus:b}=i,{showEdit:T=!1}=i,{praefix:N=""}=i,{selectionFields:R=!1}=i,{deList:D}=i,{stopAggregation:O=!1}=i,{inputSearch:M=""}=i,k=!0,x=M,B=I+Math.floor(9e3*Math.random()+1e3).toString()+"search",P=!1,L=!0;const F=(e,t)=>{if(!t)return;let n=e[t.name];if(Array.isArray(n)){const e=e=>e.replaceAll(" ",String.fromCharCode(160));if(n.length&&Array.isArray(n[0].serialno)){let t=[];for(const r of n)t=t.concat(r.serialno.map(e));n=t.join(", ")}else n=n.map(e),n.length>3&&(n=n.slice(0,3),n=n.concat("...")),n=n.join(", ")}if(!n&&t.name.split("_").length>1){const[r,i]=t.name.split("_");try{n=e[r][0][i],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n||(n=e[`_${t.name}`]),n=Number(n)?Number(n).toLocaleString(a,{minimumFractionDigits:t.properties?.decimals||t.decimals||0,maximumFractionDigits:t.properties?.decimals||t.decimals||0}):""),"number"===t.type?n:"boolean"==typeof n?p(n):m(e[`_${t.name}`]||n||"")},V=t.getSchemaByClass(I),U=async(e,n)=>{if(b)return o(18,b=[].concat(b)),e.filter((e=>!!b.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(v){const n=await t.getEvent(v);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===I)return"Information"===n.state.task?e.filter((e=>"Closed"!==e._task.status)):e.filter((e=>"Ready"===e._task.status))}return e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status))},H=(e,t)=>{if(e){const n="string"==typeof e?e:Object.keys(e)[0],r=new Intl.Collator(a,{numeric:!0});return t.sort(((e,t)=>r.compare(e[n],t[n])))}return t},z=async e=>{let n,r=0;L=!1;const i=e=>new Promise((t=>setTimeout(t,e)));for(;r++<200&&!O&&!(n=await W(e));)await i(500);o(6,P=!1),O&&t.readTasksByAggregationId(e,!0),n&&(o(5,y=H(w.displaySort,n.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),L=!0}),100))},W=async e=>await t.readTasksByAggregationId(e),G=async(e,t,n,r)=>{const{value:i,refClass:o}=r,[s,a]=n.split("."),l=i?.get(N),c=l&&await Gd(s,l);if(!c)return e;const d=c[a];return d?.length?d.map((n=>{let r=e?.find((e=>e._id===n[t]))||{};r={...r};for(const e in r)n[e]&&(r[e]=n[e]);for(const e in n)n[e]&&(r[e]=n[e]);return zd(o+r._id.toString(),r),r})):e};q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(B)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await V;e.eventId===t.id&&(jd(t.class,e.eventId),o(2,k=!o(2,k=!1)))}));return e.$$set=e=>{"inputList"in e&&o(20,E=e.inputList),"eventId"in e&&o(21,_=e.eventId),"prevEventId"in e&&o(22,v=e.prevEventId),"className"in e&&o(23,I=e.className),"rowId"in e&&o(1,A=e.rowId),"filterForReady"in e&&o(24,S=e.filterForReady),"refStatus"in e&&o(18,b=e.refStatus),"showEdit"in e&&o(0,T=e.showEdit),"praefix"in e&&o(25,N=e.praefix),"selectionFields"in e&&o(26,R=e.selectionFields),"deList"in e&&o(27,D=e.deList),"stopAggregation"in e&&o(19,O=e.stopAggregation),"inputSearch"in e&&o(28,M=e.inputSearch)},[T,A,k,x,g,y,P,d,h,f,B,F,(e,t)=>n=>{o(19,O=!0);const r=L?e:C[t];l("choose",{row:r})},async()=>{w=await V,o(4,g=(e=>!s?.length||!!s.find((t=>t===e)))(w.id)),o(5,y=C=H(w.displaySort,await E||await Ud(w.class,w.id))),500===y?.length&&(o(6,P=!0),t.getTasksList(w.id,!1,!0).then((({aggregationId:e})=>z(e))));let e,n=!1,r="";const i=R&&R?.find((e=>w.class===e.refClass.split(":")[0])),a=i?.value?.get&&i.value.get(N);if(a){const[s,l]=i.refClass.split(":");w.class===s&&o(5,y=await G(y,s,l,i)),n=i.parentClass?.find((e=>"quantity"===e.name)),r=i.className,e=await t.getCountedSection(r,l.split(".")[0],a,s,"quantity")}o(0,T&&=!i),i||!S&&!b||o(5,y=await U(y,w));const{display:c}=w;let d=await Ut(c,w,y);return!T&&n?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),o(5,y=y.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!y.find((t=>t._id===e._id))){const t=C.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,y.push(t)}})),l("init",y)):D&&o(5,y=y.filter((e=>!D.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{o(3,x=e)},(e,t,n)=>{if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let r=!1;for(const i of t){const t=F(e,i).toLowerCase();!r&&t.includes(n)&&(r=!0)}return r},()=>{o(3,x="")},e=>{window.open(`/task/${e._task.event}/${e._task._id}/task?view=standalone`,"_blank")},b,O,E,_,v,I,S,N,R,D,M,function(e){x=e,o(3,x)}]}class zt extends be{constructor(e){var t;super(),vt.getElementById("svelte-v0ogws-style")||((t=O("style")).id="svelte-v0ogws-style",t.textContent=".feather.svelte-v0ogws.svelte-v0ogws{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-v0ogws.svelte-v0ogws{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-v0ogws .editRow.svelte-v0ogws{width:1em}.eList.svelte-v0ogws table.svelte-v0ogws{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-v0ogws table thead.svelte-v0ogws{position:sticky;top:0;background:#326173;color:white}.eList.svelte-v0ogws table thead tr.svelte-v0ogws{height:2.3em}.eList.svelte-v0ogws table tbody tr.svelte-v0ogws{height:2.75em !important}th.svelte-v0ogws.svelte-v0ogws,td.svelte-v0ogws.svelte-v0ogws{padding-left:0.4em;padding-right:0.4em}td.number.svelte-v0ogws.svelte-v0ogws{text-align:end}tr.pointer.svelte-v0ogws.svelte-v0ogws:hover{background-color:#DAE1E5}tr.active.svelte-v0ogws.svelte-v0ogws{color:#326173;background-color:#fcebd5}",T(vt.head,t)),Se(this,e,Ht,Vt,A,{inputList:20,eventId:21,prevEventId:22,className:23,rowId:1,filterForReady:24,refStatus:18,showEdit:0,praefix:25,selectionFields:26,deList:27,stopAggregation:19,inputSearch:28},[-1,-1])}}function Wt(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Gt(e){let t,n,r=e[41]&&jt(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[41]?r?(r.p(e,n),8&n[0]&&pe(r,1)):(r=jt(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function jt(e){let t,n;return t=new e[21]({props:{title:e[16]?"Auswahl":e[0],class:"eList "+(e[14]?"form":""),$$slots:{default:[nn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};65537&n[0]&&(r.title=e[16]?"Auswahl":e[0]),16384&n[0]&&(r.class="eList "+(e[14]?"form":"")),2097150&n[0]|2048&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Xt(e){let t,n;return t=new qd({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){I(e[30](e[41]))&&e[30](e[41]).apply(this,arguments)})),t.$on("back",e[27]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(n,r){e=n;const i={};4&r[0]&&(i.schema=e[2]),2&r[0]&&(i.recID=e[1]),32768&r[0]&&(i.readonly=e[15]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function qt(e){let t,n,r,i,o,s,a;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const l=[Zt,Yt],c=[];function d(e,t){return e[16]?0:1}return r=d(e),i=c[r]=l[r](e),s=new zt({props:{inputSearch:e[12],eventId:e[2].id,className:e[2].class,prevEventId:e[11],filterForReady:e[4],refStatus:e[5],praefix:e[6],selectionFields:e[7],rowId:e[1],deList:e[9],stopAggregation:e[20],showEdit:e[8]}}),s.$on("edit",e[31]),s.$on("choose",e[34]),s.$on("init",e[32]),{c(){Ie(t.$$.fragment),n=x(),i.c(),o=x(),Ie(s.$$.fragment)},m(e,i){Ae(t,e,i),N(e,n,i),c[r].m(e,i),N(e,o,i),Ae(s,e,i),a=!0},p(e,n){const a={};65536&n[0]&&(a.text=e[16]?"Zusätzliche Auswahl":""),t.$set(a);let u=r;r=d(e),r===u?c[r].p(e,n):(me(),we(c[u],1,1,(()=>{c[u]=null})),ge(),i=c[r],i?i.p(e,n):(i=c[r]=l[r](e),i.c()),pe(i,1),i.m(o.parentNode,o));const h={};4096&n[0]&&(h.inputSearch=e[12]),4&n[0]&&(h.eventId=e[2].id),4&n[0]&&(h.className=e[2].class),2048&n[0]&&(h.prevEventId=e[11]),16&n[0]&&(h.filterForReady=e[4]),32&n[0]&&(h.refStatus=e[5]),64&n[0]&&(h.praefix=e[6]),128&n[0]&&(h.selectionFields=e[7]),2&n[0]&&(h.rowId=e[1]),512&n[0]&&(h.deList=e[9]),1048576&n[0]&&(h.stopAggregation=e[20]),256&n[0]&&(h.showEdit=e[8]),s.$set(h)},i(e){a||(pe(t.$$.fragment,e),pe(i),pe(s.$$.fragment,e),a=!0)},o(e){we(t.$$.fragment,e),we(i),we(s.$$.fragment,e),a=!1},d(e){$e(t,e),e&&R(n),c[r].d(e),e&&R(o),$e(s,e)}}}function Yt(e){let t,n,r,i;n=new e[23]({props:{outline:!0,$$slots:{default:[Kt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let o=e[25]&&e[10]&&Qt(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o&&o.c(),V(t,"class","form--buttons svelte-jb5mrh")},m(e,s){N(e,t,s),Ae(n,t,null),T(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};2048&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[25]&&e[10]?o?(o.p(e,r),1024&r[0]&&pe(o,1)):(o=Qt(e),o.c(),pe(o,1),o.m(t,null)):o&&(me(),we(o,1,1,(()=>{o=null})),ge())},i(e){i||(pe(n.$$.fragment,e),pe(o),i=!0)},o(e){we(n.$$.fragment,e),we(o),i=!1},d(e){e&&R(t),$e(n),o&&o.d()}}}function Zt(e){let t,n,r,i,o,s,a=e[19]&&en(e);return r=new e[23]({props:{outline:!0,$$slots:{default:[tn]},$$scope:{ctx:e}}}),r.$on("click",e[28]),o=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){a&&a.c(),t=x(),n=O("div"),Ie(r.$$.fragment),i=x(),Ie(o.$$.fragment),V(n,"class","form--buttons svelte-jb5mrh")},m(e,l){a&&a.m(e,l),N(e,t,l),N(e,n,l),Ae(r,n,null),N(e,i,l),Ae(o,e,l),s=!0},p(e,n){e[19]?a?(a.p(e,n),524288&n[0]&&pe(a,1)):(a=en(e),a.c(),pe(a,1),a.m(t.parentNode,t)):a&&(me(),we(a,1,1,(()=>{a=null})),ge());const i={};2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),r.$set(i);const s={};8192&n[0]&&(s.text="Liste aus "+e[13]),o.$set(s)},i(e){s||(pe(a),pe(r.$$.fragment,e),pe(o.$$.fragment,e),s=!0)},o(e){we(a),we(r.$$.fragment,e),we(o.$$.fragment,e),s=!1},d(e){a&&a.d(e),e&&R(t),e&&R(n),$e(r),e&&R(i),$e(o,e)}}}function Kt(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Qt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Jt]},$$scope:{ctx:e}}}),t.$on("click",e[29]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2048&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Jt(e){let t;return{c(){t=k("Neu")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function en(e){let t,n;return t=new qa({props:{item:e[17],record:{_id:"",[e[17].name]:""},noForm:"true",classId:"sel_"+e[17].name,eventId:e[18],required:!1,hidden:!1,readonly:!1,deList:e[19]}}),t.$on("notify",e[33]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};131072&n[0]&&(r.item=e[17]),131072&n[0]&&(r.record={_id:"",[e[17].name]:""}),131072&n[0]&&(r.classId="sel_"+e[17].name),262144&n[0]&&(r.eventId=e[18]),524288&n[0]&&(r.deList=e[19]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function tn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function nn(e){let t,n,r,i;const o=[qt,Xt],s=[];function a(e,t){return e[41].length&&!e[14]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=B()},m(e,n){s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(me(),we(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r))},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){s[t].d(e),e&&R(r)}}}function rn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function on(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:rn,then:Gt,catch:Wt,value:41,blocks:[,,,]};return ye(n=e[26](e[3]),i),{c(){t=B(),i.block.c()},m(e,n){N(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(t,r){e=t,i.ctx=e,8&r[0]&&n!==(n=e[26](e[3]))&&ye(n,i)||Ce(i,e,r)},i(e){r||(pe(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}r=!1},d(e){e&&R(t),i.block.d(e),i.token=null,i=null}}}function sn(e,n,r){let i;const{Dialog:o,Divider:s,Button:a}=c,l=Z(),{currentTasks:d}=u;$(e,d,(e=>r(37,i=e)));let{title:h}=n,{schema:f}=n,{recID:m}=n,{isOpening:g=!0}=n,{filterForReady:p=!1}=n,{refStatus:w}=n,{praefix:y=""}=n,{selectionFields:C=!1}=n,{showEdit:E=!0}=n,{deList:_}=n,{newAllowed:v=!0}=n,{prevEventId:I}=n,{inputSearch:A}=n,S=f.id;f.class;let b,T,N,R,D,O,M,k="",x=!1,B=!1;h??=f.identity.designation;const P=!i?.length||i.find((e=>e===S));return e.$$set=e=>{"title"in e&&r(0,h=e.title),"schema"in e&&r(2,f=e.schema),"recID"in e&&r(1,m=e.recID),"isOpening"in e&&r(3,g=e.isOpening),"filterForReady"in e&&r(4,p=e.filterForReady),"refStatus"in e&&r(5,w=e.refStatus),"praefix"in e&&r(6,y=e.praefix),"selectionFields"in e&&r(7,C=e.selectionFields),"showEdit"in e&&r(8,E=e.showEdit),"deList"in e&&r(9,_=e.deList),"newAllowed"in e&&r(10,v=e.newAllowed),"prevEventId"in e&&r(11,I=e.prevEventId),"inputSearch"in e&&r(12,A=e.inputSearch)},[h,m,f,g,p,w,y,C,E,_,v,I,A,k,x,b,N,D,O,M,B,o,s,a,d,P,async e=>{if(!e)return!1;const n=await Ud(f.class,f.id);if(T=C&&C?.find((e=>f.class===e.refClass.split(":")[0])),r(16,N=T?.value?.get&&T.value.get(y)),N){R=T.refClass;const[e,n]=R.split(":"),[i]=n.split(".");r(17,D=T.parentClass.find((t=>t.name===e)));const o=await t.getSchemaByClass(D.refClass);r(18,O=o.id),r(13,k=T.parentClass.find((e=>e.name===i)).designation)}return n},()=>{r(14,x=!1),m||l("back"),E||l("back")},()=>{r(20,B=!0),r(14,x=!1),l("back")},()=>{r(20,B=!0),r(1,m=!1),r(15,b=!1),r(14,x=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,r]=t.split(".");let i=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===r));if(i){e[`${n}_${r}`]=e[n][r]}})),l("choose",{row:e})},({detail:e})=>{r(15,b=!!e._task.visum||"Closed"===e._task.status),r(1,m=e._docId),r(14,x=!0)},({detail:e})=>{N&&r(19,M=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};l("choose",{row:t})},function(t){K(e,t)}]}class an extends be{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=O("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",T(document.head,t)),Se(this,e,sn,on,A,{title:0,schema:2,recID:1,isOpening:3,filterForReady:4,refStatus:5,praefix:6,selectionFields:7,showEdit:8,deList:9,newAllowed:10,prevEventId:11,inputSearch:12},[-1,-1])}}const{document:ln}=Ee;function cn(e){e[28]=e[30].list,e[29]=e[30].items}function dn(e,t,n){const r=e.slice();return r[31]=t[n],r}function un(e,t,n){const r=e.slice();return r[34]=t[n],r}function hn(e,t,n){const r=e.slice();return r[34]=t[n],r}function fn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function mn(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function C(t){e[25](t)}cn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[gn]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let E={id:e[8]};void 0!==e[1]&&(E.value=e[1]),s=new e[6]({props:E}),J.push((()=>ve(s,"value",C))),s.$on("input",e[12]),d=new Ke({props:{size:"18"}});let _=e[29]?.length&&function(e){let t,n,r,i,o=e[29],s=[];for(let t=0;t<o.length;t+=1)s[t]=pn(hn(e,o,t));return{c(){t=O("thead"),n=O("tr"),r=O("th"),i=x();for(let e=0;e<s.length;e+=1)s[e].c();V(r,"class","svelte-14hcfjl"),V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,o){N(e,t,o),T(t,n),T(n,r),T(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(o=e[29],r=0;r<o.length;r+=1){const i=hn(e,o,r);s[r]?s[r].p(i,t):(s[r]=pn(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&R(t),D(s,e)}}}(e),v=e[28]?.length&&function(e){let t,n,r=e[28],i=[];for(let t=0;t<r.length;t+=1)i[t]=Cn(dn(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(44547&n[0]){let s;for(r=e[28],s=0;s<r.length;s+=1){const o=dn(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=Cn(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),i=O("div"),o=k("Suchen: "),Ie(s.$$.fragment),l=x(),c=O("span"),Ie(d.$$.fragment),u=x(),h=O("div"),f=O("table"),_&&_.c(),m=x(),g=O("tbody"),v&&v.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(h,"class","eList svelte-14hcfjl")},m(a,C){N(a,t,C),Ae(n,t,null),N(a,r,C),N(a,i,C),T(i,o),Ae(s,i,null),T(i,l),T(i,c),Ae(d,c,null),N(a,u,C),N(a,h,C),T(h,f),_&&_.m(f,null),T(f,m),T(f,g),v&&v.m(g,null),p=!0,w||(y=P(c,"click",e[14]),w=!0)},p(e,t){cn(e);const r={};256&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],ae((()=>a=!1))),s.$set(i),e[29]?.length&&_.p(e,t),e[28]?.length&&v.p(e,t)},i(e){p||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(v),p=!0)},o(e){we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),we(v),p=!1},d(e){e&&R(t),$e(n),e&&R(r),e&&R(i),$e(s),$e(d),e&&R(u),e&&R(h),_&&_.d(),v&&v.d(),w=!1,y()}}}function gn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function pn(e){let t,n,r=e[34]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function wn(e){let t,n,r,i,o,s,a,l;r=new et({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=yn(un(e,c,t));return{c(){t=O("tr"),n=O("td"),Ie(r.$$.fragment),i=x();for(let e=0;e<d.length;e+=1)d[e].c();o=x(),V(n,"class","editRow svelte-14hcfjl"),V(t,"class","pointer svelte-14hcfjl"),W(t,"active",e[31]._id===e[0])},m(c,u){N(c,t,u),T(t,n),Ae(r,n,null),T(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);T(t,o),s=!0,a||(l=P(n,"click",e[15](e[31])),a=!0)},p(n,r){if(e=n,3584&r[0]){let n;for(c=e[29],n=0;n<c.length;n+=1){const i=un(e,c,n);d[n]?d[n].p(i,r):(d[n]=yn(i),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&r[0]&&W(t,"active",e[31]._id===e[0])},i(e){s||(pe(r.$$.fragment,e),s=!0)},o(e){we(r.$$.fragment,e),s=!1},d(e){e&&R(t),$e(r),D(d,e),a=!1,l()}}}function yn(e){let t,n,r,i,o=e[9](e[31],e[34])+"";return{c(){t=O("td"),n=k(o),V(t,"class","svelte-14hcfjl")},m(o,s){N(o,t,s),T(t,n),r||(i=P(t,"click",F(e[10](e[31]))),r=!0)},p(t,n){e=t},d(e){e&&R(t),r=!1,i()}}}function Cn(e){let t,n,r=e[13](e[31],e[29],e[1]),i=r&&wn(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){2&n[0]&&(r=e[13](e[31],e[29],e[1])),r?i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=wn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function En(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function _n(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:En,then:mn,catch:fn,value:30,blocks:[,,,]};return ye(e[11](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function vn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[_n]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|256&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function In(e,n,i){const o=Z(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{classId:f}=n,{className:g}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:C}=n,{recordId:E}=n,{filter:_}=n,{multiValues:v}=n,I="",A=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const $=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},S=t.getSchemaByClass(g);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(A)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&jd(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(16,h=e.item),"classId"in e&&i(17,f=e.classId),"className"in e&&i(18,g=e.className),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(19,y=e.viewName),"viewValue"in e&&i(20,C=e.viewValue),"recordId"in e&&i(21,E=e.recordId),"filter"in e&&i(22,_=e.filter),"multiValues"in e&&i(23,v=e.multiValues)},[w,I,o,s,a,l,d,u,A,$,e=>()=>o("choose",{row:e}),async()=>{const e=await S;let n=[];if(h.lookup){const r="."+f+"#"+h.lookup,i=document.querySelector(r);let o=i?.value||E;if(v.has(h.lookup)){const r=v.get(h.lookup)[0];n=r?await t.getSectionView(h.name,{[h.lookup]:r},!0):await Ud(h.name,e.id)}else if(o&&24===o.toString().length){const e=await Gd(h.lookup,o);if(e){const r=e[h.name]?.map((e=>e[h.name]));r&&(n=await t.getSectionView(h.name,{_id:{$in:r}},!0))}}}else{const r="."+f+"#"+y.split(":")[0],i=document.querySelector(r);let o={[y]:i?.value||E};if(h.refItem){const e="."+f+"#"+h.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[h.refItem]:t.value},{[h.refItem]:{$exists:!0,$eq:""}}]};o={...o,...e}}}catch{}}o[y]&&(n=await t.getSectionView(e.class,o,!0)),_&&(n=n.filter((e=>e._id!=_)))}const r=e.display;return{list:n,items:await Ut(r,e,n)}},({detail:{value:e}})=>{i(1,I=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if($(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,I="")},e=>async()=>{const n=await t.getTaskByDocId(e._id),r=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(r)},h,f,g,y,C,E,_,v,()=>o("back"),function(e){I=e,i(1,I)}]}class An extends be{constructor(e){var t;super(),ln.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl .editRow.svelte-14hcfjl{width:1em}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",T(ln.head,t)),Se(this,e,In,vn,A,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:$n}=Ee;function Sn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function bn(e){let t,n,r=e[60]&&function(e){let t,n,r,i,s,a,l,c,d,u,h,f,m,g,p,w,y,C,E;function _(t){e[47](t)}function v(t){e[48](t)}let I={class:"full-width",id:e[29],rows:"1",required:e[1],disabled:e[3],placeholder:e[30],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[2]&&(I.value=e[2]);void 0!==e[24]&&(I.overwrite=e[24]);n=new o({props:I}),J.push((()=>ve(n,"value",_))),J.push((()=>ve(n,"overwrite",v))),n.$on("click",e[32]()),n.$on("onFocus",e[32](e[29]));const A=[Nn,Tn],$=[];function b(e,t){return!e[3]||e[15]?0:e[21]&&e[0]?1:-1}~(a=b(e))&&(l=$[a]=A[a](e));let D=(!e[3]||e[15]||e[16])&&Rn(e);function M(t){e[49](t)}let k={class:"tModal",noClickaway:!0,$$slots:{default:[kn]},$$scope:{ctx:e}};void 0!==e[18]&&(k.open=e[18]);m=new e[26]({props:k}),J.push((()=>ve(m,"open",M)));let L=e[19]&&xn(e);return{c(){t=O("div"),Ie(n.$$.fragment),s=x(),l&&l.c(),c=x(),d=O("input"),h=x(),D&&D.c(),f=x(),Ie(m.$$.fragment),p=x(),L&&L.c(),w=B(),V(d,"class",u=S(e[8]||e[9])+" svelte-jox15l"),V(d,"id",e[5]),V(d,"name",e[5]),d.value=e[0],d.hidden=!0,z(t,"position","relative")},m(r,i){N(r,t,i),Ae(n,t,null),T(t,s),~a&&$[a].m(t,null),T(t,c),T(t,d),T(t,h),D&&D.m(t,null),N(r,f,i),Ae(m,r,i),N(r,p,i),L&&L.m(r,i),N(r,w,i),y=!0,C||(E=P(t,"keydown",e[33]),C=!0)},p(e,o){const s={};2&o[0]&&(s.required=e[1]),8&o[0]&&(s.disabled=e[3]),!r&&4&o[0]&&(r=!0,s.value=e[2],ae((()=>r=!1))),!i&&16777216&o[0]&&(i=!0,s.overwrite=e[24],ae((()=>i=!1))),n.$set(s);let h=a;a=b(e),a===h?~a&&$[a].p(e,o):(l&&(me(),we($[h],1,1,(()=>{$[h]=null})),ge()),~a?(l=$[a],l?l.p(e,o):(l=$[a]=A[a](e),l.c()),pe(l,1),l.m(t,c)):l=null),(!y||768&o[0]&&u!==(u=S(e[8]||e[9])+" svelte-jox15l"))&&V(d,"class",u),(!y||32&o[0])&&V(d,"id",e[5]),(!y||32&o[0])&&V(d,"name",e[5]),(!y||1&o[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[15]||e[16]?D?(D.p(e,o),98312&o[0]&&pe(D,1)):(D=Rn(e),D.c(),pe(D,1),D.m(t,null)):D&&(me(),we(D,1,1,(()=>{D=null})),ge());const f={};13008593&o[0]|1073741824&o[1]&&(f.$$scope={dirty:o,ctx:e}),!g&&262144&o[0]&&(g=!0,f.open=e[18],ae((()=>g=!1))),m.$set(f),e[19]?L?(L.p(e,o),524288&o[0]&&pe(L,1)):(L=xn(e),L.c(),pe(L,1),L.m(w.parentNode,w)):L&&(me(),we(L,1,1,(()=>{L=null})),ge())},i(e){y||(pe(n.$$.fragment,e),pe(l),pe(D),pe(m.$$.fragment,e),pe(L),y=!0)},o(e){we(n.$$.fragment,e),we(l),we(D),we(m.$$.fragment,e),we(L),y=!1},d(e){e&&R(t),$e(n),~a&&$[a].d(),D&&D.d(),e&&R(f),$e(m,e),e&&R(p),L&&L.d(e),e&&R(w),C=!1,E()}}}(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,t){e[60]&&r.p(e,t)},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Tn(e){let t,n,r,i,o;return n=new et({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[38]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Nn(e){let t,n,r,i,o;return n=new _t({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=[P(t,"click",e[32](!0)),P(t,"choose",e[35])],i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,v(o)}}}function Rn(e){let t,n,r,i,o;return n=new Ke({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 pointer svelte-jox15l")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[37]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Dn(e){let t,n,r,i;const o=[Mn,On],s=[];function a(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=B()},m(e,n){s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(me(),we(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r))},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){s[t].d(e),e&&R(r)}}}function On(e){let t,n;return t=new an({props:{title:e[6].designation,newAllowed:e[22],prevEventId:e[10],schema:e[17],recID:e[0],isOpening:e[18],filterForReady:e[23],refStatus:e[6].refStatus,selectionFields:e[13],deList:e[14],praefix:e[12],inputSearch:e[34]()}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.title=e[6].designation),4194304&n[0]&&(r.newAllowed=e[22]),1024&n[0]&&(r.prevEventId=e[10]),131072&n[0]&&(r.schema=e[17]),1&n[0]&&(r.recID=e[0]),262144&n[0]&&(r.isOpening=e[18]),8388608&n[0]&&(r.filterForReady=e[23]),64&n[0]&&(r.refStatus=e[6].refStatus),8192&n[0]&&(r.selectionFields=e[13]),16384&n[0]&&(r.deList=e[14]),4096&n[0]&&(r.praefix=e[12]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Mn(e){let t,n;return t=new An({props:{item:e[6],className:e[17].class,classId:e[9],rowId:e[0],recordId:e[11],viewName:e[4],viewValue:"",multiValues:e[7]}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.item=e[6]),131072&n[0]&&(r.className=e[17].class),512&n[0]&&(r.classId=e[9]),1&n[0]&&(r.rowId=e[0]),2048&n[0]&&(r.recordId=e[11]),16&n[0]&&(r.viewName=e[4]),128&n[0]&&(r.multiValues=e[7]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function kn(e){let t,n,r=e[18]&&Dn(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[18]?r?(r.p(e,n),262144&n[0]&&pe(r,1)):(r=Dn(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function xn(e){let t,n,r;function i(t){e[50](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}};return void 0!==e[19]&&(o.open=e[19]),t=new e[26]({props:o}),J.push((()=>ve(t,"open",i))),{c(){Ie(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};1179649&r[0]|1073741824&r[1]&&(i.$$scope={dirty:r,ctx:e}),!n&&524288&r[0]&&(n=!0,i.open=e[19],ae((()=>n=!1))),t.$set(i)},i(e){r||(pe(t.$$.fragment,e),r=!0)},o(e){we(t.$$.fragment,e),r=!1},d(e){$e(t,e)}}}function Bn(e){let t,n;return t=new qd({props:{schema:e[17],recID:e[0],readonly:!0}}),t.$on("back",e[36]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};131072&n[0]&&(r.schema=e[17]),1&n[0]&&(r.recID=e[0]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Pn(e){let t,n;return t=new e[25]({props:{title:e[20],$$slots:{default:[Bn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1048576&n[0]&&(r.title=e[20]),131073&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ln(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Fn(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ln,then:bn,catch:Sn,value:60,blocks:[,,,]};return ye(e[31](),r),{c(){t=B(),r.block.c()},m(e,i){N(e,t,i),r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(t,n){Ce(r,e=t,n)},i(e){n||(pe(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){we(r.blocks[e])}n=!1},d(e){e&&R(t),r.block.d(e),r.token=null,r=null}}}function Vn(e,n,r){let o,s,a;$(e,i,(e=>r(46,o=e)));const l=Z(),{Dialog:d,Modal:h}=c,{currentTasks:f,loggedIn:m}=u;$(e,f,(e=>r(52,s=e))),$(e,m,(e=>r(53,a=e)));let{id:g}=n,{item:p}=n,{value:y=""}=n,{multiValues:C}=n,{desc:E=""}=n,{noForm:_=!1}=n,{classId:v}=n,{eventId:I}=n,{recordId:A}=n,{withRefValue:S=!1}=n,{refValue:b=""}=n,{shortEdit:T}=n,{required:N}=n,{disabled:R}=n,{readonly:D}=n,{praefix:O}=n,{selectionFields:M}=n,{formnovalidate:k}=n,{selection:x}=n,{deList:B}=n,{isTemplate:P}=n,{noList:L=!1}=n,{multi:F=!1}=n;const V="comment_"+g;let U,H,z,W,G,j,X=!1,q=!0,Y=!0,K=!0;D||=A&&p.asInput,R||=D,!x&&p.selection&&1===p.selection.split(":").length&&(x=p.selection);const Q=D||R||p.lookup||x&&!p.constraint?"":"Suchbegriff ⏎",J=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{l("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},ee=e=>{e&&(r(2,E=w(z,e)),l("setRefDesc",E.split(" •")[0]),l("change",{value:y,description:E}),l("task",{row:e,eventId:z.id}))},te=()=>{r(18,X=!1),r(19,U=!1)};return e.$$set=e=>{"id"in e&&r(5,g=e.id),"item"in e&&r(6,p=e.item),"value"in e&&r(0,y=e.value),"multiValues"in e&&r(7,C=e.multiValues),"desc"in e&&r(2,E=e.desc),"noForm"in e&&r(8,_=e.noForm),"classId"in e&&r(9,v=e.classId),"eventId"in e&&r(10,I=e.eventId),"recordId"in e&&r(11,A=e.recordId),"withRefValue"in e&&r(39,S=e.withRefValue),"refValue"in e&&r(40,b=e.refValue),"shortEdit"in e&&r(42,T=e.shortEdit),"required"in e&&r(1,N=e.required),"disabled"in e&&r(3,R=e.disabled),"readonly"in e&&r(41,D=e.readonly),"praefix"in e&&r(12,O=e.praefix),"selectionFields"in e&&r(13,M=e.selectionFields),"formnovalidate"in e&&r(43,k=e.formnovalidate),"selection"in e&&r(4,x=e.selection),"deList"in e&&r(14,B=e.deList),"isTemplate"in e&&r(15,P=e.isTemplate),"noList"in e&&r(44,L=e.noList),"multi"in e&&r(16,F=e.multi)},e.$$.update=()=>{if(2&e.$$.dirty[0]|4096&e.$$.dirty[1]&&r(1,N=N&&!k),768&e.$$.dirty[1]&&S&&r(0,y=b),131137&e.$$.dirty[0]|8192&e.$$.dirty[1]&&y&&z&&Promise.resolve(Hd(p.refClass,z.id,y,!!p.lookup||L)).then(ee),65&e.$$.dirty[0]|49152&e.$$.dirty[1]&&y&&W&&p.name===W.input?.at(0)&&W.inputLookup?.length){const{domain:e}=W.inputLookup[0]||{};"user"===e&&(o.some((e=>W.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,R=!0))}131073&e.$$.dirty[0]&&!y&&z&&ee({})},[y,N,E,R,x,g,p,C,_,v,I,A,O,M,B,P,F,z,X,U,H,G,q,Y,K,d,h,f,m,V,Q,async()=>{try{const e=await t.getEvent(I);if(j="report"===e.output.type,r(23,Y=!p.asInput),r(22,q=e.output?.class[0].name!==p.refClass),r(17,z=await t.getSchemaByClass(p.refClass)),J(z),r(21,G=(e=>!s?.length||!!s.find((t=>t===e)))(z.id)),r(45,W=await t.getSchema(I)),I&&A&&y&&!R&&W.input?.find((e=>e===p.refClass))&&r(3,R=!0),p.properties?.query?.lookup){const{domain:e,value:n}=p.properties.query.lookup;if("user"===e){const e=a.user,i={[n]:e},s=await t.getSectionView(p.refClass,i);if(s?.length){const[{_id:e}]=s;e&&(r(40,b=e),r(39,S=!0))}o.some((e=>z.authorization?.find((t=>t.role===e&&!t.constraint))))||r(3,R=!0)}}return r(20,H=z.identity.designation),!0}catch{return l("initFail",!0),!1}},e=>t=>{if(!0===e&&r(18,X=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(p.lookup||x&&!p.constraint||y)&&r(18,X=!0)},async e=>{const n=()=>{r(18,X=!0)};if(9==e.which)return;if(y)return e.preventDefault();if(13!=e.which)return;e.preventDefault();const i=z.items.find((e=>e.properties?.search));if(!i)return n();const o=e.srcElement.value,{name:s,checkOn:a,refClass:l,properties:c}=i;let{search:d}=c;!0===d&&(d={}),"number"==typeof d&&(d={min:d});const{min:u=3,start:h=!1,end:f=!1}=d;if(o.length<u)return n();const m=(h?"^":"")+o+(f?"$":"");let g={[s]:{$regex:m,$options:"i"}};a&&(g=[{$lookup:{from:l,localField:s,foreignField:"_id",as:l}},{$match:{[l+"."+a]:{$regex:m,$options:"i"}}}]);const p=await t.getSectionView(z.class,g);1!==p?.length?n():r(0,y=p[0]._id)},()=>{if(y)return"";const e=document.getElementById(V);return e?.value||""},({detail:e})=>{r(0,y=e.row._id),te()},te,()=>{(j||G)&&(F?l("change",{value:y,delete:!0}):(r(0,y=""),r(2,E=""),r(24,K=!0),l("change",{value:y,description:E}),l("task",{row:{_task:{event:z.id,_id:!1}}})))},async()=>{if(!y)return;const e=await Hd(p.refClass,z.id,y);if(!e._task)return;const t=e._task.task_id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},S,b,D,T,k,L,W,o,function(e){E=e,r(2,E)},function(e){K=e,r(24,K)},function(e){X=e,r(18,X)},function(e){U=e,r(19,U)}]}class Un extends be{constructor(e){var t;super(),$n.getElementById("svelte-jox15l-style")||((t=O("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",T($n.head,t)),Se(this,e,Vn,Fn,A,{id:5,item:6,value:0,multiValues:7,desc:2,noForm:8,classId:9,eventId:10,recordId:11,withRefValue:39,refValue:40,shortEdit:42,required:1,disabled:3,readonly:41,praefix:12,selectionFields:13,formnovalidate:43,selection:4,deList:14,isTemplate:15,noList:44,multi:16},[-1,-1])}}function Hn(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function zn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Wn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[jn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8191&n[0]|512&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Gn(e){let t,n;return t=new Un({props:{classId:e[6],eventId:e[7],required:e[9],disabled:e[1],formnovalidate:e[12],readonly:e[10],id:e[2]+"."+e[39],item:e[3],desc:e[4],value:e[37],noForm:e[5],praefix:e[11],recordId:e[8],multi:!0}}),t.$on("change",e[24]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.classId=e[6]),128&n[0]&&(r.eventId=e[7]),512&n[0]&&(r.required=e[9]),2&n[0]&&(r.disabled=e[1]),4096&n[0]&&(r.formnovalidate=e[12]),1024&n[0]&&(r.readonly=e[10]),4&n[0]&&(r.id=e[2]+"."+e[39]),8&n[0]&&(r.item=e[3]),16&n[0]&&(r.desc=e[4]),1&n[0]&&(r.value=e[37]),32&n[0]&&(r.noForm=e[5]),2048&n[0]&&(r.praefix=e[11]),256&n[0]&&(r.recordId=e[8]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function jn(e){let t,n,r,i,o,s,a;n=new st({props:{size:"18"}});let l=e[0],c=[];for(let t=0;t<l.length;t+=1)c[t]=Gn(Hn(e,l,t));const d=e=>we(c[e],1,1,(()=>{c[e]=null}));return{c(){t=O("span"),Ie(n.$$.fragment),r=x();for(let e=0;e<c.length;e+=1)c[e].c();i=B(),V(t,"class","feather pointer")},m(l,d){N(l,t,d),Ae(n,t,null),N(l,r,d);for(let e=0;e<c.length;e+=1)c[e].m(l,d);N(l,i,d),o=!0,s||(a=P(t,"click",(function(){I(e[22](e[0]))&&e[22](e[0]).apply(this,arguments)})),s=!0)},p(t,n){if(e=t,16785407&n[0]){let t;for(l=e[0],t=0;t<l.length;t+=1){const r=Hn(e,l,t);c[t]?(c[t].p(r,n),pe(c[t],1)):(c[t]=Gn(r),c[t].c(),pe(c[t],1),c[t].m(i.parentNode,i))}for(me(),t=l.length;t<c.length;t+=1)d(t);ge()}},i(e){if(!o){pe(n.$$.fragment,e);for(let e=0;e<l.length;e+=1)pe(c[e]);o=!0}},o(e){we(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)we(c[e]);o=!1},d(e){e&&R(t),$e(n),e&&R(r),D(c,e),e&&R(i),s=!1,a()}}}function Xn(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function qn(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Zn]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[0]&&(r.title=e[14].designation),49480&n[0]|512&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Yn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Zn(e){let t,n,r,i,o;return n=new e[19]({props:{outline:!0,$$slots:{default:[Yn]},$$scope:{ctx:e}}}),n.$on("click",e[25]),i=new zt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),i.$on("choose",e[23]),i.$on("back",e[25]),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),Ie(i.$$.fragment),V(t,"class","form--buttons")},m(e,s){N(e,t,s),Ae(n,t,null),N(e,r,s),Ae(i,e,s),o=!0},p(e,t){const r={};512&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const o={};8&t[0]&&(o.item=e[3]),16384&t[0]&&(o.className=e[14].class),64&t[0]&&(o.classId=e[6]),32768&t[0]&&(o.rowId=e[15]),256&t[0]&&(o.recordId=e[8]),i.$set(o)},i(e){o||(pe(n.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){we(n.$$.fragment,e),we(i.$$.fragment,e),o=!1},d(e){e&&R(t),$e(n),e&&R(r),$e(i,e)}}}function Kn(e){let t,n,r=e[13]&&qn(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[13]?r?(r.p(e,n),8192&n[0]&&pe(r,1)):(r=qn(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Qn(e){let t,n,r,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Xn,then:Wn,catch:zn,value:36,blocks:[,,,]};function s(t){e[33](t)}ye(e[20](),o);let a={class:"tModal",noClickaway:!0,$$slots:{default:[Kn]},$$scope:{ctx:e}};return void 0!==e[13]&&(a.open=e[13]),n=new e[17]({props:a}),J.push((()=>ve(n,"open",s))),{c(){o.block.c(),t=x(),Ie(n.$$.fragment)},m(e,r){o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,N(e,t,r),Ae(n,e,r),i=!0},p(t,i){Ce(o,e=t,i);const s={};57672&i[0]|512&i[1]&&(s.$$scope={dirty:i,ctx:e}),!r&&8192&i[0]&&(r=!0,s.open=e[13],ae((()=>r=!1))),n.$set(s)},i(e){i||(pe(o.block),pe(n.$$.fragment,e),i=!0)},o(e){for(let e=0;e<3;e+=1){we(o.blocks[e])}we(n.$$.fragment,e),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&R(t),$e(n,e)}}}function Jn(e,n,r){const i=Z(),{Card:o,Modal:s,Dialog:a,Button:l}=c;let d,u,{id:h}=n,{item:f}=n,{values:m=[]}=n,{desc:g=""}=n,{noForm:p=!1}=n,{classId:w}=n,{eventId:y}=n,{recordId:C}=n,{withRefValue:E=!1}=n,{refValue:_=""}=n,{required:v}=n,{disabled:I}=n,{readonly:A}=n,{praefix:$}=n,{selectionFields:S}=n,{formnovalidate:b}=n,{selection:T}=n,{deList:N}=n,{isTemplate:R}=n,{noList:D=!1}=n,O=!1;const M=f.properties.multi.filter;I=!0;const k=()=>{r(13,O=!1)};return e.$$set=e=>{"id"in e&&r(2,h=e.id),"item"in e&&r(3,f=e.item),"values"in e&&r(0,m=e.values),"desc"in e&&r(4,g=e.desc),"noForm"in e&&r(5,p=e.noForm),"classId"in e&&r(6,w=e.classId),"eventId"in e&&r(7,y=e.eventId),"recordId"in e&&r(8,C=e.recordId),"withRefValue"in e&&r(26,E=e.withRefValue),"refValue"in e&&r(27,_=e.refValue),"required"in e&&r(9,v=e.required),"disabled"in e&&r(1,I=e.disabled),"readonly"in e&&r(10,A=e.readonly),"praefix"in e&&r(11,$=e.praefix),"selectionFields"in e&&r(28,S=e.selectionFields),"formnovalidate"in e&&r(12,b=e.formnovalidate),"selection"in e&&r(29,T=e.selection),"deList"in e&&r(30,N=e.deList),"isTemplate"in e&&r(31,R=e.isTemplate),"noList"in e&&r(32,D=e.noList)},[m,I,h,f,g,p,w,y,C,v,A,$,b,O,d,u,o,s,a,l,async()=>{r(14,d=await t.getSchemaByClass(f.refClass))},async()=>{let e=await Ud(d.class,d.id);if(M)for(const t in M)e=e.filter((e=>{const[n,r]=t.split(".");if(r||(r=n,n=""),n){if(e[n][0]&&e[n][0][r].length)return!0}else if(e[r])return!0;return!1}));return e},e=>()=>{r(13,O=!0),r(15,u=e)},({detail:e})=>{const t=e.row._id;m.find((e=>e===t))||r(0,m=m.concat(e.row._id)),k()},({detail:e})=>{e.delete&&r(0,m=m.filter((t=>t!==e.value))),e.value=m,i("change",e)},k,E,_,S,T,N,R,D,function(e){O=e,r(13,O)}]}class er extends be{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=O("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",T(document.head,t)),Se(this,e,Jn,Qn,A,{id:2,item:3,values:0,desc:4,noForm:5,classId:6,eventId:7,recordId:8,withRefValue:26,refValue:27,required:9,disabled:1,readonly:10,praefix:11,selectionFields:28,formnovalidate:12,selection:29,deList:30,isTemplate:31,noList:32},[-1,-1])}}const tr=/\d+/g,nr=/%[HMSpPdmyY%]/g;function rr(e,t,n){const r=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const o=t.split(nr);let s=0,a=0;const l=new Date(0);for(const c of o){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(a!==t.length)return n;break}if("%"!==t[a+c.length])break;if(a+=c.length+1,"%"===t[a]){if("%"!==e[s])return n;s++}else if("p"===t[a].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)i=!1,l.getHours()>=12&&l.setHours(l.getHours()-12);else{if("PM"!==t)return n;i=!0,l.getHours()<12&&l.setHours(l.getHours()+12)}}else{tr.lastIndex=s;const o=tr.exec(e);if(null==o)return n;switch(t[a]){case"H":l.setHours(parseInt(o[0])+12*i);break;case"M":l.setMinutes(o[0]);break;case"S":l.setSeconds(o[0]);break;case"d":l.setDate(o[0]);break;case"m":l.setMonth(o[0]-1);break;case"y":l.setFullYear(100*r+parseInt(o[0]));break;case"Y":l.setFullYear(o[0])}s+=o[0].length}a++}return isNaN(l.valueOf())?n:l}function ir(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:or}=Ee;function sr(e,t,n){const r=e.slice();return r[17]=t[n],r}function ar(e,t,n){const r=e.slice();return r[20]=t[n],r}function lr(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function cr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m=e[0].items,g=[];for(let t=0;t<m.length;t+=1)g[t]=ur(ar(e,m,t));const p=e=>we(g[e],1,1,(()=>{g[e]=null}));let w=e[0].list&&hr(e);return l=new e[5]({props:{outline:!0,$$slots:{default:[mr]},$$scope:{ctx:e}}}),l.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[gr]},$$scope:{ctx:e}}}),{c(){t=O("form"),n=O("input"),i=x();for(let e=0;e<g.length;e+=1)g[e].c();o=x(),w&&w.c(),s=x(),a=O("div"),Ie(l.$$.fragment),c=x(),Ie(d.$$.fragment),V(n,"class",S(e[6])+" svelte-1phofh5"),V(n,"name","_id"),V(n,"type","hidden"),n.value=r=e[1]._id||"",V(t,"class","fTask svelte-1phofh5"),V(t,"id",e[6]),V(a,"class","form--buttons svelte-1phofh5")},m(r,m){N(r,t,m),T(t,n),T(t,i);for(let e=0;e<g.length;e+=1)g[e].m(t,null);T(t,o),w&&w.m(t,null),N(r,s,m),N(r,a,m),Ae(l,a,null),T(a,c),Ae(d,a,null),u=!0,h||(f=[P(t,"keydown",e[8]),P(t,"submit",L(e[10]))],h=!0)},p(e,i){if((!u||2&i&&r!==(r=e[1]._id||""))&&(n.value=r),75&i){let n;for(m=e[0].items,n=0;n<m.length;n+=1){const r=ar(e,m,n);g[n]?(g[n].p(r,i),pe(g[n],1)):(g[n]=ur(r),g[n].c(),pe(g[n],1),g[n].m(t,o))}for(me(),n=m.length;n<g.length;n+=1)p(n);ge()}e[0].list?w?(w.p(e,i),1&i&&pe(w,1)):(w=hr(e),w.c(),pe(w,1),w.m(t,null)):w&&(me(),we(w,1,1,(()=>{w=null})),ge());const s={};8388608&i&&(s.$$scope={dirty:i,ctx:e}),l.$set(s);const a={};4&i&&(a.disabled=e[2]),8388608&i&&(a.$$scope={dirty:i,ctx:e}),d.$set(a)},i(e){if(!u){for(let e=0;e<m.length;e+=1)pe(g[e]);pe(w),pe(l.$$.fragment,e),pe(d.$$.fragment,e),u=!0}},o(e){g=g.filter(Boolean);for(let e=0;e<g.length;e+=1)we(g[e]);we(w),we(l.$$.fragment,e),we(d.$$.fragment,e),u=!1},d(e){e&&R(t),D(g,e),w&&w.d(),e&&R(s),e&&R(a),$e(l),$e(d),h=!1,v(f)}}}function dr(e){let t,n;return t=new qa({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(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.item=e[20]),1&n&&(r.selection=e[20].selection),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),1&n&&(r.eventId=e[0].id),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ur(e){let t,n,r=yr(!0,e[20]),i=r&&dr(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){1&n&&(r=yr(!0,e[20])),r?i?(i.p(e,n),1&n&&pe(i,1)):(i=dr(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function hr(e){let t,n,r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=fr(sr(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(75&n){let s;for(r=e[0].list,s=0;s<r.length;s+=1){const o=sr(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=fr(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}function fr(e){let t,n,r,i;return t=new e[4]({props:{text:e[17].designation}}),r=new Rr({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){Ie(t.$$.fragment),n=x(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),N(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const o={};1&n&&(o.list=e[17]),1&n&&(o.eventId=e[0].id),1&n&&(o.schema=e[17].item),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),r.$set(o)},i(e){i||(pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!0)},o(e){we(t.$$.fragment,e),we(r.$$.fragment,e),i=!1},d(e){$e(t,e),e&&R(n),$e(r,e)}}}function mr(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function gr(e){let t;return{c(){t=k("Speichern")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function pr(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function wr(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:pr,then:cr,catch:lr,value:16,blocks:[,,,]};return ye(e[7](),i),{c(){t=x(),n=O("section"),i.block.c(),or.title="Vorgaben",V(n,"class","sTask svelte-1phofh5")},m(e,o){N(e,t,o),N(e,n,o),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,r=!0},p(t,[n]){Ce(i,e=t,n)},i(e){r||(pe(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}r=!1},d(e){e&&R(t),e&&R(n),i.block.d(),i.token=null,i=null}}}const yr=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Cr(e,r,o){let l,d,u;$(e,a,(e=>o(11,d=e))),$(e,i,(e=>o(12,u=e)));const{Divider:h,Button:f,FormField:m}=c,g=JSON.parse(n.getItem("Locale"));let{schema:p}=r,{record:w}=r,y="template-"+p.class+Math.floor(9e3*Math.random()+1e3).toString(),C=!1;const E=()=>window.history.back(),_=(e,t,n=!1)=>{const r=t.id,i=e.find((e=>e.name===r));let o=t.value;if(!n&&i&&i.properties?.multi&&(o=w[r]),o&&i&&i.type.startsWith("date"))try{return rr(o,"%d.%m.%Y").toISOString()}catch{return new Date(o).toISOString()}if(i&&"boolean"===i.type&&(o=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(g.id).substring(1,2);try{o=Number(o.replace(e,".")).toString()}catch{}}return o};return e.$$set=e=>{"schema"in e&&o(0,p=e.schema),"record"in e&&o(1,w=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,l=C)},[p,w,C,l,h,f,y,async()=>{const e=await t.getEvent(p.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,C=!0),d.role?.length&&p.authorization?.length){const e=p.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,C||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},E,async e=>{const n={};Array.from(document.querySelectorAll("form#"+y+" ."+y)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[r,i]=t.split("."),o=p.list.find((e=>e.name===r));n[t]=_(o.item,e)}else n[t]=_(p.items,e)})),await t.saveTemplate(p.class,n),s.success("Die Vorgaben wurden gespeichert.",2e3),E()}]}const{document:Er}=Ee;function _r(e,t,n){const r=e.slice();return r[28]=t[n],r}function vr(e){let t,n;return t=new qa({props:{classId:e[2],item:e[28],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5],currency:e[8]}}),t.$on("notify",e[14]),t.$on("defPrep",e[16]),t.$on("task",e[21]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),2&n[0]&&(r.item=e[28]),2&n[0]&&(r.listName=e[1].name),8&n[0]&&(r.eventId=e[3]),1&n[0]&&(r.record=e[0]),16&n[0]&&(r.disabled=e[4]),32&n[0]&&(r.required=e[5]),256&n[0]&&(r.currency=e[8]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ir(e){let t,n,r=yr(e[7],e[28]),i=r&&vr(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){130&n[0]&&(r=yr(e[7],e[28])),r?i?(i.p(e,n),130&n[0]&&pe(i,1)):(i=vr(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function Ar(e){let t,n,r,i=e[1].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=Ir(_r(e,i,t));const s=e=>we(o[e],1,1,(()=>{o[e]=null}));return{c(){t=O("div");for(let e=0;e<o.length;e+=1)o[e].c();V(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){N(e,t,n);for(let e=0;e<o.length;e+=1)o[e].m(t,null);r=!0},p(e,a){if(82367&a[0]){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const r=_r(e,i,n);o[n]?(o[n].p(r,a),pe(o[n],1)):(o[n]=Ir(r),o[n].c(),pe(o[n],1),o[n].m(t,null))}for(me(),n=i.length;n<o.length;n+=1)s(n);ge()}(!r||6&a[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&V(t,"id",n)},i(e){if(!r){for(let e=0;e<i.length;e+=1)pe(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)we(o[e]);r=!1},d(e){e&&R(t),D(o,e)}}}function $r(e){let t,n,r=e[13](e[9])+"";return{c(){t=O("span"),n=k(r)},m(e,r){N(e,t,r),T(t,n)},p(e,t){512&t[0]&&r!==(r=e[13](e[9])+"")&&U(n,r)},d(e){e&&R(t)}}}function Sr(e){let t,n,r;return n=new e[10]({props:{$$slots:{default:[$r]},$$scope:{ctx:e}}}),n.$on("click",(function(){I(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=O("div"),Ie(n.$$.fragment),V(t,"class","accordion svelte-148ktt9"),V(t,"slot","handle")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(t,r){e=t;const i={};512&r[0]|1&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function br(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[Sr,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[Ar,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};64&n[0]&&(r.open=e[6]),134218687&n[0]|1&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Tr(e){let t,n,r;return n=new e[11]({props:{$$slots:{default:[br]},$$scope:{ctx:e}}}),{c(){t=O("div"),Ie(n.$$.fragment),V(t,"class","formList")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1023&t[0]|1&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Nr(e,n,r){const{Button:i,Accordion:o,AccordionSection:s}=c;let{list:a}=n,{schema:l}=n,{record:d}=n,{classId:u}=n,{eventId:h}=n,{disabled:f}=n,{required:w}=n,{open:y=!1}=n,{template:C={}}=n,{isTemplate:E=!1}=n,{currency:_}=n,{update:v=!1}=n,I=new Map;const A={};let $=d[a.name]||{};d[a.name]=$;const S=e=>A[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),b=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&r(1,a=e.list),"schema"in e&&r(18,l=e.schema),"record"in e&&r(0,d=e.record),"classId"in e&&r(2,u=e.classId),"eventId"in e&&r(3,h=e.eventId),"disabled"in e&&r(4,f=e.disabled),"required"in e&&r(5,w=e.required),"open"in e&&r(6,y=e.open),"template"in e&&r(19,C=e.template),"isTemplate"in e&&r(7,E=e.isTemplate),"currency"in e&&r(8,_=e.currency),"update"in e&&r(20,v=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&v&&d&&r(9,$=d[a.name]||{})},[d,a,u,h,f,w,y,E,_,$,i,o,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?S(t.name):"boolean"===t.type?p(e[t.name]):"date"===t.type?m(e[t.name]):"datetime"===t.type?g(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(A[n]=e.desc);const i=d[t];r(0,d[t]={...i,[n]:e.value},d),r(9,$=d[t])},e=>t=>{(()=>{const e=C[a.name]||{};for(const t in e)C[a.name][t]&&!d[a.name][t]&&r(0,d[a.name][t]=C[a.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${a.name} > div.form-field:last-child`,i=document.querySelector(n);oe().then((()=>{const e=`#accordion-content-${u}-${a.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(b)})).then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:r}})=>{if(I.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===className+"."+a.name))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&I.set(e,o[0])},()=>{setTimeout((()=>{Array.from(I).forEach((([e,t])=>{d[a.name][e]||r(0,d[a.name][e]=t._id,d)}))}),500)},l,C,v,function(t){K(e,t)}]}class Rr extends be{constructor(e){var t;super(),Er.getElementById("svelte-148ktt9-style")||((t=O("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",T(Er.head,t)),Se(this,e,Nr,Tr,A,{list:1,schema:18,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:19,isTemplate:7,currency:8,update:20},[-1,-1])}}const{document:Dr}=Ee;function Or(e){e[0]=e[23].list,e[22]=e[23].items}function Mr(e,t,n){const r=e.slice();return r[24]=t[n],r}function kr(e,t,n){const r=e.slice();return r[27]=t[n],r}function xr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Br(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Pr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function C(t){e[19](t)}Or(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Lr]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let E={id:e[8]};void 0!==e[1]&&(E.value=e[1]),s=new e[6]({props:E}),J.push((()=>ve(s,"value",C))),s.$on("input",e[12]),d=new Ke({props:{size:"18"}});let _=e[22]?.length&&function(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Fr(xr(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[22],o=0;o<r.length;o+=1){const s=xr(e,r,o);i[o]?i[o].p(s,t):(i[o]=Fr(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&R(t),D(i,e)}}}(e),v=e[0]?.length&&function(e){let t,n=e[0],r=[];for(let t=0;t<n.length;t+=1)r[t]=Hr(Mr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=B()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);N(e,t,n)},p(e,i){if(11778&i[0]){let o;for(n=e[0],o=0;o<n.length;o+=1){const s=Mr(e,n,o);r[o]?r[o].p(s,i):(r[o]=Hr(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){D(r,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),i=O("div"),o=k("Suchen: "),Ie(s.$$.fragment),l=x(),c=O("span"),Ie(d.$$.fragment),u=x(),h=O("div"),f=O("table"),_&&_.c(),m=x(),g=O("tbody"),v&&v.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(h,"class","eList svelte-14hcfjl")},m(a,C){N(a,t,C),Ae(n,t,null),N(a,r,C),N(a,i,C),T(i,o),Ae(s,i,null),T(i,l),T(i,c),Ae(d,c,null),N(a,u,C),N(a,h,C),T(h,f),_&&_.m(f,null),T(f,m),T(f,g),v&&v.m(g,null),p=!0,w||(y=P(c,"click",e[14]),w=!0)},p(e,t){Or(e);const r={};2&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],ae((()=>a=!1))),s.$set(i),e[22]?.length&&_.p(e,t),e[0]?.length&&v.p(e,t)},i(e){p||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!0)},o(e){we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),p=!1},d(e){e&&R(t),$e(n),e&&R(r),e&&R(i),$e(s),$e(d),e&&R(u),e&&R(h),_&&_.d(),v&&v.d(),w=!1,y()}}}function Lr(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Fr(e){let t,n,r=e[27]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function Vr(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Ur(kr(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=x(),V(t,"class","pointer svelte-14hcfjl")},m(e,r){N(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);T(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[22],s=0;s<r.length;s+=1){const a=kr(e,r,s);i[s]?i[s].p(a,o):(i[s]=Ur(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(e){e&&R(t),D(i,e)}}}function Ur(e){let t,n,r,i,o=e[9](e[24],e[27])+"";return{c(){t=O("td"),n=k(o),V(t,"class","svelte-14hcfjl")},m(o,s){N(o,t,s),T(t,n),r||(i=P(t,"click",F(e[10](e[24]))),r=!0)},p(t,n){e=t},d(e){e&&R(t),r=!1,i()}}}function Hr(e){let t,n=e[13](e[24],e[22],e[1]),r=n&&Vr(e);return{c(){r&&r.c(),t=B()},m(e,n){r&&r.m(e,n),N(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[24],e[22],e[1])),n?r?r.p(e,i):(r=Vr(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&R(t)}}}function zr(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Wr(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:zr,then:Pr,catch:Br,value:23,blocks:[,,,]};return ye(e[11](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function Gr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Wr]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function jr(e,n,r){const i=Z(),{Dialog:o,Divider:s,Loading:a,TextField:l,Button:d}=c;let{item:u}=n,{className:h}=n,{classId:f}=n,{list:g}=n,w="",y=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const C=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},E=t.getSchemaByClass(h);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(y)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&r(15,u=e.item),"className"in e&&r(16,h=e.className),"classId"in e&&r(17,f=e.classId),"list"in e&&r(0,g=e.list)},[g,w,i,o,s,a,l,d,y,C,e=>()=>i("choose",{row:e}),async()=>{const e=await E,t=e.display;let n=await Ut(t,e,g);return{list:g,items:n}},({detail:{value:e}})=>{r(1,w=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(C(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,w="")},u,h,f,()=>i("back"),function(e){w=e,r(1,w)}]}class Xr extends be{constructor(e){var t;super(),Dr.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",T(Dr.head,t)),Se(this,e,jr,Gr,A,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:qr}=Ee;function Yr(e,t,n){const r=e.slice();return r[11]=t[n],r}function Zr(e,t,n){const r=e.slice();return r[3]=t[n],r}function Kr(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Qr(e){let t,n,r,i=e[7].items,o=[];for(let t=0;t<i.length;t+=1)o[t]=ri(Zr(e,i,t));const s=e=>we(o[e],1,1,(()=>{o[e]=null}));let a=e[7].list&&ii(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=x(),a&&a.c(),n=B()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);N(e,t,i),a&&a.m(e,i),N(e,n,i),r=!0},p(e,r){if(30327783&r[0]){let n;for(i=e[7].items,n=0;n<i.length;n+=1){const s=Zr(e,i,n);o[n]?(o[n].p(s,r),pe(o[n],1)):(o[n]=ri(s),o[n].c(),pe(o[n],1),o[n].m(t.parentNode,t))}for(me(),n=i.length;n<o.length;n+=1)s(n);ge()}e[7].list?a?(a.p(e,r),128&r[0]&&pe(a,1)):(a=ii(e),a.c(),pe(a,1),a.m(n.parentNode,n)):a&&(me(),we(a,1,1,(()=>{a=null})),ge())},i(e){if(!r){for(let e=0;e<i.length;e+=1)pe(o[e]);pe(a),r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)we(o[e]);we(a),r=!1},d(e){D(o,e),e&&R(t),a&&a.d(e),e&&R(n)}}}function Jr(e){let t,n,r,i;const o=[ti,ei],s=[];function a(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=B()},m(e,n){~t&&s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(me(),we(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){~t&&s[t].d(e),e&&R(r)}}}function ei(e){let t,n;return t=new qa({props:{classId:e[8],item:e[3],record:e[6],disabled:e[3].name===e[14]&&e[15]||e[0],eventId:e[5],currency:e[2],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.item=e[3]),64&n[0]&&(r.record=e[6]),129&n[0]&&(r.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(r.eventId=e[5]),4&n[0]&&(r.currency=e[2]),512&n[0]&&(r.changeValue=e[9]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ti(e){let t,n,r,i;n=new qa({props:{classId:e[8],item:e[3],record:e[6],disabled:e[0]||!!e[1],required:!0,eventId:e[5],currency:e[2],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]),n.$on("record",e[23]),n.$on("objRecord",e[24]);let o=e[1]&&ni(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o&&o.c(),z(t,"padding-top",".25em"),z(t,"background-color","lightyellow"),z(t,"position","relative")},m(e,s){N(e,t,s),Ae(n,t,null),T(t,r),o&&o.m(t,null),i=!0},p(e,r){const i={};256&r[0]&&(i.classId=e[8]),128&r[0]&&(i.item=e[3]),64&r[0]&&(i.record=e[6]),3&r[0]&&(i.disabled=e[0]||!!e[1]),32&r[0]&&(i.eventId=e[5]),4&r[0]&&(i.currency=e[2]),512&r[0]&&(i.changeValue=e[9]),n.$set(i),e[1]?o?(o.p(e,r),2&r[0]&&pe(o,1)):(o=ni(e),o.c(),pe(o,1),o.m(t,null)):o&&(me(),we(o,1,1,(()=>{o=null})),ge())},i(e){i||(pe(n.$$.fragment,e),pe(o),i=!0)},o(e){we(n.$$.fragment,e),we(o),i=!1},d(e){e&&R(t),$e(n),o&&o.d()}}}function ni(e){let t,n,r,i,o;return n=new Ke({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 pointer svelte-16mo2c")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[22]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function ri(e){let t,n,r="list"!==e[3].type&&Jr(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){"list"!==e[3].type?r?(r.p(e,n),128&n[0]&&pe(r,1)):(r=Jr(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function ii(e){let t,n,r=e[7].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=si(Yr(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(485&n[0]){let s;for(r=e[7].list,s=0;s<r.length;s+=1){const o=Yr(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=si(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}function oi(e){let t,n,r,i;return t=new e[12]({props:{text:e[11].designation}}),r=new Rr({props:{classId:e[8],list:e[11],eventId:e[5],schema:e[11].item,record:e[6],disabled:e[0],currency:e[2],update:!0}}),{c(){Ie(t.$$.fragment),n=x(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),N(e,n,o),Ae(r,e,o),i=!0},p(e,n){const i={};128&n[0]&&(i.text=e[11].designation),t.$set(i);const o={};256&n[0]&&(o.classId=e[8]),128&n[0]&&(o.list=e[11]),32&n[0]&&(o.eventId=e[5]),128&n[0]&&(o.schema=e[11].item),64&n[0]&&(o.record=e[6]),1&n[0]&&(o.disabled=e[0]),4&n[0]&&(o.currency=e[2]),r.$set(o)},i(e){i||(pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!0)},o(e){we(t.$$.fragment,e),we(r.$$.fragment,e),i=!1},d(e){$e(t,e),e&&R(n),$e(r,e)}}}function si(e){let t,n,r="array"!==e[11].type&&oi(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){"array"!==e[11].type?r?(r.p(e,n),128&n[0]&&pe(r,1)):(r=oi(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function ai(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function li(e){let t,n;return t=new Xr({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n[0]&&(r.item=e[3]),16&n[0]&&(r.className=e[4]),256&n[0]&&(r.classId=e[8]),2048&n[0]&&(r.list=e[11]),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ci(e){let t,n,r=e[10]&&li(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[10]?r?(r.p(e,n),1024&n[0]&&pe(r,1)):(r=li(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function di(e){let t,n,r,i,o,s,a={ctx:e,current:null,token:null,hasCatch:!1,pending:ai,then:Qr,catch:Kr,value:54,blocks:[,,,]};function l(t){e[30](t)}ye(e[16](),a),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[ci]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),i=new e[13]({props:c}),J.push((()=>ve(i,"open",l))),{c(){a.block.c(),t=x(),Ie(n.$$.fragment),r=x(),Ie(i.$$.fragment)},m(e,o){a.block.m(e,a.anchor=o),a.mount=()=>t.parentNode,a.anchor=t,N(e,t,o),Ae(n,e,o),N(e,r,o),Ae(i,e,o),s=!0},p(t,n){Ce(a,e=t,n);const r={};3352&n[0]|268435456&n[1]&&(r.$$scope={dirty:n,ctx:e}),!o&&1024&n[0]&&(o=!0,r.open=e[10],ae((()=>o=!1))),i.$set(r)},i(e){s||(pe(a.block),pe(n.$$.fragment,e),pe(i.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){we(a.blocks[e])}we(n.$$.fragment,e),we(i.$$.fragment,e),s=!1},d(e){a.block.d(e),a.token=null,a=null,e&&R(t),$e(n,e),e&&R(r),$e(i,e)}}}function ui(e,n,r){const{Divider:i,FormField:o,Modal:s}=c,a=Z();let l,d,u,h,f,{required:m}=n,{disabled:g}=n,{readonly:p}=n,{id:w}=n,{item:y}=n,{value:C}=n,{refValue:E}=n,{currency:_}=n,v={},I=[],A=[],$={},S=new Map,b=!1,T="";const N=y.checkOn,R=C,D=e=>{l.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[r,i]=n.split(".");I.push({action:e,itemName:t.name,refObj:r,refName:i,op:t.properties[e].invert?"!":""})}))},O=()=>{l.items.filter((e=>e.lookup)).forEach((e=>{A.push({name:e.name,lookup:e.lookup})})),l.items.filter((e=>e.properties?.lookup)).forEach((e=>{A.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},M=async e=>{const t=I.filter((t=>t.refObj===e));if(t?.length){r(9,$={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:s}=e;if(!n)break;let a,l,c=!i&&v[n];const u=v[n];u&&i&&(c=(await Gd(n,u))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{a=`#${d} .form-field.${t} .field textarea`,l=document.querySelector(a),l||(a=`#${d} .form-field.${t} .field input`,l=document.querySelector(a)),l&&c&&l.setAttribute(s,""),l&&!c&&l.removeAttribute(s)}),0)),"hidden"===s&&(a=`#${d} .form-field.${t}`,l=document.querySelector(a),l?.classList?.toggle("hidden",!!c),c&&r(9,$[t]="",$))}}};q((()=>{k()}));const k=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(d))&&++n<20;)await e(50);t&&((()=>{if(recID)return;const e=new Set;for(const t of I)e.add(t.refObj||u);Array.from(e).forEach((e=>M(e)))})(),x())},x=()=>{setTimeout((()=>{Array.from(S).forEach((([e,t])=>{v[e]||r(6,v[e]=t._id,v)}))}),250)},B=async e=>{if(!e.value)return void L();const n={[e.itemName]:{$regex:`(?i)${e.value}`}},i=await t.getSectionView(u,n);i?.length?(r(11,T=i),r(10,b=!0)):(r(1,C=""),r(25,E=""),a("setRefValue",E))},P=()=>{r(10,b=!1)},L=()=>{r(1,C=""),r(25,E=C),r(6,v={}),a("setRefValue",E)};return e.$$set=e=>{"required"in e&&r(26,m=e.required),"disabled"in e&&r(0,g=e.disabled),"readonly"in e&&r(27,p=e.readonly),"id"in e&&r(28,w=e.id),"item"in e&&r(3,y=e.item),"value"in e&&r(1,C=e.value),"refValue"in e&&r(25,E=e.refValue),"currency"in e&&r(2,_=e.currency)},e.$$.update=()=>{134217729&e.$$.dirty[0]&&r(0,g=g||p),536871024&e.$$.dirty[0]&&v&&a("safeReference",{record:v,class:u,event:h,taskId:f})},[g,C,_,y,u,h,v,l,d,$,b,T,i,s,N,R,async()=>{try{if(C){const e=await t.getTask(y.refClass,C);delete e._task,r(6,v=e),r(29,f=(await t.getTaskByDocId(e._id))._id)}else r(6,v={})}catch{}return r(7,l=await t.getSchemaByClass(y.refClass)),r(8,d="form-"+l.class+Math.floor(9e3*Math.random()+1e3).toString()),r(4,u=l.class),l.identity.designation,r(5,h=l.id),["readonly","hidden","required"].map(D),O(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(r(6,v[t]=n,v),t===N)return B(e);M(t)},async({detail:e})=>{if(!(l.input?.length&&l.input.length>1))return;if(prevSchema?.class!==l.input[0])return;const{value:n,lookup:i,view:o}=e,[s]=i.split(":"),a=(await t.getSectionView(s,{[o]:{$in:n}})).map((e=>e._id));for(const e of l.input.slice(1)){r(6,v[e]=[],v);const n=await t.getSchemaByClass(e);n.id;let i=await t.getTasks(n.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&a.includes(e[s]))),i?.length){const n=i.map((e=>e._id)),o=await t.getSectionView(e,{_id:{$in:n}});for(const t of o)t[e]=t._id;r(6,v[e]=o,v)}}},async({detail:{className:e,itemName:n,value:r}})=>{if(S.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===u))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&S.set(e,o[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(r(1,C=n[0]._id),r(25,E=C),a("setRefValue",E),r(6,v=n[0])),P()},P,L,({detail:e})=>{r(6,v[e.itemName]=e.value,v)},({detail:e})=>{for(const t of e.items)r(6,v[e.listName][t.name]=t.value,v)},E,m,p,w,f,function(e){b=e,r(10,b)}]}class hi extends be{constructor(e){var t;super(),qr.getElementById("svelte-16mo2c-style")||((t=O("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",T(qr.head,t)),Se(this,e,ui,di,A,{required:26,disabled:0,readonly:27,id:28,item:3,value:1,refValue:25,currency:2},[-1,-1])}}function fi(e){let t,n,r,i=e[11]&&function(e){let t,n;return{c(){t=O("span"),n=k(e[4]),V(t,"class","item")},m(e,r){N(e,t,r),T(t,n)},p(e,t){16&t[0]&&U(n,e[4])},d(e){e&&R(t)}}}(e),o=e[14]&&function(e){let t,n,r,i,o;return n=new Me({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title","Übernehmen"),V(t,"class","pointer feather svelte-1fuww0c")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[17]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}(e);return{c(){i&&i.c(),t=x(),o&&o.c(),n=B()},m(e,s){i&&i.m(e,s),N(e,t,s),o&&o.m(e,s),N(e,n,s),r=!0},p(e,t){e[11]&&i.p(e,t),e[14]&&o.p(e,t)},i(e){r||(pe(o),r=!0)},o(e){we(o),r=!1},d(e){i&&i.d(e),e&&R(t),o&&o.d(e),e&&R(n)}}}function mi(e){let t,n,r;return n=new e[9]({props:{withItem:!0,itemLeft:!0,lang:e[10].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[8],step:e[12],pattern:e[6],placeholder:e[13],readonly:e[7],disabled:e[3],required:e[5],$$slots:{default:[fi]},$$scope:{ctx:e}}}),n.$on("change",e[15]),n.$on("focus",e[16]),{c(){t=O("div"),Ie(n.$$.fragment),z(t,"position","relative"),z(t,"max-width","10em")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};6&t[0]&&(r.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(r.id=e[0]),1&t[0]&&(r.name=e[0]),256&t[0]&&(r.value=e[8]),64&t[0]&&(r.pattern=e[6]),128&t[0]&&(r.readonly=e[7]),8&t[0]&&(r.disabled=e[3]),32&t[0]&&(r.required=e[5]),16&t[0]|8&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function gi(e,t,r){let i;const o=Z(),{TextField:s}=c;let{id:a}=t,{item:l}=t,{value:d}=t,{noForm:u=!1}=t,{classId:h}=t,{disabled:f}=t,{formnovalidate:m}=t,{currency:g}=t,{praefix:p}=t,{notifyList:w}=t;const y=JSON.parse(n.getItem("Locale")),C=["price","amount","amountValue","taxValue","total","__total"].find((e=>e===l.name?.split("-")[0]))||l.properties?.currency,E=Number("1.1").toLocaleString(y.id).substring(1,2),{properties:_={}}=l;let{min:v,max:I,step:A,pattern:$,decimals:S=0,unit:b="",placeholder:T,hint:N,readonly:R,negative:D,required:O=!1,transfer:M}=_;R=!0===R||void 0;$||($=S?`[0-9]+([${E}][0-9]{1,${S}})?`:"[0-9]*"),D&&($="-?"+$);return e.$$set=e=>{"id"in e&&r(0,a=e.id),"item"in e&&r(18,l=e.item),"value"in e&&r(19,d=e.value),"noForm"in e&&r(1,u=e.noForm),"classId"in e&&r(2,h=e.classId),"disabled"in e&&r(3,f=e.disabled),"formnovalidate"in e&&r(20,m=e.formnovalidate),"currency"in e&&r(4,g=e.currency),"praefix"in e&&r(21,p=e.praefix),"notifyList"in e&&r(22,w=e.notifyList)},e.$$.update=()=>{1048608&e.$$.dirty[0]&&r(5,O=O&&!m),524288&e.$$.dirty[0]&&r(8,i=Number(d.toString().replace(E,".")).toFixed(S).toString().replace(".",E)),4194304&e.$$.dirty[0]&&(async()=>{const e=l.properties?.value?.formula;if(e)void 0!==p&&""!==p?e?.operator?.multiply&&o("formula",{item:l}):e?.operator&&o("formula",{item:l})})()},[a,u,h,f,g,O,$,R,i,s,y,C,A,T,M,({detail:e})=>o("blur",{value:e.value}),({detail:e})=>{R||Number(d.toString().replace(E,"."))||r(8,i="")},({detail:e})=>{const t=[].concat(M.target);for(const e of t)o("record",{itemName:e,value:d}),o("listRecord",{itemName:e,decimals:l.properties?.decimals,value:d})},l,d,m,p,w]}class pi extends be{constructor(e){var t;super(),document.getElementById("svelte-1fuww0c-style")||((t=O("style")).id="svelte-1fuww0c-style",t.textContent=".feather.svelte-1fuww0c{position:absolute;top:0.75em;right:-1em;color:#4300b0}",T(document.head,t)),Se(this,e,gi,mi,A,{id:0,item:18,value:19,noForm:1,classId:2,disabled:3,formnovalidate:20,currency:4,praefix:21,notifyList:22},[-1,-1])}}const{document:wi}=Ee;function yi(e){e[34]=e[36].list,e[35]=e[36].items}function Ci(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function Ei(e,t,n){const r=e.slice();return r[40]=t[n],r[42]=n,r}function _i(e,t,n){const r=e.slice();return r[40]=t[n],r}function vi(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Ii(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y,C;yi(e),n=new e[9]({props:{outline:!0,$$slots:{default:[Ai]},$$scope:{ctx:e}}}),n.$on("click",e[31]);let E=!e[2]&&$i(e);function _(t){e[32](t)}let v={id:e[12]};void 0!==e[3]&&(v.value=e[3]),a=new e[7]({props:v}),J.push((()=>ve(a,"value",_))),a.$on("input",e[15]),u=new Ke({props:{size:"18"}});let I=e[35]?.length&&function(e){let t,n,r,i,o=!e[2]&&bi(e),s=e[35],a=[];for(let t=0;t<s.length;t+=1)a[t]=Ti(_i(e,s,t));return{c(){t=O("thead"),n=O("tr"),o&&o.c(),r=x();for(let e=0;e<a.length;e+=1)a[e].c();V(n,"class","svelte-1m010ne"),V(t,"class","svelte-1m010ne")},m(e,s){N(e,t,s),T(t,n),o&&o.m(n,null),T(n,r);for(let e=0;e<a.length;e+=1)a[e].m(n,null);i=!0},p(e,t){if(e[2]?o&&(me(),we(o,1,1,(()=>{o=null})),ge()):o?(o.p(e,t),4&t[0]&&pe(o,1)):(o=bi(e),o.c(),pe(o,1),o.m(n,r)),16384&t[0]){let r;for(s=e[35],r=0;r<s.length;r+=1){const i=_i(e,s,r);a[r]?a[r].p(i,t):(a[r]=Ti(i),a[r].c(),a[r].m(n,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=s.length}},i(e){i||(pe(o),i=!0)},o(e){we(o),i=!1},d(e){e&&R(t),o&&o.d(),D(a,e)}}}(e),A=e[34]?.length&&function(e){let t,n,r=e[34],i=[];for(let t=0;t<r.length;t+=1)i[t]=Mi(Ci(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(1138717&n[0]){let s;for(r=e[34],s=0;s<r.length;s+=1){const o=Ci(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=Mi(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),E&&E.c(),i=x(),o=O("div"),s=k("Suchen: "),Ie(a.$$.fragment),c=x(),d=O("span"),Ie(u.$$.fragment),h=x(),f=O("div"),m=O("table"),I&&I.c(),g=x(),p=O("tbody"),A&&A.c(),V(t,"class","form--buttons svelte-1m010ne"),V(d,"class","feather pointer svelte-1m010ne"),z(o,"margin-bottom","1em"),z(o,"position","relative"),V(m,"striped",""),V(m,"class","svelte-1m010ne"),V(f,"class","eList svelte-1m010ne")},m(l,_){N(l,t,_),Ae(n,t,null),T(t,r),E&&E.m(t,null),N(l,i,_),N(l,o,_),T(o,s),Ae(a,o,null),T(o,c),T(o,d),Ae(u,d,null),N(l,h,_),N(l,f,_),T(f,m),I&&I.m(m,null),T(m,g),T(m,p),A&&A.m(p,null),w=!0,y||(C=P(d,"click",e[17]),y=!0)},p(e,r){yi(e);const i={};16384&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[2]?E&&(me(),we(E,1,1,(()=>{E=null})),ge()):E?(E.p(e,r),4&r[0]&&pe(E,1)):(E=$i(e),E.c(),pe(E,1),E.m(t,null));const o={};!l&&8&r[0]&&(l=!0,o.value=e[3],ae((()=>l=!1))),a.$set(o),e[35]?.length&&I.p(e,r),e[34]?.length&&A.p(e,r)},i(e){w||(pe(n.$$.fragment,e),pe(E),pe(a.$$.fragment,e),pe(u.$$.fragment,e),pe(I),pe(A),w=!0)},o(e){we(n.$$.fragment,e),we(E),we(a.$$.fragment,e),we(u.$$.fragment,e),we(I),we(A),w=!1},d(e){e&&R(t),$e(n),E&&E.d(),e&&R(i),e&&R(o),$e(a),$e(u),e&&R(h),e&&R(f),I&&I.d(),A&&A.d(),y=!1,C()}}}function Ai(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function $i(e){let t,n;return t=new e[9]({props:{disabled:!e[34].length,filled:!0,$$slots:{default:[Si]},$$scope:{ctx:e}}}),t.$on("click",e[18](e[34])),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Si(e){let t;return{c(){t=k("Bestätigen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function bi(e){let t,n,r,i,o;return n=new He({props:{size:"20"}}),{c(){t=O("th"),Ie(n.$$.fragment),V(t,"class","svelte-1m010ne")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[19](e[34])),i=!0)},p(t,n){e=t},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Ti(e){let t,n,r=e[40]+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-1m010ne")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function Ni(e){let t,n,r,i,o,s,a,l=e[0],c=Di(e),d=e[35],u=[];for(let t=0;t<d.length;t+=1)u[t]=Oi(Ei(e,d,t));return{c(){t=O("tr"),c.c(),n=x();for(let e=0;e<u.length;e+=1)u[e].c();r=x(),V(t,"style",i=e[2]?"cursor: default;":"cursor: zoom-in;"),V(t,"title","übernimmt den Wert direkt"),V(t,"class","svelte-1m010ne"),W(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},m(i,l){N(i,t,l),c.m(t,null),T(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);T(t,r),o=!0,s||(a=P(t,"click",e[20](e[37])),s=!0)},p(s,a){if(e=s,1&a[0]&&A(l,l=e[0])?(me(),we(c,1,1,C),ge(),c=Di(e),c.c(),pe(c),c.m(t,n)):c.p(e,a),16400&a[0]){let n;for(d=e[35],n=0;n<d.length;n+=1){const i=Ei(e,d,n);u[n]?u[n].p(i,a):(u[n]=Oi(i),u[n].c(),u[n].m(t,r))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!o||4&a[0]&&i!==(i=e[2]?"cursor: default;":"cursor: zoom-in;"))&&V(t,"style",i),16385&a[0]&&W(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},i(e){o||(pe(c),o=!0)},o(e){we(c),o=!1},d(e){e&&R(t),c.d(e),D(u,e),s=!1,a()}}}function Ri(e){let t,n,r;return n=new e[11]({props:{name:e[13],data:e[39],checked:e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]),round:!0}}),{c(){t=O("td"),Ie(n.$$.fragment),V(t,"title","Wählt den Wert aus"),V(t,"class","svelte-1m010ne")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,t){const r={};1&t[0]&&(r.checked=e[0].includes(Array.isArray(e[37])?e[37][0]:e[37])),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Di(e){let t,n,r=!e[2]&&Ri(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,n){e[2]?r&&(me(),we(r,1,1,(()=>{r=null})),ge()):r?(r.p(e,n),4&n[0]&&pe(r,1)):(r=Ri(e),r.c(),pe(r,1),r.m(t.parentNode,t))},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Oi(e){let t,n,r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"";return{c(){t=O("td"),n=k(r),V(t,"class","svelte-1m010ne")},m(e,r){N(e,t,r),T(t,n)},p(e,t){16&t[0]&&r!==(r=(Array.isArray(e[37])?e[37][e[42]]:e[4][e[39]]?e[4][e[39]][e[42]]:e[37])+"")&&U(n,r)},d(e){e&&R(t)}}}function Mi(e){let t,n,r=e[16](e[37],e[3]),i=r&&Ni(e);return{c(){i&&i.c(),t=B()},m(e,r){i&&i.m(e,r),N(e,t,r),n=!0},p(e,n){8&n[0]&&(r=e[16](e[37],e[3])),r?i?(i.p(e,n),8&n[0]&&pe(i,1)):(i=Ni(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),we(i,1,1,(()=>{i=null})),ge())},i(e){n||(pe(i),n=!0)},o(e){we(i),n=!1},d(e){i&&i.d(e),e&&R(t)}}}function ki(e){let t,n;return t=new e[6]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xi(e){let t,n,r,i;t=new e[10]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:ki,then:Ii,catch:vi,value:36,blocks:[,,,]};return ye(e[14](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function Bi(e){let t,n;return t=new e[8]({props:{title:e[1]||"Auswahl",class:"eList",$$slots:{default:[xi]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};2&n[0]&&(r.title=e[1]||"Auswahl"),29&n[0]|16384&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Pi(e,n,r){const i=Z(),{Loading:o,TextField:s,Dialog:a,Button:l,Divider:d,Checkbox:u}=c;let{classId:h}=n,{id:f}=n,{designation:m}=n,{selection:g}=n,{refDoc:p}=n,{tableName:w}=n,{idName:y}=n,{target:C}=n,{view:E}=n,{unique:_}=n,{uniqueView:v}=n,{status:I}=n,{single:A}=n;g||=[];let $="",S=h+Math.floor(9e3*Math.random()+1e3).toString()+"search",b=[];const T=w+y+C+"checkbox",N=(e,t)=>e>t?1:t>e?-1:0;q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(S)?.focus()}),200)}));return e.$$set=e=>{"classId"in e&&r(22,h=e.classId),"id"in e&&r(23,f=e.id),"designation"in e&&r(1,m=e.designation),"selection"in e&&r(0,g=e.selection),"refDoc"in e&&r(24,p=e.refDoc),"tableName"in e&&r(25,w=e.tableName),"idName"in e&&r(26,y=e.idName),"target"in e&&r(21,C=e.target),"view"in e&&r(27,E=e.view),"unique"in e&&r(28,_=e.unique),"uniqueView"in e&&r(29,v=e.uniqueView),"status"in e&&r(30,I=e.status),"single"in e&&r(2,A=e.single)},[g,m,A,$,b,i,o,s,a,l,d,u,S,T,async()=>{let e=[],n=[],i={};if(r(4,b=[]),y)if(E){if(f){const n=h.split("-")[1].slice(0,-4),r="input."+h+"[name='_id']",o=document.querySelector(r).value;i={[y]:f},I&&(i.$or=[{status:!0},{[n]:o}]),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const r=e=>(e[n]||"z").toString()+e[C];return N(r(e),r(t))}))}}else v?f&&(i={[y]:f,status:!0},Object.entries(v).map((([e,t])=>{t?.length&&(i[e]={$in:t}),n.push(e)})),e=await t.getSectionView(w,i),e=e.sort(((e,t)=>{const n=e=>(g.includes(e[C])?"0-":"1-")+e[C];return N(n(e),n(t))})),r(4,b=e.map((e=>{const t=[e[C]];return n.map((n=>t.push(e[n]))),t})))):_?(e=await t.getSection(w,y,f,_),e=e.sort(((e,t)=>N(e,t)))):(e=await t.getSection(w,y,f,!1,I),e=e.sort(((e,t)=>{const n=e=>(g.includes(e[C])?"0-":"1-")+e[C];return N(n(e),n(t))})));else i={},f&&!Array.isArray(f)&&(i._id=f),e=await t.getSectionView(w,i);const o=await t.getSchemaByClass(w),s=[];if(p){const t=o.items[0].name,n=o.items[1].name,i=o.list[0].name,s=e.find((e=>e[t]===p));e=s?s[i]:[],r(21,C=n)}let a;return e.map((e=>{let t=e[C];if(t||w!==C||(r(21,C=o.items[0].name),t=e[C]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),s.push(t||[])}else p&&(t=o.list[0].item.map((t=>e[t.name]||""))),s.push(t||[])})),a=p?o.list[0].item.map((e=>e.designation)):[o.items.find((e=>e.name===C))?.designation],n=n.map((e=>o.items.find((t=>t.name===e))?.designation)),{list:p?s:s.flat(),items:[...a,...n]}},({detail:{value:e}})=>{r(3,$=e)},(e,t)=>{if(!t)return!0;return!!(Array.isArray(e)?e.join(" "):e).toLowerCase().includes(t.toLowerCase())},()=>{r(3,$="")},e=>()=>{const t=document.getElementsByName(T),n=[];t.forEach(((t,r)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(T).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{if("TD"===t.target?.nodeName){const t=Array.isArray(e)?e[0]:e;A?i("choose",{list:[].concat(t)}):(r(0,g=g.includes(t)?g.filter((e=>e!==t)):g.concat(t)),i("choose",{list:g}))}},C,h,f,p,w,y,E,_,v,I,()=>i("back"),function(e){$=e,r(3,$)}]}class Li extends be{constructor(e){var t;super(),wi.getElementById("svelte-1m010ne-style")||((t=O("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",T(wi.head,t)),Se(this,e,Pi,Bi,A,{classId:22,id:23,designation:1,selection:0,refDoc:24,tableName:25,idName:26,target:21,view:27,unique:28,uniqueView:29,status:30,single:2},[-1,-1])}}const{document:Fi}=Ee;function Vi(e){let t,n,r,i,o,s=e[7].length+"";return{c(){t=O("span"),n=k("("),r=k(s),i=k(")"),V(t,"class",o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,o){N(e,t,o),T(t,n),T(t,r),T(t,i)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&U(r,s),2&n[0]&&o!==(o=S(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&V(t,"class",o)},d(e){e&&R(t)}}}function Ui(e){let t;return{c(){t=O("div"),V(t,"class","load-more-options"),V(t,"slot","load-more-options-message")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Hi(e){let t,n,r,i;const o=[Gi,Wi,zi],s=[];function a(e,t){return!e[16].single&&e[7]?.length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=a(e))&&(n=s[t]=o[t](e)),{c(){n&&n.c(),r=B()},m(e,n){~t&&s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(me(),we(s[l],1,1,(()=>{s[l]=null})),ge()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){~t&&s[t].d(e),e&&R(r)}}}function zi(e){let t,n,r,i,o;return n=new Me({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title","Übernehmen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[26]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Wi(e){let t,n,r,i,o;return n=new Ge({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title",e[17].title||"Generieren"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[25]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Gi(e){let t,n,r,i,o;return n=new Ke({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"title","Löschen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[27]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function ji(e){let t,n,r;function i(t){e[37](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Xi]},$$scope:{ctx:e}};return void 0!==e[10]&&(o.open=e[10]),t=new e[11]({props:o}),J.push((()=>ve(t,"open",i))),{c(){Ie(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};53&r[0]|32768&r[1]&&(i.$$scope={dirty:r,ctx:e}),!n&&1024&r[0]&&(n=!0,i.open=e[10],ae((()=>n=!1))),t.$set(i)},i(e){r||(pe(t.$$.fragment,e),r=!0)},o(e){we(t.$$.fragment,e),r=!1},d(e){$e(t,e)}}}function Xi(e){let t,n;return t=new Li({props:{classId:e[2],selection:e[0],refDoc:e[19],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[21]||e[20]],tableName:e[20],idName:e[21],designation:e[4].designation,target:e[4].name,single:e[16].single}}),t.$on("choose",e[24]),t.$on("back",e[23]),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4&n[0]&&(r.classId=e[2]),1&n[0]&&(r.selection=e[0]),16&n[0]&&(r.unique=e[16].unique&&e[4].name),32&n[0]&&(r.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(r.id=e[5][e[21]||e[20]]),16&n[0]&&(r.designation=e[4].designation),16&n[0]&&(r.target=e[4].name),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function qi(e){let t,n,r,i,o,s,a,l,c,d=!e[16].single&&e[7]?.length&&Vi(e);function u(t){e[35](t)}function h(t){e[36](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:Yi,minSearchLength:"3",$$slots:{"load-more-options-message":[Ui]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),r=new e[12]({props:f}),J.push((()=>ve(r,"selection",u))),J.push((()=>ve(r,"maxOptions",h))),r.$on("change",e[22]);let m=!e[1]&&Hi(e),g=e[10]&&ji(e);return{c(){t=O("div"),d&&d.c(),n=x(),Ie(r.$$.fragment),s=x(),m&&m.c(),a=x(),g&&g.c(),l=B(),z(t,"position","relative")},m(e,i){N(e,t,i),d&&d.m(t,null),T(t,n),Ae(r,t,null),T(t,s),m&&m.m(t,null),N(e,a,i),g&&g.m(e,i),N(e,l,i),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Vi(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const a={};8&s[0]&&(a.id=e[3]),8&s[0]&&(a.name=e[3]),8&s[0]&&(a.class=e[3]),2&s[0]&&(a.disabled=e[1]),64&s[0]&&(a.required=e[6]),256&s[0]&&(a.placeholder=e[8]),32768&s[1]&&(a.$$scope={dirty:s,ctx:e}),!i&&128&s[0]&&(i=!0,a.selection=e[7],ae((()=>i=!1))),!o&&512&s[0]&&(o=!0,a.maxOptions=e[9],ae((()=>o=!1))),r.$set(a),e[1]?m&&(me(),we(m,1,1,(()=>{m=null})),ge()):m?(m.p(e,s),2&s[0]&&pe(m,1)):(m=Hi(e),m.c(),pe(m,1),m.m(t,null)),e[10]?g?(g.p(e,s),1024&s[0]&&pe(g,1)):(g=ji(e),g.c(),pe(g,1),g.m(l.parentNode,l)):g&&(me(),we(g,1,1,(()=>{g=null})),ge())},i(e){c||(pe(r.$$.fragment,e),pe(m),pe(g),c=!0)},o(e){we(r.$$.fragment,e),we(m),we(g),c=!1},d(e){e&&R(t),d&&d.d(),$e(r),m&&m.d(),e&&R(a),g&&g.d(e),e&&R(l)}}}async function*Yi(e){yield[{name:e}]}function Zi(e,n,r){const i=Z(),{Modal:o,Autocomplete:s}=c;let{classId:a}=n,{id:l}=n,{item:d}=n,{record:u}=n,{value:h}=n,{noForm:f=!1}=n,{disabled:m}=n,{formnovalidate:g}=n,{numberInput:p}=n,{praefix:w}=n,{toDelete:y}=n,{reqQuantity:C}=n,{notifyList:E}=n;const{properties:_={}}=d;let{placeholder:v,hint:I,readonly:A,required:$=!1,lookup:S="",view:b=!1,multi:T,max:N=1e3,generate:R=!1,status:D=!0,refDoc:O}=_;const[M,k]=S.split(":");let x=!1,B=h.map&&h.map((e=>({name:e})))||[];m||=A,m&&(v="");const P=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),r(7,B=t.map((e=>({name:e.trim()}))));const n=B.map((e=>e.name));i("blur",{value:n}),i("multi",{view:T.view,lookup:S,name:d.name,value:n})};q((async()=>{i("multi",{view:T.view,lookup:S,name:d.name,value:h});const e=document.getElementById(l);e.classList.add(a),!A&&S&&e.addEventListener("focus",L)}));const L=()=>{if(S){document.getElementById(l).blur();const e=C||N;(T.unique||B.length<e)&&r(10,x=!0)}},F=()=>{r(10,x&&=!1)},V=({detail:e})=>{const t=e.list.map((e=>Array.isArray(e)?e[0]:e));r(7,B=t.map((e=>({name:e})))),i("blur",{value:t}),i("multi",{view:T.view,lookup:S,name:d.name,value:t}),F()},U=async()=>{const e={[k]:u[k]},n=await t.getSectionView(M,e),r=Array.from({length:n.length},((e,t)=>n[t][d.name]));V({detail:{name:d.name,list:r}})},H=(e=!1)=>{if(m||!T.required)return;const t=T.maxItem;if(!t||T.unique)return;r(9,N=!1!==e?e:C||u[t]||0);const n=B?.length!=N,o=document.getElementById(l);o?.classList?.toggle("invalid",n),i("invalid",{idx:w,value:n})};return e.$$set=e=>{"classId"in e&&r(2,a=e.classId),"id"in e&&r(3,l=e.id),"item"in e&&r(4,d=e.item),"record"in e&&r(5,u=e.record),"value"in e&&r(0,h=e.value),"noForm"in e&&r(28,f=e.noForm),"disabled"in e&&r(1,m=e.disabled),"formnovalidate"in e&&r(29,g=e.formnovalidate),"numberInput"in e&&r(30,p=e.numberInput),"praefix"in e&&r(31,w=e.praefix),"toDelete"in e&&r(32,y=e.toDelete),"reqQuantity"in e&&r(33,C=e.reqQuantity),"notifyList"in e&&r(34,E=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&r(7,B=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&r(7,B=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&y&&y===d.name&&r(7,B=[]),128&e.$$.dirty[0]&&B&&(r(0,h=B.map&&B.map((e=>e.name))||[]),H()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:r}=e;void 0!==w&&w!==r||t&&t.name===T.maxItem&&H(n)})(p),536870976&e.$$.dirty[0]&&r(6,$=$&&!g),8&e.$$.dirty[1]&&(async e=>{if(void 0===w)return;const{itemName:n,value:o}=e||{};if(!o)return;if(!d.refItem)return;if(d.refItem?.split(".")[0]!==n)return;let[s,a]=d.refItem.split(".");if(Array.isArray(o)){if(s=s.slice(0,-1),!o.length)return i("record",{itemName:"quantity",value:0}),void r(7,B=[]);const e={_id:{$in:o}},n=await t.getSectionView(s,e);let l=[];for(const e of n)e[a]&&(l=l.concat(e[a][0][d.name]));if(!l.length)return;i("record",{itemName:"quantity",value:l.length}),r(7,B=l.map((e=>({name:e})))),P({detail:{value:B}})}else{const e=await t.getTask(s,o);if(!e||!e[a])return;const n=e[a];if(!Array.isArray(n)&&!n.length)return;const l=n[w][d.name];i("record",{itemName:"quantity",value:l?.length||0}),r(7,B=l&&l.map((e=>({name:e}))))}setTimeout(H,250)})(E)},[h,m,a,l,d,u,$,B,v,N,x,o,s,A,S,b,T,R,D,O,M,k,P,F,V,()=>{const e=u[R.itemQuantity]||C;if(!e)return;const t=R.prefix||"",n=u[R.variable]||"",r=R.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(r,"0")));V({detail:{name:d.name,list:i}})},async()=>{if(!0===b)return U();const e=C||u[T.maxItem];if(!e)return;let n={};k&&(n={[k]:u[k]}),D&&(n.status=!0);const r=[].concat(u[T.view]||[]);r.length&&(n[T.view]={$in:r});const i=await t.getSectionView(M,n),o=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));V({detail:{name:d.name,list:o}})},()=>{V({detail:{name:d.name,list:[]}})},f,g,p,w,y,C,E,function(e){B=e,r(7,B),r(5,u),r(4,d),r(32,y)},function(e){N=e,r(9,N)},function(e){x=e,r(10,x)}]}class Ki extends be{constructor(e){var t;super(),Fi.getElementById("svelte-1rbaejz-style")||((t=O("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",T(Fi.head,t)),Se(this,e,Zi,qi,A,{classId:2,id:3,item:4,record:5,value:0,noForm:28,disabled:1,formnovalidate:29,numberInput:30,praefix:31,toDelete:32,reqQuantity:33,notifyList:34},[-1,-1])}}function Qi(e){let t,n,r;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Ji(e){let t,n,r,i,o;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[9]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function eo(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const a=[Ji,Qi],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}const to=e("getMapLink",(async e=>{const{street:n,houseNo:r,postcode:i,location:o,country:s}=e,a=[n&&r?n+" "+r:n,i&&o?i+" "+o:i||o||"",s&&(await t.getTask("country",s)).designation].filter((e=>!!e)).join(", ");return"https://bing.com/maps/default.aspx?where1="+encodeURIComponent(a)}));function no(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{record:f}=t,{item:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"record"in e&&n(10,f=e.record),"item"in e&&n(11,m=e.item)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;const e=u.includes(".")?f[u.split(".")[0]]:f,t=await to(e);window.open(t,"_blank")},f,m,function(t){K(e,t)}]}class ro extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,no,eo,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}const{document:io}=Ee;function oo(e){let t;return{c(){t=O("div"),V(t,"class","load-more-options"),V(t,"slot","load-more-options-message")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function so(e){let t,n,r;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-wpjws5")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function ao(e){let t,n,r,i,o;return n=new ht({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-wpjws5")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[8]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function lo(e){let t,n,r,i,o,s,a;function l(t){e[17](t)}function c(t){e[18](t)}function d(t){e[19](t)}let u={id:e[1],name:e[1],class:e[1],minSearchLength:"1",maxOptions:"1",getOptions:e[7],$$slots:{"load-more-options-message":[oo]},$$scope:{ctx:e}};void 0!==e[0]&&(u.value=e[0]),void 0!==e[2]&&(u.selection=e[2]),void 0!==e[3]&&(u.searchQuery=e[3]),n=new e[4]({props:u}),J.push((()=>ve(n,"value",l))),J.push((()=>ve(n,"selection",c))),J.push((()=>ve(n,"searchQuery",d))),n.$on("change",e[6]);let h=e[5]&&function(e){let t,n,r,i;const o=[ao,so],s=[];function a(e,t){return e[0]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=B()},m(e,n){s[t].m(e,n),N(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(me(),we(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),pe(n,1),n.m(r.parentNode,r))},i(e){i||(pe(n),i=!0)},o(e){we(n),i=!1},d(e){s[t].d(e),e&&R(r)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),s=x(),h&&h.c(),z(t,"position","relative"),V(t,"class","inputAutoComplete")},m(e,r){N(e,t,r),Ae(n,t,null),T(t,s),h&&h.m(t,null),a=!0},p(e,t){const s={};2&t[0]&&(s.id=e[1]),2&t[0]&&(s.name=e[1]),2&t[0]&&(s.class=e[1]),8&t[1]&&(s.$$scope={dirty:t,ctx:e}),!r&&1&t[0]&&(r=!0,s.value=e[0],ae((()=>r=!1))),!i&&4&t[0]&&(i=!0,s.selection=e[2],ae((()=>i=!1))),!o&&8&t[0]&&(o=!0,s.searchQuery=e[3],ae((()=>o=!1))),n.$set(s),e[5]&&h.p(e,t)},i(e){a||(pe(n.$$.fragment,e),pe(h),a=!0)},o(e){we(n.$$.fragment,e),we(h),a=!1},d(e){e&&R(t),$e(n),h&&h.d()}}}function co(e,t,n){const{Autocomplete:r}=c,i=Z();let{classId:o}=t,{id:s}=t,{item:a}=t,{name:l}=t,{listName:d}=t,{record:u}=t,{value:h}=t,{noForm:f=!1}=t,{disabled:m}=t,{formnovalidate:g}=t;const{autocomplete:{input:p,min:w,url:y,output:C},format:E}=a.properties,_=[].concat(p),{name:v}=C,I="map"===E;let A,$=h,S=!1;q((()=>{const e=document.querySelector("."+a.name+" .autocomplete input");e&&(e.addEventListener("focus",T),e.addEventListener("keydown",b));const t=document.getElementById(s);t&&t.classList.add(o)}));const b=e=>{S=8===e.keyCode||32===e.keyCode,S&&n(3,$=h)},T=async()=>{if(w){const e=_[0].name;if((d?u[d][e]:u[e]).length!==w)return}const e=await N();if(e?.length)if(1===e.length){if(h.startsWith(e[0].name))return;n(3,$=n(0,h=e[0].name)),D(h)}else e.find((e=>($||"").startsWith(e.name)))||h||n(3,$=" ");else h||n(3,$="")},N=async(e="")=>{const t=await fetch(y+"?"+R()+"&name=%5E"+e.trim());if(!t.ok)return;const n=t.headers.get("Content-Type").split(";")[0];let r=[];try{if("text/json"===n){const e=await t.text();r=JSON.parse(e||[])}else"application/json"===n&&(r=await t.json())}catch{}return r.map((e=>({name:e[v]})))},R=()=>_.map((({name:e,refItem:t})=>`${t}=${(d?u[d][e]:u[e]).split(" ")[0]}`)).join("&"),D=e=>{i("blur",{value:e})};return e.$$set=e=>{"classId"in e&&n(9,o=e.classId),"id"in e&&n(1,s=e.id),"item"in e&&n(10,a=e.item),"name"in e&&n(11,l=e.name),"listName"in e&&n(12,d=e.listName),"record"in e&&n(13,u=e.record),"value"in e&&n(0,h=e.value),"noForm"in e&&n(14,f=e.noForm),"disabled"in e&&n(15,m=e.disabled),"formnovalidate"in e&&n(16,g=e.formnovalidate)},[h,s,A,$,r,I,({detail:{value:e}})=>{e.length&&n(3,$=n(0,h=e[0].name)),n(2,A=[]),D(h)},async function*(e){if(S||h&&e.startsWith(h))return n(0,h=e),void D(h);const t=await N(e);if(!t?.length)return n(0,h=e),void D(h);1===t.length?(n(3,$=n(0,h=t[0].name)),n(2,A=[]),D(h)):yield t},async()=>{if(!h)return;const e=l.includes(".")?u[l.split(".")[0]]:u,t=await to(e);window.open(t,"_blank")},o,a,l,d,u,f,m,g,function(e){h=e,n(0,h)},function(e){A=e,n(2,A)},function(e){$=e,n(3,$)}]}class uo extends be{constructor(e){var t;super(),io.getElementById("svelte-wpjws5-style")||((t=O("style")).id="svelte-wpjws5-style",t.textContent=".feather.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-wpjws5{position:absolute;top:1em;left:0.5em;color:light-gray;margin-left:-2em}.inputAutoComplete .autocomplete .chip,.inputAutoComplete .autocomplete .shown-on-focus{display:none !important}",T(io.head,t)),Se(this,e,co,lo,A,{classId:9,id:1,item:10,name:11,listName:12,record:13,value:0,noForm:14,disabled:15,formnovalidate:16},[-1,-1])}}const{document:ho}=Ee;function fo(e){e[26]=e[28].list,e[27]=e[28].items}function mo(e,t,n){const r=e.slice();return r[29]=t[n],r}function go(e,t,n){const r=e.slice();return r[32]=t[n],r}function po(e,t,n){const r=e.slice();return r[32]=t[n],r}function wo(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function yo(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function C(t){e[23](t)}fo(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Co]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let E={id:e[8]};void 0!==e[1]&&(E.value=e[1]),s=new e[6]({props:E}),J.push((()=>ve(s,"value",C))),s.$on("input",e[12]),d=new Ke({props:{size:"18"}});let _=e[27]?.length&&function(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=Eo(po(e,r,t));return{c(){t=O("thead"),n=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let o;for(r=e[27],o=0;o<r.length;o+=1){const s=po(e,r,o);i[o]?i[o].p(s,t):(i[o]=Eo(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&R(t),D(i,e)}}}(e),v=e[26]?.length&&function(e){let t,n=e[26],r=[];for(let t=0;t<n.length;t+=1)r[t]=Io(mo(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=B()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);N(e,t,n)},p(e,i){if(11779&i[0]){let o;for(n=e[26],o=0;o<n.length;o+=1){const s=mo(e,n,o);r[o]?r[o].p(s,i):(r[o]=Io(s),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){D(r,e),e&&R(t)}}}(e);return{c(){t=O("div"),Ie(n.$$.fragment),r=x(),i=O("div"),o=k("Suchen: "),Ie(s.$$.fragment),l=x(),c=O("span"),Ie(d.$$.fragment),u=x(),h=O("div"),f=O("table"),_&&_.c(),m=x(),g=O("tbody"),v&&v.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),z(i,"margin-bottom","1em"),z(i,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(h,"class","eList svelte-14hcfjl")},m(a,C){N(a,t,C),Ae(n,t,null),N(a,r,C),N(a,i,C),T(i,o),Ae(s,i,null),T(i,l),T(i,c),Ae(d,c,null),N(a,u,C),N(a,h,C),T(h,f),_&&_.m(f,null),T(f,m),T(f,g),v&&v.m(g,null),p=!0,w||(y=P(c,"click",e[14]),w=!0)},p(e,t){fo(e);const r={};64&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r);const i={};!a&&2&t[0]&&(a=!0,i.value=e[1],ae((()=>a=!1))),s.$set(i),e[27]?.length&&_.p(e,t),e[26]?.length&&v.p(e,t)},i(e){p||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!0)},o(e){we(n.$$.fragment,e),we(s.$$.fragment,e),we(d.$$.fragment,e),p=!1},d(e){e&&R(t),$e(n),e&&R(r),e&&R(i),$e(s),$e(d),e&&R(u),e&&R(h),_&&_.d(),v&&v.d(),w=!1,y()}}}function Co(e){let t;return{c(){t=k("Abbrechen")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Eo(e){let t,n,r=e[32]?.designation+"";return{c(){t=O("th"),n=k(r),V(t,"class","svelte-14hcfjl")},m(e,r){N(e,t,r),T(t,n)},p:C,d(e){e&&R(t)}}}function _o(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=vo(go(e,r,t));return{c(){t=O("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=x(),V(t,"class","pointer svelte-14hcfjl"),W(t,"active",e[29]._id===e[0])},m(e,r){N(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);T(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[27],s=0;s<r.length;s+=1){const a=go(e,r,s);i[s]?i[s].p(a,o):(i[s]=vo(a),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}2049&o[0]&&W(t,"active",e[29]._id===e[0])},d(e){e&&R(t),D(i,e)}}}function vo(e){let t,n,r,i,o=e[9](e[29],e[32])+"";return{c(){t=O("td"),n=k(o),V(t,"class","svelte-14hcfjl")},m(o,s){N(o,t,s),T(t,n),r||(i=P(t,"click",F(e[10](e[29]))),r=!0)},p(t,n){e=t},d(e){e&&R(t),r=!1,i()}}}function Io(e){let t,n=e[13](e[29],e[27],e[1]),r=n&&_o(e);return{c(){r&&r.c(),t=B()},m(e,n){r&&r.m(e,n),N(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?r?r.p(e,i):(r=_o(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&R(t)}}}function Ao(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:C,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function $o(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ao,then:yo,catch:wo,value:28,blocks:[,,,]};return ye(e[11](),o),{c(){Ie(t.$$.fragment),n=x(),r=B(),o.block.c()},m(e,s){Ae(t,e,s),N(e,n,s),N(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){Ce(o,e=t,n)},i(e){i||(pe(t.$$.fragment,e),pe(o.block),i=!0)},o(e){we(t.$$.fragment,e);for(let e=0;e<3;e+=1){we(o.blocks[e])}i=!1},d(e){$e(t,e),e&&R(n),e&&R(r),o.block.d(e),o.token=null,o=null}}}function So(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[$o]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};3&n[0]|64&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function bo(e,n,i){const o=Z(),{Dialog:s,Divider:a,Loading:l,TextField:d,Button:u}=c;let{item:h}=n,{className:f}=n,{classId:g}=n,{rowId:w}=n,{viewName:y}=n,{viewValue:C}=n,{recordId:E}=n,{filter:_}=n,v="",I=g+Math.floor(9e3*Math.random()+1e3).toString()+"search";const A=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},$=t.getSchemaByClass(f);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(I)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await $;e.eventId===t.id&&jd(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,h=e.item),"className"in e&&i(16,f=e.className),"classId"in e&&i(17,g=e.classId),"rowId"in e&&i(0,w=e.rowId),"viewName"in e&&i(18,y=e.viewName),"viewValue"in e&&i(19,C=e.viewValue),"recordId"in e&&i(20,E=e.recordId),"filter"in e&&i(21,_=e.filter)},[w,v,o,s,a,l,d,u,I,A,e=>()=>o("choose",{row:e}),async()=>{const e=await $,n="."+g+"#"+y;document.querySelector(n);let r={[y]:C},i=[];r[y]&&(i=await t.getSectionView(e.class,r,!0)),_&&(i=i.filter((e=>e._id!=_)));const o=e.display;return{list:i,items:await Ut(o,e,i)}},({detail:{value:e}})=>{i(1,v=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(A(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,v="")},h,f,g,y,C,E,_,()=>o("back"),function(e){v=e,i(1,v)}]}class To extends be{constructor(e){var t;super(),ho.getElementById("svelte-14hcfjl-style")||((t=O("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",T(ho.head,t)),Se(this,e,bo,So,A,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function No(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Ro(e){let t,n,r,i,o;function s(t){e[21](t)}let a={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(a.value=e[0]),n=new e[10]({props:a}),J.push((()=>ve(n,"value",s)));let l=!e[6]&&Do(e);return{c(){t=O("div"),Ie(n.$$.fragment),i=x(),l&&l.c(),z(t,"position","relative")},m(e,r){N(e,t,r),Ae(n,t,null),T(t,i),l&&l.m(t,null),o=!0},p(e,i){const o={};4&i&&(o.id=e[2]),8&i&&(o.name=e[3].name),34&i&&(o.inputClass=e[5]||e[1]),64&i&&(o.disabled=e[6]),128&i&&(o.formnovalidate=e[7]),!r&&1&i&&(r=!0,o.value=e[0],ae((()=>r=!1))),n.$set(o),e[6]?l&&(me(),we(l,1,1,(()=>{l=null})),ge()):l?(l.p(e,i),64&i&&pe(l,1)):(l=Do(e),l.c(),pe(l,1),l.m(t,null))},i(e){o||(pe(n.$$.fragment,e),pe(l),o=!0)},o(e){we(n.$$.fragment,e),we(l),o=!1},d(e){e&&R(t),$e(n),l&&l.d()}}}function Do(e){let t,n,r,i,o;return n=new _t({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-wbrqzu")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[17]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Oo(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Mo(e){let t,n,r;function i(t){e[22](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[ko]},$$scope:{ctx:e}};return void 0!==e[8]&&(o.open=e[8]),t=new e[11]({props:o}),J.push((()=>ve(t,"open",i))),{c(){Ie(t.$$.fragment)},m(e,n){Ae(t,e,n),r=!0},p(e,r){const i={};268435994&r&&(i.$$scope={dirty:r,ctx:e}),!n&&256&r&&(n=!0,i.open=e[8],ae((()=>n=!1))),t.$set(i)},i(e){r||(pe(t.$$.fragment,e),r=!0)},o(e){we(t.$$.fragment,e),r=!1},d(e){$e(t,e)}}}function ko(e){let t,n;return t=new To({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(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8&n&&(r.item=e[3]),8&n&&(r.className=e[3].refClass),2&n&&(r.classId=e[1]),16&n&&(r.recordId=e[4]._id),512&n&&(r.viewValue=e[9]),16&n&&(r.filter=e[4]._id),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xo(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Oo,then:Ro,catch:No,value:27,blocks:[,,,]};ye(e[16](),i);let o=e[8]&&Mo(e);return{c(){i.block.c(),t=x(),o&&o.c(),n=B()},m(e,s){i.block.m(e,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,N(e,t,s),o&&o.m(e,s),N(e,n,s),r=!0},p(t,[r]){Ce(i,e=t,r),e[8]?o?(o.p(e,r),256&r&&pe(o,1)):(o=Mo(e),o.c(),pe(o,1),o.m(n.parentNode,n)):o&&(me(),we(o,1,1,(()=>{o=null})),ge())},i(e){r||(pe(i.block),pe(o),r=!0)},o(e){for(let e=0;e<3;e+=1){we(i.blocks[e])}we(o),r=!1},d(e){i.block.d(e),i.token=null,i=null,e&&R(t),o&&o.d(e),e&&R(n)}}}function Bo(e,t,n){const{TextField:r,Modal:i}=c;let{classId:o}=t,{id:s}=t,{item:a}=t,{record:l}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:h}=t,{formnovalidate:f}=t,{praefix:m}=t;const{properties:g={}}=a;let p,{pattern:w,placeholder:y,readonly:C,required:E=!1,view:_}=g,v=!1;const I=()=>{n(8,v=!1)};return e.$$set=e=>{"classId"in e&&n(1,o=e.classId),"id"in e&&n(2,s=e.id),"item"in e&&n(3,a=e.item),"record"in e&&n(4,l=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,h=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,m=e.praefix)},[d,o,s,a,l,u,h,f,v,p,r,i,w,C,E,_,async()=>(n(9,p=l[_.selection]),!0),()=>{n(8,v=!0)},({detail:e})=>{n(0,d=e.row[_.value?_.value:"_id"]),I()},I,m,function(e){d=e,n(0,d)},function(e){v=e,n(8,v)}]}class Po extends be{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=O("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",T(document.head,t)),Se(this,e,Bo,xo,A,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Lo(e,t,n){const r=e.slice();return r[12]=t[n][0],r[13]=t[n][1],r}function Fo(e){let t;return{c(){t=O("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Vo(e){let t;return{c(){t=O("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Uo(e){let t,n,r,i,o=e[12]+"";return{c(){t=O("option"),n=k(o),t.__value=r=e[13],t.value=t.__value,t.selected=i=e[0]==e[13]},m(e,r){N(e,t,r),T(t,n)},p(e,s){64&s&&o!==(o=e[12]+"")&&U(n,o),64&s&&r!==(r=e[13])&&(t.__value=r,t.value=t.__value),65&s&&i!==(i=e[0]==e[13])&&(t.selected=i)},d(e){e&&R(t)}}}function Ho(e){let t,n,r,i,o,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Vo:Fo}let r=n(e),i=r(e);return{c(){i.c(),t=B()},m(e,n){i.m(e,n),N(e,t,n)},p(e,o){r!==(r=n(e))&&(i.d(1),i=r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i.d(e),e&&R(t)}}}(e),a=e[6],l=[];for(let t=0;t<a.length;t+=1)l[t]=Uo(Lo(e,a,t));return{c(){t=O("select"),s&&s.c(),n=B();for(let e=0;e<l.length;e+=1)l[e].c();V(t,"class",r=S(e[3]||e[4])+" svelte-5xpzvo"),V(t,"id",e[2]),V(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(r,a){N(r,t,a),s&&s.m(t,null),T(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);i||(o=P(t,"change",e[9]),i=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let r;for(a=e[6],r=0;r<a.length;r+=1){const i=Lo(e,a,r);l[r]?l[r].p(i,n):(l[r]=Uo(i),l[r].c(),l[r].m(t,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=a.length}24&n&&r!==(r=S(e[3]||e[4])+" svelte-5xpzvo")&&V(t,"class",r),4&n&&V(t,"id",e[2]),4&n&&V(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:C,o:C,d(e){e&&R(t),s&&s.d(),D(l,e),i=!1,o()}}}function zo(e,t,n){const r=Z();let{id:i}=t,{item:o}=t,{value:s}=t,{noForm:a=!1}=t,{classId:l}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:h,readonly:f}=o.properties;u&&(u=u.map((e=>[e,e]))),"valueAddedTax"===h&&(s||=0,u=[["0% Steuerbefreit",0],["8.1% Normalsatz",.081],["2.6% Reduzierter Satz",.026],["3.8% Beherbergung",.038]]),c||=!!f,c||(c=void 0);return e.$$set=e=>{"id"in e&&n(2,i=e.id),"item"in e&&n(10,o=e.item),"value"in e&&n(0,s=e.value),"noForm"in e&&n(3,a=e.noForm),"classId"in e&&n(4,l=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[s,c,i,a,l,d,u,h,f,e=>r("blur",{value:e.srcElement.value}),o]}class Wo extends be{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=O("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}",T(document.head,t)),Se(this,e,zo,Ho,A,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function Go(e){let t,n,r,i,o,s,a;return i=new e[7]({props:{value:e[0],readonly:e[4],required:e[6],disabled:e[5],closeOnSelection:!0}}),i.$on("change",e[8]),{c(){t=O("input"),r=x(),Ie(i.$$.fragment),V(t,"type","string"),V(t,"class",n=e[2]||e[3]),V(t,"id",e[1]),V(t,"name",e[1]),t.hidden=!0},m(n,l){N(n,t,l),H(t,e[0]),N(n,r,l),Ae(i,n,l),o=!0,s||(a=P(t,"input",e[13]),s=!0)},p(e,[r]){(!o||12&r&&n!==(n=e[2]||e[3]))&&V(t,"class",n),(!o||2&r)&&V(t,"id",e[1]),(!o||2&r)&&V(t,"name",e[1]),1&r&&H(t,e[0]);const s={};1&r&&(s.value=e[0]),16&r&&(s.readonly=e[4]),64&r&&(s.required=e[6]),32&r&&(s.disabled=e[5]),i.$set(s)},i(e){o||(pe(i.$$.fragment,e),o=!0)},o(e){we(i.$$.fragment,e),o=!1},d(e){e&&R(t),e&&R(r),$e(i,e),s=!1,a()}}}function jo(e,n,r){const i=Z(),{DatePicker:o}=c;let{value:s}=n,{id:a}=n,{item:l}=n,{record:d}=n,{noForm:u=!1}=n,{classId:h}=n,{eventId:f}=n,{readonly:m}=n,{disabled:g}=n,{required:p}=n,{notifyList:w}=n;s||(s=void 0);let y=null;const C=e=>{i("change",{value:e})};return e.$$set=e=>{"value"in e&&r(0,s=e.value),"id"in e&&r(1,a=e.id),"item"in e&&r(9,l=e.item),"record"in e&&r(10,d=e.record),"noForm"in e&&r(2,u=e.noForm),"classId"in e&&r(3,h=e.classId),"eventId"in e&&r(11,f=e.eventId),"readonly"in e&&r(4,m=e.readonly),"disabled"in e&&r(5,g=e.disabled),"required"in e&&r(6,p=e.required),"notifyList"in e&&r(12,w=e.notifyList)},e.$$.update=()=>{if(4096&e.$$.dirty&&(async e=>{if(null===y){const e=(await t.getEvent(f)).output.class[0].item;y=e.find((e=>e.properties?.value?.formula))}y&&y.properties.value.formula.argument[0].refItem===l.name&&(e&&e.itemName!==l.name&&e.itemName!==y.properties.value.formula.argument[1].refItem.split(".")[0]||i("formula",{item:y}))})(w),1585&e.$$.dirty&&d&&d[l.name])try{g||m||r(0,s=ir(d[l.name],s))}catch{}},[s,a,u,h,m,g,p,o,({detail:e})=>{r(0,s=ir(e.value,s)),C(s)},l,d,f,w,function(){s=this.value,r(0,s),r(10,d),r(9,l),r(5,g),r(4,m)}]}class Xo extends be{constructor(e){super(),Se(this,e,jo,Go,A,{value:0,id:1,item:9,record:10,noForm:2,classId:3,eventId:11,readonly:4,disabled:5,required:6,notifyList:12})}}function qo(e){let t;return{c(){t=k("Stunden")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Yo(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[qo]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Zo(e){let t;return{c(){t=k("Minuten")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Ko(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Zo]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Qo(e){let t;return{c(){t=k("Jetzt")},m(e,n){N(e,t,n)},d(e){e&&R(t)}}}function Jo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Qo]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){we(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function es(e){let t,n,r,i,o,s,a,l,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[Jo],"minutes-label":[Ko],"hours-label":[Yo]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=O("input"),r=x(),Ie(i.$$.fragment),o=x(),Ie(s.$$.fragment),V(t,"type","string"),V(t,"class",n=e[2]||e[3]),V(t,"id",e[1]),V(t,"name",e[1]),t.hidden=!0},m(n,d){N(n,t,d),H(t,e[0]),N(n,r,d),Ae(i,n,d),N(n,o,d),Ae(s,n,d),a=!0,l||(c=P(t,"input",e[9]),l=!0)},p(e,[r]){(!a||12&r&&n!==(n=e[2]||e[3]))&&V(t,"class",n),(!a||2&r)&&V(t,"id",e[1]),(!a||2&r)&&V(t,"name",e[1]),1&r&&H(t,e[0]);const o={};1&r&&(o.value=e[0]),i.$set(o);const l={};1&r&&(l.value=e[0]),4096&r&&(l.$$scope={dirty:r,ctx:e}),s.$set(l)},i(e){a||(pe(i.$$.fragment,e),pe(s.$$.fragment,e),a=!0)},o(e){we(i.$$.fragment,e),we(s.$$.fragment,e),a=!1},d(e){e&&R(t),e&&R(r),$e(i,e),e&&R(o),$e(s,e),l=!1,c()}}}function ts(e,t,n){const r=Z(),{Label:i,DatePicker:o,TimePicker:s}=c;let{value:a}=t,{id:l}=t,{noForm:d=!1}=t,{classId:u}=t;const h=e=>r("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,a=e.value),"id"in e&&n(1,l=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[a,l,d,u,i,o,s,({detail:e})=>{var t,r;n(0,(t=e.value,r=a,a=null==t||null==r?t:(r.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),r))),h(a)},({detail:e})=>{n(0,a=ir(e.value,a)),h(a)},function(){a=this.value,n(0,a)}]}class ns extends be{constructor(e){super(),Se(this,e,ts,es,A,{value:0,id:1,noForm:2,classId:3})}}function rs(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p;return u=new e[9]({props:{format:e[5],required:e[3],disabled:e[4],value:e[7],closeOnSelection:!0}}),u.$on("change",e[10]),f=new e[9]({props:{format:e[6],required:e[3],disabled:e[4],value:e[8],class:"moveLeft",closeOnSelection:!0}}),f.$on("change",e[11]),{c(){t=O("input"),o=x(),s=O("input"),d=x(),Ie(u.$$.fragment),h=k(" /\n"),Ie(f.$$.fragment),V(t,"type","string"),V(t,"class",n=e[1]||e[2]),V(t,"id",r=e[0]+"_from"),V(t,"name",i=e[0]+"_from"),t.hidden=!0,V(s,"type","string"),V(s,"class",a=e[1]||e[2]),V(s,"id",l=e[0]+"_to"),V(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,r){N(n,t,r),H(t,e[7]),N(n,o,r),N(n,s,r),H(s,e[8]),N(n,d,r),Ae(u,n,r),N(n,h,r),Ae(f,n,r),m=!0,g||(p=[P(t,"input",e[13]),P(s,"input",e[14])],g=!0)},p(e,[o]){(!m||6&o&&n!==(n=e[1]||e[2]))&&V(t,"class",n),(!m||1&o&&r!==(r=e[0]+"_from"))&&V(t,"id",r),(!m||1&o&&i!==(i=e[0]+"_from"))&&V(t,"name",i),128&o&&H(t,e[7]),(!m||6&o&&a!==(a=e[1]||e[2]))&&V(s,"class",a),(!m||1&o&&l!==(l=e[0]+"_to"))&&V(s,"id",l),(!m||1&o&&c!==(c=e[0]+"_to"))&&V(s,"name",c),256&o&&H(s,e[8]);const d={};32&o&&(d.format=e[5]),8&o&&(d.required=e[3]),16&o&&(d.disabled=e[4]),128&o&&(d.value=e[7]),u.$set(d);const h={};64&o&&(h.format=e[6]),8&o&&(h.required=e[3]),16&o&&(h.disabled=e[4]),256&o&&(h.value=e[8]),f.$set(h)},i(e){m||(pe(u.$$.fragment,e),pe(f.$$.fragment,e),m=!0)},o(e){we(u.$$.fragment,e),we(f.$$.fragment,e),m=!1},d(e){e&&R(t),e&&R(o),e&&R(s),e&&R(d),$e(u,e),e&&R(h),$e(f,e),g=!1,v(p)}}}function is(e,t,n){const r=Z(),{DatePicker:i}=c;let{value:o}=t,{id:s}=t,{noForm:a=!1}=t,{classId:l}=t,{required:d}=t,{disabled:u}=t,h="%d.%m.%Y",f="%d.%m.%Y",m=o?.from,g=o?.to;"Invalid Date"===m?.toString()&&(m=void 0),"Invalid Date"===g?.toString()&&(g=void 0),u&&(void 0===m&&(h=""),void 0===g&&(f=""));return e.$$set=e=>{"value"in e&&n(12,o=e.value),"id"in e&&n(0,s=e.id),"noForm"in e&&n(1,a=e.noForm),"classId"in e&&n(2,l=e.classId),"required"in e&&n(3,d=e.required),"disabled"in e&&n(4,u=e.disabled)},[s,a,l,d,u,h,f,m,g,i,({detail:e})=>{n(7,m=ir(e.value,m)),g&&m&&g.valueOf()-m.valueOf()<0&&n(7,m=void 0),r("change",{value:m,range:"_from"})},({detail:e})=>{n(8,g=ir(e.value,g)),g&&m&&g.valueOf()-m.valueOf()<0&&n(8,g=void 0),r("change",{value:g,range:"_to"})},o,function(){m=this.value,n(7,m)},function(){g=this.value,n(8,g)}]}class os extends be{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=O("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",T(document.head,t)),Se(this,e,is,rs,A,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function ss(e){let t,n,r;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:as,placeholder:ls,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=O("div"),Ie(n.$$.fragment),z(t,"max-width","4em")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p(e,[t]){const r={};4&t&&(r.inputClass=e[2]),1&t&&(r.id=e[0]),1&t&&(r.name=e[0]),2&t&&(r.value=e[1]),8&t&&(r.readonly=e[3]),16&t&&(r.disabled=e[4]),n.$set(r)},i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}const as="([01][0-9]|2[0-3]):([0-5][0-9])",ls="";function cs(e,t,n){const r=Z(),{TextField:i}=c;let{id:o}=t,{item:s}=t,{value:a}=t,{inputClass:l}=t,{readonly:d}=t,{disabled:u}=t,{praefix:h}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,o=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,a=e.value),"inputClass"in e&&n(2,l=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,h=e.praefix)},[o,a,l,d,u,i,({detail:e})=>{r("blur",{value:f(e.value)}),r("checkRange",{idx:h,fieldId:o,value:e.value})},s,h]}class ds extends be{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=O("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",T(document.head,t)),Se(this,e,cs,ss,A,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:us}=Ee;function hs(e,t,n){const r=e.slice();return r[16]=t[n],r}function fs(e,t,n){const r=e.slice();return r[19]=t[n],r[21]=n,r}function ms(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function gs(e){let t,n,r=e[15],i=[];for(let t=0;t<r.length;t+=1)i[t]=ws(hs(e,r,t));const o=e=>we(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=B()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);N(e,t,r),n=!0},p(e,n){if(15&n){let s;for(r=e[15],s=0;s<r.length;s+=1){const o=hs(e,r,s);i[s]?(i[s].p(o,n),pe(i[s],1)):(i[s]=ws(o),i[s].c(),pe(i[s],1),i[s].m(t.parentNode,t))}for(me(),s=r.length;s<i.length;s+=1)o(s);ge()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)we(i[e]);n=!1},d(e){D(i,e),e&&R(t)}}}function ps(e){let t,n,r=e[2](e[16],e[19])+"",i=e[21]&&function(){let e;return{c(){e=k(", ")},m(t,n){N(t,e,n)},d(t){t&&R(e)}}}();return{c(){t=O("span"),i&&i.c(),n=k(r),V(t,"class","lookupValue")},m(e,r){N(e,t,r),i&&i.m(t,null),T(t,n)},p(e,t){1&t&&r!==(r=e[2](e[16],e[19])+"")&&U(n,r)},d(e){e&&R(t),i&&i.d()}}}function ws(e){let t,n,r,i,o,s,a,l,c=e[0],d=[];for(let t=0;t<c.length;t+=1)d[t]=ps(fs(e,c,t));return i=new et({props:{size:"18"}}),{c(){t=O("div");for(let e=0;e<d.length;e+=1)d[e].c();n=x(),r=O("span"),Ie(i.$$.fragment),o=x(),V(r,"class","feather pointer svelte-1r8jgd4"),V(t,"class","lookupItem svelte-1r8jgd4")},m(c,u){N(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);T(t,n),T(t,r),Ae(i,r,null),T(t,o),s=!0,a||(l=P(r,"click",e[3](e[16]._id)),a=!0)},p(r,i){if(e=r,7&i){let r;for(c=e[0],r=0;r<c.length;r+=1){const o=fs(e,c,r);d[r]?d[r].p(o,i):(d[r]=ps(o),d[r].c(),d[r].m(t,n))}for(;r<d.length;r+=1)d[r].d(1);d.length=c.length}},i(e){s||(pe(i.$$.fragment,e),s=!0)},o(e){we(i.$$.fragment,e),s=!1},d(e){e&&R(t),D(d,e),$e(i),a=!1,l()}}}function ys(e){return{c:C,m:C,p:C,i:C,o:C,d:C}}function Cs(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ys,then:gs,catch:ms,value:15,blocks:[,,,]};return ye(e[1](),r),{c(){t=O("div"),r.block.c(),V(t,"class","lookup svelte-1r8jgd4")},m(e,i){N(e,t,i),r.block.m(t,r.anchor=null),r.mount=()=>t,r.anchor=null,n=!0},p(t,[n]){Ce(r,e=t,n)},i(e){n||(pe(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){we(r.blocks[e])}n=!1},d(e){e&&R(t),r.block.d(),r.token=null,r=null}}}function Es(e,n,r){let{id:i}=n,{item:o}=n,{praefix:s}=n,{record:a}=n;const{refItem:l,view:c}=o.properties;let d=c.split(","),[u,h]=l.split(":");const[f,g]=h.split("."),p=()=>{oe().then((()=>{const e=document.querySelector("div.form-field."+o.name);e&&(e.style.display="none")}))};return e.$$set=e=>{"id"in e&&r(4,i=e.id),"item"in e&&r(5,o=e.item),"praefix"in e&&r(6,s=e.praefix),"record"in e&&r(7,a=e.record)},[d,async()=>{let e=[];if(a._id){const n=!d.some((e=>e.includes(":")));g&&(u=g+"."+u);const i={[u]:a[u]||a._id};if(e=await t.getSectionView(f,i,n),!n){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===a._id));return n._id=e._id,n})),r(0,d=d.map((e=>e.split(":")[1])))}}return e.length||p(),e},(e,t)=>"boolean"===o.type?e[t]?"ja":"nein":"object"===o.type?"(ja)":e["_"+t]||m(e[t])||e[t],e=>async()=>{const n=await t.getTaskByDocId(e);if(!n)return;const r=n._id,i=`/task/${n.event}/${r}/task?view=standalone`;window.open(i)},i,o,s,a]}class _s extends be{constructor(e){var t;super(),us.getElementById("svelte-1r8jgd4-style")||((t=O("style")).id="svelte-1r8jgd4-style",t.textContent=".feather.svelte-1r8jgd4{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1r8jgd4{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1r8jgd4{position:relative;margin-left:2em;padding-bottom:0.75em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}div.field:has(div.lookup){margin-bottom:0.25em !important}",T(us.head,t)),Se(this,e,Es,Cs,A,{id:4,item:5,praefix:6,record:7})}}function vs(e){let t,n,r;return n=new rt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Is(e){let t,n,r,i,o;return n=new rt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[9]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function As(e){let t,n,r,i,o,s;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[10]);const a=[Is,vs],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}function $s(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value)},[i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e=h;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){K(e,t)}]}class Ss extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,$s,As,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function bs(e){let t,n,r;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Ts(e){let t,n,r,i,o;return n=new gt({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[11]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function Ns(e){let t,n,r,i,o,s;n=new e[10]({props:{inputClass:e[2],pattern:e[0],placeholder:e[1],disabled:e[3],formnovalidate:e[4],readonly:e[5],required:e[6],id:e[7],name:e[8],value:e[9]}}),n.$on("change",e[12]);const a=[Ts,bs],l=[];function c(e,t){return e[9]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};4&r&&(s.inputClass=e[2]),1&r&&(s.pattern=e[0]),2&r&&(s.placeholder=e[1]),8&r&&(s.disabled=e[3]),16&r&&(s.formnovalidate=e[4]),32&r&&(s.readonly=e[5]),64&r&&(s.required=e[6]),128&r&&(s.id=e[7]),256&r&&(s.name=e[8]),512&r&&(s.value=e[9]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}function Rs(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{pattern:f}=t,{placeholder:m}=t;f||="(\\+4[1-9]\\s?)([1-9]{2}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})|(\\d{2,4}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})",m||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,i=e.inputClass),"disabled"in e&&n(3,o=e.disabled),"formnovalidate"in e&&n(4,s=e.formnovalidate),"readonly"in e&&n(5,a=e.readonly),"required"in e&&n(6,l=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,h=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,m=e.placeholder)},[f,m,i,o,s,a,l,d,u,h,r,async()=>{if(!h)return;let e="tel:"+h;window.open(e,"_self")},function(t){K(e,t)}]}class Ds extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,Rs,Ns,A,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function Os(e){let t,n,r;return n=new ct({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,i){N(e,t,i),Ae(n,t,null),r=!0},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n)}}}function Ms(e){let t,n,r,i,o;return n=new ct({props:{size:"18"}}),{c(){t=O("span"),Ie(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,a){N(s,t,a),Ae(n,t,null),r=!0,i||(o=P(t,"click",e[11]),i=!0)},p:C,i(e){r||(pe(n.$$.fragment,e),r=!0)},o(e){we(n.$$.fragment,e),r=!1},d(e){e&&R(t),$e(n),i=!1,o()}}}function ks(e){let t,n,r,i,o,s;n=new e[10]({props:{type:"email",inputClass:e[0],pattern:e[8],placeholder:e[9],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const a=[Ms,Os],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=O("div"),Ie(n.$$.fragment),r=x(),o.c(),z(t,"position","relative")},m(e,o){N(e,t,o),Ae(n,t,null),T(t,r),l[i].m(t,null),s=!0},p(e,[r]){const s={};1&r&&(s.inputClass=e[0]),256&r&&(s.pattern=e[8]),512&r&&(s.placeholder=e[9]),2&r&&(s.disabled=e[1]),4&r&&(s.formnovalidate=e[2]),8&r&&(s.readonly=e[3]),16&r&&(s.required=e[4]),32&r&&(s.id=e[5]),64&r&&(s.name=e[6]),128&r&&(s.value=e[7]),n.$set(s);let d=i;i=c(e),i===d?l[i].p(e,r):(me(),we(l[d],1,1,(()=>{l[d]=null})),ge(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),pe(o,1),o.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(o),s=!0)},o(e){we(n.$$.fragment,e),we(o),s=!1},d(e){e&&R(t),$e(n),l[i].d()}}}function xs(e,t,n){const{TextField:r}=c;let{inputClass:i}=t,{disabled:o}=t,{formnovalidate:s}=t,{readonly:a}=t,{required:l}=t,{id:d}=t,{name:u}=t,{value:h}=t,{pattern:f}=t,{placeholder:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,i=e.inputClass),"disabled"in e&&n(1,o=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,a=e.readonly),"required"in e&&n(4,l=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,h=e.value),"pattern"in e&&n(8,f=e.pattern),"placeholder"in e&&n(9,m=e.placeholder)},[i,o,s,a,l,d,u,h,f,m,r,async()=>{if(!h)return;let e="mailto:"+h;window.open(e,"_self")},function(t){K(e,t)}]}class Bs extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=O("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",T(document.head,t)),Se(this,e,xs,ks,A,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const Ps=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"];function Ls(e){let t;return{c(){t=O("textarea"),V(t,"id",e[0]),z(t,"visibility","hidden")},m(n,r){N(n,t,r),e[18](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&R(t),e[18](null)}}}function Fs(e){let t;return{c(){t=O("div"),V(t,"id",e[0])},m(n,r){N(n,t,r),e[17](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&R(t),e[17](null)}}}function Vs(e){let t;function n(e,t){return e[1]?Fs:Ls}let r=n(e),i=r(e);return{c(){t=O("div"),i.c(),V(t,"class",e[2])},m(n,r){N(n,t,r),i.m(t,null),e[19](t)},p(e,[o]){r===(r=n(e))&&i?i.p(e,o):(i.d(1),i=r(e),i&&(i.c(),i.m(t,null))),4&o&&V(t,"class",e[2])},i:C,o:C,d(n){n&&R(t),i.d(),e[19](null)}}}const Us=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let Hs=(()=>{let e={listeners:[],scriptId:Us("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,r)=>{e.scriptLoaded?r():(e.listeners.push(r),e.injected||((t,n,r,i)=>{e.injected=!0;const o=n.createElement("script");o.referrerPolicy="origin",o.type="application/javascript",o.src=r,o.onload=()=>{i()},n.head&&n.head.appendChild(o)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function zs(e,t,n){var r;let i,o,s,{id:a=Us("tinymce-svelte")}=t,{inline:l}=t,{disabled:c=!1}=t,{apiKey:d="no-api-key"}=t,{channel:u="6"}=t,{scriptSrc:h}=t,{conf:f={}}=t,{modelEvents:m="change input undo redo"}=t,{value:g=""}=t,{text:p=""}=t,{cssClass:w="tinymce-wrapper"}=t,y=g,C=c;const E=Z(),_=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},v=()=>{const e=Object.assign(Object.assign({},f),{target:o,inline:void 0!==l?l:void 0!==f.inline&&f.inline,readonly:c,setup:e=>{n(14,s=e),e.on("init",(()=>{e.setContent(g),e.on(m,(()=>{n(15,y=e.getContent()),y!==g&&(n(5,g=y),n(6,p=e.getContent({format:"text"})))}))})),((e,t)=>{Ps.forEach((n=>{e.on(n,(r=>{t(n.toLowerCase(),{eventName:n,event:r,editor:e})}))}))})(e,E),"function"==typeof f.setup&&f.setup(e)}});n(4,o.style.visibility="",o),_().init(e)};return q((()=>{if(null!==_())v();else{const e=h||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;Hs.load(i.ownerDocument,e,(()=>{v()}))}})),Y((()=>{var e;s&&(null===(e=_())||void 0===e||e.remove(s))})),e.$$set=e=>{"id"in e&&n(0,a=e.id),"inline"in e&&n(1,l=e.inline),"disabled"in e&&n(7,c=e.disabled),"apiKey"in e&&n(8,d=e.apiKey),"channel"in e&&n(9,u=e.channel),"scriptSrc"in e&&n(10,h=e.scriptSrc),"conf"in e&&n(11,f=e.conf),"modelEvents"in e&&n(12,m=e.modelEvents),"value"in e&&n(5,g=e.value),"text"in e&&n(6,p=e.text),"cssClass"in e&&n(2,w=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(s&&y!==g&&(s.setContent(g),n(6,p=s.getContent({format:"text"}))),s&&c!==C&&(n(16,C=c),"function"==typeof(null===n(13,r=s.mode)||void 0===r?void 0:r.set)?s.mode.set(c?"readonly":"design"):s.setMode(c?"readonly":"design")))},[a,l,w,i,o,g,p,c,d,u,h,f,m,r,s,y,C,function(e){J[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){J[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){J[e?"unshift":"push"]((()=>{i=e,n(3,i)}))}]}class Ws extends be{constructor(e){super(),Se(this,e,zs,Vs,A,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function Gs(e){let t,n,r,i,o,s,a;function l(t){e[8](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",conf:e[7],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new Ws({props:c}),J.push((()=>ve(n,"value",l))),{c(){t=O("div"),Ie(n.$$.fragment),i=x(),o=O("input"),V(o,"class",s=e[1]||e[2]),V(o,"id",e[3]),V(o,"name",e[3]),o.value=e[0],o.hidden=!0,z(t,"min-height","10em"),z(t,"margin-top","-1em")},m(e,r){N(e,t,r),Ae(n,t,null),T(t,i),T(t,o),a=!0},p(e,t){const i={};16&t&&(i.disabled=e[4]),32&t&&(i.readonly=e[5]),!r&&1&t&&(r=!0,i.value=e[0],ae((()=>r=!1))),n.$set(i),(!a||6&t&&s!==(s=e[1]||e[2]))&&V(o,"class",s),(!a||8&t)&&V(o,"id",e[3]),(!a||8&t)&&V(o,"name",e[3]),(!a||1&t&&o.value!==e[0])&&(o.value=e[0])},i(e){a||(pe(n.$$.fragment,e),a=!0)},o(e){we(n.$$.fragment,e),a=!1},d(e){e&&R(t),$e(n)}}}function js(e){let t,n,r=e[6]&&Gs(e);return{c(){r&&r.c(),t=B()},m(e,i){r&&r.m(e,i),N(e,t,i),n=!0},p(e,[n]){e[6]?r?(r.p(e,n),64&n&&pe(r,1)):(r=Gs(e),r.c(),pe(r,1),r.m(t.parentNode,t)):r&&(me(),we(r,1,1,(()=>{r=null})),ge())},i(e){n||(pe(r),n=!0)},o(e){we(r),n=!1},d(e){r&&r.d(e),e&&R(t)}}}function Xs(e,t,r){let i=JSON.parse(n.getItem("Locale")).id;i=i.startsWith("fr")?"fr_FR":i.split("-")[0];let o,{value:s}=t,{noForm:a}=t,{classId:l}=t,{id:c}=t,{disabled:d}=t,{readonly:u}=t;const h={plugins:"advlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:i};return q((()=>setTimeout((()=>{r(6,o=!0)}),100))),e.$$set=e=>{"value"in e&&r(0,s=e.value),"noForm"in e&&r(1,a=e.noForm),"classId"in e&&r(2,l=e.classId),"id"in e&&r(3,c=e.id),"disabled"in e&&r(4,d=e.disabled),"readonly"in e&&r(5,u=e.readonly)},[s,a,l,c,d,u,o,h,function(e){s=e,r(0,s)}]}class qs extends be{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=O("style")).id="svelte-zemw0w-style",t.textContent="div.tox-statusbar__text-container{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",T(document.head,t)),Se(this,e,Xs,js,A,{value:0,noForm:1,classId:2,id:3,disabled:4,readonly:5})}}
|
|
2
2
|
/*!
|
|
3
3
|
* Signature Pad v5.0.3 | https://github.com/szimek/signature_pad
|
|
4
4
|
* (c) 2024 Szymon Nowak | Released under the MIT license
|